/* MacFleet admin UI. The look follows the PaxFi 管理后台 (Nuxt UI on Tailwind v4: slate neutrals,
   blue primary, --ui-radius .375rem): a dark navy sidebar, a white top bar, a light grey page and
   white cards with a 1px line and 12px corners. No external requests: Public Sans is served from
   fonts/ (SIL OFL 1.1, fonts/OFL.txt), the Chinese text uses the system's font. */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/public-sans-latin-wght-normal.woff2) format("woff2");
  /* Latin only; CJK punctuation (“” … —) stays in the Chinese font */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --font: "Public Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f6f7f9;            /* page */
  --card: #fff;
  --line: #e6e8ec;          /* cards, table header */
  --line2: #eef0f3;         /* table rows */
  --soft: #f8fafc;          /* row hover, code blocks */
  --elev: #f1f5f9;          /* button hover, kbd, neutral pills */
  --ring: #cad5e2;          /* button and input outlines */
  --fg: #314158;            /* text */
  --strong: #0f172b;        /* titles, numbers */
  --toned: #45556c;
  --muted: #62748e;
  --dim: #90a1b9;

  --acc: #2b7fff; --acc-h: #155dfc; --acc-t: #155dfc; --acc2: #e9f2ff; --on-acc: #fff;
  --ok: #2f9466;   --ok-c: #42b883;
  --warn: #c07a00; --warn-c: #f0b100;
  --bad: #e7000b;  --bad-c: #fb2c36;
  --idle: #45556c;
  --okbg: color-mix(in srgb, var(--ok-c) 12%, transparent);
  --warnbg: color-mix(in srgb, var(--warn-c) 13%, transparent);
  --badbg: color-mix(in srgb, var(--bad-c) 9%, transparent);
  --idlebg: var(--elev);
  --bluebg: color-mix(in srgb, var(--acc) 10%, transparent);

  /* chart colours (PaxFi --viz-*) */
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-good: #0ca30c; --viz-quiet: #a3a29c;

  --shadow: 0 10px 15px -3px rgb(15 23 42 / .08), 0 4px 6px -4px rgb(15 23 42 / .08);
  --shadow-lg: 0 20px 25px -5px rgb(15 23 42 / .12), 0 8px 10px -6px rgb(15 23 42 / .1);
  --toast: #0f172b;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2362748e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  /* the sidebar is navy in both themes (PaxFi .vex-side) */
  --side: #0f172a; --side-2: #1e293b; --side-3: #334155; --side-fg: #e2e8f0; --side-sub: #cbd5e1; --side-dim: #94a3b8;
}

/* dark: the 外观 menu (data-theme) or, when it says 跟随系统, the system setting */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #020618; --card: #0f172b; --line: #1d293d; --line2: #172235; --soft: #131d31; --elev: #1d293d; --ring: #314158;
  --fg: #e2e8f0; --strong: #fff; --toned: #cad5e2; --muted: #90a1b9; --dim: #62748e;
  --acc: #51a2ff; --acc-h: #8ec5ff; --acc-t: #8ec5ff; --acc2: #10284d; --on-acc: #0f172b;
  --ok: #5ec597; --ok-c: #42b883; --warn: #fdc700; --warn-c: #fdc700; --bad: #ff6467; --bad-c: #ff6467; --idle: #cad5e2;
  --viz-1: #3987e5; --viz-2: #d95926; --viz-quiet: #6b6a65;
  --shadow: 0 10px 15px -3px rgb(0 0 0 / .4), 0 4px 6px -4px rgb(0 0 0 / .4);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / .5), 0 8px 10px -6px rgb(0 0 0 / .4);
  --toast: #1d293d;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2390a1b9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #020618; --card: #0f172b; --line: #1d293d; --line2: #172235; --soft: #131d31; --elev: #1d293d; --ring: #314158;
    --fg: #e2e8f0; --strong: #fff; --toned: #cad5e2; --muted: #90a1b9; --dim: #62748e;
    --acc: #51a2ff; --acc-h: #8ec5ff; --acc-t: #8ec5ff; --acc2: #10284d; --on-acc: #0f172b;
    --ok: #5ec597; --ok-c: #42b883; --warn: #fdc700; --warn-c: #fdc700; --bad: #ff6467; --bad-c: #ff6467; --idle: #cad5e2;
    --viz-1: #3987e5; --viz-2: #d95926; --viz-quiet: #6b6a65;
    --shadow: 0 10px 15px -3px rgb(0 0 0 / .4), 0 4px 6px -4px rgb(0 0 0 / .4);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / .5), 0 8px 10px -6px rgb(0 0 0 / .4);
    --toast: #1d293d;
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2390a1b9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 13px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--bad); min-height: 1em; margin: 6px 0 0; white-space: pre-wrap; }
code, pre, kbd { font-family: var(--mono); }
code { font-size: 12px; }
:not(pre) > code { background: var(--elev); color: var(--strong); padding: 1px 5px; border-radius: 5px; }
code.url { word-break: break-all; }
pre { font-size: 12px; line-height: 1.6; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow: auto; color: var(--fg); }
a { color: var(--acc-t); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--strong); }
b, strong { font-weight: 600; }

