/*
 * ZWAF Cloud portal: the product's dark theme (docs/branding/BRANDING.md §3 to §6). Fonts self-hosted from
 * @fontsource 5.3.0 (SIL OFL 1.1, the licence texts beside them in /fonts).
 */
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("/fonts/sora-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("/fonts/sora-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("/fonts/sora-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("/fonts/sora-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Commissioner"; font-weight: 400; font-display: swap; src: url("/fonts/commissioner-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-weight: 400; font-display: swap; src: url("/fonts/commissioner-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Commissioner"; font-weight: 500; font-display: swap; src: url("/fonts/commissioner-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-weight: 500; font-display: swap; src: url("/fonts/commissioner-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Commissioner"; font-weight: 600; font-display: swap; src: url("/fonts/commissioner-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-weight: 600; font-display: swap; src: url("/fonts/commissioner-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Commissioner"; font-weight: 700; font-display: swap; src: url("/fonts/commissioner-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-weight: 700; font-display: swap; src: url("/fonts/commissioner-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --navy-deep: #0B1825;
  --surface-1: #0F2030;
  --surface-2: #132431;
  --navy-light: #1A3245;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.74);
  --muted: #AAB9C8;
  --muted-2: #687B89;
  --teal: #1BEACD;
  --teal-dark: #17C8AF;
  --gold: #E5D936;
  --gold-hover: #F1E85A;
  --ok: #1BEACD;
  --warn: #E5D936;
  --bad: #F87171;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--navy-deep); color: var(--text-dim);
  font: 400 14px/1.45 "Commissioner", system-ui, sans-serif;
}
h1, h2, h3 { font-family: "Sora", system-ui, sans-serif; font-weight: 600; color: var(--text); margin: 0 0 12px; }
h1 { font-size: 22px; letter-spacing: -0.02em; }
h2 { font-size: 16px; letter-spacing: -0.01em; }
h3 { font-size: 14px; }
p { margin: 0 0 12px; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(27, 234, 205, 0.35); border-radius: 6px; }
code, .mono { font-family: var(--mono); font-size: 12px; }
code { color: var(--teal); background: rgba(27, 234, 205, 0.10); border-radius: 4px; padding: 1px 5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Layout: side bar, top bar, content */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--surface-1); border-right: 1px solid var(--line); padding: 20px 0; display: flex; flex-direction: column; }
.side .brand { padding: 0 20px 20px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.side .brand img { height: 28px; display: block; }
.side .brand span { display: block; margin-top: 6px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.nav a { display: block; padding: 8px 20px; color: var(--text-dim); font-weight: 500; border-left: 2px solid transparent; transition: background-color .15s, color .15s; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--text); border-left-color: var(--teal); }
.nav .group { padding: 16px 20px 6px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.side .foot { margin-top: auto; padding: 16px 20px 0; border-top: 1px solid var(--line); }
.side .foot img { height: 18px; opacity: 0.9; }
.main { display: flex; flex-direction: column; min-width: 0; }
.top { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--surface-1); }
.top form { margin: 0; }
.content { padding: 28px; max-width: 1240px; width: 100%; }
.lang a { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; }
.lang a.on { color: var(--text); }

/* Eyebrow, panels, grids */
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--teal); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--teal); }
.panel { background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.figure { font-family: "Sora", system-ui, sans-serif; font-weight: 700; font-size: 32px; letter-spacing: -0.025em; color: var(--text); }
.label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; color: var(--text); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-align: left; padding: 10px 12px; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

/* Badges */
.badge { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; border: 1px solid; white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: rgba(27, 234, 205, 0.35); }
.badge.warn { color: var(--warn); border-color: rgba(229, 217, 54, 0.35); }
.badge.bad { color: var(--bad); border-color: rgba(248, 113, 113, 0.35); }
.badge.neutral { color: var(--muted); border-color: rgba(170, 185, 200, 0.35); }

/* Buttons */
.btn { display: inline-block; border-radius: 999px; font: 600 14px/1.2 "Commissioner", system-ui, sans-serif; padding: 10px 22px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; transition: border-color .15s, background-color .15s; text-decoration: none; }
.btn:hover { border-color: var(--teal); text-decoration: none; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #132431; font-weight: 700; }
.btn.primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: rgba(248, 113, 113, 0.12); }
.btn.small { padding: 6px 16px; font-size: 12px; }
.btn:disabled { background: var(--surface-2); border-color: var(--line); color: var(--muted-2); cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--teal); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Forms */
form.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
form.fields .wide, form.fields .actions { grid-column: 1 / -1; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong);
  color: var(--text); font: 400 14px/1.45 "Commissioner", system-ui, sans-serif; padding: 9px 12px; transition: border-color .15s;
}
select option { background: var(--surface-1); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(27, 234, 205, 0.12); }
textarea { min-height: 120px; resize: vertical; }
input[type=file] { color: var(--text-dim); font: inherit; }
input[type=file]::file-selector-button { border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 600 12px "Commissioner", sans-serif; padding: 6px 16px; margin-right: 12px; cursor: pointer; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--text-dim); }
.error { color: var(--bad); font-size: 12px; margin-top: 4px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }

/* Alerts */
.alert { background: var(--surface-1); border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; color: var(--text); }
.alert.bad { border-left-color: var(--bad); }
.alert.warn { border-left-color: var(--warn); }

/* Case thread */
.msg { border-top: 1px solid var(--line); padding: 14px 0; }
.msg:first-child { border-top: 0; }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.msg .body { white-space: pre-wrap; color: var(--text-dim); }
.msg.internal { border-left: 2px solid var(--warn); padding-left: 12px; }
.msg.event .body { color: var(--muted); font-style: italic; }

/* Sign-in pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .panel { width: 100%; max-width: 420px; padding: 32px; }
.auth .logo { height: 34px; margin-bottom: 24px; }
.qr { background: #FFFFFF; border-radius: 8px; padding: 8px; width: 216px; margin: 12px 0; }
.qr svg { display: block; width: 200px; height: 200px; }
.secret { font-family: var(--mono); letter-spacing: 0.08em; word-break: break-all; color: var(--text); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { padding-bottom: 12px; }
  .content { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Small utilities (the content security policy allows no inline styles) */
.spaced { margin: 20px 0; }
.mt { margin-top: 16px; }
select.auto { width: auto; }
.mono-title { font-family: var(--mono); font-size: 22px; letter-spacing: 0; }
h1 .mono { font-size: 18px; color: var(--muted); margin-right: 6px; }
.prewrap { white-space: pre-wrap; }
.tz { margin-top: 32px; color: var(--muted-2); font-size: 12px; }
td.mono:not(.small) { white-space: nowrap; }
