﻿/* =====================================================================
   WantaTools 2.9 — "Glass Deck"
   Windowed / mirrored glass interface: floating window chrome, a centred
   segmented dock, aurora depth, mono telemetry labels and soft motion.
   Dark is the primary theme; the light theme swaps the token set and a
   handful of glass surfaces.
   ===================================================================== */

:root {
  /* depth */
  --bg: #04050a;
  --bg-2: #070910;
  --bg-3: #0a0d17;
  --glass: rgba(15, 18, 30, .64);
  --glass-2: rgba(22, 26, 42, .72);
  --glass-3: rgba(29, 34, 53, .78);
  --glass-hi: rgba(255, 255, 255, .05);
  --glass-inset: rgba(0, 0, 0, .22);
  --stroke: rgba(148, 163, 209, .16);
  --stroke-soft: rgba(148, 163, 209, .09);
  --stroke-strong: rgba(148, 163, 209, .3);
  --stroke-hot: rgba(167, 139, 250, .5);

  /* ink */
  --text: #eef2ff;
  --text-2: #c7d0e8;
  --muted: #93a0bf;
  --faint: #626d8b;
  --deco: #3d4763;

  /* pigment */
  --accent: #8b5cf6;
  --accent-2: #c4b5fd;
  --accent-3: #22d3ee;
  --accent-soft: rgba(139, 92, 246, .15);
  --accent-line: rgba(139, 92, 246, .44);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .1);
  --ok-line: rgba(52, 211, 153, .32);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .1);
  --warn-line: rgba(251, 191, 36, .3);
  --bad: #fb7185;
  --bad-soft: rgba(251, 113, 133, .1);
  --bad-line: rgba(251, 113, 133, .32);

  /* surfaces */
  --term-bg: #05060d;
  --term-text: #d5dcf3;
  --editor-bg: #05060d;
  --inset-bg: rgba(0, 0, 0, .24);
  --code-text: #c4b5fd;
  --modal-bg: #10131f;
  --overlay: rgba(2, 3, 8, .68);
  --toast-bg: rgba(24, 28, 45, .96);
  --btn-primary-bg: #6d43d8;
  --btn-primary-fg: #ffffff;
  --btn-primary-hover: #7c52ea;
  --cell-hover: rgba(196, 181, 253, .05);
  --tag: #c4b5fd;
  --tag-bg: rgba(139, 92, 246, .14);
  --tag-line: rgba(139, 92, 246, .34);
  --grid: rgba(139, 163, 255, .05);
  --scroll-thumb: rgba(148, 163, 209, .24);
  --scroll-thumb-hover: rgba(167, 139, 250, .45);

  --shadow-card: 0 18px 44px rgba(0, 0, 0, .38), 0 2px 0 rgba(255, 255, 255, .03) inset;
  --shadow-pop: 0 40px 120px rgba(0, 0, 0, .72), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  --shadow-glow: 0 0 0 1px var(--accent-line), 0 12px 34px rgba(109, 67, 216, .3);
  --ring-track: rgba(148, 163, 209, .14);
  --sk-a: rgba(148, 163, 209, .07);
  --sk-b: rgba(196, 181, 253, .16);

  --r-xs: 7px;
  --r-sm: 10px;
  --r-md: 13px;
  --r-lg: 17px;
  --r-xl: 22px;

  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter Tight", "Inter", "Segoe UI Variable Display", "Segoe UI",
    system-ui, -apple-system, Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "Cascadia Mono", "SFMono-Regular",
    Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.22, .85, .24, 1);
  --ease-soft: cubic-bezier(.4, .1, .2, 1);
}

html[data-theme="light"] {
  --bg: #e9edf7;
  --bg-2: #f2f5fb;
  --bg-3: #fbfcff;
  --glass: rgba(255, 255, 255, .7);
  --glass-2: rgba(255, 255, 255, .82);
  --glass-3: rgba(255, 255, 255, .92);
  --glass-hi: rgba(255, 255, 255, .9);
  --glass-inset: rgba(23, 32, 58, .03);
  --stroke: rgba(23, 32, 58, .13);
  --stroke-soft: rgba(23, 32, 58, .08);
  --stroke-strong: rgba(23, 32, 58, .24);
  --stroke-hot: rgba(109, 40, 217, .45);

  --text: #0e1424;
  --text-2: #2a3350;
  --muted: #58627e;
  --faint: #8790a9;
  --deco: #b7c0d8;

  --accent: #6d28d9;
  --accent-2: #5b21b6;
  --accent-3: #0891b2;
  --accent-soft: rgba(109, 40, 217, .09);
  --accent-line: rgba(109, 40, 217, .3);
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, .09);
  --ok-line: rgba(5, 150, 105, .28);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, .1);
  --warn-line: rgba(180, 83, 9, .26);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, .075);
  --bad-line: rgba(220, 38, 38, .26);

  --term-bg: #0b0d16;
  --term-text: #d5dcf3;
  --editor-bg: #0b0d16;
  --inset-bg: rgba(23, 32, 58, .04);
  --code-text: #5b21b6;
  --modal-bg: #ffffff;
  --overlay: rgba(18, 24, 40, .42);
  --toast-bg: rgba(255, 255, 255, .97);
  --btn-primary-bg: #6d28d9;
  --btn-primary-fg: #ffffff;
  --btn-primary-hover: #5b21b6;
  --cell-hover: rgba(23, 32, 58, .035);
  --tag: #5b21b6;
  --tag-bg: rgba(109, 40, 217, .08);
  --tag-line: rgba(109, 40, 217, .24);
  --grid: rgba(23, 58, 112, .06);
  --scroll-thumb: rgba(23, 32, 58, .2);
  --scroll-thumb-hover: rgba(109, 40, 217, .35);

  --shadow-card: 0 16px 38px rgba(23, 32, 58, .09), 0 1px 0 rgba(255, 255, 255, .9) inset;
  --shadow-pop: 0 40px 100px rgba(23, 32, 58, .24), 0 2px 0 rgba(255, 255, 255, .9) inset;
  --shadow-glow: 0 0 0 1px var(--accent-line), 0 12px 30px rgba(109, 40, 217, .16);
  --ring-track: rgba(23, 32, 58, .12);
  --sk-a: rgba(23, 32, 58, .05);
  --sk-b: rgba(109, 40, 217, .11);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
  margin: 0;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss01" 1;
}

/* Ambient depth: aurora wash + fine technical grid + top edge light. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background:
    radial-gradient(1100px 560px at 8% -12%, rgba(124, 92, 246, .2), transparent 62%),
    radial-gradient(900px 500px at 96% -6%, rgba(34, 211, 238, .12), transparent 55%),
    radial-gradient(900px 700px at 52% 118%, rgba(59, 130, 246, .12), transparent 62%),
    radial-gradient(600px 400px at 100% 100%, rgba(236, 72, 153, .07), transparent 60%);
}
body::after {
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 95% 80% at 50% 0%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse 95% 80% at 50% 0%, #000 10%, transparent 78%);
  opacity: .9;
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(1000px 560px at 8% -14%, rgba(124, 58, 237, .16), transparent 60%),
    radial-gradient(900px 520px at 98% -8%, rgba(8, 145, 178, .12), transparent 58%),
    radial-gradient(900px 700px at 50% 120%, rgba(59, 130, 246, .1), transparent 60%);
}

.hidden { display: none !important; }
.spacer { flex: 1 1 auto; }
.mono, code, pre, kbd { font-family: var(--mono); font-variant-ligatures: none; }
.muted { color: var(--muted); }
.r { text-align: right; }
b, strong { font-weight: 650; }

::selection { background: rgba(139, 92, 246, .34); color: #fff; }
html[data-theme="light"] ::selection { background: rgba(109, 40, 217, .18); color: var(--text); }

* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }

/* =====================================================================
   Brand + boot
   ===================================================================== */

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid var(--accent-line);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(196, 181, 253, .34), transparent 60%),
    linear-gradient(145deg, rgba(139, 92, 246, .34), rgba(34, 211, 238, .12));
  box-shadow: 0 6px 18px rgba(109, 67, 216, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #fff;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.04em;
  flex: 0 0 auto;
}
html[data-theme="light"] .mark {
  background: linear-gradient(145deg, #ede7fc, #ffffff);
  border-color: rgba(109, 40, 217, .28);
  color: #6d28d9;
  box-shadow: 0 6px 16px rgba(109, 40, 217, .14), inset 0 1px 0 #fff;
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brandtxt { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.brandname {
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.brandname span { color: var(--accent-2); font-weight: 700; }
.brandtxt small {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.boot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.boot .mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 24px;
  animation: bootPulse 1.5s var(--ease-soft) infinite;
}
.bootline {
  position: relative;
  display: block;
  width: 118px;
  height: 2px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 209, .14);
}
.bootline i {
  position: absolute;
  inset: 0;
  width: 46%;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  animation: bootSweep 1.2s var(--ease) infinite;
}
@keyframes bootPulse {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 6px 18px rgba(109, 67, 216, .32); }
  50% { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 34px rgba(109, 67, 216, .45); }
}
@keyframes bootSweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}

/* =====================================================================
   Login
   ===================================================================== */

.login {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}
.aurora { position: absolute; inset: -20%; pointer-events: none; filter: blur(10px); }
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
}
.aurora::before {
  width: 44vw;
  height: 44vw;
  left: 4%;
  top: 2%;
  background: radial-gradient(circle, rgba(124, 92, 246, .55), transparent 68%);
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora::after {
  width: 40vw;
  height: 40vw;
  right: 2%;
  bottom: -6%;
  background: radial-gradient(circle, rgba(34, 211, 238, .34), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate-reverse;
}
.meshz {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 50% 46%, #000 0%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 46%, #000 0%, transparent 74%);
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(5vw, 4vh, 0) scale(1.12); }
}

.login-tools {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.login-card {
  width: min(404px, 100%);
  z-index: 2;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  box-shadow: var(--shadow-pop), 0 0 60px rgba(109, 67, 216, .16);
  animation: cardIn .5s var(--ease) both;
}
.login-body { padding: 26px 28px 22px; }
.login-card .brand { margin-bottom: 18px; }
.login-sub {
  margin: 0 0 22px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: .01em;
}

.field { display: block; margin-bottom: 14px; }
.field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.field input {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--inset-bg);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .22);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.field input::placeholder { color: var(--faint); }
.field input:focus {
  border-color: var(--accent);
  background: var(--glass-3);
  box-shadow: 0 0 0 3px var(--accent-soft), inset 0 1px 2px rgba(0, 0, 0, .16);
}

.btn.primary.wide { width: 100%; height: 42px; margin-top: 8px; font-size: 13px; }
.form-err {
  min-height: 18px;
  margin-top: 10px;
  color: var(--bad);
  font-size: 12px;
  text-align: center;
}
.login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--deco); }

