/* Alt8Mail System Control
   A dense, operator-first control plane. Light and dark are both first-class. */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;

  --page: #f4f6f9;
  --page-grid: rgba(16, 24, 40, 0.028);
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #eef2f6;
  --surface-raised: #ffffff;
  --sidebar: #0b1b2b;
  --sidebar-soft: #11273b;
  --sidebar-raised: #17324b;
  --sidebar-ink: #c3d0dd;
  --sidebar-muted: #8298ad;
  --sidebar-line: rgba(255, 255, 255, 0.075);
  --sidebar-active: rgba(82, 158, 241, 0.16);

  --ink: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --muted: #98a2b3;
  --border: #e3e8ef;
  --border-strong: #cfd6df;
  --overlay: rgba(7, 15, 25, 0.55);

  --accent: #0b6bcb;
  --accent-hover: #0959ab;
  --accent-soft: #eaf2fd;
  --accent-soft-2: #d9e9fb;
  --accent-ink: #084a91;
  --focus: rgba(11, 107, 203, 0.26);

  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;

  --status-good: #0ca30c;
  --status-good-ink: #067647;
  --status-good-bg: #ecfdf3;
  --status-good-line: #abefc6;
  --status-warning: #fab219;
  --status-warning-ink: #b54708;
  --status-warning-bg: #fffaeb;
  --status-warning-line: #fedf89;
  --status-critical: #d03b3b;
  --status-critical-ink: #b42318;
  --status-critical-bg: #fef3f2;
  --status-critical-line: #fecdca;
  --status-info: #2a78d6;
  --status-info-ink: #175cd3;
  --status-info-bg: #eff8ff;
  --status-info-line: #b2ddff;
  --status-serious: #ec835a;
  --status-serious-ink: #b93815;
  --status-serious-bg: #fff6ed;
  --status-serious-line: #f9dbaf;

  --chart-grid: #e9edf2;
  --chart-axis: #667085;
  --track: #edf1f5;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.045);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.09), 0 2px 6px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 24px 64px rgba(7, 15, 25, 0.24);
  --radius-sm: 6px;
  --radius: 9px;
  --radius-lg: 13px;
  --sidebar-w: 260px;
  --topbar-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0a0f16;
    --page-grid: rgba(255, 255, 255, 0.02);
    --surface: #111923;
    --surface-soft: #151f2b;
    --surface-muted: #1b2734;
    --surface-raised: #16212d;
    --sidebar: #07111b;
    --sidebar-soft: #0d1c2a;
    --sidebar-raised: #142d43;
    --sidebar-ink: #c6d3e1;
    --sidebar-muted: #7f94a9;
    --sidebar-line: rgba(255, 255, 255, 0.07);
    --sidebar-active: rgba(77, 157, 240, 0.18);
    --ink: #eef4fb;
    --text-2: #b7c4d3;
    --text-3: #92a3b6;
    --muted: #718298;
    --border: #223142;
    --border-strong: #304254;
    --overlay: rgba(2, 7, 12, 0.72);
    --accent: #4d9df0;
    --accent-hover: #70b2f5;
    --accent-soft: #10283f;
    --accent-soft-2: #173551;
    --accent-ink: #9ccaf8;
    --focus: rgba(77, 157, 240, 0.35);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --status-good-ink: #75e0a7;
    --status-good-bg: #0b2a1c;
    --status-good-line: #1a4d35;
    --status-warning-ink: #fec84b;
    --status-warning-bg: #2a1f08;
    --status-warning-line: #513c0c;
    --status-critical-ink: #fda29b;
    --status-critical-bg: #2b1212;
    --status-critical-line: #55201f;
    --status-info-ink: #84caff;
    --status-info-bg: #0d2439;
    --status-info-line: #1b4a72;
    --status-serious-ink: #fdb08c;
    --status-serious-bg: #29170d;
    --status-serious-line: #4f2a16;
    --chart-grid: #202d3b;
    --chart-axis: #92a3b6;
    --track: #1c2a38;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0a0f16;
  --page-grid: rgba(255, 255, 255, 0.02);
  --surface: #111923;
  --surface-soft: #151f2b;
  --surface-muted: #1b2734;
  --surface-raised: #16212d;
  --sidebar: #07111b;
  --sidebar-soft: #0d1c2a;
  --sidebar-raised: #142d43;
  --sidebar-ink: #c6d3e1;
  --sidebar-muted: #7f94a9;
  --sidebar-line: rgba(255, 255, 255, 0.07);
  --sidebar-active: rgba(77, 157, 240, 0.18);
  --ink: #eef4fb;
  --text-2: #b7c4d3;
  --text-3: #92a3b6;
  --muted: #718298;
  --border: #223142;
  --border-strong: #304254;
  --overlay: rgba(2, 7, 12, 0.72);
  --accent: #4d9df0;
  --accent-hover: #70b2f5;
  --accent-soft: #10283f;
  --accent-soft-2: #173551;
  --accent-ink: #9ccaf8;
  --focus: rgba(77, 157, 240, 0.35);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --status-good-ink: #75e0a7;
  --status-good-bg: #0b2a1c;
  --status-good-line: #1a4d35;
  --status-warning-ink: #fec84b;
  --status-warning-bg: #2a1f08;
  --status-warning-line: #513c0c;
  --status-critical-ink: #fda29b;
  --status-critical-bg: #2b1212;
  --status-critical-line: #55201f;
  --status-info-ink: #84caff;
  --status-info-bg: #0d2439;
  --status-info-line: #1b4a72;
  --status-serious-ink: #fdb08c;
  --status-serious-bg: #29170d;
  --status-serious-line: #4f2a16;
  --chart-grid: #202d3b;
  --chart-axis: #92a3b6;
  --track: #1c2a38;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  background-image:
    linear-gradient(var(--page-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--page-grid) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent-soft-2); color: var(--ink); }
.icon { flex: none; vertical-align: -0.18em; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.muted { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.flex { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 26px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ boot */
.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(circle at 50% 40%, rgba(42, 120, 214, 0.14), transparent 34%),
    var(--sidebar);
  color: #dbe8f5;
}
.boot-mark {
  width: 64px; height: 64px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: #7fb8f4;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
}
.boot-copy { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.boot-copy strong { font-size: 18px; letter-spacing: -0.02em; }
.boot-copy span { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #8da6bd; }
.boot-bar { width: 156px; height: 3px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.1); }
.boot-bar span { display: block; width: 42%; height: 100%; border-radius: inherit; background: #58a6f4; animation: boot-slide 1.15s ease-in-out infinite; }
@keyframes boot-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }

/* ----------------------------------------------------------------- shell */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  transition: width 0.2s ease, transform 0.24s ease;
}
.brand {
  height: var(--topbar-h);
  flex: none;
  display: flex; align-items: center; gap: 11px;
  padding: 0 18px;
  border-bottom: 1px solid var(--sidebar-line);
  color: #f4f8fc;
}
.brand:hover { color: #fff; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  color: #8ec3f8;
  background: linear-gradient(145deg, rgba(82, 158, 241, 0.24), rgba(82, 158, 241, 0.08));
  border: 1px solid rgba(130, 188, 246, 0.26);
}
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.18; }
.brand-copy strong { font-size: 14.5px; font-weight: 650; letter-spacing: -0.015em; }
.brand-copy span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--sidebar-muted); }
.sidebar-nav {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 10px 18px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.nav-group { margin: 0 0 16px; }
.nav-group-title {
  padding: 0 10px 6px;
  font-size: 10px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sidebar-muted);
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 36px;
  padding: 0 10px;
  margin: 1px 0;
  border-radius: 7px;
  color: var(--sidebar-ink);
  font-size: 12.8px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}
