/* ============================================================
   Persimmon — Autotask PSA Console
   Captain-style data dashboard. Cool slate + single indigo accent.
   ============================================================ */

*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Satoshi", -apple-system, "Inter", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:root {
  /* Surfaces */
  --bg: #f7f7f8;
  --panel: #ffffff;
  --panel-2: #fafafb;
  --hover: #f2f3f5;
  --border: #e7e8ec;
  --border-strong: #d8dae0;

  /* Text */
  --fg: #0d0f14;
  --fg-muted: #5b5f6b;
  --fg-subtle: #8b8f9a;

  /* Accent — indigo */
  --accent: #5b5bd6;
  --accent-hover: #4a4ac4;
  --accent-soft: #eef0ff;
  --accent-fg: #ffffff;

  /* Semantic */
  --green: #0f9d58;
  --green-bg: #e6f4ec;
  --amber: #b7791f;
  --amber-bg: #fdf1d8;
  --red: #d14343;
  --red-bg: #fbe8e8;
  --blue: #2563eb;
  --blue-bg: #e6ecfb;
  --violet: #7c3aed;
  --violet-bg: #f1ebfd;
  --slate: #6b7280;
  --slate-bg: #eef0f3;

  /* Layout */
  --sidebar-w: 240px;
  --header-h: 56px;
  --radius: 8px;
  --radius-sm: 6px;

  /* Numeric font stack for data */
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15,17,25,0.04);
  --shadow-md: 0 4px 14px rgba(15,17,25,0.08);
  --shadow-lg: 0 12px 32px rgba(15,17,25,0.14);
}

.dark {
  --bg: #0b0c10;
  --panel: #111318;
  --panel-2: #161820;
  --hover: #1b1e27;
  --border: #23262f;
  --border-strong: #2e323d;

  --fg: #ecedf1;
  --fg-muted: #9aa0ac;
  --fg-subtle: #6a707b;

  --accent: #7c7cf0;
  --accent-hover: #9898f5;
  --accent-soft: #1c1f3a;

  --green: #34c27a;
  --green-bg: #0f2a1c;
  --amber: #e0b25a;
  --amber-bg: #2a210f;
  --red: #ef6a6a;
  --red-bg: #2a1111;
  --blue: #7aa4ff;
  --blue-bg: #111a2e;
  --violet: #a085ff;
  --violet-bg: #1d1533;
  --slate: #a0a5b0;
  --slate-bg: #1c1f26;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.38);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.55);
}

/* ----- App grid ----- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  height: 100dvh;
}

/* ----- Sidebar ----- */
.sidebar {
  grid-row: 1 / -1;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.brand {
  display: flex;
  align-items: center;
  padding: 18px 16px 14px;
  color: var(--accent);
}
.brand-logo {
  display: block;
  width: auto;
  height: 40px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 8px rgba(220, 38, 38, 0.18));
}
/* Light/dark logo swap — keyed off the .dark theme class on <html> */
.brand-logo-dark { display: none; }
html.dark .brand-logo-light { display: none; }
html.dark .brand-logo-dark { display: block; }
/* Legacy classes kept in case any other page still references them */
.brand-mark { width: 28px; height: 28px; flex: 0 0 28px; }
.brand-mark-img { width: 26px; height: 32px; flex: 0 0 26px; object-fit: contain; object-position: center top; filter: drop-shadow(0 2px 6px rgba(220, 38, 38, 0.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; color: var(--fg); }
.brand-name { font-weight: 700; letter-spacing: -0.01em; font-size: 15px; }
.brand-sub { font-size: 11px; color: var(--fg-subtle); }

/* Tenant switcher */
.tenant-switcher {
  margin: 6px 12px 14px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  color: var(--fg-muted);
  transition: background 120ms ease, border-color 120ms ease;
}
.tenant-switcher:hover { background: var(--hover); border-color: var(--border-strong); }
.tenant-avatar {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #8a5bd6);
  color: white; display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.tenant-meta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tenant-name { color: var(--fg); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-zone { font-size: 10.5px; color: var(--fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); }

.tenant-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 4px; margin: 0; list-style: none;
  display: none; z-index: 40;
}
.tenant-menu.open { display: block; }
.tenant-menu li {
  padding: 8px 10px; border-radius: var(--radius-sm);
  display: grid; grid-template-columns: 24px 1fr auto; gap: 10px;
  align-items: center; cursor: pointer; font-size: 13px;
}
.tenant-menu li:hover { background: var(--hover); }
.tenant-menu .m-avatar {
  width: 24px; height: 24px; border-radius: 5px; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: white;
}
.tenant-menu .m-check { color: var(--accent); }
.tenant-menu .m-sub { color: var(--fg-subtle); font-size: 10.5px; font-family: var(--mono); }

/* Nav */
.nav { padding: 4px 8px; flex: 1; }
.nav-section {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-subtle); padding: 14px 10px 6px;
}
.nav-item {
  display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center;
  padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--fg-muted); text-decoration: none; font-size: 13px;
  transition: background 120ms ease, color 120ms ease;
}
.nav-item:hover { background: var(--hover); color: var(--fg); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item svg { width: 16px; height: 16px; }
.pill {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 500;
  color: var(--fg-muted); font-variant-numeric: tabular-nums;
  min-width: 22px; text-align: center;
}
.nav-item.is-active .pill { background: white; border-color: transparent; color: var(--accent); }
.dark .nav-item.is-active .pill { background: var(--panel); }

.sidebar-footer { padding: 10px 12px 14px; border-top: 1px solid var(--border); }
.connection-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--fg-muted); margin-bottom: 12px;
  padding: 6px 8px; background: var(--panel-2); border-radius: var(--radius-sm);
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.dot-live { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
.dot-demo { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 20%, transparent); }

.sidebar-user { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef6a6a);
  color: white; display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-meta > span:first-child { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10.5px; color: var(--fg-subtle); }

/* ----- Header ----- */
.header {
  grid-column: 2; grid-row: 1;
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-subtle); }
.breadcrumb svg { color: var(--fg-subtle); }
.crumb-current { color: var(--fg); font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-meta { font-size: 12px; color: var(--fg-subtle); margin-right: 4px; font-variant-numeric: tabular-nums; }

.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm); color: var(--fg-muted); cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.icon-btn:hover { background: var(--hover); color: var(--fg); border-color: var(--border); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .moon { display: none; }
.dark .icon-btn .sun { display: none; }
.dark .icon-btn .moon { display: block; }

/* ----- Main ----- */
.main {
  grid-column: 2; grid-row: 2;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 28px 40px;
}

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  margin-bottom: 22px;
}
.page-title {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.page-sub {
  font-size: 13px; color: var(--fg-muted); margin: 0;
  font-variant-numeric: tabular-nums;
}
.page-sub code {
  font-family: var(--mono); font-size: 11.5px;
  padding: 2px 6px; border-radius: 4px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--fg);
}