/* =====================================================================
   App shell / window frame
   ===================================================================== */

.app {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 12px;
  display: flex;
  animation: fade .3s ease both;
}
.shell {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--glass-hi), transparent 22%), var(--glass);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(255, 255, 255, .025) inset,
    0 1px 0 rgba(255, 255, 255, .07) inset;
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  backdrop-filter: blur(26px) saturate(1.3);
}
html[data-theme="light"] .shell {
  box-shadow: 0 30px 80px rgba(23, 32, 58, .16), 0 1px 0 #fff inset;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 14px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--stroke-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  user-select: none;
}
.tl { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.tl i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28), 0 1px 2px rgba(0, 0, 0, .3);
}
.tl i.y { background: #febc2e; }
.tl i.g { background: #28c840; }
.tb-name { color: var(--muted); }
.tb-name span { color: var(--accent-2); margin: 0 4px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.tb-clock {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: .1em;
}
.tb-live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.tb-live .dot { width: 5px; height: 5px; }
.tb-build {
  padding: 2px 7px;
  border: 1px solid var(--stroke);
  border-radius: 99px;
  color: var(--faint);
  letter-spacing: .1em;
}

/* =====================================================================
   Deck: hamburger В· centred segmented dock В· tools
   ===================================================================== */

.deck {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 62px;
  padding: 0 14px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--stroke-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent);
}

.orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: var(--glass-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  cursor: pointer;
  transition: color .16s, border-color .16s, background .16s, transform .16s, box-shadow .16s;
}
.orb:hover {
  color: var(--text);
  border-color: var(--stroke-hot);
  background: var(--glass-3);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
.orb:active { transform: translateY(0) scale(.98); }
.orb svg { width: 15px; height: 15px; }
.orb .ticon {
  font-size: 13px;
  line-height: 1;
  transform: translateY(-.5px);
  transition: transform .4s var(--ease);
}
.orb:hover .ticon { transform: rotate(-18deg) translateY(-.5px); }
.searchchip { width: auto; padding: 0 9px; }
.searchchip kbd {
  padding: 1px 5px;
  border: 1px solid var(--stroke);
  border-radius: 5px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0;
}
.mebtn {
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(139, 92, 246, .32), rgba(34, 211, 238, .14));
  border-color: var(--accent-line);
  color: #fff;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}
.mebtn:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
html[data-theme="light"] .mebtn { color: #4c1d95; background: linear-gradient(145deg, #ede7fc, #ffffff); }

.deck-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sidebtn { display: inline-flex; flex: 0 0 auto; }
.iconbtn.sidebtn { display: inline-flex; }

/* The segmented control is the visual centre of the deck. */
.seg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--stroke);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012)), var(--glass-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .32), 0 1px 0 rgba(255, 255, 255, .06) inset;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
html[data-theme="light"] .seg { box-shadow: 0 10px 26px rgba(23, 32, 58, .1), 0 1px 0 #fff inset; }

.seg-glow {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: 0;
  z-index: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(139, 92, 246, .34), rgba(139, 92, 246, .16));
  border: 1px solid var(--accent-line);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 6px 18px rgba(109, 67, 216, .28);
  transition: left .34s var(--ease), width .34s var(--ease), opacity .2s;
  pointer-events: none;
}
html[data-theme="light"] .seg-glow {
  background: linear-gradient(180deg, rgba(109, 40, 217, .16), rgba(109, 40, 217, .07));
  box-shadow: 0 6px 16px rgba(109, 40, 217, .16);
}

.seg .navbtn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s, transform .18s;
}
.seg .navbtn svg { width: 15px; height: 15px; color: var(--faint); transition: color .18s; }
.seg .navbtn:hover { color: var(--text); }
.seg .navbtn:hover svg { color: var(--muted); }
.seg .navbtn.on { color: var(--text); }
.seg .navbtn.on svg { color: var(--accent-2); }
html[data-theme="light"] .seg .navbtn.on svg { color: var(--accent); }
.seg .navn {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: rgba(0, 0, 0, .28);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
html[data-theme="light"] .seg .navn { background: rgba(23, 32, 58, .08); }
.seg .navbtn.on .navn { color: var(--accent-2); }
html[data-theme="light"] .seg .navbtn.on .navn { color: var(--accent); }

/* =====================================================================
   Main / views
   ===================================================================== */

.main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.view { flex: 1 1 auto; min-height: 0; }
.view:not(.hidden) { animation: viewIn .28s var(--ease) both; }
#view-fleet { display: flex; flex-direction: column; }

.dash {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px 22px;
  overflow: hidden;
}

.hero { display: flex; align-items: flex-end; gap: 18px; }
.hero-t { min-width: 0; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--accent-line);
}
html[data-theme="light"] .kicker { color: var(--accent); }
.hero h1 {
  margin: 7px 0 5px;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -.035em;
  background: linear-gradient(180deg, var(--text), var(--text-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .hero h1 { background: none; color: var(--text); }
.dsub { margin: 0; color: var(--faint); font-size: 12px; }
.hero-act { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.hero-act .btn svg { width: 14px; height: 14px; }

/* =====================================================================
   Buttons / inputs
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012));
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s, border-color .16s, background .16s, transform .16s, box-shadow .16s;
}
.btn:hover {
  color: var(--text);
  border-color: var(--stroke-strong);
  background: var(--glass-3);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .24);
}
.btn:active { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 14px; height: 14px; }
.btn.primary {
  border-color: rgba(167, 139, 250, .55);
  background: linear-gradient(180deg, #7d55e6, var(--btn-primary-bg));
  color: var(--btn-primary-fg);
  box-shadow: 0 8px 22px rgba(109, 67, 216, .34), 0 1px 0 rgba(255, 255, 255, .22) inset;
}
.btn.primary:hover {
  border-color: #a78bfa;
  background: linear-gradient(180deg, #8b63f0, var(--btn-primary-hover));
  box-shadow: 0 12px 28px rgba(109, 67, 216, .46), 0 1px 0 rgba(255, 255, 255, .24) inset;
}
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--glass-2); }
.btn.danger {
  color: var(--bad);
  border-color: var(--bad-line);
  background: var(--bad-soft);
}
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.btn.small { height: 27px; padding: 0 9px; font-size: 11px; border-radius: 8px; }
.btn.wide { width: 100%; }

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s, transform .15s;
}
.iconbtn:hover { color: var(--text); background: var(--glass-2); border-color: var(--stroke); }
.iconbtn:active { transform: scale(.95); }
.iconbtn svg { width: 14px; height: 14px; display: block; }
.iconbtn.danger:hover { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.iconbtn:disabled { opacity: .35; cursor: default; }

input.txt, select.txt, textarea.txt {
  width: 100%;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--inset-bg);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
select.txt {
  appearance: none;
  padding-right: 30px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
input.txt:focus, select.txt:focus, textarea.txt:focus {
  border-color: var(--accent);
  background-color: var(--glass-3);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input.txt.mono { font-family: var(--mono); font-size: 11.5px; }
textarea.txt { height: auto; padding: 9px 11px; resize: vertical; }

.form-row { margin-bottom: 14px; }
.lbl {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { margin-top: 5px; color: var(--faint); font-size: 11px; line-height: 1.5; }
.form-note.warn { color: var(--warn); }
.form-note.wh-on { color: var(--ok); }
.wh-row { margin: 14px 0 0; }
.wh-row .txt { width: 100%; font-family: var(--mono); font-size: 11.5px; }
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}
.check input { accent-color: var(--accent); }

/* =====================================================================
   Glass window primitive
   ===================================================================== */

.win {
  position: relative;
  min-width: 0;
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), transparent 30%), var(--glass);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  backdrop-filter: blur(20px) saturate(1.25);
}
.win::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .07), transparent 32%, transparent 70%, rgba(139, 92, 246, .05));
  opacity: .8;
}
.win > * { position: relative; z-index: 1; }

.winbar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 33px;
  padding: 0 12px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--stroke-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.8px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.winbar .tl i { width: 7px; height: 7px; }
.wintitle { color: var(--muted); }
.wmeta,
.chmeta { color: var(--faint); letter-spacing: .12em; }
.winbar .iconbtn { width: 24px; height: 24px; margin: 0 -4px 0 0; font-size: 11px; }

/* =====================================================================
   KPI strip
   ===================================================================== */

.kpis, .statgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kpis.statgrid { max-width: none; margin-top: 0; }
.kpi {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  padding: 14px 15px 13px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 46%), var(--glass);
  box-shadow: var(--shadow-card);
  animation: rise .46s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.kpi::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.kpi:hover {
  border-color: var(--stroke-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card), 0 0 26px rgba(109, 67, 216, .12);
}
.kpi .k {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.kpi .k i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-line);
}
.kpi .v {
  margin-top: 7px;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.kpi .v em {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .02em;
}
.kpi .d { margin-top: 5px; color: var(--faint); font-size: 10.5px; }
.kpi .d b { color: var(--ok); font-weight: 650; }
.kpi .d b.w { color: var(--warn); }
.kpi svg.spark {
  position: absolute;
  right: 11px;
  bottom: 10px;
  width: 72px;
  height: 24px;
  opacity: .72;
  pointer-events: none;
}

/* =====================================================================
   Fleet grid / server table
   ===================================================================== */

.fleetgrid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 14px;
}