.nav-item .icon { color: #88a2ba; transition: color 0.14s ease; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.055); }
.nav-item:hover .icon { color: #b9d5f2; }
.nav-item.is-active {
  color: #f7fbff;
  background: var(--sidebar-active);
  font-weight: 600;
}
.nav-item.is-active::before {
  content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: #5ba7f5;
}
.nav-item.is-active .icon { color: #78b8fa; }
.nav-count {
  margin-left: auto;
  min-width: 19px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.09);
  color: #c9d8e7;
  font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.nav-label { overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot {
  flex: none;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--sidebar-line);
  display: flex; flex-direction: column; gap: 9px;
}
.sidebar-env {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 10.5px; color: var(--sidebar-muted);
}
.env-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 7px; border-radius: 5px;
  color: #bcd6f0;
  background: rgba(82, 158, 241, 0.12);
  border: 1px solid rgba(82, 158, 241, 0.18);
  font-size: 10px; font-weight: 650; letter-spacing: 0.055em; text-transform: uppercase;
}
.env-chip .dot { width: 5px; height: 5px; border-radius: 50%; background: #62b6ff; box-shadow: 0 0 0 3px rgba(98, 182, 255, 0.1); }
.sidebar-collapse {
  display: flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--sidebar-muted); font-size: 11.5px;
}
.sidebar-collapse:hover { background: rgba(255, 255, 255, 0.05); color: var(--sidebar-ink); }

.workspace {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  min-width: 0;
  display: flex; flex-direction: column;
  transition: margin-left 0.2s ease;
}
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-start { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.topbar-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.topbar-title .crumb { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.035em; }
.topbar-title .title { font-size: 13.5px; font-weight: 640; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-end { display: flex; align-items: center; gap: 7px; flex: none; }
.topbar-divider { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.icon-btn.mobile-menu-btn { display: none; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  padding: 0; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--text-3);
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.icon-btn:hover { background: var(--surface-muted); color: var(--ink); border-color: var(--border); }
.icon-btn.is-danger:hover { background: var(--status-critical-bg); color: var(--status-critical-ink); border-color: var(--status-critical-line); }
.live-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 10.5px; font-weight: 600; color: var(--text-3);
}
.live-chip .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--status-good); box-shadow: 0 0 0 3px rgba(12, 163, 12, 0.1); }
.live-chip.is-off .pulse { background: var(--muted); box-shadow: none; }
.live-chip.is-off { color: var(--muted); }
.sync-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 27px; padding: 0 9px; border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3); font-size: 10.5px; font-weight: 600;
  white-space: nowrap;
}
.sync-chip:hover { border-color: var(--border-strong); color: var(--ink); }
.sync-chip.is-warning { background: var(--status-warning-bg); border-color: var(--status-warning-line); color: var(--status-warning-ink); }
.sync-chip.is-critical { background: var(--status-critical-bg); border-color: var(--status-critical-line); color: var(--status-critical-ink); }
.sync-chip.is-good { background: var(--status-good-bg); border-color: var(--status-good-line); color: var(--status-good-ink); }
.clock { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.profile-wrap { position: relative; }
.profile-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 5px 3px 3px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; text-align: left;
}
.profile-btn:hover { background: var(--surface-muted); border-color: var(--border); }
.avatar {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #1b4d7d, #0c2a47);
  color: #d9ebfd; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-copy { display: flex; flex-direction: column; line-height: 1.2; max-width: 130px; }
.profile-copy strong { font-size: 11.5px; font-weight: 640; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy span { font-size: 10px; color: var(--text-3); text-transform: capitalize; }
.profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 90;
  width: 248px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  padding: 6px;
  animation: menu-in 0.12s ease;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.profile-menu-head { padding: 9px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
.profile-menu-head strong { display: block; font-size: 12px; }
.profile-menu-head span { display: block; font-size: 11px; color: var(--text-3); word-break: break-all; }
.menu-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; height: 34px; padding: 0 9px;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--text-2); font-size: 12px; text-align: left;
}
.menu-item:hover { background: var(--surface-muted); color: var(--ink); }
.menu-item.danger { color: var(--status-critical-ink); }
.menu-item.danger:hover { background: var(--status-critical-bg); }
.menu-separator { height: 1px; background: var(--border); margin: 5px 4px; }
.menu-note { padding: 7px 9px; font-size: 10.5px; color: var(--text-3); }

.content {
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: 24px 28px 56px;
  flex: 1;
}
.config-banner {
  display: flex; align-items: flex-start; gap: 11px;
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid var(--status-warning-line);
  border-radius: 9px;
  background: var(--status-warning-bg);
  color: var(--status-warning-ink);
}
.config-banner.is-critical { border-color: var(--status-critical-line); background: var(--status-critical-bg); color: var(--status-critical-ink); }
.config-banner .icon { margin-top: 1px; }
.config-banner-copy { flex: 1; min-width: 0; }
.config-banner-copy strong { display: block; font-size: 12px; }
.config-banner-copy span { display: block; font-size: 11.5px; opacity: 0.9; margin-top: 1px; }
.config-banner-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.config-banner-actions .btn { height: 27px; font-size: 11px; }

/* ------------------------------------------------------------------ head */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  margin: 0 0 20px;
}
.page-head-copy { min-width: 0; }
.eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.115em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 5px;
}
.page-head h1 { font-size: 24px; line-height: 1.2; font-weight: 680; letter-spacing: -0.025em; color: var(--ink); }
.page-description { margin-top: 5px; max-width: 760px; color: var(--text-3); font-size: 12.8px; }
.page-meta { margin-top: 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 11px; color: var(--text-3); }
.page-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.page-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; flex: none; padding-top: 4px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 0 0 11px; }
.section-head h2 { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.section-head p { margin-top: 2px; color: var(--text-3); font-size: 11.5px; }
.section-actions { display: flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 7px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.btn:disabled { opacity: 0.55; pointer-events: none; }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--surface-soft); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-muted); color: var(--ink); }
.btn-danger { background: var(--status-critical); color: #fff; border-color: var(--status-critical); }
.btn-danger:hover { background: var(--status-critical-ink); border-color: var(--status-critical-ink); color: #fff; }
.btn-soft-danger { background: var(--status-critical-bg); color: var(--status-critical-ink); border-color: var(--status-critical-line); }
.btn-soft-danger:hover { background: var(--status-critical-bg); border-color: var(--status-critical); }
.btn-sm { height: 28px; padding: 0 9px; font-size: 11px; border-radius: 6px; }
.btn-sm .icon { width: 13px; height: 13px; }
.btn-lg { height: 40px; padding: 0 16px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before {
  content: ""; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 7px; overflow: hidden; background: var(--surface); }
.btn-group .btn { border: 0; border-radius: 0; height: 30px; padding: 0 10px; background: transparent; color: var(--text-3); font-weight: 550; }
.btn-group .btn + .btn { border-left: 1px solid var(--border); }
.btn-group .btn.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.btn-group .btn:hover { background: var(--surface-muted); }
.link-btn { border: 0; background: transparent; padding: 0; color: var(--accent); font-weight: 550; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
.row-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.row-actions .icon-btn { width: 27px; height: 27px; }
.row-actions .icon-btn .icon { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  min-width: 0;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px 0;
}
.card-head h3 { font-size: 12.8px; font-weight: 650; letter-spacing: -0.005em; }
.card-head p { margin-top: 2px; font-size: 11px; color: var(--text-3); }
.card-actions { display: flex; align-items: center; gap: 5px; flex: none; }
.card-body { padding: 14px 16px 16px; }
.card-body.is-flush { padding: 0; }
.card-body.is-flush .table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.card-body.is-flush .table-wrap table.data thead th:first-child { padding-left: 16px; }
.card-body.is-flush .table-wrap table.data tbody td:first-child { padding-left: 16px; }
.card-body.is-flush .table-wrap table.data thead th:last-child { padding-right: 16px; }
.card-body.is-flush .table-wrap table.data tbody td:last-child { padding-right: 16px; }
.card.is-danger { border-color: var(--status-critical-line); }
.card.is-danger .card-head h3 { color: var(--status-critical-ink); }
.card + .card, .card + .grid, .grid + .card, .grid + .grid, .card + .section-head, .grid + .section-head { margin-top: 16px; }
.grid { display: grid; gap: 14px; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; }
.grid-main-even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.span-2 { grid-column: span 2; }
.span-full { grid-column: 1 / -1; }

/* ------------------------------------------------------------------ stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(166px, 1fr)); gap: 10px; }
.stat-tile {
  display: flex; align-items: flex-start; gap: 10px;
  min-height: 88px; padding: 13px 13px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  min-width: 0;
}
a.stat-tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); color: var(--ink); transform: translateY(-1px); }
.stat-icon {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.stat-icon.tone-good { background: var(--status-good-bg); color: var(--status-good-ink); }
.stat-icon.tone-warning { background: var(--status-warning-bg); color: var(--status-warning-ink); }
.stat-icon.tone-critical { background: var(--status-critical-bg); color: var(--status-critical-ink); }
.stat-icon.tone-info { background: var(--status-info-bg); color: var(--status-info-ink); }
.stat-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.stat-label { font-size: 10.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.015em; }
.stat-value { margin-top: 2px; font-size: 21px; line-height: 1.15; font-weight: 680; letter-spacing: -0.025em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-detail { margin-top: 4px; font-size: 10.5px; color: var(--text-3); }
.stat-spark { margin-left: auto; align-self: flex-end; opacity: 0.9; }

/* ------------------------------------------------------------------ meter */
.meter { min-width: 0; }
.meter-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: 11.5px; }
.meter-head > span { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-weight: 550; }
.meter-head strong { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink); }
.meter-track { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.meter-fill { height: 100%; border-radius: inherit; background: var(--meter-tone); transition: width 0.6s ease; }
.meter.tone-good .meter-head strong { color: var(--status-good-ink); }
.meter.tone-warning .meter-head strong { color: var(--status-warning-ink); }
.meter.tone-critical .meter-head strong { color: var(--status-critical-ink); }
.meter-detail { margin-top: 5px; font-size: 10.5px; color: var(--text-3); }
.meter-stack { display: flex; flex-direction: column; gap: 15px; }

/* License seat meter ------------------------------------------------------ */
.seat-meter { display: flex; flex-direction: column; gap: 7px; border-radius: var(--radius-sm); outline-offset: 3px; }
.seat-meter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.seat-meter-head span { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.seat-meter-head strong { font-size: 19px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.seat-meter-track { position: relative; height: 12px; border-radius: 999px; background: var(--track); overflow: hidden; }
.seat-meter-fill { height: 100%; border-radius: inherit; background: var(--status-good); transition: width 0.6s ease; }
.seat-meter-threshold { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); opacity: 0.6; }
.seat-meter.tone-warning .seat-meter-fill { background: var(--status-warning); }
.seat-meter.tone-critical .seat-meter-fill { background: var(--status-critical); }
.seat-meter.tone-neutral .seat-meter-fill { background: var(--text-3); }
.seat-meter.tone-warning .seat-meter-head strong { color: var(--status-warning-ink); }
.seat-meter.tone-critical .seat-meter-head strong { color: var(--status-critical-ink); }
.seat-meter-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.license-features { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.license-file-note { margin-top: 9px; }
table.data tfoot th, table.data tfoot td { padding: 9px 12px; border-top: 1px solid var(--border); background: var(--surface-muted); font-size: 11.5px; font-weight: 650; color: var(--ink); }
table.data tfoot td.num { text-align: right; font-variant-numeric: tabular-nums; }
.host-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.host-metric .meter-head { font-size: 11px; }
.host-metric .sparkline { margin-top: 6px; width: 100%; height: 30px; }
.office-metrics { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.office-metrics-summary { flex-wrap: wrap; gap: 6px 18px; }
.office-monitor-toggle { align-items: center; gap: 7px; font-size: 10.5px; color: var(--text-2); white-space: nowrap; }
.office-monitor-toggle .switch { margin-top: 0; }
.office-monitor-foot { margin-top: 10px; margin-bottom: 0; }
.office-monitor-card .card-actions { align-items: center; }

.progress-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.progress { flex: 1; height: 5px; border-radius: 999px; background: var(--track); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.progress.tone-good > span { background: var(--status-good); }
.progress.tone-warning > span { background: var(--status-warning); }
.progress.tone-critical > span { background: var(--status-critical); }
.progress-label { flex: none; font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- pills/badges */
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
}
.status-pill .icon { width: 12px; height: 12px; }
.tone-good.status-pill, .status-pill.tone-good { color: var(--status-good-ink); background: var(--status-good-bg); border-color: var(--status-good-line); }
.tone-warning.status-pill, .status-pill.tone-warning { color: var(--status-warning-ink); background: var(--status-warning-bg); border-color: var(--status-warning-line); }
.tone-critical.status-pill, .status-pill.tone-critical { color: var(--status-critical-ink); background: var(--status-critical-bg); border-color: var(--status-critical-line); }
.tone-info.status-pill, .status-pill.tone-info { color: var(--status-info-ink); background: var(--status-info-bg); border-color: var(--status-info-line); }
.tone-serious.status-pill, .status-pill.tone-serious { color: var(--status-serious-ink); background: var(--status-serious-bg); border-color: var(--status-serious-line); }
.tone-neutral.status-pill, .status-pill.tone-neutral { color: var(--text-3); background: var(--surface-muted); border-color: var(--border); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 6px;
  border-radius: 5px;
  font-size: 10px; font-weight: 650; white-space: nowrap;
  border: 1px solid transparent;
  color: var(--text-3); background: var(--surface-muted); border-color: var(--border);
}
.badge.tone-good { color: var(--status-good-ink); background: var(--status-good-bg); border-color: var(--status-good-line); }
.badge.tone-warning { color: var(--status-warning-ink); background: var(--status-warning-bg); border-color: var(--status-warning-line); }
.badge.tone-critical { color: var(--status-critical-ink); background: var(--status-critical-bg); border-color: var(--status-critical-line); }
.badge.tone-info { color: var(--status-info-ink); background: var(--status-info-bg); border-color: var(--status-info-line); }
.badge.tone-accent { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-soft-2); }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: 5px;
  background: var(--surface-muted); color: var(--text-3);
  font-size: 10.5px; font-weight: 550;
}
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.dot-up { background: var(--status-good); }
.dot-down { background: var(--status-critical); }
.mono-chip { font-family: var(--font-mono); font-size: 10.5px; padding: 2px 6px; border-radius: 4px; background: var(--surface-muted); color: var(--text-2); }
.role-chip { text-transform: capitalize; }
.primary-star { color: var(--status-warning); }

/* ------------------------------------------------------------------ tables */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table-wrap.is-bare { border: 0; border-radius: 0; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.data thead th {
  position: sticky; top: 0; z-index: 1;
  padding: 9px 12px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-size: 10px; font-weight: 650; letter-spacing: 0.045em; text-transform: uppercase;
  text-align: left; white-space: nowrap;
}
table.data tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--surface-soft); }
table.data tbody tr.is-selected td { background: var(--accent-soft); }
table.data.compact thead th { padding: 7px 9px; }
table.data.compact tbody td { padding: 7px 9px; }
table.data th.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data .cell-main { display: block; font-weight: 600; color: var(--ink); }
table.data .cell-sub { display: block; margin-top: 1px; font-size: 10.5px; color: var(--text-3); }
table.data .cell-main a { color: var(--ink); }
table.data .cell-main a:hover { color: var(--accent); }
.clickable-row { cursor: pointer; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.table-toolbar-start, .table-toolbar-end { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; font-size: 11px; color: var(--text-3); }
.table-foot-actions { display: flex; align-items: center; gap: 5px; }
.pagination { display: flex; align-items: center; gap: 5px; }
.page-btn { min-width: 29px; height: 27px; padding: 0 7px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text-2); font-size: 11px; }
.page-btn:hover { border-color: var(--border-strong); color: var(--ink); }
.page-btn.is-active { background: var(--accent-soft); border-color: var(--accent-soft-2); color: var(--accent-ink); font-weight: 650; }
.page-btn:disabled { opacity: 0.45; pointer-events: none; }
.table-empty { padding: 26px 16px !important; text-align: center; color: var(--text-3); }
.table-empty .icon { color: var(--muted); margin-bottom: 5px; }
.inline-kv { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.inline-kv span { font-size: 10.5px; color: var(--text-3); }
.inline-kv b { color: var(--text-2); font-weight: 600; }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; align-items: center; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--border); margin: 0 0 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 11px;
  border: 0; border-bottom: 2px solid transparent;
  color: var(--text-3); font-size: 12px; font-weight: 550; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 650; }
.tab-count { min-width: 17px; height: 16px; padding: 0 4px; display: inline-grid; place-items: center; border-radius: 4px; background: var(--surface-muted); color: var(--text-3); font-size: 9.5px; font-weight: 650; }
.tab.is-active .tab-count { background: var(--accent-soft); color: var(--accent-ink); }

/* ------------------------------------------------------------------ notices */
.notice {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-soft); color: var(--text-2);
  font-size: 11.5px;
}
.notice .notice-icon { flex: none; margin-top: 1px; color: var(--text-3); }
.notice strong { display: block; color: var(--ink); font-size: 11.5px; }
.notice p { margin-top: 2px; color: var(--text-3); }
.notice-action { margin-top: 7px; display: flex; gap: 6px; flex-wrap: wrap; }
.notice.tone-good { background: var(--status-good-bg); border-color: var(--status-good-line); color: var(--status-good-ink); }
.notice.tone-good .notice-icon, .notice.tone-good strong { color: var(--status-good-ink); }
.notice.tone-warning { background: var(--status-warning-bg); border-color: var(--status-warning-line); color: var(--status-warning-ink); }
.notice.tone-warning .notice-icon, .notice.tone-warning strong { color: var(--status-warning-ink); }
.notice.tone-critical { background: var(--status-critical-bg); border-color: var(--status-critical-line); color: var(--status-critical-ink); }
.notice.tone-critical .notice-icon, .notice.tone-critical strong { color: var(--status-critical-ink); }
.notice.tone-info { background: var(--status-info-bg); border-color: var(--status-info-line); color: var(--status-info-ink); }
.notice.tone-info .notice-icon, .notice.tone-info strong { color: var(--status-info-ink); }
.notice.tone-serious { background: var(--status-serious-bg); border-color: var(--status-serious-line); color: var(--status-serious-ink); }
.notice.tone-serious .notice-icon, .notice.tone-serious strong { color: var(--status-serious-ink); }
.notice + .notice { margin-top: 8px; }
.notice + .card, .notice + .grid { margin-top: 14px; }

/* ------------------------------------------------------------------ forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; }
.form-grid.is-single { grid-template-columns: 1fr; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 11px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--status-critical); }
.field-help { font-size: 10.5px; color: var(--text-3); line-height: 1.45; }
.input, .select, textarea.input {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--surface); color: var(--ink);
  font-size: 12px; line-height: 1.4;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 76px; }
.input::placeholder, textarea.input::placeholder { color: var(--muted); }
.input:focus, textarea.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.input:disabled, textarea.input:disabled, .select:disabled { background: var(--surface-soft); color: var(--text-3); cursor: not-allowed; }
.input.is-invalid, textarea.input.is-invalid { border-color: var(--status-critical); box-shadow: 0 0 0 3px rgba(208, 59, 59, 0.13); }
select.select, select.input {
  appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.form-actions-right { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.input-group { display: flex; align-items: center; gap: 6px; }
.input-group .input { flex: 1; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 50px; }
.input-suffix span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 10.5px; pointer-events: none; }
.search-box { position: relative; min-width: 200px; }
.search-box .icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box .input { padding-left: 30px; height: 32px; }
.check-field { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--text-2); cursor: pointer; }
.check-field input { width: 14px; height: 14px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check-field span { font-weight: 550; }
.check-field small { display: block; color: var(--text-3); font-weight: 400; margin-top: 1px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; }
.check-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option-list { display: flex; flex-direction: column; gap: 6px; }
.option-card {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface); cursor: pointer;
}
.option-card:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.option-card input { margin-top: 2px; accent-color: var(--accent); }
.option-card strong { display: block; font-size: 11.5px; color: var(--ink); }
.option-card small { display: block; margin-top: 1px; font-size: 10.5px; color: var(--text-3); }
.switch-field { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.switch { position: relative; display: inline-flex; flex: none; margin-top: 1px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 32px; height: 18px; border-radius: 999px; background: var(--border-strong); transition: background 0.15s ease; position: relative; }
.switch-track span { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s ease; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track span { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch-copy strong { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.switch-copy small { display: block; color: var(--text-3); font-size: 10.5px; }
.filterbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.filterbar .input, .filterbar .select { height: 32px; width: auto; min-width: 120px; }
.filterbar .search-box { flex: 1; max-width: 340px; }
.filterbar .search-box .input { width: 100%; }
.form-note { font-size: 11px; color: var(--text-3); line-height: 1.55; }
.form-note strong { color: var(--text-2); }

/* ---------------------------------------------------------- mail OAuth apps */
.oauth-provider-title { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.oauth-provider-title > div { min-width: 0; }
.oauth-app-mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--accent-soft-2); border-radius: 11px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.oauth-app-mark.is-microsoft {
  border-color: var(--status-info-line);
  background: var(--status-info-bg);
  color: var(--status-info-ink);
}
.oauth-provider-status { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.oauth-redirect { margin-top: 16px; }
.oauth-redirect .section-label { margin: 0 0 5px; }
.oauth-redirect .form-note { margin: 6px 0 0; }
.oauth-live { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--border); }
.oauth-live .section-label { margin: 0 0 3px; }
.oauth-live .tile-link { padding: 6px 0; }
.oauth-live .tile-link .value { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.oauth-steps { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.oauth-steps summary { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2); font-size: 11.5px; font-weight: 600; list-style: none; }
.oauth-steps summary::-webkit-details-marker { display: none; }
.oauth-steps summary:hover { color: var(--ink); }
.oauth-steps ol { margin: 10px 0 0; padding-left: 19px; color: var(--text-3); font-size: 11px; line-height: 1.65; }
.oauth-steps ol li + li { margin-top: 4px; }
.oauth-steps ol strong, .oauth-notes strong { color: var(--text-2); font-weight: 600; }
.oauth-steps code, .oauth-notes code { font-family: var(--font-mono); font-size: 9.5px; padding: 1px 4px; border-radius: 3px; background: var(--surface-muted); color: var(--text-2); }
.oauth-notes { margin: 9px 0 0; padding-left: 16px; color: var(--text-3); font-size: 10.5px; line-height: 1.6; }
.oauth-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.oauth-scope-row { margin-top: 4px; }
.oauth-scope-row .section-label { margin: 0 0 3px; }
.oauth-scope-list { display: flex; flex-wrap: wrap; gap: 4px; }
.oauth-scope-list code { font-family: var(--font-mono); font-size: 9.5px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-soft); color: var(--text-2); max-width: 100%; overflow-wrap: anywhere; }
.oauth-warning-list { margin: 4px 0 0; padding-left: 16px; color: var(--text-3); font-size: 10.5px; line-height: 1.55; }
.oauth-warning-list li + li { margin-top: 2px; }
.oauth-flow { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; counter-reset: oauth-flow; }
.oauth-flow li { position: relative; padding-left: 27px; counter-increment: oauth-flow; }
.oauth-flow li::before {
  content: counter(oauth-flow);
  position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong); border-radius: 50%;
  background: var(--surface-soft); color: var(--text-3);
  font-size: 9px; font-weight: 700;
}
.oauth-flow strong { display: block; color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.oauth-flow span { display: block; margin-top: 1px; color: var(--text-3); font-size: 10.5px; line-height: 1.45; }
.oauth-checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; color: var(--text-3); font-size: 10.5px; line-height: 1.45; }
.oauth-checks li { display: flex; align-items: flex-start; gap: 7px; }
.oauth-checks .icon { flex: none; margin-top: 1px; color: var(--status-good); }
.form-section-title { font-size: 12px; font-weight: 650; margin: 0 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.form-section-title + .form-grid { margin-bottom: 18px; }
.input-hint-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ------------------------------------------------------------------ kv/code */
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 18px; }
.kv-grid > div { min-width: 0; }
.kv-grid dt { font-size: 10px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.kv-grid dd { margin-top: 2px; font-size: 11.8px; color: var(--ink); word-break: break-word; }
.kv-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv-grid.is-single { grid-template-columns: 1fr; }
.code-block { border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--surface-soft); }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 7px 5px 10px; border-bottom: 1px solid var(--border); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.code-head .icon-btn { width: 24px; height: 24px; }
.code-block pre { margin: 0; padding: 10px 12px; overflow: auto; max-height: 340px; font-family: var(--font-mono); font-size: 11px; line-height: 1.55; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.code-block pre code { font-family: inherit; }
.diff-block { margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); overflow: auto; max-height: 380px; font-family: var(--font-mono); font-size: 11px; line-height: 1.55; white-space: pre; }
.diff-add { color: var(--status-good-ink); background: var(--status-good-bg); display: block; }
.diff-del { color: var(--status-critical-ink); background: var(--status-critical-bg); display: block; }
.diff-ctx { color: var(--text-3); display: block; }
.record-row { display: grid; grid-template-columns: 62px minmax(120px, 0.7fr) minmax(220px, 1.7fr) 86px 34px; gap: 9px; align-items: start; }
.dns-value { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); word-break: break-all; }
.dns-purpose { font-size: 10.5px; color: var(--text-3); }
.dns-actual { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 10px; color: var(--text-3); padding-top: 3px; word-break: break-all; }
.copy-field { display: flex; align-items: center; gap: 6px; min-width: 0; }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 10.5px; }

