body.auth-mode { background: white; }

.auth-screen {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  background: white;
}

/* ---- LEFT: brand side ---- */
.auth-brand {
  background: var(--navy);
  color: white;
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.auth-brand::after {
  content: '';
  position: absolute;
  right: -180px; bottom: -180px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,174,239,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand .logo { font-size: 17px; position: relative; z-index: 2; }
.auth-brand .logo .portal-tag { color: #94a3b8; border-left-color: #334155; }
.auth-brand-body { margin-top: auto; margin-bottom: auto; max-width: 460px; position: relative; z-index: 2; }
.auth-eyebrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--cyan); margin-bottom: 18px; font-weight: 500;
}
.auth-headline {
  font-size: 40px; font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.1; color: white; margin-bottom: 18px;
}
.auth-headline em { font-style: normal; color: var(--cyan); }
.auth-subhead { font-size: 15px; line-height: 1.55; color: #94a3b8; max-width: 380px; }
.auth-brand-foot {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: #94a3b8;
  padding-top: 24px; border-top: 1px solid #1e3a5f;
}
.auth-brand-foot svg { color: var(--cyan); flex-shrink: 0; }
.auth-brand-foot strong { color: white; font-weight: 600; }

/* ---- RIGHT: form side ---- */
.auth-form-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; padding: 56px 48px; background: white; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form-eyebrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 10px; font-weight: 500;
}
.auth-form h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); margin-bottom: 8px; line-height: 1.2; }
.auth-form-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.5; }
.auth-form-sub strong { color: var(--navy); font-weight: 600; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.auth-field input[type="email"],
.auth-field input[type="text"] {
  width: 100%; font-family: inherit; font-size: 15px; padding: 11px 14px;
  background: white; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text); transition: all 0.15s; height: 44px;
}
.auth-field input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.btn-block { width: 100%; justify-content: center; height: 44px; font-size: 14px; font-weight: 600; margin-top: 8px; }
.auth-foot-link { margin-top: 22px; font-size: 13px; color: var(--text-secondary); text-align: center; }
.auth-foot-link a {
  color: var(--navy); font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--border-strong); padding-bottom: 1px; transition: all 0.15s;
}
.auth-foot-link a:hover { color: var(--cyan-2); border-color: var(--cyan); }

/* ---- error banner (401 on verify) ---- */
.auth-error {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--status-rejected-bg); color: var(--status-rejected);
  border: 1px solid #fecaca; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; margin-bottom: 18px; line-height: 1.5;
}
.auth-error svg { flex-shrink: 0; margin-top: 1px; }

/* ---- flash messages (login/verify) ---- */
.alert {
  display: flex; align-items: center; gap: 10px; text-align: left;
  border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; margin: 0 auto 18px; line-height: 1.5;
  width: 100%; max-width: 380px; box-sizing: border-box;
}
.alert svg { flex-shrink: 0; width: 18px; height: 18px; }
.alert-error {
  background: var(--status-rejected-bg); color: var(--status-rejected);
  border: 1px solid #fecaca;
}
.alert-success {
  background: var(--status-approved-bg); color: var(--status-approved);
  border: 1px solid #a7f3d0;
}

/* ---- CODE INPUT (verify) ---- */
.code-inputs { display: flex; gap: 8px; margin-bottom: 8px; }
.code-input {
  flex: 1; height: 56px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 22px; font-weight: 600; text-align: center;
  color: var(--navy); background: white;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: all 0.15s; padding: 0;
}
.code-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.code-input.filled { border-color: var(--navy); background: var(--cyan-soft); }
.code-help {
  font-size: 12px; color: var(--text-muted); margin-bottom: 22px;
  display: flex; justify-content: space-between; align-items: center;
}
.code-help button.link-btn {
  background: transparent; border: none; font-family: inherit; font-size: 12px;
  color: var(--navy); font-weight: 500; cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
}
.code-help button.link-btn:disabled { color: var(--text-muted); cursor: not-allowed; text-decoration: none; }
.code-help a.link-btn { background: transparent; border: none; font-family: inherit; font-size: 12px; color: var(--navy); font-weight: 500; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.code-help a.link-btn.is-disabled { color: var(--text-muted); cursor: not-allowed; text-decoration: none; pointer-events: none; }

.email-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
  text-decoration: none; margin-bottom: 14px; transition: color 0.15s;
}
.email-back-link:hover { color: var(--cyan-2); }

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; min-height: 100vh; }
  .auth-brand { padding: 24px 24px 20px; min-height: auto; }
  .auth-brand::after { display: none; }
  .auth-brand-body { display: none; }
  .auth-brand-foot { display: none; }
  .auth-form-side { padding: 32px 24px 48px; align-items: flex-start; }
  .auth-headline { font-size: 28px; }
}