.tablecard {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}
.tablecard .winbar { gap: 8px; }
.ftabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border: 1px solid var(--stroke-soft);
  border-radius: 9px;
  background: var(--inset-bg);
  font-size: 10.5px;
}
.ftabs button {
  height: 21px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.ftabs button:hover { color: var(--text-2); }
.ftabs button.on {
  color: var(--text);
  background: var(--glass-3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset;
}
html[data-theme="light"] .ftabs button.on { background: #fff; box-shadow: 0 1px 3px rgba(23, 32, 58, .12); }

.stable {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  --cols: minmax(0, 1.42fr) minmax(0, 1.18fr) minmax(0, 1.06fr) 76px 88px 74px 88px 16px;
}
.srow-head,
.srvrow {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: center;
  gap: 10px;
  padding: 0 13px;
}
.srow-head {
  flex: 0 0 auto;
  height: 30px;
  border-bottom: 1px solid var(--stroke-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.6px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.srow-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stable-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.srvrow {
  width: 100%;
  min-height: 52px;
  padding: 6px 13px;
  border: 0;
  border-bottom: 1px solid var(--stroke-soft);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  animation: rowIn .32s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 22ms);
  transition: background .14s, box-shadow .14s;
  contain: layout paint style;
}
.srvrow:hover {
  background: var(--cell-hover);
  box-shadow: inset 2px 0 0 var(--accent);
}
.srvrow:last-child { border-bottom: 0; }
.svname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.svname > span { min-width: 0; }
.sbox {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--tag-line);
  border-radius: 8px;
  background: var(--tag-bg);
  color: var(--accent-2);
}
html[data-theme="light"] .sbox { color: var(--accent); }
.sbox svg { width: 14px; height: 14px; }
.svname b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svname small {
  display: block;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svcore {
  color: var(--muted);
  font-size: 10.8px;
  line-height: 1.34;
  overflow-wrap: anywhere;
}
.svpath {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.6px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.svpl {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.svpl.on { color: var(--ok); }
.svown {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
}
.st i,
.st .dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}
.srvrow .st { color: var(--ok); }
.srvrow .st i { box-shadow: 0 0 8px var(--ok-line); }
.srvrow .st.off { color: var(--faint); }
.srvrow .st.off i { box-shadow: none; }
.srvrow .st.w { color: var(--warn); }
.svchev { display: grid; place-items: center; color: var(--faint); }
.svchev svg {
  width: 13px;
  height: 13px;
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity .15s, transform .15s;
}
.srvrow:hover .svchev svg { opacity: 1; transform: translateX(1px); }

.tablefoot {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 13px;
  flex: 0 0 auto;
  border-top: 1px solid var(--stroke-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.live-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft), 0 0 10px var(--ok-line);
  animation: breathe 2.4s ease-in-out infinite;
}

/* Side column: summary + journal */
.sidecol {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  /* Cards stack past short viewports; the column scrolls instead of clipping. */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}
.sum { flex: 0 0 auto; padding: 0 0 13px; }
.sum-rows { padding: 3px 15px 0; }
.sum-rows .r {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  color: var(--faint);
  font-size: 11.5px;
}
.sum-rows .r b {
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sum-hr { height: 1px; margin: 9px 15px; background: var(--stroke-soft); }
.sum-plan { padding: 0 15px; }
.planline { display: flex; align-items: center; gap: 12px; padding: 3px 0 9px; }
.ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--accent-2) calc(var(--p, 0) * 1%), var(--ring-track) 0);
  box-shadow: 0 0 18px rgba(139, 92, 246, .18);
}
.ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--glass-3);
  border: 1px solid var(--stroke-soft);
}
.ring span {
  position: relative;
  z-index: 1;
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
html[data-theme="light"] .ring span { color: var(--accent); }
.planline b { display: block; font-size: 11.5px; font-weight: 600; }
.planline small { display: block; margin-top: 2px; color: var(--faint); font-size: 10px; }
.sum-plan .r {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--faint);
  font-size: 11px;
}
.sum-plan .r b {
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

.act {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.act-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ev {
  display: flex;
  gap: 10px;
  padding: 8px 15px;
  border-bottom: 1px solid var(--stroke-soft);
  animation: fade .25s ease both;
}
.ev:last-child { border-bottom: 0; }
.ev .t {
  flex: 0 0 36px;
  padding-top: 1px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}
.ev .b { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.ev .b b { color: var(--text); font-weight: 600; }
.ev .b span { color: var(--accent-2); }
html[data-theme="light"] .ev .b span { color: var(--accent); }
.act-list .empty { padding: 24px 15px; }

/* =====================================================================
   Detail view
   ===================================================================== */

.detail {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.whead {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 24px 13px;
  flex: 0 0 auto;
}
.backbtn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  margin-top: 2px;
  border-color: var(--stroke);
  background: var(--glass-2);
}
.wident { min-width: 0; }
.wtitle-row { display: flex; align-items: center; gap: 10px; }
.whead h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wmeta {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wmeta .sep { margin: 0 7px; color: var(--deco); }
.wside { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8.8px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge.online { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.badge.role { text-transform: none; letter-spacing: 0; }
.badge.owner {
  color: var(--accent-2);
  border-color: var(--accent-line);
  background: var(--accent-soft);
  text-transform: none;
  letter-spacing: 0;
}
html[data-theme="light"] .badge.owner { color: var(--accent); }
.badge.plan-badge.active { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.badge.plan-badge.soon { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.badge.plan-badge.expired { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }
.badge.plan-badge.admin { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-soft); }
.badge.plan-badge.free { color: var(--muted); }
.wact { display: inline-flex; align-items: center; gap: 6px; }
.wact svg { width: 14px; height: 14px; display: block; }

.offline {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 24px 12px;
  padding: 11px 14px;
  border: 1px solid var(--warn-line);
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--warn-soft), transparent 70%);
  animation: rise .3s var(--ease) both;
}
.off-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--warn-line);
  border-radius: 9px;
  background: var(--warn-soft);
  color: var(--warn);
}
.off-ico svg { width: 15px; height: 15px; }
.off-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.off-txt b {
  color: var(--warn);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.off-txt span { color: var(--muted); font-size: 11.5px; }

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 24px 10px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--stroke-soft);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.tab svg { width: 14px; height: 14px; opacity: .75; transition: opacity .15s; }
.tab:hover { color: var(--text-2); background: var(--glass-2); }
.tab:hover svg, .tab.active svg { opacity: 1; }
.tab.active {
  color: var(--text);
  border-color: var(--stroke);
  background: var(--glass-3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset;
}
.tab.disabled { opacity: .38; pointer-events: none; }

.off-meta { color: var(--warn); }
.srvrow.off .sbox { opacity: .55; }
.srvrow.off .svname b { color: var(--text-2); }

.panes { flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; }
.pane {
  display: none;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}
.pane.active { display: flex; flex-direction: column; animation: fade .2s ease both; }

/* Console */
#pane-console { gap: 10px; padding: 14px 22px 18px; }
.termbox {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-color: var(--stroke);
}
.termbox .winbar { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.termmeta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  background:
    radial-gradient(700px 300px at 20% 0%, rgba(139, 92, 246, .07), transparent 70%),
    var(--term-bg);
  color: var(--term-text);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 4;
}
.cmdbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 13px;
  flex: 0 0 auto;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--glass-2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
  transition: border-color .16s, box-shadow .16s;
}
.cmdbar:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 1px 0 rgba(255, 255, 255, .04) inset;
}
.prompt { color: var(--accent-2); font-family: var(--mono); font-size: 12.5px; flex: 0 0 auto; }
html[data-theme="light"] .prompt { color: var(--accent); }
.cmdbar input {
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
}
.cmdbar input::placeholder { color: var(--faint); font-family: var(--sans); }
.modesw {
  display: flex;
  gap: 2px;
  padding: 2px;
  flex: 0 0 auto;
  border: 1px solid var(--stroke-soft);
  border-radius: 8px;
  background: var(--inset-bg);
}
.modesw .mode {
  height: 20px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .14s, background .14s;
}
.modesw .mode.on { color: var(--accent-2); background: var(--accent-soft); }
html[data-theme="light"] .modesw .mode.on { color: var(--accent); }

/* Files */
#pane-files { gap: 10px; padding: 14px 22px 18px; }
.filebar { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.crumbs {
  display: flex;
  align-items: center;
  gap: 1px;
  min-width: 0;
  padding: 0 2px;
  overflow-x: auto;
}
.crumb {
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
  cursor: pointer;
}
.crumb:hover { background: var(--glass-2); color: var(--text); }
.crumb:last-child { color: var(--text-2); }
.crumb-sep { color: var(--deco); font-size: 9px; }

.ftable { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.ftable .frow { padding: 0 13px; }
.fscroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.frow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 132px 104px;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  border-bottom: 1px solid var(--stroke-soft);
  color: var(--text-2);
  font-size: 12px;
}
.frow:last-child { border-bottom: 0; }
.frow:not(.fhead):hover { background: var(--cell-hover); cursor: default; }
#fRows .frow { animation: rowIn .2s ease both; animation-delay: calc(var(--i, 0) * 9ms); }
.fhead {
  min-height: 29px;
  padding: 0 13px;
  border-bottom: 1px solid var(--stroke-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.6px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.fname { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fname svg { flex: 0 0 auto; color: var(--faint); }
.frow[data-dir="true"] .fname { cursor: pointer; }
.frow[data-dir="true"] .fname svg { color: var(--accent-2); }
html[data-theme="light"] .frow[data-dir="true"] .fname svg { color: var(--accent); }
.frow[data-dir="true"] .ftext { color: var(--text); }
.ftext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity .14s; }
.frow:hover .fact, .frow:focus-within .fact { opacity: 1; }
.fstatus {
  min-height: 14px;
  flex: 0 0 auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

/* Info */
#pane-info { padding: 0; }
.infotoolbar { display: flex; align-items: center; gap: 6px; padding: 10px 22px 8px; flex: 0 0 auto; }
.info-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  align-content: start;
  gap: 11px;
  padding: 4px 22px 22px;
  overflow: auto;
}
.metric {
  position: relative;
  padding: 12px 13px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--glass);
  transition: border-color .16s, transform .16s, box-shadow .16s;
  animation: rise .3s var(--ease) both;
}
.metric:hover {
  border-color: var(--stroke-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}
.metric .k {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.8px;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.metric .v {
  margin-top: 6px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-word;
}
.metric .v.big { color: var(--text); font-size: 18px; font-weight: 600; }
.bar { height: 3px; margin-top: 10px; border-radius: 3px; background: var(--ring-track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .5s var(--ease); }
.bar.ok i { background: var(--ok); }
.bar.warn i { background: var(--warn); }
.bar.bad i { background: var(--bad); }
.metric .sub { margin-top: 6px; color: var(--faint); font-family: var(--mono); font-size: 9.5px; }

/* =====================================================================
   Pages: inject / users / settings
   ===================================================================== */

.page {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 26px 48px;
  animation: fade .24s ease both;
}
.pagehead { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.pagehead h1 {
  margin: 7px 0 5px;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 740;
  letter-spacing: -.035em;
}
.pagehead p { margin: 0; max-width: 640px; color: var(--faint); font-size: 12px; }
.pagehead .btn { margin-left: auto; }
.eyebrow {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(316px, 1fr));
  gap: 14px;
  align-items: start;
}
.card { overflow: hidden; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.card:hover { border-color: var(--stroke-strong); }
.card-body { padding: 18px 18px 17px; }
.card h3 {
  margin: 0 0 7px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -.01em;
}
.card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.62; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.kv { display: flex; flex-direction: column; }
.kv-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--stroke-soft);
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .k {
  width: 116px;
  flex: 0 0 auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.kv-row .v {
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
  word-break: break-word;
}
.hint { margin-top: 16px; color: var(--faint); font-size: 11.5px; }
.hint b { color: var(--muted); font-weight: 600; }

/* Subscription plan box */
.planbox {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background:
    radial-gradient(320px 160px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--inset-bg);
  animation: planIn .3s var(--ease) both;
}
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-cap {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.plan-big { display: flex; align-items: baseline; gap: 8px; margin-top: 11px; }
.plan-big .big {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 740;
  line-height: 1;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.plan-big .big.ok { color: var(--ok); }
.plan-big .big.warn { color: var(--warn); }
.plan-big .big.bad { color: var(--bad); }
.plan-big .unit { color: var(--muted); font-size: 11.5px; }
.plan-date { margin-top: 6px; color: var(--text-2); font-family: var(--mono); font-size: 10.5px; }
.plan-note { margin-top: 9px; color: var(--faint); font-size: 11px; line-height: 1.55; }
@keyframes planIn {
  from { opacity: 0; transform: translateY(5px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.plan-edit {
  margin: 14px 0 4px;
  padding: 13px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--inset-bg);
}
.plan-now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 11px; }
.plan-now b { color: var(--text-2); font-family: var(--mono); font-size: 11px; }
.plan-now .plan-cap { margin-right: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.chip-day, .chip {
  height: 26px;
  min-width: 38px;
  padding: 0 10px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--glass-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color .14s, border-color .14s, background .14s, transform .12s;
}
.chip-day:hover, .chip:hover { color: var(--text); border-color: var(--stroke-strong); }
.chip-day:active, .chip:active { transform: scale(.96); }
.chip-day.on, .chip.on {
  color: var(--accent-2);
  border-color: var(--accent-line);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, .1) inset;
}
html[data-theme="light"] .chip-day.on, html[data-theme="light"] .chip.on { color: var(--accent); }

/* Users table */
.utable {
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  background: var(--glass);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.urow {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 96px 136px 104px 128px 132px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--stroke-soft);
  animation: rowIn .3s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 24ms);
}
.urow:last-child { border-bottom: 0; }
.urow:not(.uhead):hover { background: var(--cell-hover); }
.uhead {
  min-height: 33px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.6px;
  letter-spacing: .15em;
  text-transform: uppercase;
  animation: none;
}
.uid { display: flex; align-items: center; gap: 11px; min-width: 0; }
.uid .ava { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.uid .nm { min-width: 0; }
.uid b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uid small { color: var(--faint); font-family: var(--mono); font-size: 10px; }
.uact { display: flex; justify-content: flex-end; gap: 3px; opacity: 0; transition: opacity .14s; }
.urow:hover .uact, .urow:focus-within .uact { opacity: 1; }
.st .dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok-line); }
.st.off .dot { background: var(--faint); }
.st.bad { color: var(--bad); }
.st.bad .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

.subcell { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.subcell b { color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.subcell small { color: var(--faint); font-family: var(--mono); font-size: 9.3px; white-space: nowrap; }
.subcell.ok b { color: var(--ok); }
.subcell.warn b { color: var(--warn); }
.subcell.bad b { color: var(--bad); }

/* Injection cards */
.injbar {
  display: flex;
  align-items: center;
  gap: 11px;
  height: auto;
  min-height: 54px;
  margin-bottom: 15px;
  padding: 11px 15px;
  flex-wrap: wrap;
}
.injbar .lbl { margin: 0; flex: 0 0 auto; }
.injbar select.txt { width: 300px; }
.injbar .pill { flex: 0 0 auto; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 9px;
  border: 1px solid var(--tag-line);
  border-radius: 99px;
  background: var(--tag-bg);
  color: var(--tag);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
}

.keyrow {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 4px 5px 4px 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--inset-bg);
}
.keyval {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
}
.keyval.revealed { color: var(--accent-2); }
html[data-theme="light"] .keyval.revealed { color: var(--accent); }
.pub-effective { margin-top: 12px; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 118px;
  margin-top: 13px;
  padding: 18px;
  border: 1px dashed var(--stroke-strong);
  border-radius: var(--r-md);
  background:
    radial-gradient(280px 140px at 50% 0%, var(--accent-soft), transparent 70%),
    var(--inset-bg);
  cursor: pointer;
  text-align: center;
  transition: border-color .16s, background .16s, transform .16s;
}
.drop:hover, .drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.drop.has { border-style: solid; border-color: var(--accent-line); }
.drop-ico {
  font-size: 19px;
  line-height: 1;
  color: var(--accent-2);
  transition: transform .2s var(--ease);
}
.drop:hover .drop-ico { transform: translateY(-2px); }
.drop-main { color: var(--text); font-size: 12.5px; }
.drop-sub { color: var(--faint); font-family: var(--mono); font-size: 10.5px; word-break: break-all; }

.injsteps { margin-top: 14px; }
.steps { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 12.5px; }
.steps li { margin-bottom: 8px; line-height: 1.55; }
.steps code {
  padding: 1px 5px;
  border: 1px solid var(--stroke-soft);
  border-radius: 5px;
  background: var(--inset-bg);
  color: var(--text-2);
  font-size: 11px;
}
.cmdline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 5px 5px 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--term-bg);
}
.cmdline code {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 11px;
}

/* =====================================================================
   Sidebar drawer
   ===================================================================== */

.sidebar {
  position: absolute;
  z-index: 90;
  top: 0;
  left: 0;
  bottom: 0;
  width: 282px;
  max-width: 86vw;
  display: flex;
  flex-direction: column;
  padding: 18px 13px 14px;
  border-right: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(19, 23, 38, .97), rgba(9, 11, 19, .99));
  box-shadow: 36px 0 90px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  backdrop-filter: blur(28px) saturate(1.3);
  transform: translateX(-104%);
  transition: transform .36s var(--ease);
  will-change: transform;
}
html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(244, 247, 253, .99));
  box-shadow: 36px 0 80px rgba(23, 32, 58, .18);
}
.sidebar.open { transform: none; }
.sidebar .brand { padding: 0 8px 18px; }
.scrim {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s;
}
.scrim.on { opacity: 1; pointer-events: auto; }

.snav { display: flex; flex-direction: column; gap: 2px; }
.nav-lbl {
  padding: 12px 10px 5px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.snav .navbtn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.snav .navbtn svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--faint); transition: color .15s; }
.snav .navbtn:hover { color: var(--text); background: var(--glass-2); }
.snav .navbtn:hover svg { color: var(--muted); }
.snav .navbtn.active {
  color: var(--text);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.snav .navbtn.active svg { color: var(--accent-2); }
html[data-theme="light"] .snav .navbtn.active svg { color: var(--accent); }
.snav .navn {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: var(--glass-3);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
}

.sb-sep { height: 1px; margin: 16px 8px; background: var(--stroke-soft); }
.sys {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.sys .r { display: flex; align-items: center; gap: 8px; }
.sys .r b {
  margin-left: auto;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.sys .d { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--ok); }
.sys .d.v { background: var(--accent); }
.sys .d.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok-line); }
.sys .d.off { background: var(--faint); box-shadow: none; }

.sb-me {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding: 9px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--glass-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.sb-me:hover { border-color: var(--stroke-strong); background: var(--glass-3); transform: translateY(-1px); }
.ava {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
}
html[data-theme="light"] .ava { color: var(--accent); }
.metxt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.metxt b {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metxt small { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 10px; }
.planmini {
  display: inline-flex;
  align-items: center;
  height: 15px;
  padding: 0 5px;
  border: 1px solid var(--stroke);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8.5px;
}
.planmini.soon { color: var(--warn); border-color: var(--warn-line); }
.planmini.bad { color: var(--bad); border-color: var(--bad-line); }

/* =====================================================================
   Modal / editor / palette / toast
   ===================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  animation: fade .18s ease both;
}
.modal-card {
  width: min(560px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--modal-bg);
  box-shadow: var(--shadow-pop);
  animation: cardIn .26s var(--ease) both;
}
.modal-card.wide { width: min(860px, 100%); }
.modal-card > .winbar { border-radius: 0; height: 40px; padding: 0 10px 0 14px; }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 22px;
  border-top: 1px solid var(--stroke-soft);
  background: var(--inset-bg);
}
.modal-foot:empty { display: none; }
.modal-note { color: var(--muted); font-size: 12.5px; line-height: 1.62; }
.modal-note b { color: var(--text-2); font-weight: 500; }

.editor {
  width: 100%;
  min-height: 46vh;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--editor-bg);
  color: var(--term-text);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  tab-size: 4;
}
.editor:focus { border-color: var(--stroke-strong); box-shadow: 0 0 0 3px var(--accent-soft); }
.edmeta {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.palette-input {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--inset-bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
}
.palette-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.palette-list { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; margin-top: 10px; overflow: auto; }
.palette-lbl {
  padding: 8px 8px 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.8px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
}
.palette-item:hover, .palette-item:focus-visible { background: var(--glass-2); border-color: var(--stroke); color: var(--text); }
.palette-item b { font-size: 12.5px; font-weight: 500; }
.palette-item small { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 9.5px; }
.palette-none { padding: 20px; text-align: center; color: var(--faint); font-size: 12px; }

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
}
.toast {
  padding: 11px 14px;
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--toast-bg);
  color: var(--text-2);
  font-size: 12px;
  box-shadow: var(--shadow-pop);
  animation: toastin .2s var(--ease) both;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--bad); }
.toast.out { animation: toastout .18s ease both; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 34px 16px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
  line-height: 1.6;
}
.empty .btn { margin-top: 10px; }
.act-list .empty, .stable .empty { padding: 30px 16px; }

/* Skeleton shimmer */
.frow.sk { pointer-events: none; }
.skbar {
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--sk-a) 20%, var(--sk-b) 50%, var(--sk-a) 80%);
  background-size: 220% 100%;
  animation: shimmer 1.25s linear infinite;
}
.skbar.w1 { width: 62%; }
.skbar.w2 { width: 48px; justify-self: end; }
.skbar.w3 { width: 72px; }

/* =====================================================================
   Bulk plugin pass
   ===================================================================== */

.spread-sum { min-height: 18px; margin: 11px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.spread-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 44vh;
  overflow: auto;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--inset-bg);
}
.srow {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--stroke-soft);
  animation: rowIn .2s ease both;
}
.srow:last-child { border-bottom: 0; }
.srow .sic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--glass-3);
  color: var(--faint);
}
.srow .sic svg { width: 12px; height: 12px; }
.srow.ok .sic { color: var(--ok); background: var(--ok-soft); }
.srow.bad .sic { color: var(--bad); background: var(--bad-soft); }
.srow.warn .sic { color: var(--warn); background: var(--warn-soft); }
.srow .sn { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.srow .sn b {
  color: var(--text);
  font-size: 12px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.srow .sn small {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.srow .st { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.srow.ok .st { color: var(--ok); }
.srow.bad .st { color: var(--bad); }
.srow.warn .st { color: var(--warn); }
.spread-wait {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 12px;
}
.spread-none { padding: 18px 16px; color: var(--muted); font-size: 12px; text-align: center; }
.spread-none.bad { color: var(--bad); }
.spin {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid var(--stroke);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* =====================================================================
   Motion
   ===================================================================== */

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-5px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes toastin { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(4px); } }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px var(--ok-soft), 0 0 8px var(--ok-line); }
  50% { opacity: .72; box-shadow: 0 0 0 2px var(--ok-soft), 0 0 4px var(--ok-line); }
}
.dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--faint);
}
.dot.on {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft), 0 0 12px var(--ok-line);
  animation: breathe 2.4s ease-in-out infinite;
}