/* ------------------------------------------------------------------ charts */
.chart-shell { min-width: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 0 0 4px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 10.5px; font-weight: 550; }
.legend-item i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.chart-wrap { position: relative; }
.line-chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-grid { stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart-axis { fill: var(--chart-axis); font-family: var(--font-sans); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-line.is-dashed { stroke-dasharray: 5 4; }
.chart-last { stroke-width: 2; }
.chart-end-label { font-family: var(--font-sans); font-size: 10px; font-weight: 550; }
.chart-crosshair { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-tooltip {
  position: absolute; z-index: 3; min-width: 150px;
  padding: 8px 9px; border-radius: 7px;
  background: var(--surface-raised); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md); pointer-events: none;
  font-size: 10.5px;
}
.chart-tooltip strong { display: block; margin-bottom: 4px; font-size: 10.5px; color: var(--ink); }
.chart-tooltip span { display: flex; align-items: center; gap: 5px; color: var(--text-3); line-height: 1.8; }
.chart-tooltip span i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.chart-tooltip span b { margin-left: auto; padding-left: 12px; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.chart-table { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 7px; }
.chart-table summary { cursor: pointer; color: var(--text-3); font-size: 10.5px; font-weight: 550; list-style-position: inside; }
.chart-table summary:hover { color: var(--ink); }
.chart-table .table-wrap { margin-top: 8px; max-height: 230px; overflow: auto; }
.sparkline { display: block; overflow: visible; }
.spark-area { opacity: 0.1; stroke: none; }
.spark-line { fill: none; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.spark-empty { display: inline-block; width: 100%; height: 1px; background: var(--border); }
.bar-list { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 18px minmax(90px, 1.1fr) minmax(80px, 1.6fr) 58px; align-items: center; gap: 8px; font-size: 11px; }
.bar-rank { color: var(--muted); font-size: 9.5px; font-variant-numeric: tabular-nums; text-align: right; }
.bar-label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 6px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--series-1); }
.bar-value { text-align: right; font-size: 10.5px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-value small { display: block; color: var(--muted); font-weight: 400; font-size: 9px; }

/* ------------------------------------------------------------------ lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.list-item:first-child { padding-top: 0; }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-icon { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--surface-muted); color: var(--text-3); }
.list-copy { flex: 1; min-width: 0; }
.list-copy strong { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-copy span { display: block; font-size: 10.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-time { flex: none; font-size: 10px; color: var(--muted); white-space: nowrap; }
.audit-list .list-icon { width: 25px; height: 25px; border-radius: 5px; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 0; }
.timeline-item { position: relative; padding: 0 0 15px 22px; border-left: 1px solid var(--border); margin-left: 6px; }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-dot { position: absolute; left: -5px; top: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--accent-soft-2); }
.timeline-item strong { display: block; font-size: 11.5px; }
.timeline-item span { display: block; font-size: 10.5px; color: var(--text-3); }
.timeline-item time { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 10px; }
.service-card { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 10px 11px; }
.service-card-head { display: flex; align-items: center; gap: 6px; }
.service-card-head strong { flex: 1; font-size: 11.5px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.service-card p { margin: 5px 0 8px; font-size: 10.5px; color: var(--text-3); line-height: 1.45; min-height: 29px; }
.service-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; font-size: 9.5px; }
.service-card dt { color: var(--muted); }
.service-card dd { margin: 0; color: var(--text-3); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-card.is-up { border-left: 2px solid var(--status-good); }
.service-card.is-down { border-left: 2px solid var(--status-critical); background: linear-gradient(90deg, var(--status-critical-bg), var(--surface) 55%); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.status-dot.up { background: var(--status-good); box-shadow: 0 0 0 3px rgba(12, 163, 12, 0.1); }
.status-dot.down { background: var(--status-critical); box-shadow: 0 0 0 3px rgba(208, 59, 59, 0.1); }
.service-card .service-actions { display: flex; gap: 3px; margin-top: 8px; flex-wrap: wrap; }
.service-card .btn-sm { height: 24px; padding: 0 6px; font-size: 9.5px; }
.svc-note { font-size: 10px; color: var(--text-3); margin-top: 5px; }

/* ------------------------------------------------------------------ empty/loading/error */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 34px 18px; }
.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-muted); color: var(--text-3); border: 1px solid var(--border); margin-bottom: 9px; }
.empty-state h3 { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.empty-state p { margin-top: 3px; max-width: 360px; font-size: 11px; color: var(--text-3); }
.empty-state .btn { margin-top: 11px; }
.loading-state { display: flex; flex-direction: column; gap: 9px; padding: 14px 0; }
.skeleton { height: 15px; border-radius: 5px; background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-soft) 50%, var(--surface-muted) 75%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.skeleton.is-card { height: 86px; border-radius: 9px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.error-state { display: flex; align-items: center; gap: 11px; padding: 22px; border: 1px solid var(--status-critical-line); border-radius: var(--radius); background: var(--status-critical-bg); color: var(--status-critical-ink); }
.error-state .error-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--surface); }
.error-state h3 { font-size: 12.5px; }
.error-state p { font-size: 11px; opacity: 0.9; margin-top: 1px; }
.error-state .btn { margin-left: auto; flex: none; }

