/* ZSentinel console stylesheet. */

/* ========== tokens ========== */
:root,
:root[data-theme="light"] {
    /* neutrals */
    --n-0: #ffffff;
    --n-25: #fbfcfd;
    --n-50: #f5f7fa;
    --n-100: #eef1f5;
    --n-150: #e6e9ef;
    --n-200: #dadfe6;
    --n-300: #c3c9d3;
    --n-400: #9aa3b1;
    --n-500: #5a6473;
    --n-600: #515b6a;
    --n-700: #3b4350;
    --n-800: #262c36;
    --n-900: #151a22;

    /* brand */
    --b-25: #f5f8ff;
    --b-50: #ecf2ff;
    --b-100: #d9e5ff;
    --b-200: #b7cdff;
    --b-400: #5c8ff5;
    --b-500: #2d6ff0;
    --b-600: #1d5bd6;
    --b-700: #174ab0;
    --b-800: #133b8a;

    /* semantic */
    --ok: #127a52;
    --ok-strong: #0d6142;
    --ok-soft: #e6f5ee;
    --ok-line: #b9e2cf;
    --warn: #9a5800;
    --warn-strong: #7a4500;
    --warn-soft: #fff3df;
    --warn-line: #f3d6a6;
    --bad: #c2321f;
    --bad-strong: #a12716;
    --bad-soft: #fdecea;
    --bad-line: #f4c5be;

    /* navigation surface */
    --canvas: #ececf1;
    --panel-line: #dcdce3;
    --search-line: #c9c9d2;
    --nav-line: #d5d5dd;
    --nav-fg: #3a3a44;
    --nav-fg-strong: #18181f;
    --nav-icon: #5d5d68;
    --nav-heading: #5e5e69;
    --nav-hover: rgba(24, 24, 48, 0.07);
    --nav-active: #d7deec;
    --nav-active-fg: #18181f;
    --nav-count: rgba(24, 24, 48, 0.08);
    --nav-accent: var(--n-700);

    /* roles (kept for page templates) */
    --bg-page: var(--n-50);
    --bg-surface: var(--n-0);
    --bg-card: var(--n-0);
    --bg-subtle: var(--n-25);
    --bg-flyout: var(--n-0);
    --border: var(--n-200);
    --border-soft: var(--n-150);
    --border-strong: var(--n-300);
    --text-primary: var(--n-900);
    --text-secondary: var(--n-600);
    --text-tertiary: var(--n-500);
    --text-muted: var(--n-500);
    --sidebar-fg: var(--nav-fg);
    --sidebar-fg-active: var(--b-600);
    --sidebar-hover: var(--n-100);
    --row-hover: #f7f9fc;
    --scrollbar-track: transparent;
    --tooltip-bg: var(--n-800);
    --accent: var(--b-600);
    --btn-primary: #2c2c35;
    --btn-primary-hover: #17171d;
    --accent-strong: var(--b-700);
    --accent-soft: var(--b-50);
    --focus: 0 0 0 3px rgba(45, 111, 240, 0.28);

    /* type */
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    --fs-xs: 11px;
    --fs-sm: 12.5px;
    --fs-md: 13.5px;
    --fs-lg: 15px;
    --fs-xl: 18px;
    --fs-2xl: 22px;

    /* spacing (4px scale) */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;

    /* shape + depth */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --e1: 0 1px 2px rgba(16, 24, 40, 0.05);
    --e2: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-pop: 0 12px 32px -8px rgba(16, 24, 40, 0.22), 0 4px 8px -4px rgba(16, 24, 40, 0.08);
    --shadow-modal: 0 24px 64px -12px rgba(16, 24, 40, 0.35);

    --nav-w: 264px;
    --nav-w-collapsed: 56px;
    --topbar-h: 52px;
    --content-max: 1920px;
    --gutter: 32px;

    /* Inverted gray scale for templates written with dark-theme utilities. */
    --gray-50-rgb: 21 26 34;
    --gray-100-rgb: 38 44 54;
    --gray-200-rgb: 59 67 80;
    --gray-300-rgb: 81 91 106;
    --gray-400-rgb: 88 98 113;
    --gray-500-rgb: 90 100 115;
    --gray-600-rgb: 154 163 177;
    --gray-700-rgb: 211 216 224;
    --gray-800-rgb: 230 233 239;
    --gray-900-rgb: 255 255 255;
    --gray-950-rgb: 245 247 250;
}

/* ========== base ========== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html.zs-locked { overflow: hidden; }
body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: var(--fs-md);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01", "tnum" 0;
}
a { color: inherit; }
code, pre, kbd, .zs-mono { font-family: var(--mono); }
code { font-size: 0.86em; background: var(--n-100); border: 1px solid var(--border-soft); border-radius: var(--radius-xs); padding: 0.05em 0.35em; color: var(--text-primary); }
pre { color: var(--text-primary); }
kbd {
    display: inline-flex; align-items: center; justify-content: center; min-width: 1.5em; height: 1.55em; padding: 0 0.4em; margin: 0 0.12em;
    font-size: 11px; font-family: var(--font); font-weight: 600; border: 1px solid var(--border); border-bottom-width: 2px;
    border-radius: var(--radius-xs); background: var(--n-0); color: var(--text-secondary); line-height: 1;
}
input, select, textarea, button { font: inherit; color: inherit; }
.hidden { display: none !important; }
::placeholder { color: var(--n-400); opacity: 1; }
:focus-visible { outline: 2px solid var(--b-500); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--n-300); border-radius: 8px; border: 2px solid var(--bg-page); }
::-webkit-scrollbar-thumb:hover { background: var(--n-400); }
* { scrollbar-color: var(--n-300) transparent; scrollbar-width: thin; }

.zs-fade-in { animation: zs-fade 0.18s ease-out; }
@keyframes zs-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ========== shell ========== */
.zs-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: var(--canvas); }
.zs-frame { flex: 1; min-height: 0; display: flex; }
.zs-workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 8px 8px 0; }
.zs-main {
    flex: 1; min-height: 0; min-width: 0; overflow-y: auto; overflow-x: hidden; position: relative; scroll-padding-top: 72px;
    background: var(--n-0); border: 1px solid var(--panel-line); border-radius: 12px;
}
.zs-content { max-width: var(--content-max); margin: 0 auto; padding: 12px var(--gutter) 64px; }
.zs-public-main { min-height: calc(100vh - 56px); }

/* sidebar */
.zs-side {
    position: relative; width: var(--nav-w); flex: none; display: flex; flex-direction: column;
    background: var(--canvas); color: var(--nav-fg); z-index: 30; transition: width 0.15s ease;
}
.zs-side-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.zs-side-scroll::-webkit-scrollbar-thumb { border-color: var(--canvas); }
.zs-side-groups { display: flex; flex-direction: column; gap: 2px; }
.zs-side-line { flex: none; height: 1px; margin: 8px 8px; background: var(--nav-line); }
.zs-side-item {
    position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px;
    border: 0; border-radius: var(--radius); background: none; color: var(--nav-fg); text-decoration: none; text-align: left;
    font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.zs-side-item svg { flex: none; width: 18px; height: 18px; color: var(--nav-icon); }
.zs-side-item:hover, .zs-side-head.flying { background: var(--nav-hover); color: var(--nav-fg-strong); }
.zs-side-item.active { background: var(--nav-active); color: var(--nav-active-fg); font-weight: 600; }
.zs-side-item.active svg { color: var(--nav-active-fg); }
.zs-side-item .sidebar-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.zs-side-item .zs-chev { width: 14px; height: 14px; color: var(--nav-heading); transition: transform 0.15s ease; }
.zs-side-group.open > .zs-side-head .zs-chev { transform: rotate(90deg); }
.zs-side-group.current > .zs-side-head { color: var(--nav-fg-strong); font-weight: 600; }
.zs-side-kbd { margin: 0; background: transparent; border-color: var(--nav-line); color: var(--nav-heading); }
.zs-side-sub { display: none; flex-direction: column; gap: 1px; padding: 2px 0 6px; }
.zs-side-group.open > .zs-side-sub { display: flex; }
.zs-side-sub .zs-nav-link { padding-left: 38px; }
.zs-side-sub .zs-nav-sublist { margin-left: 38px; }
.zs-side-sub .zs-nav-heading { padding-left: 38px; }
.zs-side-foot { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-top: 1px solid var(--nav-line); }
.zs-rail-dot { position: absolute; top: 9px; left: 24px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--canvas); }
.zs-rail-dot.hidden, .zs-side-group.open .zs-rail-dot { display: none; }
.zs-nav-collapsed .zs-side-group.open .zs-rail-dot:not(.hidden) { display: block; }

