/* ================================================================
   Auth screens — split brand panel + form panel
   ================================================================ */
body { background: var(--surface); }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}

/* ---------- Brand (left panel) ---------- */
.auth-brand {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding: var(--s-9) var(--s-9);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}
.auth-brand .grid-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.06;
  z-index: 0;
}
.auth-brand .accent-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  right: -160px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(46, 189, 194, .13) 0%, transparent 65%);
  z-index: 0;
}
.auth-brand > * { position: relative; z-index: 1; }

.brand-header { margin-bottom: var(--s-2); }
.brand-logo {
  height: 64px;
  width: auto;
}

.brand-body { max-width: 520px; }
.brand-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: var(--s-4);
}
.brand-headline {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-4);
  color: #fff;
  text-wrap: balance;
}
.brand-lead {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 var(--s-7);
}
.brand-bullets {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.brand-bullet {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.brand-bullet .dot {
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 12px;
}
.brand-bullet .title { font-weight: 600; margin-bottom: 2px; color: #fff; }
.brand-bullet .desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* ---------- Values chips ---------- */
.brand-values {
  margin-top: var(--s-8);
}
.brand-values-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--s-3);
}
.brand-values-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.brand-value-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

/* BMSI brand tints for the three groups. */
.brand-values--strategy .brand-value-chip {
  background: var(--teal);        /* teal — primary brand colour */
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}
.brand-values--values .brand-value-chip {
  background: var(--lime);        /* lime — secondary accent */
  border-color: rgba(255, 255, 255, 0.3);
  color: #1a1a1a;                  /* dark text on lime for contrast */
}
.brand-values--mantra .brand-value-chip {
  /* Mantra is always yellow on dark indigo — yellow is reserved for this */
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 0, 0.35);
  color: var(--mantra);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.brand-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
}

/* ---------- Form panel (right) ---------- */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.auth-form-panel-top {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-6);
  padding: var(--s-6) var(--s-8);
  border-bottom: 1px solid var(--border);
}
.auth-form-panel-top a {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.auth-form-panel-top a:hover { color: var(--navy); }

.auth-form-panel-body {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--s-8);
}
.auth-form { width: 100%; max-width: 420px; }

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--s-6);
}
.back-link:hover { color: var(--navy); }

.auth-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: var(--s-3);
}
.auth-h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 var(--s-3);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.auth-lead {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 var(--s-7);
}

/* ---------- Form card ---------- */
.auth-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field-wrap { position: relative; }
.field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtle);
  font-size: 16px;
  pointer-events: none;
}
.field-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 189, 194, .30);
}
.field-input.has-icon { padding-left: 38px; }
.field-input.has-trail { padding-right: 64px; }
.field-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
.field-trail {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--r-sm);
}
.field-trail:hover { background: var(--surface-2); color: var(--navy); }

.field-error {
  font-size: 12px;
  color: var(--red);
  display: flex;
  gap: 6px;
  align-items: center;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--muted);
  cursor: pointer;
}
.checkbox input { width: 16px; height: 16px; accent-color: var(--navy); }
.link { color: var(--blue); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 40px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), filter var(--t-fast), transform var(--t-fast);
  text-decoration: none;
  width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover { background: var(--teal); color: #fff; filter: brightness(0.94); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--surface-2);
}

/* ---------- Divider ---------- */
.divider {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--subtle);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: var(--s-2) 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.below-card {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--s-6);
}

/* ---------- Alerts ---------- */
.alert {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  margin-bottom: var(--s-5);
}
.alert .icon { flex-shrink: 0; font-size: 16px; line-height: 1; margin-top: 1px; display: flex; align-items: center; }
.alert .icon i[data-lucide], .alert .icon svg { width: 16px; height: 16px; stroke: currentColor; }
/* Field icons */
.field-icon i[data-lucide], .field-icon svg { width: 15px; height: 15px; stroke: currentColor; }
/* Field error icon */
.field-error i[data-lucide], .field-error svg { width: 13px; height: 13px; stroke: currentColor; vertical-align: -2px; }
/* Success orb icon */
.success-orb i[data-lucide], .success-orb svg { stroke: currentColor; }
.alert.info    { background: var(--blue2);  border-color: rgba(38, 156, 224, .3);  color: #1a6ea3; }
.alert.success { background: var(--green2); border-color: rgba(30, 126, 52, .25);  color: #1e7e34; }
.alert.warning { background: var(--amber2); border-color: rgba(232, 163, 61, .35); color: #b7650a; }
.alert.danger  { background: var(--red2);   border-color: rgba(214, 69, 69, .3);   color: #c0392b; }
.alert.dev {
  background: var(--indigo-tint);
  border-color: rgba(48, 38, 130, .2);
  color: var(--indigo);
  font-family: var(--font-mono);
  font-size: 12px;
}
.alert code {
  background: rgba(48, 38, 130, .1);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ---------- MFA digit row ---------- */
.mfa-row {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  margin-bottom: var(--s-5);
}
.mfa-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.mfa-digit:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 189, 194, .30);
}
.mfa-digit.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
