:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #1a2230;
  --muted: #64708a;
  --border: #dde3ec;
  --primary: #2563eb;
  --primary-solid: #2563eb;   /* background of buttons and badges with white text on them */
  --primary-text: #ffffff;
  --info-text: #1d4ed8;       /* text on --info-bg */
  --danger: #b91c1c;
  --danger-solid: #b91c1c;    /* background of destructive buttons with white text on them */
  --ok: #15803d;
  --warn: #b45309;
  --ok-bg: #dcfce7;
  --warn-bg: #fef3c7;
  --err-bg: #fee2e2;
  --info-bg: #dbeafe;
  --rail-bg: #0b1f3a;         /* the side bar: midnight navy in both themes (so not redefined for dark) */
  --rail-icon: #9fb3d1;
  --rail-text: #dbe6f5;
  --rail-hover: rgba(255, 255, 255, .07);
  --rail-on: #2fd6f0;         /* the current group and page: the V6 cyan */
  --rail-on-bg: rgba(47, 214, 240, .14);
  --radius: 10px;
  color-scheme: light;
}
/* theme.js sets data-theme on <html>: from the saved choice, else from the OS setting */
:root[data-theme='dark'] {
  --bg: #0f141c;
  --surface: #171e29;
  --surface-2: #1d2532;
  --text: #e4e9f1;
  --muted: #93a0b5;
  --border: #2c3647;
  --primary: #4f8bff;
  --primary-solid: #2563eb;
  --info-text: #8db4ff;
  --danger: #f87171;
  --danger-solid: #b91c1c;
  --ok: #4ade80;
  --warn: #fbbf24;
  --ok-bg: #12381f;
  --warn-bg: #3b2c0a;
  --err-bg: #3f1515;
  --info-bg: #142a4d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow: auto; max-height: 360px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.logo {
  width: 28px; height: 28px; border-radius: 7px; background: var(--primary-solid); color: var(--primary-text);
  display: grid; place-items: center; font-weight: 800;
}
.logo.mark { background: #0b1026; padding: 2px; box-sizing: border-box; }  /* the connector's V mark (as on the sign-in page) */
.logo.mark svg { display: block; width: 100%; height: 100%; }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.conn-picker { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.conn-picker select { min-width: 220px; }
.btn.icon { display: inline-grid; place-items: center; padding: 6px 8px; line-height: 0; }
.btn.icon svg { display: none; }
:root[data-theme-choice='auto'] .icon-auto, :root[data-theme-choice='light'] .icon-sun, :root[data-theme-choice='dark'] .icon-moon { display: block; }

/* the side bar (midnight navy in both themes, like the sign-in page and the reports' header), as in Nexthink Infinity: a rail
   with an icon for every page, a line between groups. Hovering it (after a moment), keyboard focus or its first button opens
   it over the page with the names; it closes when the mouse leaves. At phone width the open bar comes from ☰ instead. */
.layout { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; }
.sidenav { position: sticky; top: 0; align-self: start; height: 100vh; width: 60px; z-index: 60; }
.rail {
  position: absolute; top: 0; left: 0; bottom: 0; width: 60px; overflow: hidden auto; display: flex; flex-direction: column; gap: 2px;
  padding: 10px 8px 24px; background: var(--rail-bg); transition: width .18s ease .3s, box-shadow .18s ease .3s;  /* closes after a pause */
}
.sidenav:hover .rail, .rail:focus-within, .rail.expanded { width: 250px; box-shadow: 10px 0 34px rgba(4, 12, 28, .35); transition-delay: .15s; }
.rail .tab, .rail-expand {
  flex: none; display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 12px; border: 0; border-radius: 9px; background: none;
  color: var(--rail-icon); font: inherit; font-weight: 500; text-align: left; white-space: nowrap; cursor: pointer;
}
.rail .tab svg, .rail-expand svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail .tab span, .rail-expand span { color: var(--rail-text); opacity: 0; transition: opacity .12s ease; }
.sidenav:hover .rail span, .rail:focus-within span, .rail.expanded span { opacity: 1; transition-delay: .2s; }
.rail .tab:hover, .rail-expand:hover { background: var(--rail-hover); color: var(--rail-text); }
.rail .tab.active { background: var(--rail-on-bg); color: var(--rail-on); }
.rail .tab.active span { color: var(--rail-on); font-weight: 650; }
.rail .tab:focus-visible, .rail-expand:focus-visible { outline: 2px solid var(--rail-on); outline-offset: -2px; }
.rail-expand svg { transition: transform .18s ease; }
.rail.expanded .rail-expand svg { transform: rotate(180deg); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
/* a group's line when closed, its name in the same place when open (so nothing moves) */
.nav-group-title {
  position: relative; height: 22px; display: flex; align-items: center; padding: 0 12px; white-space: nowrap;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: transparent; transition: color .12s ease;
}
.nav-group-title::before { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 1px; background: rgba(255, 255, 255, .14); transition: opacity .12s ease; }
.sidenav:hover .nav-group-title, .rail:focus-within .nav-group-title, .rail.expanded .nav-group-title { color: var(--rail-icon); transition-delay: .2s; }
.sidenav:hover .nav-group-title::before, .rail:focus-within .nav-group-title::before, .rail.expanded .nav-group-title::before { opacity: 0; }
.nav-toggle { display: none; align-items: center; gap: 6px; order: -1; }  /* ☰, phone width only: before the brand */
.topbar .brand { flex: 1 1 auto; }

main { max-width: 1280px; width: 100%; margin: 0 auto; padding: 20px 24px 60px; min-width: 0; }
@media (max-width: 900px) {  /* the open bar slides over the page from the ☰ button in the top bar */
  .layout { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: inline-flex; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidenav { position: fixed; top: 0; left: 0; bottom: 0; z-index: 90; width: min(290px, 86vw); height: auto;
    transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .rail, .sidenav:hover .rail, .rail:focus-within { width: 100%; box-shadow: none; }
  .rail span, .nav-group-title { opacity: 1 !important; }
  .nav-group-title { color: var(--rail-icon); }
  .nav-group-title::before, .rail-expand { display: none; }
  body.nav-open .sidenav { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .35); }
  .brand { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .sidenav, .rail, .rail span, .nav-group-title { transition: none !important; } }
.panel { display: none; }
.panel.active { display: block; }
.hidden { display: none !important; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card h2 { font-size: 16px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.card h3 { font-size: 14px; margin: 16px 0 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.step {
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary-solid); color: var(--primary-text);
  display: inline-grid; place-items: center; font-size: 12px;
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 12px 0; }
.grid-form.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-form.inner { margin-top: 10px; }
.grid-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 13px; }
.grid-form label.check { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 8px; }
.span2 { grid-column: 1 / -1; }
details summary { cursor: pointer; color: var(--muted); }
.url-preview { font-size: 12.5px; }
.grid-form .field { display: flex; flex-direction: column; gap: 4px; }
.field > label { font-weight: 550; font-size: 13px; }
.grid-form textarea { width: 100%; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
table.data td.dt-lines { white-space: pre-line; vertical-align: top; }
.grouping-box { margin-top: 12px; }
.grouping-table select { min-width: 180px; }
.share-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; max-height: 260px; overflow: auto; margin-top: 10px; }
.share-list label.check { display: flex; align-items: center; gap: 8px; }
.badge.admin { background: var(--info-bg); color: var(--info-text); border-color: transparent; margin-left: 4px; }

.combo { position: relative; }
.combo input { width: 100%; }
.combo-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 4px; list-style: none;
  max-height: 260px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
}
.combo-menu li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 6px;
  cursor: pointer; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px;
}
.combo-menu li:hover, .combo-menu li.active { background: var(--surface-2); }
.combo-menu li.empty { cursor: default; font-family: inherit; color: var(--muted); }
.combo-menu li.empty:hover { background: none; }
.combo-menu li button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 4px; font: inherit; }
.combo-menu li button:hover { color: var(--danger); background: var(--err-bg); }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 10px; min-width: 0;
}
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 0; border-color: var(--primary); }
input[type=checkbox] { width: 16px; height: 16px; }
.hint { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); font-size: 11px; cursor: help; }

