/* SMART shared styles. Colours are tokens so a licensee's branding can replace them in one place. */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
:root {
  --primary: #4A74A8; --primary-ink: #FFFFFF; --primary-dark: #3A6293;
  --accent: #F7A831;
  --ink: #1F2733; --ink-2: #3A4556; --muted: #566172; --faint: #6A7483;
  --ground: #F4F5F7; --surface: #FFFFFF; --panel: #1C2430; --panel-ink: #FFFFFF; --panel-muted: #C9D1DC;
  --line: #E1E5EB; --line-2: #C9D0DA; --tint: #EEF1F5;
  --ok: #1F7A4D; --warn: #B45309; --bad: #B42318;
  --radius: 10px; --radius-lg: 14px;
  --font: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
/* A class rule that sets its own `display` (.btn, .note, .auth-form, ...) otherwise beats the
   browser's built-in [hidden] rule at equal specificity — always keep hidden elements hidden. */
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--ground); color: var(--ink); font-size: 15px; line-height: 1.5; }
a { color: var(--primary-dark); text-decoration: none; font-weight: 600; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 30px; font-weight: 800; line-height: 1.15; } h2 { font-size: 18px; font-weight: 800; }
p { margin: 0; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 14px; font-weight: 700; }
.input, .field input, .field select { height: 50px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface);
  font: inherit; font-size: 15px; color: var(--ink); width: 100%; }
.input:focus, .field input:focus, .field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.btn { height: 46px; padding: 0 20px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--tint); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.big { height: 52px; font-size: 16px; }
.btn.small { height: 36px; padding: 0 12px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.msg { font-size: 14px; min-height: 20px; } .msg.err { color: var(--bad); } .msg.ok { color: var(--ok); }
.note { display: flex; gap: 12px; padding: 14px 16px; background: #EAEEF3; border-radius: var(--radius); color: var(--ink-2); font-size: 14px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; background: var(--tint); color: var(--ink-2); }
.pill.ok { background: #E3F2EA; color: var(--ok); } .pill.warn { background: #FDF0DC; color: var(--warn); } .pill.bad { background: #FBE7E5; color: var(--bad); }

/* Sign-in layout: brand panel + form */
.auth { min-height: 100vh; display: flex; }
.auth-panel { width: 42%; max-width: 600px; padding: 56px 64px; background: var(--panel); color: var(--panel-ink); display: flex; flex-direction: column; gap: 56px; }
.auth-panel img { height: 200px; width: auto; align-self: center; }
.auth-panel h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.025em; margin-top: 40px; }
.auth-panel p { font-size: 17px; line-height: 1.55; color: var(--panel-muted); max-width: 440px; margin-top: 18px; }
.auth-stages { margin: auto 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.auth-stages li { display: flex; flex-direction: column; gap: 10px; font-size: 13px; font-weight: 700; }
.auth-stages li::before { content: ""; height: 4px; border-radius: 2px; background: var(--primary); }
.auth-stages li:last-child::before { background: var(--accent); }
.auth-main { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.auth-form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 22px; }
.auth-form .intro { display: flex; flex-direction: column; gap: 8px; }
.auth-mobile-logo { display: none; height: 110px; width: auto; align-self: center; }
.digits { display: flex; gap: 10px; }
.digits input { width: 100%; max-width: 58px; height: 66px; text-align: center; font: inherit; font-size: 26px; font-weight: 700; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.digits input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.qr { width: 196px; height: 196px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.qr svg { width: 100%; height: 100%; display: block; }
.key { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 15px; letter-spacing: .04em; background: var(--tint); padding: 10px 12px; border-radius: 8px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 16px; background: var(--tint); border-radius: var(--radius);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 16px; }
@media (max-width: 860px) {
  .auth-panel { display: none; }
  .auth-mobile-logo { display: block; }
}

/* App shell: header + page */
.topbar { height: 72px; padding: 0 48px; display: flex; align-items: center; gap: 40px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .logo { display: flex; align-items: center; gap: 10px; }
.topbar .logo img { height: 52px; width: auto; display: block; }
.topbar .logo .brand-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.topbar nav { display: flex; gap: 4px; flex-grow: 1; }
.topbar nav a { padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.topbar nav a:hover { background: var(--tint); text-decoration: none; }
.topbar nav a[aria-current="page"] { background: var(--tint); color: var(--ink); font-weight: 700; }
.topbar .who { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
img.avatar { object-fit: cover; flex-shrink: 0; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; }
img.avatar-lg { object-fit: cover; flex-shrink: 0; }
/* #102 — the alert button next to every avatar */
.tb-alert-wrap { position: relative; }
.tb-alert { position: relative; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2); }
.tb-alert:hover { background: var(--tint); }
.tb-alert svg { flex-shrink: 0; }
.tb-alert .badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; line-height: 1; }
.tb-alert-menu { position: absolute; top: 44px; right: 0; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(31,39,51,.18); padding: 8px; z-index: 50; }
.tb-alert-menu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.tb-alert-menu a:hover { background: var(--tint); text-decoration: none; }
.tb-alert-menu .n { background: var(--tint); color: var(--ink-2); font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.tb-alert-menu .empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }
.page { max-width: 1344px; margin: 0 auto; padding: 40px 48px 64px; display: flex; flex-direction: column; gap: 28px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
table.list th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #F8F9FB; padding: 12px 20px; border-bottom: 1px solid var(--line); }
table.list td { padding: 16px 20px; border-bottom: 1px solid #EDF0F3; vertical-align: middle; font-size: 14px; }
table.list tr:last-child td { border-bottom: 0; }
.footer { font-size: 13px; color: var(--faint); }
dialog { border: 0; border-radius: var(--radius-lg); padding: 28px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(31,39,51,.25); color: var(--ink); }
dialog::backdrop { background: rgba(28,36,48,.55); }
@media (max-width: 760px) {
  .topbar { padding: 0 16px; gap: 16px; } .topbar .who span.name { display: none; }
  .page { padding: 24px 16px 48px; }
  table.list th:nth-child(n+4), table.list td:nth-child(n+4) { display: none; }
}