/* ------------------------------------------------------------------ modals */
.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 7vh 18px 20px;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  animation: overlay-in 0.14s ease;
  overflow-y: auto;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 640px;
  max-height: 86vh;
  display: flex; flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.17s cubic-bezier(0.2, 0.8, 0.3, 1);
  overflow: hidden;
}
.modal-small { max-width: 458px; }
.modal-medium { max-width: 640px; }
.modal-large { max-width: 880px; }
.modal-xlarge { max-width: 1120px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.99); } to { opacity: 1; transform: none; } }
.modal-overlay.is-closing { animation: overlay-out 0.12s ease forwards; }
.modal-overlay.is-closing .modal { animation: modal-out 0.12s ease forwards; }
@keyframes overlay-out { to { opacity: 0; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(5px) scale(0.995); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 15px 17px 13px; border-bottom: 1px solid var(--border); flex: none; }
.modal-head h2 { font-size: 15px; font-weight: 660; letter-spacing: -0.015em; }
.modal-head p { margin-top: 2px; font-size: 11.5px; color: var(--text-3); max-width: 620px; }
.modal-close { flex: none; margin-top: -2px; }
.modal-body { padding: 16px 17px; overflow-y: auto; min-height: 0; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 12px 17px; border-top: 1px solid var(--border); background: var(--surface-soft); flex: none; }
.modal-footer .btn:first-child { margin-right: auto; }
.confirm-copy { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.confirm-details { margin-top: 12px; }
.confirm-details .kv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); }
.drawer-overlay { position: fixed; inset: 0; z-index: 190; background: var(--overlay); display: flex; justify-content: flex-end; animation: overlay-in 0.14s ease; }
.drawer { width: min(560px, 100%); height: 100%; background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: drawer-in 0.2s ease; }
@keyframes drawer-in { from { transform: translateX(20px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 16px 18px; overflow-y: auto; }
.drawer-foot { margin-top: auto; padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 7px; }

/* ------------------------------------------------------------------ toasts */
.toast-host { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; width: min(370px, calc(100vw - 36px)); pointer-events: none; }
.toast {
  position: relative; display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 10px 10px 11px;
  border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface-raised); box-shadow: var(--shadow-md);
  pointer-events: auto; overflow: hidden;
  animation: toast-in 0.18s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.toast.is-leaving { animation: toast-out 0.18s ease forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(4px); } }
.toast-icon { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-muted); color: var(--text-3); }
.toast.tone-good .toast-icon { background: var(--status-good-bg); color: var(--status-good-ink); }
.toast.tone-warning .toast-icon { background: var(--status-warning-bg); color: var(--status-warning-ink); }
.toast.tone-critical .toast-icon { background: var(--status-critical-bg); color: var(--status-critical-ink); }
.toast.tone-info .toast-icon { background: var(--status-info-bg); color: var(--status-info-ink); }
.toast-copy { flex: 1; min-width: 0; font-size: 11.5px; color: var(--text-2); padding-top: 1px; }
.toast-copy strong { display: block; color: var(--ink); font-size: 11.5px; margin-bottom: 1px; }
.toast-copy span { display: block; line-height: 1.45; }
.toast-close { flex: none; width: 24px; height: 24px; margin-top: -1px; }
.toast-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; animation: toast-progress 4.5s linear forwards; opacity: 0.65; }
.toast.tone-good .toast-progress { background: var(--status-good); }
.toast.tone-critical .toast-progress { background: var(--status-critical); }
@keyframes toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ------------------------------------------------------------------ login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr); background: var(--surface); }
.login-aside {
  position: relative; overflow: hidden;
  padding: clamp(32px, 5vw, 64px);
  display: flex; flex-direction: column;
  background: #081522;
  color: #dce9f6;
}
.login-aside::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(58, 139, 232, 0.24), transparent 36%),
    radial-gradient(circle at 86% 78%, rgba(16, 147, 132, 0.14), transparent 34%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.03), transparent 42%);
}
.login-aside::after {
  content: ""; position: absolute; inset: 0; opacity: 0.16;
  background-image: linear-gradient(rgba(130, 180, 230, 0.34) 1px, transparent 1px), linear-gradient(90deg, rgba(130, 180, 230, 0.34) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}
.login-aside > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 11px; }
.login-brand .brand-mark { width: 38px; height: 38px; }
.login-brand strong { display: block; font-size: 16px; letter-spacing: -0.02em; color: #f1f7fd; }
.login-brand span { display: block; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: #81a1be; }
.login-hero { margin: auto 0; max-width: 540px; padding: 52px 0; }
.login-hero .eyebrow { color: #7fbbf9; }
.login-hero h1 { font-size: clamp(30px, 3.3vw, 44px); line-height: 1.08; letter-spacing: -0.04em; font-weight: 680; color: #f6faff; }
.login-hero h1 em { font-style: normal; color: #7fbbf9; }
.login-hero p { margin-top: 14px; max-width: 470px; color: #9db3c9; font-size: 13.5px; line-height: 1.65; }
.login-features { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 20px; }
.login-feature { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: #b7cbe0; }
.login-feature .icon { color: #6dabe6; margin-top: 1px; flex: none; }
.login-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 10.5px; color: #6f88a1; }
.login-status { display: inline-flex; align-items: center; gap: 6px; }
.login-status .pulse { width: 6px; height: 6px; border-radius: 50%; background: #35c584; box-shadow: 0 0 0 3px rgba(53, 197, 132, 0.12); }
.login-status.is-off .pulse { background: #f0a93d; box-shadow: none; }
.login-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px clamp(20px, 5vw, 56px); background: var(--surface); position: relative; }
.login-main-inner { width: 100%; max-width: 372px; }
.login-mobile-brand { display: none; align-items: center; gap: 9px; margin-bottom: 26px; }
.login-card { width: 100%; }
.login-card h2 { font-size: 22px; font-weight: 680; letter-spacing: -0.025em; }
.login-card > p { margin-top: 4px; font-size: 12px; color: var(--text-3); line-height: 1.55; }
.login-form { margin-top: 22px; display: flex; flex-direction: column; gap: 13px; }
.login-form .field > label { font-size: 11px; }
.login-form .input { height: 39px; font-size: 12.5px; }
.login-submit { margin-top: 4px; height: 39px; font-size: 12.5px; }
.login-error { display: none; margin-top: 13px; }
.login-error.is-visible { display: flex; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 39px; }
.password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.login-help { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 10.5px; color: var(--text-3); line-height: 1.55; }
.totp-input { font-family: var(--font-mono); font-size: 20px; letter-spacing: 0.35em; text-align: center; height: 48px; padding-left: 18px; }
.login-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 15px; border: 0; background: transparent; color: var(--text-3); font-size: 11px; padding: 0; }
.login-back:hover { color: var(--ink); }
.login-step { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.login-main .env-chip { background: var(--surface-muted); border-color: var(--border); color: var(--text-3); }
.login-main .env-chip .dot { background: var(--status-good); }
.login-footer { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }

/* ------------------------------------------------------------------ misc page pieces */
.command-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.command-card { display: flex; flex-direction: column; gap: 5px; padding: 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); }
.command-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); color: var(--ink); }
.command-card .command-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 2px; }
.command-card strong { font-size: 12px; font-weight: 640; }
.command-card span { font-size: 10.5px; color: var(--text-3); line-height: 1.45; }
.palette-search { position: relative; margin-bottom: 10px; }
.palette-search .input { height: 38px; font-size: 12.5px; padding-left: 34px; }
.palette-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.palette-list { display: flex; flex-direction: column; gap: 2px; max-height: 55vh; overflow: auto; margin: 0 -5px; padding: 0 5px; }
.palette-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); text-align: left; font-size: 12px; }
.palette-item:hover, .palette-item.is-focused { background: var(--surface-muted); color: var(--ink); }
.palette-item .icon { color: var(--text-3); }
.palette-item small { margin-left: auto; font-size: 9.5px; color: var(--muted); }
.palette-empty { padding: 14px 8px; color: var(--text-3); font-size: 11.5px; }
.section-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 12px 8px 4px; }
.diagnostic-list { display: flex; flex-direction: column; gap: 8px; }
.diagnostic-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.diagnostic-item .status-pill { flex: none; margin-top: 1px; }
.diagnostic-copy { min-width: 0; }
.diagnostic-copy strong { display: block; font-size: 11.5px; }
.diagnostic-copy p { margin-top: 2px; font-size: 10.5px; color: var(--text-3); word-break: break-word; }
.diagnostic-copy small { display: block; margin-top: 3px; font-size: 10px; color: var(--accent-ink); }
.diagnostic-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.summary-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 5px; font-size: 10.5px; font-weight: 600; background: var(--surface-muted); color: var(--text-2); }
.chip-list { display: flex; flex-wrap: wrap; gap: 5px; }
.empty-inline { padding: 15px 0; text-align: center; color: var(--text-3); font-size: 11.5px; }
.split-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.split-kv .kv-box { padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); }
.split-kv .kv-box span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.045em; color: var(--text-3); font-weight: 650; }
.split-kv .kv-box strong { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 640; }
.mini-list { display: flex; flex-direction: column; gap: 6px; }
.mini-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-row .grow { min-width: 0; }
.mini-row strong { display: block; font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row span { display: block; font-size: 10px; color: var(--text-3); }
.mini-row .mini-value { flex: none; font-size: 10.5px; color: var(--text-2); font-weight: 600; }
.tile-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text-2); }
.tile-link:last-child { border-bottom: 0; padding-bottom: 0; }
.tile-link:hover { color: var(--accent); }
.tile-link span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tile-link strong { font-size: 11.5px; font-weight: 600; }
.tile-link small { color: var(--text-3); font-size: 10.5px; }
.tile-link .value { flex: none; font-size: 11px; font-weight: 600; }
.section-gap { margin-top: 18px; }
.mono-list { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.6; color: var(--text-2); }
.raw-output { margin: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); font-family: var(--font-mono); font-size: 10.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; color: var(--text-2); }
.raw-output.is-dark { background: #0a121c; color: #c3d7ea; border-color: #1b2b3b; }
.range-row { display: flex; align-items: center; gap: 9px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.range-value { min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-2); }
.inline-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 130px; }
.inline-form .btn { margin-bottom: 0; }
.empty-row td { padding: 22px 14px !important; text-align: center; color: var(--text-3); }
.nowrap-cell { white-space: nowrap; }
.wrap-anywhere { overflow-wrap: anywhere; }
.icon-text { display: inline-flex; align-items: center; gap: 5px; }
.icon-text .icon { color: var(--text-3); }
.text-good { color: var(--status-good-ink); }
.text-warning { color: var(--status-warning-ink); }
.text-critical { color: var(--status-critical-ink); }
.text-info { color: var(--status-info-ink); }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.divider-soft { height: 1px; background: var(--border); margin: 10px 0; opacity: 0.7; }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.note-strip { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 6px; background: var(--surface-soft); border: 1px solid var(--border); color: var(--text-3); font-size: 10.5px; }
.note-strip .icon { color: var(--text-3); flex: none; }
.host-summary { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 10.5px; color: var(--text-3); }
.host-summary b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.package-count { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-2); }
.package-count strong { font-size: 13px; }
.cert-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cert-row:last-child { border-bottom: 0; }
.cert-row .cert-days { margin-left: auto; font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.cert-icon { width: 27px; height: 27px; border-radius: 6px; display: grid; place-items: center; background: var(--status-good-bg); color: var(--status-good-ink); flex: none; }
.cert-icon.warn { background: var(--status-warning-bg); color: var(--status-warning-ink); }
.cert-icon.bad { background: var(--status-critical-bg); color: var(--status-critical-ink); }
.inline-check { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-3); }
.inline-check input { accent-color: var(--accent); }
.segmented { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); gap: 2px; }
.segmented button { height: 24px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--text-3); font-size: 10.5px; font-weight: 550; }
.segmented button:hover { color: var(--ink); }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); font-weight: 600; }
.break-all { word-break: break-all; }
.max-w-none { max-width: none !important; }
.row-gap { display: flex; flex-direction: column; gap: 14px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .content { padding: 22px 22px 48px; }
  .grid-main { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); }
}
@media (max-width: 1100px) {
  :root { --sidebar-w: 236px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-main-even { grid-template-columns: 1fr; }
  .profile-copy { display: none; }
  .clock { display: none; }
  .host-metrics { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); width: 268px; box-shadow: var(--shadow-lg); }
  body.is-mobile-nav-open .sidebar { transform: translateX(0); }
  body.is-mobile-nav-open::after {
    content: ""; position: fixed; inset: 0; z-index: 55; background: var(--overlay);
    animation: overlay-in 0.15s ease;
  }
  .workspace { margin-left: 0; }
  .icon-btn.mobile-menu-btn { display: inline-grid !important; }
  .sidebar-collapse { display: none; }
  .content { padding: 20px 16px 42px; }
  .topbar { padding: 0 14px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .login-page { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-main { min-height: 100vh; padding: 32px 20px 70px; }
  .login-mobile-brand { display: flex; }
  .page-head { flex-direction: column; gap: 13px; }
  .page-actions { padding-top: 0; }
  .config-banner { flex-wrap: wrap; }
  .config-banner-actions { margin-left: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .kv-grid.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-overlay { padding-top: 4vh; }
  .modal { max-height: 92vh; }
  .check-grid.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .content { padding: 16px 12px 38px; }
  .page-head h1 { font-size: 21px; }
  .page-description { font-size: 12px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-tile { min-height: 80px; padding: 10px; gap: 8px; }
  .stat-icon { width: 27px; height: 27px; }
  .stat-value { font-size: 18px; }
  .stat-label { font-size: 9.5px; }
  .stat-detail { font-size: 9.5px; }
  .stat-spark { display: none; }
  .topbar { gap: 8px; }
  .topbar-title .crumb { display: none; }
  .topbar-title .title { max-width: 150px; }
  .sync-chip span { display: none; }
  .sync-chip { width: 28px; padding: 0; justify-content: center; }
  .live-chip { display: none; }
  .topbar-divider { display: none; }
  .grid-main { gap: 12px; }
  .card-head { padding: 12px 13px 0; }
  .card-body { padding: 12px 13px 14px; }
  .card-body.is-flush { padding: 0; }
  .card-body.is-flush .table-wrap table.data thead th:first-child,
  .card-body.is-flush .table-wrap table.data tbody td:first-child { padding-left: 12px; }
  .card-body.is-flush .table-wrap table.data thead th:last-child,
  .card-body.is-flush .table-wrap table.data tbody td:last-child { padding-right: 12px; }
  .table-toolbar { align-items: stretch; }
  .table-toolbar-start, .table-toolbar-end { width: 100%; }
  .filterbar .search-box { max-width: none; flex: 1 1 100%; }
  .filterbar .input, .filterbar .select { flex: 1; }
  .form-actions { flex-wrap: wrap; }
  .form-actions-right { width: 100%; justify-content: flex-end; }
  .modal-overlay { padding: 0; }
  .modal { max-width: none; width: 100%; max-height: 100vh; min-height: 100vh; border-radius: 0; border: 0; }
  .modal-small, .modal-medium, .modal-large, .modal-xlarge { max-width: none; }
  .modal-head { padding: 15px; }
  .modal-body { padding: 15px; }
  .modal-footer { padding: 11px 15px; flex-wrap: wrap; }
  .modal-footer .btn { flex: 1; }
  .modal-footer .btn:first-child { margin-right: 0; }
  .toast-host { right: 10px; bottom: 10px; width: calc(100vw - 20px); }
  .login-main { padding: 26px 17px 50px; }
  .login-main-inner { max-width: none; }
  .login-email { font-size: 10px; }
  .bar-row { grid-template-columns: 15px minmax(70px, 1fr) minmax(60px, 1.3fr) 48px; gap: 6px; }
  .kv-grid, .kv-grid.is-3 { grid-template-columns: 1fr; }
  .record-row { grid-template-columns: 48px 1fr; }
  .record-row .record-value { grid-column: 1 / -1; }
  .record-row .record-status { grid-column: 2; justify-self: start; }
  .host-metrics { grid-template-columns: 1fr; }
  .dns-purpose { grid-column: 2; }
  .page-actions .btn { flex: 1; }
  .check-grid, .check-grid.is-3 { grid-template-columns: 1fr; }
  .confirm-details .kv-grid { grid-template-columns: 1fr 1fr; }
  .config-banner-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .page-actions, .config-banner-actions, .toast-host, .modal-overlay { display: none !important; }
  .workspace { margin-left: 0; }
  .content { padding: 0; max-width: none; }
  .card, .table-wrap { break-inside: avoid; box-shadow: none; }
  body { background: #fff; background-image: none; color: #000; }
}

/* ---------------------------------------------------------------- additions */
.bell-dot {
  position: absolute; top: 5px; right: 5px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--status-critical); border: 1px solid var(--surface);
}
#event-bell { position: relative; }
.palette-kbd { margin-left: auto; display: inline-flex; gap: 3px; }
.palette-kbd kbd {
  font-family: var(--font-mono); font-size: 9px; line-height: 1;
  padding: 3px 4px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--surface-soft); color: var(--text-3);
}
.sync-chip.is-info { background: var(--status-info-bg); border-color: var(--status-info-line); color: var(--status-info-ink); }
.sync-chip.is-neutral { color: var(--text-3); }
.login-mobile-brand .brand-copy span { color: var(--text-3); }
.login-mobile-brand .brand-copy strong { color: var(--ink); }

body.is-sidebar-collapsed { --sidebar-w: 76px; }
body.is-sidebar-collapsed .brand { justify-content: center; padding: 0; }
body.is-sidebar-collapsed .brand-copy,
body.is-sidebar-collapsed .nav-label,
body.is-sidebar-collapsed .nav-group-title,
body.is-sidebar-collapsed .sidebar-env > span:last-child,
body.is-sidebar-collapsed .sidebar-collapse span { display: none; }
body.is-sidebar-collapsed .sidebar-nav { padding-left: 10px; padding-right: 10px; }
body.is-sidebar-collapsed .nav-group { margin-bottom: 13px; }
body.is-sidebar-collapsed .nav-item { justify-content: center; padding: 0; gap: 0; }
body.is-sidebar-collapsed .nav-item.is-active::before { left: -10px; }
body.is-sidebar-collapsed .nav-count {
  position: absolute; top: 2px; right: 2px; min-width: 14px; height: 14px; padding: 0 3px;
  font-size: 8px;
}
body.is-sidebar-collapsed .sidebar-env { justify-content: center; }
body.is-sidebar-collapsed .env-chip { padding: 3px 5px; font-size: 8px; }
body.is-sidebar-collapsed .sidebar-collapse { justify-content: center; padding: 0; }
body.is-sidebar-collapsed .sidebar-collapse .icon { transform: rotate(180deg); }

/* Toast timer is visual; long operations keep the close button available. */
.toast-progress { animation-duration: 4.5s; }

/* Shared value boxes used inside dashboard and infrastructure cards. */
.kv-box { padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); }
.kv-box > span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.045em; color: var(--text-3); font-weight: 650; }
.kv-box > strong { display: block; margin-top: 2px; font-size: 15px; font-weight: 660; color: var(--ink); font-variant-numeric: tabular-nums; }
.status-dot { background: var(--muted); }
.btn.is-active { background: var(--accent-soft); border-color: var(--accent-soft-2); color: var(--accent-ink); }

/* Keep the overview digestible: the full service inventory lives on #/services. */
#dashboard-services .service-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 8px; }
#dashboard-services .service-card { padding: 8px 9px; }
#dashboard-services .service-card p { display: none; }
#dashboard-services .service-card dl { gap: 1px 7px; }
#dashboard-services .service-card:nth-child(n+9) { display: none; }
#dashboard-services .service-digest { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 10.5px; }
.chart-empty { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); border: 1px dashed var(--border); border-radius: 8px; }
.chart-empty span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.chart-empty small { font-size: 10.5px; }

