/* S-Payment auth UI — dark navy fintech theme */
:root {
  --bg: #070d1f;
  --bg-2: #0a1430;
  --panel: #0b1633;
  --card: #0e1a38;
  --card-border: rgba(148, 170, 214, 0.14);
  --text: #e8eef9;
  --text-2: #b9c5dc;
  --muted: #8d9bb8;
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --accent-text: #7cc4ff;
  --input-bg: #081129;
  --input-border: #233660;
  --input-border-hover: #31497c;
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.1);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.1);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --focus: 0 0 0 3px rgba(56, 189, 248, 0.4);
  --radius: 12px;
  --radius-sm: 9px;
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
p { margin: 0; }
h1, h2 { margin: 0; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------------- Layout ---------------- */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(59, 130, 246, 0.22), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(34, 211, 238, 0.12), transparent 60%),
    linear-gradient(180deg, #0a1530 0%, #070f24 100%);
  border-right: 1px solid var(--card-border);
}
.brand-panel::before {
  /* faint grid */
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 170, 214, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 170, 214, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%);
  pointer-events: none;
}
.brand-inner {
  position: relative;
  display: flex; flex-direction: column; gap: 32px;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 56px;
  min-height: 100%;
}

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.logo-mark { width: 32px; height: 32px; flex: none; }
.logo:focus-visible { border-radius: 8px; }

.eyebrow {
  color: var(--accent-text); font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px;
}
.brand-headline {
  font-size: clamp(28px, 2.6vw, 38px); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em;
  text-wrap: balance;
}
.brand-sub { color: var(--text-2); margin-top: 14px; font-size: 16px; max-width: 46ch; }

.vp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.vp { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.vp-icon {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--accent-2);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(96, 165, 250, 0.25);
}
.vp-icon svg { width: 20px; height: 20px; }
.vp-t { font-weight: 600; font-size: 15px; line-height: 1.35; }
.vp-d { color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.5; }

.demo-card {
  background: rgba(14, 26, 56, 0.85);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  max-width: 400px;
}
.demo-row { display: flex; align-items: center; gap: 12px; }
.demo-qr { width: 36px; height: 36px; border-radius: 9px; background: #fff; color: #0b1633; display: grid; place-items: center; flex: none; }
.demo-qr svg { width: 22px; height: 22px; }
.demo-main { flex: 1; min-width: 0; }
.demo-label { font-weight: 600; font-size: 14px; }
.demo-id { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px 4px 8px; border-radius: 999px; white-space: nowrap; }
.pill svg { width: 13px; height: 13px; }
.pill-ok { color: var(--success); background: var(--success-bg); }
.demo-amount { font-size: 26px; font-weight: 700; margin: 14px 0 10px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.demo-lines { border-top: 1px dashed var(--card-border); padding-top: 10px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.demo-lines div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.demo-lines strong { color: var(--text); font-weight: 600; }

.trust { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: auto; }
.trust svg { width: 18px; height: 18px; color: var(--success); flex: none; }

/* ---------------- Form side ---------------- */
.form-side {
  display: flex; flex-direction: column;
  min-width: 0;
  padding: 24px 40px;
  background: radial-gradient(800px 400px at 50% 0%, rgba(59, 130, 246, 0.07), transparent 70%), var(--bg);
}
.form-side:focus { outline: none; }
.form-top { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 40px; }
.logo-mobile { display: none; margin-right: auto; }

.lang-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--card-border); }
.lang-switch button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 7px; cursor: pointer; min-width: 44px; min-height: 32px;
}
.lang-switch button[aria-pressed='true'] { background: #1a2b55; color: var(--text); }
.lang-switch button:hover { color: var(--text); }

.card-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.card {
  width: 100%; max-width: 440px;
  background: linear-gradient(180deg, rgba(20, 34, 70, 0.6), rgba(14, 26, 56, 0.6)), var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 36px 36px 28px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.card-wide { max-width: 600px; }
.card-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; text-wrap: balance; }
.card-title:focus { outline: none; }
.card-sub { color: var(--text-2); margin-top: 8px; margin-bottom: 24px; }
.center { text-align: center; }
.card-foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.note { color: var(--muted); font-size: 13.5px; margin: 18px 0; }

.form-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding-bottom: 4px; }

