/* Shared auth theme (login / account / reset) — "Broadcast" design system.
   Separation by light, one variable typeface (Archivo) with Martian Mono for
   equipment, signal-amber primary. The old cabaret var NAMES are kept but remapped
   to Broadcast values so the pages' inline styles resolve without edits. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&family=Martian+Mono:wght@400;600&display=swap');

:root {
  /* Broadcast lighting ramp + signal, mapped onto the legacy names */
  --bg: #0d1626;
  --bg-2: #070d18;
  --panel: #1B2B45;      /* slate            */
  --panel-2: #24395B;    /* slate lit        */
  --line: rgba(143,163,190,.18);
  --text: #F2F6FC;
  --muted: #8FA3BE;
  --faint: #4A5D7A;
  --pink: #F59E0B;       /* primary → signal amber */
  --pink-2: #fbbf24;
  --gold: #F59E0B;
  --mint: #10B981;
  --purple: #7C3AED;
  --cyan: #7DD3FC;       /* spotlight        */
  --orange: #F97316;
  --green: #10B981;
  --outline: rgba(143,163,190,.18);
  --signal: #F59E0B;
  --cold: #7DD3FC;
  --lip: inset 0 2px 0 rgba(143,163,190,.16);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variation-settings: 'wdth' 100;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 50% -8%, #16233A 0%, rgba(22,35,58,0) 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
.accent { color: var(--signal); }

/* ── The wordmark. brand.js swaps the text per brand (data-brand-wordmark). ── */
.qc-wordmark {
  font-variation-settings: 'wdth' 125;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--text);
  user-select: none;
}

.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card {
  background: var(--panel); border: none; border-radius: 8px;
  box-shadow: var(--lip), 0 30px 70px rgba(0,0,0,.55);
  padding: 36px 40px; width: 380px; max-width: 100%; text-align: center;
}
.auth-card h1 { font-size: 34px; margin: 0; line-height: 1.05; }
.auth-card .sub {
  color: var(--muted); margin: 6px 0 24px;
  font: 600 12px/1 "Martian Mono", ui-monospace, monospace;
  letter-spacing: .14em; text-transform: uppercase;
}

form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
label { display: flex; flex-direction: column; gap: 6px; font: 600 11px/1 "Martian Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input[type="email"], input[type="password"], input[type="text"] {
  background: #16233A; border: none; color: var(--text);
  border-radius: 4px; padding: 12px; font: 400 15px "Archivo", system-ui, sans-serif;
  box-shadow: inset 0 2px 0 rgba(143,163,190,.12);
}
input::placeholder { color: var(--faint); }
input:focus { outline: 2px solid var(--cold); outline-offset: 2px; }

.btn {
  display: inline-block; text-align: center; text-decoration: none;
  border: none; background: var(--panel-2); color: var(--text);
  padding: 12px 16px; border-radius: 4px; cursor: pointer;
  font: 600 14px "Archivo", system-ui, sans-serif; box-shadow: var(--lip);
  transition: filter .12s;
}
.btn:hover { filter: brightness(1.09); }
.btn.primary { background: var(--signal); border: none; color: #1a1206; font-weight: 800; box-shadow: none; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn.full { width: 100%; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--cold); outline-offset: 2px; }

.error { color: #fca5a5; font-size: 13px; text-align: center; }
.msg { font-size: 13px; text-align: center; padding: 9px; border-radius: 4px; }
.msg.success { color: #6ee7b7; background: var(--panel-2); box-shadow: inset 0 2px 0 var(--green); }
.msg.error { color: #fca5a5; background: var(--panel-2); box-shadow: inset 0 2px 0 #EF4444; }

.divider {
  display: flex; align-items: center; gap: 12px; margin: 18px 0 14px;
  color: var(--muted); font: 600 11px/1 "Martian Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: .1em;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.google-btn-wrap { display: flex; justify-content: center; min-height: 44px; }

.forgot {
  display: block; margin-top: 16px;
  color: var(--muted); font-size: 13px; text-decoration: none;
}
.forgot:hover { color: var(--cold); }

.reset-section {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--line); text-align: left;
}
.reset-text { font-size: 13px; color: var(--muted); margin: 0 0 12px; text-align: center; }

/* Account page */
.auth-card.account { text-align: center; }
.profile {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--panel-2); border-radius: 4px; box-shadow: var(--lip);
  margin-bottom: 16px; text-align: left;
}
.avatar {
  width: 56px; height: 56px; border-radius: 4px; object-fit: cover;
  box-shadow: var(--lip);
}
.avatar.placeholder {
  display: grid; place-items: center; font-size: 24px;
  background: #16233A; color: var(--muted);
  width: 56px; height: 56px; border-radius: 4px;
  box-shadow: var(--lip);
}
.profile-info { flex: 1; }
.pname { font-weight: 700; font-size: 16px; }
.pemail { font-size: 13px; color: var(--muted); }
.admin-badge {
  display: inline-block; margin-top: 4px;
  font: 600 11px/1 "Martian Mono", ui-monospace, monospace; padding: 4px 9px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--signal); color: var(--signal); text-transform: uppercase; letter-spacing: .06em;
}
.back-link {
  display: block; margin-top: 12px;
  color: var(--muted); font-size: 13px; text-decoration: none;
}
.back-link:hover { color: var(--cold); }

/* Shared "back to account" pill for use inside the apps (self-contained). */
.qc-account-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel); box-shadow: var(--lip); color: var(--text);
  border-radius: 4px; padding: 8px 14px; font: 600 13px/1 "Archivo", system-ui, sans-serif;
  text-decoration: none;
}
.qc-account-link:hover { filter: brightness(1.1); color: #fff; }