/* Mailbox inventory controls */
.mailbox-head-actions { flex-wrap: wrap; }
.mailbox-toolbar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding: 11px 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.mailbox-filter { display: flex; flex-direction: column; gap: 4px; min-width: 132px; }
.mailbox-filter > span { font-size: 9.5px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; color: var(--text-3); }
.mailbox-filter .input { height: 31px; min-height: 31px; padding: 0 9px; font-size: 11px; }
.mailbox-filter.mailbox-page-size { min-width: 78px; margin-left: auto; }
.mailbox-dir { height: 31px; gap: 5px; white-space: nowrap; }
.mailbox-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 11px 16px; border-top: 1px solid var(--border); background: var(--surface-soft); }
.mailbox-pagination:empty { display: none; }
.pagination-summary, .pagination-page { font-size: 10.5px; color: var(--text-3); }
.pagination-summary strong { color: var(--text); font-weight: 650; }
.pagination-controls { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.pagination-controls .btn { height: 28px; padding: 0 8px; font-size: 10.5px; }
.page-btn { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text-2); font: inherit; font-size: 10.5px; font-weight: 650; cursor: pointer; }
.page-btn:hover { background: var(--surface-2); color: var(--ink); }
.page-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-gap { padding: 0 3px; color: var(--text-3); font-size: 11px; }
@media (max-width: 760px) {
  .mailbox-toolbar { align-items: stretch; }
  .mailbox-filter { flex: 1 1 132px; }
  .mailbox-filter.mailbox-page-size { margin-left: 0; }
  .mailbox-pagination { justify-content: center; }
  .pagination-summary, .pagination-page { width: 100%; text-align: center; }
}