/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 1180px) {
  .fleetgrid { grid-template-columns: minmax(0, 1fr) 286px; }
  .stable { --cols: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1fr) 72px 72px 84px 16px; }
  .own-col, .svown { display: none; }
  .urow { grid-template-columns: minmax(0, 1.5fr) 86px 120px 92px 110px 116px; }
}

@media (max-width: 1080px) {
  .kpis, .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg .navbtn { padding: 0 10px; gap: 6px; }
  .stable { --cols: minmax(0, 1.5fr) minmax(0, 1.15fr) 70px 70px 84px 16px; }
  .path-col, .svpath { display: none; }
  .aside, .sidecol { min-height: 0; }
}

@media (max-width: 1000px) {
  .seg .navlabel { display: none; }
  .seg .navbtn { padding: 0 11px; }
}

@media (max-width: 980px) {
  .dash { overflow-y: auto; }
  .fleetgrid { display: block; }
  .tablecard { min-height: 340px; max-height: 62vh; margin-bottom: 14px; }
  .sidecol { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .act { min-height: 220px; max-height: 320px; }
  .tb-name { display: none; }
}

@media (max-width: 900px) {
  .stable { --cols: minmax(0, 1.5fr) minmax(0, 1.1fr) 64px 82px 16px; }
  .up-col, .srvrow .pl { display: none; }
  .urow { grid-template-columns: minmax(0, 1.4fr) 84px 110px 100px 112px; }
  .urow > span:nth-child(5) { display: none; }
  .wside { display: none; }
}

@media (max-width: 760px) {
  .app { padding: 0; }
  .shell { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
  .titlebar { height: 30px; padding: 0 12px; }
  .tb-clock, .tb-build { display: none; }
  .deck { height: 56px; padding: 0 10px; }
  .seg { gap: 0; padding: 4px; }
  .seg .navbtn { height: 32px; padding: 0 9px; gap: 5px; }
  .seg .navbtn .navn { display: none; }
  .searchchip kbd { display: none; }
  .deck-tools .searchchip { width: 32px; padding: 0; }
  .dash { padding: 16px 14px 18px; gap: 13px; }
  .hero { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .hero h1 { font-size: 26px; }
  .hero-act { margin-left: 0; width: 100%; }
  .hero-act .btn { flex: 1 1 auto; }
  .kpis, .statgrid { gap: 9px; }
  .kpi { min-height: 84px; padding: 12px 12px 11px; }
  .kpi .v { font-size: 23px; }
  .kpi svg.spark { width: 56px; opacity: .5; }
  .sidecol { display: block; }
  .act { max-height: 260px; }
  .page { padding: 18px 14px 40px; }
  .pagehead { flex-wrap: wrap; align-items: flex-start; }
  .pagehead .btn { margin-left: 0; width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .tablecard { max-height: 58vh; }
  .tablecard .winbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 38px;
    padding: 6px 10px;
    row-gap: 6px;
  }
  .ftabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .ftabs::-webkit-scrollbar { display: none; }
  .stable { --cols: minmax(0, 1fr) 58px 76px 14px; }
  .core-col, .svcore { display: none; }
  .srow-head, .srvrow { padding: 6px 10px; gap: 8px; }
  .whead { padding: 12px 14px 10px; }
  .tabs { padding: 0 14px 9px; overflow-x: auto; }
  .offline { margin: 0 14px 10px; }
  #pane-console, #pane-files { padding: 12px 12px 14px; }
  .filebar { flex-wrap: wrap; }
  .filebar .btn.small { flex: 0 0 auto; }
  .cmdbar { flex-wrap: wrap; }
  .cmdbar input { flex-basis: 100%; order: 4; height: 30px; }
  .infotoolbar { padding: 9px 14px 6px; }
  .info-grid { padding: 4px 14px 18px; grid-template-columns: 1fr; }
  .urow { grid-template-columns: minmax(0, 1fr) 92px 92px; min-height: 52px; }
  .urow > span:nth-child(2),
  .urow > span:nth-child(5),
  .urow > span:nth-child(6) { display: none; }
  .uhead { display: none; }
  .uact { opacity: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 10px; }
  .modal-card { max-height: 94vh; }
  .modal-body { padding: 16px; }
  .injbar select.txt { width: 100%; }
  .toasts { right: 10px; bottom: 10px; }
  .frow { grid-template-columns: minmax(0, 1fr) 70px 90px; }
  .frow > *:nth-child(4) { display: none; }
  .sb-me { margin-top: 12px; }
}

@media (max-width: 600px) {
  .seg .navbtn { padding: 0 8px; }
  .seg .navbtn span.navlabel { display: none; }
  .kpis, .statgrid { grid-template-columns: 1fr 1fr; }
  .kpi .d { font-size: 9.5px; }
  .wtitle-row { flex-wrap: wrap; }
  .whead h1 { font-size: 18px; }
  .wact span { display: none; }
  .frow { grid-template-columns: minmax(0, 1fr) 64px; }
  .frow > *:nth-child(3) { display: none; }
  .ftabs button { padding: 0 6px; font-size: 10px; }
  .urow { grid-template-columns: minmax(0, 1fr) 84px; }
  .urow > span:nth-child(4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   WantaTools 2.12 — "Clean Deck"
   A calmer, brighter skin over the 2.9 structure: near-black surfaces,
   violet as the action colour and mint for live state. Window chrome is
   gone, controls are pills, numbers are bigger and the table breathes.
   This layer only overrides; layout, column counts and responsive column
   hiding stay owned by the sections above.
   ===================================================================== */

/* ---------- palette ---------- */

:root {
  --bg: #08080c;
  --bg-2: #0c0c12;
  --bg-3: #121219;
  --glass: rgba(17, 17, 24, .74);
  --glass-2: rgba(23, 23, 32, .84);
  --glass-3: rgba(30, 30, 41, .92);
  --glass-hi: rgba(255, 255, 255, .04);
  --glass-inset: rgba(0, 0, 0, .26);
  --stroke: rgba(255, 255, 255, .085);
  --stroke-soft: rgba(255, 255, 255, .055);
  --stroke-strong: rgba(255, 255, 255, .17);
  --stroke-hot: rgba(150, 122, 255, .55);

  --text: #f6f6fb;
  --text-2: #d3d3df;
  --muted: #9a9aae;
  --faint: #6e6e84;
  --deco: #3c3c4e;

  --accent: #7c5cff;
  --accent-2: #b6a4ff;
  --accent-3: #3ee6b0;
  --accent-soft: rgba(124, 92, 255, .14);
  --accent-line: rgba(124, 92, 255, .42);
  --ok: #46e6a5;
  --ok-soft: rgba(70, 230, 165, .11);
  --ok-line: rgba(70, 230, 165, .3);
  --warn: #ffc861;
  --warn-soft: rgba(255, 200, 97, .1);
  --warn-line: rgba(255, 200, 97, .28);
  --bad: #ff7089;
  --bad-soft: rgba(255, 112, 137, .1);
  --bad-line: rgba(255, 112, 137, .3);

  --term-bg: #08080d;
  --term-text: #dbe0f0;
  --editor-bg: #08080d;
  --inset-bg: rgba(255, 255, 255, .045);
  --code-text: #c3b2ff;
  --modal-bg: #14141c;
  --overlay: rgba(4, 4, 9, .66);
  --toast-bg: rgba(27, 27, 37, .97);
  --btn-primary-bg: #6a48ff;
  --btn-primary-fg: #ffffff;
  --btn-primary-hover: #7b5cff;
  --cell-hover: rgba(124, 92, 255, .075);
  --tag: #c3b2ff;
  --tag-bg: rgba(124, 92, 255, .14);
  --tag-line: rgba(124, 92, 255, .3);
  --grid: rgba(150, 160, 255, .035);
  --scroll-thumb: rgba(160, 160, 190, .22);
  --scroll-thumb-hover: rgba(150, 122, 255, .45);

  --shadow-card: 0 10px 30px rgba(0, 0, 0, .32);
  --shadow-pop: 0 36px 100px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  --shadow-glow: 0 0 0 1px var(--accent-line), 0 12px 32px rgba(106, 72, 255, .3);
  --ring-track: rgba(255, 255, 255, .08);
  --sk-a: rgba(160, 160, 190, .06);
  --sk-b: rgba(182, 164, 255, .14);

  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
}

html[data-theme="light"] {
  --bg: #f2f3f9;
  --bg-2: #f7f8fc;
  --bg-3: #ffffff;
  --glass: rgba(255, 255, 255, .9);
  --glass-2: #ffffff;
  --glass-3: #ffffff;
  --glass-hi: rgba(255, 255, 255, .92);
  --glass-inset: rgba(18, 18, 46, .035);
  --stroke: rgba(18, 18, 46, .1);
  --stroke-soft: rgba(18, 18, 46, .06);
  --stroke-strong: rgba(18, 18, 46, .18);
  --stroke-hot: rgba(106, 72, 255, .5);

  --text: #14141f;
  --text-2: #383848;
  --muted: #62627a;
  --faint: #8b8ba0;
  --deco: #c3c3d4;

  --accent: #6a48ff;
  --accent-2: #5a36f0;
  --accent-3: #0fa97a;
  --accent-soft: rgba(106, 72, 255, .09);
  --accent-line: rgba(106, 72, 255, .32);
  --ok: #0e9f72;
  --ok-soft: rgba(14, 159, 114, .1);
  --ok-line: rgba(14, 159, 114, .28);
  --warn: #b06d00;
  --warn-soft: rgba(176, 109, 0, .1);
  --warn-line: rgba(176, 109, 0, .26);
  --bad: #d92f4e;
  --bad-soft: rgba(217, 47, 78, .08);
  --bad-line: rgba(217, 47, 78, .26);

  --term-bg: #0b0d16;
  --term-text: #d5dcf3;
  --editor-bg: #0b0d16;
  --inset-bg: rgba(18, 18, 46, .04);
  --code-text: #5a36f0;
  --modal-bg: #ffffff;
  --overlay: rgba(18, 24, 40, .42);
  --toast-bg: rgba(255, 255, 255, .98);
  --btn-primary-bg: #6a48ff;
  --btn-primary-fg: #ffffff;
  --btn-primary-hover: #5836ea;
  --cell-hover: rgba(106, 72, 255, .055);
  --tag: #5a36f0;
  --tag-bg: rgba(106, 72, 255, .08);
  --tag-line: rgba(106, 72, 255, .24);
  --grid: rgba(18, 18, 46, .04);
  --scroll-thumb: rgba(18, 18, 46, .18);
  --scroll-thumb-hover: rgba(106, 72, 255, .38);

  --shadow-card: 0 12px 30px rgba(20, 20, 50, .08);
  --shadow-pop: 0 36px 90px rgba(20, 20, 50, .22), 0 1px 0 #fff inset;
  --shadow-glow: 0 0 0 1px var(--accent-line), 0 12px 28px rgba(106, 72, 255, .18);
  --ring-track: rgba(18, 18, 46, .1);
  --sk-a: rgba(18, 18, 46, .05);
  --sk-b: rgba(106, 72, 255, .1);
}

/* Faint ink is meant for large dark-theme numbers; on white it drops below a
   comfortable contrast, so secondary labels step up one token. */
html[data-theme="light"] .srow-head,
html[data-theme="light"] .uhead,
html[data-theme="light"] .fhead,
html[data-theme="light"] .tablefoot,
html[data-theme="light"] .tb-clock,
html[data-theme="light"] .tb-build,
html[data-theme="light"] .kpi .d,
html[data-theme="light"] .kpi .k,
html[data-theme="light"] .svpath,
html[data-theme="light"] .svname small,
html[data-theme="light"] .sum-rows .r { color: var(--muted); }

/* ---------- ambient background ---------- */

body::before {
  background:
    radial-gradient(1200px 620px at 10% -16%, rgba(124, 92, 255, .24), transparent 60%),
    radial-gradient(920px 520px at 94% -10%, rgba(62, 230, 176, .12), transparent 58%),
    radial-gradient(860px 620px at 58% 122%, rgba(64, 110, 255, .13), transparent 64%);
}
body::after {
  background-size: 52px 52px;
  opacity: .55;
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(1100px 600px at 10% -16%, rgba(124, 92, 255, .17), transparent 60%),
    radial-gradient(900px 520px at 96% -10%, rgba(15, 169, 122, .1), transparent 58%),
    radial-gradient(860px 620px at 58% 122%, rgba(64, 110, 255, .09), transparent 64%);
}
html[data-theme="light"] body::after {
  opacity: .8;
}

/* ---------- brand ---------- */

.mark {
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(196, 181, 253, .42), transparent 62%),
    linear-gradient(150deg, #7c5cff, #4b2fd6);
  box-shadow: 0 8px 22px rgba(106, 72, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .22);
  color: #fff;
  font-weight: 800;
}
html[data-theme="light"] .mark {
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255, 255, 255, .5), transparent 62%),
    linear-gradient(150deg, #7c5cff, #5433e0);
  box-shadow: 0 8px 20px rgba(106, 72, 255, .26), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.mark.sm {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 12px;
}
.brandname span { color: var(--accent-2); }
.brandtxt small {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .01em;
  text-transform: none;
}

/* ---------- shell + top bars ---------- */

.app { padding: 14px; }
.shell {
  border-radius: var(--r-xl);
  border-color: var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 16%), var(--glass);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(255, 255, 255, .03) inset;
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  backdrop-filter: blur(30px) saturate(1.2);
}
html[data-theme="light"] .shell {
  background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, .94));
  box-shadow: 0 26px 70px rgba(20, 20, 50, .14), 0 1px 0 #fff inset;
}

.titlebar {
  height: 46px;
  padding: 0 18px;
  gap: 12px;
  border-bottom: 1px solid var(--stroke-soft);
  background: transparent;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}
.tb-brand { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.tb-word {
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}
.tb-word span { color: var(--accent-2); }
.tb-right { gap: 10px; }
.tb-clock {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .02em;
}
.tb-live {
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--stroke-soft);
  border-radius: 99px;
  background: var(--glass-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  text-transform: none;
}
.tb-live .dot { width: 5px; height: 5px; }
.tb-build {
  padding: 3px 8px;
  border: 1px solid var(--stroke-soft);
  border-radius: 99px;
  background: var(--glass-2);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .02em;
}

.deck {
  height: 66px;
  padding: 0 18px;
  gap: 10px;
  border-bottom: 1px solid var(--stroke-soft);
  background: transparent;
}

.orb {
  height: 34px;
  min-width: 34px;
  border: 1px solid var(--stroke);
  border-radius: 11px;
  background: var(--glass-2);
  color: var(--text-2);
  font-size: 10px;
  letter-spacing: .06em;
}
.orb:hover {
  color: var(--text);
  border-color: var(--stroke-strong);
  background: var(--glass-3);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
}
html[data-theme="light"] .orb:hover { box-shadow: 0 8px 18px rgba(20, 20, 50, .1); }
.searchchip { padding: 0 9px; }
.searchchip kbd {
  background: var(--glass-hi);
  border-color: var(--stroke-soft);
  color: var(--faint);
  font-size: 10px;
  padding: 2px 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mebtn {
  border-radius: 50%;
  border-color: var(--accent-line);
  background: linear-gradient(145deg, rgba(124, 92, 255, .4), rgba(62, 230, 176, .18));
  color: #fff;
}
html[data-theme="light"] .mebtn {
  background: linear-gradient(145deg, #ede7ff, #ffffff);
  color: #4b2fd6;
}

.seg {
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--glass-2);
  box-shadow: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
html[data-theme="light"] .seg { box-shadow: 0 6px 18px rgba(20, 20, 50, .06); }
.seg-glow {
  top: 4px;
  bottom: 4px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #8060ff, #5a36f0);
  box-shadow: 0 6px 18px rgba(106, 72, 255, .38), inset 0 1px 0 rgba(255, 255, 255, .2);
}
html[data-theme="light"] .seg-glow {
  background: linear-gradient(135deg, #8060ff, #5a36f0);
  box-shadow: 0 6px 16px rgba(106, 72, 255, .28);
}
.seg .navbtn {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.seg .navbtn:hover { color: var(--text); }
.seg .navbtn.on,
html[data-theme="light"] .seg .navbtn.on { color: #fff; }
.seg .navbtn.on svg,
html[data-theme="light"] .seg .navbtn.on svg { color: #fff; opacity: .9; }
.seg .navn {
  background: rgba(255, 255, 255, .11);
  color: var(--muted);
  font-size: 9.5px;
  height: 16px;
  min-width: 16px;
}
html[data-theme="light"] .seg .navn { background: rgba(18, 18, 46, .06); }
.seg .navbtn.on .navn,
html[data-theme="light"] .seg .navbtn.on .navn {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

/* ---------- buttons and fields ---------- */

.btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border-color: var(--stroke);
  background: var(--glass-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.005em;
}
.btn:hover {
  color: var(--text);
  border-color: var(--stroke-strong);
  background: var(--glass-3);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}
html[data-theme="light"] .btn:hover { box-shadow: 0 8px 18px rgba(20, 20, 50, .09); }
.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #8465ff, #5a36f0);
  color: #fff;
  box-shadow: 0 8px 22px rgba(106, 72, 255, .34), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn.primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #9176ff, #6644ff);
  box-shadow: 0 12px 28px rgba(106, 72, 255, .44), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--glass-2); }
.btn.small { height: 28px; padding: 0 10px; border-radius: 9px; font-size: 11.5px; }
.btn.wide { width: 100%; }
.btn.danger { background: var(--bad-soft); }

.iconbtn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.iconbtn:hover { background: var(--glass-2); border-color: var(--stroke); }

.field input,
input.txt,
select.txt,
textarea.txt {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: var(--inset-bg);
  box-shadow: none;
  font-size: 13px;
}
select.txt { height: 38px; padding-right: 32px; background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; }
input.txt.mono { font-size: 11.5px; }
.field span,
.lbl {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--muted);
}
.field input:focus,
input.txt:focus,
select.txt:focus,
textarea.txt:focus {
  border-color: var(--accent-line);
  background: var(--glass-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- cards ---------- */

.win {
  border-radius: var(--r-lg);
  border-color: var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent 26%), var(--glass);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  backdrop-filter: blur(22px) saturate(1.15);
}
.win::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 26%);
  opacity: .55;
}
html[data-theme="light"] .win {
  background: var(--glass-2);
  box-shadow: var(--shadow-card);
}
html[data-theme="light"] .win::before { opacity: .3; }

.winbar {
  height: 40px;
  padding: 0 16px;
  gap: 9px;
  border-bottom: 1px solid var(--stroke-soft);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: transparent;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.005em;
  text-transform: none;
}
.winbar .tl { display: none; }
.wintitle { color: var(--text-2); }
.wmeta,
.chmeta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .1em;
}
.chmeta { text-transform: uppercase; }
/* The detail header prints the real core string and the launch directory, so
   it keeps its original case. */
.wident .wmeta { text-transform: none; }
.winbar .iconbtn { width: 26px; height: 26px; margin-right: -4px; }

/* ---------- hero ---------- */

.dash {
  gap: 18px;
  padding: 22px 26px 26px;
}
.hero { align-items: center; }
.kicker {
  gap: 0;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--accent-line);
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
}
.kicker::before { display: none; }
.hero h1 {
  margin: 9px 0 6px;
  font-size: 34px;
  font-weight: 740;
  letter-spacing: -.04em;
}
.dsub { color: var(--muted); font-size: 12.5px; }
.hero-act { gap: 8px; }

/* ---------- KPI tiles ---------- */

.kpis,
.statgrid { gap: 12px; }
.kpi {
  min-height: 112px;
  padding: 16px 17px 15px;
  border-radius: var(--r-md);
  border-color: var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 42%), var(--glass);
  box-shadow: var(--shadow-card);
  --kpi-ink: 124, 92, 255;
}
.kpi:nth-child(2) { --kpi-ink: 70, 230, 165; }
.kpi:nth-child(3) { --kpi-ink: 104, 152, 255; }
.kpi:nth-child(4) { --kpi-ink: 255, 194, 102; }
.kpi::after {
  top: 0;
  right: 0;
  left: auto;
  bottom: auto;
  width: 130px;
  height: 130px;
  margin: -46px -46px 0 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--kpi-ink), .16), transparent 68%);
}
.kpi::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 0;
  width: 30px;
  height: 2px;
  border-radius: 0 0 4px 4px;
  background: rgb(var(--kpi-ink));
  opacity: .7;
}
.kpi:hover {
  border-color: var(--stroke-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card), 0 0 30px rgba(var(--kpi-ink), .1);
}
.kpi .k {
  gap: 7px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: .01em;
  text-transform: none;
}
.kpi .k i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(var(--kpi-ink));
  box-shadow: 0 0 10px rgba(var(--kpi-ink), .55);
}
.kpi .v {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 720;
  letter-spacing: -.045em;
  color: var(--text);
}
.kpi .v em {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
}
.kpi .d { margin-top: 7px; color: var(--faint); font-size: 11.5px; }
.kpi .d b { color: var(--ok); }
.kpi svg.spark {
  right: 14px;
  bottom: 12px;
  width: 74px;
  height: 24px;
  color: rgb(var(--kpi-ink));
  opacity: .34;
}

