:root {
  color-scheme: dark;
  --bg: #050606;
  --panel: rgba(14, 16, 16, 0.94);
  --panel-2: #151818;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f5f7f7;
  --muted: #aeb6b6;
  --accent: #e3262e;
  --accent-soft: rgba(227, 38, 46, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(227, 38, 46, 0.12), transparent 34rem),
    linear-gradient(160deg, #111515 0%, var(--bg) 62%);
}
button { font: inherit; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(860px, 100%);
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.48);
}
.brand-lockup {
  display: flex;
  max-width: 100%;
  align-items: center;
  margin-bottom: 28px;
}
.brand-lockup-image {
  display: block;
  width: min(360px, 100%);
  height: auto;
  filter: brightness(0) invert(1);
}
.brand-lockup-compact { margin-bottom: 20px; }
.brand-lockup-compact .brand-lockup-image { width: min(250px, 100%); }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-weight: 800; letter-spacing: .12em; font-size: 12px; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.lede { max-width: 680px; margin: 18px 0 32px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.loading-row, .failure { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-2); }
.authorization { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 34px; align-items: center; }
.qr-shell { padding: 16px; border-radius: 24px; background: #fff; line-height: 0; }
.qr-shell img { width: 100%; height: auto; }
.authorization-copy { min-width: 0; }
.field-label { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px; }
.phrase { display: block; color: var(--accent); font-size: clamp(22px, 3vw, 31px); text-transform: capitalize; }
.code-label { margin-top: 28px; }
.code-row { display: flex; align-items: center; gap: 10px; }
.code-row code { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.status { margin: 24px 0 0; color: var(--muted); }
.quiet-button, .primary-button {
  border: 1px solid var(--line); border-radius: 999px; color: var(--text); padding: 10px 17px; cursor: pointer;
}
.quiet-button { background: rgba(255,255,255,.06); }
.primary-button { background: var(--accent); border-color: transparent; }
.quiet-button:hover, .primary-button:hover { filter: brightness(1.12); }
.quiet-button:focus-visible, .primary-button:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 3px; }
.dashboard-shell { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 80px; }
.dashboard-header { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.dashboard-identity { min-width: 0; }
.dashboard-header h1 { font-size: clamp(28px, 4vw, 44px); }
.scope-banner { margin: 28px 0 18px; padding: 11px 15px; border: 1px solid rgba(227,38,46,.35); border-radius: 12px; background: var(--accent-soft); color: #ffb6b9; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dashboard-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.dashboard-card strong { font-size: 24px; }
.span-two { grid-column: span 2; }
pre { max-height: 60vh; overflow: auto; margin: 12px 0 0; color: #ced7d7; white-space: pre-wrap; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

@media (max-width: 720px) {
  .authorization { grid-template-columns: 1fr; }
  .qr-shell { width: min(300px, 100%); margin: 0 auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .dashboard-header { align-items: flex-start; }
}
