/* AR Support Desk
   Brand palette from arwebsitesolutions.com, framed layout, pill navigation.
   Fonts are self hosted (no third party requests). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local("Inter"), local("Inter Variable"), url("/fonts/inter-latin-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("Instrument Serif"), url("/fonts/instrument-serif-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: local("Instrument Serif Italic"), url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}

/* Brand colours from arwebsitesolutions.com: accent #3557f0, accent hi #5f7cff,
   background #06070c, surfaces #101322 / #171b2c, body text #9ba1b8. */
:root {
  color-scheme: light;
  --page: #e9ecf4;
  --frame: #f5f6fa;
  --hero: #e1e5f0;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef0f6;
  --border: #e2e5ee;
  --border-strong: #cdd2df;
  --text: #06070c;
  --text-2: #3b4056;
  --text-3: #5b6179;
  --accent: #3557f0;
  --accent-btn: #3557f0;
  --accent-btn-hover: #2743cf;
  --accent-text: #2a47d6;
  --accent-soft: rgba(53, 87, 240, 0.1);
  --on-accent: #ffffff;
  --ink: #06070c;
  --ink-hover: #171b2c;
  --on-ink: #ffffff;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --red-text: #b91c1c;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --green-text: #15803d;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --amber-text: #92400e;
  --note-bg: #fffbeb;
  --note-border: #f5d68a;
  --shadow-sm: 0 1px 2px rgba(6, 7, 12, 0.06);
  --shadow-md: 0 6px 20px rgba(6, 7, 12, 0.08), 0 1px 2px rgba(6, 7, 12, 0.05);
  --shadow-lg: 0 20px 50px rgba(6, 7, 12, 0.16);
  --focus-ring: 0 0 0 3px rgba(53, 87, 240, 0.34);

  --chart-surface: #ffffff;
  --series-1: #3557f0;
  --series-2: #171b2c;
  --grid: #eceef4;
  --axis: #cdd2df;
  --muted-ink: #5b6179;
  --tick-off: #d5d9e4;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #04050a;
    --frame: #06070c;
    --hero: #0a0c14;
    --surface: #101322;
    --surface-2: #131729;
    --surface-3: #171b2c;
    --border: rgba(255, 255, 255, 0.085);
    --border-strong: rgba(255, 255, 255, 0.17);
    --text: #ffffff;
    --text-2: #9ba1b8;
    --text-3: #7d83a0;
    --accent: #5f7cff;
    --accent-btn: #3557f0;
    --accent-btn-hover: #4766f5;
    --accent-text: #7d95ff;
    --accent-soft: rgba(53, 87, 240, 0.13);
    --on-accent: #ffffff;
    --ink: #ffffff;
    --ink-hover: #e6e9f5;
    --on-ink: #06070c;
    --red: #f87171;
    --red-soft: rgba(248, 113, 113, 0.12);
    --red-text: #fca5a5;
    --green: #4ade80;
    --green-soft: rgba(74, 222, 128, 0.1);
    --green-text: #86efac;
    --amber: #fbbf24;
    --amber-soft: rgba(251, 191, 36, 0.1);
    --amber-text: #fcd34d;
    --note-bg: rgba(251, 191, 36, 0.07);
    --note-border: rgba(251, 191, 36, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.65);
    --focus-ring: 0 0 0 3px rgba(95, 124, 255, 0.45);
    --chart-surface: #101322;
    --series-1: #5f7cff;
    --series-2: #e6e9f5;
    --grid: rgba(255, 255, 255, 0.07);
    --axis: rgba(255, 255, 255, 0.17);
    --muted-ink: #7d83a0;
    --tick-off: #262b42;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #04050a;
  --frame: #06070c;
  --hero: #0a0c14;
  --surface: #101322;
  --surface-2: #131729;
  --surface-3: #171b2c;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.17);
  --text: #ffffff;
  --text-2: #9ba1b8;
  --text-3: #7d83a0;
  --accent: #5f7cff;
  --accent-btn: #3557f0;
  --accent-btn-hover: #4766f5;
  --accent-text: #7d95ff;
  --accent-soft: rgba(53, 87, 240, 0.13);
  --on-accent: #ffffff;
  --ink: #ffffff;
  --ink-hover: #e6e9f5;
  --on-ink: #06070c;
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.12);
  --red-text: #fca5a5;
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.1);
  --green-text: #86efac;
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.1);
  --amber-text: #fcd34d;
  --note-bg: rgba(251, 191, 36, 0.07);
  --note-border: rgba(251, 191, 36, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.65);
  --focus-ring: 0 0 0 3px rgba(95, 124, 255, 0.45);
  --chart-surface: #101322;
  --series-1: #5f7cff;
  --series-2: #e6e9f5;
  --grid: rgba(255, 255, 255, 0.07);
  --axis: rgba(255, 255, 255, 0.17);
  --muted-ink: #7d83a0;
  --tick-off: #262b42;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 0.7em; }