.page-actions { display: flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  cursor: pointer; transition: all 120ms ease;
  font-family: inherit;
}
.btn svg { width: 14px; height: 14px; }
.btn-ghost { background: var(--panel); color: var(--fg); }
.btn-ghost:hover { background: var(--hover); border-color: var(--border-strong); }
.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ----- KPI row ----- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.kpi {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-sm);
}
.kpi-label { font-size: 11.5px; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-value {
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}
.kpi-delta { font-size: 12px; color: var(--fg-muted); display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

/* ----- Toolbar ----- */
.toolbar {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.search {
  position: relative; flex: 0 1 360px;
  display: flex; align-items: center;
}
.search svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--fg-subtle); }
.search input {
  width: 100%; padding: 8px 10px 8px 32px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--fg);
  font-family: inherit; font-size: 13px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.search input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.search kbd {
  position: absolute; right: 8px;
  font-family: var(--mono); font-size: 10.5px;
  padding: 2px 6px; border-radius: 4px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--fg-subtle);
}

.filters { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.divider-v { width: 1px; height: 20px; background: var(--border); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel); color: var(--fg-muted);
  font-size: 12px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 120ms ease;
}
.chip:hover { background: var(--hover); color: var(--fg); }
.chip.is-active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); color: var(--accent); }
.chip .count {
  background: var(--panel-2); border-radius: 999px;
  font-size: 10.5px; padding: 0 5px; font-variant-numeric: tabular-nums;
  color: var(--fg-subtle);
}
.chip.is-active .count { background: white; color: var(--accent); }
.dark .chip.is-active .count { background: var(--panel); }

/* ----- Table ----- */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums lining-nums;
}
.table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.table thead th.sortable { cursor: pointer; user-select: none; }
.table thead th.sortable:hover { color: var(--fg); }
.table thead th.sorted { color: var(--fg); }
.table thead th.sorted::after {
  content: attr(data-dir); margin-left: 4px; font-size: 10px; color: var(--accent);
  font-family: inherit;
}
.col-num { text-align: right; }
.col-id { width: 90px; }
.col-name { min-width: 220px; }
.table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--fg);
  white-space: nowrap;
}
.table tbody tr { cursor: pointer; transition: background 90ms ease; }
.table tbody tr:hover { background: var(--hover); }
.table tbody tr:last-child td { border-bottom: none; }

/* Company cell */
.co-cell { display: flex; align-items: center; gap: 10px; }
.co-logo {
  width: 28px; height: 28px; border-radius: 6px; flex: 0 0 28px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: white;
  letter-spacing: -0.02em;
}
.co-name { font-weight: 600; font-size: 13px; color: var(--fg); letter-spacing: -0.005em; }
.co-web { font-size: 11px; color: var(--fg-subtle); }
.col-id-cell { color: var(--fg-subtle); font-family: var(--mono); font-size: 12px; }
.col-num-cell { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); }
.muted-cell { color: var(--fg-muted); font-size: 12.5px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
  white-space: nowrap;
  line-height: 1.2;
}
.badge .dot { width: 6px; height: 6px; box-shadow: none; }
.badge.active { background: var(--green-bg); color: var(--green); }
.badge.active .dot { background: var(--green); }
.badge.inactive { background: var(--slate-bg); color: var(--slate); }
.badge.inactive .dot { background: var(--slate); }