/* ---------- fleet table ---------- */

.fleetgrid { gap: 14px; }
.tablecard { border-radius: var(--r-lg); }
.tablecard .winbar { padding: 0 18px; }

.ftabs {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--stroke-soft);
  border-radius: 10px;
  background: var(--inset-bg);
}
.ftabs button {
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.ftabs button:hover { color: var(--text); background: var(--glass-2); }
.ftabs button.on {
  color: var(--text);
  background: var(--glass-3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset;
}
html[data-theme="light"] .ftabs button.on {
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 20, 50, .1);
}

.stable-body { padding: 4px 6px 6px; }
.srow-head,
.srvrow {
  gap: 10px;
  padding: 0 20px;
}
.srow-head {
  height: 34px;
  border-bottom: 1px solid var(--stroke-soft);
  color: var(--faint);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: .01em;
  text-transform: none;
}
.srvrow {
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 7px 14px;
  border: 0;
  border-bottom: 1px solid var(--stroke-soft);
  border-radius: 12px;
  background: transparent;
  text-align: left;
  transition: background .15s, box-shadow .15s;
}
.srvrow:last-child { border-bottom: 0; }
.srvrow:hover {
  background: var(--cell-hover);
  box-shadow: inset 2px 0 0 var(--accent);
}

/* Column widths for the full layout only; the responsive blocks above own
   the column count and must not be overridden by this layer. */
@media (min-width: 1181px) {
  .stable { --cols: minmax(0, 1.5fr) minmax(0, 1.15fr) minmax(0, 1.05fr) 84px 94px 78px 92px 16px; }
}
.sbox {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-2);
}
.sbox svg { width: 15px; height: 15px; }
.svname b { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.svname small {
  font-family: var(--mono);
  font-size: 9.8px;
  color: var(--faint);
  letter-spacing: .01em;
}
.svcore {
  color: var(--text-2);
  font-size: 11.2px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.svpath {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.8px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.svpl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  height: 22px;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid var(--stroke-soft);
  border-radius: 99px;
  background: var(--glass-hi);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.srvrow .svpl.on {
  border-color: var(--ok-line);
  background: var(--ok-soft);
  color: var(--ok);
}
.svown { font-size: 10.5px; color: var(--muted); }
.pl { color: var(--muted); font-size: 10.5px; }
.srvrow .st {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--ok-line);
  border-radius: 99px;
  background: var(--ok-soft);
  color: var(--ok);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.srvrow .st i { width: 5px; height: 5px; box-shadow: none; }
.srvrow .st.off {
  border-color: var(--stroke-soft);
  background: var(--glass-hi);
  color: var(--faint);
}
.srvrow .st.w {
  border-color: var(--warn-line);
  background: var(--warn-soft);
  color: var(--warn);
}
.svchev svg { width: 14px; height: 14px; opacity: .35; transform: none; }
.srvrow:hover .svchev svg { opacity: 1; transform: translateX(2px); }

.tablefoot {
  height: 34px;
  padding: 0 20px;
  gap: 8px;
  border-top: 1px solid var(--stroke-soft);
  color: var(--faint);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .01em;
  text-transform: none;
}
.live-dot {
  width: 6px;
  height: 6px;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

/* ---------- summary + activity ---------- */

.sidecol { gap: 14px; }
.sum { padding-bottom: 14px; }
.sum-rows { padding: 6px 16px 0; }
.sum-rows .r {
  padding: 7px 0;
  color: var(--muted);
  font-size: 12px;
}
.sum-rows .r b {
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
}
.sum-hr { margin: 10px 16px; background: var(--stroke-soft); }
.sum-plan { padding: 0 16px; }
.ring {
  width: 52px;
  height: 52px;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), var(--ring-track) 0);
  box-shadow: 0 0 20px rgba(124, 92, 255, .2);
}
.ring::before { inset: 5px; background: var(--bg-2); }
.ring span { font-family: var(--sans); font-size: 11.5px; font-weight: 700; color: var(--text); }
.planline b { font-size: 12px; }
.planline small { font-size: 10.5px; }

.act-list .ev { padding: 9px 16px; }
.act-list .ev .b { font-size: 11.5px; }
.act-list .empty { padding: 26px 16px; }

/* ---------- detail view ---------- */

.whead { padding: 16px 26px 12px; }
.whead h1 { font-size: 23px; font-weight: 720; letter-spacing: -.03em; }
.wmeta { margin-top: 5px; font-size: 11px; color: var(--muted); }
.badge {
  height: 22px;
  padding: 0 9px;
  border-radius: 99px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
}
.badge.online { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
.wact { height: 30px; }
.offline { margin: 0 26px 12px; border-radius: 12px; }
.off-txt b {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .01em;
  text-transform: none;
}

.tabs {
  gap: 4px;
  padding: 0 26px 12px;
  border-bottom: 0;
}
.tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
}
.tab.active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-2);
  box-shadow: none;
}
html[data-theme="light"] .tab.active { color: var(--accent); }