/* icons: inline lucide (ISC), drawn by app.js into <i data-i="name"> */
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------------------------------------------------------------- controls (Nuxt UI sizes) */

button, input, select, textarea { font: inherit; color: inherit; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 500; line-height: 20px; white-space: nowrap; cursor: pointer;
  padding: 5px 11px; border: 0; border-radius: 8px; color: var(--fg); background: var(--card);
  box-shadow: inset 0 0 0 1px var(--ring);
  transition: background-color .12s, box-shadow .12s, color .12s;
}
button:hover { background: var(--elev); }
button:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
button:disabled { opacity: .5; cursor: default; }
button:disabled:hover { background: var(--card); }
button.primary { background: var(--acc); color: var(--on-acc); box-shadow: none; }
button.primary:hover { background: var(--acc-h); }
button.primary:disabled:hover { background: var(--acc); }
button.danger { color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad-c) 45%, transparent); }
button.danger:hover { background: var(--badbg); }
button.link { box-shadow: none; background: none; padding: 0 4px; color: var(--acc-t); font-weight: 500; }
button.link:hover { background: none; text-decoration: underline; }
button.sm { padding: 3px 9px; font-size: 12px; line-height: 18px; border-radius: 7px; gap: 4px; }
button.sm.link { padding: 0 4px; }
button.ghost { box-shadow: none; background: none; color: var(--fg); }
button.ghost:hover { background: var(--elev); }
button svg.i { width: 15px; height: 15px; }
button.sm svg.i { width: 13px; height: 13px; }

input, select, textarea {
  background: var(--card); color: var(--strong); border: 0; border-radius: 8px; padding: 6px 10px; line-height: 20px; font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--ring); transition: box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--acc); }
input:disabled, select:disabled { opacity: .55; }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: var(--chev); background-repeat: no-repeat; background-position: right 8px center; background-size: 15px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { box-shadow: none; padding: 0; width: 15px; height: 15px; margin: 0; accent-color: var(--acc); flex: none; }
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
input[type="file"] { box-shadow: none; padding: 0; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; font-size: 11px; font-weight: 500; font-family: var(--font); color: var(--toned); background: var(--elev); box-shadow: inset 0 0 0 1px var(--ring); line-height: 1; }

/* ---------------------------------------------------------------- layout: left sidebar + top bar + page */