.sidebar-item, .zs-nav-link {
    position: relative; display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 10px;
    border: 0; border-radius: var(--radius); background: none; color: var(--nav-fg); text-decoration: none;
    font-size: 14px; font-weight: 400; cursor: pointer; white-space: nowrap;
}
.zs-nav-link:hover { background: var(--nav-hover); color: var(--nav-fg-strong); }
.zs-nav-link.active { background: var(--nav-active); color: var(--nav-active-fg); font-weight: 600; }
.zs-nav-link .sidebar-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.zs-nav-link .zs-count-pill { background: var(--bad); color: #fff; }
.zs-nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; color: var(--nav-fg); background: var(--nav-count); font-variant-numeric: tabular-nums; }
.zs-nav-count:empty { display: none; }
.zs-nav-heading { margin: 8px 0 2px; padding: 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--nav-heading); white-space: nowrap; }
.zs-nav-sublist { display: flex; flex-direction: column; gap: 1px; margin: 0 0 2px; }
.zs-nav-sublist:empty { display: none; }
.zs-nav-sublink { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px; border-radius: var(--radius); color: var(--nav-fg); text-decoration: none; font-size: 13.5px; }
.zs-nav-sublink:hover { background: var(--nav-hover); color: var(--nav-fg-strong); }
.zs-nav-subname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-nav-kind { width: 7px; height: 7px; flex: none; border-radius: 2px; background: #94a3b8; }
.zs-nav-kind-ssh { background: #94a3b8; }
.zs-nav-kind-kube { background: #326ce5; }
.zs-nav-kind-app { background: #6366f1; }
.zs-nav-kind-aws { background: #ff9900; }

.sidebar-version { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 10px; border-radius: var(--radius); font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--nav-heading); text-decoration: none; }
.zs-version-text { min-width: 0; overflow-wrap: anywhere; }
.sidebar-version:hover { color: var(--nav-fg-strong); background: var(--nav-hover); }
#sidebar-version-build { opacity: 0.8; }
.zs-version-dot { width: 7px; height: 7px; flex: none; margin: 0 5px; border-radius: 50%; background: var(--nav-heading); }
.sidebar-version[data-state="ok"] .zs-version-dot { background: #34c38f; box-shadow: 0 0 0 3px rgba(52, 195, 143, 0.15); }
.sidebar-version[data-state="warn"] .zs-version-dot { background: #f5a524; box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.18); }
.sidebar-version[data-state="down"] .zs-version-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }

/* hover card for a closed group, or any group on the icon rail */
.zs-side-fly {
    position: absolute; left: calc(100% - 4px); top: 0; z-index: 40; min-width: 220px; max-width: 280px; padding: 6px;
    background: var(--n-0); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop);
}
.zs-side-fly-title { padding: 6px 10px 4px; font-size: 12px; font-weight: 650; color: var(--nav-heading); }
.zs-side-fly-body { display: flex; flex-direction: column; gap: 1px; }
.zs-side-fly-body .zs-nav-link { padding-left: 10px; }
.zs-side-fly-body .zs-nav-heading { padding-left: 10px; }
.zs-side-fly-body .zs-nav-link.active { background: var(--nav-active); }

.zs-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; color: var(--text-primary); min-width: 0; }
.zs-brand-inverse { color: var(--nav-fg-strong); }
.zs-brand-mark { width: 28px; height: 28px; flex: none; object-fit: contain; display: block; }
.zs-brand-text { white-space: nowrap; }
.zs-search-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 8px; border: 1px solid var(--nav-line); border-radius: var(--radius-sm); background: var(--n-0); color: var(--nav-fg); cursor: pointer; }
.zs-search-chip:hover { border-color: var(--n-300); color: var(--nav-fg-strong); }
.zs-search-chip .zs-ico { width: 15px; height: 15px; }
.zs-nav-kbd { background: transparent; border-color: var(--nav-line); color: var(--nav-heading); }

/* page finder (sidebar) */
.flyout-panel { display: flex; }
.zs-nav-find { margin: 4px 0; padding: 10px; border: 1px solid var(--nav-line); border-radius: var(--radius); background: var(--n-0); display: flex; flex-direction: column; gap: 6px; }
.zs-nav-find .zs-input { background: var(--n-0); border-color: var(--nav-line); color: var(--nav-fg-strong); }
.flyout-content.hidden { display: none; }
.flyout-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 650; color: var(--nav-fg-strong); }
.flyout-pin { display: inline-flex; border: 0; background: none; padding: 2px; border-radius: var(--radius-xs); color: var(--nav-heading); cursor: pointer; }
.flyout-pin:hover { color: var(--nav-fg-strong); background: var(--nav-hover); }
.flyout-group { margin: 4px 2px 0; font-size: 10.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nav-heading); }
.flyout-list { display: flex; flex-direction: column; gap: 1px; }
.flyout-link { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--nav-fg); }
.flyout-link:hover, .flyout-link:focus-visible { background: var(--nav-hover); color: var(--nav-fg-strong); }
.flyout-link-stack { flex-direction: column; align-items: flex-start; gap: 0; }
.flyout-link-stack small { font-size: 11px; color: var(--nav-heading); }
.zs-nav-find .zs-empty-note { color: var(--nav-heading); }

/* collapsed: icon rail; groups open as hover cards */
.zs-nav-collapsed .zs-side { width: var(--nav-w-collapsed); }
.zs-nav-collapsed .zs-side-scroll { padding: 4px 8px 8px; }
.zs-nav-collapsed .zs-side-item { justify-content: center; padding: 0; min-height: 38px; }
.zs-nav-collapsed .zs-side-item .sidebar-label,
.zs-nav-collapsed .zs-side-item .zs-chev,
.zs-nav-collapsed .zs-side-item .zs-nav-count,
.zs-nav-collapsed .zs-side-kbd,
.zs-nav-collapsed .zs-side-sub,
.zs-nav-collapsed .zs-version-text,
.zs-nav-collapsed .zs-nav-find { display: none !important; }
.zs-nav-collapsed .sidebar-version { justify-content: center; padding: 10px 0; }
.zs-nav-collapsed .zs-side-group.current > .zs-side-head { background: var(--nav-active); }
.zs-nav-collapsed .zs-side-line { margin: 6px 4px; }
.zs-nav-collapsed #zs-nav-pin svg { transform: scaleX(-1); }
.zs-nav-collapsed .zs-side-item[data-tip]:hover::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); z-index: 45;
    padding: 4px 8px; border-radius: var(--radius-sm); background: var(--tooltip-bg); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none;
}
.zs-nav-collapsed .zs-side-head[data-tip]:hover::after { display: none; }

/* top bar */
.zs-topbar {
    flex: none; display: flex; align-items: center; gap: 16px;
    height: var(--topbar-h); padding: 0 12px 0 0; background: var(--canvas); z-index: 20;
}
.zs-topbar-public { height: 56px; padding: 0 24px; position: sticky; top: 0; justify-content: space-between; background: var(--bg-page); border-bottom: 1px solid var(--border-soft); }
.zs-topbar-lead { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
.zs-topbar-brand { flex: none; height: var(--topbar-h); padding: 0 16px 0 18px; }
.zs-topbar-brand .zs-brand-mark { width: 26px; height: 26px; }
.zs-topbar-tools { flex: 1 1 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.zs-topbar-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--nav-line); }
.zs-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: var(--content-max); margin: 0 auto; padding: 14px var(--gutter) 0; font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; }
.zs-crumbs:empty { display: none; }
.zs-crumbs a { color: var(--text-secondary); text-decoration: none; }
.zs-crumbs a:hover { color: var(--text-primary); text-decoration: underline; }
.zs-crumb-sep { color: var(--n-500); }
.zs-crumb-cur { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.zs-topsearch { flex: 0 1 480px; min-width: 200px; }
.zs-shell:has(#res-search) .zs-topsearch { visibility: hidden; }
.zs-topsearch form {
    display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px;
    border: 1px solid var(--search-line); border-radius: var(--radius); background: var(--n-0); color: var(--n-500);
    transition: border-color 0.12s, box-shadow 0.12s;
}
.zs-topsearch form:hover { border-color: var(--n-400); }
.zs-topsearch form:focus-within { border-color: var(--b-500); box-shadow: var(--focus); }
.zs-topsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--text-primary); font-size: 14px; }
.zs-topsearch-kbd { border: 0; background: none; padding: 0; cursor: pointer; }
.zs-topbar-tools .zs-icon-btn-bordered { background: var(--n-0); }
.zs-topbar-tools .zs-btn { margin-right: 6px; }