.type-badge { padding: 3px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 500; display: inline-block; }
.type-Customer { background: var(--blue-bg); color: var(--blue); }
.type-Prospect { background: var(--violet-bg); color: var(--violet); }
.type-Lead { background: var(--amber-bg); color: var(--amber); }
.type-Partner { background: var(--green-bg); color: var(--green); }
.type-Vendor { background: var(--slate-bg); color: var(--slate); }
.type-Dead, .type-Cancelation { background: var(--red-bg); color: var(--red); }

/* Empty state */
.empty {
  padding: 80px 20px; text-align: center; color: var(--fg-muted);
}
.empty h3 { font-size: 15px; font-weight: 600; color: var(--fg); margin: 0 0 6px; }
.empty p { font-size: 13px; margin: 0 0 16px; }

/* Table foot */
.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 12.5px;
  color: var(--fg-muted);
}
.foot-left { display: flex; align-items: center; gap: 20px; }
.page-size { display: inline-flex; align-items: center; gap: 8px; }
.page-size select {
  background: var(--panel); border: 1px solid var(--border); color: var(--fg);
  font-family: inherit; font-size: 12.5px; padding: 3px 6px; border-radius: 5px; cursor: pointer;
}
.pagination { display: flex; align-items: center; gap: 2px; }
.pagination button {
  min-width: 28px; height: 28px; padding: 0 8px;
  background: transparent; border: 1px solid transparent; border-radius: 5px;
  color: var(--fg-muted); font-family: inherit; font-size: 12.5px; cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: all 120ms ease;
}
.pagination button:hover:not([disabled]) { background: var(--hover); color: var(--fg); }
.pagination button.is-active { background: var(--panel); border-color: var(--border); color: var(--fg); font-weight: 600; }
.pagination button[disabled] { opacity: 0.35; cursor: not-allowed; }
.pagination .ellipsis { padding: 0 4px; color: var(--fg-subtle); font-size: 12.5px; }

/* ----- Drawer ----- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(8, 10, 15, 0.32);
  opacity: 0; pointer-events: none; transition: opacity 180ms ease;
  z-index: 50; backdrop-filter: blur(2px);
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(480px, 100vw);
  background: var(--panel); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 51;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.drawer-eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-subtle); }
.drawer-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; margin: 4px 0 8px; }
.drawer-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.muted { color: var(--fg-subtle); }
.muted code { font-family: var(--mono); color: var(--fg-muted); }
.muted-link { color: var(--accent); text-decoration: none; font-size: 12px; }
.muted-link:hover { text-decoration: underline; }

.drawer-body { padding: 18px 20px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.kv {
  display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px;
  font-size: 13px;
}
.kv dt { color: var(--fg-subtle); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; align-self: center; }
.kv dd { margin: 0; color: var(--fg); font-variant-numeric: tabular-nums; }
.section-title {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg-subtle); margin: 20px 0 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.raw-json {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px;
  padding: 12px; font-family: var(--mono); font-size: 11.5px;
  color: var(--fg-muted); max-height: 240px; overflow: auto;
  white-space: pre; line-height: 1.5;
}

/* ----- Modal ----- */
.modal-scrim {
  position: fixed; inset: 0;
  background: rgba(8, 10, 15, 0.45);
  display: none; align-items: center; justify-content: center;
  z-index: 60; backdrop-filter: blur(4px);
}
.modal-scrim.open { display: flex; }
.modal {
  width: min(480px, 92vw);
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  animation: pop 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.modal-body { padding: 18px 20px 20px; }
.modal-hint { font-size: 12.5px; color: var(--fg-muted); margin: 0 0 16px; line-height: 1.5; }

.cred-form { display: flex; flex-direction: column; gap: 12px; }
.cred-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: 0.05em; }
.cred-form input {
  padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--fg); font-size: 13px;
  font-family: inherit; text-transform: none; letter-spacing: 0;
}
.cred-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.cred-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.cred-status { font-size: 11.5px; color: var(--fg-subtle); flex: 1 1 200px; }
.cred-buttons { display: flex; gap: 8px; }

/* ----- Command palette ----- */
.cmdk-scrim {
  position: fixed; inset: 0; background: rgba(8, 10, 15, 0.35);
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 12vh; z-index: 70; backdrop-filter: blur(4px);
}
.cmdk-scrim.open { display: flex; }
.cmdk {
  width: min(560px, 92vw); background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cmdk-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.cmdk-input-wrap svg { width: 16px; height: 16px; color: var(--fg-subtle); }
.cmdk-input-wrap input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--fg); font-size: 14px; font-family: inherit;
}
.cmdk-input-wrap kbd {
  font-family: var(--mono); font-size: 10.5px; padding: 2px 6px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 4px; color: var(--fg-subtle);
}
.cmdk-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.cmdk-list li {
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.cmdk-list li:hover, .cmdk-list li.is-active { background: var(--hover); }
.cmdk-list .meta { font-size: 11px; color: var(--fg-subtle); margin-left: auto; font-family: var(--mono); }

/* ----- Responsive ----- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .header { grid-column: 1; padding: 0 16px; }
  .header-meta { display: none; }
  .main { grid-column: 1; padding: 16px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-actions { justify-content: flex-start; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .page-sub code { font-size: 10.5px; }
  .search { flex: 1 1 100%; }
}

/* =====================================================================
   Dual-View Expansion — MSP overview + Client portal
   ===================================================================== */

/* ----- Role switcher (segmented control in sidebar) ----- */
.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 14px 12px 10px;
  padding: 3px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.role-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-muted);
  font: 500 12px/1 "Satoshi", Inter, system-ui, sans-serif;
  letter-spacing: 0.01em;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.role-btn:hover { color: var(--fg); }