#main { display: flex; min-height: 100vh; }
#side {
  position: sticky; top: 0; height: 100vh; width: 248px; flex: none; display: flex; flex-direction: column;
  background: var(--side); color: var(--side-fg); z-index: 20; transition: width .18s ease;
}
.brand { padding: 16px 12px 12px; }
/* logo square, then the name over the address and version */
.logo { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 2px 8px; white-space: nowrap; }
.logo-mark { grid-row: span 2; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; font-style: normal; font-weight: 700; font-size: 15px; line-height: 1; }
.logo-name { font-weight: 700; font-size: 16px; line-height: 19px; color: #fff; overflow: hidden; text-overflow: ellipsis; }
.brand-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; font-size: 11.5px; line-height: 15px; color: #7f8ea6; font-variant-numeric: tabular-nums; }

#side nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 12px 12px; display: flex; flex-direction: column; font-size: 14px; scrollbar-width: thin; scrollbar-color: var(--side-3) transparent; }
/* :where() keeps this reset at zero specificity, so the rules below win over it */
:where(#side nav) button {
  display: flex; align-items: center; justify-content: flex-start; width: 100%; text-align: left; cursor: pointer; user-select: none;
  white-space: nowrap; overflow: hidden; border: 0; border-radius: 0; padding: 0; box-shadow: none; background: none;
  font: inherit; line-height: inherit; color: inherit;
}
#side nav button:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }
#side nav > .grp-h { margin-bottom: 4px; }
.grp { margin-bottom: 4px; }
.grp-h { gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--side-fg); font-weight: 600; }
.grp-h:hover { background: var(--side-2); }
.grp-h svg.i { width: 17px; height: 17px; opacity: .85; }
.grp-h svg.i.chev { margin-left: auto; width: 13px; height: 13px; opacity: .5; transition: transform .15s; }
.grp.closed svg.chev { transform: rotate(-90deg); }
.grp.closed .grp-items { display: none; }
.grp.cur > .grp-h { color: #fff; }
#side nav .grp-h.active { background: var(--side-2); color: #fff; box-shadow: inset 2px 0 0 #3b82f6; }
.grp-items { padding: 2px 0 6px 39px; display: flex; flex-direction: column; gap: 1px; }
.grp-items button { padding: 6px 12px; border-radius: 7px; color: var(--side-sub); font-size: 13.5px; gap: 10px; }
.grp-items button:hover { background: var(--side-2); color: #fff; }
#side nav .grp-items button.active { background: var(--side-2); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 #3b82f6; }
.grp-items svg.mini { display: none; width: 17px; height: 17px; opacity: .85; }
.count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--side-2); color: var(--side-dim); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.active .count, .grp-items button:hover .count { background: var(--side-3); color: var(--side-fg); }

.side-foot { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--side-2); padding: 10px 12px 10px 20px; min-height: 52px; white-space: nowrap; }
.avatar { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--side-2); color: var(--side-dim); }
.avatar svg.i { width: 15px; height: 15px; }
#who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: var(--side-fg); font-weight: 500; }
#logout { color: var(--side-dim); padding: 4px 8px; border-radius: 7px; font-size: 12.5px; gap: 5px; }
#logout:hover { color: #fff; background: var(--side-2); text-decoration: none; }
#logout svg.i { width: 14px; height: 14px; }
#sideMask { display: none; }