#pane-console { padding: 6px 26px 22px; }
.termbox { border-radius: var(--r-lg); }
.termbox .winbar { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.term { padding: 16px 18px; font-size: 12px; line-height: 1.65; }
.cmdbar {
  padding: 8px 9px 8px 14px;
  border-radius: 12px;
  background: var(--glass-2);
}
.cmdbar input { height: 28px; font-size: 12.5px; }
.modesw { border-radius: 8px; padding: 2px; }
.cmdbar .btn { height: 32px; }

#pane-files { padding: 6px 26px 22px; }
.filebar { gap: 7px; }
.ftable { border-radius: var(--r-lg); }
.frow { min-height: 38px; font-size: 12.5px; }
.fhead {
  min-height: 32px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: .01em;
  text-transform: none;
}
.fstatus { font-size: 11.5px; }

#pane-info { padding: 6px 26px 22px; }
.infotoolbar { padding: 4px 0 10px; }
.info-grid { gap: 12px; }
.metric {
  border-radius: 14px;
  border-color: var(--stroke);
  background: var(--glass-2);
}

/* ---------- pages, cards, users ---------- */

.page { padding: 26px 28px 52px; }
.pagehead { margin-bottom: 20px; }
.pagehead h1 { margin: 9px 0 6px; font-size: 30px; font-weight: 740; letter-spacing: -.04em; }
.pagehead p { color: var(--muted); font-size: 12.5px; }
.cards { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.card { border-radius: var(--r-lg); }
/* Card headers repeated the body title; the body carries the heading now. */
.card > .winbar { display: none; }
.card > .card-body { padding: 22px 20px 20px; }
.card h3 { font-size: 15.5px; font-weight: 680; }
.card p { font-size: 12.5px; }
.card-actions { gap: 8px; margin-top: 18px; }
.card:hover { border-color: var(--stroke-strong); }

.injbar { border-radius: var(--r-md); }
.drop { border-radius: 14px; }
.steps { font-size: 12.5px; }
.kv-row .k {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: .01em;
  text-transform: none;
}
.kv-row .v { font-size: 11.5px; }

.utable { border-radius: var(--r-lg); }
.urow { min-height: 58px; padding: 0 18px; }
.uhead {
  min-height: 36px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: .01em;
  text-transform: none;
}
.uhead:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }

.planbox {
  border-radius: 14px;
  background:
    radial-gradient(320px 160px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--inset-bg);
}
.plan-cap {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: .01em;
  text-transform: none;
}
.plan-big .big { font-size: 36px; }
.chip-day, .chip { border-radius: 9px; }

/* ---------- sidebar ---------- */

.sidebar {
  width: 268px;
  padding: 20px 14px 16px;
  border-right: 1px solid var(--stroke);
  border-radius: 0 20px 20px 0;
  background: var(--glass-3);
  box-shadow: 30px 0 70px rgba(0, 0, 0, .45);
}
html[data-theme="light"] .sidebar {
  background: #fff;
  box-shadow: 30px 0 70px rgba(20, 20, 50, .14);
}
.sidebar .brand { padding: 2px 8px 20px; }
.sidebar .mark { width: 38px; height: 38px; border-radius: 12px; font-size: 17px; }
.nav-lbl {
  padding: 14px 10px 6px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--faint);
}
.snav { gap: 3px; }
.snav .navbtn {
  height: 38px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.snav .navbtn:hover { background: var(--glass-2); color: var(--text); }
.snav .navbtn.active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}
.snav .navbtn.active svg { color: var(--accent-2); }
html[data-theme="light"] .snav .navbtn.active svg { color: var(--accent); }
.snav .navn { background: var(--glass-2); }
.sb-sep { background: var(--stroke-soft); }
.sys {
  padding: 0 10px;
  gap: 9px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--muted);
}
.sys .r b { font-family: var(--mono); font-size: 10px; color: var(--text-2); }
.sb-me {
  padding: 10px;
  border-radius: 14px;
  background: var(--glass-2);
}
.sb-me .ava { border-radius: 11px; background: var(--accent-soft); color: var(--accent-2); }
.sb-me .metxt b { font-size: 12.5px; }
.sb-me .metxt small { font-size: 10.5px; }