/* user menu */
.zs-user-btn { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 6px 0 3px; border: 1px solid transparent; border-radius: var(--radius); background: none; cursor: pointer; color: var(--nav-fg); }
.zs-user-btn:hover, .zs-user-btn[aria-expanded="true"] { background: var(--nav-hover); }
.zs-avatar {
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--b-100); color: var(--b-800); box-shadow: inset 0 0 0 1px rgba(19, 59, 138, 0.12); font-weight: 650; font-size: 13px; text-transform: uppercase;
}
.zs-avatar-lg { width: 40px; height: 40px; font-size: 15px; }
.zs-user-card { display: flex; gap: 12px; align-items: flex-start; padding: 10px 10px 12px; margin: -2px -2px 4px; border-bottom: 1px solid var(--border-soft); min-width: 280px; }
.zs-user-card-text { min-width: 0; }
.zs-user-name { font-weight: 650; }
.zs-user-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; }
.zs-mfa-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--n-0); }
.zs-mfa-dot.zs-tone-ok { background: #1fa971; }
.zs-mfa-dot.zs-tone-warn { background: #e09a1a; }
.zs-mfa-dot.zs-tone-off { background: var(--n-400); }
.zs-hide-sm { }
@media (max-width: 1100px) { .zs-hide-sm { display: none !important; } }

/* ========== icons ========== */
.zs-ico { width: 20px; height: 20px; flex: none; }
.zs-ico-sm { width: 16px; height: 16px; flex: none; }
.zs-ico-xs { width: 12px; height: 12px; flex: none; }
.zs-ico-lg { width: 48px; height: 48px; color: var(--ok); }

/* ========== popovers and menus ========== */
.zs-layer { position: fixed; inset: 0 auto auto 0; width: 0; height: 0; z-index: 75; }
.zs-pop-anchor { position: relative; display: inline-flex; }
.zs-popover {
    position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px;
    padding: 4px; background: var(--n-0); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-pop); z-index: 40; overflow-y: auto; color: var(--text-primary); text-align: left;
}
.zs-popover.zs-floating { position: fixed; top: 0; left: 0; right: auto; bottom: auto; margin: 0; animation: zs-pop-in 0.12s ease-out; }
@keyframes zs-pop-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.zs-popover.zs-floating[data-side="top"] { animation-name: zs-pop-in-up; }
@keyframes zs-pop-in-up { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.zs-popover-right { left: auto; right: 0; }
.zs-popover-wide { right: 0; left: auto; width: 360px; padding: 0; }
.zs-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
.zs-popover-title { font-weight: 650; font-size: 13px; }
.zs-popover-foot { display: block; padding: 10px 12px; border-top: 1px solid var(--border-soft); color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 550; }
.zs-popover-foot:hover { background: var(--row-hover); }
.zs-popover-inline { margin-top: 8px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--n-0); }
.zs-menu-panel { display: flex; flex-direction: column; gap: 8px; padding: 12px; min-width: 260px; }
.zs-menu-label { padding: 6px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.zs-menu-sep { height: 1px; margin: 4px 0; background: var(--border-soft); }
.zs-menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: var(--radius-sm); background: none;
    text-align: left; text-decoration: none; color: var(--text-primary); cursor: pointer; white-space: nowrap; font-size: 13px;
}
.zs-menu-item svg { color: var(--text-muted); }
.zs-menu-item:hover, .zs-menu-item:focus-visible { background: var(--n-100); outline: none; }
.zs-menu-item .zs-menu-sub { margin-left: auto; padding-left: 16px; font-size: 11.5px; color: var(--text-muted); font-family: var(--mono); }
.zs-menu-danger, .zs-menu-danger svg { color: var(--bad); }
.zs-menu-item[aria-disabled="true"] { color: var(--text-muted); cursor: default; background: none; }
.menu { min-width: 220px; max-height: 320px; overflow-y: auto; right: 0; left: auto; }

/* cluster picker */
.zs-cpick { display: inline-flex; min-width: 0; }
.zs-cpick-btn { max-width: 340px; min-width: 0; }
.zs-cpick-btn > svg { color: var(--text-muted); }
.zs-cpick-label { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.zs-cpick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.zs-cpick-btn[aria-expanded="true"] .zs-cpick-chev { transform: rotate(180deg); }
.zs-cpick-menu { display: flex; flex-direction: column; padding: 0; min-width: 280px; max-width: calc(100vw - 16px); overflow: hidden; }
.zs-cpick-search { padding: 8px; border-bottom: 1px solid var(--border-soft); }
.zs-cpick-search .zs-search-field { height: 32px; box-shadow: none; }
.zs-cpick-search input { font-size: 13px; }
.zs-cpick-list { flex: 1 1 auto; min-height: 0; max-height: 320px; margin: 0; padding: 4px; list-style: none; overflow-y: auto; }
.zs-cpick-opt { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 10px; border-radius: var(--radius-sm); font-size: 13px; cursor: pointer; }
.zs-cpick-opt.zs-active { background: var(--n-100); }
.zs-cpick-opt[aria-disabled="true"] { color: var(--text-muted); cursor: not-allowed; }
.zs-cpick-opt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.zs-cpick-opt[aria-selected="true"] .zs-cpick-opt-name { font-weight: 600; }
.zs-cpick-check { width: 16px; height: 16px; flex: none; color: var(--accent); visibility: hidden; }
.zs-cpick-opt[aria-selected="true"] .zs-cpick-check { visibility: visible; }
.zs-cpick-state { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding-left: 12px; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.zs-cpick-empty { padding: 12px; font-size: 13px; color: var(--text-muted); }
@media (max-width: 640px) {
    .zs-cpick-label { display: none; }
    .zs-cpick-btn { max-width: 220px; }
}

.zs-notif-list { max-height: 360px; overflow-y: auto; }
.notif-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 12px; text-decoration: none; border-bottom: 1px solid var(--border-soft); }
.notif-row:hover { background: var(--row-hover); }
.notif-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-when { font-size: 12px; color: var(--text-muted); grid-row: 1; grid-column: 2; }
.notif-what { grid-column: 1 / -1; font-size: 12px; color: var(--text-secondary); }
.zs-alert-banner { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--border-soft); background: var(--n-100); font-size: 13px; }
.zs-alert-banner.hidden { display: none; }
.zs-alert-banner.zs-alert-medium { background: var(--warn-soft); }
.zs-alert-banner.zs-alert-high { background: var(--bad-soft); }
.zs-alert-msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ========== buttons ========== */
.zs-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: var(--radius); border: 1px solid transparent;
    font-size: 13.5px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
    white-space: nowrap; transition: background-color 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.zs-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.zs-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.zs-btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: var(--radius-sm); }
.zs-btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: var(--radius-sm); }
:root .zs-btn-primary { background: var(--btn-primary); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, var(--e1); }
:root .zs-btn-primary:hover:not(:disabled) { background: var(--btn-primary-hover); }
:root .zs-btn-ok { background: var(--ok); color: #fff; }
:root .zs-btn-ok:hover:not(:disabled) { background: var(--ok-strong); }
:root .zs-btn-danger { background: var(--bad); color: #fff; }
:root .zs-btn-danger:hover:not(:disabled) { background: var(--bad-strong); }
.zs-btn-outline { background: var(--n-0); border-color: var(--border); color: var(--text-primary); box-shadow: var(--e1); }
.zs-btn-outline:hover:not(:disabled) { border-color: var(--border-strong); background: var(--n-50); }
.zs-btn-outline[aria-expanded="true"] { border-color: var(--b-400); background: var(--b-25); }
.zs-btn-outline-danger { background: var(--n-0); border-color: var(--bad-line); color: var(--bad); }
.zs-btn-outline-danger:hover:not(:disabled) { background: var(--bad-soft); }
.zs-btn-quiet { background: transparent; color: var(--text-secondary); }
.zs-btn-quiet:hover:not(:disabled) { background: var(--n-100); color: var(--text-primary); }
.zs-btn-soft { background: var(--b-50); color: var(--b-700); }
.zs-btn-soft:hover:not(:disabled) { background: var(--b-100); }
.zs-btn .zs-caret { width: 12px; height: 12px; margin-right: -3px; opacity: 0.7; }
.zs-icon-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: var(--radius);
    background: none; color: var(--text-secondary); cursor: pointer;
}
.zs-icon-btn:hover, .zs-icon-btn[aria-expanded="true"] { background: var(--n-100); color: var(--text-primary); }
.zs-icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.zs-icon-btn-bordered { border-color: var(--border); background: var(--n-0); width: 32px; height: 32px; box-shadow: var(--e1); }
.zs-link { color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; font-weight: 550; }
.zs-link:hover { text-decoration: underline; }
.zs-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 12.5px; font-weight: 550; color: var(--text-muted); text-decoration: none; }
.zs-back:hover { color: var(--accent); }

/* segmented control */
.zs-seg { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--n-100); gap: 2px; }
.zs-seg > button {
    display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 0; border-radius: var(--radius-sm);
    background: none; color: var(--text-secondary); font-size: 12.5px; font-weight: 550; cursor: pointer;
}
.zs-seg > button:hover { color: var(--text-primary); }
.zs-seg > button.active { background: var(--n-0); color: var(--text-primary); box-shadow: var(--e2); }
.zs-seg > .zs-tab { height: 26px; margin: 0; border: 0; border-radius: var(--radius-sm); padding: 0 10px; font-size: 12.5px; }
.zs-seg > .zs-tab.active { color: var(--text-primary); border: 0; }

/* tabs */
.zs-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.zs-tabs-inline { margin-bottom: 0; border-bottom: 0; }
.zs-tab {
    display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; margin-bottom: -1px;
    border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-secondary);
    font-weight: 550; cursor: pointer; text-decoration: none;
}
.zs-tab:hover { color: var(--text-primary); }
.zs-tab.active { color: var(--b-700); border-bottom-color: var(--b-600); font-weight: 600; }
.zs-tabs-inline .zs-tab { margin-bottom: 0; border-radius: var(--radius-sm); border-bottom: 0; height: 30px; }
.zs-tabs-inline .zs-tab.active { background: var(--b-50); }

/* switch */
.zs-switch {
    position: relative; flex: none; width: 32px; height: 18px; padding: 0; border: 0; border-radius: 999px;
    background: var(--n-300); cursor: pointer; transition: background-color 0.15s;
}
.zs-switch:focus-visible { outline: none; box-shadow: var(--focus); }
.zs-switch.on { background: var(--b-600); }
.zs-switch-thumb {
    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.25); transition: transform 0.15s;
}
.zs-switch.on .zs-switch-thumb { transform: translateX(14px); }
.zs-switch-text { cursor: pointer; user-select: none; color: var(--text-secondary); font-size: 13px; }

