/* =====================================================================
   VRA Lab Payments — app.css
   Light theme. Mobile-first. No external fonts or CDNs: the Content-Security
   -Policy on this vhost is 'self' only, so anything remote would be blocked.
   ===================================================================== */

:root {
  --canvas:      #f6f6f3;
  --surface:     #ffffff;
  --ink:         #14171f;
  --ink-soft:    #454c5a;
  --muted:       #737b8a;
  --line:        #e3e3dd;
  --line-strong: #cfcfc7;

  --accent:      #0d5a54;
  --accent-deep: #094641;
  --accent-tint: #e8f2f0;

  --danger:      #9b1c1c;
  --danger-tint: #fdeaea;
  --warn:        #8a5a00;
  --warn-tint:   #fdf4e3;
  --ok:          #14603c;
  --ok-tint:     #e7f4ec;

  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 2px rgba(20, 23, 31, .05),
                 0 8px 24px -12px rgba(20, 23, 31, .18);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------------------------------------------------------------------
   Auth shell
   --------------------------------------------------------------------- */

.auth-body { min-height: 100vh; min-height: 100dvh; }

.auth-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-aside { display: none; }

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px 40px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px 20px;
}

.auth-card__head { margin-bottom: 22px; }

.auth-card__head h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.auth-card__head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.auth-card__foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.auth-card__foot a { color: var(--ink-soft); }

.ver {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .02em;
}

/* ---------------------------------------------------------------------
   Fields
   --------------------------------------------------------------------- */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-soft);
}

.field__wrap { position: relative; display: flex; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

input::placeholder { color: #a8adb8; }

.field__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 560;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.field__toggle:hover { color: var(--ink); background: var(--canvas); }

.input--code {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: .32em;
  text-align: center;
  padding: 13px 12px;
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 560;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}

.btn--primary { color: #fff; background: var(--accent); }
.btn--primary:hover { background: var(--accent-deep); }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--canvas); }

.btn--block { width: 100%; }

.btn:disabled { opacity: .55; cursor: not-allowed; }

.linklike {
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--ink-soft);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.linklike:hover { text-decoration: underline; }

.inline-form { display: inline; margin: 0; }

/* ---------------------------------------------------------------------
   Alerts
   --------------------------------------------------------------------- */

.alert {
  margin-bottom: 16px;
  padding: 11px 13px;
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}

.alert--error   { color: var(--danger); background: var(--danger-tint); border-color: #f3cfcf; }
.alert--warning { color: var(--warn);   background: var(--warn-tint);   border-color: #f0dcb4; }
.alert--success { color: var(--ok);     background: var(--ok-tint);     border-color: #c3e2d0; }
.alert--info    { color: var(--ink-soft); background: var(--canvas);    border-color: var(--line-strong); }

.alert__meta {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  opacity: .8;
}

/* ---------------------------------------------------------------------
   2FA enrolment
   --------------------------------------------------------------------- */

.enrol {
  margin-bottom: 20px;
  padding: 18px;
  text-align: center;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.enrol__qr {
  display: inline-flex;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.enrol__qr img, .enrol__qr canvas { display: block; }

.enrol__hint {
  margin: 12px 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.enrol__secret {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--ink);
  word-break: break-all;
}

/* ---------------------------------------------------------------------
   Desktop: split layout with a blueprint-grid brand panel
   --------------------------------------------------------------------- */

@media (min-width: 900px) {
  .auth-shell {
    flex-direction: row;
    align-items: stretch;
  }

  .auth-shell--narrow .auth-aside { display: none; }
  .auth-shell--narrow .auth-main  { flex: 1; }

  .auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 0 0 42%;
    max-width: 560px;
    padding: 40px;
    overflow: hidden;
    color: #eef0f2;
    background: #12151c;
  }

  .auth-aside__mark {
    position: relative;
    z-index: 1;
    font-size: 15px;
    font-weight: 620;
    letter-spacing: .02em;
  }

  /* Fine hairline grid — quiet texture, no imagery, no external assets. */
  .auth-aside__grid {
    position: absolute;
    inset: -1px;
    background-image:
      linear-gradient(to right,  rgba(255,255,255,.045) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 45%, #000 15%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 45%, #000 15%, transparent 72%);
  }

  .auth-aside__note {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.6;
    color: #9aa3b0;
  }

  .auth-main { padding: 40px; }
  .auth-card { max-width: 400px; padding: 32px 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
