@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700;800&display=swap");

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
  --font-ui:      "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-code:    "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --orange:        #ff5a1f;
  --orange-dark:   #d8430d;
  --orange-glow:   rgba(255,90,31,.14);
  --orange-soft:   #fff4ef;
  --orange-border: rgba(255,90,31,.26);

  --ink:    #111118;
  --muted:  #52525c;
  --muted2: #8e8e96;
  --line:   #e2e2e8;

  --canvas:       #ffffff;
  --paper:        #ffffff;
  --card-shadow:  0 20px 50px rgba(0,0,0,.05), 0 2px 10px rgba(0,0,0,.03);
  --card-border:  #e2e2e8;

  --left-bg:          linear-gradient(135deg, #fffaf8 0%, #ffffff 50%, #f6f6fb 100%);
  --left-muted:       #52525c;
  --terminal-bg:      #ffffff;
  --terminal-border:  #e2e2e8;

  --r-card:  18px;
  --r-input: 11px;
  --r-btn:   11px;

  --ease-out: cubic-bezier(.22,.68,0,1.2);
  --ease-std: cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* ─── Layout shell ───────────────────────────────────────── */
body {
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--canvas);
  display: grid;
  grid-template-columns: minmax(320px, 44%) 1fr;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════
   LEFT — HERO / BRANDING PANEL
══════════════════════════════════════════════════════════ */
.auth-visual {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--left-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 60px) clamp(28px, 5vw, 56px);
  isolation: isolate;
}

/* Faint code-text watermark */
.auth-visual::before {
  content: "</>\nfunction grow() {\n  return build();\n}\nconst app = new Portal();\nSELECT * FROM ideas;\nif (ready) { deploy(); }";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre;
  font: 700 clamp(13px, 1.8vw, 21px)/2 var(--font-code);
  color: rgba(255,90,31,.04);
  pointer-events: none;
  transform: rotate(-9deg) translateY(-4%);
  z-index: 0;
}

/* Dot-grid overlay */
.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,90,31,.09) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
}

/* ── Geometric circles ── */
.auth-geo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.auth-geo span {
  position: absolute;
  border: 1px solid rgba(255,90,31,.12);
  border-radius: 50%;
  animation: geo-float 9s ease-in-out infinite alternate;
  will-change: transform;
}

.auth-geo span:nth-child(1) {
  width: 300px; height: 300px;
  top: -90px; right: -110px;
  animation-delay: 0s;
}
.auth-geo span:nth-child(2) {
  width: 190px; height: 190px;
  bottom: 100px; right: -70px;
  animation-delay: -3s;
  border-color: rgba(255,90,31,.08);
}
.auth-geo span:nth-child(3) {
  width: 110px; height: 110px;
  top: 42%; left: -38px;
  animation-delay: -5s;
  border-color: rgba(255,90,31,.07);
  border-radius: 22px;
}

@keyframes geo-float {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-22px) rotate(14deg); }
}

/* ── Brand row ── */
.auth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font: 800 11px/1 var(--font-code);
  letter-spacing: .15em;
  opacity: 0;
  animation: fade-up .55s ease-out .08s both;
}

.auth-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--orange) 0%, #ff7040 100%);
  box-shadow: 0 6px 18px rgba(255,90,31,.25);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.auth-brand-logo img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* ── Portal badge ── */
.auth-portal-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff0ea;
  border: 1px solid #ffd5c4;
  font: 700 10px/1 var(--font-code);
  letter-spacing: .14em;
  color: var(--orange);
  margin-top: 4px;
  opacity: 0;
  animation: fade-up .55s ease-out .2s both;
}

.auth-portal-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255,90,31,.18);
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,90,31,.18); }
  50%       { box-shadow: 0 0 0 7px rgba(255,90,31,.06); }
}

/* ── Hero copy ── */
.auth-copy {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0;
}

.auth-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 800;
  line-height: .93;
  letter-spacing: -.045em;
  color: var(--ink);
  margin: 0 0 18px;
  opacity: 0;
  animation: fade-up .6s ease-out .3s both;
}

.auth-copy h2 em {
  font-style: normal;
  color: var(--orange);
}

.auth-copy p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 360px;
  opacity: 0;
  animation: fade-up .6s ease-out .42s both;
}

/* ── Terminal box (Light combination) ── */
.auth-terminal {
  position: relative;
  z-index: 2;
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 13px;
  padding: 16px 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.05);
  opacity: 0;
  animation: fade-up .6s ease-out .55s both;
}