/* badges, chips, pills */
.zs-count-dot {
    position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 3px;
    border-radius: 999px; background: var(--bad); color: #fff; font-size: 9.5px; font-weight: 700;
    line-height: 15px; text-align: center; box-shadow: 0 0 0 2px var(--n-0);
}
.zs-count-pill {
    display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--b-50); color: var(--b-700); font-size: 11px; font-weight: 700;
}
.zs-chip {
    display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--n-50); color: var(--text-secondary);
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.zs-chip-accent { background: var(--b-50); border-color: var(--b-100); color: var(--b-700); }
.zs-chip-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.zs-tone-ok.zs-chip { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.zs-tone-warn.zs-chip { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.zs-tone-off.zs-chip { color: var(--text-muted); }
.zs-tone-bad.zs-chip { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.zs-state-pending { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.zs-state-approved { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.zs-state-denied, .zs-state-revoked { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.zs-chip.zs-state-pending::before, .zs-chip.zs-state-approved::before, .zs-chip.zs-state-denied::before, .zs-chip.zs-state-revoked::before,
.zs-status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.zs-status-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--n-100); color: var(--text-secondary); }
.zs-status-pill.is-online { background: var(--ok-soft); color: var(--ok); }
.zs-status-pill.is-offline { background: var(--n-100); color: var(--n-500); }
.zs-status-pill.is-request { background: var(--warn-soft); color: var(--warn); }
.zs-dot-accent { width: 7px; height: 7px; border-radius: 50%; background: var(--b-500); }
.zs-dot-accent.hidden { display: none; }

.zs-kind-tag {
    display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--radius-xs);
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: var(--n-100); color: var(--text-secondary); white-space: nowrap;
}
.zs-kind-tag.zs-kind-ssh, .zs-res-icon.zs-kind-ssh { background: #e8f0fd; color: #1d56b8; }
.zs-kind-tag.zs-kind-kube, .zs-res-icon.zs-kind-kube { background: #eeebfd; color: #4f3fc4; }
.zs-kind-tag.zs-kind-app, .zs-res-icon.zs-kind-app { background: #e3f5f1; color: #0f7262; }
.zs-kind-tag.zs-kind-aws, .zs-res-icon.zs-kind-aws { background: #fdf1e2; color: #94500a; }
.zs-kind-tag.zs-kind-desktop { background: #e6f2fb; color: #0b5f8a; }
.zs-kind-tag.zs-kind-user { background: #f2eefc; color: #6a3fb5; }
.zs-kind-tag.zs-kind-role { background: #fbeef3; color: #a63462; }
.zs-kind-tag.zs-kind-page { background: var(--n-100); color: var(--n-600); }
.zs-kind-tag.zs-kind-search { background: var(--b-50); color: var(--b-700); }

/* access-request chips */
.ar-chip {
    display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 24px; padding: 0 7px 0 3px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--n-0); font-size: 12px;
}
.ar-chip-tag { padding: 1px 5px; border-radius: var(--radius-xs); background: var(--n-100); color: var(--text-secondary); font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; }
.ar-chip-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-chip-sep { color: var(--text-muted); }
.ar-chip-detail { color: var(--text-secondary); font-family: var(--mono); font-size: 11px; }
.ar-chip-role .ar-chip-tag { background: #fbeef3; color: #a63462; }
.ar-chip-ssh .ar-chip-tag { background: #e8f0fd; color: #1d56b8; }
.ar-chip-aws .ar-chip-tag { background: #fdf1e2; color: #94500a; }
.ar-chip-kube .ar-chip-tag { background: #eeebfd; color: #4f3fc4; }
.ar-chip-app .ar-chip-tag { background: #e3f5f1; color: #0f7262; }

/* ========== page furniture ========== */
.zs-page { max-width: none; padding: 0; }
.zs-page-narrow { max-width: 960px; }
.zs-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.zs-page-head > div:first-child { min-width: 0; }
.zs-eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.zs-eyebrow a { color: var(--text-muted); text-decoration: none; }
.zs-eyebrow a:hover { color: var(--accent); }
.zs-h1 { margin: 0; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); line-height: 1.2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zs-h1-count { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--n-100); color: var(--text-secondary); font-size: 12px; font-weight: 650; letter-spacing: 0; }
.zs-h1-count:empty { display: none; }
.zs-h2 { margin: 0 0 6px; font-size: var(--fs-lg); font-weight: 650; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.zs-sub { margin: 6px 0 0; color: var(--text-secondary); max-width: 80ch; }
.zs-muted { color: var(--text-muted); }
.zs-small { font-size: var(--fs-sm); }
.zs-strong { font-weight: 650; color: var(--text-primary); }
.zs-right { text-align: right; }
.zs-nowrap { white-space: nowrap; }
.zs-clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.zs-break { word-break: break-all; }
.zs-grow { flex: 1; }
.zs-row { display: flex; align-items: center; gap: 8px; }
.zs-wrap { flex-wrap: wrap; }
.zs-between { justify-content: space-between; }
.zs-end { justify-content: flex-end; }
.zs-stack { display: flex; flex-direction: column; gap: 10px; }
.zs-stack-sm { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.zs-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.card, .zs-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--e1);
}
.card { padding: 20px; }
.card-hover { transition: border-color 0.15s, box-shadow 0.15s; }
.card-hover:hover { border-color: var(--b-200); box-shadow: var(--e2); }
.zs-card + .zs-card, .zs-card + section, section + .zs-card { margin-top: 16px; }
.zs-card-pad { padding: 20px 22px; }
.zs-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); }
.zs-card-title { margin: 0; font-size: 14px; font-weight: 650; }
.page-header { margin-bottom: 20px; }
.page-header h2 { margin: 0; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
.page-header p { margin: 6px 0 0; color: var(--text-secondary); }

.zs-empty { padding: 48px 24px; text-align: center; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.zs-empty .zs-strong { font-size: 15px; }
.zs-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 12px; background: var(--n-100); color: var(--n-500); }
.zs-empty-icon svg { width: 24px; height: 24px; }
.zs-empty.zs-card { flex-direction: column; }
#ar-loading.zs-empty { flex-direction: row; justify-content: center; }
.zs-empty-note { padding: 16px 12px; text-align: center; color: var(--text-muted); font-size: 13px; }
.zs-status { padding: 16px; text-align: center; color: var(--text-muted); font-size: 12.5px; }

.zs-note { margin: 12px 0; padding: 10px 14px; border-radius: var(--radius); border: 1px solid; font-size: 13px; }
.zs-note p { margin: 0 0 6px; }
.zs-note-error { background: var(--bad-soft); border-color: var(--bad-line); color: #8a1f12; }
.zs-note-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-strong); }
.zs-note-info { background: var(--b-50); border-color: var(--b-100); color: var(--b-800); }
.zs-note-ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok-strong); }

.zs-spinner {
    display: inline-block; width: 18px; height: 18px; flex: none; border-radius: 50%;
    border: 2px solid var(--border); border-top-color: var(--b-600); animation: zs-spin 0.8s linear infinite;
}
@keyframes zs-spin { to { transform: rotate(360deg); } }

/* skeletons */
.zs-skel { position: relative; overflow: hidden; background: var(--n-100); border-radius: var(--radius-sm); }
.zs-skel::after, .zs-skel-list span::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent); animation: zs-shimmer 1.3s infinite; }
@keyframes zs-shimmer { to { transform: translateX(100%); } }
.zs-skel-list { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.zs-skel-list span { position: relative; overflow: hidden; display: block; height: 34px; border-radius: var(--radius-sm); background: var(--n-100); }
.zs-skel-card { height: 76px; justify-content: center; gap: 8px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); background: var(--n-0); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.zs-skel-card .zs-skel:nth-child(1) { width: 60%; height: 14px; }
.zs-skel-card .zs-skel:nth-child(2) { width: 40%; height: 10px; }
.zs-skel-card .zs-skel:nth-child(3) { display: none; }

.zs-code { display: block; margin: 6px 0 0; padding: 8px 10px; background: var(--n-50); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.zs-keys { margin-top: 8px; font-size: 11.5px; color: var(--text-muted); }
.zs-info { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--b-50); color: var(--b-700); font-size: 10px; font-weight: 700; cursor: help; }

/* code block */
html[data-theme="light"] pre.zs-codeblock, .zs-codeblock { margin: 0; min-height: 260px; padding: 14px 16px; border-radius: var(--radius); background: var(--n-0); border: 1px solid var(--border-soft); color: var(--text-primary); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; overflow: auto; white-space: pre; }

/* yaml editor */
.zs-editor { border: 1px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden; background: var(--n-0); box-shadow: var(--e1); }
.zs-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 42px; padding: 0 12px 0 16px; background: var(--n-25); border-bottom: 1px solid var(--border-soft); color: var(--text-secondary); }
.zs-editor-head .zs-btn-quiet { color: var(--text-secondary); }
.zs-editor-head .zs-btn-quiet:hover { background: var(--n-100); color: var(--text-primary); }
.zs-editor-mode { height: 20px; padding: 0 8px; border-radius: 999px; background: var(--n-100); color: var(--text-muted); font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; display: inline-flex; align-items: center; }
.zs-editor-mode.is-editing { background: var(--warn-soft); color: var(--warn); }
html[data-theme="light"] .zs-editor-area, .zs-editor-area { display: block; width: 100%; padding: 14px 16px; border: 0; outline: none; resize: vertical; background: transparent; color: var(--text-primary); font-family: var(--mono); font-size: 12.5px; line-height: 1.65; tab-size: 2; }
.zs-editor-area[readonly] { color: var(--text-secondary); }


/* audit query */
.zs-query-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .zs-query-layout { grid-template-columns: 1fr; } }
.zs-query-side { margin: 0 !important; overflow: hidden; position: sticky; top: 0; }
.zs-query-list { max-height: calc(100vh - 260px); overflow-y: auto; padding: 6px; }
.zs-query-group { padding: 10px 8px 4px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.zs-query-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 4px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.zs-query-row:hover { background: var(--n-100); }
.zs-query-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-schema { padding: 12px 16px; border-top: 1px solid var(--border-soft); background: var(--n-25); color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.zs-schema p { margin: 0 0 6px; }

.zs-results td { font-size: 12px; }

/* event icons, pager */
.zs-ev-ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--n-100); color: var(--n-500); }
.zs-ev-ico.is-warn { background: var(--warn-soft); color: var(--warn); }
.zs-ev-ico.is-cert { background: var(--b-50); color: var(--b-700); }
.zs-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.zs-pager b { color: var(--text-primary); }
.zs-icon-btn.is-disabled { opacity: 0.4; cursor: default; box-shadow: none; }

/* ========== forms ========== */
.zs-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.zs-label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.zs-input {
    width: 100%; min-height: 36px; padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--n-0); color: var(--text-primary); outline: none; box-shadow: var(--e1);
    transition: border-color 0.12s, box-shadow 0.12s;
}
select.zs-input { padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%236c7686' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.zs-input:hover { border-color: var(--border-strong); }
.zs-input:focus { border-color: var(--b-500); box-shadow: var(--focus); }
.zs-input-sm { min-height: 30px; padding: 4px 9px; font-size: 12.5px; border-radius: var(--radius-sm); }
select.zs-input-sm { padding-right: 28px; }
.zs-input-num { width: 120px; }
.zs-input-code { width: 140px; letter-spacing: 0.18em; }
.zs-select-auto { width: auto; }
.zs-inline-form { display: flex; align-items: center; gap: 8px; }
.zs-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.zs-form-row .zs-field { margin-top: 0; }
.zs-check, .zs-radio { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.zs-check input, .zs-radio input, input[type="checkbox"], input[type="radio"] { accent-color: var(--b-600); }
.zs-radio-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.zs-err { font-size: 12px; color: var(--bad); }
.zs-option-list { margin-top: 6px; max-height: 200px; overflow-y: auto; }

/* ========== tables ========== */
.zs-table-wrap { overflow-x: auto; }
.zs-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.zs-table th {
    position: sticky; top: 0; z-index: 1;
    height: 38px; padding: 0 16px; text-align: left; font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--text-muted); background: var(--n-25); border-bottom: 1px solid var(--border-soft); white-space: nowrap;
}
.zs-table td { height: 48px; padding: 8px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.zs-table tbody tr:last-child td { border-bottom: 0; }
.zs-table tbody tr { transition: background-color 0.08s; }
.zs-table tbody tr:hover td { background: var(--row-hover); }
.zs-table-tight th, .zs-table-tight td { padding: 6px 10px; height: auto; }
.zs-col-check { width: 40px; }
.zs-table th.zs-right { text-align: right; }
.zs-th-sort { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.zs-th-sort:hover { color: var(--text-primary); }
.zs-th-sort svg { width: 12px; height: 12px; opacity: 0.35; }
.zs-th-sort[aria-sort] svg { opacity: 1; color: var(--b-600); }
.zs-table .zs-row-actions { opacity: 0.55; transition: opacity 0.1s; }
/* Row actions stay on one line; their column shrinks to fit and the other
   columns give up the space when the sidebar is open. */
.zs-table .zs-actions { flex-wrap: nowrap; }
.zs-table td:has(> .zs-actions) { width: 1%; white-space: nowrap; }
.zs-table tr:hover .zs-row-actions, .zs-table tr:focus-within .zs-row-actions { opacity: 1; }

/* ========== overlays ========== */
.zs-overlay {
    position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(14, 23, 38, 0.45); backdrop-filter: blur(2px); animation: zs-fade 0.14s ease-out;
}
.zs-overlay.hidden { display: none; }
/* A scrim never shows without the dialog it belongs to. */
.zs-overlay:not(:has([role="dialog"])) { display: none; }
.zs-overlay-top { align-items: flex-start; padding-top: 12vh; }
.zs-modal {
    width: 100%; max-width: 540px; max-height: calc(100vh - 32px); overflow-y: auto;
    padding: 24px; background: var(--n-0); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal);
    border: 1px solid var(--border-soft);
}
.zs-modal-sm { max-width: 420px; }
.zs-modal-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); }
.zs-modal-text { margin: 0 0 10px; color: var(--text-secondary); }
.zs-modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 22px -24px -24px; padding: 14px 24px; border-top: 1px solid var(--border-soft); background: var(--n-25); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.zs-modal-actions .zs-link { margin-right: auto; }
.zs-step-label { margin: 0 0 4px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

.zs-floatbar {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 45;
    display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px;
    background: var(--n-800); color: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
}
.zs-floatbar.hidden { display: none; }
.zs-floatbar .zs-btn-quiet { color: #d5dbe8; }
.zs-floatbar .zs-btn-quiet:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.zs-toasts { position: fixed; top: 16px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.zs-toast { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--radius); box-shadow: var(--shadow-pop); font-size: 13px; border: 1px solid; border-left-width: 4px; background: var(--n-0); color: var(--text-primary); }
.zs-toast-success { border-color: var(--ok-line); border-left-color: var(--ok); }
.zs-toast-error { border-color: var(--bad-line); border-left-color: var(--bad); }
.zs-toast-info { border-color: var(--border); border-left-color: var(--b-500); }

/* quick find */
.zs-search-dialog { display: none; }
.zs-palette { width: min(640px, 100%); background: var(--n-0); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); overflow: hidden; border: 1px solid var(--border-soft); }
.zs-palette-head { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--border-soft); color: var(--n-500); }
.zs-palette-input { flex: 1; height: 52px; border: 0; outline: none; font-size: 15px; background: none; color: var(--text-primary); }
.zs-palette-results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.zs-palette-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.palette-row { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 10px; border-radius: var(--radius-sm); text-decoration: none; }
.palette-row .zs-kind-tag { min-width: 84px; justify-content: center; }
.palette-row.active { background: var(--b-50); box-shadow: inset 2px 0 0 var(--b-600); }
.palette-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-sub { margin-left: auto; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.zs-palette-foot { display: flex; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--border-soft); font-size: 11.5px; color: var(--text-muted); background: var(--n-25); }

/* ========== shared component classes ========== */
.pill {
    display: inline-flex; align-items: center; gap: 3px; max-width: 100%; height: 22px; padding: 0 8px;
    border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--n-50);
    color: var(--text-secondary); font-size: 11.5px; line-height: 1; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; font-family: var(--font);
}
.pill b, .pill .pill-k { color: var(--text-muted); font-weight: 500; }
button.pill { cursor: pointer; }
button.pill:hover { border-color: var(--b-200); background: var(--b-25); color: var(--b-700); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; vertical-align: middle; }
.status-dot-online { background: #1fa971; box-shadow: 0 0 0 3px rgba(31, 169, 113, 0.16); }
.status-dot-offline { background: var(--n-300); }
.status-dot-unknown { background: #e0a43a; }

/* ========== resources ========== */
.zs-filterbar {
    position: sticky; top: 0; z-index: 12; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 12px var(--gutter);
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid transparent;
}
.zs-filterbar.is-stuck { border-bottom-color: var(--border-soft); box-shadow: 0 6px 12px -10px rgba(16, 24, 40, 0.25); }
.zs-filterbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.zs-search-bar { display: flex; align-items: center; gap: 8px; flex: 1 1 420px; min-width: 280px; }
.zs-search-field {
    flex: 1; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 12px;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--n-0); color: var(--n-500); box-shadow: var(--e1);
}
.zs-search-field:hover { border-color: var(--border-strong); }
.zs-search-field:focus-within { border-color: var(--b-500); box-shadow: var(--focus); }
.zs-search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--text-primary); }
.zs-adv { position: relative; display: flex; align-items: center; gap: 6px; padding-left: 8px; margin-left: 4px; border-left: 1px solid var(--border-soft); height: 22px; }
.zs-adv .zs-icon-btn { width: 26px; height: 26px; }
.zs-help { width: 400px; padding: 14px 16px; }
.zs-help p { margin: 0 0 6px; }
.zs-help-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 8px 0 12px; font-size: 12.5px; }
.zs-help-grid dt { color: var(--text-muted); }
.zs-help-grid dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.res-query-example { width: 100%; padding: 5px 8px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--n-50); font-family: var(--mono); font-size: 12px; cursor: pointer; text-align: left; }
.res-query-example:hover { border-color: var(--b-400); background: var(--b-25); }
.zs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.zs-filterbar .zs-toolbar { margin: 0; }
.zs-toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.res-view-btn { padding: 0 8px !important; }
.zs-filter-btn { gap: 6px; }
.zs-filter-btn .zs-filter-value { color: var(--b-700); font-weight: 650; }
.zs-sort { display: inline-flex; align-items: center; gap: 4px; }
.zs-sort-label { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.zs-active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.zs-active-filters:empty { display: none; }
.zs-filter-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--b-50); border: 1px solid var(--b-100); color: var(--b-800); font-size: 12px; font-weight: 550; }
.zs-filter-chip button { display: inline-flex; border: 0; background: none; padding: 3px; border-radius: 50%; color: var(--b-700); cursor: pointer; }
.zs-filter-chip button:hover { background: var(--b-100); }