code, kbd { font-family: var(--mono); font-size: 0.88em; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 10px; }
::selection { background: var(--accent-soft); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: 999px; }
.skip-link:focus { top: 16px; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.center-note { margin-top: 16px; text-align: center; font-size: 13px; color: var(--text-3); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 14px; height: 14px; }
.icon.lg { width: 22px; height: 22px; }
p > .icon, .row > .icon { display: inline-block; vertical-align: -3px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

/* ---------- logo ---------- */
.logo { width: 28px; height: 28px; flex: none; }
.logo { border-radius: 8px; }
@media (min-width: 640px) { .logo { width: 32px; height: 32px; } }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent-btn); border-color: var(--accent-btn); color: var(--on-accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-btn-hover); border-color: var(--accent-btn-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.dark:hover:not(:disabled) { background: var(--ink-hover); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover:not(:disabled) { filter: brightness(0.92); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--red-text); }
.btn.danger-ghost:hover { background: var(--red-soft); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { min-height: 46px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon-only { width: 38px; padding: 0; }
.btn.icon-only.sm { width: 32px; }
.btn.has-orb { padding-right: 6px; gap: 12px; }
.btn.has-orb.sm { padding-right: 4px; }
.btn-orb { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.2); }
.btn.dark .btn-orb { background: rgba(127, 127, 127, 0.22); }
.btn.sm .btn-orb { width: 22px; height: 22px; }
.btn-orb .icon { width: 14px; height: 14px; }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field + .field, .field-row + .field, .field + .field-row, .field-row + .field-row { margin-top: 16px; }
.field-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label, .label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--text-3); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.input-wrap .btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.input.code { font-family: var(--mono); font-size: 22px; letter-spacing: 0.4em; text-align: center; }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--red-soft); color: var(--red-text); font-size: 14px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 22px; flex-wrap: wrap; }

.switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch input { appearance: none; flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background 0.15s; margin: 1px 0 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.15s; }
.switch input:checked { background: var(--accent-btn); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:focus-visible { box-shadow: var(--focus-ring); }
.switch input:disabled { opacity: 0.6; cursor: not-allowed; }
.switch .switch-text { display: grid; gap: 2px; }
.switch .switch-text strong { font-weight: 500; font-size: 14px; color: var(--text); }

.strength { display: grid; gap: 6px; }
.strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength-bar span { height: 4px; border-radius: 2px; background: var(--surface-3); }
.strength[data-score="1"] .strength-bar span:nth-child(-n + 1) { background: var(--red); }
.strength[data-score="2"] .strength-bar span:nth-child(-n + 2) { background: var(--amber); }
.strength[data-score="3"] .strength-bar span:nth-child(-n + 3) { background: var(--accent); }
.strength[data-score="4"] .strength-bar span { background: var(--green); }

/* toggle pill (segmented) */
.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-3); border-radius: 999px; }
.segmented button { border: 0; background: transparent; color: var(--text-3); font: inherit; font-size: 13px; font-weight: 500; padding: 5px 14px; border-radius: 999px; cursor: pointer; min-height: 30px; display: inline-flex; gap: 6px; align-items: center; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border-radius: 16px; }
.card-pad { padding: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; flex-wrap: wrap; }
.card-header p { margin: 2px 0 0; }
.card-body { padding: 4px 20px 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); }
.tray { background: var(--frame); border-radius: 24px; padding: 16px; }
.section-title { margin: 22px 0 10px; font-size: 13px; font-weight: 500; color: var(--text-3); }