/* ---------------- Fields ---------------- */
form { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 16px; align-items: start; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .label-row label { font-size: 14px; font-weight: 600; color: var(--text); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.optional { color: var(--muted); font-weight: 400; }

input[type=text], input[type=email], input[type=password], input[type=tel] {
  width: 100%; min-width: 0;
  height: 46px;
  padding: 0 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #5f6f91; }
input:hover { border-color: var(--input-border-hover); }
input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px var(--input-bg) inset; caret-color: var(--text); }
input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px var(--input-bg) inset, var(--focus); }
.has-error input, input[aria-invalid='true'] { border-color: var(--danger); }
.has-error input:focus { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.3); }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 38px; border: 0; background: transparent; border-radius: 7px;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle svg { width: 20px; height: 20px; }

.hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.err { color: var(--danger); font-size: 13px; line-height: 1.45; font-weight: 500; }
.err:empty { display: none; }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.strength span { height: 4px; border-radius: 4px; background: #1c2a4d; transition: background .2s; }
.strength[data-score='1'] span:nth-child(-n+1) { background: var(--danger); }
.strength[data-score='2'] span:nth-child(-n+2) { background: var(--warn); }
.strength[data-score='3'] span:nth-child(-n+3) { background: #4ade80; }
.strength[data-score='4'] span { background: var(--success); }
.strength-text strong { font-weight: 600; color: var(--text-2); }

/* Checkbox */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text-2); line-height: 1.5; user-select: none; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.check-box {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px;
  border: 1.5px solid var(--input-border-hover); background: var(--input-bg);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.check-box svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-box svg { opacity: 1; }
.check input:focus-visible + .check-box { box-shadow: var(--focus); }
.field-check.has-error .check-box { border-color: var(--danger); }
.field-check { gap: 6px; }

/* Links */
.link { color: var(--accent-text); text-decoration: none; font-weight: 600; border-radius: 4px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.small { font-size: 13.5px; }
.link-icon { display: inline-flex; align-items: center; gap: 6px; }
.link-icon svg { width: 16px; height: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: filter .15s, transform .05s, background .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-block { width: 100%; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2f6fe4 0%, #1f9fd8 100%);
  box-shadow: 0 8px 24px -10px rgba(37, 140, 235, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-secondary { color: var(--text); background: #14234a; border-color: var(--card-border); }
.btn-secondary:hover { background: #1a2c5a; }
.btn:disabled { cursor: progress; opacity: .85; }
.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Alerts */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 18px;
  font-size: 14px; line-height: 1.5; border: 1px solid;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-error { color: #fecaca; background: var(--danger-bg); border-color: rgba(248, 113, 113, 0.35); }
.alert-error svg { color: var(--danger); }
.alert-warn { color: #fde68a; background: var(--warn-bg); border-color: rgba(251, 191, 36, 0.35); }
.alert-warn svg { color: var(--warn); }
.alert-locked { color: #fecaca; background: var(--danger-bg); border-color: rgba(248, 113, 113, 0.35); }
.alert-locked svg { color: var(--danger); }

/* State screens */
.state-icon {
  width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 18px;
  display: grid; place-items: center; color: var(--accent-2);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(96, 165, 250, 0.3);
}
.state-icon svg { width: 30px; height: 30px; }
.state-ok { color: var(--success); background: var(--success-bg); border-color: rgba(52, 211, 153, 0.35); }
.steps { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(8, 17, 41, 0.6); border: 1px solid var(--card-border); }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: #1a2b55; color: var(--accent-text); }
.step-t { font-weight: 600; font-size: 14.5px; }
.step-d { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

/* OTP */
.otp { display: flex; justify-content: center; align-items: center; gap: 8px; }
.otp-box {
  width: 50px !important; height: 58px !important; padding: 0 !important;
  text-align: center; font-size: 24px !important; font-weight: 700; font-variant-numeric: tabular-nums;
  caret-color: var(--accent-2);
}
.otp-sep { width: 10px; height: 2px; background: var(--input-border-hover); border-radius: 2px; flex: none; }
.otp.has-error .otp-box { border-color: var(--danger); }
#form-2fa { gap: 14px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .brand-inner { padding: 40px 36px; }
  .vp-list { grid-template-columns: 1fr; }
  .form-side { padding: 24px 28px; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .brand-panel { display: none; }
  .logo-mobile { display: inline-flex; }
  .form-side { padding: 16px 16px 20px; min-height: 100vh; }
  .card-wrap { align-items: flex-start; padding: 20px 0 24px; }
}
@media (max-width: 560px) {
  .card { padding: 26px 20px 22px; border-radius: 16px; }
  .card-title { font-size: 23px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .otp { gap: 6px; }
  .otp-box { width: 44px !important; height: 54px !important; font-size: 22px !important; }
  .otp-sep { width: 6px; }
}
@media (max-width: 360px) {
  .otp-box { width: 38px !important; height: 50px !important; }
  .otp { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 1.5s !important; }
}

/* ---------------- Dashboard / legal placeholder ---------------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--card-border); background: var(--bg-2); }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--text-2); font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }
.page { max-width: 880px; margin: 0 auto; padding: 48px 24px; }
.page h1 { font-size: 28px; letter-spacing: -0.02em; line-height: 1.25; }
.soon { margin-top: 28px; padding: 40px 28px; text-align: center; border: 1px dashed var(--input-border-hover); border-radius: 18px; background: rgba(14, 26, 56, 0.5); }
.soon h2 { font-size: 22px; margin-top: 14px; }
.soon p { color: var(--muted); margin-top: 8px; }
@media (max-width: 560px) {
  .topbar { padding: 12px 16px; }
  .topbar .who { display: none; }
  .topbar #logout { width: 40px; padding: 0; }
  .topbar #logout span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .page { padding: 32px 16px; }
}

/* ---------------- Stepper ---------------- */
.stepper { list-style: none; margin: 0 0 22px; padding: 0; display: flex; align-items: center; gap: 8px; }
.stepper .st { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.stepper .st:last-child { flex: 0 0 auto; }
.stepper .st:not(:last-child)::after { content: ''; flex: 1 1 12px; min-width: 8px; height: 2px; border-radius: 2px; background: #1f2f57; }
.stepper .st.is-done:not(:last-child)::after { background: rgba(52, 211, 153, 0.55); }
.st-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #14234a; border: 1px solid var(--input-border); color: var(--muted); }
.st-dot svg { width: 13px; height: 13px; }
.st-label { white-space: nowrap; flex: none; }
.st.is-done .st-dot { background: var(--success-bg); border-color: rgba(52, 211, 153, 0.5); color: var(--success); }
.st.is-current .st-dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2); }
.st.is-current { color: var(--text); }
.st.is-done { color: var(--text-2); }

/* ---------------- 2FA setup ---------------- */
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.setup-step { padding-bottom: 22px; border-bottom: 1px solid var(--card-border); }
.setup-step:last-child { border-bottom: 0; padding-bottom: 0; }
.setup-head { display: flex; align-items: center; gap: 12px; }
.setup-body { padding-left: 38px; margin-top: 6px; display: grid; gap: 12px; justify-items: start; }
.setup-body > * { max-width: 100%; }
.setup-body form { width: 100%; gap: 12px; }
.app-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.app-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: #13224a; border: 1px solid var(--card-border); color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600;
}
.app-link svg { width: 14px; height: 14px; color: var(--muted); }
.app-link:hover { border-color: var(--input-border-hover); background: #182a58; }
.qr-box {
  width: 200px; height: 200px; border-radius: 14px; overflow: hidden; background: #fff;
  display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 30px -12px rgba(0, 0, 0, 0.7);
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-box.qr-missing { background: var(--input-bg); border: 1px dashed var(--input-border-hover); box-shadow: none; }
.qr-spinner { display: inline-block; border-color: rgba(11, 22, 51, 0.2); border-top-color: #2f6fe4; width: 28px; height: 28px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 2px; cursor: pointer;
  color: var(--accent-text); font-weight: 600; font-size: 14px; border-radius: 6px; text-align: left;
}
.link-btn svg { width: 16px; height: 16px; flex: none; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.manual-key { width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(8, 17, 41, 0.7); border: 1px solid var(--card-border); display: grid; gap: 10px; }
.manual-key dl { margin: 0; display: grid; gap: 10px; }
.manual-key dt { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.manual-key dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.key-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.key-row code { flex: 1 1 220px; min-width: 0; font-size: 15px; letter-spacing: 0.04em; color: var(--text); word-spacing: 0.15em; }
.mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, 'Roboto Mono', monospace; font-variant-numeric: tabular-nums; }
.warn-line { display: flex; align-items: flex-start; gap: 6px; }
.warn-line svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--warn); }
.otp-start { justify-content: flex-start; }
.btn.is-copied { color: var(--success); border-color: rgba(52, 211, 153, 0.45); }
.alert-info { color: #bfdbfe; background: rgba(59, 130, 246, 0.1); border-color: rgba(96, 165, 250, 0.35); }
.alert-info svg { color: var(--accent-text); }

/* ---------------- Backup codes ---------------- */
.codes {
  list-style: none; margin: 0 0 14px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
  background: rgba(8, 17, 41, 0.7); border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  counter-reset: code;
}
.codes li { font-size: 15.5px; letter-spacing: 0.06em; padding: 6px 8px; text-align: center; color: var(--text); border-radius: 6px; background: rgba(20, 35, 74, 0.6); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.btn-row .btn { height: 44px; padding: 0 12px; font-size: 14px; }
.chip-row { margin: -10px 0 18px; }
.chip-row .pill { font-size: 13px; padding: 6px 12px 6px 10px; }
.chip-row .pill svg { width: 15px; height: 15px; }
.mode-row { margin-top: 16px; }

@media (max-width: 560px) {
  .setup-body { padding-left: 0; }
  .qr-box { width: 208px; height: 208px; justify-self: center; }
  .setup-body .otp-start { justify-content: center; }
  .stepper { gap: 6px; margin-bottom: 18px; }
  .stepper .st { gap: 6px; font-size: 12px; }
  .codes li { font-size: 15px; letter-spacing: 0.04em; padding: 6px 4px; }
}
@media (max-width: 360px) {
  .btn-row { grid-template-columns: 1fr; }
}

/* Headings receive focus programmatically on screen change; no ring needed there. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }

/* ---------------- Dev admin (mock only) ---------------- */
.dev-link { margin-left: 12px; color: #fca5a5; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.dev-banner { background: #b91c1c; color: #fff; padding: 10px 16px; font-size: 14px; line-height: 1.45; text-align: center; }
.dev-page { max-width: 980px; }
.dev-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dev-head .card-sub { margin-bottom: 0; }
.dev-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger { color: #fff; background: #b91c1c; border-color: #dc2626; }
.btn-danger:hover { background: #dc2626; }
.m-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.m-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-border); }
.m-info { min-width: 0; flex: 1 1 320px; display: grid; gap: 4px; }
.m-email { font-weight: 600; overflow-wrap: anywhere; }
.m-name { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.m-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pill-warn { color: var(--warn); background: var(--warn-bg); }
.pill-bad { color: var(--danger); background: var(--danger-bg); }
.pill-muted { color: var(--muted); background: #14234a; }
.m-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.m-acts .btn:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 560px) {
  .m-acts { width: 100%; }
  .m-acts .btn { flex: 1 1 auto; padding: 0 10px; }
}
.note code { white-space: nowrap; }

/* ---------------- Admin-issued accounts (v3) ---------------- */
.view-stack { width: 100%; max-width: 440px; display: grid; gap: 16px; }
.view-stack[hidden] { display: none !important; }
.below-card { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; padding: 0 8px; }
#form-password { position: relative; }
.visually-hidden-input { position: absolute !important; left: 0; top: 0; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0 0 0 0); }
.form-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; }
.foot-link { color: var(--muted); text-decoration: none; }
.foot-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.form-foot .dev-link { margin-left: 0; }
.steps .step-n svg { width: 15px; height: 15px; }
.forgot-cta { margin-top: 20px; }
#view-forgot .steps { margin-bottom: 0; }
.dev-panel { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.dev-panel h2, .list-title { font-size: 18px; margin: 0 0 14px; letter-spacing: -0.01em; }
.dev-panel:focus { outline: none; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; margin-bottom: 16px; }
.dev-result { border-color: rgba(52, 211, 153, 0.45); display: grid; gap: 10px; justify-items: start; }
.temp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.temp-pw { font-size: 22px; letter-spacing: 0.06em; padding: 8px 14px; border-radius: 10px; background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text); }
.msg-label { font-size: 14px; font-weight: 600; margin-top: 4px; }
.msg { width: 100%; resize: vertical; min-height: 140px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text); font: 14px/1.55 var(--font); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 560px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .dev-submit { width: 100%; }
  .temp-pw { font-size: 19px; }
}
.grid-3 { align-items: start; }
.below-card { text-wrap: balance; }
.mock-stale { max-width: 600px; margin: 12px auto 0; width: 100%; }