.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
header {
  display: flex; align-items: center; gap: 10px; padding: 0 22px; height: 52px; flex: none;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
header h1 { margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { box-shadow: none; background: none; padding: 5px; margin-left: -4px; border-radius: 8px; color: var(--toned); }
.icon-btn:hover { background: var(--elev); color: var(--strong); }
.icon-btn svg.i { width: 18px; height: 18px; vertical-align: 0; }
#btnMenu { display: none; }
.search-btn {
  margin-left: 14px; width: 288px; justify-content: flex-start; gap: 8px; padding: 5px 6px 5px 10px; color: var(--muted); font-weight: 400;
  box-shadow: inset 0 0 0 1px var(--line); background: var(--card);
}
.search-btn:hover { background: var(--soft); box-shadow: inset 0 0 0 1px var(--ring); }
.search-btn span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.search-btn kbd { height: 19px; min-width: 19px; }
.search-btn kbd + kbd { margin-left: -4px; }
header .ghost { padding: 5px 9px; gap: 6px; font-size: 13px; }
header .ghost svg.i { width: 17px; height: 17px; }
.tasks-wrap { position: relative; }
#btnTasks .dot { margin: 0; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--acc); color: var(--on-acc); font-size: 11px; line-height: 17px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }

/* wide screens: the menu can collapse to one icon per page */
@media (min-width: 901px) {
  #main.side-mini #side { width: 64px; }
  #main.side-mini .logo-name, #main.side-mini .brand-meta, #main.side-mini #side nav span, #main.side-mini .count,
  #main.side-mini .grp-toggle, #main.side-mini #who, #main.side-mini #logout span { display: none; }
  #main.side-mini .brand { padding: 16px 0 12px; }
  #main.side-mini .logo { display: flex; justify-content: center; padding: 2px 0; }
  #main.side-mini #side nav { padding: 0 8px 12px; }
  #main.side-mini .grp { margin: 0; padding-top: 6px; border-top: 1px solid var(--side-2); }
  #main.side-mini .grp.closed .grp-items { display: flex; }
  #main.side-mini .grp-items { padding: 0 0 6px; gap: 4px; }
  #main.side-mini .grp-items svg.mini { display: block; }
  #main.side-mini #side nav button { justify-content: center; padding: 9px 0; }
  #main.side-mini #side nav > .grp-h { margin-bottom: 6px; }
  #main.side-mini .side-foot { flex-direction: column; padding: 10px 0; gap: 6px; }
  #main.side-mini #logout { padding: 6px; }
}
/* narrow screens: the menu slides in over the page */
@media (max-width: 900px) {
  #side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(260px, 84vw); transform: translateX(-100%); transition: transform .2s ease; z-index: 40; }
  #main.side-open #side { transform: none; box-shadow: 10px 0 30px rgba(0, 0, 0, .3); }
  #main.side-open #sideMask { display: block; position: fixed; inset: 0; background: rgb(2 6 24 / .45); z-index: 39; }
  #btnMenu { display: inline-flex; }
  #btnCollapse { display: none; }
  header { padding: 0 14px; gap: 8px; }
  .search-btn { margin-left: 4px; width: auto; flex: 0 1 240px; }
}
@media (max-width: 640px) {
  .search-btn { flex: none; width: 34px; padding: 6px; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  header .ghost .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) { #side, .grp-h .chev { transition: none; } }

/* ---------------------------------------------------------------- page */

.tab { padding: 24px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.tab > * { margin-top: 0; margin-bottom: 0; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar p { margin: 0; }
.toolbar.intro p { flex: 1 1 420px; max-width: 980px; line-height: 1.6; }
.toolbar + .tcard, .toolbar + #pduList, .toolbar + #ctlList { margin-top: -8px; }
.sep { flex: 1; }
.sec-title, .sec-head h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--strong); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: -8px; }
.sec-head .more { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.sec-head .more:hover { color: var(--strong); text-decoration: none; }
.sec-head .more svg.i { width: 14px; height: 14px; }
#rentalNote:empty { display: none; }
#rentalBody { display: flex; flex-direction: column; gap: 20px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }

/* KPI strip: cells joined by 1px lines, a round tinted icon, a small label and a large number */
.stats { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat { flex: 1 1 128px; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); color: inherit; }
.kpi-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--acc); background: var(--bluebg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 25%, transparent); }
.kpi-ic svg.i { width: 18px; height: 18px; vertical-align: 0; }
.kpi-txt { min-width: 0; }
.kpi-label { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b { display: block; font-size: 22px; line-height: 1.3; font-weight: 600; color: var(--strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-note { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stat.bad .kpi-ic { color: var(--bad); background: var(--badbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad-c) 25%, transparent); }
.stat.bad b { color: var(--bad); }
.stat.warn .kpi-ic { color: var(--warn); background: var(--warnbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn-c) 35%, transparent); }
.stat.ok .kpi-ic { color: var(--ok); background: var(--okbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok-c) 30%, transparent); }
a.stat:hover { background: var(--soft); text-decoration: none; }
/* 概览: PaxFi's taller KPI cards */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis .stat { flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 24px; }
.kpis .kpi-ic { width: 40px; height: 40px; margin-bottom: 4px; }
.kpis .kpi-ic svg.i { width: 20px; height: 20px; }
.kpis .stat b { font-size: 24px; }

/* tables: a white card, a small muted header, light row lines */
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 0; overflow-x: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; }
.grid th { text-align: left; font-weight: 500; font-size: 12px; color: var(--dim); padding: 4px 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover td { background: var(--soft); }
.grid td.actions { display: table-cell; margin: 0; text-align: right; white-space: nowrap; } /* not the .actions button bar below */
.grid td.actions button { margin-left: 4px; }
.acts { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.grid td.actions .acts button { margin: 0; }
.grid td.empty { text-align: center; padding: 36px 20px; }
.grid td.nw, .nid { white-space: nowrap; }
#nodeRows td:first-child { white-space: nowrap; } /* the online dot stays next to the name */
#nodeRows td:first-child .sub { white-space: normal; }
.nid { font-weight: 600; cursor: pointer; color: var(--strong); }
.nid:hover { color: var(--acc-t); text-decoration: underline; }
.sub { font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 36px 20px; margin: 0; }
tr.flash td { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 35% { background: var(--acc2); } 100% { background: transparent; } }

/* pills (Nuxt UI "subtle" badge) */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 6px; font-size: 12px; line-height: 18px; font-weight: 500; white-space: nowrap; vertical-align: middle; color: var(--idle); background: var(--idlebg); box-shadow: inset 0 0 0 1px var(--ring); }
.tag svg.i { width: 12px; height: 12px; vertical-align: 0; }
.tag.ok { color: var(--ok); background: var(--okbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok-c) 32%, transparent); }
.tag.warn { color: var(--warn); background: var(--warnbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn-c) 40%, transparent); }
.tag.bad { color: var(--bad); background: var(--badbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad-c) 28%, transparent); }
.tag.blue { color: var(--acc-t); background: var(--bluebg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 28%, transparent); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); margin-right: 6px; vertical-align: 1px; flex: none; }
.dot.ok, .dot.live { background: var(--ok-c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-c) 20%, transparent); }
.dot.bad { background: var(--bad-c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad-c) 18%, transparent); }