.pill { display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--surface-3); color: var(--text-2); line-height: 1.7; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: none; }
.pill.no-dot::before { display: none; }
.pill.no-dot { padding-left: 10px; }
.pill[data-status="open"]::before { background: var(--accent); }
.pill[data-status="in_progress"]::before { background: var(--ink); }
.pill[data-status="awaiting_client"]::before { background: var(--amber); }
.pill[data-status="resolved"]::before { background: var(--green); }
.pill[data-status="closed"] { color: var(--text-3); }
.pill.danger { background: var(--red-soft); color: var(--red-text); }
.pill.danger::before { background: var(--red); }
.pill.success { background: var(--green-soft); color: var(--green-text); }
.pill.success::before { background: var(--green); }
.pill.warning { background: var(--amber-soft); color: var(--amber-text); }
.pill.warning::before { background: var(--amber); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.badge .icon { width: 13px; height: 13px; }
.badge[data-type="issue"] .icon { color: var(--accent); }
.priority { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.priority-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 11px; }
.priority-bars i { width: 3px; border-radius: 1px; background: var(--border-strong); }
.priority-bars i:nth-child(1) { height: 4px; }
.priority-bars i:nth-child(2) { height: 7px; }
.priority-bars i:nth-child(3) { height: 11px; }
.priority[data-priority="low"] i:nth-child(1), .priority[data-priority="normal"] i:nth-child(-n + 2) { background: var(--text-2); }
.priority[data-priority="high"] i { background: var(--accent); }
.priority[data-priority="urgent"] { color: var(--red-text); font-weight: 600; }
.priority[data-priority="urgent"] i { background: var(--red); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-weight: 600; font-size: 12px; }
.avatar.admin { background: var(--accent-soft); color: var(--accent-text); }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface); font-size: 14px; }
.callout .icon { margin-top: 2px; color: var(--text-3); }
.callout.info { background: var(--surface); }
.callout.info .icon { color: var(--accent); }
.callout.warning { background: var(--amber-soft); }
.callout.warning .icon { color: var(--amber); }
.callout.danger { background: var(--red-soft); }
.callout.danger .icon { color: var(--red); }
.callout p:last-child { margin: 0; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 5px 14px; box-shadow: var(--shadow-sm); font-size: 13px; color: var(--text-2); }

/* ---------- framed page (app + auth) ---------- */
.frame { min-height: 100vh; padding: 12px; }
@media (min-width: 640px) { .frame { padding: 16px; } }
.frame-inner { position: relative; min-height: calc(100vh - 24px); background: var(--frame); border-radius: 16px; display: flex; flex-direction: column; }
@media (min-width: 640px) { .frame-inner { min-height: calc(100vh - 32px); border-radius: 24px; } }

/* pill navbar */
.topnav { display: flex; justify-content: center; padding: 16px 12px 0; position: relative; z-index: 30; }
@media (min-width: 640px) { .topnav { padding: 24px 16px 0; } }
.nav-pill { position: relative; width: 100%; max-width: 980px; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px; box-shadow: var(--shadow-sm); }
.nav-pill .brand-mark { padding-left: 4px; }
.nav-pill .brand-mark span { display: none; }
@media (min-width: 1100px) { .nav-pill .brand-mark span { display: inline; } }
.nav-links { display: none; align-items: center; gap: 4px; margin-left: 12px; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 14px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.nav-link:hover { color: var(--text); background: var(--surface-3); }
.nav-link[aria-current="page"] { color: var(--text); font-weight: 500; }
.nav-link[aria-current="page"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: inline-flex; }
@media (min-width: 900px) { .nav-toggle { display: none; } }
.account-btn { border: 0; background: transparent; padding: 2px; border-radius: 999px; cursor: pointer; display: inline-flex; }
.account-btn:hover .avatar { background: var(--border); }
.nav-panel { position: absolute; top: 100%; left: 8px; right: 8px; margin-top: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 12px; z-index: 40; display: grid; gap: 2px; }
.nav-panel .nav-link { padding: 10px 12px; border-radius: 10px; font-size: 15px; }
.nav-panel hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }
.nav-panel .who { padding: 6px 12px 10px; font-size: 13px; color: var(--text-3); }
.nav-panel .who strong { display: block; color: var(--text); font-size: 14px; font-weight: 500; }
.nav-panel button.nav-link { border: 0; background: none; font: inherit; font-size: 15px; cursor: pointer; text-align: left; width: 100%; }
@media (min-width: 900px) { .nav-panel.mobile-only { display: none !important; } }
.account-panel { left: auto; right: 8px; width: 260px; }
.new-short { display: inline; }
.new-long { display: none; }
@media (min-width: 640px) { .new-short { display: none; } .new-long { display: inline; } }