.role-btn.is-active {
  background: var(--panel);
  color: var(--fg);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

/* Tenant menu label (the "Workspace" / "Client" header above list) */
.menu-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding: 8px 10px 4px;
}

/* ----- KPI strip variants ----- */
.kpis.kpis-4 { grid-template-columns: repeat(4, 1fr); }
.kpis.kpis-5 { grid-template-columns: repeat(5, 1fr); }
.kpi.kpi-alert {
  background: color-mix(in srgb, var(--red) 6%, var(--panel));
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
}
.kpi.kpi-alert .kpi-label { color: color-mix(in srgb, var(--red) 70%, var(--fg-muted)); }
html.dark .kpi.kpi-alert {
  background: color-mix(in srgb, var(--red) 10%, var(--panel));
}

/* ----- Widget grid layouts ----- */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "tickets tickets backups"
    "edr     soc     soc"
    "roster  roster  roster";
  gap: 14px;
  margin-top: 14px;
}
.widget-grid.client-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "tickets    tickets    backups"
    "edr        soc        compliance";
}

/* ----- Widget card ----- */
.widget {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0; /* so grid children can shrink */
}
.widget h3 {
  font: 600 14px/1.2 "Satoshi", Inter, system-ui, sans-serif;
  margin: 2px 0 0;
  letter-spacing: -0.005em;
}
.widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.widget-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.widget-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

/* ----- Health pill ----- */
.hpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.hpill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--slate);
  flex: 0 0 6px;
}
.hpill.ok { color: color-mix(in srgb, var(--green) 70%, var(--fg)); border-color: color-mix(in srgb, var(--green) 35%, var(--border)); background: color-mix(in srgb, var(--green) 8%, var(--panel)); }
.hpill.ok .dot { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
.hpill.warn { color: color-mix(in srgb, var(--amber) 70%, var(--fg)); border-color: color-mix(in srgb, var(--amber) 40%, var(--border)); background: color-mix(in srgb, var(--amber) 9%, var(--panel)); }
.hpill.warn .dot { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent); }
.hpill.crit { color: color-mix(in srgb, var(--red) 70%, var(--fg)); border-color: color-mix(in srgb, var(--red) 40%, var(--border)); background: color-mix(in srgb, var(--red) 9%, var(--panel)); }
.hpill.crit .dot { background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 22%, transparent); }

/* ----- Big stat ----- */
.big-stat { display: flex; flex-direction: column; gap: 2px; }
.big-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.big-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--fg);
}
.big-value-sm {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--fg);
}
.big-unit {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-subtle);
  margin-left: 2px;
}

.widget .sub {
  font-size: 11px;
  color: var(--fg-subtle);
  margin-top: 1px;
}

/* ----- Priority breakdown list ----- */
.priority-breakdown {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.priority-breakdown li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
}
.priority-breakdown .num {
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  font-weight: 600;
  font-size: 12.5px;
}
.pri {
  width: 8px; height: 8px; border-radius: 2px;
  display: inline-block;
  background: var(--slate);
}
.pri.crit { background: var(--red); }
.pri.warn { background: var(--amber); }
.pri.med  { background: var(--blue); }
.pri.low  { background: var(--slate); }

/* ----- Chart sub-caption ----- */
.chart-sub {
  font-size: 11px;
  color: var(--fg-subtle);
  font-weight: 500;
  margin-top: 2px;
}

/* Widget canvas sizing — Chart.js respects parent */
.widget canvas {
  max-width: 100% !important;
  height: 160px !important;
  display: block;
}
.w-tickets .w-chart-wrap canvas { height: 150px !important; }
.widget.w-roster canvas { height: 120px !important; }

/* ----- Tickets widget 2-col body ----- */
.w-tickets-body {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 16px;
  align-items: flex-start;
}
.w-tickets-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.w-chart-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* ----- EDR / SOC / Backup stat grids ----- */
.edr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 0 2px;
  border-top: 1px dashed var(--border);
}
.soc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 0 2px;
  border-top: 1px dashed var(--border);
}
.bkp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px 0 2px;
  border-top: 1px dashed var(--border);
}
.edr-grid > div, .soc-stats > div, .bkp-stats > div { min-width: 0; }

/* ----- Ticket list (recent tickets, failed jobs, threats, investigations) ----- */
.ticket-list-head {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  margin-top: 4px;
}
.ticket-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.ticket-list li {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.ticket-list li:last-child { border-bottom: none; }
.pri-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
  background: var(--slate);
}
.pri-dot.crit { background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 20%, transparent); }
.pri-dot.warn { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent); }
.pri-dot.med  { background: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent); }
.pri-dot.low  { background: var(--slate); }

