/* Tokens and controls shared by the console and the login page. */
:root {
  --bg: #f4f5f8; --surface: #ffffff; --surface-2: #f0f2f6; --surface-3: #e7eaf0; --border: #e1e4ea; --border-strong: #cdd2da;
  --text: #14171c; --muted: #596271; --faint: #8a92a0;
  --accent: #1f5fbf; --accent-bg: #e8f0fc; --accent-text: #ffffff;
  --high: #c42b1c; --high-bg: #fdecea; --medium: #965a00; --medium-bg: #fff2d4; --low: #2f5f9e; --low-bg: #e6eef9;
  --unknown: #596271; --unknown-bg: #eceef2;
  --ok: #0f7b3f; --ok-bg: #e1f5e8; --warn: #965a00; --warn-bg: #fff2d4; --err: #b3261e; --err-bg: #fdecea;
  --snooze: #6b4fbb; --snooze-bg: #efeafb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .14);
  --radius: 12px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216; --surface: #181b20; --surface-2: #1f2329; --surface-3: #272c33; --border: #2a2f36; --border-strong: #3a4049;
    --text: #e8eaed; --muted: #a3aab5; --faint: #747c88;
    --accent: #7aa7f0; --accent-bg: #1b2a42; --accent-text: #0d1726;
    --high: #ff8a7f; --high-bg: #3a1d1b; --medium: #f0b75a; --medium-bg: #36290f; --low: #8fb4ec; --low-bg: #1b2a40;
    --unknown: #a3aab5; --unknown-bg: #262a31;
    --ok: #6fd39a; --ok-bg: #16301f; --warn: #f0b75a; --warn-bg: #36290f; --err: #ff8a7f; --err-bg: #3a1d1b;
    --snooze: #b9a3f5; --snooze-bg: #2a2342;
    --shadow: none; --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* icons */
.i { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.i-sm { width: 15px; height: 15px; vertical-align: -3px; }
.i-lg { width: 22px; height: 22px; }

/* brand */
.logo { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle, #fff 0 28%, var(--high) 30%); flex: none; box-shadow: 0 0 0 4px var(--high-bg); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 13px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 9px; cursor: pointer; font-weight: 550; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.07); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid transparent; background: transparent; border-radius: 9px; cursor: pointer; color: var(--muted); transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.boxed { border-color: var(--border-strong); background: var(--surface); }
.icon-btn[aria-pressed="true"] { background: var(--accent-bg); color: var(--accent); border-color: transparent; }
@media (pointer: coarse) { .btn { min-height: 44px; } .icon-btn { width: 44px; height: 44px; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* language: two drawn flags, the active one in full colour */
.lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.flag { display: grid; place-items: center; width: 38px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.flag svg { width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); filter: saturate(.45); opacity: .55; transition: filter .15s, opacity .15s; }
.flag:hover svg { opacity: .85; }
.flag[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); }
.flag[aria-pressed="true"] svg { filter: none; opacity: 1; }
@media (pointer: coarse) { .flag { width: 44px; height: 38px; } }

/* inputs */
.field { position: relative; display: flex; align-items: center; }
.field > .i { position: absolute; left: 11px; color: var(--faint); pointer-events: none; }
input[type=text], input[type=password], input[type=search], select { min-height: 36px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 9px; padding: 6px 10px; }
.field input:not([type=hidden]) { padding-left: 36px; }
input::placeholder { color: var(--faint); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); white-space: nowrap; }
.badge.demo { background: var(--snooze-bg); color: var(--snooze); }

/* toasts */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(520px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-lg); animation: rise .18s ease-out; }
.toast.err { background: var(--err); color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