.auth-terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f4;
}

.auth-terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.auth-terminal-dot:nth-child(1) { background: #ff5f56; }
.auth-terminal-dot:nth-child(2) { background: #febc2e; }
.auth-terminal-dot:nth-child(3) { background: #27c93f; }

.auth-terminal-title {
  margin-left: auto;
  font: 600 10px/1 var(--font-code);
  color: #8e8e96;
}

.auth-terminal-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font: 500 12px/1.9 var(--font-code);
  color: transparent;
  transition: color .35s ease;
}

.auth-terminal-line.visible {
  color: #27272a;
}

.auth-terminal-line .tl-prompt {
  color: var(--orange);
  flex-shrink: 0;
}

.auth-terminal-line .tl-cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: var(--orange);
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 2px;
  opacity: 0;
  animation: blink .95s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0; }
  50%       { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════
   RIGHT — LOGIN CARD AREA
══════════════════════════════════════════════════════════ */
.auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 56px) clamp(18px, 5vw, 60px);
  background: var(--paper);
  position: relative;
  overflow: hidden;
}

.auth-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 85% 15%, rgba(255,107,33,.05) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(255,107,33,.04) 0%, transparent 55%);
  pointer-events: none;
}

/* ── Card ── */
.auth-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  padding: clamp(28px, 5vw, 46px);
  box-shadow: var(--card-shadow);
  opacity: 0;
  transform: translateY(26px);
  animation: card-in .6s var(--ease-out) .12s both;
  box-sizing: border-box;
  overflow: hidden;
}

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Shimmer accent line at top */
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--orange) 0%, #ff9254 50%, var(--orange) 100%);
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Wide variant for register */
.auth-card-wide { width: min(560px, 100%); }

/* ── Kicker ── */
.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 700 10px/1 var(--font-code);
  letter-spacing: .16em;
  color: var(--orange);
  text-transform: uppercase;
}

.auth-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--orange-glow);
  animation: pulse-ring 2s ease-in-out infinite;
}

/* ── Card headings ── */
.auth-card h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--ink);
  margin: 12px 0 8px;
  line-height: 1.15;
}

.auth-intro {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 24px;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── Alerts ── */
.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #b93010;
  background: #fff3ee;
  border: 1px solid #ffd0bb;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-error::before {
  content: "!";
  display: block;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #b93010;
  color: #fff;
  font: 800 11px/18px var(--font-code);
  text-align: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-success {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #0f6e3f;
  background: #edf9f2;
  border: 1px solid #b8e8cf;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ── Form labels ── */
.auth-card label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #46465a;
  margin-top: 16px;
  margin-bottom: 6px;
  letter-spacing: .02em;
}

/* first label in form — less top margin */
.auth-card form > label:first-of-type,
.auth-card form > div:first-of-type > label {
  margin-top: 0;
}

.auth-card form {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ── Text / email / password inputs ── */
.auth-card input {
  box-sizing: border-box;
  max-width: 100%;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="tel"],
.auth-card input[type="number"],
.auth-pw-wrap input {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 50px;
  background: #fafafa;
  border: 1.5px solid var(--line);
  border-radius: var(--r-input);
  padding: 0 14px;
  font: 500 14px/1 var(--font-ui);
  color: var(--ink);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color .16s var(--ease-std),
    box-shadow   .16s var(--ease-std),
    background   .16s var(--ease-std);
}

.auth-card input:hover {
  border-color: #c4c4d6;
  background: #fff;
}

.auth-card input:focus,
.auth-pw-wrap input:focus {
  border-color: var(--orange);
  background: #fffcfa;
  box-shadow: 0 0 0 4px var(--orange-glow);
}

/* password input extra right padding for toggle btn */
.auth-pw-wrap {
  position: relative;
}

.auth-pw-wrap input {
  padding-right: 46px !important;
  border: 1.5px solid var(--line);
}

/* ── Show/hide password toggle ── */
.auth-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: var(--muted2);
  display: grid;
  place-items: center;
  line-height: 0;
  border-radius: 6px;
  transition: color .15s var(--ease-std), background .15s var(--ease-std);
}

.auth-pw-toggle:hover {
  color: var(--orange);
  background: rgba(255,107,33,.07);
}

.auth-pw-toggle svg {
  width: 17px;
  height: 17px;
  pointer-events: none;
}

/* ── Session + account recovery row ── */
.auth-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  user-select: none;
  line-height: 1;
}