/* dropdown menus (更多, 外观) */
.menu { position: relative; display: inline-block; }
.menu-list { position: fixed; max-height: calc(100vh - 16px); overflow: auto; background: var(--card); border-radius: 10px; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); padding: 4px; min-width: 180px; z-index: 25; text-align: left; }
.menu-list button { display: flex; width: 100%; justify-content: flex-start; text-align: left; gap: 8px; box-shadow: none; background: none; padding: 6px 10px; border-radius: 6px; margin: 0 !important; font-weight: 400; color: var(--fg); }
.menu-list button:hover { background: var(--elev); color: var(--strong); }
.menu-list button.danger { color: var(--bad); }
.menu-list button.danger:hover { background: var(--badbg); }
.menu-list button.on { color: var(--strong); font-weight: 600; }
.menu-list button .tick { margin-left: auto; color: var(--acc); }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ---------------------------------------------------------------- dialogs (Nuxt UI modal) */

dialog { border: 0; border-radius: 12px; padding: 0; background: var(--card); color: var(--fg); width: min(520px, 94vw); max-height: calc(100vh - 40px); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
dialog::backdrop { background: rgb(2 6 24 / .45); }
dialog form { padding: 0; }
#dlgTitle { margin: 0; padding: 15px 22px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--line); }
#dlgBody { padding: 18px 22px 0; }
#dlgBody > p:first-child { margin-top: 0; }
#dlgErr { padding: 0 22px; }
#dlgErr:empty { min-height: 0; margin: 0; }
dialog .actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 18px; padding: 13px 22px; border-top: 1px solid var(--line); }
dialog .actions button.danger { background: var(--bad-c); color: var(--on-acc); box-shadow: none; }
dialog .actions button.danger:hover { background: color-mix(in srgb, var(--bad-c) 85%, #000); }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.form-row label { font-size: 12.5px; color: var(--toned); font-weight: 500; }
.form-row .hint, .hint { font-size: 12px; color: var(--muted); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 11px; }
.secret { background: var(--warnbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn-c) 45%, transparent); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.secret code { font-size: 14px; user-select: all; word-break: break-all; background: none; padding: 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; font-size: 13px; }
.kv > div { min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-child(odd) { color: var(--muted); }

#drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--card); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 30; overflow: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 12px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
#drBody { padding: 18px 22px 40px; }
#drawer h3 { font-size: 14px; font-weight: 600; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--card); }
.job summary { padding: 8px 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.job pre { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; max-height: 300px; white-space: pre-wrap; }

/* power: PDU / controller cards */
#pduList, #ctlList { display: flex; flex-direction: column; gap: 16px; }
#pduList:empty, #ctlList:empty { display: none; }
.pdu-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pdu-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.pdu-head .sep { flex: 1; }
.pdu-head button + button { margin-left: 2px; }
.outlets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.outlet { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--card); }
.outlet.on { box-shadow: inset 3px 0 0 var(--ok-c); }
.outlet.off { box-shadow: inset 3px 0 0 var(--ring); }
.outlet.pressed { box-shadow: inset 3px 0 0 var(--warn-c); }
.outlet .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.outlet .row b { color: var(--strong); }
.outlet .btns { display: flex; gap: 5px; flex-wrap: wrap; }
.warn-text { color: var(--warn); margin: 6px 0; white-space: pre-wrap; }
.alerts p { margin: 4px 0; }
.pdu > .err, .pdu > .warn-text { margin: 0 0 10px; }
ul.tight { margin: 6px 0 12px; padding-left: 20px; line-height: 1.8; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--toast); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; max-width: min(80vw, 640px); font-size: 13px; box-shadow: 0 0 0 1px rgb(255 255 255 / .06), var(--shadow-lg); }
#toast.bad { background: #e7000b; }

.login { width: min(380px, 92vw); margin: 15vh auto 0; display: flex; flex-direction: column; gap: 10px; padding: 28px 28px 22px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.login-brand .logo-mark { width: 40px; height: 40px; border-radius: 10px; font-size: 19px; }
.login h1 { margin: 0; font-size: 18px; line-height: 1.3; }
.login p { margin: 0; }
.login label { font-size: 12.5px; color: var(--toned); font-weight: 500; }
.login button { padding: 7px 12px; }
.docs h2 { margin: 0 0 10px; font-size: 16px; }
.docs h3 { font-size: 14px; margin: 22px 0 8px; }
.docs p { line-height: 1.7; }

#mdmStatus .kv { grid-template-columns: 120px 1fr; }
details.steps { margin-top: 14px; }
details.steps summary { cursor: pointer; font-weight: 600; color: var(--strong); }
details.steps ol { margin: 8px 0 0; padding-left: 20px; line-height: 2; }
label.btn { display: inline-flex; align-items: center; cursor: pointer; border-radius: 7px; padding: 2px 10px; font-size: 12px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--ring); background: var(--card); }
label.btn:hover { background: var(--elev); }
pre.plist { max-height: 50vh; overflow: auto; font-size: 12px; white-space: pre-wrap; }

/* tasks dropdown (top bar) */
.tasks-list { position: fixed; width: min(420px, 94vw); max-height: 70vh; overflow: auto; background: var(--card); border-radius: 12px; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); padding: 6px; z-index: 26; }
.tasks-list .ti { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.tasks-list .ti:hover { background: var(--elev); }
.tasks-list .ti .grow { flex: 1; min-width: 0; }
.tasks-list .ti b { color: var(--strong); font-weight: 600; }
.tasks-list .ti .sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tasks-list .empty { padding: 18px; color: var(--muted); text-align: center; }

/* job progress dialogs */
dialog.job-dlg { width: min(640px, 94vw); }
.jd-head { display: flex; gap: 10px; align-items: center; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.jd-head h2 { margin: 0; font-size: 15px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jd-head .muted { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jd-bar { height: 6px; background: var(--elev); border-radius: 3px; overflow: hidden; margin: 16px 22px 0; }
.jd-bar div { height: 100%; background: var(--acc); width: 0; transition: width .4s; }
.jd-steps { list-style: none; margin: 16px 22px 0; padding: 0; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.jd-steps li { display: flex; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line2); font-size: 13px; line-height: 1.5; }
.jd-steps li:last-child { border-bottom: 0; }
.jd-steps .ic { width: 16px; flex: none; text-align: center; }
.jd-steps .t { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.jd-steps li.cur { background: color-mix(in srgb, var(--acc) 8%, transparent); font-weight: 500; }
.jd-steps li.empty { color: var(--muted); justify-content: center; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--acc); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
#jdResult, .jd-result { margin: 14px 22px 0; }
#jdResult:empty, .jd-result:empty { margin-top: 0; }
#jdResult .err { margin: 0; }
#jdResult .okmsg, .jd-result .okmsg { color: var(--ok); margin: 0 0 10px; font-weight: 500; }
.jd-result > p { margin: 0 0 10px; }
.job-dlg .actions { display: flex; align-items: center; gap: 10px; }
.job-dlg .actions .sep { flex: 1; }
.job-dlg .actions .muted { font-size: 12px; }

/* 出租（MDM）: the mdm-api rentals page */
#rentalNote { display: flex; flex-direction: column; gap: 10px; }
#rentalNote > * { margin: 0; }
#rentalNote .card p { margin: 0 0 8px; }
#rentalNote .card p:last-child { margin-bottom: 0; }
#rentalNote .card pre { margin: 0 0 8px; }
#rentalConn { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#rentalGrid.stale { opacity: .55; }
#rentalGrid td.nw, #rentalGrid .sub { white-space: nowrap; }
#rentalNote > .warn-text, #rentalNote > .err { padding: 9px 14px; border-radius: 10px; }
#rentalNote > .warn-text { background: var(--warnbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn-c) 30%, transparent); }
#rentalNote > .err { background: var(--badbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad-c) 25%, transparent); }
#rentalGrid td.why { color: var(--warn); min-width: 140px; font-size: 12.5px; line-height: 1.45; }
#rentalGrid td.actions .acts { gap: 6px; }
#rentalGrid td.actions button.sm { padding-left: 8px; padding-right: 8px; }
/* wide table (a 1440px screen with the menu folded to icons, or wider): the buttons of a row stay on one line.
   Narrower: 系统 and 不能出租的原因 move into the 序列号 cell, so the buttons keep room to wrap in two rows.
   (1300px since the 编号 column came in 0.3.5; it was 1110px.) */
#tab-rental .tcard { container-type: inline-size; }
#rentalGrid .os-in, #rentalGrid .why-in { display: none; }
@container (width >= 1300px) { #rentalGrid td.actions .acts { flex-wrap: nowrap; } }
@container (width < 1300px) {
  #rentalGrid th.os, #rentalGrid td.os, #rentalGrid th.why, #rentalGrid td.why { display: none; }
  #rentalGrid .os-in { display: inline; }
  #rentalGrid .why-in { display: block; min-width: 150px; margin-top: 4px; color: var(--warn); font-size: 12px; line-height: 1.45; }
  #rentalGrid td:not(.nw) .sub { white-space: normal; }
}
#rentalGrid td.ser b { color: var(--strong); font-variant-numeric: tabular-nums; }

/* 地区 + 序号: the filter chips over the table (or how to start), the 编号 column, sortable headers */
#rentalRegions { margin-bottom: -8px; }
#rentalRegions:empty { display: none; }
.rg-note { margin: 0; display: flex; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; line-height: 18px; gap: 6px; color: var(--toned); }
.chips button .n { font-size: 11px; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
.chips button.on { background: var(--acc2); color: var(--acc-t); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 45%, transparent); }
.chips button.on .n { color: inherit; }
.rg-empty { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.rg-empty .kpi-ic { width: 40px; height: 40px; }
.rg-empty-t { flex: 1; min-width: 0; }
.rg-empty-t b { color: var(--strong); font-size: 14px; }
.rg-empty-t p { margin: 2px 0 0; line-height: 1.6; }
.th-sort { box-shadow: none; background: none; padding: 1px 4px; margin: -1px -4px; border-radius: 6px; font: inherit; line-height: inherit; color: inherit; gap: 3px; }
.th-sort:hover { background: var(--elev); color: var(--strong); }
th.sorted .th-sort { color: var(--toned); }
.th-sort .si { display: inline-flex; }
.th-sort svg.i { width: 12px; height: 12px; vertical-align: 0; opacity: .5; }
th.sorted .th-sort svg.i { opacity: 1; }
#rentalGrid.no-labels .lbl-col { display: none; }
#rentalGrid td.lbl-col { white-space: nowrap; }
.lbl { box-shadow: none; background: none; padding: 2px 6px; margin: -2px -6px; border-radius: 6px; gap: 5px; font-weight: 600; color: var(--strong); font-variant-numeric: tabular-nums; }
.lbl:hover { background: var(--elev); }
.lbl .lbl-none { color: var(--dim); font-weight: 500; }
.lbl svg.ed { width: 13px; height: 13px; color: var(--muted); opacity: 0; transition: opacity .12s; }
tr:hover .lbl svg.ed, .lbl:focus-visible svg.ed { opacity: 1; }
#rentalGrid td.lbl-col div.lbl-note { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; } /* all of it in its title */
/* the 地区和序号 and 管理地区 dialogs */
.rl-new { margin-top: 2px; }
.hint.rl-hint { margin: -4px 0 12px; }
.hint.warn { color: var(--warn); }
.rg-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 12px 0; }
.rg-row { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 7px 10px 7px 12px; border-bottom: 1px solid var(--line2); }
.rg-row:last-of-type { border-bottom: 0; }
.rg-row > svg.i { color: var(--muted); }
.rg-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--strong); }
.rg-n { margin-right: auto; white-space: nowrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rg-row input { flex: 1; min-width: 0; padding: 4px 8px; }
.rg-row button.armed { background: var(--bad-c); color: var(--on-acc); box-shadow: none; }
.rg-none { margin: 0; padding: 18px; text-align: center; color: var(--muted); }
.hint.rg-why { margin: 0; padding: 8px 12px; border-top: 1px solid var(--line2); background: var(--soft); }
.rg-add { display: flex; gap: 8px; }
.rg-add input { flex: 1; min-width: 0; }
.hint.rg-status { margin: 8px 0 0; color: var(--ok); }
.hint.rg-status:empty { margin: 0; }
@media (max-width: 640px) { .rg-empty { flex-wrap: wrap; } }
.rental-access code { user-select: all; word-break: break-all; }
.rental-access + p { margin-top: 10px !important; }
.rental-access .copy { margin-left: 6px; font-size: 12px; }

/* 公网 IP: the button over the table, the address cell, the 公网 IP window (switch servers, the pool, a new
   address) and one Mac's 公网 IP */
dialog#dlg.wide { width: min(800px, 94vw); }
.pubip-btn .n { font-size: 11px; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; margin-left: 2px; }
.rg-empty .pubip-btn { flex: none; }
#rentalGrid .ip-line { white-space: nowrap; margin-top: 3px; }
#rentalGrid .sub.ip-err { color: var(--bad); white-space: normal; max-width: 260px; }
.ip-sw { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0 0 12px; font-size: 13px; }
.ip-sw .warn-text { margin: 0; }
.ip-sw svg.i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.ip-list { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 40vh; margin: 0 0 16px; }
.ip-list .grid th { position: sticky; top: 0; z-index: 1; background: var(--card); padding-top: 9px; }
.ip-list .grid td { padding: 8px 10px; }
.ip-list .grid b { color: var(--strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.ip-list td.ip-note { color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-list .rg-none { padding: 22px; }
.ip-list td.ip-del { text-align: right; white-space: nowrap; } /* not "actions": dialog .actions paints danger buttons solid */
.ip-list button.armed, .pip-sec button.armed { background: var(--bad-c); color: var(--on-acc); box-shadow: none; }
.hint.ip-hint { margin: -4px 0 8px; }
.hint.ip-hint:empty { display: none; }
.ip-add-b { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.ip-add-b .hint.rg-status { margin: 0; }
.pip { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.pip-head { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 2px; }
.pip-head b { color: var(--strong); font-variant-numeric: tabular-nums; }
.pip .err, .pip .hint, .pip p { margin: 8px 0 0; }
.pip-sec { border-top: 1px solid var(--line2); margin-top: 14px; padding-top: 12px; }
.pip-sec > label { display: block; font-size: 12.5px; color: var(--toned); font-weight: 500; margin-bottom: 6px; }
.pip-sec > p { margin: 0 0 8px; }
.pip-sec .rg-add select { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- 概览 */

.ov-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.ov-row > .card { padding: 0; display: flex; flex-direction: column; min-width: 0; }
.card-h { padding: 18px 22px 16px; border-bottom: 1px solid var(--line); }
.card-h .kpi-label { margin: 0 0 2px; }
.card-h .big { margin: 0; color: var(--strong); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-h .big b { font-size: 30px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.card-h .big span { font-size: 13px; color: var(--muted); }
.card-b { padding: 18px 22px 20px; flex: 1; }
.card-b > p { margin: 14px 0 0; color: var(--muted); }
.segbar { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; background: var(--elev); }
.segbar span { height: 100%; min-width: 4px; }
.legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.legend li { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend span { color: var(--muted); }
.legend b { color: var(--strong); font-variant-numeric: tabular-nums; }
.att { list-style: none; margin: 0; padding: 4px 10px 10px; }
.att li a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--fg); }
.att li a:hover { background: var(--soft); text-decoration: none; }
.att li .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att li svg.go { color: var(--dim); width: 14px; height: 14px; }
.att .more { padding: 6px 12px 0; color: var(--muted); font-size: 12px; }
.att-ok { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px 20px; color: var(--muted); text-align: center; }
.att-ok .kpi-ic { width: 44px; height: 44px; color: var(--ok); background: var(--okbg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok-c) 30%, transparent); }
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.svc { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--fg); min-width: 0; }
a.svc:hover { background: var(--soft); text-decoration: none; }
.svc b { display: block; font-weight: 500; color: var(--strong); }
.svc .sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc > div { min-width: 0; }
.svc .tag { flex: none; }
#ovJobs tr { cursor: pointer; }
#ovJobsWrap { display: flex; flex-direction: column; gap: 20px; }

/* ---------------------------------------------------------------- ⌘K */

dialog#cmdk { width: min(600px, 94vw); margin: 12vh auto auto; overflow: hidden; display: none; flex-direction: column; max-height: min(560px, 76vh); }
dialog#cmdk[open] { display: flex; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-in svg.i { width: 18px; height: 18px; vertical-align: 0; }
.cmdk-in input { flex: 1; min-width: 0; box-shadow: none; padding: 4px 0; font-size: 14px; background: none; }
.cmdk-in input:focus { box-shadow: none; }
.cmdk-list { flex: 1; overflow: auto; padding: 6px; }
.cmdk-g { padding: 8px 10px 4px; font-size: 12px; color: var(--dim); font-weight: 500; }
.cmdk-it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--fg); }
.cmdk-it svg.i { color: var(--muted); vertical-align: 0; }
.cmdk-it.on { background: var(--elev); color: var(--strong); }
.cmdk-it.on svg.i { color: var(--acc); }
.cmdk-l { white-space: nowrap; font-weight: 500; }
.cmdk-s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.cmdk-it .ent { margin-left: auto; visibility: hidden; }
.cmdk-it.on .ent { visibility: visible; }
.cmdk-empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.cmdk-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }
.cmdk-foot kbd { height: 18px; min-width: 18px; font-size: 10.5px; }

/* ---------------------------------------------------------------- narrow */

@media (max-width: 1180px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .ov-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .tab { padding: 14px; gap: 14px; }
  .grid th, .grid td { white-space: nowrap; }
  .form-2 { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis .stat { padding: 16px 18px; }
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