.content { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 16px 40px; flex: 1; }
@media (min-width: 640px) { .content { padding: 44px 24px 56px; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .eyebrow { margin-bottom: 14px; }
.page-head p { margin: 10px 0 0; color: var(--text-2); font-size: 15px; max-width: 60ch; }
.page-head .crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 13px; text-decoration: none; margin-bottom: 12px; }
.page-head .crumb:hover { color: var(--text); }
.app-footer { padding: 18px 24px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; font-size: 12.5px; color: var(--text-3); }
.app-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.app-footer a, .app-footer button { color: var(--text-3); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.app-footer a:hover, .app-footer button:hover { color: var(--text); }

/* ---------- auth pages ---------- */
.hero { position: relative; flex: 1; background: var(--hero); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-height: calc(100vh - 24px); }
@media (min-width: 640px) { .hero { border-radius: 24px; min-height: calc(100vh - 32px); } }
.hero .nav-pill { max-width: 760px; }
.hero-content { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 16px 32px; }
@media (min-width: 640px) { .hero-content { padding: 64px 16px 44px; } }
.hero-content h1 { margin-top: 22px; max-width: 16ch; font-size: clamp(36px, 8vw, 68px); line-height: 1.05; font-weight: 500; letter-spacing: -0.02em; }
.hero-content .lead { margin: 18px 0 0; color: var(--text-2); font-size: clamp(14px, 3.5vw, 16px); max-width: 48ch; padding: 0 8px; }
.hero-tray { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 12px; flex: 1; display: flex; flex-direction: column; }
.hero-tray .tray { border-radius: 24px 24px 0 0; padding: 16px 16px 0; flex: 1; }
@media (min-width: 640px) { .hero-tray .tray { padding: 20px 20px 0; } }
.auth-card { background: var(--surface); border-radius: 16px; padding: 24px; }
@media (min-width: 640px) { .auth-card { padding: 28px; } }
.auth-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.auth-card .sub { color: var(--text-3); margin-bottom: 22px; font-size: 14px; }
.auth-footer { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; padding: 18px 12px 22px; font-size: 12.5px; }
.auth-footer a { color: var(--text-3); text-decoration: none; }
.auth-footer a:hover { color: var(--text); }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; color: var(--text-3); font-size: 12.5px; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .select { min-height: 38px; width: auto; border-radius: 999px; padding-left: 16px; font-size: 13.5px; }
.filters .search { position: relative; flex: 1 1 220px; min-width: 180px; max-width: 340px; }
.filters .search .input { width: 100%; padding-left: 38px; border-radius: 999px; min-height: 38px; }
.filters .search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.filters .spacer { flex: 1; }
.filters p { margin: 0; }

/* ---------- tables & lists ---------- */
.table-wrap { overflow-x: auto; }
@media (min-width: 761px) { .table-wrap { overflow: visible; } }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--text-3); padding: 14px 16px 10px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.client-cell { max-width: 190px; }
.ticket-subject { display: block; color: var(--text); font-weight: 500; text-decoration: none; max-width: 48ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-subject:hover { text-decoration: underline; }
.ticket-meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; color: var(--text-3); font-size: 12.5px; flex-wrap: wrap; }
.ref { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.ticket-cards { display: none; }
@media (max-width: 760px) { .table.responsive { display: none; } .ticket-cards { display: grid; gap: 8px; padding: 8px; } }
.ticket-card { display: block; padding: 14px; border-radius: 12px; background: var(--surface-2); color: inherit; text-decoration: none; }
.ticket-card:hover { background: var(--surface-3); }
.ticket-card .ticket-subject { white-space: normal; max-width: none; margin: 6px 0 8px; }
.list { list-style: none; margin: 0; padding: 0 8px 8px; }
.list > li + li { border-top: 1px solid var(--border); }
.list a.list-link { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; padding: 12px; border-radius: 12px; }
.list a.list-link:hover { background: var(--surface-2); }
.empty { text-align: center; padding: 44px 24px; color: var(--text-3); }
.empty .empty-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); color: var(--text-3); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { margin-bottom: 6px; color: var(--text); font-size: 16px; }
.empty p { max-width: 42ch; margin: 0 auto 16px; font-size: 14px; }
.loading-block { display: grid; place-items: center; padding: 64px; color: var(--text-3); }
.refetching { opacity: 0.5; transition: opacity 0.2s; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.stat-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.stat-head .stat-label { color: var(--accent-text); font-weight: 500; }
.stat-head .stat-period { color: var(--text-3); }
.stat-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.stat-value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); }
.stat-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.stat-pill.bad { background: var(--red-soft); color: var(--red-text); }
.stat-pill.good { background: var(--green-soft); color: var(--green-text); }
.stat-pill .icon { width: 12px; height: 12px; }
.stat-foot { font-size: 12.5px; color: var(--text-3); }
.gauge { width: 100%; max-width: 240px; margin: 10px auto 0; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge line { stroke-width: 2.5; stroke-linecap: round; }
.gauge line.on { stroke: var(--gauge-color, var(--accent)); }
.gauge line.off { stroke: var(--tick-off); }
.gauge text { fill: var(--text); font-size: 22px; font-weight: 600; font-family: var(--font); }
.gauge-caption { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.gauge-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); padding: 0 6px; margin-top: 2px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 1024px) { .dash-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; text-align: right; color: var(--text); }
.feed { list-style: none; margin: 0; padding: 0 8px 8px; }
.feed li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px; }
.feed li + li { border-top: 1px solid var(--border); }
.feed .feed-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.feed .feed-icon[data-group="security"] { background: var(--red-soft); color: var(--red-text); }
.feed .feed-icon[data-group="users"], .feed .feed-icon[data-group="tickets"] { background: var(--accent-soft); color: var(--accent-text); }
.feed .feed-text { min-width: 0; font-size: 14px; }
.feed .feed-text p { margin: 0; overflow-wrap: anywhere; }
.feed .feed-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.splitbar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-3); margin: 12px 0; }
.splitbar span { display: block; height: 100%; min-width: 2px; }
.splitbar .issue { background: var(--series-1); }
.splitbar .request { background: var(--series-2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend i.line { width: 14px; height: 2px; border-radius: 1px; }
.legend i.s1 { background: var(--series-1); }
.legend i.s2 { background: var(--series-2); }
.legend strong { color: var(--text); font-weight: 600; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 32px; gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 14px; display: flex; align-items: center; }
.hbar-fill { height: 10px; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 500; }

/* ---------- chart ---------- */
.chart-card { margin-top: 16px; }
.chart-wrap { position: relative; padding: 0 12px 14px 4px; }
.chart-svg { width: 100%; height: 280px; overflow: visible; touch-action: pan-y; }
.chart-svg .grid line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart-svg .axis-base { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart-svg text { fill: var(--muted-ink); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart-svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .line.s1 { stroke: var(--series-1); }
.chart-svg .line.s2 { stroke: var(--series-2); }
.chart-svg .dot { stroke: var(--chart-surface); stroke-width: 2; }
.chart-svg .dot.s1 { fill: var(--series-1); }
.chart-svg .dot.s2 { fill: var(--series-2); }
.chart-svg .end-label { fill: var(--text-2); font-size: 12px; font-weight: 500; }
.chart-svg .crosshair { stroke: var(--axis); stroke-width: 1; }
.chart-svg .hit { fill: transparent; cursor: crosshair; }
.chart-tooltip { position: absolute; pointer-events: none; z-index: 5; min-width: 150px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); padding: 8px 12px; font-size: 13px; }
.chart-tooltip .tt-date { color: var(--text-3); margin-bottom: 4px; font-size: 12px; }
.chart-tooltip .tt-row { display: flex; align-items: center; gap: 8px; }
.chart-tooltip .tt-row i { width: 12px; height: 2px; border-radius: 1px; }
.chart-tooltip .tt-row i.s1 { background: var(--series-1); }
.chart-tooltip .tt-row i.s2 { background: var(--series-2); }
.chart-tooltip .tt-row strong { font-size: 15px; font-weight: 600; min-width: 22px; }
.chart-tooltip .tt-row span { color: var(--text-2); }
.chart-table { max-height: 280px; overflow: auto; margin: 0 20px 16px; border: 1px solid var(--border); border-radius: 12px; }
.chart-table .table th { position: sticky; top: 0; background: var(--surface); }

/* ---------- ticket detail ---------- */
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ticket-layout { grid-template-columns: 1fr; } .ticket-side { order: -1; } }
.ticket-side { position: sticky; top: 16px; display: grid; gap: 12px; }
@media (max-width: 1000px) { .ticket-side { position: static; } }
.thread { display: grid; gap: 12px; }
.msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.msg-bubble { background: var(--surface); border-radius: 4px 16px 16px 16px; padding: 14px 16px; min-width: 0; }
.msg.note .msg-bubble { background: var(--note-bg); box-shadow: inset 0 0 0 1px var(--note-border); }
.msg-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.msg-head strong { font-weight: 600; font-size: 14px; }
.msg-head time { color: var(--text-3); font-size: 12px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.msg-body a { color: var(--accent-text); overflow-wrap: anywhere; }
.event { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; padding: 0 4px 0 10px; }
.event::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex: none; margin-right: 2px; }
.event time { margin-left: auto; white-space: nowrap; }
.composer-wrap { margin-top: 16px; }
.composer .textarea { border: 0; border-radius: 16px 16px 0 0; min-height: 110px; box-shadow: none; padding: 16px; background: transparent; }
.composer .textarea:focus { box-shadow: none; }
.composer:focus-within { box-shadow: var(--focus-ring); }
.composer-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--border); }
.composer-bar .select { width: auto; border-radius: 999px; min-height: 36px; font-size: 13px; }
.composer.note-mode { background: var(--note-bg); box-shadow: inset 0 0 0 1px var(--note-border); }
.composer.callout { margin-top: 16px; }