/* checkbox — override generic input styles */
.auth-remember input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-height: unset !important;
  padding: 0 !important;
  border-radius: 5px !important;
  border: 1.5px solid var(--line) !important;
  background: #fafafa !important;
  box-shadow: none !important;
  cursor: pointer;
  accent-color: var(--orange);
  flex-shrink: 0;
  vertical-align: middle;
  transition: border-color .15s var(--ease-std), box-shadow .15s var(--ease-std);
}

.auth-remember input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px var(--orange-glow) !important;
  border-color: var(--orange) !important;
}

.auth-forgot {
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  transition: color .15s var(--ease-std);
}

.auth-forgot:hover { color: var(--orange-dark); }

.auth-session-note {
  font-size: 12px;
  color: var(--muted);
}

/* ── Primary submit button ── */
.auth-submit {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  margin-top: 22px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: var(--r-btn);
  font: 700 13.5px/1 var(--font-ui);
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(255,107,33,.3);
  transition:
    background  .16s var(--ease-std),
    box-shadow  .16s var(--ease-std),
    transform   .16s var(--ease-std);
  -webkit-tap-highlight-color: transparent;
}

/* Shine sweep on hover */
.auth-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  background-size: 200% 100%;
  background-position: 150% 0;
  transition: background-position .55s ease;
}

.auth-submit:hover::after { background-position: -50% 0; }

.auth-submit:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(255,107,33,.38);
}

.auth-submit:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(255,107,33,.2);
}

.auth-submit.loading {
  background: var(--orange-dark);
  pointer-events: none;
  transform: none;
}

.auth-submit.success {
  background: #16a34a;
  box-shadow: 0 10px 28px rgba(22,163,74,.28);
  pointer-events: none;
}

/* Spinner for loading state */
.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  animation: spin .65s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Secondary "Create account" button ── */
.auth-create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border: 1.5px solid var(--orange-border);
  border-radius: var(--r-btn);
  background: var(--orange-soft);
  color: var(--orange-dark);
  text-decoration: none;
  font: 700 12.5px/1 var(--font-ui);
  transition:
    background    .16s var(--ease-std),
    border-color  .16s var(--ease-std),
    transform     .16s var(--ease-std);
}

.auth-create:hover {
  background: #ffe4d3;
  border-color: var(--orange);
  transform: translateY(-1px);
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 11px;
  color: var(--muted2);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── Back link ── */
.auth-back {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted2);
  text-decoration: none;
  transition: color .15s var(--ease-std);
}

.auth-back:hover { color: var(--orange); }

/* ── Trust line ── */
.auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 11px;
  color: var(--muted2);
  letter-spacing: .01em;
}

.auth-trust svg {
  width: 13px;
  height: 13px;
  color: #22c55e;
  flex-shrink: 0;
}

/* ── OTP input ── */
.auth-otp {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  text-align: center !important;
  letter-spacing: .28em !important;
  text-indent: .28em !important;
  font: 700 22px/1 var(--font-code) !important;
  padding: 0 12px !important;
  height: 50px !important;
  margin: 0 0 6px !important;
  background: #fafafa !important;
  border: 1.5px solid var(--line) !important;
  border-radius: var(--r-input) !important;
  color: var(--ink) !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition:
    border-color .16s var(--ease-std),
    box-shadow   .16s var(--ease-std),
    background   .16s var(--ease-std) !important;
}

.auth-otp::placeholder {
  color: #c4c4cc !important;
  letter-spacing: .28em !important;
  opacity: .7 !important;
}

.auth-otp:hover {
  border-color: #c4c4d6 !important;
  background: #fff !important;
}

.auth-otp:focus {
  border-color: var(--orange) !important;
  background: #fffcfa !important;
  box-shadow: 0 0 0 4px var(--orange-glow) !important;
}

/* ── Resend form ── */
.auth-resend { margin-top: 10px; }

.auth-resend button {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-btn);
  background: #fff;
  color: var(--muted);
  font: 700 12px/1 var(--font-ui);
  cursor: pointer;
  transition: border-color .15s var(--ease-std), color .15s var(--ease-std);
}

.auth-resend button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.auth-resend button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ── Register page grid ────────────────────────────────── */
/*
   Each row is a .reg-grid (2 cols on desktop, 1 on mobile).
   Each .reg-field wraps exactly one label + one input (or pw-wrap).
   This avoids the "label wrapping input" structure issue entirely.
*/
.reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
  margin-top: 14px;
}