/* ---------- login ---------- */

.login-tools { top: 20px; right: 22px; }
.login-card {
  width: min(404px, 100%);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: var(--shadow-pop);
}
.login-card .winbar { height: 38px; }
.login-body { padding: 28px 30px 24px; }
.login-card .brand { margin-bottom: 20px; }
.login-card .mark { width: 42px; height: 42px; border-radius: 13px; font-size: 19px; }
.login-card .brandname { font-size: 18px; }
.login-sub { margin-bottom: 24px; font-size: 12.5px; }
.login-foot {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--faint);
}
.login-card .btn.primary.wide { height: 44px; border-radius: 11px; font-size: 13px; }

/* ---------- modal + toasts ---------- */

.modal-card { border-radius: 20px; background: var(--modal-bg); }
.modal-card .winbar { border-radius: 20px 20px 0 0; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px 18px; }
.toast { border-radius: 12px; }

/* ---------- responsive tuning for this skin ---------- */

@media (max-width: 1180px) {
  .dash { padding: 20px 20px 22px; }
  .fleetgrid { gap: 12px; }
}

/* Four tiles still fit while the dashboard keeps its side column; keeping
   them on one row leaves room for the server table. */
@media (min-width: 761px) and (max-width: 1080px) {
  .kpis,
  .statgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi .v { font-size: 27px; }
}

