:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070a10;
  color: #f4f7fb;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(114, 90, 255, .20), transparent 34rem),
    radial-gradient(circle at 90% 15%, rgba(0, 204, 255, .12), transparent 30rem),
    #070a10;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; }
.brand { display: flex; align-items: center; gap: 14px; }
.mark {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(145deg, #7a64ff, #2fd6ff); color: #05070b; font-weight: 900;
  box-shadow: 0 0 40px rgba(99, 96, 255, .28);
}
.brand h1, .brand p, h2, h3 { margin: 0; }
.eyebrow, .kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: #8d99aa; }
.state, .pill { padding: 8px 11px; border: 1px solid #242c39; border-radius: 999px; color: #9aa8ba; font-size: .82rem; white-space: nowrap; }
.state { margin-left: auto; }
.hero { padding: 72px 0 38px; max-width: 760px; }
.hero h2 { font-size: clamp(2.2rem, 7vw, 4.8rem); line-height: .98; letter-spacing: -.045em; margin: 12px 0 22px; }
.hero > p:last-child { color: #aab4c3; line-height: 1.7; max-width: 680px; }
.card {
  border: 1px solid #202836; background: rgba(13, 18, 27, .84); backdrop-filter: blur(18px);
  border-radius: 22px; padding: 24px; margin-top: 16px; box-shadow: 0 18px 60px rgba(0,0,0,.22);
}
.card h3 { font-size: 1.35rem; }
.card > p, details p, .module-card > p { color: #9eabba; line-height: 1.55; }
.muted-card { background: rgba(12, 16, 24, .55); }
details summary { cursor: pointer; font-weight: 700; }
.backup-login { margin-top: 20px; padding-top: 18px; border-top: 1px solid #202936; }
.activation-card details + details { margin-top: 18px; padding-top: 18px; border-top: 1px solid #202936; }
label { display: block; margin: 16px 0 7px; color: #b9c3d0; font-size: .88rem; }
input, select {
  width: 100%; border: 1px solid #2a3443; border-radius: 13px; background: #090d14; color: #f4f7fb;
  padding: 13px 14px; outline: none;
}
input:focus, select:focus { border-color: #6f7cff; box-shadow: 0 0 0 3px rgba(111,124,255,.15); }
.primary, .secondary, .ghost, .danger {
  border: 0; border-radius: 13px; padding: 12px 16px; font-weight: 750; margin-top: 14px;
}
.primary { background: #f5f7fb; color: #080b11; }
.secondary { background: #7868ff; color: white; }
.ghost { background: #171e29; color: #d9e0ea; margin: 0; }
.danger { background: #29141a; color: #ffb6c2; border: 1px solid #4b202c; margin: 0; padding: 8px 11px; }
button:disabled { opacity: .55; cursor: progress; }
.message { min-height: 1.3em; margin-bottom: 0; font-size: .9rem; color: #b7c2d0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.meta { color: #8f9daf; margin-bottom: 0; }
.two-col, .security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.security-grid { align-items: start; }
.module-card { margin-top: 16px; min-width: 0; }
.module-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.account-head { margin-bottom: 6px; }
.step-up {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px;
  padding: 16px; border: 1px solid #433d78; border-radius: 16px; background: rgba(120,104,255,.10);
}
.step-up span { display: block; color: #aab5c5; margin-top: 4px; font-size: .9rem; }
.step-up .primary { margin: 0; flex: 0 0 auto; }
.device-list { display: grid; gap: 8px; margin-top: 18px; }
.device-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 13px; border: 1px solid #222c39; border-radius: 14px; background: #0a0f17;
}
.device-row strong, .device-row span { display: block; }
.device-row span { color: #8491a2; margin-top: 3px; font-size: .78rem; }
.enrollment { margin-top: 18px; }
.qr-wrap { width: min(260px, 100%); padding: 16px; border-radius: 18px; background: #fff; }
.qr-wrap img { display: block; width: 100%; height: auto; }
.recovery-output { margin-top: 18px; padding: 18px; border: 1px dashed #445066; border-radius: 16px; background: #090d14; }
.print-heading span { display: block; margin-top: 4px; color: #95a1b1; font-size: .85rem; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 18px 0; }
.recovery-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; padding: 10px 12px; border-radius: 10px; background: #111823; }
.notice { margin: 20px 0 0; padding: 13px 15px; border-left: 3px solid #7868ff; background: rgba(120,104,255,.08); color: #aab5c5; line-height: 1.5; }
.invite-grid { display: grid; grid-template-columns: 1.1fr 1.4fr .7fr; gap: 14px; }
.token-output { margin-top: 18px; padding: 16px; border: 1px solid #4a407e; border-radius: 15px; background: rgba(120,104,255,.08); }
.token-output strong, .token-output code, .token-output span { display: block; }
.token-output code { margin: 12px 0; padding: 12px; border-radius: 10px; background: #080c12; color: #f5f7fb; overflow-wrap: anywhere; user-select: all; }
.token-output span { color: #99a5b5; font-size: .84rem; }
.user-list { display: grid; gap: 14px; margin-top: 26px; }
.user-card { padding: 18px; border: 1px solid #222c39; border-radius: 17px; background: #0a0f17; }
.user-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.user-card-head strong, .user-card-head span { display: block; }
.user-card-head span { color: #8896a8; margin-top: 4px; font-size: .84rem; }
.user-actions, .grant-editor { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-top: 14px; }
.user-actions .secondary, .grant-editor .secondary { margin: 0; }
.grant-editor { grid-template-columns: 1.4fr .8fr auto; }
.grant-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.grant-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #2d3848; border-radius: 999px; padding: 7px 9px 7px 11px; color: #b7c1cf; font-size: .8rem; }
.grant-chip button { border: 0; background: transparent; color: #ff9aae; padding: 0 3px; cursor: pointer; }
.user-state-actions { display: flex; gap: 8px; margin-top: 14px; }
.user-state-actions button { margin: 0; }
.hidden { display: none !important; }
@media (max-width: 760px) {
  .shell { width: min(100% - 22px, 1080px); padding-top: 18px; }
  .hero { padding-top: 54px; }
  .two-col, .security-grid, .recovery-codes, .invite-grid { grid-template-columns: 1fr; }
  .state { font-size: .72rem; }
  .card { padding: 19px; border-radius: 18px; }
  .row, .step-up, .user-card-head { align-items: stretch; flex-direction: column; }
  .row .ghost, .step-up .primary { align-self: flex-start; }
  .user-actions, .grant-editor { grid-template-columns: 1fr; }
  .user-actions .secondary, .grant-editor .secondary { width: 100%; }
}
@media print {
  body { background: #fff; color: #000; }
  body * { visibility: hidden !important; }
  .recovery-output, .recovery-output * { visibility: visible !important; }
  .recovery-output { position: absolute; inset: 0; border: 0; background: #fff; color: #000; padding: 28px; }
  .recovery-code { background: #fff; border: 1px solid #bbb; color: #000; }
  .print-heading span { color: #333; }
  .no-print { display: none !important; }
}