.dropzone { display: grid; place-items: center; gap: 6px; text-align: center; padding: 20px; border: 1.5px dashed var(--border-strong); border-radius: 14px; color: var(--text-3); background: var(--surface-2); cursor: pointer; font-size: 14px; transition: border-color 0.15s, background 0.15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.files { display: grid; gap: 6px; margin-top: 10px; }
.file { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 13.5px; min-width: 0; }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.file-size { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.file.error { border-color: var(--red); color: var(--red-text); }
.file progress { width: 70px; height: 6px; accent-color: var(--accent); }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.attachment { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.attachment:hover { border-color: var(--border-strong); background: var(--surface-2); }
.attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment small { color: var(--text-3); white-space: nowrap; }
.thumb { display: block; width: 160px; height: 110px; object-fit: cover; border-radius: 12px; background: var(--surface-3); }
.thumb-btn { padding: 0; border: 0; background: none; border-radius: 12px; cursor: zoom-in; }

.type-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.type-option { position: relative; display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.type-option:hover { border-color: var(--border-strong); }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.type-option:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.type-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.type-option:has(input:checked) .type-icon { background: var(--accent-soft); color: var(--accent-text); }
.type-option strong { display: block; font-weight: 500; font-size: 14px; color: var(--text); }
.type-option span { color: var(--text-3); font-size: 13px; }

.tabs { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-3); border-radius: 999px; margin-bottom: 20px; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 6px 16px; color: var(--text-3); text-decoration: none; font-weight: 500; font-size: 13.5px; border-radius: 999px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

.settings-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 22px 0; }
.settings-grid + .settings-grid { border-top: 1px solid var(--border); }
.settings-grid h3 { margin-bottom: 4px; }
@media (max-width: 800px) { .settings-grid { grid-template-columns: 1fr; gap: 12px; } }

.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.company-card { display: flex; flex-direction: column; }
.company-card .card-body { flex: 1; display: grid; gap: 10px; align-content: start; padding-top: 20px; }
.company-card h3 { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 16px; }
.company-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.site-list { display: flex; gap: 6px; flex-wrap: wrap; }
.company-stats { display: flex; gap: 16px; font-size: 13px; color: var(--text-3); }
.company-stats strong { color: var(--text); font-weight: 600; }
.secret-box { font-family: var(--mono); font-size: 16px; letter-spacing: 0.08em; padding: 14px; border-radius: 12px; background: var(--surface-3); text-align: center; word-break: break-all; user-select: all; }

.menu-wrap { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); }
.menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: 8px; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-3); box-shadow: none; }
.menu button.danger { color: var(--red-text); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* ---------- dialogs, toasts, cookie banner ---------- */
dialog.modal { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal.wide { width: min(680px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(11, 15, 26, 0.45); }
dialog.modal[open] { animation: pop 0.16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 22px 0; }
.modal-head h2 { font-size: 19px; font-weight: 600; }
.modal-head p { margin: 6px 0 0; color: var(--text-3); font-size: 14px; }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.lightbox { width: auto; max-width: calc(100vw - 32px); }
.lightbox img { max-width: calc(100vw - 64px); max-height: calc(100vh - 150px); object-fit: contain; margin: 0 auto; border-radius: 12px; }
.toasts { position: fixed; z-index: 90; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-lg); font-size: 14px; animation: pop 0.18s ease-out; }
.toast.error { background: var(--red); color: #fff; }
.toast .icon { margin-top: 1px; }
.cookie-banner { position: fixed; z-index: 80; left: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px; animation: pop 0.2s ease-out; }
.cookie-banner h2 { font-size: 15px; display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.cookie-banner h2 .icon { color: var(--accent); }
.cookie-banner p { color: var(--text-2); font-size: 13.5px; }
.cookie-banner a { color: var(--text); }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cookie-actions .btn { flex: 1 1 auto; }
.cookie-prefs { display: grid; gap: 12px; margin: 12px 0 4px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
@media (max-width: 480px) { .cookie-banner { left: 8px; right: 8px; bottom: 8px; width: auto; } }

/* ---------- legal pages ---------- */
.legal { max-width: 800px; margin: 0 auto; padding: 36px 16px 56px; }
@media (min-width: 640px) { .legal { padding: 52px 24px 64px; } }
.legal header { margin-bottom: 28px; }
.legal header p { color: var(--text-3); margin-top: 10px; }
.legal nav.toc { background: var(--surface); border-radius: 16px; padding: 18px 22px; margin-bottom: 28px; }
.legal nav.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 32px; font-size: 14px; }
@media (max-width: 640px) { .legal nav.toc ol { columns: 1; } }
.legal section { background: var(--surface); border-radius: 16px; padding: 22px; margin-bottom: 12px; scroll-margin-top: 20px; }
.legal h2 { font-size: 18px; margin-bottom: 10px; }
.legal h3 { margin: 18px 0 6px; }
.legal p, .legal li { color: var(--text-2); font-size: 14.5px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li + li { margin-top: 4px; }
.legal a { color: var(--accent-text); }
.legal .table { border: 1px solid var(--border); margin: 12px 0; }
.legal .table td { color: var(--text-2); vertical-align: top; font-size: 13.5px; }
.legal .placeholder { background: var(--amber-soft); color: var(--amber-text); padding: 0 4px; border-radius: 4px; }
.legal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; }
.legal-foot { padding: 20px; text-align: center; font-size: 12.5px; color: var(--text-3); }
.legal-foot a { color: var(--text-3); margin: 0 8px; }

.not-found { min-height: calc(100vh - 32px); display: grid; place-items: center; text-align: center; padding: 24px; }
.not-found .code { font-family: var(--serif); font-style: italic; font-size: 96px; line-height: 1; color: var(--text-3); }
.not-found h1 { margin: 8px 0 10px; }

@media print {
  .topnav, .cookie-banner, .toasts, .composer-wrap, .app-footer, .ticket-side { display: none !important; }
  .frame { padding: 0; }
}
@media (max-width: 640px) { .nav-right > .nav-link { display: none; } }

/* ---------- notification bell ---------- */
.bell-btn { position: relative; }
.bell-badge {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--accent-btn); color: var(--on-accent);
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.bell-panel { left: auto; right: 8px; width: min(380px, calc(100vw - 40px)); padding: 8px; gap: 0; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.bell-head strong { font-size: 15px; font-weight: 600; }
.bell-list { max-height: min(420px, 60vh); overflow-y: auto; display: grid; gap: 2px; }
.bell-empty { margin: 0; padding: 22px 8px; text-align: center; color: var(--text-3); font-size: 14px; }
.bell-item { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 8px; border-radius: 10px; color: var(--text-2); text-decoration: none; }
.bell-item:hover, .bell-item:focus-visible { background: var(--surface-3); }
.bell-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: transparent; }
.bell-item.unread .bell-dot { background: var(--accent); }
.bell-item.unread strong { color: var(--text); }
.bell-text { display: grid; gap: 2px; min-width: 0; }
.bell-text strong { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.bell-body { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-text time { font-size: 12px; color: var(--text-3); }