.t-subject {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.t-subject > div:first-child {
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t-meta {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--fg-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t-time {
  font-size: 11px;
  color: var(--fg-subtle);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ----- Status chip (ticket / incident status) ----- */
.status-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--fg-muted);
  white-space: nowrap;
}
.status-chip.s-New       { color: color-mix(in srgb, var(--blue) 75%, var(--fg));   border-color: color-mix(in srgb, var(--blue) 35%, var(--border));   background: color-mix(in srgb, var(--blue) 8%, var(--panel)); }
.status-chip.s-InProgress{ color: color-mix(in srgb, var(--accent) 80%, var(--fg)); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.status-chip.s-Waiting   { color: color-mix(in srgb, var(--amber) 75%, var(--fg));  border-color: color-mix(in srgb, var(--amber) 35%, var(--border));  background: color-mix(in srgb, var(--amber) 8%, var(--panel)); }
.status-chip.s-Resolved  { color: color-mix(in srgb, var(--green) 75%, var(--fg));  border-color: color-mix(in srgb, var(--green) 35%, var(--border));  background: color-mix(in srgb, var(--green) 8%, var(--panel)); }
.status-chip.s-Open      { color: color-mix(in srgb, var(--red) 75%, var(--fg));    border-color: color-mix(in srgb, var(--red) 35%, var(--border));    background: color-mix(in srgb, var(--red) 8%, var(--panel)); }
.status-chip.s-Investigating { color: color-mix(in srgb, var(--amber) 75%, var(--fg)); border-color: color-mix(in srgb, var(--amber) 35%, var(--border)); background: color-mix(in srgb, var(--amber) 8%, var(--panel)); }
.status-chip.s-Closed    { color: color-mix(in srgb, var(--slate) 85%, var(--fg));  border-color: var(--border); background: var(--panel-2); }
.status-chip.s-Contained { color: color-mix(in srgb, var(--green) 75%, var(--fg));  border-color: color-mix(in srgb, var(--green) 35%, var(--border)); background: color-mix(in srgb, var(--green) 8%, var(--panel)); }

/* ----- Compliance bars ----- */
.compliance-bars {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.compliance-bars li { display: flex; flex-direction: column; gap: 6px; }
.cmp-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--fg-muted);
  font-weight: 500;
}
.cmp-val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--fg);
  font-size: 13px;
}
.cmp-bar {
  width: 100%;
  height: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.cmp-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 280ms cubic-bezier(.2,.8,.2,1);
}
.cmp-fill.ok   { background: var(--green); }
.cmp-fill.warn { background: var(--amber); }
.cmp-fill.crit { background: var(--red); }

/* ----- Client hero banner ----- */
.client-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--panel)), var(--panel) 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
html.dark .client-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel) 70%);
}
.client-hero-left { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.client-hero-logo {
  width: 56px; height: 56px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  box-shadow: var(--shadow-sm);
}
.client-hero-left .page-title { margin: 4px 0 6px; font-size: 22px; }
.client-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.client-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.compliance-score {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}
.compliance-score .ring { flex: 0 0 64px; }
.compliance-num {
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.compliance-num span {
  font-size: 13px;
  color: var(--fg-subtle);
  font-weight: 500;
  margin-left: 2px;
}
.compliance-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-top: 4px;
}

/* ----- Compact table variant + scroll wrapper ----- */
.table.table-compact th,
.table.table-compact td {
  padding: 8px 12px;
  font-size: 12.5px;
}
.table.table-compact th {
  font-size: 10.5px;
  letter-spacing: 0.06em;
}
.roster-scroll {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.roster-scroll .table { margin: 0; }
.roster-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--panel-2);
  z-index: 1;
}
.roster-scroll tbody tr { cursor: pointer; }
.roster-scroll tbody tr:hover { background: var(--hover); }

/* ----- Inline search (inside widget header) ----- */
.search-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 200px;
}
.search-inline svg { width: 13px; height: 13px; color: var(--fg-subtle); flex: 0 0 13px; }
.search-inline input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font: 400 12.5px/1 "Satoshi", Inter, system-ui, sans-serif;
}
.search-inline input::placeholder { color: var(--fg-subtle); }

/* ----- Empty / misc ----- */
.empty-cell {
  text-align: center;
  color: var(--fg-subtle);
  font-size: 12.5px;
  padding: 24px 16px;
  font-style: normal;
}

/* Breadcrumb links (anchor tags) */
.breadcrumb a {
  color: var(--fg-subtle);
  text-decoration: none;
  transition: color 120ms ease;
}
.breadcrumb a:hover { color: var(--fg-muted); }

/* ----- Responsive adjustments ----- */
@media (max-width: 1100px) {
  .widget-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "tickets tickets"
      "backups backups"
      "edr soc"
      "roster roster";
  }
  .widget-grid.client-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "tickets tickets"
      "backups backups"
      "edr soc"
      "compliance compliance";
  }
  .kpis.kpis-5 { grid-template-columns: repeat(3, 1fr); }
  .kpis.kpis-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .widget-grid,
  .widget-grid.client-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tickets"
      "backups"
      "edr"
      "soc"
      "roster"
      "compliance";
  }
  .kpis.kpis-5, .kpis.kpis-4 { grid-template-columns: repeat(2, 1fr); }
  .w-tickets-body { grid-template-columns: 1fr; }
  .edr-grid, .soc-stats { grid-template-columns: repeat(3, 1fr); }
  .bkp-stats { grid-template-columns: repeat(2, 1fr); }
  .client-hero { flex-direction: column; }
  .client-hero-right { align-items: flex-start; }
  .search-inline { min-width: 140px; }
}

