/* VIGIL by IT Unlocked - interface.
   Layout: light header, Overview first, underline tabs grouped by area, KPI cards, icon + label status pills,
   progress bars, line charts and a 30-day availability strip. One blue brand accent; the status colors are reserved for state.
   Type: Manrope (headings), Source Sans 3 (text), IBM Plex Mono (code). Fonts load from Google Fonts (allowed by the CSP). */
:root {
  color-scheme: light;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-head: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --brand: #0b57f2;
  --brand-primary: #0b57f2;
  --brand-accent: #2d7cff;
  --brand-soft: #e7eefe;
  --link: #0b4fd8;

  --page: #f2f5fa;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --fill: #e6ecf6;
  --fill-2: #f0f3f9;
  --text: #0e1a30;
  --text-2: #44546e;
  --muted: #5f6d86;
  --grid: #e8edf5;
  --axis: #cfd8e6;
  --line: #dde4ef;
  --border: #dde4ef;
  --shadow: 0 1px 2px rgba(14, 26, 48, .05);
  --shadow-hover: 0 4px 16px rgba(14, 26, 48, .12);

  --series-1: #2a78d6;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;

  --good: #0ca30c;    --good-bg: #e4f5e4;     --good-text: #0a7a0a;
  --warning: #fab219; --warning-bg: #fff2d3;  --warning-dot: #fab219; --warning-text: #8a5a00;
  --critical: #d03b3b; --critical-bg: #fbe5e5; --critical-dot: #d03b3b; --critical-text: #b02a2a;
  --error: #8944ab;   --error-bg: #f1e6f7;
  --info: #0b57f2;    --info-bg: #e7eefe;
  --pending: #5f6d86; --pending-bg: #eef1f7;

  --radius: 10px;
  --radius-sm: 8px;
  --nav-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #3b7bff; --brand-primary: #2f6df0; --brand-accent: #5b93ff; --brand-soft: #16264a; --link: #8db1ff;
    --page: #0a111d; --surface: #111b2b; --surface-2: #152133; --fill: #1d2b42; --fill-2: #16233a;
    --text: #e9eff9; --text-2: #b3c0d5; --muted: #8b9ab2;
    --grid: #1c2a40; --axis: #2d3d57; --line: #24324a; --border: #24324a;
    --shadow: none; --shadow-hover: 0 0 0 1px #3a4d6e;
    --series-1: #3987e5; --s1: #3987e5; --s2: #d95926; --s3: #199e70;
    --good: #2fbf4a; --good-bg: #12301a; --good-text: #7fe08f;
    --warning: #fab219; --warning-bg: #3a2e10; --warning-dot: #fab219; --warning-text: #ffd26e;
    --critical: #ec5d5d; --critical-bg: #3d1a1d; --critical-dot: #ec5d5d; --critical-text: #ff9a9a;
    --error: #c28ae0; --error-bg: #2e1a3a; --info: #8db1ff; --info-bg: #16264a;
    --pending: #8b9ab2; --pending-bg: #1d2b42;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #3b7bff; --brand-primary: #2f6df0; --brand-accent: #5b93ff; --brand-soft: #16264a; --link: #8db1ff;
  --page: #0a111d; --surface: #111b2b; --surface-2: #152133; --fill: #1d2b42; --fill-2: #16233a;
  --text: #e9eff9; --text-2: #b3c0d5; --muted: #8b9ab2;
  --grid: #1c2a40; --axis: #2d3d57; --line: #24324a; --border: #24324a;
  --shadow: none; --shadow-hover: 0 0 0 1px #3a4d6e;
  --series-1: #3987e5; --s1: #3987e5; --s2: #d95926; --s3: #199e70;
  --good: #2fbf4a; --good-bg: #12301a; --good-text: #7fe08f;
  --warning: #fab219; --warning-bg: #3a2e10; --warning-dot: #fab219; --warning-text: #ffd26e;
  --critical: #ec5d5d; --critical-bg: #3d1a1d; --critical-dot: #ec5d5d; --critical-text: #ff9a9a;
  --error: #c28ae0; --error-bg: #2e1a3a; --info: #8db1ff; --info-bg: #16264a;
  --pending: #8b9ab2; --pending-bg: #1d2b42;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--page); color: var(--text);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); color: var(--text); letter-spacing: -.01em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 22px 56px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
code { font-family: var(--font-mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
#app > * { animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #app > * { animation: none; } * { transition: none !important; } }

/* ------------------------------------------------------------------ header */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(22px, calc((100% - 1240px) / 2 + 22px));
  background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; min-width: 0; }
.brand img { display: none; width: auto; }
.brand-logo { height: 24px; }
.brand-mark { height: 26px; }
.brand-logo.logo-light { display: block; }
:root[data-theme="dark"] .brand-logo.logo-light { display: none; }
:root[data-theme="dark"] .brand-logo.logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo.logo-light { display: none; }
  :root:not([data-theme="light"]) .brand-logo.logo-dark { display: block; }
}
.brand-sub { font: 700 12.5px var(--font-body); color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.topnav { display: flex; align-items: center; gap: 6px; }
.user { font-size: 13px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0 6px; }
.topbar .btn.ghost { background: transparent; color: var(--text-2); border: 1px solid transparent; padding: 6px 10px; font-size: 13.5px; }
.topbar .btn.ghost:hover { color: var(--text); background: var(--fill-2); border-color: var(--line); text-decoration: none; }
.picker {
  appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 260px; min-width: 0;
  font: 600 13.5px var(--font-body); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 30px 6px 12px; background: var(--surface-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b9ab2' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center;
}
.picker:hover { border-color: var(--brand); }
.picker:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.picker option { color: #0e1a30; background: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ buttons & inputs */
.btn {
  appearance: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none !important;
  font: 700 14px var(--font-body); padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: border-color .15s, background .15s, filter .15s;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
input[type="search"], input[type="text"], input[type="email"], .sia-form input[type="password"], .tbl-tools select, .pay-form input[type="password"], .pay-form input[type="date"], .pay-form select {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; min-width: 200px;
  transition: border-color .15s, box-shadow .15s;
}
input[type="search"]:focus, .tbl-tools select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--info-bg); }

/* ------------------------------------------------------------------ headings */
.hero { padding: 4px 0 4px; }
.eyebrow { margin: 0 0 4px; font: 700 12px var(--font-body); color: var(--link); letter-spacing: .08em; text-transform: uppercase; }
.hero-title { font: 800 clamp(24px, 3.4vw, 32px)/1.15 var(--font-head); margin: 0; letter-spacing: -.02em; text-wrap: balance; }
.hero-sub { margin: 6px 0 0; font-size: 14.5px; color: var(--text-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin: 6px 0 18px; }
.page-head h1 { margin: 0; }
.client-head .hero-title { font-size: clamp(24px, 3.4vw, 32px); }
.section-title, h2 { font: 700 17px/1.3 var(--font-head); margin: 28px 0 12px; letter-spacing: -.005em; }
.card h2, .card h3 { margin-top: 0; }
.crumbs { font-size: 13.5px; margin: 0 0 4px; }
.live { display: inline-flex; align-items: center; gap: 7px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }

/* ------------------------------------------------------------------ icons, pills, dots */
.ic { flex: none; }
.ic.ok { color: var(--good); } .ic.warn { color: var(--warning); } .ic.bad { color: var(--critical); }
.ic.err { color: var(--error); } .ic.info { color: var(--brand); } .ic.mute { color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 7px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: 700 12px/20px var(--font-body); white-space: nowrap; letter-spacing: 0;
}
.pill:not(:has(.ic))::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.pill.Green { background: var(--good-bg); }
.pill.Amber { background: var(--warning-bg); }
.pill.Red { background: var(--critical-bg); }
.pill.Error { background: var(--error-bg); }
.pill.Info { background: var(--info-bg); }
.pill.Pending { background: var(--pending-bg); }
.pill.Green:not(:has(.ic))::before { background: var(--good); } .pill.Amber:not(:has(.ic))::before { background: var(--warning); }
.pill.Red:not(:has(.ic))::before { background: var(--critical); } .pill.Error:not(:has(.ic))::before { background: var(--error); }
.pill.Info:not(:has(.ic))::before { background: var(--brand); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.Green { background: var(--good); } .dot.Amber { background: var(--warning-dot); } .dot.Red { background: var(--critical-dot); }
.dot.Error { background: var(--error); } .dot.Pending, .dot.Info { background: var(--muted); }

/* ------------------------------------------------------------------ cards, grids, KPIs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin: 0; font: 700 15px/1.3 var(--font-head); letter-spacing: -.005em; }
.card .sub { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel { display: flex; flex-direction: column; gap: 16px; }
.panel .card, .grid .card { margin: 0; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }
.wide-narrow { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 900px) { .wide-narrow { grid-template-columns: minmax(0, 1fr); } }
.kpi { display: flex; flex-direction: column; gap: 3px; }
.kpi .l { font-size: 12.5px; color: var(--muted); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; display: flex; align-items: center; gap: 7px; }
.kpi .v { font: 800 28px/1.1 var(--font-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 15px; font-weight: 700; color: var(--text-2); margin-left: 2px; }
.kpi .d { font-size: 13px; color: var(--text-2); }
.kpi.Red .v { color: var(--critical-text); } .kpi.Amber .v { color: var(--warning-text); } .kpi.Green .v { color: var(--good-text); }
.banner { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--warning-bg); color: var(--text); margin: 16px 0; border: 1px solid var(--line); }
.empty { padding: 32px; text-align: center; color: var(--muted); }
.big { font: 800 54px/1 var(--font-head); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.big small { font-size: 20px; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.score-row { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.score-main { min-width: 150px; }
.score-main .sub { max-width: 22ch; margin-top: 8px; }
.score-areas { flex: 1; min-width: 260px; }

/* horizontal bars */
.hb { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 7px 0; color: inherit; }
a.hb { text-decoration: none !important; border-radius: 6px; }
a.hb:hover .n { color: var(--link); }
.hb .n { font-size: 14px; font-weight: 600; min-width: 0; overflow-wrap: break-word; }
.hb .n small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.hb .tr { height: 10px; background: var(--grid); border-radius: 5px; overflow: hidden; }
.hb .tr i { display: block; height: 100%; background: var(--s1); border-radius: 5px; }
.hb .tr i.Green { background: var(--good); } .hb .tr i.Amber { background: var(--warning); } .hb .tr i.Red { background: var(--critical); } .hb .tr i.Error { background: var(--error); }
.hb .vv { font: 700 14px var(--font-head); min-width: 84px; text-align: right; display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
@media (max-width: 520px) { .hb { grid-template-columns: minmax(0, 1fr) auto; } .hb .tr { grid-column: 1 / -1; order: 3; } }

/* alerts, feed, check lists */
.alerts { list-style: none; margin: 0; padding: 0; }
.alert .ack-form { grid-column: 2; }
.alert { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.alert:first-child { border-top: 0; padding-top: 2px; }
.alert .ti { font-weight: 600; }
.alert .nx { font-size: 13.5px; color: var(--text-2); grid-column: 2; }
.alert .mt { font-size: 12.5px; color: var(--muted); grid-column: 2; display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; }
.alert .ack-btn, .alert .ack-info { margin-top: 2px; }
.feed { display: flex; flex-direction: column; max-height: 430px; overflow: auto; margin: 0 -6px; padding: 0 6px; }
.fi { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.fi:first-child { border-top: 0; }
.fi .when { font: 500 12px var(--font-mono); color: var(--muted); padding-top: 3px; }
.fi p { font-size: 14px; color: var(--text-2); margin: 0; }
.fi p b { color: var(--text); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checks li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.checks li:first-child { border-top: 0; }
.checks small { display: block; color: var(--muted); font-size: 12.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend i.ln { height: 3px; width: 16px; border-radius: 2px; vertical-align: 3px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.seg button { appearance: none; border: 0; background: none; color: var(--text-2); font: 600 13px var(--font-body); padding: 5px 12px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--brand-primary); color: #fff; }

/* line / bar charts (hosts are div.cx) */
.cx { position: relative; min-height: 60px; }
.cx svg { display: block; overflow: visible; }
.cx .gl { stroke: var(--grid); stroke-width: 1; }
.cx .ax { fill: var(--muted); font: 11.5px var(--font-body); }
.cx .hit { fill: transparent; cursor: crosshair; }

/* 30-day availability strip */
.srow { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 5px 0; }
.srow .sn { font-size: 14px; font-weight: 600; min-width: 0; overflow-wrap: break-word; }
.srow .sn small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.cells { display: flex; gap: 2px; }
.acell { flex: 1; min-width: 0; height: 28px; border-radius: 3px; }
.acell.ok { background: var(--good); opacity: .82; } .acell.deg { background: var(--warning); } .acell.out { background: var(--critical); }
.acell:hover { opacity: 1; outline: 2px solid var(--text); outline-offset: 1px; }
.sx { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr); gap: 14px; font-size: 12px; color: var(--muted); }
.sx div:last-child { display: flex; justify-content: space-between; }
@media (max-width: 600px) { .srow, .sx { grid-template-columns: minmax(0, 1fr); } .sx > div:first-child { display: none; } }

/* status matrix (all clients) */
.matrix-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; }
.matrix th, .matrix td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix th { font: 700 11.5px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface); line-height: 1.3; }
.matrix th:first-child, .matrix td:first-child { padding-left: 18px; }
.matrix td.cell a { display: inline-flex; flex-direction: column; gap: 3px; text-decoration: none; }
.matrix td.cell .count { font-size: 11.5px; color: var(--muted); padding-left: 2px; }
.matrix tbody tr:hover td { background: var(--surface-2); }
.matrix td.client { min-width: 190px; }
.matrix .client a { font-weight: 700; color: var(--text); font-size: 14.5px; }

/* ------------------------------------------------------------------ tabs (underline) */
.tabs-scroller { position: relative; display: flex; max-width: 100%; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.tabs {
  display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-behavior: smooth; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; min-width: 0; flex: 1 1 auto; margin-bottom: -1px;
  --fade-l: 0px; --fade-r: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs-scroller.can-left .tabs { --fade-l: 56px; }
.tabs-scroller.can-right .tabs { --fade-r: 56px; }
.tabs-arrow {
  position: absolute; top: 50%; z-index: 2; width: 32px; height: 32px; margin-top: -17px; border-radius: 50%;
  border: 1px solid var(--line); padding: 0 0 2px; font-size: 20px; line-height: 1; cursor: pointer;
  background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(14, 26, 48, .14);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.tabs-arrow.prev { left: 2px; }
.tabs-arrow.next { right: 2px; }
.tabs-scroller.can-left .tabs-arrow.prev, .tabs-scroller.can-right .tabs-arrow.next { opacity: 1; pointer-events: auto; }
.tabs-arrow:hover { transform: scale(1.06); }
@media (hover: none) { .tabs-arrow { display: none; } }   /* touch: swipe the strip, the edge fade shows there is more */
#panel.fade-in { animation: panel-in .2s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #panel.fade-in { animation: none; } .tabs { scroll-behavior: auto; } }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 9px; white-space: nowrap;
  border-bottom: 3px solid transparent; color: var(--text-2); font: 600 14.5px var(--font-body); text-decoration: none !important;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.tab .tb { font: 700 11px var(--font-head); background: var(--warning-bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; line-height: 18px; color: var(--text); }
.tab .tb.Red { background: var(--critical-bg); }

/* ------------------------------------------------------------------ check sections inside a tab */
.csec { margin: 28px 0 0; scroll-margin-top: calc(var(--nav-h) + 12px); }
.csec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 4px; }
.csec-head h2 { margin: 0; font-size: 19px; }
.csec-note { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
details.metrics { margin: 10px 0 0; }
details.metrics > summary { cursor: pointer; font: 700 13px var(--font-body); color: var(--link); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.metrics > summary::-webkit-details-marker { display: none; }
details.metrics > summary::before { content: "\203A"; font-size: 17px; line-height: 1; transition: transform .15s; }
details.metrics[open] > summary::before { transform: rotate(90deg); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.tile .label { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.tile .value { font: 800 22px/1.2 var(--font-head); margin-top: 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; word-break: break-word; }
.tile .value.sm { font-size: 16px; }

/* findings */
.findings { list-style: none; padding: 0; margin: 12px 0 0; }
.findings li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.findings li:last-child { border-bottom: 0; padding-bottom: 2px; }
.findings li:first-child { padding-top: 2px; }
.findings .t { font-weight: 600; font-size: 14.5px; }
.findings .d { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }

/* ------------------------------------------------------------------ data tables */
.tbl-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 12px; }
.tbl-tools .btn { margin-left: auto; }
.tbl-tools .btn + .btn { margin-left: 0; }
.tbl-wrap {
  overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface);
  scrollbar-width: thin; scrollbar-color: var(--axis) transparent;
}
.tbl-wrap::-webkit-scrollbar { height: 8px; }
.tbl-wrap::-webkit-scrollbar-thumb { background: var(--axis); border-radius: 8px; }
.tbl-wrap table.data th { background: var(--surface); }
.tbl-wrap table.data { min-width: 720px; }
.tbl-wrap.compact table.data { min-width: 0; }   /* short 2-3 column lists fit the phone without sideways scrolling */
.tbl-wrap table.data .pill { white-space: nowrap; }
/* the first column (domain / site / name) stays put while the rest scrolls sideways */
.tbl-wrap > table.data > thead > tr > th:first-child,
.tbl-wrap > table.data > tbody > tr:not(.detail) > td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.tbl-wrap > table.data > tbody > tr.expandable:hover > td:first-child { background: var(--surface-2); }
.tbl-wrap.scrolled > table.data > thead > tr > th:first-child,
.tbl-wrap.scrolled > table.data > tbody > tr:not(.detail) > td:first-child { box-shadow: 6px 0 8px -6px rgba(14, 26, 48, .22); }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
table.data th {
  text-align: left; font: 700 11.5px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 11px 12px 9px;
  border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap; background: var(--surface);
}
table.data th:hover { color: var(--text); }
table.data th[aria-sort="ascending"]::after { content: " \2191"; color: var(--brand); }
table.data th[aria-sort="descending"]::after { content: " \2193"; color: var(--brand); }
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th:first-child, table.data td:first-child { padding-left: 18px; }
table.data th:last-child, table.data td:last-child { padding-right: 18px; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.expandable { cursor: pointer; transition: background .15s; }
table.data tr.expandable:hover td { background: var(--surface-2); }
table.data tr.detail td { background: var(--surface-2); color: var(--text-2); font-size: 13px; padding: 14px 18px; }
tr.detail table.data { background: var(--surface); }
.tbl-foot { font-size: 12px; color: var(--muted); padding: 8px 4px; }
.detail-scroll { max-height: 440px; overflow: auto; border-radius: var(--radius-sm); background: var(--surface); }
table.kv { border-collapse: collapse; margin-top: 10px; width: 100%; }
table.kv th { text-align: left; font-weight: 700; color: var(--muted); padding: 5px 16px 5px 0; vertical-align: top; white-space: nowrap; width: 1%; cursor: default; border: 0; background: none; font-size: 12px; }
table.kv td { padding: 5px 0; word-break: break-all; border: 0; }
/* plain-language check views (SEO, search numbers): labels wrap, words are not broken mid-word */
table.kv.plain th { white-space: normal; width: 40%; font-size: 13px; }
table.kv.plain td { word-break: normal; overflow-wrap: anywhere; }
.tx-amber { color: var(--warning); font-weight: 600; }
tr.detail .findings li { grid-template-columns: 140px 1fr; padding: 8px 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { font: 700 11.5px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 10px 8px; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl td.r, .tbl th.r { text-align: right; }
.scroll { overflow-x: auto; }

/* category tiles (quarantine) */
.cat-tile { text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cat-tile:hover { border-color: var(--brand); }
.cat-tile[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--info-bg); }
/* category labels like "High confidence phish" must stay inside the tile: let the pill wrap instead of overflowing */
.tiles:has(.cat-tile) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.cat-tile { min-width: 0; overflow: hidden; }
.cat-tile .label { display: flex; min-width: 0; }
.cat-tile .pill { white-space: normal; max-width: 100%; line-height: 1.25; padding-top: 3px; padding-bottom: 3px; text-align: left; overflow-wrap: anywhere; }
.cat-tile .pill .ic { flex: none; }

/* bars, strips, bar chart (existing daily-cost chart) */
.pctbar { display: inline-block; width: 64px; height: 6px; border-radius: 980px; background: var(--grid); vertical-align: middle; overflow: hidden; margin-right: 6px; }
.pctbar > span { display: block; height: 100%; background: var(--series-1); border-radius: 980px; }
.pctbar > span.amber { background: var(--warning); }
.pctbar > span.red { background: var(--critical); }
.uptime-strip { width: 100%; max-width: 900px; height: 26px; display: block; }
.uptime-strip .up { fill: var(--good); }
.uptime-strip .down { fill: var(--critical); }
.chart { width: 100%; height: auto; max-height: 280px; display: block; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .bar { fill: var(--series-1); }
.chart .bar.dim { opacity: .4; }
.chart .hit { fill: transparent; cursor: crosshair; }
.tooltip {
  position: fixed; z-index: 50; pointer-events: none; color: var(--text); font-size: 13px; line-height: 1.45; max-width: 260px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(8, 16, 32, .22);
}
.tooltip b { font-family: var(--font-head); font-weight: 700; font-variant-numeric: tabular-nums; }
.tooltip .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.tooltip .row i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.tooltip .note { color: var(--text-2); margin-top: 4px; border-top: 1px solid var(--line); padding-top: 4px; }

/* footer */
.site-foot { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 20px; padding-bottom: 36px; }
.site-foot a { color: var(--text-2); }

@media (max-width: 1180px) { .topbar .brand-sub { display: none; } }   /* room for the menu */
/* ------------------------------------------------------------------ small screens */
@media (max-width: 640px) {
  .wrap { padding: 16px 16px 44px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .brand-sub, .user { display: none; }
  .brand-logo.logo-light, .brand-logo.logo-dark { display: none !important; }
  .brand-mark.logo-light { display: block; }
  :root[data-theme="dark"] .brand-mark.logo-light { display: none; }
  :root[data-theme="dark"] .brand-mark.logo-dark { display: block; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand-mark.logo-light { display: none; }
    :root:not([data-theme="light"]) .brand-mark.logo-dark { display: block; }
  }
  .picker { max-width: 150px; }
  .topbar .btn.ghost { padding: 6px 8px; }
  #themeToggle, #switchAccount { display: none; }   /* phone: Switch account stays on the "no access" page and in the user menu below */   /* room for Help; the theme follows the phone's own light / dark setting */
  .findings li { grid-template-columns: 1fr; gap: 6px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .big { font-size: 44px; }
  .tabs-scroller { margin-left: -16px; margin-right: -16px; padding: 0 16px; }
}

/* ================================================================== Admin (IT Unlocked admins only) */
/* top-bar drop-down */
.admin-menu { position: relative; }
.admin-menu .caret { display: inline-block; width: 0; height: 0; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.admin-menu .menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; padding: 6px; z-index: 30;
  background: var(--surface); color: var(--text); border-radius: 14px; border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .15s, transform .15s;
}
.admin-menu.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.admin-menu .menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 9px; color: var(--text); font-size: 14px; text-decoration: none; }
.admin-menu .menu a:hover, .admin-menu .menu a:focus { background: var(--fill-2); outline: none; }
.admin-menu .menu a:nth-child(3) { border-bottom: 1px solid var(--grid); border-radius: 9px 9px 0 0; margin-bottom: 4px; }
.admin-menu .count:not(:empty) { background: var(--brand-primary); color: #fff; font-size: 11px; font-weight: 600; border-radius: 980px; padding: 1px 7px; }

.head-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-head .hero-title { font-size: clamp(30px, 4.2vw, 46px); }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 980px; background: var(--brand-primary); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.badge.on-primary { background: #fff; color: var(--brand-primary); }
.banner.err { background: var(--critical-bg); }
.banner.err ul { margin: 8px 0 0; padding-left: 20px; }
.banner.info { background: var(--info-bg); }
.banner .btn { margin-left: 8px; }

/* forms */
.admin-form { padding-bottom: 8px; }
.form-card h3 { font-size: 19px; margin: 0 0 14px; }
.form-card h4 { font-size: 14px; font-weight: 600; margin: 22px 0 8px; color: var(--text); }
.form-sub { margin: -8px 0 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); }
.field-hint { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.admin-form input[type="text"], .admin-form input[type="number"], .admin-form input[type="datetime-local"], .admin-form input[type="password"], .admin-form input[type="url"], .admin-form input[type="date"], .admin-form select, .admin-form textarea,
.onboard input[type="text"], .onboard input[type="number"], .onboard textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--fill-2); width: 100%; min-width: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 12px; transition: border-color .2s, background .2s, box-shadow .2s;
}
.admin-form select, .onboard select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background: var(--fill-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2386868B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
.admin-form textarea, .onboard textarea { resize: vertical; line-height: 1.45; }
.admin-form textarea.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus, .onboard input:focus, .onboard textarea:focus {
  outline: none; background: var(--surface); border-color: var(--series-1); box-shadow: 0 0 0 4px var(--info-bg);
}
.admin-form input:disabled, .onboard input:disabled { color: var(--muted); cursor: not-allowed; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { flex: 1; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; cursor: pointer; font-size: 14px; }
.check input, .radio input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand-primary); flex: none; }
.check-row { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.check-list { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-bottom: 8px; }
.radio-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.radio-group .radio { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--fill-2); border: 1px solid transparent; transition: border-color .15s, background .15s; }
.radio-group .radio:has(input:checked) { background: var(--info-bg); border-color: var(--series-1); }
.onboard .radio-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.spacer { flex: 1; }
.inline-tools { display: flex; justify-content: flex-end; margin: 18px 0 0; }
.rem-tools { align-items: center; gap: 12px; margin: 0 0 14px; }
.rem-tools p { flex: 1; margin: 0; }
@media (max-width: 640px) { .rem-tools { flex-direction: column; align-items: stretch; } }
.plain { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.plain li { margin: 6px 0; }

/* websites editor */
.site-row { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--fill-2); color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; }
.icon-btn:hover { background: var(--critical-bg); color: var(--critical); }
.link-btn { border: 0; background: none; color: var(--series-1); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 4px; }
.link-btn:hover { text-decoration: underline; }

/* GravityZone choices */
.choice-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--grid); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.choice:hover { border-color: var(--series-1); }
.choice.chosen { border-color: var(--series-1); background: var(--info-bg); }

/* buttons */
.small-btn { padding: 5px 12px; font-size: 13px; }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.is-busy { opacity: .85; cursor: progress; }
.danger-btn { background: var(--critical-bg); color: var(--critical); }
.danger-btn:hover { background: var(--critical); color: #fff; filter: none; }
.form-card.danger { border: 1px solid var(--critical-bg); }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* advanced JSON */
details.advanced summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
details.advanced summary::-webkit-details-marker { display: none; }
details.advanced summary::before { content: "\203A"; font-size: 22px; color: var(--muted); transition: transform .2s; }
details.advanced[open] summary::before { transform: rotate(90deg); }
details.advanced summary h3 { margin: 0; }

/* sticky save bar */
.save-bar {
  position: sticky; bottom: 16px; z-index: 10; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 24px 0 0; padding: 10px 12px 10px 20px; border-radius: 980px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .14), 0 0 0 1px var(--border); font-size: 14px; font-weight: 500;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.save-bar.show { opacity: 1; transform: none; pointer-events: auto; }
.save-bar .check { margin: 0; font-weight: 400; font-size: 13px; color: var(--text-2); }

/* onboarding */
.onboard-head { display: flex; justify-content: space-between; gap: 12px; }
.onboard-head h3 { margin: 0 0 4px; }

/* PowerShell-only list */
.ps-list { list-style: none; margin: 0 0 12px; padding: 0; }
.ps-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--grid); }
.ps-list li:last-child { border-bottom: 0; }
.ps-list p { margin: 2px 0 0; }
.ps-list code { white-space: nowrap; background: var(--fill-2); padding: 4px 10px; border-radius: 8px; font-size: 12.5px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(560px, calc(100% - 32px));
  padding: 12px 20px; border-radius: 14px; font-size: 14px; font-weight: 500; color: #fff; background: rgba(29, 29, 31, .94);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--critical); }

@media (max-width: 760px) {
  .grid-2, .grid-3, .radio-group, .onboard .radio-group { grid-template-columns: 1fr; }
  .site-row { grid-template-columns: 1fr 34px; }
  .site-row input[data-site="name"], .site-row input[data-site="keyword"] { grid-column: 1; }
  .site-row .icon-btn { grid-row: 1; grid-column: 2; }
  .save-bar { border-radius: 18px; }
  .ps-list li { flex-direction: column; align-items: flex-start; }
  .admin-menu .menu { position: fixed; left: 12px; right: 12px; top: calc(var(--nav-h) + 6px); min-width: 0; }
}
[hidden] { display: none !important; }
.btn { white-space: nowrap; }

/* Fix all issues card */
.fix-all { border: 1px solid color-mix(in srgb, var(--brand-primary) 25%, transparent); }
.fix-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fix-head h3 { margin-bottom: 10px; }
.fix-head .inline { flex-wrap: wrap; }
code.cmd { background: var(--fill-2); padding: 7px 12px; border-radius: 10px; font-size: 12.5px; white-space: nowrap; }
.fix-list { list-style: none; margin: 14px 0 6px; padding: 0; }
.fix-list li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--grid); font-size: 14px; }
.fix-list li:last-child { border-bottom: 0; }
.fix-manual { margin: 8px 0; font-size: 14px; }
.fix-manual summary { cursor: pointer; color: var(--text-2); }
.fix-manual ul { margin: 8px 0 0; padding-left: 0; list-style: none; }
.fix-manual li { padding: 4px 0; }
.fix-all { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* acknowledge findings */
.ack-btn { margin-top: 8px; }
.ack-info { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ack-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--fill-2); }
.ack-form select, .ack-form input[type="text"] { font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--grid); border-radius: 10px; padding: 6px 10px; min-width: 0; }
.ack-form input[type="text"] { flex: 1 1 220px; }

/* Email Quarantine: per-domain release / allow / bypass (admins) */
.q-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 10px; }
.q-actions a.small { margin-left: auto; }
.qa-form { margin: 0 0 10px; }
.qa-form .qa-text { flex: 1 1 100%; font-size: 13px; }
.qa-form .qa-err { flex: 1 1 100%; color: var(--critical); }
.qa-form .qa-err code { font-size: 12px; user-select: all; }
tr.flash > td { animation: rowflash 2.4s ease-out 1; }
@keyframes rowflash { from { background: var(--fill-2); } to { background: transparent; } }
/* ---------- change notifications (Alerts page, preferences) ---------- */
.alert-filters { flex-wrap: wrap; }
.alert-filters select { min-width: 150px; }
.notify-items { margin: 6px 0 10px; padding-left: 0; list-style: none; }
.notify-items li { padding: 4px 0; }
.notify-events .check { margin-bottom: 12px; }
.notify-editor h4:first-child { margin-top: 0; }
.nt-msg { font-size: 13px; }
.nt-msg.ok { color: var(--text-2); }
.nt-msg.err { color: var(--critical, #C5221F); }

/* Bitdefender: connect the client's own GravityZone account (client page > Bitdefender) */
.bdc { margin-top: 16px; }
.bdc h3 { margin: 0 0 8px; }
.bdc .inline { flex-wrap: wrap; margin: 4px 0 0; }
.bdc-form { margin-top: 14px; max-width: 760px; }
.bdc-steps { margin: 0 0 14px; padding-left: 20px; line-height: 1.55; }
.bdc-form input[type="password"], .bdc-form input[type="url"], .bdc-form input[type="date"] {
  font: inherit; font-size: 14px; color: var(--text); background: var(--fill-2); width: 100%; min-width: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 12px;
}
.bdc-form input:focus { outline: none; background: var(--surface); border-color: var(--series-1); box-shadow: 0 0 0 4px var(--info-bg); }
.banner.ok { background: var(--good-bg); }
@media (max-width: 640px) { .bdc .grid-2 { grid-template-columns: 1fr; } }

/* ---------- self-service: How to fix / Fix it for me / Check again / Request a call ---------- */
details.fix { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
details.fix > summary { cursor: pointer; padding: 8px 12px; font-size: 13.5px; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
details.fix > summary::-webkit-details-marker { display: none; }
details.fix > summary::before { content: '\203A'; display: inline-block; width: 10px; color: var(--muted); transition: transform .15s; }
details.fix[open] > summary::before { transform: rotate(90deg); }
details.fix > summary:focus-visible { outline: 2px solid var(--series-1); outline-offset: 2px; }
.fx-label { font-weight: 700; color: var(--link); }
.fx-sum { color: var(--text); }
.fx-badge { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--link); }
details.fix > .fx, details.fix > p { padding: 0 14px; }
details.fix > p { margin: 0 0 12px; }
.fx { font-size: 14px; color: var(--text); }
.findings .fx li { display: list-item; padding: 0; border: 0; margin: 3px 0; }
.findings .fx tr, .findings .fx td { grid-template-columns: none; }
.fx-recs td.ty code, .fx-recs td:first-child { white-space: nowrap; word-break: normal; }
.fx-recs tr.rec-remove td.val code { text-decoration: line-through; color: var(--muted); }
.fx-where, .fx-who { margin: 4px 0 8px; font-size: 13.5px; }
.fx-why { margin: 4px 0 8px; font-size: 14px; padding: 8px 10px; border-left: 3px solid var(--brand); background: var(--info-bg); border-radius: var(--radius-sm); }
.fx-auto { margin: 8px 0 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--info-bg); font-size: 13.5px; }
.fx-steps { margin: 8px 0 10px; padding-left: 22px; line-height: 1.55; }
.fx-steps li { margin: 3px 0; }
.fx-note { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--warning); background: var(--warning-bg); border-radius: 4px; font-size: 13.5px; }
.fx-links { margin: 8px 0; padding-left: 18px; font-size: 13.5px; }
.fx-links li { margin: 2px 0; }
.fx-recs { margin: 8px 0 4px; }
.fx-recs table { width: 100%; border-collapse: collapse; }
.fx-recs th, .fx-recs td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fx-recs code { font-family: var(--font-mono); font-size: 12.5px; word-break: break-all; }
.copy-btn { border: 1px solid var(--line); background: var(--surface); color: var(--link); font: inherit; font-size: 12px; border-radius: 6px; padding: 1px 8px; cursor: pointer; margin-left: 4px; }
.copy-btn:hover { border-color: var(--series-1); }
.fx-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 12px; }
.fx-msg { font-size: 13px; color: var(--text-2); flex: 1 1 220px; }
.fx-link { font-weight: 600; }
.fix-page { max-width: 920px; }
.fix-page .fx-detail { color: var(--text-2); margin-top: 0; }
.fx-title { font: 700 17px/1.35 var(--font-head); margin: 14px 0 6px; }
.help-form { max-width: 720px; }
.help-form .fld { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.help-form .fld > span, .help-form legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.help-form .fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help-form input:not([type="radio"]), .help-form textarea, .help-form select {
  font: inherit; font-size: 14px; color: var(--text); background: var(--fill-2); width: 100%; min-width: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 12px;
}
.help-form input[type="datetime-local"] { width: auto; display: inline-block; padding: 5px 8px; }
.help-form input:focus, .help-form textarea:focus, .help-form select:focus { outline: none; background: var(--surface); border-color: var(--series-1); box-shadow: 0 0 0 4px var(--info-bg); }
.help-form .opt { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; margin: 4px 0; }
.help-about { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.help-about > div { margin-top: 4px; }
@media (max-width: 640px) {
  .help-form .fld-row { grid-template-columns: 1fr; }
  .fx-recs thead { display: none; }
  .fx-recs tr { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .fx-recs td { display: block; border: 0; padding: 2px 0; }
  .fx-recs td[data-l]::before { content: attr(data-l); display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
}

/* Chat in Teams */
.teams-btn { display: inline-flex; align-items: center; gap: 6px; }
.teams-btn:not(.primary) .ic { color: #5b5fc7; }
.help-teams { max-width: 720px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.help-teams > div { flex: 1 1 320px; }

/* Monitored services checklist (admin client form, connect page Report settings) */
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 26px; }
.svc-group { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
.svc-group legend { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 0; margin: 0 0 8px; }
.svc-group .check .field-hint { display: block; font-weight: 400; }
.svc-group .check.no-prereq .needs { display: block; font-size: 12.5px; color: var(--warning); margin-top: 2px; }
@media (max-width: 640px) { .svc-grid { grid-template-columns: 1fr; } }
.svc-group .check input:not(:checked) ~ span .needs { display: none; }

/* client settings: expandable blocks - green = configured, gray = not set up */
.blk-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 2px 10px; }
.blk-tools .spacer { flex: 1; }
details.block { padding: 0; overflow: hidden; border-left: 4px solid var(--pending-bg); }
details.block.is-on { border-left-color: var(--good); }
details.block.is-warn { border-left-color: var(--warning); }
details.block.danger { border-left-color: var(--critical-bg); }
details.block > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; min-width: 0; }
details.block > summary::-webkit-details-marker { display: none; }
details.block > summary::after { content: "\203A"; margin-left: auto; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
details.block[open] > summary::after { transform: rotate(90deg); }
details.block > summary:hover { background: var(--surface-2); }
details.block > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.blk-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--axis); flex: none; vertical-align: middle; }
.blk-dot.on, details.block.is-on .blk-dot { background: var(--good); }
details.block.is-warn .blk-dot { background: var(--warning); }
details.block.danger .blk-dot { background: var(--critical); }
.blk-title { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--text); }
.blk-state { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--pending-bg); color: var(--pending); }
details.block.is-on .blk-state { background: var(--good-bg); color: var(--good-text); }
details.block.is-warn .blk-state { background: var(--warning-bg); color: var(--warning-text); }
details.block.danger .blk-state { background: var(--critical-bg); color: var(--critical-text); }
.blk-sum { font-size: 13px; color: var(--muted); min-width: 0; flex: 1 1 260px; overflow-wrap: anywhere; }
.blk-body { padding: 4px 20px 20px; border-top: 1px solid var(--line); }
.blk-body > .form-sub:first-child { margin-top: 14px; }
details.block.fixblk .fix-all { padding-top: 12px; }
/* client connection page panel */
.connect-panel { border-left: 4px solid var(--axis); }
.connect-panel.is-on { border-left-color: var(--good); }
.connect-panel .cp-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.connect-panel .cp-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.connect-panel h3 { margin: 4px 0 6px; }
.connect-panel a { overflow-wrap: anywhere; }
.connect-panel .cp-more { margin-top: 10px; }
.connect-panel .cp-more > summary { cursor: pointer; font-size: 13px; color: var(--link); }
@media (max-width: 640px) { details.block > summary { padding: 14px 16px; } .blk-body { padding: 4px 16px 16px; } }
details.block.advanced > summary::before { content: none; }

/* client settings: grid of big square tiles; the chosen area opens in a full-width panel under its row */
.tile-legend { margin: 6px 2px 12px; }
.tile-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--axis); flex: none; vertical-align: middle; }
.tile-dot.on { background: var(--good); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 16px; min-width: 0;
  border-radius: var(--radius, 16px); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
  box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s, border-color .15s; position: relative; overflow: hidden; }
.tile:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.tile:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.tile .tile-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.tile .tile-dot { width: 16px; height: 16px; }
.tile-state { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--pending-bg); color: var(--pending); white-space: nowrap; }
@media (max-width: 480px) { .tile-state { white-space: normal; text-align: right; } }
.tile-title { font-family: var(--font-head); font-weight: 800; font-size: 18px; line-height: 1.2; margin-top: auto; overflow-wrap: anywhere; }
.tile-sum { font-size: 13px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile.is-on { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.tile.is-on .tile-dot { background: var(--good); }
.tile.is-on .tile-state { background: var(--surface); color: var(--good-text); }
.tile.is-off { background: var(--fill-2); }
.tile.is-warn { background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 45%, transparent); }
.tile.is-warn .tile-dot { background: var(--warning); }
.tile.is-warn .tile-state { background: var(--surface); color: var(--warning-text); }
.tile.is-danger { background: var(--fill-2); }
.tile.is-danger .tile-dot { background: var(--critical); }
.tile.is-danger .tile-state { background: var(--critical-bg); color: var(--critical-text); }
.tile.is-open { border: 2px solid var(--brand); box-shadow: var(--shadow-hover); }
.tile.is-open::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 16px; height: 16px; background: var(--surface); border-left: 2px solid var(--brand); border-top: 2px solid var(--brand); transform: translate(-50%, 60%) rotate(45deg); }
.tile-panel { grid-column: 1 / -1; margin: 0; border-top: 4px solid var(--axis); animation: tp-in .18s ease-out; min-width: 0; }
.tile-panel.is-on { border-top-color: var(--good); }
.tile-panel.is-warn { border-top-color: var(--warning); }
.tile-panel.is-danger { border-top-color: var(--critical); }
.tile-panel .tp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tile-panel .tp-head h3 { margin: 0; }
.tile-panel .tp-head .spacer { flex: 1; }
.tile-panel .fix-all { padding-top: 4px; }
@keyframes tp-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tile, .tile-panel { transition: none; animation: none; } }
@media (max-width: 640px) { .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tile { padding: 12px; gap: 6px; } .tile-title { font-size: 15px; } .tile-sum { font-size: 12px; -webkit-line-clamp: 2; } }
/* three tiles per row (two on a phone); wide tiles keep a fixed, comfortable height */
.tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { aspect-ratio: auto; min-height: 168px; padding: 20px; }
.tile-title { font-size: 20px; }
.tile-sum { font-size: 14px; }
@media (max-width: 640px) { .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile { aspect-ratio: 1 / 1; min-height: 0; padding: 12px; } .tile-title { font-size: 15px; } .tile-sum { font-size: 12px; } }
.tile-group { grid-column: 1 / -1; font: 700 13px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin: 10px 2px -2px; }
.tile-group:first-child { margin-top: 0; }
/* connection page > Report settings: tiles grouped by area */
.settings-tiles .tile-group-h { font: 800 18px var(--font-head); margin: 26px 2px 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.settings-tiles .tile-group-unused { margin-top: 38px; padding-top: 18px; border-top: 1px dashed var(--axis); color: var(--text-2); }
.settings-tiles .tile-grid { margin-bottom: 6px; }
.tile-panel section.card { box-shadow: none; border: 0; padding: 0; margin: 12px 0 0; background: transparent; }
.tile-panel section.card > h3 { display: none; }
.tile-panel .svc-on { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 8px; }
.save-dock { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 12px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-hover); }
.save-dock .spacer { flex: 1; }
/* connection page: connections bar, group connection buttons and the Activate connection dialogs */
.conn-chip { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--font-body); padding: 3px 10px; border-radius: 999px; background: var(--pending-bg); color: var(--pending); white-space: nowrap; }
.conn-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--axis); }
.conn-chip.on { background: var(--good-bg); color: var(--good-text); }
.conn-chip.on::before { background: var(--good); }
.settings-tiles .tile-group-h .spacer { flex: 1; }
.settings-tiles .tile-group-h { align-items: center; }
.conn-bar .conn-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.conn-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--fill-2); min-width: 0; }
.conn-item.on { background: var(--good-bg); }
.conn-item .spacer { flex: 1; }
.conn-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
dialog.conn-dlg { padding: 0; border: 0; border-radius: 16px; width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(14, 26, 48, .35); }
dialog.conn-dlg::backdrop { background: rgba(14, 26, 48, .45); }
dialog.conn-dlg .dlg-in { padding: 22px 24px; }
dialog.conn-dlg .dlg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
dialog.conn-dlg .dlg-head h3 { margin: 0; flex: 1; font-size: 20px; }
dialog.conn-dlg h4 { margin: 16px 0 6px; font-size: 14px; }
dialog.conn-dlg .dlg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
dialog.conn-dlg .dlg-action { margin-top: 16px; }
dialog.conn-dlg .dlg-action > .btn { font-size: 16px; padding: 12px 20px; }
dialog.conn-dlg section.card { box-shadow: none; border: 0; padding: 0; margin: 0; background: transparent; }
dialog.conn-dlg section.card > h3 { display: none; }
dialog.conn-dlg .dlg-manage { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .conn-bar .conn-list, dialog.conn-dlg .dlg-cols { grid-template-columns: 1fr; } dialog.conn-dlg .dlg-in { padding: 18px 16px; } }
.conn-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.conn-item .ci-txt { display: flex; flex-direction: column; min-width: 0; }
.tile-panel .svc-on.is-locked { opacity: .75; }
.tile-panel .svc-on.is-locked input { cursor: not-allowed; }
/* Sign in with Zoho / Google set-up form (signin-apps.js) - admin Settings and the connection page dialog */
.sia { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sia-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.sia-copy { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 6px; }
.sia-copy .sia-k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sia-copy input, .sia-copy textarea { width: 100%; min-width: 0; box-sizing: border-box; font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--text); resize: vertical; }
.sia-form { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.sia-form input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.sia-how summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.sia-how[open] summary { margin-bottom: 8px; }
.sia-msg.sia-err { color: var(--critical-text, #b3261e); font-weight: 600; }
.sia .banner { margin: 0; }
.sia-ok { background: var(--good-bg); }
.sia-pair h4 { margin: 0 0 6px; }
@media (max-width: 640px) { .sia-copy { grid-template-columns: minmax(0, 1fr) auto; } .sia-copy .sia-k { grid-column: 1 / -1; } }
.sia-pair { display: flex; flex-direction: column; gap: 22px; } .sia-pair > div + div { border-top: 1px solid var(--line); padding-top: 16px; }
.sia-form input { width: 100%; box-sizing: border-box; }
.zoho-steps { display: flex; flex-direction: column; gap: 10px; padding-left: 20px; margin: 8px 0 12px; } .zoho-steps .btn { margin: 0 4px; }
.st-tiles .tile-group { margin: 16px 2px 10px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.connect .admin-form input[type="email"], .connect .admin-form input[type="text"] { width: 100%; box-sizing: border-box; }

/* Google connect walk-through */
.g-check { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; }
.g-steps { margin: 4px 0 14px; }
.g-faq { margin: 12px 0 0; font-size: 14px; line-height: 1.5; }
.g-faq dt { font-weight: 700; margin-top: 14px; }
.g-faq dt:first-child { margin-top: 0; }
.g-faq dd { margin: 4px 0 0; }
.g-faq .sia-steps { margin-top: 8px; }
.g-faq .copy-row { margin-top: 6px; }

/* the client's own logo, top right (IT Unlocked's stays top left) */
.client-brand { display: inline-flex; align-items: center; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--line, rgba(127,127,127,.25)); }
.client-brand[hidden] { display: none; }
.client-brand img { display: block; height: 52px; max-width: 220px; width: auto; object-fit: contain; border-radius: 6px; }   /* client logo top right (was 32 px) */
@media (max-width: 720px) { .client-brand { padding-left: 8px; } .client-brand img { height: 34px; max-width: 92px; } }
/* app.js fitLogo trims the empty border; a logo with its own colored background is a rounded tile; in the dark theme
   every logo sits on a white chip, so dark lettering and white boxes both look intended */
.client-brand img.logo-tile { border-radius: 8px; }
:root[data-theme="dark"] .client-brand img { background: #fff; padding: 4px 8px; border-radius: 8px; box-sizing: content-box; height: 44px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .client-brand img { background: #fff; padding: 4px 8px; border-radius: 8px; box-sizing: content-box; height: 44px; } }
@media (max-width: 720px) { :root[data-theme="dark"] .client-brand img { height: 28px; padding: 3px 6px; } }

/* private clients ("Do NOT allow IT Unlocked to see your monitoring information") */
.private-pill { background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; }
.private-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.private-list li { display: flex; align-items: center; gap: 8px; }

/* DNS host (GoDaddy) on DNS fixes and Settings > E-mail security & DNS */
.fx-dns { margin-top: 14px; }
.fx-dns .fx-auto { margin-bottom: 8px; }
.fx-gd-how { margin: 8px 0; }
.fx-gd-how > summary { cursor: pointer; }
.fx-gd-form { margin-top: 8px; }
.dns-host { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.dns-host h4 { margin: 0 0 6px; }

/* =====================================================================================================
   Redesign (Nov 2026): floating sidebar, light gray page, rounded white cards in a three-column grid,
   focused detail panels. Data and behavior are unchanged - this layer only restyles and re-arranges.
   Color = meaning: green healthy, amber review, red critical, neutral information, blue actions / brand.
   ===================================================================================================== */
:root {
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-head: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --brand: #1464f4; --brand-primary: #1464f4; --brand-soft: #e4edff; --link: #1557d6;
  --page: #eef1f6; --surface: #ffffff; --surface-2: #f6f8fb; --fill-2: #f1f4f9;
  --text: #0f172a; --text-2: #3f4b60; --muted: #64708a; --line: #e4e9f1; --border: #e4e9f1; --grid: #e9eef5;
  --good: #16a34a; --good-text: #15803d; --warning: #f59e0b; --warning-text: #b45309; --critical: #dc2626; --critical-text: #b91c1c;
  --radius: 20px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, .05), 0 14px 32px rgba(15, 23, 42, .10);
  --side-bg: rgba(255, 255, 255, .74); --side-edge: rgba(255, 255, 255, .95);
  --side-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 24px 56px rgba(15, 23, 42, .10), 0 2px 8px rgba(15, 23, 42, .05);
  --field: #ffffff; --nav-on: #e2ecff;
  --tone-good: #16a34a; --tone-warn: #e8930c; --tone-bad: #dc2626; --tone-neutral: #0f172a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0b1220; --surface: #121b2c; --surface-2: #162034; --fill-2: #18233a; --line: #243149; --border: #243149;
    --text: #e8eef8; --text-2: #b6c2d6; --muted: #8e9bb3;
    --side-bg: rgba(20, 30, 48, .78); --side-edge: rgba(255, 255, 255, .08);
    --side-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 56px rgba(0, 0, 0, .45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-hover: 0 0 0 1px #34476a, 0 14px 32px rgba(0, 0, 0, .4);
    --field: #162034; --nav-on: #1b2d52; --tone-good: #34c26a; --tone-warn: #f6b23c; --tone-bad: #f26d6d; --tone-neutral: #e8eef8;
  }
}
:root[data-theme="dark"] {
  --page: #0b1220; --surface: #121b2c; --surface-2: #162034; --fill-2: #18233a; --line: #243149; --border: #243149;
  --text: #e8eef8; --text-2: #b6c2d6; --muted: #8e9bb3;
  --side-bg: rgba(20, 30, 48, .78); --side-edge: rgba(255, 255, 255, .08);
  --side-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 56px rgba(0, 0, 0, .45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-hover: 0 0 0 1px #34476a, 0 14px 32px rgba(0, 0, 0, .4);
  --field: #162034; --nav-on: #1b2d52; --tone-good: #34c26a; --tone-warn: #f6b23c; --tone-bad: #f26d6d; --tone-neutral: #e8eef8;
}
body { font-size: 15px; background: var(--page); }
h1, h2, h3 { letter-spacing: -.015em; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 296px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 24px; align-self: start; height: calc(100vh - 48px); margin: 24px 0 24px 24px;
  display: flex; flex-direction: column; gap: 4px; padding: 26px 18px 18px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--side-bg); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--side-edge); border-radius: 34px; box-shadow: var(--side-shadow); z-index: 40;
}
.side-brand { display: flex; align-items: center; gap: 14px; padding: 2px 10px 22px; color: var(--text); text-decoration: none !important; }
.side-logo { height: 52px; width: auto; flex: none; }
.side-title { font: 700 21px/1.15 var(--font-head); letter-spacing: -.02em; }
.side-client { padding: 0 6px 18px; }
.side-label { display: block; font-size: 14.5px; color: var(--muted); margin: 0 0 8px 4px; }
.side .picker-wrap { position: relative; display: block; }
.side .picker-wrap::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border: solid var(--text-2); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.side .picker {
  width: 100%; max-width: none !important; height: 52px; padding: 0 44px 0 18px; appearance: none; -webkit-appearance: none;
  font: 500 16px var(--font-body); color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .04); cursor: pointer; text-overflow: ellipsis;
}
.side .picker[hidden] { display: none; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 13px 18px; border-radius: 16px; border: 0; background: none;
  color: var(--text-2); font: 500 16.5px var(--font-body); text-align: left; text-decoration: none !important; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.side-link:hover { background: rgba(20, 100, 244, .06); color: var(--text); }
.side-link.on { background: var(--nav-on); color: var(--brand); font-weight: 600; }
.side-link .si, .side-admin .si { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-link[hidden] { display: none; }
.side-admin { margin-top: 4px; }
.side-admin .caret { margin-left: auto; }
.side-admin .menu { position: static; min-width: 0; margin: 2px 0 6px 30px; padding: 4px; display: none; opacity: 1; transform: none; pointer-events: auto; box-shadow: none; border: 0; background: transparent; }
.side-admin.open .menu { display: block; }
.side-admin .menu a { font-size: 14.5px; color: var(--text-2); padding: 8px 12px; }
.side-admin .menu a:nth-child(3) { border-bottom: 0; margin-bottom: 0; }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.side-foot::before { content: ""; display: block; height: 1px; background: var(--line); margin: 0 10px 10px; }
.adv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; color: var(--text-2); font-size: 16px; }
.switch { position: relative; width: 52px; height: 30px; flex: none; border-radius: 999px; border: 1px solid var(--line); background: var(--fill-2); cursor: pointer; padding: 0; transition: background-color .18s ease; }
.switch span { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .25); transition: transform .18s ease; }
.switch[aria-checked="true"] { background: var(--brand); border-color: var(--brand); }
.switch[aria-checked="true"] span { transform: translateX(22px); }
.side-user { position: relative; border-top: 1px solid var(--line); margin: 10px 4px 0; padding-top: 14px; }
.user-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px; border: 0; background: none; border-radius: 16px; color: var(--text); cursor: pointer; text-align: left; }
.user-btn:hover { background: rgba(20, 100, 244, .06); }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font: 700 16px var(--font-head); }
.user-text { min-width: 0; flex: 1; }
.side .user { display: block; margin: 0; max-width: none; font: 600 15px var(--font-body); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text small { display: block; color: var(--muted); font-size: 13px; }
.chev, .oc-chev { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.user-menu { position: absolute; left: 6px; right: 6px; bottom: calc(100% + 6px); padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(15, 23, 42, .16); }
.user-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.user-menu a:hover, .user-menu a:focus { background: var(--fill-2); outline: none; }
.user-menu a[hidden] { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; padding: 24px 32px 0 28px; }
.mainbar { display: flex; align-items: center; gap: 14px; min-height: 56px; }
.search { position: relative; flex: 1; min-width: 0; max-width: 860px; }
.search-ic { position: absolute; left: 20px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input {
  width: 100%; min-width: 0; height: 54px; padding: 0 20px 0 54px; font: 400 16.5px var(--font-body); color: var(--text);
  background: var(--side-bg); border: 1px solid var(--side-edge); border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 6px 18px rgba(15, 23, 42, .06); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(20, 100, 244, .14); }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 50; max-height: 60vh; overflow: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 48px rgba(15, 23, 42, .16); }
.sr { display: flex; gap: 12px; align-items: baseline; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none !important; }
.sr.on, .sr:hover { background: var(--fill-2); }
.sr-k { flex: none; min-width: 64px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sr-l small { display: block; color: var(--muted); font-size: 13px; }
.sr-none { margin: 0; padding: 12px; color: var(--muted); }
.mainbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; transition: background-color .15s ease, transform .1s ease; }
.icon-btn:hover { background: rgba(15, 23, 42, .05); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell .dot { position: absolute; top: 9px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--critical); box-shadow: 0 0 0 2px var(--page); }
.bell .dot[hidden] { display: none; }
.nav-toggle { display: none; }
.main .wrap { max-width: none; width: 100%; margin: 0; padding: 26px 0 40px; flex: 1; }
.main .site-foot { max-width: none; margin-top: 0; }

/* ---------- page head ---------- */
.page-head { align-items: flex-end; margin: 4px 0 22px; }
.hero-title, .client-head .hero-title { font: 700 clamp(30px, 3.2vw, 40px)/1.1 var(--font-head); letter-spacing: -.03em; }
.hero-sub { font-size: 16.5px; color: var(--muted); gap: 4px 14px; }
.hero-sub span + span::before { content: "\00b7"; margin-right: 14px; color: var(--muted); }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { border-radius: 14px; font-weight: 600; transition: transform .1s ease, box-shadow .15s ease, filter .15s ease, border-color .15s ease; }
.btn.primary { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; font-size: 16px; box-shadow: 0 6px 16px rgba(20, 100, 244, .28); }
.btn:active { transform: scale(.98); }
.btn .gi.sm { width: 20px; height: 20px; stroke-width: 2.2; }

/* ---------- overview cards ---------- */
.ogrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ocard {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 236px;
  padding: 24px 26px 22px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ocard:hover, .ocard:focus-within { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.oc-title { margin: 0 0 14px; font: 600 19px/1.3 var(--font-head); letter-spacing: -.01em; }
.oc-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text); text-decoration: none !important; }
.oc-link .gi { margin-right: 10px; }
.oc-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* the whole card opens the detail */
.oc-link:focus-visible { outline: none; }
.ocard:has(.oc-link:focus-visible) { outline: 3px solid var(--brand); outline-offset: 3px; }
.oc-body { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.oc-body a, .oc-body button { position: relative; z-index: 1; }
.oc-big { font: 700 clamp(46px, 4.4vw, 66px)/1 var(--font-head); letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.oc-big .unit { font-size: .56em; letter-spacing: -.02em; margin-left: 4px; }
.good { color: var(--tone-good); } .warn { color: var(--tone-warn); } .bad { color: var(--tone-bad); } .neutral { color: var(--tone-neutral); }
.oc-sub { margin: 0; font-size: 15.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oc-sub.warn { color: var(--tone-warn); font-weight: 500; }
.oc-sub.bad { color: var(--tone-bad); font-weight: 500; }
.oc-label { margin: 0; font-size: 17px; color: var(--text); font-weight: 500; }
.oc-stat { margin: 4px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 17px; }
.oc-stat b { font-weight: 600; }
.oc-empty { margin: auto 0; display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; }
.gi { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gi.sm { width: 22px; height: 22px; color: var(--muted); }
.gi.lg { width: 58px; height: 58px; stroke-width: 1.4; color: var(--brand); }
.oc-iconval { display: flex; align-items: center; gap: 20px; }
.oc-ringrow { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ring-box { position: relative; width: 148px; height: 148px; flex: none; }
.ring { width: 100%; height: 100%; }
.ring .rt { fill: none; stroke: var(--grid); stroke-width: 11; }
.ring .rv { fill: none; stroke-width: 11; stroke-linecap: round; stroke: currentColor; transition: stroke-dasharray .6s ease; }
.ring-v { position: absolute; inset: 0; display: grid; place-items: center; font: 700 26px var(--font-head); letter-spacing: -.02em; color: var(--text); }
.oc-btn { align-self: flex-start; margin-top: auto; }
.oc-list .oc-body { gap: 4px; }
.svc-list { list-style: none; margin: -4px 0 0; padding: 0; }
.svc-list li a { display: flex; align-items: center; gap: 14px; padding: 8px 2px; color: var(--text); text-decoration: none !important; border-radius: 10px; font-size: 16px; }
.svc-list li a:hover { color: var(--brand); }
.svc-list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-list .nm small { color: var(--muted); font-size: 13px; }
.svc-waiting { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.svc-waiting a { color: var(--muted); }
.svc-waiting a:hover { color: var(--brand); }
.svc-list .gi { color: var(--brand); }
.svc-list .tb { font: 700 12px var(--font-head); border-radius: 999px; padding: 0 8px; line-height: 20px; background: var(--warning-bg); color: var(--warning-text); }
.svc-list .tb.Red { background: var(--critical-bg); color: var(--critical-text); }
.oc-count { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; }
.oc-count b { font: 700 34px var(--font-head); letter-spacing: -.02em; }
.oc-count small { color: var(--muted); font-size: 14px; }
.oc-items { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.oc-items li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text); }
.oc-items li .ic { margin-top: 3px; flex: none; }
.oc-items li span { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oc-items li small { display: block; color: var(--muted); font-size: 13px; }
.oc-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 4px 0; }
.oc-okdot, .oc-cal { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px; }
.oc-okdot { background: var(--good-bg); }
.oc-cal { background: var(--fill-2); color: var(--muted); }
.oc-cal .gi { width: 32px; height: 32px; }
.oc-strong { margin: 0; font-size: 18px; font-weight: 600; color: var(--text); }
.oc-center .oc-sub { justify-content: center; }
.oc-links { margin: auto 0 0; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 16px; font-weight: 500; }
.oc-links.center { justify-content: center; }
.adv-sec { margin-top: 8px; }
.adv-sec .section-title { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.svc-card { min-height: 0; }
.svc-kpis { margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 16px; }
.svc-kpis dt { font-size: 12.5px; color: var(--muted); }
.svc-kpis dd { margin: 2px 0 0; font: 700 20px var(--font-head); letter-spacing: -.02em; }

/* skeleton while a client loads - same footprint as the cards, so nothing jumps */
.sk { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--fill-2) 0%, var(--grid) 50%, var(--fill-2) 100%); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
.sk-h1 { width: 220px; height: 38px; margin-bottom: 10px; } .sk-line { width: 60%; height: 16px; } .sk-line.short { width: 40%; } .sk-big { width: 45%; height: 60px; margin: 18px 0; }
.sk-card { min-height: 236px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- cards everywhere (admin screens, panels) follow the same system ---------- */
.card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card h3 { font: 600 17px/1.3 var(--font-head); }
.kpi .l { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13.5px; }
.kpi .v { font-weight: 700; }
.section-title, h2 { font-weight: 600; }
.pill { border-radius: 999px; }
.tbl-wrap, .matrix-wrap { border-radius: 16px; }
.hero { padding: 6px 0 4px; }
.hero .eyebrow { display: none; }

/* ---------- focused detail panel ---------- */
#app > #sheetHost { animation: none; }
.sheet-wrap { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fadeIn .2s ease both; }
.sheet {
  position: absolute; top: 20px; right: 20px; bottom: 20px; width: min(1100px, calc(100vw - 360px)); min-width: min(720px, calc(100vw - 40px));
  display: flex; flex-direction: column; background: var(--page); border-radius: 28px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28), 0 0 0 1px rgba(255, 255, 255, .5) inset; animation: sheetIn .24s cubic-bezier(.2, .8, .2, 1) both;
}
.sheet-wrap.no-anim .sheet, .sheet-wrap.no-anim .sheet-backdrop { animation: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 16px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sheet-ttl { flex: 1; min-width: 0; }
.sheet-ttl h2 { margin: 0; font: 700 22px/1.2 var(--font-head); letter-spacing: -.02em; }
.sheet-ttl h2:focus { outline: none; }
.sheet-ttl p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 32px; }
.sheet-body > .panel:first-child, .sheet-body > .card:first-child { margin-top: 0; }
body.sheet-open { overflow: hidden; }
@keyframes sheetIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Advanced mode: technical detail (all metrics) appears only when switched on */
body:not(.adv-on) .csec details.metrics { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1320px) { .shell { grid-template-columns: 272px minmax(0, 1fr); } .ocard { padding: 22px; } }
@media (max-width: 1180px) {
  .ogrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet { width: calc(100vw - 40px); min-width: 0; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 12px; left: 12px; bottom: 12px; height: auto; width: min(320px, calc(100vw - 24px)); margin: 0; transform: translateX(calc(-100% - 24px)); transition: transform .24s cubic-bezier(.2, .8, .2, 1); background: var(--surface); }
  body.nav-open .side { transform: none; }
  .side-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(15, 23, 42, .3); }
  .side-scrim[hidden] { display: none; }
  .nav-toggle { display: inline-grid; }
  .main { padding: 14px 18px 0; }
}
@media (max-width: 640px) {
  .ogrid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ocard { min-height: 0; padding: 20px; }
  .main { padding: 10px 12px 0; }
  .main .wrap { padding: 16px 0 32px; }
  .mainbar { gap: 6px; }
  .search input { height: 46px; font-size: 16px; }
  .page-head { align-items: flex-start; }
  .sheet { inset: 0; width: 100%; border-radius: 0; }
  .sheet-body { padding: 14px 14px 28px; }
  .ring-box { width: 120px; height: 120px; }
  .head-actions .btn:not(.primary) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ocard, .ocard:hover, .ocard:focus-within { transform: none; transition: none; }
  .sheet, .sheet-backdrop, .sk { animation: none; }
  .side { transition: none; }
}
/* refinements after visual comparison */
.search-ic { z-index: 1; }
.btn.primary .gi.sm { color: currentColor; }
.oc-ringrow { flex-wrap: nowrap; }
.oc-ringrow > div:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ring-box { width: 140px; height: 140px; }
.oc-iconval .oc-big { font-size: clamp(38px, 3.6vw, 56px); }
.oc-iconval > div { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1320px) { .ring-box { width: 120px; height: 120px; } .ring-v { font-size: 22px; } }
.oc-ringrow .oc-sub { flex-wrap: nowrap; align-items: flex-start; }
.oc-ringrow .oc-sub .ic { margin-top: 3px; flex: none; }
/* alerts page summary (was unstyled) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 6px 0 18px; }
.stat { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 16px 18px; }
.stat-value { font: 700 30px/1.1 var(--font-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 4px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
/* Business Apps: Zoho, monday.com, HubSpot, QuickBooks Online connections (dashboard area + Settings tile) */
.biz-host { margin-top: 12px; }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.biz-wide { grid-column: 1 / -1; }
.biz-app { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); min-width: 0; }
.biz-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.biz-app .form-actions { margin-top: 8px; flex-wrap: wrap; }
.biz-app .fx-steps { margin: 4px 0 6px; }

/* Two-factor sign-in (/mfa/ and the connection page) */
.mfa-card { max-width: 640px; }
.mfa-steps { padding-left: 20px; margin: 8px 0 0; }
.mfa-steps > li { margin: 0 0 18px; line-height: 1.5; }
.mfa-qr { width: 200px; max-width: 70vw; margin: 12px 0; padding: 8px; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.mfa-qr svg { display: block; width: 100%; height: auto; }
.mfa-secret { font-size: 15px; letter-spacing: .06em; word-break: break-all; }
.mfa-code { font-size: 22px; letter-spacing: .3em; max-width: 220px; font-variant-numeric: tabular-nums; }
.mfa-backup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; list-style: none; padding: 12px 16px; margin: 12px 0; background: var(--surface-2); border-radius: var(--radius-sm); max-width: 360px; }
.mfa-backup code { font-size: 15px; letter-spacing: .04em; }
.mfa-ok { color: var(--good); }
.mfa-card .link-btn { background: none; border: 0; padding: 0; color: var(--brand-primary); cursor: pointer; font: inherit; text-decoration: underline; }
@media print { .topbar, .site-foot, .form-actions, .check, .lead { display: none !important; } }

/* Calls are charged (IT Unlocked standard rate) - Help page notice and confirmation (2026-11-05) */
.help-rate { max-width: 720px; border-left: 4px solid var(--link); font-size: 14.5px; }
.help-accept { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; font-size: 14px; line-height: 1.45; }
.help-form .help-accept input[type="checkbox"] { width: 18px; height: 18px; padding: 0; margin: 2px 0 0; flex: none; }
/* Teams chat for non-support clients: the button stays, a click shows why */
.teams-btn[data-chat-locked] { opacity: .75; }
.help-teams .chat-msg:empty { display: none; }

/* ---------- VIGIL by IT Unlocked (2026-11-06): product name next to the IT Unlocked logo ---------- */
.brand-sub.brand-vigil { font: 800 15px/1 var(--font-body); color: var(--text); letter-spacing: .14em; }
.side-title { display: flex; flex-direction: column; gap: 3px; }
.side-title .vigil-name { font: 800 24px/1 var(--font-head); letter-spacing: .1em; }
.side-title .vigil-by { font: 600 12.5px/1.2 var(--font-body); color: var(--muted); letter-spacing: .02em; }
.site-foot .vigil-foot { color: var(--text-2); letter-spacing: .08em; }
.site-foot span { text-align: center; }
.vigil-lockup { display: inline-block; text-align: center; margin: 4px 0 18px; max-width: 100%; }
.vigil-lockup img { display: block; width: min(420px, 100%); height: auto; margin: 0 auto; }
.vigil-lockup .logo-dark { display: none; }
:root[data-theme="dark"] .vigil-lockup .logo-light { display: none; }
:root[data-theme="dark"] .vigil-lockup .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .vigil-lockup .logo-light { display: none; }
  :root:not([data-theme="light"]) .vigil-lockup .logo-dark { display: block; }
}
.vigil-tagline { margin: 10px 0 0; font-weight: 600; color: var(--text); }
.vigil-tagline small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 2px; }
.topbar .brand-sub.brand-vigil { display: inline-block !important; }   /* the product name stays visible on phones */
/* VIGIL logo top left (light / dark) - sidebar and page header; stays visible on phones */
.side-logo.vigil-logo { height: 60px; width: auto; }
.side-logo.vigil-logo.logo-dark { display: none; }
:root[data-theme="dark"] .side-logo.vigil-logo.logo-light { display: none; }
:root[data-theme="dark"] .side-logo.vigil-logo.logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .side-logo.vigil-logo.logo-light { display: none; }
  :root:not([data-theme="light"]) .side-logo.vigil-logo.logo-dark { display: block; }
}
.brand-logo.vigil-top { height: 36px; }
@media (max-width: 640px) {
  .brand-logo.vigil-top.logo-light { display: block !important; height: 32px; }
  .brand-logo.vigil-top.logo-dark { display: none !important; }
  :root[data-theme="dark"] .brand-logo.vigil-top.logo-light { display: none !important; }
  :root[data-theme="dark"] .brand-logo.vigil-top.logo-dark { display: block !important; height: 32px; }
}
@media (max-width: 640px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo.vigil-top.logo-light { display: none !important; }
  :root:not([data-theme="light"]) .brand-logo.vigil-top.logo-dark { display: block !important; height: 32px; }
}
/* Settings = the one place for every component: the client's settings page (connect.js ?embed=1) inside the tab */
.settings-one .settings-note { margin: 0 0 10px; }
.settings-one .settings-note p { margin: 0; }
.settings-embed { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.settings-frame { display: block; width: 100%; height: calc(100vh - 210px); min-height: 560px; border: 0; background: transparent; }
@media (max-width: 700px) { .settings-frame { height: calc(100vh - 150px); min-height: 480px; } }
.settings-one .settings-links { margin: 12px 0; }
/* every area page ends with one button to its settings */
.settings-jump { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.settings-jump h3 { margin: 0 0 2px; }
.settings-jump p { margin: 0; }

/* ---------- "i" next to every tile title: plain-English what / why on hover (info.js) ---------- */
.info-i { position: relative; z-index: 2; display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; margin: 0 0 0 7px; padding: 0;
  border: 1.5px solid currentColor; border-radius: 50%; color: var(--brand); background: var(--surface); cursor: help; vertical-align: middle;
  font: 800 10.5px/1 Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; text-transform: none; letter-spacing: 0; transition: background .15s, color .15s; }
.info-i::before { content: ""; position: absolute; inset: -9px; }            /* bigger touch target than it looks */
.info-i:hover, .info-i.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.info-i:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.oc-title { display: flex; align-items: center; }
.oc-title .oc-link { flex: 0 1 auto; }
.oc-title .oc-chev { margin-left: auto; }
.kpi .l .info-i, .tile .label .info-i, .ga-kpi dt .info-i { margin-left: 2px; }
.tile-title .info-i { margin-left: 6px; }
.info-pop { position: fixed; z-index: 60; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px 11px; box-shadow: 0 12px 32px rgba(8, 16, 32, .22); font-size: 14px; line-height: 1.5; text-align: left; animation: ip-in .12s ease-out; }
.info-pop::before { content: ""; position: absolute; top: -7px; left: calc(var(--arrow, 50%) - 7px); width: 12px; height: 12px; background: inherit;
  border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.info-pop.up::before { top: auto; bottom: -7px; transform: rotate(225deg); }
.info-pop p { margin: 0 0 8px; } .info-pop p:last-child { margin-bottom: 0; }
.info-pop .ip-t { font: 700 15px/1.3 var(--font-head); margin-bottom: 9px; }
.info-pop .ip-l { margin: 0 0 1px; font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
@keyframes ip-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .info-pop { animation: none; } }

/* a finding opened from an e-mail link (#/client/<id>/<check>/finding/<key>) */
li.fflash { animation: fflash 3s ease-out 1; border-radius: 10px; }
@keyframes fflash { 0%, 35% { background: color-mix(in srgb, var(--brand) 16%, transparent); box-shadow: 0 0 0 2px var(--brand); } 100% { background: transparent; box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { li.fflash { animation: none; box-shadow: 0 0 0 2px var(--brand); } }

/* "F" feedback button, top right next to the client logo - hover shows "Provide feedback on VIGIL" */
.fb-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; text-decoration: none !important;
  border: 2px solid var(--brand); background: var(--surface); color: var(--brand); font: 800 15px/1 var(--font-head); }
.fb-btn:hover, .fb-btn:focus-visible { background: var(--brand); color: #fff; }
.fb-btn[hidden] { display: none; }
.fb-tip { position: absolute; top: calc(100% + 10px); right: -6px; z-index: 40; white-space: nowrap; pointer-events: none;
  background: var(--text); color: var(--surface); font: 600 13px/1 var(--font-body, Inter, sans-serif); padding: 8px 11px; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(8, 16, 32, .22); opacity: 0; transform: translateY(-3px); transition: opacity .12s, transform .12s; }
.fb-tip::before { content: ""; position: absolute; top: -5px; right: 17px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); }
.fb-btn:hover .fb-tip, .fb-btn:focus-visible .fb-tip { opacity: 1; transform: none; }
@media (hover: none) { .fb-tip { display: none; } }

/* addresses and portal names turned into links by linkify.js */
a.auto-link { overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 2px; }

/* "R" (request a new feature) sits left of "F"; the right-most tooltip stays right-aligned, the "R" one too (same width class) */
#featureLink + #feedbackLink { margin-left: 2px; }
@media (max-width: 640px) {   /* phone: room for search, bell, R, F and the client logo */
  .mainbar-actions { gap: 6px; }
  .mainbar-actions .icon-btn { width: 32px; height: 32px; }
  .fb-btn { font-size: 14px; border-width: 1.5px; }
  .client-brand { padding-left: 8px; margin-left: 0; }
}
@media (max-width: 380px) {   /* small phones (iPhone SE): keep the search box usable */
  .mainbar-actions { gap: 4px; }
  .mainbar-actions .icon-btn { width: 30px; height: 30px; }
  .client-brand img { max-width: 64px; height: 28px; }
}

/* Notifications switch (top right, live-alerts.js): a small on / off switch with a bell */
.notify-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; height: 46px; padding: 0 6px; border: 0; border-radius: 23px; background: transparent; color: var(--text-2); cursor: pointer; }
.notify-btn:hover { background: rgba(15, 23, 42, .05); }
.notify-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.notify-btn[hidden] { display: none; }
.nb-bell { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nb-track { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--axis, #c4cddb); transition: background-color .15s; }
.nb-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.notify-btn.is-on { color: var(--brand); }
.notify-btn.is-on .nb-track { background: var(--brand); }
.notify-btn.is-on .nb-knob { transform: translateX(16px); }
.notify-btn:hover .fb-tip, .notify-btn:focus-visible .fb-tip { opacity: 1; transform: none; }
@media (max-width: 640px) { .notify-btn { height: 32px; padding: 0 2px; } .nb-bell { display: none; } .nb-track { width: 32px; height: 18px; } .nb-knob { width: 12px; height: 12px; } .notify-btn.is-on .nb-knob { transform: translateX(14px); } }
@media (prefers-reduced-motion: reduce) { .nb-track, .nb-knob { transition: none; } }

/* live alert pop-ups, bottom right (phones: across the bottom) */
.live-stack { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.live-toast { pointer-events: auto; position: relative; display: grid; gap: 3px; padding: 12px 40px 12px 16px; border-radius: 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-left: 5px solid var(--info); box-shadow: 0 10px 30px rgba(8, 16, 32, .18); text-decoration: none !important; animation: lt-in .2s ease-out; }
a.live-toast:hover { box-shadow: 0 12px 34px rgba(8, 16, 32, .26); }
.live-toast.lt-red, .live-toast.lt-error { border-left-color: var(--critical); }
.live-toast.lt-amber { border-left-color: var(--warning); }
.live-toast.lt-green { border-left-color: var(--good); }
.lt-sev { font: 700 11px/1.2 var(--font-body, Inter, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: var(--info); }
.lt-red .lt-sev, .lt-error .lt-sev { color: var(--critical-text); }
.lt-amber .lt-sev { color: var(--warning-text); }
.lt-green .lt-sev { color: var(--good-text); }
.lt-title { font: 700 15px/1.3 var(--font-head, Inter, sans-serif); }
.lt-body { font-size: 14px; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.lt-act { justify-self: start; margin-top: 6px; border: 0; border-radius: 8px; padding: 7px 12px; background: var(--brand); color: #fff; font: 600 13px/1 var(--font-body, Inter, sans-serif); cursor: pointer; }
.lt-x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; }
.lt-x:hover { background: var(--fill-2); }
.live-toast.lt-out { opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; }
@keyframes lt-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .live-toast { animation: none; } .live-toast.lt-out { transition: none; } }
@media (max-width: 640px) { .live-stack { right: 16px; left: 16px; bottom: 16px; width: auto; } }
@media print { .live-stack { display: none; } }

/* Global outages (Admin > IT Unlocked settings, check view): services by category */
.out-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 18px; margin: 10px 0; }
.out-cat { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 4px; margin: 0; min-width: 0; }
.out-cat legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.out-cat .check-list { flex-direction: column; gap: 2px; }
.out-board { margin-bottom: 14px; }

/* Glossary (glossary.js): dotted-underlined words with a hover card, and the Glossary page */
.gl { display: inline !important; width: auto !important; margin: 0 !important; padding: 0 !important; position: relative; z-index: 2; border-bottom: 1.5px dotted var(--brand); cursor: help; border-radius: 2px; }   /* only under the word itself, even where the line's own spans are styled as blocks; above the "whole card is a link" layer of the overview cards, so the word can be pointed at */
.gl:hover, .gl:focus-visible, .gl.on { background: var(--brand-soft, #e7eefe); border-bottom-style: solid; outline: none; }
.gl-pop { position: fixed; z-index: 1000; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(8, 16, 32, .2); padding: 12px 15px; font-size: 14px; line-height: 1.5; text-align: left; }
.gl-pop p { margin: 0; }
.gp-t { font-weight: 800; font-size: 15px; }
.gp-f { color: var(--text-2); font-size: 13px; margin: 0 0 4px !important; }
.gp-l { font: 700 11px/1.2 var(--font-body, Inter, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin: 8px 0 2px !important; }
.gp-more { display: inline-block; margin-top: 8px; font-weight: 600; }
.gloss-search { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; font: inherit; background: var(--surface); color: var(--text); margin-bottom: 10px; }
.gloss-az { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 8px; }
.gloss-az button, .gloss-az span { min-width: 30px; padding: 5px 0; text-align: center; border: 0; border-radius: 8px; background: none; font: 700 14px/1 var(--font-body, Inter, sans-serif); color: var(--brand); cursor: pointer; }
.gloss-az button:hover { background: var(--brand-soft, #e7eefe); }
.gloss-az .off { color: var(--axis, #c4cddb); cursor: default; }
.gloss-letter { font-size: 20px; color: var(--brand); margin: 18px 0 0; }
.gloss-entry { padding: 12px 0; border-top: 1px solid var(--border); scroll-margin-top: 16px; }
.gloss-entry h3 { margin: 0; font-size: 17px; }
.gloss-entry p { margin: 0; }
.gloss-entry.hit { background: var(--warning-bg, #fff2d3); border-radius: 10px; padding-left: 12px; padding-right: 12px; }
.gloss-see { margin-top: 6px !important; }
.help-gloss { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
@media print { .gl { border-bottom: 0; } .gl-pop { display: none; } }
