/* ==========================================================================
   AadeeRMM design system — "Tidewater": teal + ink on warm paper.
   ========================================================================== */
:root {
  --accent: #0d9488;
  --accent-2: #6366f1;
  --accent-ink: #0f766e;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 35%, transparent);

  --bg: #f4f4f0;
  --surface: #ffffff;
  --surface-2: #f8f8f5;
  --hover: #f1f1ec;
  --border: #e5e5de;
  --border-strong: #d2d2c9;
  --text: #0c1321;
  --text-2: #4b5366;
  --text-3: #8a91a0;
  --link: var(--accent-ink);

  --ok: #16a34a;
  --warn: #d97706;
  --bad: #e11d48;
  --unk: #9aa1ad;
  --ring-track: #ecece6;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px -2px rgba(16, 24, 40, .06);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .05), 0 12px 28px -10px rgba(16, 24, 40, .18);
  --shadow-lg: 0 28px 70px -20px rgba(12, 19, 33, .38);
  --display: Manrope, Inter, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0d10; --surface: #11151a; --surface-2: #0d1115; --hover: #161b21; --border: #1e252d; --border-strong: #2b343e;
    --text: #e9edf0; --text-2: #a7b0ba; --text-3: #6b7581; --link: #5eead4; --ring-track: #1d242b;
    --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-hover: 0 12px 28px -10px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0d10; --surface: #11151a; --surface-2: #0d1115; --hover: #161b21; --border: #1e252d; --border-strong: #2b343e;
  --text: #e9edf0; --text-2: #a7b0ba; --text-3: #6b7581; --link: #5eead4; --ring-track: #1d242b;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-hover: 0 12px 28px -10px rgba(0, 0, 0, .6); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
[hidden] { display: none !important; }
.i { width: 16px; height: 16px; flex: none; vertical-align: middle; }
.i.lg { width: 19px; height: 19px; }
.mono { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--text-3); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .unk { color: var(--unk); }
.grow { flex: 1; min-width: 0; }
.link { font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.eyebrow a { color: inherit; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.appbar {
  position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 22px;
  background: color-mix(in srgb, var(--surface) 84%, transparent); backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; margin-right: 10px; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand .word { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.03em; white-space: nowrap; }
.brand .word span { color: var(--accent); }
.mainnav { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.mainnav a { display: flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; color: var(--text-2); font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none !important; transition: background .15s, color .15s; }
.mainnav a:hover { color: var(--text); background: var(--hover); }
.mainnav a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.mainnav a.on .i { color: var(--accent); }
.mainnav .count { background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 10px; line-height: 17px; }
.searchbtn { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 8px 0 12px; min-width: 220px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); }
.searchbtn span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchbtn:hover { border-color: var(--border-strong); color: var(--text-2); }
kbd { font: 600 10.5px Inter, sans-serif; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: none; border-radius: 11px; color: var(--text-2); text-decoration: none !important; }
.icon-btn:hover, .icon-btn.on { background: var(--hover); color: var(--text); }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.avatar { width: 36px; height: 36px; border-radius: 12px; border: 0; margin-left: 4px; background: linear-gradient(135deg, var(--accent), var(--accent-ink)); color: #fff; font-weight: 700; font-size: 12.5px; font-family: var(--display); }
.banner { display: flex; align-items: center; gap: 10px; padding: 8px 24px; font-size: 13px; background: linear-gradient(90deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 8%, transparent)); border-bottom: 1px solid var(--border); }
.banner:empty { display: none; }
.banner .i { color: var(--accent); }
.banner.sub-warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.banner.sub-warn .i { color: var(--warn); }
.banner .x { margin-left: auto; background: none; border: 0; color: var(--text-3); padding: 2px; }
.view { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px 28px 40px; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 14px 28px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }
.footer a { color: var(--text-3); margin-right: 18px; }
@media (max-width: 1800px) { .mainnav a { padding: 7px 11px; gap: 6px; } }
/* Narrower screens: icons only (each has a tooltip), keeping the label of the current page. */
@media (max-width: 1560px) { .mainnav a { padding: 7px 11px; } .mainnav a:not(.on) span:not(.count) { display: none; } .searchbtn { min-width: 0; } .searchbtn span, .searchbtn kbd { display: none; } }
@media (max-width: 1180px) { .mainnav a span:not(.count) { display: none; } .searchbtn { min-width: 0; } .searchbtn span, .searchbtn kbd { display: none; } }
@media (max-width: 760px) {
  .appbar { padding: 0 12px; gap: 4px; } .brand .word { display: none; } .brand { margin-right: 2px; }
  .view { padding: 18px 16px 32px; } .footer { padding: 14px 16px; flex-direction: column; }
  .appbar [data-act="pinsMenu"], .appbar [data-act="theme"] { display: none; }
}

/* ---------- page header ---------- */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.pagehead h1 { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 0; line-height: 1.15; display: flex; align-items: center; gap: 10px; }
.pagehead .lede { margin: 6px 0 0; color: var(--text-2); font-size: 14.5px; }
.pagehead .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagehead .who { display: flex; align-items: center; gap: 14px; }
.crumbs { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.crumbs a { color: var(--text-2); }
.crumbs .sep { margin: 0 6px; }
/* legacy header (admin, alerts, placeholder pages) */
.phead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.phead h1 { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.phead .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.phead .sub { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.phead .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.star { background: none; border: 0; padding: 4px; color: var(--text-3); border-radius: 8px; display: inline-grid; }
.star:hover { color: #f59e0b; background: var(--hover); }
.star.on { color: #f59e0b; }
.star.on svg { fill: currentColor; }
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin: 6px 0 20px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 7px 14px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; text-decoration: none !important; }
.tabs a:hover { color: var(--text); }
.tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.sechead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.sechead:first-child { margin-top: 0; }
.sechead h2 { font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.refresh { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-3); }
.refresh button { background: none; border: 0; color: var(--text-3); padding: 5px; border-radius: 8px; display: grid; }
.refresh button:hover { background: var(--hover); color: var(--text); }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none !important; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.15); }
.btn.primary:hover { background: var(--accent-ink); }
.btn.ghost { border-color: transparent; background: none; color: var(--link); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 70px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-ico { position: relative; }
.input-ico .i { position: absolute; left: 12px; top: 12px; color: var(--text-3); }
.input-ico .input { padding-left: 36px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; color: var(--text-2); }
.toggle { position: relative; width: 38px; height: 22px; flex: none; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 22px; transition: .15s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:disabled + span { opacity: .5; cursor: not-allowed; }
.trow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.trow:last-child { border-bottom: 0; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.card > h3, .card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--display); font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 14px; }
.card-h .muted { font-family: Inter, sans-serif; font-weight: 500; font-size: 12px; }
.card-h .ct { display: flex; align-items: center; gap: 8px; }
a.card { color: inherit; text-decoration: none !important; transition: box-shadow .2s, border-color .2s, transform .2s; }
a.card:hover { box-shadow: var(--shadow-hover); border-color: var(--border-strong); transform: translateY(-2px); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols.device { grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr) minmax(0, 1fr); }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 1200px) { .cols, .cols.device { grid-template-columns: 1fr 1fr; } .cols > .col:last-child { grid-column: 1 / -1; } }
@media (max-width: 900px) { .grid-2, .grid-3, .cols, .cols.device { grid-template-columns: 1fr; } }

/* hero: fleet score + stats */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr); gap: 18px; }
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; } }
.scorecard { display: flex; align-items: center; gap: 26px; padding: 24px 26px; background:
  radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%), var(--surface); }
.scorecard p { margin: 6px 0 14px; color: var(--text-2); font-size: 13px; }
.score-word { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; margin-top: 4px; }
.ring { flex: none; display: block; }
.ring-ok { color: var(--ok); } .ring-warn { color: var(--warn); } .ring-bad { color: var(--bad); }
.ring-num { fill: var(--text); font-family: var(--display); font-weight: 800; letter-spacing: -.04em; }
.ring circle:last-of-type { transition: stroke-dashoffset .8s cubic-bezier(.2, .7, .2, 1); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stats.pstats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 4px; }
@media (max-width: 1000px) { .stats.pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; }
.stat .top { display: flex; align-items: center; justify-content: space-between; }
.stat .sico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
.stat .v { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; margin-top: 8px; }
.stat .l { font-weight: 600; font-size: 13.5px; }
.stat .s { font-size: 12.5px; color: var(--text-3); }
.stat .progress { margin-top: 10px; }
.progress { height: 6px; border-radius: 6px; background: var(--ring-track); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.tint-ok { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.tint-bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.tint-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.tint-acc { background: var(--accent-soft); color: var(--accent-ink); }
.tint-unk { background: color-mix(in srgb, var(--unk) 16%, transparent); color: var(--text-2); }
:root[data-theme="dark"] .tint-acc { color: #5eead4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tint-acc { color: #5eead4; } }

/* stacked health bar */
.stack { display: flex; height: 10px; border-radius: 10px; overflow: hidden; gap: 2px; background: var(--ring-track); }
.stack.thin { height: 6px; }
.stack a, .stack span { display: block; height: 100%; }
.stack a:hover { filter: brightness(1.1); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.legend a { color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* attention list */
.att { display: flex; flex-direction: column; }
.att a { display: flex; align-items: center; gap: 12px; padding: 11px 10px; margin: 0 -10px; border-radius: 12px; color: var(--text); text-decoration: none !important; }
.att a:hover { background: var(--hover); }
.att .aico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.att .t { font-weight: 600; }
.att .s { font-size: 12.5px; color: var(--text-3); }
.att .chev { color: var(--text-3); }
.allclear { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 8%, transparent); }
.allclear .i { width: 28px; height: 28px; color: var(--ok); }

/* horizontal bars */
.hbars { display: flex; flex-direction: column; gap: 11px; }
.hbars a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; color: var(--text); text-decoration: none !important; font-size: 13px; }
.hbars a:hover .bar span { filter: brightness(1.08); }
.hbars .n { font-weight: 700; font-variant-numeric: tabular-nums; }
.hbars .bar { grid-column: 1 / -1; height: 7px; border-radius: 7px; background: var(--ring-track); overflow: hidden; }
.hbars .bar span { display: block; height: 100%; border-radius: 7px; }

/* customer cards */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.ccard { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.cc-top { display: flex; align-items: center; gap: 12px; }
.cc-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-foot { display: flex; gap: 6px; flex-wrap: wrap; }
.avatar-sq { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 14px;
  background: hsl(var(--h) 60% 93%); color: hsl(var(--h) 45% 30%); }
.avatar-sq.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 19px; }
:root[data-theme="dark"] .avatar-sq { background: hsl(var(--h) 35% 18%); color: hsl(var(--h) 70% 78%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar-sq { background: hsl(var(--h) 35% 18%); color: hsl(var(--h) 70% 78%); } }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip .i { width: 13px; height: 13px; }

/* timeline */
.timeline { position: relative; display: flex; flex-direction: column; max-height: 520px; overflow-y: auto; margin: 0 -22px -20px; padding: 0 22px 12px; scrollbar-width: thin; }
.tl { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 15px; top: 40px; bottom: -10px; width: 2px; background: var(--border); }
.tl:last-child::before { display: none; }
.tl .ai { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; z-index: 1; }
.tl .ai .i { width: 15px; height: 15px; }
.tl .at { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.tl time { font-weight: 500; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.tl .ad { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
/* older activity markup */
.feed { max-height: 560px; overflow-y: auto; margin: 0 -22px -20px; padding: 0 22px; scrollbar-width: thin; }
.act { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.act:last-child { border-bottom: 0; }
.act .ai { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.act .ai .i { width: 14px; height: 14px; }
.act .at { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.act .at time { font-weight: 400; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.act .ad { font-size: 12.5px; color: var(--text-2); margin-top: 1px; overflow-wrap: anywhere; }

/* composition */
.compo { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px; }
.compo div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.compo b { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.compo span { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }

/* ---------- fleet table ---------- */
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.quick a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px; text-decoration: none !important; }
.quick a b { font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.quick a:hover { border-color: var(--border-strong); color: var(--text); }
.quick a.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.quick a.on b { color: color-mix(in srgb, var(--surface) 70%, transparent); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input-ico { flex: 1; min-width: 220px; max-width: 380px; }
.toolbar select.input { width: auto; min-width: 160px; }
.toolbar .sp { flex: 1; }
.table-wrap { overflow-x: auto; margin: 0 -22px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .table-wrap { margin: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { text-align: left; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; user-select: none; }
table.data th[data-sort] { cursor: pointer; }
table.data th[data-sort]:hover { color: var(--text); }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--hover); }
table.data tr[data-drawer] { cursor: pointer; }
table.data th:first-child, table.data td:first-child { padding-left: 22px; }
table.data th:last-child, table.data td:last-child { padding-right: 22px; }
table.data td a { color: var(--text); font-weight: 600; }
.dname { display: flex; align-items: center; gap: 10px; }
.dname .dk { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); flex: none; }
.dname .dk .i { width: 15px; height: 15px; }
.dname .sub { font-size: 12px; color: var(--text-3); font-weight: 500; }
.mini { display: flex; align-items: center; gap: 8px; min-width: 96px; }
.mini .bar { flex: 1; height: 6px; border-radius: 6px; background: var(--ring-track); overflow: hidden; min-width: 44px; }
.mini .bar span { display: block; height: 100%; border-radius: 6px; }
.mini em { font-style: normal; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; width: 32px; text-align: right; }
.hpill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.hpill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.hdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--unk); }
.status.on::before { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.icons { display: flex; gap: 6px; flex: none; }
.icons .i { width: 15px; height: 15px; }
.pager { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.pager button { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--text-2); padding: 0; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager button:not(:disabled):hover { background: var(--hover); }
.tfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.bulk { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 14px; font-size: 13px; flex-wrap: wrap; }
.bulk b { margin-right: 8px; }
.filter-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px 5px 12px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 600; }
.filter-tag button { border: 0; background: none; color: inherit; padding: 0; display: grid; }

/* device rows (customer page) */
.list { max-height: 560px; overflow-y: auto; margin: 0 -22px -20px; border-top: 1px solid var(--border); scrollbar-width: thin; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 11px 22px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: var(--hover); }
.lrow .t { font-weight: 600; }
.lrow .s { font-size: 12px; color: var(--text-3); }
.lrow .grow > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- drawer ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 70; }
.drawer-bg { position: absolute; inset: 0; background: rgba(8, 12, 20, .32); opacity: 0; transition: opacity .2s; }
.drawer { position: absolute; top: 0; right: 0; height: 100%; width: min(480px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.drawer-wrap.open .drawer { transform: none; }
.drawer-wrap.open .drawer-bg { opacity: 1; }
.dr-head { display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px 16px; }
.dr-head h3 { font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 8px; }
.dr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dr-actions { display: flex; gap: 8px; padding: 0 22px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.dr-body { flex: 1; overflow-y: auto; padding: 20px 22px 28px; display: flex; flex-direction: column; gap: 22px; }
.dr-body h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.meters div { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.meters b { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.meters span { font-size: 12px; color: var(--text-2); }
.meters .progress { margin-top: 8px; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.ktile { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.ktile .i { width: 21px; height: 21px; }

/* ---------- device page ---------- */
.devhead { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 6px; }
.devhead .ktile { width: 58px; height: 58px; border-radius: 16px; }
.devhead .ktile .i { width: 26px; height: 26px; }
.devhead h1 { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 8px; display: flex; align-items: center; gap: 6px; }
.dh-facts { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.dh-facts span { display: inline-flex; align-items: center; gap: 6px; }
.dh-facts .i { color: var(--text-3); }
.dh-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.hdr-actions { display: flex; gap: 2px; }
.hdr-actions button { background: none; border: 0; width: 34px; height: 34px; border-radius: 10px; color: var(--accent-ink); display: grid; place-items: center; }
.hdr-actions button:hover { background: var(--accent-soft); }
.perf .big { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.perf .big b { font-family: var(--display); font-size: 22px; color: var(--text); font-weight: 800; margin-right: 4px; letter-spacing: -.03em; }
.chart { width: 100%; height: 64px; display: block; }
.meter { height: 8px; background: var(--ring-track); border-radius: 8px; overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; border-radius: 8px; }
.info { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 13.5px; margin: 0; }
.info dt { color: var(--text-3); }
.info dd { margin: 0; overflow-wrap: anywhere; }
.info h4 { grid-column: 1 / -1; margin: 12px 0 2px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); padding-top: 14px; border-top: 1px solid var(--border); }
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-size: 13px; border: 1px solid; }
.alert.bad { background: color-mix(in srgb, var(--bad) 7%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert.warn { background: color-mix(in srgb, var(--warn) 8%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.alert.info { background: var(--accent-soft); border-color: var(--accent-line); }
.alert.good { background: color-mix(in srgb, var(--ok) 8%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.alert.bad > .i { color: var(--bad); } .alert.warn > .i { color: var(--warn); } .alert.info > .i { color: var(--accent-ink); } .alert.good > .i { color: var(--ok); }
.alert .btn { margin-left: auto; }
.notes { display: flex; flex-direction: column; gap: 10px; }
.note { padding: 11px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.note .nm { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.note .nm b { color: var(--text-2); }
.note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note button { border: 0; background: none; color: var(--text-3); padding: 0; font-size: 12px; }
.note button:hover { color: var(--bad); }

/* ---------- misc (older components kept for other pages) ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr) !important; } }
.kpi { display: flex; gap: 12px; align-items: center; padding: 16px 18px; }
.kpi .kico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi .kv { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi .kl { font-size: 12.5px; color: var(--text-2); }
.kpi .kd { font-size: 11.5px; color: var(--text-3); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kv-table { width: 100%; border-collapse: collapse; }
.kv-table td { padding: 8px 0; border-bottom: 1px solid var(--border); }
.kv-table tr:last-child td { border-bottom: 0; }
.kv-table td:last-child { text-align: right; }
.empty { text-align: center; padding: 64px 20px; color: var(--text-2); }
.empty .eico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--accent-soft); color: var(--accent-ink); }
.empty .eico .i { width: 28px; height: 28px; }
.empty h3 { margin: 0 0 6px; color: var(--text); font-family: var(--display); font-size: 18px; font-weight: 800; }
.empty p { margin: 0 auto 16px; max-width: 440px; }

/* admin */
.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; margin-top: 14px; align-items: start; }
.anav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; position: sticky; top: 84px; }
.anav .ah { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; font-weight: 700; border-radius: 10px; color: var(--text); text-decoration: none !important; font-size: 13.5px; }
.anav .ah:hover { background: var(--hover); }
.anav .as { padding: 2px 0 8px; }
.anav .as a { display: block; padding: 7px 12px 7px 24px; color: var(--text-2); font-size: 13px; text-decoration: none; border-radius: 9px; }
.anav .as a:hover { background: var(--hover); color: var(--text); }
.anav .as a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.acontent { min-width: 0; }
.acontent h2 { font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 16px; }
.scard { margin-bottom: 14px; }
.scard .sh { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.scard .sh h3 { margin: 0; font-size: 15px; font-family: var(--display); font-weight: 800; }
.scard .sh p { margin: 3px 0 12px; color: var(--text-2); font-size: 13px; }
.scard dl { display: grid; grid-template-columns: 200px 1fr; gap: 8px 12px; margin: 0; font-size: 13.5px; }
.scard dt { color: var(--text-3); }
.scard dd { margin: 0; }
@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } .anav { position: static; } .scard dl, .info, .facts { grid-template-columns: 1fr; } }
.preview-login { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; min-height: 260px; }
.preview-login .pl-l { background: linear-gradient(150deg, #0c1321, color-mix(in srgb, var(--accent) 55%, #0c1321)); color: #fff; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; }
.preview-login .pl-r { padding: 28px; display: flex; flex-direction: column; gap: 10px; justify-content: center; background: var(--surface); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatches button { width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.swatches button.on { box-shadow: 0 0 0 2px var(--text); }

/* ---------- overlays ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(8, 12, 20, .42); backdrop-filter: blur(3px); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; animation: fade .12s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); animation: pop .16s ease; overflow: hidden; }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-h h3 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.modal-b { padding: 20px 22px; max-height: 64vh; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.palette { max-width: 640px; }
.palette .pin { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.palette .pin input { flex: 1; border: 0; background: none; outline: none; font-size: 16px; }
.palette .pres { max-height: 420px; overflow-y: auto; padding: 8px; }
.palette .pg { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 10px 12px 4px; }
.palette .pi { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.palette .pi .s { margin-left: auto; font-size: 12px; color: var(--text-3); }
.palette .pi.sel { background: var(--accent-soft); }
.palette .pi.sel .i { color: var(--accent-ink); }
.palette .pf { display: flex; gap: 14px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); }
.menu { position: fixed; z-index: 90; min-width: 230px; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .12s ease; }
.menu .mi { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--text); text-decoration: none; }
.menu .mi:hover { background: var(--hover); text-decoration: none; }
.menu .mi .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .mh { padding: 8px 10px 6px; font-size: 12px; color: var(--text-3); }
.menu .mg { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px 0; }
.notif { width: 380px; padding: 0; }
.notif .nh { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-family: var(--display); }
.notif .ni { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.notif .ni:last-child { border-bottom: 0; }
.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; align-items: center; font-size: 13.5px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; background: #0c1321; color: #e5e9ef; padding: 12px 15px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .15s ease; max-width: 400px; }
.toast .i { color: #5eead4; }
.toast.err .i { color: #fb7185; }

/* ---------- sign-in ---------- */
.auth { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); overflow: auto; }
.auth-l { position: relative; overflow: hidden; color: #e7edf2; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: radial-gradient(90% 70% at 10% 110%, color-mix(in srgb, var(--accent) 65%, transparent), transparent 60%),
              radial-gradient(60% 50% at 100% 0%, color-mix(in srgb, var(--accent-2) 40%, transparent), transparent 60%), #0b1220; }
.auth-l::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(70% 60% at 30% 40%, #000, transparent); pointer-events: none; }
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.auth-brand svg { width: 40px; height: 40px; }
.auth-brand span span { color: #5eead4; }
.auth-pitch { position: relative; z-index: 1; }
.auth-pitch h1 { font-family: var(--display); font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.04em; color: #fff; font-weight: 800; }
.auth-pitch p { color: #aebacb; font-size: 16px; margin: 0 0 26px; max-width: 440px; }
.auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-pitch li { display: flex; align-items: center; gap: 10px; color: #d8e1ea; }
.auth-pitch li .i { color: #5eead4; }
.auth-foot { position: relative; z-index: 1; font-size: 12px; color: #6f7d92; }
.auth-r { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { margin: 0 0 6px; font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.auth-card > p { margin: 0 0 22px; }
.auth-btn { width: 100%; height: 44px; margin-top: 4px; }
.auth-btn:disabled { opacity: .6; cursor: wait; }
.auth-err { color: var(--bad); font-size: 13px; margin-top: 10px; min-height: 1em; }
.auth-err:empty { display: none; }
.auth-note { background: var(--accent-soft); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.auth-alt { font-size: 13px; margin-top: 18px; color: var(--text-3); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); font: inherit; }
.linkbtn:hover { text-decoration: underline; }
.qr { display: grid; place-items: center; margin: 4px 0 12px; }
.qr svg { width: 188px; height: 188px; border-radius: 12px; border: 1px solid var(--border); }
.auth-key { font-size: 13px; margin-bottom: 16px; color: var(--text-2); }
.auth-key summary { cursor: pointer; color: var(--link); }
.auth-key code { display: block; margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; letter-spacing: .06em; word-break: break-all; }
.code-in { font-size: 20px; letter-spacing: .3em; text-align: center; height: 48px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); font-size: 14px; text-align: center; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-l { display: none; } }

/* agent install dialog */
.steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 12px; }
.steps li { padding-left: 4px; }
.cmd { margin: 8px 0; padding: 11px 13px; border-radius: 10px; background: #0c1321; color: #e4e4e7; word-break: break-all; font-size: 12.5px; user-select: all; }

/* ---------- demo windows (remote preview / terminal) ---------- */
.win { position: fixed; z-index: 60; background: #0b1426; border-radius: 12px; box-shadow: 0 30px 70px -10px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); display: flex; flex-direction: column; overflow: hidden; min-width: 360px; min-height: 240px; resize: both; }
.win.max { left: 8px !important; top: 8px !important; width: calc(100vw - 16px) !important; height: calc(100vh - 16px) !important; resize: none; }
.win.min { display: none; }
.win-title { display: flex; align-items: center; gap: 9px; height: 36px; padding-left: 12px; background: #eef0ec; color: #1e293b; font-size: 12.5px; cursor: move; user-select: none; flex: none; }
:root[data-theme="dark"] .win-title { background: #1a2129; color: #e2e8f0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .win-title { background: #1a2129; color: #e2e8f0; } }
.win-title .win-ico { display: grid; color: var(--accent); }
.win-title .win-meta { color: #64748b; }
.win-btns { margin-left: auto; display: flex; height: 100%; }
.win-btns button { width: 44px; border: 0; background: none; color: inherit; display: grid; place-items: center; }
.win-btns button:hover { background: rgba(100,116,139,.2); }
.win-btns button.close:hover { background: #e81123; color: #fff; }
.win-btns .i { width: 14px; height: 14px; }
.win-body { flex: 1; position: relative; display: flex; flex-direction: column; min-height: 0; }
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 70; display: flex; gap: 8px; }
.dock button { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 0; background: #0c1321; color: #e2e8f0; box-shadow: var(--shadow-lg); font-size: 12.5px; }
.dock button .i { color: #5eead4; }
.rc-bar { display: flex; align-items: center; height: 40px; padding: 0 10px; background: #0f2a2a; color: #d5ece8; flex: none; gap: 4px; position: relative; }
.rc-bar .name { font-size: 12.5px; font-weight: 600; margin-right: 6px; }
.rc-bar .grp-c { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; }
.rc-bar .grp-r { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.rc-bar button { width: 32px; height: 30px; border: 0; background: none; color: inherit; border-radius: 7px; display: grid; place-items: center; }
.rc-bar button:hover { background: rgba(255,255,255,.12); }
.rc-bar button.rec { color: #fb7185; }
.rc-bar .vsep { width: 1px; height: 18px; background: rgba(255,255,255,.2); margin: 0 4px; }
.rc-screen { flex: 1; position: relative; overflow: hidden; background: #06282a; color: #fff; }
.rc-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.rc-state h2 { font-weight: 400; font-size: 30px; margin: 0; }
.ring-load { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .9s linear infinite; }
.wallpaper { position: absolute; inset: 0; background: radial-gradient(120% 90% at 20% 110%, #0b4fd8 0%, transparent 55%), radial-gradient(80% 90% at 85% 10%, #1c6cff 0%, transparent 55%), linear-gradient(135deg, #0a2a9e 0%, #0b3bd1 40%, #0a1a6b 100%); }
.lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: 7%; z-index: 1; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.lock .ltxt { font-size: clamp(13px, 1.6vw, 20px); font-weight: 600; margin-top: 8px; }
.lock .clock { font-size: clamp(56px, 10vw, 140px); font-weight: 600; letter-spacing: -.02em; line-height: 1; margin-top: 4%; }
.lock .date { font-size: clamp(16px, 2vw, 28px); font-weight: 500; margin-top: 12px; }
.lock .i.lk { width: 32px; height: 32px; }
.cad { position: absolute; inset: 0; z-index: 2; background: #0a3d91; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.cad button { background: none; border: 0; color: #fff; font-size: 16px; padding: 7px 18px; border-radius: 4px; min-width: 200px; }
.cad button:hover { background: rgba(255,255,255,.12); }
.cad .cancel { margin-top: 30px; border: 1px solid rgba(255,255,255,.5); min-width: 120px; font-size: 14px; }
.rc-menu { position: absolute; z-index: 5; top: 40px; background: #0f2a2a; color: #d5ece8; border-radius: 0 0 10px 10px; padding: 4px 0; min-width: 210px; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 12.5px; }
.rc-menu div { display: flex; align-items: center; gap: 8px; padding: 6px 14px; cursor: pointer; }
.rc-menu div:hover { background: rgba(255,255,255,.1); }
.rc-menu .ck { width: 14px; display: grid; }
.rc-recbadge { position: absolute; top: 10px; right: 12px; z-index: 3; display: flex; align-items: center; gap: 6px; font-size: 12px; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: 20px; }
.rc-recbadge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.term { flex: 1; background: #0c0c14; color: #d4d4d8; font: 13px/1.5 "JetBrains Mono", Consolas, monospace; padding: 12px 14px; overflow-y: auto; cursor: text; }
.term .ps { color: #5eead4; }
.term .err { color: #fca5a5; }
.term .dim { color: #71717a; }
.term pre { margin: 0; white-space: pre-wrap; font: inherit; }
.term-in { display: flex; gap: 8px; }
.term-in input { flex: 1; background: none; border: 0; outline: none; color: #fafafa; font: inherit; padding: 0; }

/* ---------- infrastructure (top of overview) ---------- */
.infra { position: relative; margin-bottom: 18px; padding: 22px 24px; border-radius: 20px; color: #e8f1f0; overflow: hidden;
  background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%),
              radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--accent-2) 35%, transparent), transparent 60%), #0c1624;
  box-shadow: 0 20px 40px -24px rgba(12, 22, 36, .6); }
.infra::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 36px 36px; }
.infra > * { position: relative; z-index: 1; }
.infra .eyebrow { color: #8fb3b0; }
.infra h2 { margin: 2px 0 0; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.infra-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.infra-sum { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; text-decoration: none !important; }
.infra-sum.ok { background: rgba(34, 197, 94, .16); color: #86efac; }
.infra-sum.bad { background: rgba(244, 63, 94, .2); color: #fecdd3; box-shadow: inset 0 0 0 1px rgba(244, 63, 94, .45); animation: pulse 2.4s ease-in-out infinite; }
.infra-sum b { font-size: 16px; color: #fff; }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 1px rgba(244, 63, 94, .45), 0 0 0 6px rgba(244, 63, 94, .12); } }
.itiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.itile { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 14px 18px; border-radius: 14px; color: #e8f1f0; text-decoration: none !important;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); transition: background .15s, transform .15s; overflow: hidden; }
.itile:hover { background: rgba(255, 255, 255, .1); transform: translateY(-1px); }
.itile .iic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(94, 234, 212, .14); color: #5eead4; flex: none; }
.itile.has-off .iic { background: rgba(244, 63, 94, .18); color: #fda4af; }
.itile .il { font-size: 12.5px; color: #9fb4c3; font-weight: 600; }
.itile .iv { font-size: 13px; color: #c9d6df; }
.itile .iv b { font-family: var(--display); font-size: 20px; color: #fff; letter-spacing: -.03em; }
.itile .ioff { font-size: 11.5px; font-weight: 700; color: #fff; background: #e11d48; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.itile .iok { color: #4ade80; display: grid; }
.itile .ibar { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.itile .ibar span { display: block; height: 100%; background: #2dd4bf; border-radius: 3px; }
.itile.has-off .ibar span { background: linear-gradient(90deg, #2dd4bf, #fb7185); }
.olist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.ocard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none !important; color: #fff;
  background: linear-gradient(135deg, rgba(225, 29, 72, .22), rgba(225, 29, 72, .08)); border: 1px solid rgba(251, 113, 133, .35); transition: transform .15s, background .15s; }
.ocard:hover { transform: translateY(-1px); background: linear-gradient(135deg, rgba(225, 29, 72, .3), rgba(225, 29, 72, .12)); }
.ocard .oic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 0, 0, .25); color: #fda4af; flex: none; }
.ocard .on { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard .os { font-size: 12px; color: #fbcfd6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard .ot { text-align: right; font-size: 11px; color: #fbcfd6; line-height: 1.2; white-space: nowrap; }
.ocard .ot b { display: block; font-size: 13px; color: #fff; }
.ocard.more { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }

/* ---------- customer cards (workstations / servers / network) ---------- */
.ccard { position: relative; overflow: hidden; }
.ccard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ok); }
.ccard.cc-warn::before { background: var(--warn); }
.ccard.cc-bad::before { background: var(--bad); }
.cc-rows { display: flex; flex-direction: column; gap: 10px; }
.ccr { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 2px 8px; font-size: 13px; }
.ccr-ic { color: var(--text-3); display: grid; }
.ccr-ic .i { width: 15px; height: 15px; }
.ccr-l { color: var(--text-2); font-weight: 500; }
.ccr-v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ccr-bar { grid-column: 2 / -1; height: 5px; border-radius: 5px; background: var(--ring-track); overflow: hidden; }
.ccr-bar span { display: block; height: 100%; border-radius: 5px; }

.hbars .hrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13px; }

/* ---------- customer report ---------- */
.report { max-width: 960px; margin: 0 auto; padding: 36px 40px; display: flex; flex-direction: column; gap: 26px; }
.report h3 { font-family: var(--display); font-size: 16px; font-weight: 800; margin: 0 0 12px; }
.rep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 20px; border-bottom: 2px solid var(--text); }
.rep-title { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.rep-summary { display: flex; align-items: center; gap: 26px; }
.rep-summary p { color: var(--text-2); margin: 6px 0 12px; }
.rep-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rep-kpis div { padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.rep-kpis b { display: block; font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.rep-kpis span { font-size: 12.5px; color: var(--text-2); }
.rep-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.report table.data th:first-child, .report table.data td:first-child { padding-left: 10px; }
.report table.data td { white-space: normal; }
.rep-foot { font-size: 11.5px; color: var(--text-3); border-top: 1px solid var(--border); padding-top: 14px; }
@media (max-width: 760px) { .report { padding: 22px; } .rep-kpis, .rep-cols { grid-template-columns: 1fr 1fr; } .rep-cols { grid-template-columns: 1fr; } }

@media print {
  .appbar, .banner, .footer, .no-print, #toasts, #dock, .win { display: none !important; }
  body { background: #fff; }
  .view { padding: 0; max-width: none; }
  .report { box-shadow: none; border: 0; padding: 0; max-width: none; }
  .report section, .report table tr { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* automation */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.scard2 { display: flex; flex-direction: column; gap: 8px; }
.scard2 h3 { margin: 2px 0 0; font-size: 15.5px; }
.scard2 p { margin: 0; font-size: 13px; flex: 1; }
.scard2 .sh2 { display: flex; justify-content: space-between; align-items: center; }
.scard2 .sbtns { display: flex; gap: 6px; margin-top: 4px; }
textarea.code { font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 12.5px; min-height: 320px; resize: vertical; white-space: pre; tab-size: 4; line-height: 1.5; }
pre.output { background: #0b1a1b; color: #d5ece8; border-radius: 10px; padding: 12px 14px; font: 12px/1.5 'JetBrains Mono', monospace; max-height: 50vh; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; }
.runmeta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.picklist { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; }
label.pick { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 13px; cursor: pointer; }
tr.clickable { cursor: pointer; }

/* Quick Connect customer page */
.qc-steps { margin: 0 0 20px; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); }
a.auth-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.qc-warn { margin-top: 16px; }

/* sign-up: hidden field for robots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