/* Deliverability health on the dashboard */
.deliverability-health { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.health-subhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.health-subhead > div { display: flex; flex-direction: column; gap: 2px; }
.health-subhead strong { font-size: 11.5px; color: var(--ink); }
.health-subhead span { font-size: 9.5px; color: var(--text-3); }
.rep-health-list { display: flex; flex-direction: column; gap: 6px; }
.rep-ip { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); }
.rep-ip.is-clear { border-color: color-mix(in srgb, #1f9d65 28%, var(--border)); background: color-mix(in srgb, #1f9d65 5%, var(--surface)); }
.rep-ip.is-listed { border-color: color-mix(in srgb, #d64545 38%, var(--border)); background: color-mix(in srgb, #d64545 7%, var(--surface)); }
.rep-ip.is-blocked { border-color: color-mix(in srgb, var(--status-warning) 35%, var(--border)); background: color-mix(in srgb, var(--status-warning) 6%, var(--surface)); }
.rep-pulse { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--muted); }
.rep-ip.is-clear .rep-pulse { background: #1f9d65; animation: reputationPulseGood 2.2s ease-out infinite; }
.rep-ip.is-listed .rep-pulse { background: #d64545; animation: reputationPulseBad 1.05s ease-out infinite; }
.rep-ip.is-blocked .rep-pulse { background: var(--status-warning); animation: reputationPulseBad 1.8s ease-out infinite; }
.rep-ip.is-partial .rep-pulse { background: var(--warning); }
.rep-ip-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.rep-ip-copy strong { font-size: 11px; color: var(--ink); }
.rep-ip-copy span { font-size: 9.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-ip-state { flex: none; font-size: 8.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 99px; background: var(--surface-2); color: var(--text-3); }
.rep-ip.is-clear .rep-ip-state { background: color-mix(in srgb, #1f9d65 13%, transparent); color: #187a50; }
.rep-ip.is-listed .rep-ip-state { background: color-mix(in srgb, #d64545 14%, transparent); color: #b52f2f; }
.rep-ip.is-blocked .rep-ip-state { background: color-mix(in srgb, var(--status-warning) 14%, transparent); color: var(--status-warning-ink); }
.rep-health-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 9.5px; color: var(--text-3); }
@keyframes reputationPulseGood {
  0% { box-shadow: 0 0 0 0 rgba(31, 157, 101, .42); }
  70% { box-shadow: 0 0 0 7px rgba(31, 157, 101, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 157, 101, 0); }
}
@keyframes reputationPulseBad {
  0% { box-shadow: 0 0 0 0 rgba(214, 69, 69, .55); }
  65% { box-shadow: 0 0 0 8px rgba(214, 69, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 69, 69, 0); }
}

/* Software update terminal */
.check-col { width: 30px; text-align: center; }
.check-col input { width: 14px; height: 14px; accent-color: var(--accent); }
.terminal-card-head { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: #0b1725; color: #dbe8f5; border-bottom: 1px solid rgba(255,255,255,.07); }
.terminal-dots { display: flex; align-items: center; gap: 4px; flex: none; }
.terminal-dots span { width: 8px; height: 8px; border-radius: 50%; background: #f26d6d; }
.terminal-dots span:nth-child(2) { background: #e9bd5e; }
.terminal-dots span:nth-child(3) { background: #59c98c; }
.terminal-card-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.terminal-card-title strong { font-size: 10.5px; font-weight: 650; color: #e7f1fb; }
.terminal-card-title span { font-size: 9px; color: #7f99b3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terminal-state { margin-left: auto; flex: none; font-size: 8.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; padding: 3px 7px; border-radius: 99px; background: rgba(255,255,255,.08); color: #aac2d7; }
.terminal-state.is-running, .terminal-state.is-queued { background: rgba(233,189,94,.16); color: #efd28d; }
.terminal-state.is-completed, .terminal-state.is-connected, .terminal-state.is-detected { background: rgba(89,201,140,.16); color: #8fe2b4; }
.terminal-state.is-failed, .terminal-state.is-expired { background: rgba(242,109,109,.18); color: #ffaaaa; }
.terminal-state.is-idle { background: rgba(255,255,255,.08); color: #aac2d7; }
.terminal-card-actions { display: flex; gap: 2px; margin-left: 4px; }
.terminal-card-actions .icon-btn { color: #9fb6ca; }
.terminal-card-actions .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.terminal-shell { background: #08111c; }
.terminal-output { margin: 0; min-height: 230px; max-height: 430px; overflow: auto; padding: 14px 16px; color: #d8e6f5; font: 11px/1.55 "Cascadia Code", "SFMono-Regular", ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal-output:empty::before { content: 'Waiting for apt-get output…'; color: #60788f; }
.terminal-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #0b1725; border-top: 1px solid rgba(255,255,255,.07); color: #7f99b3; font-size: 9px; }
.terminal-hint { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.terminal-hint svg { flex: none; }
.terminal-shortcut { flex: none; color: #60788f; }
.terminal-port-chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); font: 10.5px ui-monospace, monospace; color: var(--text-2); }

/* Interactive SSH terminal */
.terminal-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 15px; align-items: start; }
.terminal-connect-card .card-body { padding: 15px 16px; }
.terminal-connect-card .form-grid { gap: 9px; }
.terminal-connect-card .field { margin: 0; }
.terminal-key-input { min-height: 118px; resize: vertical; padding: 9px 10px; font: 10px/1.5 ui-monospace, monospace; }
.terminal-transport-note { display: flex; align-items: center; gap: 6px; margin-top: 11px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); font-size: 9.5px; color: var(--text-3); line-height: 1.45; }
.terminal-transport-note svg { flex: none; color: var(--status-good); }
.terminal-window-card { overflow: hidden; border-color: #14293c; }
.terminal-canvas { position: relative; height: 580px; background: #08111c; padding: 11px 12px; overflow: hidden; }
.terminal-canvas .xterm { height: 100%; }
.terminal-canvas .xterm-viewport { scrollbar-color: #2d4358 #08111c; }
.terminal-boot { color: #7f99b3; }
.terminal-window-card .terminal-card-foot { min-height: 38px; }
@media (max-width: 980px) {
  .terminal-layout { grid-template-columns: 1fr; }
  .terminal-canvas { height: 480px; }
}

/* TLS assignment targets */
.assign-targets { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.assign-target { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; }
.assign-target:hover { background: var(--surface-soft); }
.assign-target.is-disabled { opacity: .62; cursor: not-allowed; }
.assign-target input { margin-top: 2px; width: 14px; height: 14px; accent-color: var(--accent); }
.assign-target-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.assign-target-copy strong { font-size: 11px; }
.assign-target-copy span { font-size: 9.5px; overflow-wrap: anywhere; }
.assign-target .badge { flex: none; }
@media (max-width: 760px) {
  .rep-health-foot { align-items: flex-start; flex-direction: column; }
  .health-subhead { align-items: flex-start; }
}

/* ---------- security reports ---------- */
a.security-report-alert { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; border: 1px solid var(--status-critical-line); background: var(--status-critical-bg); border-radius: var(--r-md); padding: 12px 14px; }
a.security-report-alert > svg { flex: none; color: var(--status-critical-ink); }
a.security-report-alert > div { flex: 1; min-width: 0; }
a.security-report-alert .btn { flex: none; text-decoration: none; }
a.security-report-alert:hover { filter: brightness(.985); }
.field-label { display: block; margin-bottom: 5px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.read-box { min-height: 34px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; line-height: 1.55; overflow-wrap: anywhere; }
.message-snapshot { max-height: 280px; overflow: auto; white-space: pre-wrap; }

/* Web Net */
.webnet-metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric-block { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); padding: 13px 14px; min-width: 0; }
.metric-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.metric-block-head strong { font-size: 11px; font-weight: 650; }
.mini-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
.mini-stat-grid > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mini-stat-grid span { font-size: 9px; line-height: 1.3; color: var(--text-3); overflow-wrap: anywhere; }
.mini-stat-grid b { font-size: 13px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
@media (max-width: 1180px) { .webnet-metrics-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .mini-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Add-ons catalog */
.addon-control-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.addon-control-identity > div { min-width: 0; }
.addon-control-logo { width: 44px; height: 44px; display: grid; place-items: center; flex: none; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.addon-control-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.addon-control-logo.is-fallback { color: var(--text-3); }
.addon-control-tagline { margin-top: 0; }
.addon-control-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.addon-control-links a { display: inline-flex; align-items: center; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 10.5px; font-weight: 600; text-decoration: none; }
.addon-control-links a:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }

/* Office / OnlyOffice lifecycle */
.office-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.office-fields { display: grid; gap: 12px; }
.office-feature { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.office-error { color: var(--status-critical-ink); margin-top: 12px; }
.office-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.office-logs { max-height: 360px; overflow: auto; white-space: pre-wrap; margin: 0; }
@media (max-width: 1000px) { .office-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- storage */
.storage-volume-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); gap: 12px; }
.storage-volume { min-width: 0; padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.storage-volume.is-warning { border-color: var(--status-warning-line); }
.storage-volume.is-critical { border-color: var(--status-critical-line); }
.storage-volume.is-offline { background: var(--surface-soft); }
.storage-volume-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.storage-volume-title { min-width: 0; }
.storage-volume-title strong { display: block; color: var(--ink); font-size: 13px; font-weight: 650; letter-spacing: -0.01em; }
.storage-volume-title span { display: block; margin-top: 1px; color: var(--text-3); font-size: 10.5px; }
.storage-volume .meter { margin: 0; }
.storage-offline { display: flex; align-items: flex-start; gap: 7px; padding: 9px 10px; border: 1px solid var(--status-critical-line); border-radius: var(--radius-sm); background: var(--status-critical-bg); color: var(--status-critical-ink); font-size: 11px; line-height: 1.45; }
.storage-offline.is-inactive { border-color: var(--border); background: var(--surface-soft); color: var(--text-3); }
.storage-inode { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--text-3); font-size: 10px; }
.storage-inode > span { flex: 0 0 auto; }
.storage-inode-track { flex: 1; height: 4px; border-radius: 999px; background: var(--track); overflow: hidden; }
.storage-inode-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.storage-inode strong { margin-left: auto; color: var(--text-2); font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.storage-volume-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.storage-volume-meta div { min-width: 0; }
.storage-volume-meta span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.storage-volume-meta strong { display: block; margin-top: 2px; color: var(--text-2); font-size: 10.5px; font-weight: 500; overflow-wrap: anywhere; }
.storage-volume-meta strong.mono { font-size: 9.5px; }
.storage-volume-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.storage-volume-foot .sparkline { flex: 0 0 auto; max-width: 50%; height: auto; }
.storage-doctor-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.storage-doctor-head .mono { min-width: 0; color: var(--text-3); font-size: 9.5px; overflow-wrap: anywhere; }
.storage-issues { display: grid; gap: 8px; }
.storage-issue { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-issue-dot { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--text-3); }
.storage-issue.is-warning { border-color: var(--status-warning-line); background: var(--status-warning-bg); }
.storage-issue.is-warning .storage-issue-dot { background: var(--status-warning); }
.storage-issue.is-critical { border-color: var(--status-critical-line); background: var(--status-critical-bg); }
.storage-issue.is-critical .storage-issue-dot { background: var(--status-critical); }
.storage-issue strong { display: block; color: var(--ink); font-size: 11.5px; }
.storage-issue p { margin: 1px 0 0; color: var(--text-3); font-size: 10.5px; line-height: 1.45; }
.storage-placement-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.storage-placement-summary > div { min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-placement-summary span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.storage-placement-summary strong { display: block; margin-top: 2px; color: var(--ink); font-size: 12px; }
.storage-placement-summary small { display: block; margin-top: 1px; color: var(--text-3); font-size: 10.5px; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .storage-volume-meta, .storage-placement-summary { grid-template-columns: 1fr; }
  .storage-volume-foot { align-items: flex-start; flex-direction: column; }
  .storage-volume-foot .sparkline { max-width: 100%; width: 100%; }
}
.storage-placement-summary .input-sm { margin-top: 2px; width: 100%; }
.data .input-sm { min-width: 150px; padding: 5px 8px; font-size: 11px; }
.storage-operation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.storage-operation-head h3 { margin: 2px 0 2px; font-size: 15px; }
.storage-operation-head p { margin: 0; color: var(--text-3); font-size: 11.5px; }
.storage-operation-status { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.storage-operation-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; color: var(--text-3); font-size: 10.5px; }
.storage-review-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.storage-review-grid > div { padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); min-width: 0; }
.storage-review-grid span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.06em; text-transform: uppercase; }
.storage-review-grid strong { display: block; margin-top: 2px; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.storage-log { max-height: 260px; overflow: auto; margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--text-2); font-family: var(--font-mono); font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
@media (max-width: 640px) {
  .storage-review-grid { grid-template-columns: 1fr 1fr; }
  .storage-operation-head { flex-direction: column; }
  .storage-operation-status { align-items: flex-start; }
}
.storage-operation-items { min-width: 0; table-layout: fixed; }
.storage-operation-items th:nth-child(1), .storage-operation-items td:nth-child(1) { width: 28%; }
.storage-operation-items th:nth-child(2), .storage-operation-items td:nth-child(2),
.storage-operation-items th:nth-child(3), .storage-operation-items td:nth-child(3) { width: 24%; }
.storage-operation-items th:nth-child(4), .storage-operation-items td:nth-child(4) { width: 16%; }
.storage-operation-items th:nth-child(5), .storage-operation-items td:nth-child(5) { width: 8%; }
.storage-operation-items .cell-sub { display: block; white-space: normal; overflow-wrap: anywhere; }
.storage-host-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 10px; font-size: 10.5px; }
.storage-volume-actions { display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-end; }
.storage-volume-actions .btn { font-size: 9.5px; padding: 2px 5px; min-height: 20px; }
.storage-volume-foot { flex-wrap: wrap; }
@media (max-width: 640px) {
  .storage-volume-actions { justify-content: flex-start; }
}

/* Storage protection and forecast */
.storage-alert { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.storage-alert > div { flex: 1; min-width: 0; }
.storage-alert p { margin: 2px 0 0; }
.storage-alert .btn { flex: 0 0 auto; }
.storage-forecast-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.storage-forecast-summary > div { min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-forecast-summary span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.storage-forecast-summary strong { display: block; margin-top: 2px; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.storage-forecast-summary small { display: block; margin-top: 1px; color: var(--text-3); font-size: 10px; }
.storage-forecast-chart { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.storage-chart-grid { stroke: var(--border); stroke-width: 1; }
.storage-chart-axis { fill: var(--text-3); font-family: var(--font-mono); font-size: 8px; }
.storage-chart-actual { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.storage-chart-projected { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-dasharray: 5 5; stroke-linecap: round; opacity: 0.7; }
.storage-chart-dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 1.5; }
.storage-chart-threshold { stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.75; }
.storage-chart-threshold.tone-critical { stroke: var(--status-critical); }
.storage-chart-threshold.tone-warning { stroke: var(--status-warning); }
.storage-chart-threshold.tone-info { stroke: var(--accent); }
.storage-chart-label { font-family: var(--font-mono); font-size: 8px; }
.storage-chart-label.tone-critical { fill: var(--status-critical); }
.storage-chart-label.tone-warning { fill: var(--status-warning); }
.storage-chart-label.tone-info { fill: var(--accent); }
.storage-chart-key { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; color: var(--text-3); font-size: 10px; }
.storage-chart-key span { display: inline-flex; align-items: center; gap: 4px; }
.storage-chart-key i { display: inline-block; width: 13px; height: 2px; background: var(--series-1); }
.storage-chart-key i.is-projected { opacity: 0.55; border-top: 2px dashed var(--series-1); background: none; height: 0; }
.storage-chart-key i.is-threshold { background: none; border-top: 2px dashed var(--status-warning); height: 0; }
.storage-forecast-empty { display: flex; align-items: center; gap: 8px; padding: 14px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-3); font-size: 11px; }
.storage-threshold-list { display: grid; gap: 0; margin-top: 8px; border-top: 1px solid var(--border); }
.storage-threshold-row { display: grid; grid-template-columns: 1fr 48px 100px 92px; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 10.5px; }
.storage-threshold-row strong { font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.storage-threshold-row .mono { color: var(--text-3); text-align: right; font-size: 9.5px; }
.storage-threshold-row.tone-critical strong { color: var(--status-critical-ink); }
.storage-threshold-row.tone-warning strong { color: var(--status-warning-ink); }
.storage-recommendation { padding: 12px; border: 1px solid var(--accent-soft-2); border-radius: var(--radius); background: var(--accent-soft); }
.storage-recommendation-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.storage-recommendation p { margin: 6px 0 9px; color: var(--text-2); font-size: 11.5px; line-height: 1.5; }
.storage-recommendation-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.storage-recommendation-stats > div { min-width: 0; padding: 7px 8px; border: 1px solid var(--accent-soft-2); border-radius: var(--radius-sm); background: var(--surface); }
.storage-recommendation-stats span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.05em; text-transform: uppercase; }
.storage-recommendation-stats strong { display: block; margin-top: 2px; color: var(--ink); font-size: 11px; }
@media (max-width: 760px) {
  .storage-forecast-summary, .storage-recommendation-stats { grid-template-columns: 1fr 1fr; }
  .storage-threshold-row { grid-template-columns: 1fr 42px 80px 76px; }
  .storage-alert { align-items: flex-start; flex-wrap: wrap; }
}

/* ------------------------------------------------------------------ disk management */
.storage-outlook-card, .storage-disks-card, .storage-operations-card { margin-top: 16px; }
.storage-volumes-head { flex-wrap: wrap; }
.storage-volumes-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.storage-filter { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 9.5px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; }
.storage-filter .input { height: 28px; min-height: 28px; padding: 0 8px; color: var(--text-2); font-size: 11px; text-transform: none; letter-spacing: 0; }

.storage-drive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 12px; }
.storage-drive-card {
  position: relative; min-width: 0; padding: 13px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-xs);
  cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.storage-drive-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.storage-drive-card:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus), var(--shadow-md); }
.storage-drive-card.tone-warning { border-color: var(--status-warning-line); }
.storage-drive-card.tone-critical { border-color: var(--status-critical-line); }
.storage-drive-card.is-inactive { background: var(--surface-soft); }
.storage-drive-card.is-inactive .storage-drive-identity,
.storage-drive-card.is-inactive .storage-drive-capacity { opacity: 0.88; }
.storage-drive-top { display: flex; align-items: flex-start; gap: 11px; }
.storage-drive-visual { flex: 0 0 auto; width: 82px; height: 66px; }
.storage-drive-visual svg { display: block; width: 100%; height: 100%; }
.storage-drive-visual.is-offline { opacity: 0.58; }
.drive-case { fill: var(--surface-muted); stroke: var(--border-strong); stroke-width: 1.2; }
.drive-face { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.drive-spindle, .drive-slot { fill: var(--border-strong); }
.drive-slot.is-soft { fill: var(--border); }
.drive-track { fill: var(--track); }
.drive-fill { fill: var(--status-good); }
.drive-led { fill: var(--muted); }
.drive-led.is-on { fill: var(--status-good); }
.storage-drive-visual.tone-warning .drive-fill, .storage-drive-visual.tone-warning .drive-led.is-on { fill: var(--status-warning); }
.storage-drive-visual.tone-critical .drive-fill, .storage-drive-visual.tone-critical .drive-led.is-on { fill: var(--status-critical); }
.storage-drive-visual.tone-neutral .drive-fill, .storage-drive-visual.tone-neutral .drive-led.is-on { fill: var(--muted); }
.storage-drive-identity { flex: 1; min-width: 0; }
.storage-drive-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.storage-drive-name-row > strong { min-width: 0; color: var(--ink); font-size: 13.5px; font-weight: 650; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.storage-drive-role { display: block; margin-top: 2px; color: var(--text-3); font-size: 10.5px; }
.storage-drive-path { display: block; margin-top: 4px; color: var(--text-3); font-size: 9.5px; overflow-wrap: anywhere; }
.storage-drive-menu { flex: 0 0 auto; width: 28px; height: 28px; margin: -3px -5px 0 0; color: var(--text-3); }
.storage-drive-menu:hover { color: var(--ink); background: var(--surface-soft); }
.storage-drive-capacity { margin-top: 11px; }
.storage-drive-cap-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--text-3); font-size: 9.5px; font-weight: 650; letter-spacing: 0.045em; text-transform: uppercase; }
.storage-drive-cap-head strong { color: var(--ink); font-family: var(--font-mono); font-size: 11px; font-weight: 550; letter-spacing: 0; }
.storage-drive-meter { height: 8px; margin-top: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.storage-drive-meter span { display: block; height: 100%; border-radius: inherit; background: var(--status-good); }
.storage-drive-card.tone-warning .storage-drive-meter span { background: var(--status-warning); }
.storage-drive-card.tone-critical .storage-drive-meter span { background: var(--status-critical); }
.storage-drive-card.tone-neutral .storage-drive-meter span { background: var(--muted); }
.storage-drive-cap-foot { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; color: var(--text-3); font-size: 9.5px; }
.storage-drive-cap-foot span:nth-child(2) { color: var(--text-2); }
.storage-drive-offline { display: flex; align-items: flex-start; gap: 7px; margin-top: 11px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--text-3); font-size: 10.5px; line-height: 1.45; }
.storage-drive-card:not(.is-inactive) .storage-drive-offline { border-color: var(--status-critical-line); background: var(--status-critical-bg); color: var(--status-critical-ink); }
.storage-drive-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--border); }
.storage-drive-meta div { min-width: 0; }
.storage-drive-meta span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.055em; text-transform: uppercase; }
.storage-drive-meta strong { display: block; margin-top: 2px; color: var(--text-2); font-size: 10.5px; font-weight: 500; overflow-wrap: anywhere; }
.storage-drive-meta strong.mono { font-size: 9.5px; }
.storage-drive-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border); }
.storage-drive-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.storage-drive-seen { flex: 0 0 auto; color: var(--text-3); font-size: 9.5px; }
.storage-volume-menu { display: grid; gap: 3px; }
.storage-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 9px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); text-align: left; }
.storage-menu-item:hover { border-color: var(--border); background: var(--surface-soft); color: var(--ink); }
.storage-menu-item.is-danger { color: var(--status-critical-ink); }
.storage-menu-icon { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 7px; background: var(--surface-soft); color: var(--text-3); }
.storage-menu-item.is-danger .storage-menu-icon { background: var(--status-critical-bg); color: var(--status-critical-ink); }
.storage-menu-item > span:nth-child(2) { flex: 1; min-width: 0; }
.storage-menu-item strong { display: block; font-size: 11.5px; font-weight: 600; }
.storage-menu-item small { display: block; margin-top: 1px; color: var(--text-3); font-size: 10px; }
.storage-menu-item > .icon { flex: none; color: var(--muted); }

.storage-detail-hero { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-soft); }
.storage-detail-hero .storage-drive-visual { width: 96px; height: 76px; }
.storage-detail-identity { min-width: 0; }
.storage-detail-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.storage-detail-path { display: block; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.storage-detail-meta { display: block; margin-top: 3px; color: var(--text-3); font-size: 10.5px; overflow-wrap: anywhere; }
.storage-detail-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.storage-detail-stats > div { min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-detail-stats span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.055em; text-transform: uppercase; }
.storage-detail-stats strong { display: block; margin-top: 2px; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.storage-detail-stats small { display: block; margin-top: 1px; color: var(--text-3); font-size: 9.5px; }
.storage-detail-meter { margin-top: 12px; }
.storage-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.storage-detail-section { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-soft); }
.storage-detail-section h4 { margin: 0 0 9px; color: var(--text-3); font-size: 9.5px; font-weight: 650; letter-spacing: 0.055em; text-transform: uppercase; }
.storage-detail-list { display: grid; gap: 7px; margin: 0; }
.storage-detail-list > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.storage-detail-list dt { color: var(--text-3); font-size: 9.5px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; }
.storage-detail-list dd { margin: 0; color: var(--text-2); font-size: 10.5px; overflow-wrap: anywhere; }
.storage-detail-list dd.mono { font-size: 9.5px; }
.storage-detail-section .status-pill { display: inline-flex; }

.storage-policy-section { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.storage-policy-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.storage-policy-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.storage-policy-section-head h4 { font-size: 12px; font-weight: 650; }
.storage-policy-section-head p { margin-top: 2px; color: var(--text-3); font-size: 10.5px; }
.storage-policy-grid { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.storage-policy-guard { margin-top: 11px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-policy-scale { display: flex; height: 9px; margin-bottom: 5px; border-radius: 999px; background: var(--track); overflow: hidden; }
.storage-policy-scale > span { display: block; height: 100%; }
.storage-policy-scale-key { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 11px; color: var(--text-3); font-size: 9.5px; }
.storage-policy-scale-key span { display: inline-flex; align-items: center; gap: 4px; }
.storage-policy-scale-key i { width: 7px; height: 7px; border-radius: 2px; background: var(--muted); }
.storage-policy-scale .tone-advisory, .storage-policy-scale-key .tone-advisory i { background: var(--status-info); }
.storage-policy-scale .tone-warning, .storage-policy-scale-key .tone-warning i { background: var(--status-warning); }
.storage-policy-scale .tone-serious, .storage-policy-scale-key .tone-serious i { background: var(--status-serious); }
.storage-policy-scale .tone-critical, .storage-policy-scale-key .tone-critical i { background: var(--status-critical); }
.storage-policy-scale .tone-emergency, .storage-policy-scale-key .tone-emergency i { background: var(--text-2); }
.storage-policy-scale .tone-free, .storage-policy-scale-key .tone-free i { background: var(--surface-muted); }
.storage-policy-diff { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.storage-policy-diff li { display: grid; grid-template-columns: minmax(90px, 1fr) auto auto auto; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 10.5px; }
.storage-policy-diff li span { color: var(--text-3); }
.storage-policy-diff li strong { color: var(--text-2); font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.storage-policy-diff li strong:last-child { color: var(--status-good-ink); }
.storage-policy-diff li i { color: var(--muted); font-style: normal; }

.storage-move-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); gap: 16px; align-items: start; }
.storage-move-main { min-width: 0; }
.storage-move-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.storage-move-tab { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text-2); text-align: left; }
.storage-move-tab:hover { border-color: var(--border-strong); }
.storage-move-tab.is-active { border-color: var(--accent); background: var(--accent-soft); }
.storage-move-tab-icon { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-soft); color: var(--text-3); }
.storage-move-tab.is-active .storage-move-tab-icon { background: var(--accent); color: #fff; }
.storage-move-tab strong { display: block; color: var(--ink); font-size: 11.5px; }
.storage-move-tab small { display: block; margin-top: 2px; color: var(--text-3); font-size: 10px; line-height: 1.35; }
.storage-move-pane { margin-top: 12px; }
.storage-move-domain-summary { margin-top: 12px; }
.storage-move-domain-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.storage-move-domain-card > div { min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-move-domain-card span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.055em; text-transform: uppercase; }
.storage-move-domain-card strong { display: block; margin-top: 2px; color: var(--ink); font-size: 11.5px; overflow-wrap: anywhere; }
.storage-move-domain-card small { display: block; margin-top: 1px; color: var(--text-3); font-size: 9.5px; overflow-wrap: anywhere; }
.storage-picker-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.storage-picker-search { position: relative; display: flex; align-items: center; flex: 1 1 220px; min-width: 0; }
.storage-picker-search .icon { position: absolute; left: 9px; color: var(--muted); pointer-events: none; }
.storage-picker-search .input { width: 100%; height: 32px; min-height: 32px; padding-left: 30px; }
.storage-picker-volume { flex: 0 1 240px; height: 32px; min-height: 32px; }
.storage-picker-bulk { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 9px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.storage-picker-bulk > div:first-child strong { display: block; color: var(--text-2); font-size: 11px; }
.storage-picker-bulk > div:first-child span { display: block; margin-top: 1px; color: var(--text-3); font-size: 10px; }
.storage-picker-bulk-actions { display: flex; flex-wrap: wrap; gap: 3px; }
.storage-picker-wrap { margin-top: 10px; }
.storage-picker-table { width: 100%; min-width: 640px; table-layout: fixed; }
.storage-picker-table th.check, .storage-picker-table td.check { width: 34px; padding-right: 0; text-align: center; }
.storage-picker-table th:nth-child(2) { width: 33%; }
.storage-picker-table th:nth-child(3) { width: 25%; }
.storage-picker-table th:nth-child(4), .storage-picker-table th:nth-child(5) { width: 11%; }
.storage-picker-table th:nth-child(6) { width: 15%; }
.storage-picker-table td:nth-child(4), .storage-picker-table td:nth-child(5) { white-space: nowrap; }
.storage-picker-table td:nth-child(2) .cell-main, .storage-picker-table td:nth-child(2) .cell-sub,
.storage-picker-table td:nth-child(3) .cell-main, .storage-picker-table td:nth-child(3) .cell-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storage-picker-table input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--accent); }
.storage-picker-table tbody tr[data-mailbox-row] { cursor: pointer; }
.storage-picker-table td .storage-picker-mobile-volume { display: none; }
.storage-usage-cell { display: grid; grid-template-columns: minmax(36px, 1fr) 30px; align-items: center; gap: 4px; }
.storage-usage-track { height: 5px; border-radius: 999px; background: var(--track); overflow: hidden; }
.storage-usage-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.storage-usage-track span.is-warning { background: var(--status-warning); }
.storage-usage-track span.is-over { background: var(--status-critical); }
.storage-usage-cell em { color: var(--text-3); font-size: 9.5px; font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.storage-picker-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; color: var(--text-3); font-size: 10.5px; }
.storage-move-side { position: sticky; top: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-soft); }
.storage-move-side-head { margin-bottom: 9px; }
.storage-move-side-head h4 { font-size: 12px; }
.storage-move-side .field { margin-top: 9px; }
.storage-move-side .field:first-of-type { margin-top: 0; }
.storage-move-side .input { width: 100%; }
.storage-move-summary { display: grid; gap: 5px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.storage-move-summary-head { color: var(--text-3); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.storage-move-summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-size: 10.5px; }
.storage-move-summary-row span { flex: none; color: var(--text-3); }
.storage-move-summary-row strong { color: var(--text-2); text-align: right; overflow-wrap: anywhere; }
.storage-move-note { margin-top: 10px; }

.storage-sort-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.storage-sort-btn:hover, .storage-sort-btn.is-active { color: var(--accent-ink); }
.storage-sort-icon { font-size: 9px; opacity: 0.65; }
.storage-operation-progress { min-width: 130px; }
.storage-ops-footer { margin-top: 10px; }
.storage-operations-table th:last-child { width: 78px; }

@media (max-width: 980px) {
  .storage-move-layout { grid-template-columns: 1fr; }
  .storage-move-side { position: static; }
  .storage-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .storage-volumes-tools { width: 100%; justify-content: space-between; }
  .storage-drive-grid { grid-template-columns: 1fr; }
  .storage-detail-hero { align-items: flex-start; flex-direction: column; }
  .storage-detail-stats { grid-template-columns: 1fr 1fr; }
  .storage-move-tabs { grid-template-columns: 1fr; }
  .storage-picker-toolbar { align-items: stretch; flex-direction: column; }
  .storage-picker-search, .storage-picker-volume { flex: 0 0 auto; width: 100%; }
  .storage-picker-bulk { align-items: flex-start; flex-direction: column; }
  .storage-picker-table { min-width: 0; }
  .storage-picker-table th:nth-child(3), .storage-picker-table td:nth-child(3),
  .storage-picker-table th:nth-child(6), .storage-picker-table td:nth-child(6) { display: none; }
  .storage-picker-table th:nth-child(2) { width: 50%; }
  .storage-picker-table th:nth-child(4), .storage-picker-table th:nth-child(5) { width: 22%; }
  .storage-picker-table td .storage-picker-mobile-volume { display: block; margin-top: 2px; color: var(--text-3); font-family: var(--font-mono); font-size: 9px; }
  .storage-picker-table td:nth-child(2) .cell-main { white-space: normal; overflow-wrap: anywhere; font-size: 11px; }
  .storage-drive-meta { grid-template-columns: 1fr 1fr; }
  .storage-drive-meta div:last-child { grid-column: 1 / -1; }
  .storage-ops-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .storage-detail-stats, .storage-move-domain-card { grid-template-columns: 1fr; }
  .storage-drive-meta { grid-template-columns: 1fr; }
  .storage-drive-meta div:last-child { grid-column: auto; }
  .storage-policy-diff li { grid-template-columns: 1fr auto; }
  .storage-policy-diff li span { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ swap */
.storage-swap-card { margin-top: 16px; }
.storage-swap-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.storage-swap-summary > div { min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-swap-summary span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.055em; text-transform: uppercase; }
.storage-swap-summary strong { display: block; margin-top: 2px; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.storage-swap-summary small { display: block; margin-top: 1px; color: var(--text-3); font-size: 9.5px; }
.storage-swap-meter { margin-top: 12px; }
.storage-swap-table-wrap { margin-top: 12px; }
.storage-swap-table-wrap .cell-sub { white-space: normal; overflow-wrap: anywhere; }
.storage-swap-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-top: 10px; color: var(--text-3); font-size: 9.5px; }
.storage-swap-foot span:last-child { margin-left: auto; }
.storage-swap-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.storage-swap-main { min-width: 0; }
.storage-swap-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.storage-swap-tab { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text-2); text-align: left; }
.storage-swap-tab:hover { border-color: var(--border-strong); }
.storage-swap-tab.is-active { border-color: var(--accent); background: var(--accent-soft); }
.storage-swap-tab-icon { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-soft); color: var(--text-3); }
.storage-swap-tab.is-active .storage-swap-tab-icon { background: var(--accent); color: #fff; }
.storage-swap-tab strong { display: block; color: var(--ink); font-size: 11.5px; }
.storage-swap-tab small { display: block; margin-top: 2px; color: var(--text-3); font-size: 10px; line-height: 1.35; }
.storage-swap-pane { margin-top: 12px; }
.storage-swap-recommend { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 12px; padding: 10px 11px; border: 1px solid var(--accent-soft-2); border-radius: var(--radius); background: var(--accent-soft); }
.storage-swap-recommend-icon { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; border-radius: 8px; background: var(--surface); color: var(--accent-ink); }
.storage-swap-recommend span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.05em; text-transform: uppercase; }
.storage-swap-recommend strong { display: block; margin-top: 1px; color: var(--ink); font-size: 13px; }
.storage-swap-recommend small { display: block; margin-top: 1px; color: var(--text-3); font-size: 10px; }
.storage-swap-size-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.storage-swap-size-row .field { flex: 1 1 170px; min-width: 0; margin: 0; }
.storage-swap-quick { display: flex; flex-wrap: wrap; gap: 3px; padding-bottom: 2px; }
.storage-swap-quick .btn { font-size: 9.5px; }
.storage-swap-quick .btn.is-active { background: var(--accent-soft); border-color: var(--accent-soft-2); color: var(--accent-ink); }
.storage-swap-preview { margin-top: 11px; padding: 10px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-swap-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: 11px; font-weight: 600; }
.storage-swap-preview-head > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.storage-swap-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 9px 0 0; }
.storage-swap-facts > div { min-width: 0; }
.storage-swap-facts dt { color: var(--text-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.05em; text-transform: uppercase; }
.storage-swap-facts dd { margin: 2px 0 0; color: var(--text-2); font-size: 10.5px; overflow-wrap: anywhere; }
.storage-swap-side { position: sticky; top: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-soft); }
.storage-swap-current { margin-top: 8px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.storage-swap-current span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.05em; text-transform: uppercase; }
.storage-swap-current strong { display: block; margin-top: 2px; color: var(--ink); font-size: 13px; }
.storage-swap-current small { display: block; margin-top: 1px; color: var(--text-3); font-size: 9.5px; }
.storage-swap-plan { display: grid; gap: 6px; margin: 10px 0; padding-top: 9px; border-top: 1px solid var(--border); }
.storage-swap-plan-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-size: 10.5px; }
.storage-swap-plan-row span { flex: none; color: var(--text-3); }
.storage-swap-plan-row strong { color: var(--text-2); text-align: right; overflow-wrap: anywhere; }
.storage-swap-plan-warning { display: flex; align-items: center; gap: 5px; padding: 6px 7px; border-radius: var(--radius-sm); background: var(--status-warning-bg); color: var(--status-warning-ink); font-size: 10px; }
.storage-swap-side > .notice { margin-top: 10px; }
@media (max-width: 980px) {
  .storage-swap-layout { grid-template-columns: 1fr; }
  .storage-swap-side { position: static; }
}
@media (max-width: 760px) {
  .storage-swap-summary { grid-template-columns: 1fr 1fr; }
  .storage-swap-tabs { grid-template-columns: 1fr; }
  .storage-swap-size-row { align-items: stretch; flex-direction: column; }
  .storage-swap-size-row .field { flex: 0 0 auto; }
  .storage-swap-facts { grid-template-columns: 1fr 1fr; }
  .storage-swap-foot { align-items: flex-start; flex-direction: column; }
  .storage-swap-foot span:last-child { margin-left: 0; }
}
@media (max-width: 520px) {
  .storage-swap-summary { grid-template-columns: 1fr 1fr; }
  .storage-swap-facts { grid-template-columns: 1fr; }
}

/* Interface language selectors */
.login-language{margin:0 0 14px}
.login-language select{width:100%;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:inherit;padding:9px 10px;font:inherit}
.menu-language{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--line)}
.menu-language label{font-size:11px;color:var(--muted);white-space:nowrap}
.menu-language select{flex:1;min-width:0;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:inherit;padding:6px 8px;font:inherit;font-size:12px}

/* --------------------------------------------------- enterprise installer */
.installer { display: grid; gap: 16px; }
.installer-meter { height: 7px; border-radius: 999px; background: var(--track); overflow: hidden; }
.installer-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--series-3)); transition: width 0.45s cubic-bezier(0.2, 0.8, 0.3, 1); }
.installer-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.installer-step { position: relative; display: flex; gap: 12px; padding: 0 0 18px; }
.installer-step:last-child { padding-bottom: 0; }
.installer-step::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 2px; width: 2px; background: var(--border); }
.installer-step:last-child::before { display: none; }
.installer-step.is-done::before { background: var(--status-good-line); }
.installer-marker { position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-3); font-size: 11px; font-weight: 700; }
.installer-step.is-active .installer-marker { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--focus); }
.installer-step.is-active .installer-marker::after { content: ""; position: absolute; inset: -7px; border-radius: inherit; border: 2px solid var(--accent); border-right-color: transparent; animation: installer-spin 0.9s linear infinite; }
.installer-step.is-done .installer-marker { border-color: var(--status-good); background: var(--status-good-bg); color: var(--status-good-ink); }
.installer-step.is-error .installer-marker { border-color: var(--status-critical); background: var(--status-critical-bg); color: var(--status-critical-ink); }
.installer-step-copy { min-width: 0; padding-top: 2px; }
.installer-step-copy strong { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink); }
.installer-step-copy span { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.45; color: var(--text-3); }
.installer-step.is-pending .installer-step-copy { opacity: 0.62; }
.installer-status { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--status-info-line); border-radius: var(--radius); background: var(--status-info-bg); }
.installer-status strong { display: block; font-size: 12px; color: var(--status-info-ink); }
.installer-status p { margin-top: 2px; font-size: 11.5px; color: var(--text-2); overflow-wrap: anywhere; }
.installer-status.is-done { border-color: var(--status-good-line); background: var(--status-good-bg); }
.installer-status.is-done strong { color: var(--status-good-ink); }
.installer-status.is-error { border-color: var(--status-critical-line); background: var(--status-critical-bg); }
.installer-status.is-error strong { color: var(--status-critical-ink); }
.installer-spinner { flex: none; width: 15px; height: 15px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--status-info-line); border-top-color: var(--accent); animation: installer-spin 0.8s linear infinite; }
.installer-status.is-done .installer-spinner { border-color: var(--status-good); border-top-color: transparent; animation: none; }
.installer-status.is-error .installer-spinner { border-color: var(--status-critical); border-top-color: transparent; animation: none; }
@keyframes installer-spin { to { transform: rotate(360deg); } }