.btn {
  font: inherit; font-weight: 550; padding: 7px 14px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
}
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary-solid); border-color: var(--primary-solid); color: var(--primary-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn { white-space: nowrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.table-wrap { overflow: auto; max-height: 520px; border: 1px solid var(--border); border-radius: 8px; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
table.data td { white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
table.mapping { margin-top: 8px; }
table.mapping td { padding: 5px 8px; }
table.mapping select, table.mapping input { width: 100%; }
table.mapping td.sample { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.mapping tr.mapped td:first-child { font-weight: 650; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.err { background: var(--err-bg); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info-text); border-color: transparent; }

.progress { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; min-width: 100px; }
.progress > div { height: 100%; background: var(--primary-solid); transition: width .3s; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; min-width: 110px; }
.stat b { display: block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 12px; }

.notice { padding: 10px 12px; border-radius: 8px; margin: 10px 0; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.err { background: var(--err-bg); color: var(--danger); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.info { background: var(--info-bg); }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(440px, calc(100vw - 32px)); }
.toast { padding: 10px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(0,0,0,.15); word-break: break-word; }
.toast.err { border-left: 4px solid var(--danger); }
.toast.ok { border-left: 4px solid var(--ok); }

.grid-form label small { font-weight: 400; color: var(--muted); font-size: 12px; }
textarea { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; resize: vertical; }
.pull-box { margin-top: 12px; padding: 10px 14px; border: 1px dashed var(--border); border-radius: 8px; }
.pull-box summary { color: var(--text); }
.pull-box .pull-box { background: var(--surface); }
.contents { display: contents; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input { flex: 1; min-width: 0; }
.input-row .btn { flex: none; }
.fp-list { list-style: none; margin: 8px 0; padding: 0; max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.fp-list li + li { border-top: 1px solid var(--border); }
.fp-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; }
.fp-item:hover, .fp-item:focus-visible { background: var(--surface-2); }
.fp-ico { flex: none; width: 16px; text-align: center; color: var(--muted); }
.fp-empty { padding: 12px; }
.fp-where code { word-break: break-all; }
.fp-new { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.fp-new input { flex: 1; min-width: 0; }
.fo-note code { word-break: break-all; }
.sync-save { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--border); }
.results-panel { margin-top: 14px; }
.picker { margin-top: 8px; }
.picker .row-between { gap: 10px; }
.picker .pk-filter { flex: 1; }
.picker .table-wrap { max-height: 320px; }
.weekdays { display: flex; gap: 14px; flex-wrap: wrap; }
.weekdays label { flex-direction: row !important; align-items: center; gap: 6px; font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 8px 0 0; }
.checks li { padding: 3px 0; }
.checks li b { display: inline-block; min-width: 18px; }
.ok-text { color: var(--ok); }
.err-text { color: var(--danger); }
.warn-text { color: var(--warn); }

.param-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 6px; }

@media (max-width: 760px) {
  .topbar, main { padding-left: 16px; padding-right: 16px; }
  .grid-form, .grid-form.three { grid-template-columns: 1fr; }
  .conn-picker select { min-width: 0; }
  table.mapping thead { display: none; }
  table.mapping tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); padding: 6px 0; }
  table.mapping td { border: 0; }
}

/* ---- run workflow: steps, summary, confirmation dialog ------------------------------------------------------------ */
.page-head { margin-bottom: 12px; }
.page-head h2 { font-size: 18px; margin: 0 0 4px; }
details.how summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.how[open] summary { margin-bottom: 4px; }
details.how p { margin: 4px 0 0; max-width: 90ch; }

.composer { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; margin-bottom: 16px; }
.composer .steps { min-width: 0; }
.composer .steps .step-card { margin-bottom: 12px; }
.step-head { display: flex; align-items: center; gap: 10px; margin: 0 0 10px !important; font-size: 15px !important; }
.step-head .muted { font-weight: 400; }
.step-card .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.step-card textarea { width: 100%; }
.step-card .grid-form { margin: 0; }
.step-card .weekdays { margin: 6px 0 8px; }
.step-card .params-block { margin-top: 12px; }
.step-card .grid-form.inner { margin-top: 8px; }
.step .n { display: inline; }
.step-card.done .step { background: var(--ok); }
.step-card.done .step .n { display: none; }
.step-card.done .step::after { content: '\2713'; font-weight: 700; }
#ra-review-hint, #cp-review-hint { margin: 0; }

.summary { position: sticky; top: 12px; margin-bottom: 0; }
.summary h3 { margin-top: 0; }
.summary-tenant { margin-bottom: 8px; }
.tenant-name { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 650; font-size: 13px; background: var(--info-bg); color: var(--info-text); }
.env-tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 750; letter-spacing: .05em; }
.env-tag.env-prod { background: var(--err-bg); color: var(--danger); }
.env-tag.env-test { background: var(--ok-bg); color: var(--ok); }
.env-tag.env-other { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.summary-list { margin: 0 0 10px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; overflow-wrap: anywhere; }
.summary-status { margin: 10px 0; }
.summary .actions .btn { flex: 1 1 auto; }
.btn.solid-danger { background: var(--danger-solid); border-color: var(--danger-solid); color: #fff; }
.btn.solid-danger:hover { filter: brightness(1.12); border-color: var(--danger-solid); }
.btn.is-busy { position: relative; opacity: .7; cursor: progress; }
.btn.is-busy::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::after { animation-duration: 3s; } }

body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8, 12, 20, .55); }
.modal { width: min(580px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface);
  color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 18px 60px rgba(0,0,0,.4); }
.modal h2 { margin: 0 0 12px; font-size: 18px; }
.modal-body { overflow: auto; min-height: 0; }
.modal-require { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-weight: 550; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.confirm-list { margin: 0 0 8px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.confirm-list dt { color: var(--muted); }
.confirm-list dd { margin: 0; overflow-wrap: anywhere; }
.confirm-targets .table-wrap { max-height: 250px; }

@media (max-width: 980px) {
  .composer { grid-template-columns: 1fr; }
  .summary { position: static; }
}

/* ---- tables: filter bar, sortable headers ---------------------------------------------------------------------------- */
.dt-bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.dt-bar .dt-filter { flex: 1 1 220px; max-width: 360px; }
.dt-bar + .table-wrap { margin-top: 8px; }
table.sortable th { cursor: pointer; user-select: none; white-space: nowrap; }
table.sortable th:hover { color: var(--text); }
table.sortable th[aria-sort]::after { content: ' \25B2'; font-size: 9px; }
table.sortable th[aria-sort='descending']::after { content: ' \25BC'; }
.progress-line { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.progress-line .progress { flex: 0 1 260px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }

.dt-const { display: none; }
.dt-const-note { margin: 8px 0 0; overflow-wrap: anywhere; }

/* ---- readiness checklist, empty states ------------------------------------------------------------------------------- */
.checklist { list-style: none; margin: 8px 0 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist .grow { flex: 1; min-width: 0; }
.checklist .grow small { display: block; color: var(--muted); }
.check-ico { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.check-ico.ok { background: var(--ok-bg); color: var(--ok); }
.check-ico.todo { background: var(--warn-bg); color: var(--warn); }
.empty-state { text-align: center; padding: 26px 16px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }
.empty-state h3 { margin: 0 0 4px; color: var(--text); font-size: 15px; }
.empty-state p { margin: 0 auto; max-width: 60ch; }
.empty-state .btn { margin-top: 12px; }


/* ---- run progress, follow-up ------------------------------------------------------------------------------------------ */
.run-progress { margin-top: 6px; min-width: 150px; }
.run-progress .progress { height: 6px; min-width: 120px; }
.followup { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.checks-inline { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.checks-inline label { display: inline-flex; align-items: center; gap: 6px; }
.auto-note { margin-right: 8px; }
.card-head h3 { margin: 0; }

/* ---- leave some out ---------------------------------------------------------------------------------------------------- */
.leave-out { margin-top: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.leave-out > summary { color: var(--text); font-weight: 550; }
.leave-body { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.leave-body label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 13px; }
.leave-body label.check { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 500; }
.leave-body input[type=number] { width: 5.5em; }
.leave-body textarea { width: 100%; }

/* ---- saved audiences --------------------------------------------------------------------------------------------------- */
.audience-box { padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.audience-box label.inline-label { flex-direction: row; align-items: center; gap: 8px; }
.audience-manager { margin-top: 10px; }
.aud-list { list-style: none; margin: 0 0 6px; padding: 0; }
.aud-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border); }

/* ---- rollouts ----------------------------------------------------------------------------------------------------------- */
.rollout-box { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--border); }
.rollout-box label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 550; }
.wave-line { padding: 2px 0; }
.wave-line + .wave-line { border-top: 1px dotted var(--border); }

/* ---- saved exports, configuration ---------------------------------------------------------------------------------------- */
table.kv th { text-align: left; width: 110px; color: var(--muted); font-weight: 600; }
ol.howto { margin: 12px 0 8px; padding-left: 22px; }
ol.howto li { margin: 4px 0; }
hr.thin { border: 0; border-top: 1px dotted var(--border); margin: 6px 0; }
.cfg-section { margin: 14px 0 4px; font-size: 14px; }
tr.cfg-off td { color: var(--muted); }
.grid-form.one { grid-template-columns: 1fr; margin-top: 0; }
.mode-choice { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mode-choice legend { font-weight: 550; font-size: 13px; padding: 0 4px; }
.grid-form .mode-choice label.check { align-items: flex-start; align-self: stretch; padding-bottom: 0; font-weight: 400; }
.mode-choice input[type=radio] { margin-top: 3px; }
label.inline-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
#library-list td { vertical-align: top; }
.fx-clear-label { margin-top: 4px; font-weight: 400; }

/* ---- signed-in user in the top bar (the sign-in page has its own login.css) -------------------------------------------- */
.user-menu { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }

/* ---- reports ------------------------------------------------------------------------------------------------------------ */
#rep-list td { vertical-align: top; }
.rep-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 4px; }
.rep-choice {
  display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.rep-choice span { color: var(--muted); font-size: 13px; }
.rep-choice:hover, .rep-choice.active { border-color: var(--primary); }
.rep-choice.active { box-shadow: inset 0 0 0 1px var(--primary); }
.rep-source-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px 12px; margin-bottom: 10px; align-items: end; }
.rep-source-row label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 13px; }
.rep-source-row .btn { margin-bottom: 4px; }
.rep-template { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; }
.rep-template h3 { margin: 0 0 2px; }
.rep-template pre { max-height: 160px; margin: 6px 0; }
.rep-query { padding: 8px 0; border-top: 1px dashed var(--border); }
.rep-query .actions { align-items: center; }
.rep-section { border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 8px; padding: 10px 14px; margin: 10px 0; background: var(--surface-2); }
.rep-section .grid-form { margin: 8px 0 4px; }
.rep-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rep-section-head b { font-size: 13px; }
.rep-cols { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rep-cols button { font: inherit; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; }
.rep-cols button:hover { border-color: var(--primary); }
.rep-sample { margin-top: 6px; }
@media (max-width: 760px) {
  .rep-choices { grid-template-columns: 1fr; }
  .rep-source-row { grid-template-columns: 1fr; }
}
.rep-section.is-heading { border-left-color: var(--muted); background: var(--surface); }
.where-row { display: grid; grid-template-columns: minmax(0, 2fr) 70px minmax(0, 1fr) auto; gap: 6px; margin: 6px 0; }
.rep-more { margin-top: 8px; }
.rep-more .o-where { margin-top: 6px; }

/* ---- guide: how-tos with screenshots (the guide page and the help panel) --------------------------------------------- */
.help-btn { white-space: nowrap; }
.help-row { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.page-head .help-btn { margin-left: 8px; vertical-align: middle; }
.g-intro { color: var(--muted); font-size: 15px; margin: 4px 0 14px; }
.g-howto { margin: 18px 0 26px; }
.g-howto h3 { font-size: 17px; margin: 0 0 10px; }
.g-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.g-step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.g-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--primary-solid); color: var(--primary-text); }
.g-text p { margin: 3px 0 0; line-height: 1.55; }
.g-tip, .g-warn { margin-top: 8px !important; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.g-tip { background: var(--info-bg); }
.g-warn { background: var(--warn-bg); color: var(--warn); }
.g-tip b, .g-warn b { margin-right: 4px; }
.g-shot { display: block; margin-top: 10px; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: zoom-in;
  background: var(--surface-2); max-width: 100%; }
.g-shot img { display: block; max-width: 100%; height: auto; }
.g-shot:hover { border-color: var(--primary); }
.g-lightbox { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 3vmin; background: rgba(4, 8, 16, .85);
  cursor: zoom-out; }
.g-lightbox.open { display: grid; }
.g-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.help-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(4, 8, 16, .35); opacity: 0; pointer-events: none; transition: opacity .25s; }
.help-backdrop.open { opacity: 1; pointer-events: auto; }
.help-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(560px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: -20px 0 50px rgba(0, 0, 0, .25);
  transform: translateX(105%); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.help-panel.open { transform: none; }
.hp-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.hp-head > div { flex: 1; }
.hp-head h2 { margin: 0; font-size: 18px; }
.hp-body { overflow-y: auto; padding: 6px 18px 30px; }
@media (prefers-reduced-motion: reduce) { .help-panel, .help-backdrop { transition: none; } }

/* Incident field mapping (ITSM connections) */
.mapping-table td { vertical-align: top; }
.mapping-table input:not([type=checkbox]) { width: 100%; min-width: 110px; }
.mapping-table .input-row input { min-width: 90px; }
.modal pre { max-height: 260px; overflow: auto; }
/* Alert rule conditions */
.cond-row { margin-bottom: 6px; }
.cond-row input { min-width: 140px; }
.cond-row select { width: auto; }
/* Radio buttons and checkboxes in a row inside forms: the box beside its text */
.grid-form .checks-inline label { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
/* Sample queries in the guide and help panel */
.g-code { position: relative; margin: 8px 0; }
.g-code pre { margin: 0; padding: 10px 76px 10px 12px; white-space: pre-wrap; word-break: break-word; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.g-code [data-copy-code] { position: absolute; top: 6px; right: 6px; }

/* Admin › Downloads: the install steps, with commands to copy */
#downloads-steps details.how { margin-top: 12px; }
#downloads-steps details.how summary { font-size: 14px; font-weight: 600; color: var(--text); }
#downloads-steps ol { max-width: 110ch; padding-left: 20px; }
#downloads-steps li { margin: 6px 0; }
.dl-code { position: relative; margin: 6px 0; }
.dl-code pre { margin: 0; padding: 8px 76px 8px 12px; white-space: pre-wrap; word-break: break-all; }
.dl-code [data-copy-text] { position: absolute; top: 5px; right: 6px; }
#downloads-steps .notice { margin-top: 10px; }

/* Alert rule form: the affected CI */
.ci-box { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); }
.ci-box .ci-detail { margin: 8px 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; }
.ci-box .ci-detail input, .ci-box .ci-detail select { width: auto; }
.ci-box .ci-detail.hidden { display: none; }
#rule-common label .muted.small, .ci-box > .muted.small { display: block; margin-top: 3px; font-weight: normal; }

/* Alert rule form: start from a template */
.rule-starter { border: 1px dashed var(--border); border-radius: 8px; padding: 10px 12px; }
.rule-starter.hidden { display: none; }
.rule-starter > label { max-width: 420px; }
.tpl-params { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 8px 0 10px; }
.tpl-params label { flex: 1 1 200px; max-width: 280px; }

/* Alert rule form: variables, and the buttons that insert {{placeholders}} */
.rule-vars-box .var-row { max-width: 560px; margin: 4px 0; }
.insert-vars { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: -6px; }
.chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 2px 9px;
  font: 12px ui-monospace, "Cascadia Code", Consolas, monospace; cursor: pointer; }
.chip:hover { border-color: var(--accent, #2563eb); }
.chip.col { background: color-mix(in srgb, var(--surface-2) 80%, #2563eb 20%); }
.chip.var { background: color-mix(in srgb, var(--surface-2) 80%, #16a34a 20%); }
.ci-box .ci-fallback label.check { margin: 0; }
/* Test rule: the ticket's title and description as they would be sent */
.ticket-preview { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.ticket-preview pre.plain { white-space: pre-wrap; background: none; border: 0; padding: 0; margin: 2px 0 0; font: inherit; max-height: none; }
/* Audit log: filters in one wrapping row, an entry opening under its row */
.audit-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 12px 0 4px; }
.audit-filters label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 13px; min-width: 0; }
.audit-filters .audit-q { flex: 1 1 240px; }
.audit-filters select { max-width: 200px; }
.audit-wrap { max-height: 640px; }
.audit-table td { font-variant-numeric: tabular-nums; }
.audit-table td.audit-target { max-width: 320px; }
.audit-table tr.audit-detail td { white-space: normal; max-width: none; overflow: visible; background: var(--surface-2); padding: 10px 14px 12px; }
.audit-table tr.audit-detail p { margin: 4px 0; }
.audit-changes { width: auto; max-width: 100%; margin: 4px 0 8px; font-size: 13px; }
.audit-changes th { position: static; }
.audit-changes td { white-space: pre-wrap; word-break: break-word; max-width: 420px; vertical-align: top; }
.audit-kv { display: grid; grid-template-columns: minmax(90px, max-content) minmax(0, 1fr); gap: 2px 14px; margin: 4px 0 8px; font-size: 13px; }
.audit-kv dt { color: var(--muted); }
.audit-kv dd { margin: 0; word-break: break-word; }
.audit-more { margin-top: 10px; }
@media (max-width: 760px) {
  .audit-filters label, .audit-filters select { flex: 1 1 140px; max-width: none; }
}
/* Health: a card per appliance, each check with its pill, disk bars */
.health-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.health-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); min-width: 0; }
.health-card.problem { border-color: var(--danger); }
.health-card.warn { border-color: var(--warn); }
.health-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.health-card-head .actions { display: flex; align-items: center; gap: 8px; }
.health-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.health-checks li { display: grid; grid-template-columns: 76px 128px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px; }
.health-checks li .badge { justify-self: start; }
.health-check-name { font-weight: 600; }
.health-check-text { word-break: break-word; display: flex; flex-direction: column; gap: 2px; }
.disk-bars { display: grid; gap: 3px; margin: 4px 0 2px; }
.disk-bar { display: grid; grid-template-columns: minmax(60px, 120px) minmax(60px, 1fr) auto; gap: 8px; align-items: center; font-size: 12px; }
.disk-mount { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.disk-track { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.disk-fill { display: block; height: 100%; background: var(--primary); }
.disk-fill.warn { background: var(--warn); }
.disk-fill.err { background: var(--danger); }
.disk-text { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.console-page { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.console-page summary { cursor: pointer; }
.console-page pre.plain { white-space: pre-wrap; max-height: 320px; margin: 6px 0 0; }
.grid-form.three .span-all { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .health-checks li { grid-template-columns: 76px minmax(0, 1fr); }
  .health-checks li .health-check-text { grid-column: 1 / -1; }
}

/* ---- Reports: the start choices, the editor, and the report view ----------------------------------------------------- */
:root {
  --chart-0: #2563eb; --chart-1: #0d9488; --chart-2: #d97706; --chart-3: #7c3aed; --chart-4: #db2777; --chart-5: #65a30d; --chart-6: #64748b;
  --good: #15803d; --average: #b45309; --bad: #b91c1c;
}
:root[data-theme='dark'] {
  --chart-0: #5b8def; --chart-1: #2dd4bf; --chart-2: #fbbf24; --chart-3: #a78bfa; --chart-4: #f472b6; --chart-5: #a3e635; --chart-6: #94a3b8;
  --good: #4ade80; --average: #fbbf24; --bad: #f87171;
}
.rep-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 4px; }
.rep-choice {
  display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.rep-choice span { color: var(--muted); font-size: 13px; }
.rep-choice:hover, .rep-choice.active { border-color: var(--primary); }
.rep-choice.active { box-shadow: inset 0 0 0 1px var(--primary); }
.rep-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 12px; }
.rep-template { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rep-template h3 { margin: 0; font-size: 15px; }
.rep-template p { margin: 0; }
.rep-template .actions { margin-top: auto; }
.rep-template pre.plain { white-space: pre-wrap; margin: 6px 0 0; max-height: 200px; }
.rep-query { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; display: grid; gap: 8px; background: var(--surface-2); }
.rep-query label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 13px; }
.rep-query textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.rep-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.rep-row > label { flex: 1 1 220px; }
.rep-platforms, .rep-engines { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.rep-platforms label, .rep-engines label { font-weight: 400; flex-direction: row; align-items: center; gap: 6px; }
.rep-query-out code { margin-right: 2px; }
.rep-section { border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; }
.rep-section.heading { border-left-color: var(--muted); background: var(--surface-2); }
.rep-sec-head { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(130px, 200px) auto; gap: 8px; align-items: center; }
.rep-sec-head .actions { display: flex; gap: 4px; }
.rep-sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px 12px; margin-top: 10px; }
.rep-sec-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 13px; min-width: 0; }
.rep-sec-grid .span2 { grid-column: span 2; }
.rep-more { margin-top: 8px; }
.rep-more summary { cursor: pointer; color: var(--muted); }
.rep-wheres { display: grid; gap: 6px; margin-top: 6px; }
.rep-where { display: grid; grid-template-columns: minmax(0, 2fr) 70px minmax(0, 1fr); gap: 6px; max-width: 560px; }
.spinner-inline { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: rep-spin 0.8s linear infinite; vertical-align: -1px; margin-right: 4px; }
@keyframes rep-spin { to { transform: rotate(360deg); } }

/* the report view: a dashboard of sections side by side by their width */
.rv-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding-bottom: 10px;
  border-bottom: 2px solid var(--primary); margin-bottom: 12px; }
.rv-top h2 { margin: 0; font-size: 22px; }
.rv-sub { margin: 2px 0 0; color: var(--muted); }
.rv-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.rv-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.rv.portrait .rv-grid { max-width: 900px; }
.rv-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); min-width: 0;
  display: flex; flex-direction: column; gap: 8px; }
.w-full { grid-column: span 6; }
.w-half { grid-column: span 3; }
.w-third { grid-column: span 2; }
.rv-heading { margin: 10px 0 0; font-size: 16px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.rv-head h3 { margin: 0; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.rv-foot { font-size: 11.5px; color: var(--muted); margin-top: auto; }
.rv-kpi-value { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.rv-kpi.good .rv-kpi-value { color: var(--good); }
.rv-kpi.average .rv-kpi-value { color: var(--average); }
.rv-kpi.bad .rv-kpi-value { color: var(--bad); }
.rv-kpi-label, .rv-kpi-delta { font-size: 12px; color: var(--muted); }
.rv-gauge { position: relative; max-width: 220px; }
.rv-gauge svg { width: 100%; height: auto; display: block; }
.rv-gauge-track { fill: none; stroke: var(--surface-2); stroke-width: 18; }
.rv-gauge-value { fill: none; stroke: var(--chart-0); stroke-width: 18; }
.rv-gauge-value.good { stroke: var(--good); }
.rv-gauge-value.average { stroke: var(--average); }
.rv-gauge-value.bad { stroke: var(--bad); }
.rv-gauge-text { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; display: flex; flex-direction: column; }
.rv-gauge-text b { font-size: 22px; font-variant-numeric: tabular-nums; }
.rv-gauge-text span { font-size: 11px; color: var(--muted); }
.rv-bars { display: grid; gap: 5px; }
.rv-bar { display: grid; grid-template-columns: minmax(70px, 34%) minmax(40px, 1fr) auto; gap: 8px; align-items: center; font-size: 12.5px; }
.rv-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-bar-track { height: 12px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.rv-bar-fill { display: block; height: 100%; background: var(--chart-0); border-radius: 3px; }
.rv-bar-fill.good { background: var(--good); }
.rv-bar-fill.average { background: var(--average); }
.rv-bar-fill.bad { background: var(--bad); }
.rv-bar-value { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.rv-axis { font-size: 11.5px; color: var(--muted); }
.rv-pie { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr); gap: 12px; align-items: center; }
.rv-pie svg { width: 100%; height: auto; }
.rv-slice { fill: none; stroke-width: 20; }
.rv-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; min-width: 0; }
.rv-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.rv-legend-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-legend-value { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-dot { width: 10px; height: 10px; border-radius: 50%; }
.rv .c0 { stroke: var(--chart-0); background: var(--chart-0); }
.rv .c1 { stroke: var(--chart-1); background: var(--chart-1); }
.rv .c2 { stroke: var(--chart-2); background: var(--chart-2); }
.rv .c3 { stroke: var(--chart-3); background: var(--chart-3); }
.rv .c4 { stroke: var(--chart-4); background: var(--chart-4); }
.rv .c5 { stroke: var(--chart-5); background: var(--chart-5); }
.rv .c6 { stroke: var(--chart-6); background: var(--chart-6); }
.rv-line svg { width: 100%; height: 180px; display: block; }
.rv-line .rv-gridline { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rv-tick { fill: var(--muted); font-size: 11px; }
.rv-area { fill: var(--chart-0); opacity: 0.12; }
.rv-path { fill: none; stroke: var(--chart-0); stroke-width: 2; vector-effect: non-scaling-stroke; }
.rv-point { fill: var(--surface); stroke: var(--chart-0); stroke-width: 2; vector-effect: non-scaling-stroke; }
.rv-table { max-height: 360px; margin-top: 0; }
@media (max-width: 980px) {
  .w-third { grid-column: span 3; }
  .w-half { grid-column: span 6; }
}
@media (max-width: 760px) {
  .rep-choices { grid-template-columns: 1fr; }
  .rv-grid { grid-template-columns: 1fr; }
  .w-full, .w-half, .w-third { grid-column: 1 / -1; }
  .rep-sec-head { grid-template-columns: auto minmax(0, 1fr); }
  .rep-sec-head select, .rep-sec-head .actions { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .spinner-inline { animation-duration: 3s; } }
.rv-sources { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted); }
.rv-sources b { color: var(--text); font-weight: 600; }
.pbi-fields { max-width: 720px; }
.pbi-fields th { width: 120px; text-transform: none; font-size: 13px; letter-spacing: 0; }
.pbi-secret { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.pbi-secret code { font-size: 14px; padding: 4px 8px; background: var(--surface); border-radius: 6px; user-select: all; word-break: break-all; }
.pbi-choices { display: grid; gap: 6px; margin: 10px 0; max-height: 320px; overflow: auto; }
.pbi-choices label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.pbi-name { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 13px; }
.pbi-name input { width: 100%; }