.zs-res-page { max-width: 1680px; margin: 0 auto; }
#res-content, .zs-recent { container-type: inline-size; }
.zs-res-grid, .zs-tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@container (max-width: 1099px) { .zs-tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 639px) { .zs-tile-grid { grid-template-columns: minmax(0, 1fr); } }
.zs-res-grid.hidden { display: none; }
.res-card {
    position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-content: start; align-items: center; column-gap: 12px; row-gap: 8px;
    padding: 12px 10px 12px 14px; min-width: 0;
    background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); box-shadow: var(--e1);
    transition: border-color 0.12s, box-shadow 0.12s;
}
.res-card:hover { border-color: var(--n-300); box-shadow: var(--e2); }
.res-card:has(.sel-check:checked) { border-color: var(--b-400); box-shadow: 0 0 0 1px var(--b-400); }
.zs-res-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.zs-res-line1, .zs-res-line2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.zs-res-line1 .zs-res-name { flex: 0 1 auto; min-width: 0; }
.res-card .zs-res-line1 { flex-wrap: wrap; row-gap: 2px; }
.res-card .zs-res-line1 .zs-res-name { min-width: min(100%, 12ch); }
.zs-res-line1 .zs-status-pill { flex: none; height: 18px; font-size: 11px; padding: 0 7px; }
.zs-res-line2 { gap: 6px; font-size: 12px; color: var(--text-muted); }
.zs-res-kind { flex: none; font-weight: 600; color: var(--text-secondary); }
.zs-res-kind::after { content: "·"; margin-left: 6px; color: var(--n-300); font-weight: 400; }
.zs-res-line2 .zs-res-sub { flex: 0 1 auto; min-width: 0; }
.res-card .zs-res-labels { grid-column: 1 / -1; min-height: 22px; min-width: 0; }
.res-card .zs-labels { flex-wrap: wrap; }
.res-card .pill { height: 22px; font-size: 11.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.res-card .zs-more { height: 22px; flex: none; border: 0; padding: 0 4px; font-weight: 550; }
.zs-chips-clip { display: flex; gap: 4px; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.zs-chips-clip .pill { display: block; flex: 0 1 auto; min-width: 44px; max-width: 180px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; }
.zs-label-more { flex: none; }
.zs-label-more .zs-more { min-width: 34px; justify-content: center; }
.zs-label-pop { width: max-content; max-width: 360px; padding: 10px; }
.zs-label-pop-head { margin: 0 2px 8px; font-size: 12px; font-weight: 650; color: var(--text-muted); }
.zs-label-pop .zs-labels { flex-wrap: wrap; max-height: 260px; overflow-y: auto; }
.zs-res-side { display: flex; align-items: center; gap: 2px; }
.zs-res-locked { background: var(--n-25); }
.zs-res-locked .zs-res-name { color: var(--text-secondary); }
.zs-res-card-top { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.zs-res-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: var(--radius); background: var(--n-100); color: var(--text-secondary); }
.zs-res-icon .zs-ico { width: 18px; height: 18px; }
.zs-res-icon:has(.zs-ico-full) { background: none; }
.zs-res-icon .zs-ico-full { width: 116%; height: 116%; flex: none; }
.zs-res-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.zs-res-name { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.zs-res-sub { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-res-sub.zs-mono { font-size: 11.5px; }
.zs-res-tools { display: flex; align-items: center; gap: 2px; margin: -4px -4px 0 0; }
.zs-res-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.zs-res-meta { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--text-muted); }
.zs-res-action:empty { display: none; }
.zs-res-labels { min-height: 22px; }
.res-card .sel-check { position: absolute; top: 30px; left: 24px; transform: translateY(-50%); margin: 0; width: 16px; height: 16px; opacity: 0; z-index: 1; cursor: pointer; }
.res-card:hover .sel-check, .res-card .sel-check:focus-visible, .res-card .sel-check:checked, .zs-selecting .res-card .sel-check { opacity: 1; }
.res-card:has(.sel-check):hover .zs-res-icon, .zs-selecting .res-card:has(.sel-check) .zs-res-icon { visibility: hidden; }
.res-card .sel-check:checked ~ .zs-res-icon { visibility: hidden; }
.sel-check { accent-color: var(--b-600); }
.pin-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--n-400); cursor: pointer; }
.pin-btn svg path { fill: none; }
.pin-btn:hover { color: var(--text-secondary); background: var(--n-100); }
.pin-btn.pinned { color: var(--b-600); }
.pin-btn.pinned svg path { fill: currentColor; }
.res-card .pin-btn:not(.pinned) { opacity: 0; }
.res-card:hover .pin-btn, .res-card .pin-btn:focus-visible { opacity: 1; }
.zs-labels { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.zs-labels.hidden { display: none; }
.zs-more, .zs-tagcount { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 6px; border-radius: var(--radius-sm); font-size: 11.5px; font-weight: 600; color: var(--text-muted); background: transparent; border: 1px dashed var(--border); }
button.zs-more { cursor: pointer; }
button.zs-more:hover { color: var(--b-700); border-color: var(--b-200); }
.res-table { table-layout: fixed; }
.res-table .res-c-check { width: 40px; }
.res-table .res-c-name { width: 17%; }
.res-table .res-c-type { width: 184px; }
.res-table .res-c-addr { width: 13%; }
.res-table .res-c-act { width: 268px; }
.res-table td { overflow: hidden; }
.res-table td:last-child { overflow: visible; }
.res-name-cell { flex-wrap: nowrap; min-width: 0; }
.res-name-cell .zs-strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.res-addr { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-table .res-action .zs-row { flex-wrap: nowrap; gap: 6px; }
.res-table .res-action select { min-width: 0; max-width: 108px; text-overflow: ellipsis; }
.res-table .res-action .aws-service-picker { max-width: 88px; }
.res-labels-cell .res-labels-collapsed { flex-wrap: nowrap; }
.res-labels-cell .res-labels-expanded { flex-wrap: wrap; }
.res-row .zs-strong { white-space: nowrap; }
.res-row td:nth-child(3) .zs-row { flex-wrap: nowrap; white-space: nowrap; }
.zs-split { display: inline-flex; }
.zs-grants { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.zs-grant-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.zs-recent { margin-bottom: 18px; }
.zs-recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.zs-section-title { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.zs-recent-tile { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--bg-card); text-decoration: none; min-width: 0; box-shadow: var(--e1); transition: border-color 0.12s, box-shadow 0.12s; }
.zs-recent-tile:hover { border-color: var(--n-300); box-shadow: var(--e2); }
.zs-recent-tile .zs-res-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); }
.zs-recent-tile .zs-ico { width: 15px; height: 15px; }
.zs-recent-text { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.zs-recent-text .zs-res-name { font-size: 13px; flex: 0 1 auto; }
.zs-recent-text .zs-res-sub { flex: 0 1 auto; }
.zs-recent-when { margin-left: auto; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }

.zs-cartbar {
    position: fixed; right: 8px; bottom: 8px; left: var(--nav-w); border-radius: 0 0 12px 12px; z-index: 44;
    display: flex; align-items: center; gap: 14px; padding: 12px var(--gutter);
    background: var(--n-0); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -16px rgba(16, 24, 40, 0.35);
}
.zs-nav-collapsed .zs-cartbar { left: var(--nav-w-collapsed); }
.zs-cartbar.hidden { display: none; }
.zs-cartbar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.zs-cartbar-items { display: flex; flex-wrap: wrap; gap: 4px; }
.zs-cart-toggle {
    position: fixed; right: 24px; bottom: 20px; z-index: 44; display: inline-flex; align-items: center; gap: 6px;
    height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--btn-primary); color: #fff; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-pop);
}
.zs-cart-toggle.hidden { display: none; }
.zs-drawer-wrap { position: fixed; inset: 0; z-index: 70; }
.zs-drawer-wrap.hidden { display: none; }
.zs-drawer-backdrop { position: absolute; inset: 0; background: rgba(14, 23, 38, 0.4); animation: zs-fade 0.15s ease-out; }
.zs-drawer {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100vw);
    background: var(--n-0); box-shadow: var(--shadow-modal); overflow-y: auto;
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.zs-drawer.translate-x-full { transform: translateX(100%); }
.zs-drawer-body { display: flex; flex-direction: column; padding: 22px 24px; min-height: 100%; }
.zs-drawer-body.hidden { display: none; }
.zs-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; margin: -22px -24px 16px; padding: 18px 24px; border-bottom: 1px solid var(--border-soft); }
.zs-drawer-actions { position: sticky; bottom: -22px; display: flex; justify-content: flex-end; gap: 8px; margin: auto -24px -22px; padding: 14px 24px; border-top: 1px solid var(--border-soft); background: var(--n-25); }
.zs-drawer-done { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 80px 24px; text-align: center; }
.zs-drawer-done.hidden { display: none; }
.zs-daypicker { width: 260px; padding: 10px; }

/* ========== enroll wizard ========== */
.zs-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: zs-step; }
.zs-steps > li.zs-card + li.zs-card { margin-top: 0; }
.zs-step-no { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--btn-primary); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.zs-cmd { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; margin: 8px 0 10px; border-radius: var(--radius); background: var(--n-0); border: 1px solid var(--border-soft); }
.zs-cmd pre { flex: 1; margin: 0; color: var(--text-primary); font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.zs-cmd .zs-icon-btn { color: var(--text-muted); }
.zs-cmd .zs-icon-btn:hover { background: var(--n-100); color: var(--text-primary); }
.zs-bullets { margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: 13px; line-height: 1.8; }
ul.zs-bullets { list-style: disc; }
ol.zs-bullets { list-style: decimal; }
.zs-verify { display: flex; align-items: flex-start; gap: 12px; padding-top: 6px; }
.zs-verify.hidden { display: none; }
.zs-verify p { margin: 0 0 4px; }
.zs-verify-ok { color: var(--ok); }
.zs-verify-ok .zs-strong { color: var(--ok); }
.zs-verify-bad { color: var(--bad); }

/* ========== mfa ========== */
.zs-factor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px; }
.zs-factor-head-split { border-top: 1px solid var(--border-soft); }
.zs-factor-head p { margin: 0; }
.zs-totp { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.zs-totp.hidden { display: none; }
.zs-totp img { border: 1px solid var(--border-soft); border-radius: var(--radius); background: #fff; }

/* ========== recording player ========== */
.zs-player-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.zs-player-bar .zs-back { margin-bottom: 0; }
/* recording view: player and details share one viewport-sized frame */
.zs-content:has(> .zs-page > .zs-rec) { padding-bottom: 20px; }
.zs-rec { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar-h) - 88px); min-height: 460px; }
.zs-rec .zs-player-bar { flex: none; }
.zs-rec-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.zs-rec-stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 8px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--n-0); }
.zs-rec-player { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--radius); background: var(--n-0); }
.zs-rec-player .ap-player { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--e1); overflow: hidden; }
.zs-rec-player .ap-wrapper { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.zs-rec-player.zs-rec-desk { flex-direction: column; align-items: stretch; justify-content: flex-start; }
.zs-rec-desk-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--e1); overflow: hidden; }
.zs-rec-desk-frame .zs-desk-stage { flex: 1; height: auto; min-height: 0; border: 0; border-radius: 0; }
.zs-rec-desk-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--n-50); color: var(--n-700); border-top: 1px solid var(--border-soft); }
.zs-rec-desk-bar input[type=range] { flex: 1; min-width: 0; }
.zs-rec-desk-clock { white-space: nowrap; color: var(--n-700); }
.zs-rec-loading { display: inline-flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 13px; }
.zs-rec-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: var(--text-secondary); }
.zs-rec-empty p { max-width: 460px; margin: 0; line-height: 1.55; }
.zs-rec-side { min-height: 0; overflow-y: auto; padding: 16px 18px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--n-0); }
.zs-rec-side-title { margin: 0 0 12px; font-size: 14px; font-weight: 650; color: var(--text-primary); }
.zs-rec-dl { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.zs-rec-dl dt { margin: 0 0 3px; font-size: 12px; font-weight: 550; color: var(--text-muted); }
.zs-rec-dl dd { margin: 0; font-size: 13.5px; color: var(--text-primary); overflow-wrap: anywhere; }
.zs-rec-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.zs-rec-id { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; }
.zs-rec-id span { flex: 1; min-width: 0; }
.zs-rec-copy { width: 26px; height: 26px; margin: -4px -4px 0 0; flex: none; }
.zs-rec-person { display: block; }
@media (max-width: 1100px) {
    .zs-rec { height: auto; min-height: 0; }
    .zs-rec-body { grid-template-columns: minmax(0, 1fr); }
    .zs-rec-stage { height: 62vh; min-height: 360px; }
    .zs-rec-side { overflow: visible; }
}
.zs-kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
.zs-kv dt { color: var(--text-muted); font-size: 12.5px; }
.zs-kv dd { margin: 0; color: var(--text-primary); min-width: 0; }

/* ========== ssh terminal ========== */
.zs-term-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.zs-term-box { height: calc(100vh - 190px); min-height: 360px; padding: 8px; overflow: hidden; border-radius: var(--radius-lg); background: var(--n-0); border: 1px solid var(--border-soft); }
.zs-term-closed { flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 50vh; text-align: center; color: var(--text-muted); }
.zs-term-closed.hidden { display: none; }
.zs-term-closed:not(.hidden) { display: flex; }

/* ========== windows desktop ========== */
.zs-desk-stage { position: relative; display: flex; align-items: center; justify-content: center; height: calc(100vh - 190px); min-height: 360px; overflow: hidden; border-radius: var(--radius-lg); background: #1b1d21; border: 1px solid var(--border-soft); }
.zs-desk-stage:fullscreen { height: 100vh; border-radius: 0; border: 0; }
.zs-desk-canvas { display: block; max-width: 100%; max-height: 100%; outline: none; image-rendering: auto; }
.zs-desk-alerts { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; max-width: min(560px, 90%); z-index: 5; }
.zs-desk-alert { padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--b-500); background: var(--b-50); color: var(--text-primary); box-shadow: var(--shadow-pop); }
.zs-desk-alert-warn { border-color: var(--warn-line); background: var(--warn-soft); }
.zs-desk-alert-danger { border-color: var(--bad-line); background: var(--bad-soft); }

/* ========== users ========== */
.sso-groups-popover { position: relative; display: inline-block; }
.sso-groups-panel { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; width: 280px; padding: 10px; background: var(--n-0); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.sso-groups-panel.zs-floating { position: fixed; }
.sso-groups-panel.hidden { display: none; }
.trait-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }

/* ========== welcome / public ========== */
.zs-welcome-card { width: 100%; max-width: 440px; padding: 32px; background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 16px; box-shadow: 0 16px 40px -20px rgba(16, 24, 40, 0.3); }
.zs-welcome-card.hidden { display: none; }
.zs-brand-lg { font-size: 22px; }
.zs-brand-lg .zs-brand-mark { width: 36px; height: 36px; }

/* ========== misc helpers ========== */
.zs-page-wide { max-width: none; }
.zs-btn-block { width: 100%; }
.zs-mt { margin-top: 18px; }
.zs-fieldset { border: 0; padding: 0; margin-left: 0; margin-right: 0; }
.zs-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 12px; padding: 4px 0; }
.zs-table-foot { padding: 10px 16px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--text-muted); background: var(--n-25); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.zs-user-cell { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.zs-user-cell:hover .zs-strong { color: var(--accent); }
.zs-cmd-code { flex: 1; padding: 0; border: 0; background: none; color: #e3e8f2; font-size: 12.5px; word-break: break-all; }
.zs-live { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--ok); }
.zs-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.zs-grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.zs-layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1200px) { .zs-layout-aside { grid-template-columns: 1fr; } }