/* ============================================================
   Phase 1 — Drill-down pages
   ============================================================ */

/* --- Panels --- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.04));
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-head h3 {
  margin: 2px 0 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.panel-flush { padding: 0; }
.panel-filters { padding: 12px 16px; margin-bottom: 16px; }
.panel-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 960px) { .panel-grid-2 { grid-template-columns: 1fr; } }

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 0 0 16px;
  padding: 0;
}
.tab {
  background: transparent;
  border: none;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--fg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 120ms ease, border-color 120ms ease;
  font-variant-numeric: tabular-nums;
}
.tab:hover { color: var(--fg); }
.tab.is-active {
  color: var(--fg);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* --- Form selects --- */
.f-select {
  height: 32px;
  padding: 0 28px 0 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 12.5px;
  color: var(--fg);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 120ms ease, background 120ms ease;
}
.f-select:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.f-select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }

.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* --- Distribution bars --- */
.dist-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.dist-list li {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.dist-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-muted);
}
.dist-bar {
  height: 6px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
}
.dist-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 500; }

/* --- Vertical stat list --- */
.stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stat-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.stat-list .big-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-subtle);
}
.stat-list .big-value-sm {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* --- Storage ring --- */
.storage-wrap {
  display: flex;
  gap: 24px;
  align-items: center;
}
@media (max-width: 720px) { .storage-wrap { flex-direction: column; align-items: stretch; } }
.storage-ring-wrap { position: relative; width: 120px; height: 120px; flex: 0 0 120px; }
.storage-ring { color: var(--accent); display: block; }
.storage-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}
.storage-ring-center .big-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.storage-ring-center .sub {
  font-size: 11px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- EDR fleet grid --- */
.edr-fleet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .edr-fleet { grid-template-columns: 1fr; } }
.fleet-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fleet-stat .big-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-subtle);
}
.fleet-stat .big-value {
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fleet-stat .sub {
  font-size: 11.5px;
  color: var(--fg-muted);
}

/* --- Timeline --- */
.timeline {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: var(--border);
}
.timeline li {
  position: relative;
  padding: 14px 20px 14px 48px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 90ms ease;
}
.timeline li:last-child { border-bottom: none; }
.timeline li:hover { background: var(--hover); }
.timeline .tl-dot {
  position: absolute;
  left: 19px;
  top: 20px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--slate);
  border: 2px solid var(--panel);
  box-shadow: 0 0 0 1px var(--border);
}
.timeline .tl-dot.tl-accent { background: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, var(--border)); }
.timeline .tl-dot.tl-warn   { background: var(--amber); box-shadow: 0 0 0 1px color-mix(in srgb, var(--amber) 40%, var(--border)); }
.timeline .tl-dot.tl-crit   { background: var(--red);   box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 40%, var(--border)); }
.timeline .tl-body { flex: 1; min-width: 0; }
.timeline .tl-head {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.timeline .tl-head strong { font-weight: 600; color: var(--fg); font-size: 13.5px; }
.timeline .tl-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--fg-muted);
}
.timeline .tl-id {
  font-size: 11px;
  color: var(--fg-subtle);
  align-self: flex-start;
  margin-top: 2px;
}
.timeline-empty {
  padding: 24px;
  text-align: center;
  color: var(--fg-subtle);
  font-size: 13px;
}
.timeline.timeline-compact { padding: 0; }
.timeline.timeline-compact::before { left: 13px; }
.timeline.timeline-compact li {
  padding: 10px 0 10px 32px;
  border-bottom: none;
  cursor: default;
}
.timeline.timeline-compact li:hover { background: transparent; }
.timeline.timeline-compact .tl-dot { left: 7px; top: 14px; width: 11px; height: 11px; }

/* --- Priority chip (inline) --- */
.pri-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--fg);
  white-space: nowrap;
}
.pri-chip.crit { color: color-mix(in srgb, var(--red) 80%, var(--fg));    border-color: color-mix(in srgb, var(--red) 35%, var(--border));    background: color-mix(in srgb, var(--red) 8%, var(--panel)); }
.pri-chip.warn { color: color-mix(in srgb, var(--amber) 80%, var(--fg));  border-color: color-mix(in srgb, var(--amber) 35%, var(--border));  background: color-mix(in srgb, var(--amber) 8%, var(--panel)); }
.pri-chip.med  { color: color-mix(in srgb, var(--blue) 80%, var(--fg));   border-color: color-mix(in srgb, var(--blue) 35%, var(--border));   background: color-mix(in srgb, var(--blue) 8%, var(--panel)); }
.pri-chip.low  { color: var(--fg-muted); }