.reg-grid:first-of-type {
  margin-top: 0;
}

.reg-field {
  display: flex;
  flex-direction: column;
}

.reg-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #46465a;
  margin: 0 0 6px;
  letter-spacing: .02em;
}

.reg-field input[type="text"],
.reg-field input[type="email"],
.reg-field input[type="password"],
.reg-field input[type="tel"] {
  display: block;
  width: 100%;
  height: 50px;
  background: #fafafa;
  border: 1.5px solid var(--line);
  border-radius: var(--r-input);
  padding: 0 14px;
  font: 500 14px/1 var(--font-ui);
  color: var(--ink);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color .16s var(--ease-std),
    box-shadow   .16s var(--ease-std),
    background   .16s var(--ease-std);
}

.reg-field input:hover {
  border-color: #c4c4d6;
  background: #fff;
}

.reg-field input:focus {
  border-color: var(--orange);
  background: #fffcfa;
  box-shadow: 0 0 0 4px var(--orange-glow);
}

/* pw-wrap inside reg-field */
.reg-field .auth-pw-wrap {
  position: relative;
}

.reg-field .auth-pw-wrap input {
  padding-right: 46px !important;
}

/* Optional label hint */
.reg-optional {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted2);
  letter-spacing: 0;
}

/* ── Helper text ── */
.auth-field-help {
  display: block;
  margin: 5px 0 0;
  color: var(--muted2);
  font-size: 11px;
  line-height: 1.5;
}

/* ─── Keyframes ──────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 880px) {
  body {
    grid-template-columns: 1fr;
  }

  /* Left panel becomes compact horizontal strip on mobile */
  .auth-visual {
    min-height: auto;
    padding: 24px 20px 20px;
  }

  .auth-visual::before { display: none; }

  /* Hide only 3rd decorative circle on mobile */
  .auth-geo span:nth-child(3) { display: none; }

  /* Copy heading smaller */
  .auth-copy h2 { font-size: 34px; margin-bottom: 12px; }
  .auth-copy p  { font-size: 12.5px; max-width: 100%; }
  .auth-copy    { padding: 18px 0 16px; }

  /* ── Terminal visible and compact on mobile ── */
  .auth-terminal {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    margin-top: 0;
  }

  .auth-terminal-header {
    margin-bottom: 9px;
  }

  .auth-terminal-dot {
    width: 8px;
    height: 8px;
  }

  .auth-terminal-line {
    font-size: 11px;
    line-height: 1.75;
    gap: 7px;
  }

  .auth-terminal-line .tl-cursor {
    width: 6px;
    height: 11px;
  }

  /* Right panel padding adjust */
  .auth-main {
    min-height: auto;
    padding: 28px 16px 44px;
  }
}

@media (max-width: 540px) {
  .auth-visual { padding: 18px 14px 16px; }
  .auth-copy h2 { font-size: 26px; line-height: 1.0; margin-bottom: 8px; }
  .auth-copy p  { display: none; }
  .auth-copy    { padding: 12px 0 12px; }
  .auth-card    { padding: 22px 16px; }
  .auth-card h1 { font-size: 22px; }

  /* OTP responsive styling on mobile */
  .auth-otp {
    font-size: 19px !important;
    height: 48px !important;
    letter-spacing: .2em !important;
    text-indent: .2em !important;
    padding: 0 8px !important;
  }

  /* Terminal even more compact on small phones */
  .auth-terminal {
    padding: 10px 12px;
  }

  .auth-terminal-header {
    margin-bottom: 7px;
  }

  .auth-terminal-line {
    font-size: 10.5px;
    line-height: 1.7;
  }

  /* Register grid collapses to single column */
  .reg-grid { grid-template-columns: 1fr; }
  .reg-grid + .reg-grid { margin-top: 0; }
}

@media (max-width: 380px) {
  .auth-card { padding: 18px 12px; }
  .auth-otp {
    font-size: 17px !important;
    height: 46px !important;
    letter-spacing: .16em !important;
    text-indent: .16em !important;
  }
}

/* ─── Font roles ─────────────────────────────────────────── */
.auth-brand,
.auth-copy h2,
.auth-card h1 {
  font-family: var(--font-display);
}

.auth-kicker,
.auth-portal-badge,
.auth-terminal-line,
.auth-terminal-title,
.auth-otp {
  font-family: var(--font-code);
}