@media (max-width: 1080px) {
  .seg .navbtn { padding: 0 12px; }
  .kpi .v { font-size: 30px; }
  .sidecol { gap: 12px; }
}

@media (max-width: 980px) {
  .app { padding: 8px; }
  .dash { padding: 16px 16px 20px; gap: 14px; }
  .hero h1 { font-size: 30px; }
  .srow-head, .srvrow { padding: 0 16px; }
  .srvrow { padding: 7px 12px; }
  .tablefoot { padding: 0 16px; }
  .page { padding: 22px 20px 44px; }
}

@media (max-width: 760px) {
  .titlebar { height: 42px; padding: 0 12px; }
  .deck { height: 60px; padding: 0 12px; }
  .tb-clock { display: none; }
  .dash { padding: 14px 12px 18px; }
  .hero { align-items: flex-start; gap: 12px; }
  .hero h1 { font-size: 26px; }
  .hero-act .btn { height: 32px; padding: 0 11px; }
  .kpi { min-height: 96px; padding: 13px 14px; }
  .kpi .v { font-size: 26px; }
  .kpi svg.spark { width: 58px; opacity: .24; }
  .tablecard .winbar {
    height: auto;
    min-height: 40px;
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .tablecard .ftabs { margin-left: 0; }
  .srow-head, .srvrow { padding: 0 12px; gap: 8px; }
  .srvrow { padding: 6px 10px; margin: 0 4px; }
  .tablefoot { padding: 0 12px; }
  .pagehead h1 { font-size: 26px; }
  .page { padding: 20px 16px 40px; }
  #pane-console, #pane-files, #pane-info { padding: 6px 14px 18px; }
  .whead { padding: 14px 16px 10px; }
  .tabs { padding: 0 16px 10px; }
  .offline { margin: 0 16px 10px; }
}

@media (max-width: 600px) {
  .app { padding: 0; }
  .shell { border: 0; border-radius: 0; }
  .titlebar { height: 40px; padding: 0 10px; }
  .tb-live { height: 22px; padding: 0 8px; }
  .searchchip kbd { display: none; }
  .deck { height: 56px; padding: 0 10px; }
  .seg { padding: 3px; border-radius: 12px; }
  .seg .navbtn { height: 32px; padding: 0 9px; }
  .seg-glow { top: 3px; bottom: 3px; border-radius: 9px; }
  .kpis, .statgrid { gap: 8px; }
  .kpi { min-height: 88px; padding: 12px; }
  .kpi .v { font-size: 24px; }
  .kpi .k { font-size: 10.5px; }
  .kpi .d { font-size: 10px; }
  .kpi::before { left: 12px; }
  .srow-head { padding: 0 10px; }
  .srow-head { padding: 0 10px; }
  .srvrow { padding: 6px 8px; border-radius: 10px; }
  .svpl { height: 20px; padding: 0 6px; font-size: 9.5px; }
  .srvrow .st { height: 20px; padding: 0 6px; font-size: 9.5px; gap: 4px; }
  .sbox { width: 28px; height: 28px; border-radius: 9px; }
  .page { padding: 18px 12px 36px; }
  .pagehead h1 { font-size: 23px; }
  .card-body { padding: 16px; }
  .modal { padding: 0; }
  .modal-card { border-radius: 0; min-height: 100%; }
}