/* --- Status chips for EDR threats --- */
.status-chip.s-Active   { color: color-mix(in srgb, var(--red) 80%, var(--fg));   border-color: color-mix(in srgb, var(--red) 35%, var(--border));   background: color-mix(in srgb, var(--red) 8%, var(--panel)); }
.status-chip.s-Triaged  { color: color-mix(in srgb, var(--blue) 80%, var(--fg));  border-color: color-mix(in srgb, var(--blue) 35%, var(--border));  background: color-mix(in srgb, var(--blue) 8%, var(--panel)); }

/* --- Mono code --- */
.mono { font-family: var(--mono); font-size: 12px; }

/* --- Inline warning text in page subtitle --- */
.page-warn { color: var(--red); font-weight: 500; }

/* --- Drawer sections --- */
.drawer-section {
  margin: 20px 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-subtle);
}
.drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* --- Definition-list KV (dt left muted, dd right, 2-col) --- */
.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 14px;
  margin: 0;
}

/* --- Responsive: drill-down pages on mobile --- */
@media (max-width: 760px) {
  .dist-list li { grid-template-columns: 100px 1fr 42px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .filter-row > .search-inline { flex: 1 1 100%; min-width: 0; }
}

/* =========================================================================
   Reports hub (Phase 2)
   ========================================================================= */

/* Generic helpers used by the Reports view */
.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.panel-sub {
  font-size: 12.5px;
  color: var(--fg-muted);
  margin: 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
  gap: 10px;
}
.empty-state .empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-subtle);
  margin-bottom: 6px;
}
.empty-state .empty-icon svg { width: 22px; height: 22px; }
.empty-state h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}
.empty-state p {
  font-size: 13px;
  color: var(--fg-muted);
  max-width: 380px;
  margin: 0;
  line-height: 1.5;
}

/* Spinner used inside Generate PDF button */
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  margin-right: 6px;
  vertical-align: -2px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Reports catalog grid */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.report-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.report-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.report-card.is-generating {
  opacity: 0.85;
}

.report-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.report-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  background: var(--accent-soft);
  color: var(--accent);
}
.report-icon.tickets { background: var(--accent-soft); color: var(--accent); }
.report-icon.backups { background: var(--blue-bg); color: var(--blue); }
.report-icon.edr     { background: var(--green-bg); color: var(--green); }
.report-icon.soc     { background: var(--violet-bg); color: var(--violet); }
.report-icon svg { width: 20px; height: 20px; }

.report-card-meta h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}
.report-card-meta p {
  font-size: 12.5px;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.5;
}

.report-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.report-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.report-stat-label {
  font-size: 10.5px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.report-stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
}
.report-stat-value.ok { color: var(--green); }
.report-stat-value.warn { color: var(--amber); }
.report-stat-value.crit { color: var(--red); }

.report-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}
.report-card-foot .btn-primary { padding: 8px 12px; }
.report-card-note {
  font-size: 11.5px;
  color: var(--fg-subtle);
  font-variant-numeric: tabular-nums;
}

/* History table — tighter variant of data-table */
.history-panel { padding: 0; }
.history-panel .panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.history-table {
  width: 100%;
}
.history-cell { display: flex; align-items: center; gap: 8px; }

.report-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--fg);
}
.report-chip.tickets { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.report-chip.backups { color: var(--blue); background: var(--blue-bg); border-color: color-mix(in srgb, var(--blue) 22%, transparent); }
.report-chip.edr     { color: var(--green); background: var(--green-bg); border-color: color-mix(in srgb, var(--green) 22%, transparent); }
.report-chip.soc     { color: var(--violet); background: var(--violet-bg); border-color: color-mix(in srgb, var(--violet) 22%, transparent); }
.report-chip svg { width: 14px; height: 14px; }

.file-code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-muted);
  background: var(--panel-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  word-break: break-all;
}

/* Button disabled state (if not defined elsewhere) */
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Mobile tweaks */
@media (max-width: 760px) {
  .reports-grid { grid-template-columns: 1fr; gap: 12px; }
  .report-card { padding: 14px; }
  .report-card-stats { padding: 10px; }
  .history-table thead { display: none; }
  .history-table td { padding-top: 8px; padding-bottom: 8px; }
}

/* =========================================================================
   Login page (TorchSec branded)
   Standalone layout — rendered by index.html (login page) with body class `.auth-body`.
   ========================================================================= */

body.auth-body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Satoshi", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  min-height: 100vh;
}

/* --- Brand panel (left) --- */
.auth-brand {
  position: relative;
  background:
    radial-gradient(1200px 600px at 80% 20%, rgba(91, 91, 214, 0.18), transparent 60%),
    radial-gradient(800px 500px at 10% 110%, rgba(249, 115, 22, 0.16), transparent 60%),
    linear-gradient(180deg, #0b0c10 0%, #13131d 100%);
  color: #ecedf1;
  padding: 48px 56px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 40% 40%, black 40%, transparent 75%);
  pointer-events: none;
}
.auth-brand-inner {
  position: relative;
  max-width: 460px;
  width: 100%;
}

.auth-wordmark {
  margin-bottom: 56px;
}
.auth-logo {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  filter: drop-shadow(0 6px 22px rgba(220, 38, 38, 0.18));
}

.auth-heading {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  color: #ffffff;
  text-wrap: balance;
}
.auth-tagline {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(236, 237, 241, 0.72);
  margin: 0 0 28px;
  max-width: 420px;
}