/* ========== sign-in page (login.html) ========== */
.login-page { min-height: 100vh; }
.login-card,
.login-page #login-card,
.login-page #login-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: 0 16px 40px -20px rgba(16, 24, 40, 0.3);
    color: var(--text-primary);
}
.login-page label { color: var(--text-secondary); }
.login-page input:not([type="checkbox"]):not([type="radio"]) {
    background: var(--n-0);
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.login-page input:focus { border-color: var(--b-500); box-shadow: var(--focus); outline: none; }
.login-page .text-gray-500 { color: var(--text-muted); }
.login-page .text-red-400 { color: var(--bad); }

/* ---------- light fixes for utilities in templates outside this file ---------- */
html[data-theme="light"] .text-white,
html[data-theme="light"] [class*="hover:text-white"]:hover { color: var(--text-primary); }
html[data-theme="light"] :is(.bg-indigo-500, .bg-indigo-600, .bg-indigo-700,
    .bg-purple-500, .bg-purple-600, .bg-purple-700,
    .bg-red-500, .bg-red-600, .bg-red-700,
    .bg-green-500, .bg-green-600, .bg-green-700,
    .bg-emerald-500, .bg-emerald-600, .bg-emerald-700,
    .bg-blue-500, .bg-blue-600, .bg-blue-700).text-white,
html[data-theme="light"] :is(.bg-indigo-500, .bg-indigo-600, .bg-indigo-700,
    .bg-purple-500, .bg-purple-600, .bg-purple-700,
    .bg-red-500, .bg-red-600, .bg-red-700,
    .bg-green-500, .bg-green-600, .bg-green-700,
    .bg-emerald-500, .bg-emerald-600, .bg-emerald-700,
    .bg-blue-500, .bg-blue-600, .bg-blue-700) .text-white,
html[data-theme="light"] :is([class*="hover:bg-indigo-"], [class*="hover:bg-red-"], [class*="hover:bg-green-"], [class*="hover:bg-blue-"], [class*="hover:bg-purple-"], [class*="hover:bg-emerald-"]).text-white:hover { color: #fff; }

html[data-theme="light"] .text-gray-50 { color: rgb(20 28 45); }
html[data-theme="light"] .text-gray-500 { color: rgb(90 100 115); }
html[data-theme="light"] .text-gray-600 { color: rgb(96 106 121); }

html[data-theme="light"] .text-indigo-300, html[data-theme="light"] .text-indigo-400 { color: var(--b-600); }
html[data-theme="light"] .text-blue-300, html[data-theme="light"] .text-blue-400 { color: #1f5fa8; }
html[data-theme="light"] .text-green-300, html[data-theme="light"] .text-green-400 { color: #18794e; }
html[data-theme="light"] .text-emerald-300, html[data-theme="light"] .text-emerald-400 { color: #0f7a57; }
html[data-theme="light"] .text-red-300, html[data-theme="light"] .text-red-400 { color: #b42d23; }
html[data-theme="light"] .text-rose-300, html[data-theme="light"] .text-rose-400 { color: #b52a55; }
html[data-theme="light"] .text-yellow-300, html[data-theme="light"] .text-yellow-400 { color: #8a6100; }
html[data-theme="light"] .text-amber-300, html[data-theme="light"] .text-amber-400 { color: #975a04; }
html[data-theme="light"] .text-purple-300, html[data-theme="light"] .text-purple-400 { color: #6a3fb5; }

html[data-theme="light"] [class*="bg-indigo-900"] { background-color: #e8edfb; }
html[data-theme="light"] [class*="bg-blue-900"] { background-color: #e6f0fb; }
html[data-theme="light"] [class*="bg-green-900"] { background-color: #e4f4ec; }
html[data-theme="light"] [class*="bg-emerald-900"] { background-color: #e2f4ec; }
html[data-theme="light"] [class*="bg-red-900"] { background-color: #fbe8e6; }
html[data-theme="light"] [class*="bg-rose-900"] { background-color: #fbe8ee; }
html[data-theme="light"] [class*="bg-yellow-900"] { background-color: #fbf3d9; }
html[data-theme="light"] [class*="bg-amber-900"] { background-color: #fdf1df; }
html[data-theme="light"] [class*="bg-purple-900"] { background-color: #f1eefb; }
html[data-theme="light"] [class*="bg-indigo-500/1"], html[data-theme="light"] [class*="bg-blue-500/1"],
html[data-theme="light"] [class*="bg-green-500/1"], html[data-theme="light"] [class*="bg-red-500/1"],
html[data-theme="light"] [class*="bg-amber-500/1"], html[data-theme="light"] [class*="bg-yellow-500/1"],
html[data-theme="light"] [class*="bg-purple-500/1"], html[data-theme="light"] [class*="bg-emerald-500/1"] { filter: saturate(1.15); }

html[data-theme="light"] [class*="bg-black/50"],
html[data-theme="light"] [class*="bg-black/60"] { background-color: rgba(23, 32, 51, 0.3); }
html[data-theme="light"] .border-gray-700 { border-color: rgb(var(--gray-700-rgb) / 0.85); }
html[data-theme="light"] .border-gray-800 { border-color: rgb(var(--gray-800-rgb)); }

html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea:not(.xterm-helper-textarea) { color: var(--text-primary); }
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: var(--text-muted); }
html[data-theme="light"] .placeholder-gray-500::placeholder,
html[data-theme="light"] .placeholder-gray-600::placeholder { color: var(--text-muted); }
html[data-theme="light"] pre:not(.zs-cmd pre):not(.ap-terminal):not(.zs-codeblock) { color: var(--text-primary); }

/* Embedded terminals (asciinema player, xterm) render in their own palette;
   none of the page-level colour, box or overlay rules may reach inside them. */
.ap-wrapper pre.ap-terminal, html[data-theme="light"] .ap-wrapper pre.ap-terminal { color: var(--term-color-foreground); background-color: var(--term-color-background); }
.ap-wrapper, .xterm { filter: none; opacity: 1; mix-blend-mode: normal; }
.ap-wrapper *, .xterm * { box-sizing: content-box; }
.ap-wrapper code, .xterm code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.xterm .xterm-helper-textarea { color: transparent; background: transparent; border: 0; box-shadow: none; }

/* centered utility pages */
.zs-centered { min-height: calc(100vh - 180px); display: flex; align-items: center; justify-content: center; padding: 24px 0; }

/* pre-auth pages: one centered composition on the portal's light page */
.zs-auth, .zs-welcome { position: relative; min-height: 100vh; display: flex; flex-direction: column; color: var(--text-secondary); background: var(--bg-page); }
.zs-auth-main { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 20px 24px; }
.zs-auth-col { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: stretch; }
.zs-auth-brand { display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--text-primary); }
.zs-auth-brand .zs-brand-mark { width: 44px; height: 44px; }
.zs-auth-tagline { margin: 14px -40px 28px; max-width: none; text-align: center; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.login-page .zs-login-card, .zs-login-card {
    padding: 28px; background: var(--n-0); color: var(--text-primary); border: 1px solid var(--border-soft); border-radius: 16px;
    box-shadow: 0 16px 40px -20px rgba(16, 24, 40, 0.18);
}
.zs-notice-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.zs-notice-text { max-height: 46vh; overflow-y: auto; padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--n-25); color: var(--text-primary); font-size: 13.5px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.zs-notice-text:focus-visible { outline: 2px solid var(--b-500); outline-offset: 2px; }
.zs-login-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--text-primary); }
.zs-login-sub { margin: 6px 0 22px; color: var(--text-secondary); font-size: 13.5px; }
.zs-login-legal { margin: 18px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.55; text-align: center; }
.zs-auth-foot { position: relative; padding: 18px 20px 22px; text-align: center; font-size: 12px; color: var(--text-muted); }
.zs-btn-lg { height: 42px; font-size: 14px; }
.zs-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 12px; color: var(--text-muted); }
.zs-divider::before, .zs-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-soft); }
.zs-welcome { align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; }
.zs-welcome > * { position: relative; }
.zs-welcome > .zs-brand { color: var(--text-primary); }
.zs-welcome .zs-welcome-card { color: var(--text-primary); }
@media (max-width: 560px) { .zs-login-card { padding: 22px; } .zs-auth-main { padding-top: 32px; } .zs-auth-tagline { margin: 12px 0 22px; } }

/* ========== harmonise utility-styled templates with the system ========== */
.zs-content > .mb-6:first-child h2, .zs-content > div:first-child > div > h2.text-2xl { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; }
html[data-theme="light"] .rounded-xl { border-radius: var(--radius-lg); }
html[data-theme="light"] .bg-gray-900.border { box-shadow: var(--e1); }
html[data-theme="light"] .bg-gray-900.border-gray-800\/60, html[data-theme="light"] .border-gray-800\/60 { border-color: var(--border-soft); }
html[data-theme="light"] thead.bg-gray-950\/60, html[data-theme="light"] .bg-gray-950\/60 { background: var(--n-25); }
html[data-theme="light"] .divide-gray-800\/60 > :not([hidden]) ~ :not([hidden]) { border-color: var(--border-soft); }
html[data-theme="light"] :is(.bg-indigo-500, .bg-indigo-600, .bg-indigo-700, .bg-blue-500, .bg-blue-600, .bg-blue-700) { background-color: var(--btn-primary); }
html[data-theme="light"] :is(.hover\:bg-indigo-700, .hover\:bg-indigo-500, .hover\:bg-blue-700, .hover\:bg-blue-500):hover { background-color: var(--btn-primary-hover); }
html[data-theme="light"] .focus\:border-indigo-500:focus { border-color: var(--b-500); box-shadow: var(--focus); }
html[data-theme="light"] .text-indigo-400, html[data-theme="light"] .hover\:text-indigo-400:hover { color: var(--b-600); }
@container (max-width: 1099px) { .zs-recent-grid > :nth-child(n+3) { display: none; } }
@container (max-width: 639px) { .zs-recent-grid > :nth-child(n+2) { display: none; } }

/* Light terminal palette, shared with the xterm theme in ui.js. */
.ap-player.asciinema-player-theme-zs-light {
    --term-color-foreground: #1f2937; --term-color-background: #ffffff;
    --term-color-0: #1f2937; --term-color-1: #c62828; --term-color-2: #2e7d32; --term-color-3: #8d6e00;
    --term-color-4: #1e5bb8; --term-color-5: #8e24aa; --term-color-6: #00838f; --term-color-7: #6b7280;
    --term-color-8: #6b7280; --term-color-9: #d32f2f; --term-color-10: #33803a; --term-color-11: #a16207;
    --term-color-12: #2563eb; --term-color-13: #9c27b0; --term-color-14: #007c88; --term-color-15: #4b5563;
}
.ap-player.asciinema-player-theme-zs-light div.ap-control-bar { background: var(--n-50); color: var(--n-700); border-top: 1px solid var(--border-soft); }
.ap-player.asciinema-player-theme-zs-light div.ap-control-bar svg.ap-icon path { fill: var(--n-700); }
.ap-player.asciinema-player-theme-zs-light div.ap-control-bar .ap-progressbar .ap-bar .ap-gutter { background-color: var(--n-300); }
.ap-player.asciinema-player-theme-zs-light div.ap-control-bar .ap-progressbar .ap-bar .ap-gutter .ap-gutter-fill { background-color: var(--n-700); }
.zs-tnum { font-variant-numeric: tabular-nums; }
.zs-res-icon-lg { width: 40px; height: 40px; }
.zs-cluster-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.zs-fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px 24px; }
@media (max-width: 1100px) { .zs-cluster-grid { grid-template-columns: minmax(0, 1fr); } }
.res-labels-cell > .res-labels-collapsed { container-type: inline-size; }
.zs-more-narrow { display: none; }
@container (max-width: 300px) {
    .zs-chips-clip .pill:nth-child(n+2) { display: none; }
    .zs-more-wide { display: none; }
    .zs-more-narrow { display: inline; }
}
@container (min-width: 301px) { .zs-only-narrow { display: none; } }