.auth-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(236, 237, 241, 0.82);
}
.auth-bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(180deg, #F97316, #5B5BD6);
  flex: 0 0 6px;
}

.auth-brand-foot {
  font-size: 12px;
  color: rgba(236, 237, 241, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-brand-foot-sep { opacity: 0.5; }
.auth-brand-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(236, 237, 241, 0.2);
}
.auth-brand-link:hover { color: #ffffff; border-color: rgba(236, 237, 241, 0.5); }

/* --- Form column (right) --- */
.auth-form-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--bg);
}

.auth-panel {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.auth-panel.hidden { display: none; }

.auth-panel-head { margin-bottom: 22px; }
.auth-panel-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  color: var(--fg);
}
.auth-panel-head p {
  font-size: 13.5px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0;
}

/* Tiles */
.auth-tiles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}
.auth-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  font: inherit;
  color: inherit;
}
.auth-tile:hover {
  border-color: var(--accent);
  background: var(--panel);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.auth-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.auth-tile-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-tile-icon svg { width: 22px; height: 22px; }
.auth-tile-icon.msp {
  background: var(--accent-soft);
  color: var(--accent);
}
.auth-tile-icon.client {
  background: color-mix(in srgb, #F97316 16%, transparent);
  color: #F97316;
}
.auth-tile-meta { flex: 1 1 auto; min-width: 0; }
.auth-tile-meta h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.auth-tile-meta p {
  font-size: 12.5px;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.5;
}
.auth-tile-chev {
  color: var(--fg-subtle);
  display: flex;
  align-items: center;
}
.auth-tile-chev svg { width: 16px; height: 16px; }
.auth-tile:hover .auth-tile-chev { color: var(--accent); }

.auth-footnote {
  font-size: 12.5px;
  color: var(--fg-muted);
  margin: 0;
  text-align: center;
}
.auth-footnote a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.auth-footnote a:hover { text-decoration: underline; }

/* Form fields */
.auth-back {
  background: transparent;
  border: 0;
  padding: 6px 10px 6px 6px;
  margin: 0 0 14px -6px;
  color: var(--fg-muted);
  font: inherit;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border-radius: 6px;
}
.auth-back:hover { background: var(--hover); color: var(--fg); }
.auth-back svg { width: 14px; height: 14px; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.auth-field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}
.auth-field input {
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.auth-field input:hover {
  border-color: var(--border-strong);
}
.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.auth-error {
  padding: 10px 12px;
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.auth-submit {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  margin-top: 4px;
}

/* Shake animation on invalid login */
.auth-panel.shake {
  animation: authShake 360ms ease-in-out;
}
@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* Help note under the sign-in form */
.auth-help-note {
  margin: 20px 0 0;
  font-size: 12.5px;
  color: var(--fg-subtle);
  line-height: 1.5;
  text-align: center;
}
.auth-help-note a {
  color: var(--accent);
  text-decoration: none;
}
.auth-help-note a:hover { text-decoration: underline; }

/* Disabled submit button during login request */
.auth-submit:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* Mobile */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand {
    min-height: auto;
    padding: 32px 28px;
    align-items: flex-start;
  }
  .auth-brand-inner { max-width: none; }
  .auth-wordmark { margin-bottom: 28px; }
  .auth-logo { max-width: 240px; }
  .auth-heading { font-size: 26px; }
  .auth-tagline { font-size: 14px; margin-bottom: 20px; }
  .auth-bullets { margin-bottom: 24px; }
  .auth-form-col { padding: 28px 18px; }
  .auth-panel { padding: 24px; }
}

/* Utility for login page only — keeps app.html untouched */
.hidden { display: none !important; }

/* =========================================================================
   Sidebar user pod — sign-out affordance on the dashboard
   ========================================================================= */
.sidebar-user {
  position: relative;
}
.sidebar-signout {
  margin-left: auto;
  background: transparent;
  border: 0;
  padding: 4px;
  border-radius: 6px;
  color: var(--fg-subtle);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, color 140ms ease;
}
.sidebar-signout:hover {
  background: var(--hover);
  color: var(--red);
}
.sidebar-signout svg { width: 14px; height: 14px; }

/* =========================================================================
   Autotask live banner (MSP Overview top)
   ========================================================================= */
.at-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  margin-bottom: 16px;
  font-size: 13px;
}
.at-banner .at-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex: 0 0 8px;
  background: var(--fg-subtle);
}
.at-banner .at-title {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 2px;
}
.at-banner .at-sub {
  color: var(--fg);
  font-variant-numeric: tabular-nums lining-nums;
}
.at-banner .at-label { color: var(--fg-subtle); }

.at-banner-loading .at-dot { background: #9ca3af; animation: at-pulse 1.2s ease-in-out infinite; }
.at-banner-live    .at-dot { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }
.at-banner-setup   { border-color: #eab308; background: color-mix(in srgb, #eab308 6%, var(--panel)); }
.at-banner-setup   .at-dot { background: #eab308; }
.at-banner-error   { border-color: #dc2626; background: color-mix(in srgb, #dc2626 6%, var(--panel)); }
.at-banner-error   .at-dot { background: #dc2626; }

@keyframes at-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
