/* --------------------------------------------------------------------------
   Theme palettes
   -------------------------------------------------------------------------- */
body.cs16-v111-theme,
html[data-cs16-template="red-neon"] body {
    color-scheme: dark;
    --cs16-theme-bg: #090b0f;
    --cs16-theme-bg-soft: #0e1117;
    --cs16-theme-panel: #12151b;
    --cs16-theme-panel-2: #171a21;
    --cs16-theme-panel-3: #1d212a;
    --cs16-theme-panel-glass: rgba(18, 21, 27, .94);
    --cs16-theme-line: #272a33;
    --cs16-theme-line-soft: rgba(244, 244, 245, .075);
    --cs16-theme-text: #f4f4f5;
    --cs16-theme-muted: #a1a1aa;
    --cs16-theme-dim: #71717a;
    --cs16-theme-radius: 14px;
    --cs16-theme-radius-sm: 10px;
    --cs16-theme-shadow: 0 14px 34px rgba(0, 0, 0, .30);
    --cs16-accent: #e11d48;
    --cs16-accent-deep: #9f1239;
    --cs16-accent-alt: #fb7185;
    --cs16-highlight: #fb7185;
    --cs16-secondary: #be123c;
    --cs16-positive: #22c55e;
    --cs16-warning: #f59e0b;
    --cs16-danger: #ef4444;
    --cs16-info: #38bdf8;
    --cs16-accent-contrast: #fff;
    --cs16-accent-rgb: 225, 29, 72;
    --cs16-accent-alt-rgb: 251, 113, 133;
    --cs16-highlight-rgb: 251, 113, 133;
    --cs16-secondary-rgb: 190, 18, 60;
    --cs16-logo-filter: drop-shadow(0 0 10px rgba(225, 29, 72, .18));
}

body.cs-template-classic-tactical,
html[data-cs16-template="classic-tactical"] body {
    --cs16-theme-bg: #0b111a;
    --cs16-theme-bg-soft: #0f1723;
    --cs16-theme-panel: #131e2c;
    --cs16-theme-panel-2: #172536;
    --cs16-theme-panel-3: #1b2b3f;
    --cs16-theme-panel-glass: rgba(18, 29, 43, .92);
    --cs16-theme-line: rgba(125, 160, 204, .25);
    --cs16-theme-line-soft: rgba(125, 160, 204, .12);
    --cs16-theme-text: #eef4fb;
    --cs16-theme-muted: #9cadc1;
    --cs16-theme-dim: #6f8299;
    --cs16-theme-radius: 13px;
    --cs16-theme-radius-sm: 9px;
    --cs16-theme-shadow: 0 22px 64px rgba(2, 8, 18, .42);
    --cs16-accent: #4f8dff;
    --cs16-accent-deep: #245cc7;
    --cs16-accent-alt: #70a7ff;
    --cs16-highlight: #69d39a;
    --cs16-secondary: #8b6cff;
    --cs16-positive: #22c55e;
    --cs16-warning: #f59e0b;
    --cs16-danger: #ef4444;
    --cs16-info: #38bdf8;
    --cs16-accent-contrast: #fff;
    --cs16-accent-rgb: 79, 141, 255;
    --cs16-accent-alt-rgb: 112, 167, 255;
    --cs16-highlight-rgb: 105, 211, 154;
    --cs16-secondary-rgb: 139, 108, 255;
    --cs16-logo-filter: drop-shadow(0 0 10px rgba(79, 141, 255, .14));
}

body.cs-template-red-neon,
html[data-cs16-template="red-neon"] body {
    --cs16-theme-bg: #090b0f;
    --cs16-theme-bg-soft: #0e1117;
    --cs16-theme-panel: #12151b;
    --cs16-theme-panel-2: #171a21;
    --cs16-theme-panel-3: #1d212a;
    --cs16-theme-panel-glass: rgba(18, 21, 27, .94);
    --cs16-theme-line: #272a33;
    --cs16-theme-line-soft: rgba(244, 244, 245, .075);
    --cs16-theme-text: #f4f4f5;
    --cs16-theme-muted: #a1a1aa;
    --cs16-theme-dim: #71717a;
    --cs16-theme-radius: 14px;
    --cs16-theme-radius-sm: 10px;
    --cs16-theme-shadow: 0 14px 34px rgba(0, 0, 0, .30);
    --cs16-accent: #e11d48;
    --cs16-accent-deep: #9f1239;
    --cs16-accent-alt: #fb7185;
    --cs16-highlight: #fb7185;
    --cs16-secondary: #be123c;
    --cs16-positive: #22c55e;
    --cs16-warning: #f59e0b;
    --cs16-danger: #ef4444;
    --cs16-info: #38bdf8;
    --cs16-accent-contrast: #fff;
    --cs16-accent-rgb: 225, 29, 72;
    --cs16-accent-alt-rgb: 251, 113, 133;
    --cs16-highlight-rgb: 251, 113, 133;
    --cs16-secondary-rgb: 190, 18, 60;
    --cs16-logo-filter: drop-shadow(0 0 10px rgba(225, 29, 72, .18));
}

body.cs-template-titan-gold,
html[data-cs16-template="titan-gold"] body {
    --cs16-theme-bg: #080907;
    --cs16-theme-bg-soft: #0d0e0c;
    --cs16-theme-panel: #141512;
    --cs16-theme-panel-2: #191a16;
    --cs16-theme-panel-3: #20211b;
    --cs16-theme-panel-glass: rgba(19, 20, 16, .93);
    --cs16-theme-line: rgba(233, 185, 73, .27);
    --cs16-theme-line-soft: rgba(233, 185, 73, .12);
    --cs16-theme-text: #f6f2e6;
    --cs16-theme-muted: #aaa38f;
    --cs16-theme-dim: #756f60;
    --cs16-theme-radius: 7px;
    --cs16-theme-radius-sm: 5px;
    --cs16-theme-shadow: 0 25px 70px rgba(0, 0, 0, .54);
    --cs16-accent: #e9b949;
    --cs16-accent-deep: #9f7118;
    --cs16-accent-alt: #ffd979;
    --cs16-highlight: #f2c963;
    --cs16-secondary: #b48a2d;
    --cs16-positive: #22c55e;
    --cs16-warning: #f59e0b;
    --cs16-danger: #ef4444;
    --cs16-info: #38bdf8;
    --cs16-accent-contrast: #17150d;
    --cs16-accent-rgb: 233, 185, 73;
    --cs16-accent-alt-rgb: 255, 217, 121;
    --cs16-highlight-rgb: 242, 201, 99;
    --cs16-secondary-rgb: 180, 138, 45;
    --cs16-logo-filter: drop-shadow(0 0 10px rgba(233, 185, 73, .15));
}

/*
 * CS16 Panel v11.1.1 — Triple Template Suite
 * Three stable responsive visual systems sharing the same modular CS 1.6 panel structure.
 */

body.cs16-v111-theme {
    --zpc-bg: var(--cs16-theme-bg);
    --zpc-bg-soft: var(--cs16-theme-bg-soft);
    --zpc-panel: var(--cs16-theme-panel);
    --zpc-panel-2: var(--cs16-theme-panel-2);
    --zpc-panel-3: var(--cs16-theme-panel-3);
    --zpc-panel-glass: var(--cs16-theme-panel-glass);
    --zpc-line: var(--cs16-theme-line);
    --zpc-line-soft: var(--cs16-theme-line-soft);
    --zpc-line-hot: rgba(var(--cs16-accent-rgb), .52);
    --zpc-text: var(--cs16-theme-text);
    --zpc-muted: var(--cs16-theme-muted);
    --zpc-dim: var(--cs16-theme-dim);
    --zpc-red: var(--cs16-accent);
    --zpc-red-deep: var(--cs16-accent-deep);
    --zpc-orange: var(--cs16-accent-alt);
    --zpc-cyan: var(--cs16-highlight);
    --zpc-violet: var(--cs16-secondary);
    --zpc-green: var(--cs16-positive);
    --zpc-yellow: var(--cs16-warning);
    --zpc-danger: var(--cs16-danger);
    --zpc-radius: var(--cs16-theme-radius);
    --zpc-radius-sm: var(--cs16-theme-radius-sm);
    --zpc-shadow: var(--cs16-theme-shadow);
    --zpc-sidebar: 240px;

    /* Shared feature-module variables. */
    --cs-bg: var(--zpc-bg);
    --cs-bg-deep: var(--cs16-theme-bg);
    --cs-surface: var(--zpc-panel);
    --cs-surface-2: var(--zpc-panel-2);
    --cs-surface-3: var(--zpc-panel-3);
    --cs-line: var(--zpc-line);
    --cs-line-soft: var(--zpc-line-soft);
    --cs-text: var(--zpc-text);
    --cs-muted: var(--zpc-muted);
    --cs-dim: var(--zpc-dim);
    --cs-olive: var(--zpc-red);
    --cs-olive-hot: var(--zpc-orange);
    --cs-amber: var(--zpc-red);
    --cs-orange: var(--zpc-orange);
    --cs-green: var(--zpc-green);
    --cs-red: var(--zpc-danger);
    --cs-blue: var(--zpc-cyan);
    --cs-radius: var(--zpc-radius-sm);

    /* Stable aliases consumed by the newer dashboard, config and catalog modules. */
    --tpl-accent: var(--cs16-accent);
    --tpl-panel: var(--cs16-theme-panel);
    --tpl-panel-2: var(--cs16-theme-panel-2);
    --tpl-panel-3: var(--cs16-theme-panel-3);
    --tpl-line: var(--cs16-theme-line);
    --tpl-text: var(--cs16-theme-text);
    --tpl-muted: var(--cs16-theme-muted);
    --tpl-green: var(--cs16-positive);
    --tpl-yellow: var(--cs16-warning);
    --tpl-red: var(--cs16-danger);

    --accent: var(--cs16-accent);
    --surface: var(--cs16-theme-panel);
    --surface-2: var(--cs16-theme-panel-2);
    --border-color: var(--cs16-theme-line);
    --text-primary: var(--cs16-theme-text);
    --text-secondary: var(--cs16-theme-muted);

    --v5-panel: var(--zpc-panel);
    --v5-panel-2: var(--zpc-panel-2);
    --v5-line: var(--zpc-line);
    --v5-line-soft: var(--zpc-line-soft);
    --v5-text: var(--zpc-text);
    --v5-muted: var(--zpc-muted);
    --v5-red: var(--zpc-red);
    --v5-green: var(--zpc-green);
    --v5-yellow: var(--zpc-yellow);
    --v5-blue: var(--zpc-cyan);

    --v8-panel: var(--zpc-panel);
    --v8-panel-2: var(--zpc-panel-2);
    --v8-panel-3: var(--zpc-panel-3);
    --v8-line: var(--zpc-line);
    --v8-line-soft: var(--zpc-line-soft);
    --v8-text: var(--zpc-text);
    --v8-muted: var(--zpc-muted);
    --v8-red: var(--zpc-red);
    --v8-red-dark: var(--zpc-red-deep);
    --v8-green: var(--zpc-green);
    --v8-yellow: var(--zpc-yellow);
    --v8-blue: var(--zpc-cyan);

    --v9-panel: var(--zpc-panel);
    --v9-panel-2: var(--zpc-panel-2);
    --v9-panel-3: var(--zpc-panel-3);
    --v9-line: var(--zpc-line);
    --v9-line-soft: var(--zpc-line-soft);
    --v9-text: var(--zpc-text);
    --v9-muted: var(--zpc-muted);
    --v9-red: var(--zpc-red);
    --v9-green: var(--zpc-green);
    --v9-yellow: var(--zpc-yellow);
    --v9-blue: var(--zpc-cyan);

    --api10-panel: var(--zpc-panel);
    --api10-panel-2: var(--zpc-panel-2);
    --api10-panel-3: var(--zpc-panel-3);
    --api10-line: var(--zpc-line);
    --api10-line-soft: var(--zpc-line-soft);
    --api10-text: var(--zpc-text);
    --api10-muted: var(--zpc-muted);
    --api10-red: var(--zpc-red);
    --api10-green: var(--zpc-green);
    --api10-yellow: var(--zpc-yellow);
    --api10-blue: var(--zpc-cyan);

    min-height: 100vh;
    overflow-x: hidden;
    color: var(--zpc-text);
    background:
        radial-gradient(circle at 7% -12%, rgba(var(--cs16-accent-rgb), .17), transparent 32rem),
        radial-gradient(circle at 94% 14%, rgba(var(--cs16-highlight-rgb), .10), transparent 34rem),
        radial-gradient(circle at 66% 110%, rgba(var(--cs16-secondary-rgb), .08), transparent 34rem),
        linear-gradient(145deg, #05070b 0%, #070a10 48%, #04060a 100%);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color-scheme: dark;
}

body.cs16-v111-theme::before {
    content: "CS";
    position: fixed;
    z-index: -2;
    right: -3vw;
    top: 14vh;
    color: rgba(255, 255, 255, .014);
    font: 900 clamp(240px, 36vw, 720px)/.78 "Arial Narrow", Impact, sans-serif;
    letter-spacing: -.08em;
    pointer-events: none;
    user-select: none;
}

body.cs16-v111-theme::after {
    content: "";
    position: fixed;
    z-index: 10000;
    inset: 0;
    pointer-events: none;
    opacity: .028;
    background:
        linear-gradient(rgba(255, 255, 255, .8) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .8) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

body.cs16-v111-theme ::selection {
    color: #fff;
    background: rgba(var(--cs16-accent-rgb), .48);
}

body.cs16-v111-theme * {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--cs16-accent-rgb), .72) #080b11;
}

body.cs16-v111-theme *::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

body.cs16-v111-theme *::-webkit-scrollbar-track {
    background: #080b11;
}

body.cs16-v111-theme *::-webkit-scrollbar-thumb {
    border: 2px solid #080b11;
    border-radius: 999px;
    background: linear-gradient(var(--zpc-red), var(--zpc-orange));
}

body.cs16-v111-theme :is(button, a, input, select, textarea):focus-visible {
    outline: 2px solid var(--zpc-cyan);
    outline-offset: 3px;
}

/* ---------- Authentication ---------- */
body.cs16-v111-theme .login-page {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(3, 5, 9, .98), rgba(6, 9, 15, .80)),
        radial-gradient(circle at 78% 42%, rgba(var(--cs16-accent-rgb), .22), transparent 27rem),
        radial-gradient(circle at 60% 94%, rgba(var(--cs16-highlight-rgb), .10), transparent 32rem),
        #04060a;
}

body.cs16-v111-theme .login-page::before {
    content: "CS 1.6 // SECURE SERVER COMMAND";
    position: absolute;
    top: 28px;
    left: 34px;
    z-index: -1;
    color: rgba(255, 255, 255, .30);
    font: 800 10px/1 Consolas, monospace;
    letter-spacing: 2.5px;
}

body.cs16-v111-theme .login-page::after {
    content: "LIVE";
    position: absolute;
    z-index: -1;
    right: -2vw;
    bottom: -6vh;
    color: rgba(255, 255, 255, .025);
    font: 900 min(40vw, 580px)/.8 "Arial Narrow", Impact, sans-serif;
    letter-spacing: -.07em;
}

body.cs16-v111-theme .login-card {
    position: relative;
    width: min(460px, 100%);
    padding: 38px;
    overflow: hidden;
    border: 1px solid var(--zpc-line);
    border-radius: 20px;
    background:
        linear-gradient(155deg, rgba(18, 25, 38, .97), rgba(7, 11, 18, .99));
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, .65),
        0 34px 100px rgba(0, 0, 0, .56),
        0 0 70px rgba(var(--cs16-accent-rgb), .08),
        inset 0 1px rgba(255, 255, 255, .045);
}

body.cs16-v111-theme .login-card::before {
    content: "AUTHENTICATED ACCESS";
    position: absolute;
    top: 0;
    right: 0;
    padding: 7px 11px;
    border-radius: 0 18px 0 10px;
    color: #fff;
    background: linear-gradient(90deg, var(--zpc-red-deep), var(--zpc-red));
    font: 850 8px/1 Consolas, monospace;
    letter-spacing: 1.2px;
}

body.cs16-v111-theme .logo-box {
    padding-bottom: 25px;
    border-bottom: 1px solid var(--zpc-line-soft);
}

body.cs16-v111-theme :is(.logo, .small-logo, .avatar) {
    border: 1px solid rgba(255, 99, 122, .68);
    border-radius: 12px;
    background: linear-gradient(145deg, #151b27, #090d14);
    box-shadow:
        0 0 0 3px rgba(var(--cs16-accent-rgb), .07),
        0 12px 28px rgba(0, 0, 0, .34),
        0 0 22px rgba(var(--cs16-accent-rgb), .13);
    transform: none;
}

body.cs16-v111-theme .logo-box h1 {
    color: #fff;
    font-family: "Arial Narrow", Impact, sans-serif;
    font-size: 28px;
    letter-spacing: .8px;
    text-transform: uppercase;
}

body.cs16-v111-theme .logo-box p,
body.cs16-v111-theme .login-footer {
    color: var(--zpc-muted);
    letter-spacing: .65px;
}

body.cs16-v111-theme :is(input, select, textarea) {
    border: 1px solid var(--zpc-line);
    border-radius: 10px;
    background: rgba(4, 8, 14, .94);
    color: var(--zpc-text);
    box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

body.cs16-v111-theme :is(input, select, textarea)::placeholder {
    color: #68758b;
}

body.cs16-v111-theme :is(input, select, textarea):focus {
    border-color: rgba(var(--cs16-highlight-rgb), .70);
    box-shadow: 0 0 0 3px rgba(var(--cs16-highlight-rgb), .10);
}

body.cs16-v111-theme label {
    color: #bdc7d8;
}

body.cs16-v111-theme .login-card button[type="submit"] {
    min-height: 48px;
    border: 1px solid rgba(255, 126, 145, .55);
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(100deg, var(--cs16-accent-deep), var(--cs16-accent) 58%, var(--cs16-accent-alt));
    box-shadow: 0 14px 34px rgba(var(--cs16-accent-rgb), .22);
    font-weight: 850;
    letter-spacing: .75px;
    text-transform: uppercase;
}

body.cs16-v111-theme .login-card button[type="submit"]:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* ---------- Main frame ---------- */
body.cs16-v111-theme .panel {
    min-height: 100svh;
    background: transparent;
}

body.cs16-v111-theme .sidebar {
    z-index: 1200;
    width: var(--zpc-sidebar);
    padding: 20px 15px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255, 76, 103, .20);
    background:
        radial-gradient(circle at 10% 5%, rgba(var(--cs16-accent-rgb), .13), transparent 18rem),
        linear-gradient(180deg, rgba(10, 12, 19, .985), rgba(5, 7, 11, .995));
    box-shadow: 20px 0 60px rgba(0, 0, 0, .24);
}

body.cs16-v111-theme .sidebar::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--zpc-red), var(--zpc-orange), transparent 88%);
}

body.cs16-v111-theme .main {
    width: calc(100% - var(--zpc-sidebar));
    min-width: 0;
    margin-left: var(--zpc-sidebar);
    background: transparent;
}

body.cs16-v111-theme .brand {
    position: relative;
    min-height: 67px;
    margin: 0 2px 15px;
    padding: 3px 6px 18px;
    border-bottom: 1px solid var(--zpc-line-soft);
}

body.cs16-v111-theme .brand::after {
    content: "LIVE SERVER COMMAND";
    position: absolute;
    left: 61px;
    bottom: 7px;
    color: rgba(255, 82, 108, .62);
    font: 800 7px/1 Consolas, monospace;
    letter-spacing: 1.45px;
}

body.cs16-v111-theme .brand strong {
    color: #fff;
    font-family: "Arial Narrow", Impact, sans-serif;
    font-size: 17px;
    letter-spacing: .9px;
}

body.cs16-v111-theme .brand span {
    color: var(--zpc-muted);
    font-size: 10px;
    letter-spacing: .65px;
}

body.cs16-v111-theme .portal-mode-badge {
    min-height: 50px;
    margin: 0 1px 18px;
    padding: 9px 11px;
    border: 1px solid rgba(var(--cs16-accent-rgb), .34);
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(var(--cs16-accent-rgb), .16), rgba(var(--cs16-accent-rgb), .035));
    box-shadow: inset 3px 0 var(--zpc-red);
}

body.cs16-v111-theme .portal-mode-dot {
    background: var(--zpc-green);
    box-shadow: 0 0 12px rgba(46, 230, 166, .8);
}

body.cs16-v111-theme .nav-section-label {
    margin: 12px 10px 6px;
    color: #59677d;
    font: 800 7px/1 Consolas, monospace;
    letter-spacing: 2px;
}

body.cs16-v111-theme nav {
    gap: 8px;
}

body.cs16-v111-theme .nav-item {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    height: 48px;
    gap: 12px;
    padding: 8px 10px;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--zpc-muted);
    background: transparent;
    font-size: 12px;
    font-weight: 780;
    letter-spacing: .45px;
    text-transform: uppercase;
    text-align: left;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

body.cs16-v111-theme .nav-item::before {
    content: "";
    position: absolute;
    inset: 8px auto 8px 0;
    display: block;
    width: 3px;
    height: auto;
    border: 0;
    border-radius: 0 3px 3px 0;
    background: var(--zpc-red);
    opacity: 0;
    transform: none;
    transition: opacity .18s ease;
}

body.cs16-v111-theme .nav-item::after {
    display: none;
    content: none;
}

body.cs16-v111-theme .cs16-nav-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1px solid var(--zpc-line);
    border-radius: 9px;
    color: var(--zpc-muted);
    background: rgba(255, 255, 255, .025);
    box-sizing: border-box;
}

body.cs16-v111-theme .cs16-nav-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

body.cs16-v111-theme .cs16-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.cs16-v111-theme .nav-item:hover {
    color: var(--zpc-text);
    border-color: var(--zpc-line);
    background: rgba(var(--cs16-accent-rgb), .055);
    transform: none;
}

body.cs16-v111-theme .nav-item:hover .cs16-nav-icon {
    color: var(--cs16-accent-alt);
    border-color: rgba(var(--cs16-accent-alt-rgb), .32);
}

body.cs16-v111-theme .nav-item.active {
    color: var(--zpc-text);
    border-color: rgba(var(--cs16-accent-rgb), .24);
    background: rgba(var(--cs16-accent-rgb), .10);
    box-shadow: none;
}

body.cs16-v111-theme .nav-item.active::before {
    opacity: 1;
}

body.cs16-v111-theme .nav-item.active .cs16-nav-icon {
    color: var(--zpc-text);
    border-color: rgba(var(--cs16-accent-rgb), .48);
    background: rgba(var(--cs16-accent-rgb), .13);
    box-shadow: 0 0 14px rgba(var(--cs16-accent-rgb), .13);
}

body.cs16-v111-theme .logout {
    min-height: 42px;
    margin-top: 9px;
    border: 1px solid var(--zpc-line);
    border-radius: 10px;
    color: #a8b3c5;
    background: rgba(255, 255, 255, .018);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

body.cs16-v111-theme .logout:hover {
    color: #fff;
    border-color: rgba(var(--cs16-accent-rgb), .48);
    background: rgba(var(--cs16-accent-rgb), .10);
}

body.cs16-v111-theme .topbar {
    z-index: 800;
    min-height: 74px;
    padding: 13px clamp(18px, 2.3vw, 34px);
    border-bottom: 1px solid rgba(var(--cs16-accent-rgb), .18);
    background: rgba(6, 8, 13, .83);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
    backdrop-filter: blur(18px) saturate(135%);
}

body.cs16-v111-theme .topbar::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--zpc-red), var(--zpc-orange) 30%, transparent 68%);
}

body.cs16-v111-theme .topbar h2 {
    margin: 0;
    color: #fff;
    font-family: "Arial Narrow", Impact, sans-serif;
    font-size: clamp(20px, 2vw, 28px);
    letter-spacing: .7px;
    line-height: 1;
    text-transform: uppercase;
}

body.cs16-v111-theme .topbar .subtitle {
    color: var(--zpc-muted);
    font-size: 11px;
    letter-spacing: .2px;
}

body.cs16-v111-theme .account {
    padding-left: 16px;
    border-left: 1px solid var(--zpc-line-soft);
}

body.cs16-v111-theme .account strong {
    color: #fff;
}

body.cs16-v111-theme .account span {
    color: var(--zpc-muted);
    letter-spacing: .7px;
}

body.cs16-v111-theme .kgb-realtime-badge {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(var(--cs16-accent-rgb), .37);
    border-radius: 9px;
    color: #ff7f94;
    background: rgba(var(--cs16-accent-rgb), .08);
    box-shadow: inset 0 1px rgba(255, 255, 255, .03);
}

body.cs16-v111-theme .kgb-realtime-dot {
    background: var(--zpc-green);
    box-shadow: 0 0 13px rgba(46, 230, 166, .9);
}

body.cs16-v111-theme .kgb-realtime-clock {
    color: #8794a8;
}

body.cs16-v111-theme .zpc-live-frequency {
    display: inline-grid;
    min-width: 35px;
    min-height: 20px;
    margin-left: 4px;
    place-items: center;
    border: 1px solid rgba(46, 230, 166, .24);
    border-radius: 999px;
    color: var(--zpc-green);
    background: rgba(46, 230, 166, .07);
    font: 850 8px/1 Consolas, monospace;
    letter-spacing: .6px;
}

body.cs16-v111-theme .main > .page {
    padding: clamp(16px, 2vw, 30px);
}

/* ---------- Shared panels / controls ---------- */
body.cs16-v111-theme :is(
    .box,
    .stat-card,
    .command-server-shell,
    .v5-card,
    .v6-card,
    .v7-card,
    .v8-panel,
    .v8-list-card,
    .v9-list-card,
    .api10-panel,
    .v10-card,
    .db-card
) {
    border-color: var(--zpc-line);
    border-radius: var(--zpc-radius);
    background:
        linear-gradient(155deg, rgba(15, 22, 34, .94), rgba(7, 11, 18, .96));
    box-shadow:
        0 18px 50px rgba(0, 0, 0, .24),
        inset 0 1px rgba(255, 255, 255, .035);
}

body.cs16-v111-theme :is(
    .box,
    .v5-card,
    .v6-card,
    .v7-card,
    .v8-panel,
    .v8-list-card,
    .v9-list-card,
    .api10-panel,
    .v10-card,
    .db-card
):hover {
    border-color: rgba(148, 164, 190, .30);
}

body.cs16-v111-theme :is(
    .primary-button,
    .v5-button,
    .v6-button,
    .v7-button,
    .v8-button,
    .v9-button,
    .api10-button,
    .v10-button,
    .db-button,
    .integration-action-button
) {
    border-radius: 9px;
    font-weight: 800;
    letter-spacing: .35px;
    transition: transform .16s ease, filter .16s ease, border-color .16s ease, background .16s ease;
}

body.cs16-v111-theme :is(
    .primary-button,
    .v5-button.primary,
    .v6-button.primary,
    .v7-button.primary,
    .v8-button.primary,
    .v9-button.primary,
    .api10-button.primary,
    .v10-button.primary,
    .db-button.primary,
    .integration-action-button.primary
) {
    border-color: rgba(255, 101, 126, .55);
    color: #fff;
    background: linear-gradient(100deg, var(--cs16-accent-deep), var(--cs16-accent) 60%, var(--cs16-accent-alt));
    box-shadow: 0 10px 24px rgba(var(--cs16-accent-rgb), .14);
}

body.cs16-v111-theme :is(
    .primary-button,
    .v5-button,
    .v6-button,
    .v7-button,
    .v8-button,
    .v9-button,
    .api10-button,
    .v10-button,
    .db-button,
    .integration-action-button
):hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

body.cs16-v111-theme :is(
    .v5-button.success,
    .v6-button.success,
    .v7-button.success,
    .v8-button.success,
    .v9-button.success
) {
    border-color: rgba(46, 230, 166, .38);
    color: var(--zpc-green);
    background: rgba(46, 230, 166, .08);
}

body.cs16-v111-theme :is(
    .v5-button.danger,
    .v6-button.danger,
    .v7-button.danger,
    .v8-button.danger,
    .v9-button.danger
) {
    border-color: rgba(255, 91, 114, .42);
    color: #ff8295;
    background: rgba(var(--cs16-accent-rgb), .09);
}

/* ---------- Dashboard command surface ---------- */
body.cs16-v111-theme #dashboardPage {
    max-width: 1920px;
    margin: 0 auto;
}

body.cs16-v111-theme .command-dashboard {
    --command-bg: var(--zpc-bg);
    --command-panel: var(--zpc-panel);
    --command-panel-2: var(--zpc-panel-2);
    --command-panel-3: var(--zpc-panel-3);
    --command-line: var(--zpc-line);
    --command-line-soft: var(--zpc-line-soft);
    --command-text: var(--zpc-text);
    --command-muted: var(--zpc-muted);
    --command-amber: var(--zpc-red);
    --command-orange: var(--zpc-orange);
    --command-olive: var(--zpc-red);
    --command-green: var(--zpc-green);
    --command-red: var(--zpc-danger);
    --command-blue: var(--zpc-cyan);
    gap: 18px;
}

body.cs16-v111-theme .command-server-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--zpc-line);
    border-radius: 18px;
    background:
        radial-gradient(circle at 90% -20%, rgba(var(--cs16-accent-rgb), .15), transparent 31rem),
        radial-gradient(circle at 10% 110%, rgba(var(--cs16-highlight-rgb), .07), transparent 26rem),
        linear-gradient(145deg, rgba(14, 20, 31, .98), rgba(5, 8, 13, .99));
    box-shadow: var(--zpc-shadow), inset 0 1px rgba(255, 255, 255, .04);
}

body.cs16-v111-theme .command-server-shell::before {
    height: 3px;
    background: linear-gradient(90deg, var(--zpc-red), var(--zpc-orange) 38%, var(--zpc-violet) 70%, transparent 96%);
    box-shadow: 0 0 18px rgba(var(--cs16-accent-rgb), .28);
}

body.cs16-v111-theme .command-server-shell::after {
    content: "CS 1.6 // LIVE COMMAND";
    display: block;
    top: 17px;
    right: 20px;
    color: rgba(255, 75, 104, .24);
    font: 850 8px/1 Consolas, monospace;
    letter-spacing: 1.65px;
}

body.cs16-v111-theme .command-server-header {
    min-height: 82px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--zpc-line-soft);
    background: linear-gradient(90deg, rgba(var(--cs16-accent-rgb), .035), transparent 42%);
}

body.cs16-v111-theme .command-server-header h2 {
    color: #fff;
    font-family: "Arial Narrow", Impact, sans-serif;
    font-size: clamp(22px, 2.4vw, 31px);
    letter-spacing: .65px;
}

body.cs16-v111-theme .command-server-header p {
    color: var(--zpc-muted);
}

body.cs16-v111-theme .server-picker {
    min-width: min(100%, 390px);
}

body.cs16-v111-theme .server-picker label {
    color: #c6cfdd;
}

body.cs16-v111-theme .server-picker select {
    min-height: 42px;
    border-color: var(--zpc-line);
    border-radius: 10px;
    background-color: rgba(4, 8, 14, .88);
    color: #fff;
}

body.cs16-v111-theme .command-server-tabs {
    gap: 0;
    padding: 0 12px;
    border-bottom: 1px solid var(--zpc-line-soft);
    background: rgba(3, 6, 10, .72);
}

body.cs16-v111-theme .cs16-server-header-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    padding: 0;
}

body.cs16-v111-theme .cs16-server-nav {
    min-width: 0;
    padding: 0 10px;
    overflow-x: auto;
    background: transparent;
}

body.cs16-v111-theme :is(.command-server-tabs button, .cs16-server-nav-button) {
    min-height: 48px;
    padding: 0 13px;
    color: #8996aa;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .65px;
}

body.cs16-v111-theme :is(.command-server-tabs button, .cs16-server-nav-button)::after {
    height: 2px;
    background: linear-gradient(90deg, var(--zpc-red), var(--zpc-orange));
    box-shadow: 0 0 15px rgba(var(--cs16-accent-rgb), .50);
}

body.cs16-v111-theme :is(.command-server-tabs button, .cs16-server-nav-button):hover {
    color: #e9eef7;
    background: rgba(var(--cs16-highlight-rgb), .035);
}

body.cs16-v111-theme :is(.command-server-tabs button, .cs16-server-nav-button).active {
    color: #fff;
    background: linear-gradient(180deg, rgba(var(--cs16-accent-rgb), .10), transparent);
}

body.cs16-v111-theme .cs16-server-actions {
    padding: 7px 10px;
    border-left: 1px solid var(--zpc-line-soft);
    background: rgba(5, 8, 13, .84);
}

body.cs16-v111-theme .cs16-server-action {
    min-height: 34px;
    border-color: var(--zpc-line);
    border-radius: 8px;
    color: #a8b3c3;
    background: rgba(255, 255, 255, .025);
}

body.cs16-v111-theme .cs16-server-action:hover:not(:disabled) {
    color: #fff;
    border-color: rgba(var(--cs16-highlight-rgb), .40);
    background: rgba(var(--cs16-highlight-rgb), .08);
}

body.cs16-v111-theme .cs16-server-action.is-start {
    color: var(--zpc-green);
    border-color: rgba(46, 230, 166, .24);
}

body.cs16-v111-theme .cs16-server-action.is-danger,
body.cs16-v111-theme .cs16-server-action.is-reinstall {
    color: #ff6f87;
    border-color: rgba(var(--cs16-accent-rgb), .30);
}

body.cs16-v111-theme .cs16-server-action.is-copy {
    color: var(--zpc-cyan);
    border-color: rgba(var(--cs16-highlight-rgb), .26);
}

body.cs16-v111-theme .command-layout {
    gap: 15px;
    padding: 15px;
    grid-template-columns: minmax(285px, .82fr) minmax(520px, 1.65fr);
}

body.cs16-v111-theme :is(.command-info-card, .command-chart-card, .command-live-card) {
    border: 1px solid var(--zpc-line);
    border-radius: 14px;
    background:
        linear-gradient(150deg, rgba(14, 21, 33, .94), rgba(6, 10, 16, .97));
    box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

body.cs16-v111-theme :is(.command-info-card, .command-chart-card, .command-live-card) > header {
    min-height: 50px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--zpc-line-soft);
}

body.cs16-v111-theme :is(.command-info-card, .command-chart-card, .command-live-card) > header h3 {
    color: #fff;
    font: 850 10px/1.2 Consolas, monospace;
    letter-spacing: .65px;
}

body.cs16-v111-theme .command-info-card {
    border-top: 2px solid var(--zpc-red);
}

body.cs16-v111-theme .command-chart-card {
    border-top: 2px solid var(--zpc-orange);
}

body.cs16-v111-theme .command-live-card {
    border-top: 2px solid var(--zpc-cyan);
}

body.cs16-v111-theme .command-info-list > div {
    border-bottom-color: var(--zpc-line-soft);
}

body.cs16-v111-theme .command-info-list dt {
    color: #6f7d91;
}

body.cs16-v111-theme .command-info-list dd {
    color: #edf2f8;
}

body.cs16-v111-theme .players-chart {
    background:
        linear-gradient(rgba(var(--cs16-highlight-rgb), .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--cs16-highlight-rgb), .035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(var(--cs16-accent-rgb), .035), transparent);
    background-size: 100% 25%, 20% 100%, auto;
}

body.cs16-v111-theme .chart-line {
    stroke: var(--zpc-red);
    filter: drop-shadow(0 0 6px rgba(var(--cs16-accent-rgb), .52));
}

body.cs16-v111-theme .chart-line-fill {
    fill: rgba(var(--cs16-accent-rgb), .11);
}

body.cs16-v111-theme .chart-point {
    fill: #ff5c76;
    filter: drop-shadow(0 0 6px rgba(var(--cs16-accent-rgb), .8));
}

body.cs16-v111-theme .command-live-grid {
    background: var(--zpc-line-soft);
    gap: 1px;
}

body.cs16-v111-theme .command-live-grid > div {
    min-height: 124px;
    padding: 18px;
    background:
        radial-gradient(circle at 100% 100%, rgba(var(--cs16-highlight-rgb), .055), transparent 11rem),
        linear-gradient(145deg, rgba(15, 22, 34, .97), rgba(8, 12, 19, .97));
}

body.cs16-v111-theme .command-live-grid > div:hover {
    background:
        radial-gradient(circle at 100% 100%, rgba(var(--cs16-accent-rgb), .08), transparent 12rem),
        linear-gradient(145deg, rgba(17, 25, 39, .98), rgba(8, 12, 19, .98));
}

body.cs16-v111-theme .command-live-grid small {
    color: #748197;
    letter-spacing: .8px;
}

body.cs16-v111-theme .command-live-value {
    color: #fff;
    font-family: "Arial Narrow", Impact, sans-serif;
    letter-spacing: .35px;
}

body.cs16-v111-theme .command-live-value[data-status="online"],
body.cs16-v111-theme .command-live-value.is-players {
    color: var(--zpc-green);
}

body.cs16-v111-theme .command-live-value.is-map {
    color: var(--zpc-red);
}

body.cs16-v111-theme .command-live-value.is-address {
    color: var(--zpc-cyan);
}

body.cs16-v111-theme .command-live-footer {
    min-height: 34px;
    border-top-color: var(--zpc-line-soft);
    color: #77849a;
    background: rgba(3, 6, 10, .65);
}

body.cs16-v111-theme #commandRefreshState[data-state="live"] {
    color: var(--zpc-green);
}

body.cs16-v111-theme .command-refresh {
    border-color: var(--zpc-line);
    border-radius: 8px;
    color: #c4ccda;
    background: rgba(255, 255, 255, .025);
}

/* ---------- Modular server pages ---------- */
body.cs16-v111-theme #serverDetailPage {
    max-width: 1920px;
    margin: 0 auto;
}

body.cs16-v111-theme .v5-detail-head {
    position: relative;
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid var(--zpc-line);
    border-radius: 15px 15px 0 0;
    background:
        radial-gradient(circle at 88% -40%, rgba(var(--cs16-accent-rgb), .16), transparent 22rem),
        linear-gradient(145deg, rgba(15, 22, 34, .98), rgba(7, 11, 18, .98));
}

body.cs16-v111-theme .v5-detail-head::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(90deg, var(--zpc-red), var(--zpc-orange), transparent 74%);
}

body.cs16-v111-theme .v5-back-button {
    border-radius: 9px;
    color: #c6cfdd;
    border-color: var(--zpc-line);
    background: rgba(255, 255, 255, .025);
}

body.cs16-v111-theme .v5-detail-title h2 {
    color: #fff;
    font-family: "Arial Narrow", Impact, sans-serif;
    letter-spacing: .45px;
}

body.cs16-v111-theme .v5-access-badge,
body.cs16-v111-theme .v5-shared-badge {
    border-color: rgba(46, 230, 166, .30);
    color: var(--zpc-green);
    background: rgba(46, 230, 166, .08);
}

body.cs16-v111-theme .v5-detail-global-alert {
    border-radius: 0;
}

body.cs16-v111-theme .v5-server-strip {
    gap: 12px;
    margin-top: 0;
    padding: 12px 15px;
    border: 1px solid var(--zpc-line);
    border-top: 0;
    background: rgba(6, 9, 15, .90);
}

body.cs16-v111-theme .v5-status {
    border-radius: 999px;
}

body.cs16-v111-theme .v5-status.online {
    color: var(--zpc-green);
    border-color: rgba(46, 230, 166, .32);
    background: rgba(46, 230, 166, .08);
}

body.cs16-v111-theme .v5-detail-tabs {
    gap: 3px;
    margin: 0;
    padding: 7px 10px 0;
    overflow-x: auto;
    border: 1px solid var(--zpc-line);
    border-top: 0;
    border-radius: 0 0 13px 13px;
    background: rgba(5, 8, 13, .86);
}

body.cs16-v111-theme .v5-detail-tab {
    min-height: 42px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    color: #8996aa;
    background: transparent;
}

body.cs16-v111-theme .v5-detail-tab:hover {
    color: #edf2f8;
    background: rgba(var(--cs16-highlight-rgb), .045);
}

body.cs16-v111-theme .v5-detail-tab.active {
    color: #fff;
    border-bottom-color: var(--zpc-red);
    background: linear-gradient(180deg, rgba(var(--cs16-accent-rgb), .11), transparent);
    box-shadow: 0 10px 20px rgba(var(--cs16-accent-rgb), .04);
}

body.cs16-v111-theme .v5-module-stack {
    margin-top: 14px;
}

body.cs16-v111-theme .v5-tab-panel {
    border: 1px solid var(--zpc-line);
    border-radius: 15px;
    background:
        linear-gradient(155deg, rgba(13, 19, 30, .92), rgba(5, 8, 13, .96));
    box-shadow: 0 18px 50px rgba(0, 0, 0, .20);
}

body.cs16-v111-theme .v5-metric {
    min-height: 112px;
    border-color: var(--zpc-line-soft);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(16, 24, 37, .95), rgba(8, 12, 19, .96));
}

body.cs16-v111-theme .v5-metric small {
    color: #748197;
}

body.cs16-v111-theme .v5-metric strong {
    color: #fff;
}

body.cs16-v111-theme .v5-console {
    border-color: rgba(var(--cs16-highlight-rgb), .18);
    border-radius: 10px;
    color: #cce8ff;
    background:
        linear-gradient(rgba(var(--cs16-highlight-rgb), .025) 1px, transparent 1px),
        #03070d;
    background-size: 100% 24px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, .52);
}

body.cs16-v111-theme .v5-command-bar,
body.cs16-v111-theme .v5-files-toolbar,
body.cs16-v111-theme .v5-toolbar {
    border-color: var(--zpc-line);
    border-radius: 11px;
    background: rgba(6, 10, 16, .84);
}

body.cs16-v111-theme :is(.v5-files-table, .v5-server-table-wrap, .v7-table-wrap, .v9-table-wrap) {
    border-color: var(--zpc-line);
    border-radius: 12px;
    background: rgba(5, 8, 13, .74);
}

/* ---------- Feature modules ---------- */
body.cs16-v111-theme :is(
    .v5-page-head,
    .v6-page-head,
    .v7-page-head,
    .v8-page-head,
    .v9-page-head,
    .api10-page-head,
    .v10-page-head,
    .db-page-head
) {
    position: relative;
    margin-bottom: 16px;
    padding: 18px 18px 17px;
    overflow: hidden;
    border: 1px solid var(--zpc-line);
    border-radius: 15px;
    background:
        radial-gradient(circle at 88% -70%, rgba(var(--cs16-accent-rgb), .18), transparent 25rem),
        linear-gradient(145deg, rgba(15, 22, 34, .96), rgba(7, 11, 18, .98));
}

body.cs16-v111-theme :is(
    .v5-page-head,
    .v6-page-head,
    .v7-page-head,
    .v8-page-head,
    .v9-page-head,
    .api10-page-head,
    .v10-page-head,
    .db-page-head
)::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--zpc-red), var(--zpc-orange), var(--zpc-violet), transparent 88%);
}

body.cs16-v111-theme :is(
    .v5-page-head,
    .v6-page-head,
    .v7-page-head,
    .v8-page-head,
    .v9-page-head,
    .api10-page-head,
    .v10-page-head,
    .db-page-head
) h1,
body.cs16-v111-theme :is(
    .v5-page-head,
    .v6-page-head,
    .v7-page-head,
    .v8-page-head,
    .v9-page-head,
    .api10-page-head,
    .v10-page-head,
    .db-page-head
) h2 {
    color: #fff;
    font-family: "Arial Narrow", Impact, sans-serif;
    letter-spacing: .55px;
    text-transform: uppercase;
}

body.cs16-v111-theme :is(
    .v6-summary-grid,
    .v7-summary-grid,
    .v8-stats,
    .v9-stats,
    .api10-stats,
    .db-summary-grid,
    .v5-summary-grid
) > * {
    border-color: var(--zpc-line);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(15, 22, 34, .96), rgba(7, 11, 18, .97));
}

body.cs16-v111-theme :is(
    .v6-table-row,
    .v7-table-row,
    .v8-egg-row,
    .v9-user-table tbody tr,
    .api10-token-card,
    .v5-collaborator-card,
    .db-admin-table tbody tr
):hover {
    background: rgba(var(--cs16-highlight-rgb), .035);
}

body.cs16-v111-theme :is(
    .v6-overlay,
    .v7-overlay,
    .v8-modal,
    .v9-modal,
    .api10-modal,
    .v10-modal,
    .v5-editor-overlay,
    .v5-delete-overlay
) {
    background: rgba(1, 3, 7, .78);
    backdrop-filter: blur(12px);
}

body.cs16-v111-theme :is(
    .v6-modal-card,
    .v7-modal-card,
    .v8-modal-card,
    .v9-modal-card,
    .api10-modal-card,
    .v10-modal-card,
    .v5-editor-card,
    .v5-delete-dialog
) {
    border-color: var(--zpc-line);
    border-radius: 17px;
    background: linear-gradient(155deg, #111925, #070b12);
    box-shadow: 0 35px 110px rgba(0, 0, 0, .58);
}

/* ---------- Template picker ---------- */
body.cs16-v111-theme .cs-template-trigger {
    border-color: rgba(var(--cs16-accent-rgb), .28);
    border-radius: 11px;
    background: linear-gradient(90deg, rgba(var(--cs16-accent-rgb), .10), rgba(var(--cs16-highlight-rgb), .035));
}

body.cs16-v111-theme .cs-template-trigger-icon {
    color: #fff;
    background: linear-gradient(145deg, var(--zpc-red), var(--zpc-orange));
    box-shadow: 0 0 18px rgba(var(--cs16-accent-rgb), .24);
}

body.cs16-v111-theme .cs-template-dialog {
    border-color: var(--zpc-line);
    border-radius: 20px;
    background: linear-gradient(155deg, #111925, #070b12);
}

body.cs16-v111-theme .cs-template-option.is-active {
    border-color: rgba(var(--cs16-accent-rgb), .62);
    box-shadow: 0 0 0 2px rgba(var(--cs16-accent-rgb), .10), 0 20px 42px rgba(0, 0, 0, .27);
}

/* ---------- Mobile navigation ---------- */
.zpc-mobile-menu-button,
.zpc-sidebar-backdrop {
    display: none;
}

body.cs16-v111-theme .zpc-mobile-menu-button {
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--zpc-line);
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
}

body.cs16-v111-theme .zpc-mobile-menu-button span,
body.cs16-v111-theme .zpc-mobile-menu-button::before,
body.cs16-v111-theme .zpc-mobile-menu-button::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
}

body.cs16-v111-theme .zpc-mobile-menu-button::before,
body.cs16-v111-theme .zpc-mobile-menu-button::after {
    content: "";
}

body.cs16-v111-theme .zpc-mobile-menu-button span {
    margin: 4px 0;
}

body.cs16-v111-theme.zpc-sidebar-open .zpc-mobile-menu-button span {
    opacity: 0;
}

body.cs16-v111-theme.zpc-sidebar-open .zpc-mobile-menu-button::before {
    transform: translateY(6px) rotate(45deg);
}

body.cs16-v111-theme.zpc-sidebar-open .zpc-mobile-menu-button::after {
    transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 1480px) {
    body.cs16-v111-theme {
        --zpc-sidebar: 240px;
    }

    body.cs16-v111-theme .command-layout {
        grid-template-columns: minmax(260px, .78fr) minmax(470px, 1.55fr);
    }

    body.cs16-v111-theme .cs16-server-action b {
        display: none;
    }

    body.cs16-v111-theme .cs16-server-action {
        min-width: 35px;
        padding-inline: 9px;
    }
}

@media (max-width: 1180px) {
    body.cs16-v111-theme .command-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.cs16-v111-theme .command-info-card,
    body.cs16-v111-theme .command-chart-card {
        grid-column: auto;
    }

    body.cs16-v111-theme .command-live-card {
        grid-column: auto;
        grid-row: auto;
    }

    body.cs16-v111-theme .cs16-server-header-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    body.cs16-v111-theme .cs16-server-actions {
        justify-content: flex-start;
        overflow-x: auto;
        border-top: 1px solid var(--zpc-line-soft);
        border-left: 0;
    }

    body.cs16-v111-theme .cs16-server-action b {
        display: inline;
    }
}

@media (max-width: 1024px) {
    body.cs16-v111-theme .sidebar {
        width: min(84vw, 310px);
        transform: translateX(-105%);
        transition: transform .24s ease;
        box-shadow: 28px 0 90px rgba(0, 0, 0, .54);
    }

    body.cs16-v111-theme.zpc-sidebar-open {
        overflow: hidden;
    }

    body.cs16-v111-theme.zpc-sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.cs16-v111-theme .main {
        width: 100%;
        margin-left: 0;
    }

    body.cs16-v111-theme .zpc-mobile-menu-button {
        display: grid;
        flex: 0 0 auto;
        order: -1;
    }

    body.cs16-v111-theme .zpc-sidebar-backdrop {
        position: fixed;
        z-index: 1150;
        inset: 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(1, 3, 7, .72);
        backdrop-filter: blur(6px);
        transition: opacity .22s ease, visibility .22s ease;
    }

    body.cs16-v111-theme.zpc-sidebar-open .zpc-sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    body.cs16-v111-theme .topbar {
        gap: 13px;
    }

    body.cs16-v111-theme .topbar > div:first-of-type {
        min-width: 0;
        flex: 1;
    }

    body.cs16-v111-theme .kgb-realtime-badge {
        margin-left: auto;
    }
}

@media (max-width: 760px) {
    body.cs16-v111-theme .main > .page {
        padding: 12px;
    }

    body.cs16-v111-theme .topbar {
        min-height: 66px;
        padding: 10px 12px;
    }

    body.cs16-v111-theme .topbar h2 {
        overflow: hidden;
        font-size: 20px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.cs16-v111-theme .topbar .subtitle {
        display: block;
        max-width: 47vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.cs16-v111-theme .account > div:first-child {
        display: none;
    }

    body.cs16-v111-theme .account {
        padding-left: 7px;
        border-left: 0;
    }

    body.cs16-v111-theme .avatar {
        width: 38px;
        height: 38px;
    }

    body.cs16-v111-theme .kgb-realtime-badge > span:nth-child(2) {
        display: none;
    }

    body.cs16-v111-theme .kgb-realtime-badge {
        padding-inline: 9px;
    }

    body.cs16-v111-theme .command-server-shell {
        border-radius: 14px;
    }

    body.cs16-v111-theme .command-server-shell::after {
        display: none;
    }

    body.cs16-v111-theme .command-server-header {
        align-items: stretch;
        flex-direction: column;
        min-height: 0;
        padding: 17px 14px 13px;
    }

    body.cs16-v111-theme .server-picker {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    body.cs16-v111-theme .server-picker select {
        min-width: 0;
    }

    body.cs16-v111-theme .command-layout {
        gap: 11px;
        padding: 10px;
    }

    body.cs16-v111-theme .command-live-grid {
        grid-template-columns: 1fr 1fr;
    }

    body.cs16-v111-theme .command-live-grid > div {
        min-height: 105px;
        padding: 14px;
    }

    body.cs16-v111-theme .command-live-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding: 9px 12px;
    }

    body.cs16-v111-theme .cs16-server-actions {
        padding: 7px 8px;
    }

    body.cs16-v111-theme .cs16-server-action b {
        display: none;
    }

    body.cs16-v111-theme .v5-detail-head,
    body.cs16-v111-theme .v5-server-strip {
        align-items: stretch;
        flex-direction: column;
    }

    body.cs16-v111-theme .v5-power-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    body.cs16-v111-theme .v5-power-actions .v5-button {
        width: 100%;
    }

    body.cs16-v111-theme :is(input, select, textarea) {
        font-size: 16px;
    }

    body.cs16-v111-theme :is(
        .v5-page-head,
        .v6-page-head,
        .v7-page-head,
        .v8-page-head,
        .v9-page-head,
        .api10-page-head,
        .v10-page-head,
        .db-page-head
    ) {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }
}

@media (max-width: 520px) {
    body.cs16-v111-theme .login-page {
        padding: 13px;
    }

    body.cs16-v111-theme .login-card {
        padding: 29px 21px 23px;
        border-radius: 16px;
    }

    body.cs16-v111-theme .topbar .subtitle,
    body.cs16-v111-theme .zpc-live-frequency {
        display: none;
    }

    body.cs16-v111-theme .kgb-realtime-clock {
        font-size: 9px;
    }

    body.cs16-v111-theme .command-live-grid {
        grid-template-columns: 1fr;
    }

    body.cs16-v111-theme .command-live-grid > div {
        min-height: 94px;
    }

    body.cs16-v111-theme .v5-power-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.cs16-v111-theme .cs16-server-nav-button {
        padding-inline: 11px;
    }

    body.cs16-v111-theme .cs16-server-action {
        min-width: 38px;
        min-height: 36px;
    }
}

@media (hover: none) {
    body.cs16-v111-theme :is(button, .nav-item):hover {
        transform: none;
    }
}

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

/* --------------------------------------------------------------------------
   v11.1 global CS 1.6 branding
   -------------------------------------------------------------------------- */
body.cs16-v111-theme .cs16-global-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: var(--cs16-logo-filter);
    user-select: none;
}

body.cs16-v111-theme #panelPage .brand {
    min-height: 84px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.cs16-v111-theme .cs16-sidebar-logo {
    width: min(218px, 100%);
    max-height: 68px;
}

body.cs16-v111-theme #loginPage .logo-box {
    width: 100%;
    margin: 0 0 30px;
    display: flex;
    justify-content: center;
}

body.cs16-v111-theme .cs16-login-logo {
    width: min(360px, 92vw);
    max-height: 104px;
}

body.cs16-v111-theme .cs16-top-brand {
    display: none;
    align-items: center;
    gap: 9px;
    min-width: max-content;
    color: var(--zpc-text);
    font: 900 13px/1 Arial, sans-serif;
    letter-spacing: .08em;
}

body.cs16-v111-theme .cs16-top-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    filter: var(--cs16-logo-filter);
}

body.cs16-v111-theme .cs16-brand-loading {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    place-items: center;
    align-content: center;
    gap: 18px;
    background:
        radial-gradient(circle at 50% 40%, rgba(var(--cs16-accent-rgb), .11), transparent 28rem),
        var(--zpc-bg);
    transition: opacity .22s ease, visibility .22s ease;
}

body.portal-loading.cs16-v111-theme .cs16-brand-loading {
    display: grid;
}

body.cs16-v111-theme .cs16-brand-loading img {
    width: min(390px, 78vw);
    filter: var(--cs16-logo-filter);
}

body.cs16-v111-theme .cs16-brand-loading span {
    color: var(--zpc-muted);
    font: 800 10px/1.2 Consolas, monospace;
    letter-spacing: 2.4px;
}

body.cs16-v111-theme .cs16-brand-loading i {
    width: min(340px, 68vw);
    height: 3px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255,255,255,.07);
}

body.cs16-v111-theme .cs16-brand-loading i::after {
    content: "";
    display: block;
    width: 34%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--cs16-accent), var(--cs16-accent-alt), transparent);
    animation: cs16-brand-load 1s linear infinite;
}

@keyframes cs16-brand-load {
    from { transform: translateX(-120%); }
    to { transform: translateX(360%); }
}

/* Theme-specific material character. */
body.cs-template-classic-tactical :is(.stat-card, .command-server-shell, .v5-detail-shell, .command-status-panel, .modal-card) {
    box-shadow: inset 0 1px rgba(255,255,255,.035), 0 14px 34px rgba(2, 8, 18, .20);
}

body.cs-template-classic-tactical .main {
    background:
        radial-gradient(circle at 76% 0%, rgba(79, 141, 255, .08), transparent 30rem),
        linear-gradient(145deg, #0c131e, #0a1018 55%, #0d1520);
}

body.cs-template-red-neon :is(.nav-item.active, .command-tab.is-active, .v5-detail-tab.active, .cs-template-trigger) {
    box-shadow: 0 0 0 1px rgba(255,54,87,.12), 0 0 24px rgba(255,54,87,.10);
}

body.cs-template-red-neon .main {
    background:
        radial-gradient(circle at 88% -8%, rgba(255, 54, 87, .13), transparent 34rem),
        radial-gradient(circle at 10% 70%, rgba(128, 20, 48, .075), transparent 28rem),
        #060608;
}

body.cs-template-titan-gold :is(.stat-card, .command-server-shell, .v5-detail-shell, .command-status-panel, .modal-card) {
    border-radius: 6px;
    box-shadow: inset 0 1px rgba(255,255,255,.035), 0 15px 40px rgba(0,0,0,.30);
}

body.cs-template-titan-gold .main {
    background:
        radial-gradient(circle at 85% -10%, rgba(233, 185, 73, .08), transparent 34rem),
        linear-gradient(145deg, #0b0c0a, #080907 55%, #0e0f0c);
}

body.cs-template-titan-gold :is(.page-title h1, .command-server-heading h2, .v5-detail-title) {
    letter-spacing: .015em;
}

/* --------------------------------------------------------------------------
   Template picker — exactly three templates
   -------------------------------------------------------------------------- */
body.cs-template-picker-open {
    overflow: hidden;
}

body.cs16-v111-theme .cs-template-trigger {
    width: calc(100% - 24px);
    min-height: 62px;
    margin: auto 12px 10px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--zpc-line);
    border-radius: 10px;
    color: var(--zpc-text);
    background: linear-gradient(145deg, rgba(var(--cs16-accent-rgb), .08), rgba(255,255,255,.018));
    cursor: pointer;
    text-align: left;
}

body.cs16-v111-theme .cs-template-trigger:hover {
    border-color: rgba(var(--cs16-accent-rgb), .52);
    transform: translateY(-1px);
}

body.cs16-v111-theme .cs-template-trigger > img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    filter: var(--cs16-logo-filter);
}

body.cs16-v111-theme .cs-template-trigger-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

body.cs16-v111-theme .cs-template-trigger-copy small {
    color: var(--zpc-dim);
    font: 800 8px/1 Consolas, monospace;
    letter-spacing: 1.5px;
}

body.cs16-v111-theme .cs-template-trigger-copy strong {
    overflow: hidden;
    color: var(--zpc-text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.cs16-v111-theme .cs-template-trigger-arrow {
    color: var(--zpc-red);
    font-size: 22px;
}

.cs-template-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 4, 8, .80);
    backdrop-filter: blur(14px);
}

.cs-template-overlay.hidden {
    display: none;
}

.cs-template-dialog {
    width: min(1120px, 100%);
    max-height: min(820px, 92svh);
    overflow: auto;
    border: 1px solid var(--zpc-line);
    border-radius: 18px;
    background: linear-gradient(145deg, var(--zpc-panel-2), var(--zpc-bg-soft));
    box-shadow: 0 38px 120px rgba(0,0,0,.68);
}

.cs-template-dialog-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 24px 26px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--zpc-line);
    background: rgba(8, 11, 17, .94);
    backdrop-filter: blur(18px);
}

.cs-template-dialog-head small {
    color: var(--zpc-red);
    font: 800 9px/1 Consolas, monospace;
    letter-spacing: 2px;
}

.cs-template-dialog-head h2 {
    margin: 8px 0 5px;
    color: var(--zpc-text);
    font-size: clamp(21px, 2vw, 30px);
}

.cs-template-dialog-head p {
    margin: 0;
    color: var(--zpc-muted);
    font-size: 13px;
}

.cs-template-close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--zpc-line);
    border-radius: 10px;
    color: var(--zpc-text);
    background: rgba(255,255,255,.025);
    cursor: pointer;
    font-size: 25px;
}

.cs-template-grid {
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cs-template-customizer {
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(250px, .62fr) minmax(560px, 1.38fr);
    gap: 18px;
    align-items: stretch;
}

.cs-template-preview-card {
    min-width: 0;
    padding: 14px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 13px;
    border: 1px solid rgba(var(--cs16-accent-rgb), .30);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(var(--cs16-accent-rgb), .09), rgba(255,255,255,.018)),
        var(--zpc-panel);
}

.cs-template-preview-head {
    display: grid;
    gap: 6px;
}

.cs-template-preview-head small {
    color: var(--zpc-red);
    font: 800 9px/1 Consolas, monospace;
    letter-spacing: 1.8px;
}

.cs-template-preview-head strong {
    color: var(--zpc-text);
    font-size: 17px;
}

.cs-template-customizer .cs-template-preview-card .cs-template-mini {
    height: 100%;
    min-height: 170px;
}

.cs-template-customizer .cs-template-accent {
    margin: 0;
    grid-template-columns: 1fr;
    align-content: center;
}

.cs-template-customizer .cs-template-accent-status {
    grid-column: 1;
}

.cs-template-accent {
    margin: 0 24px 24px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(220px, .72fr) minmax(440px, 1.55fr);
    gap: 18px 24px;
    align-items: center;
    border: 1px solid rgba(var(--cs16-accent-rgb), .30);
    border-radius: 14px;
    background:
        linear-gradient(120deg, rgba(var(--cs16-accent-rgb), .12), rgba(255,255,255,.018) 48%),
        var(--zpc-panel);
    box-shadow: inset 0 1px rgba(255,255,255,.035);
}

.cs-template-accent-copy {
    min-width: 0;
}

.cs-template-accent-copy small {
    color: var(--zpc-red);
    font: 800 9px/1 Consolas, monospace;
    letter-spacing: 1.8px;
}

.cs-template-accent-copy h3 {
    margin: 7px 0 5px;
    color: var(--zpc-text);
    font-size: 18px;
}

.cs-template-accent-copy p {
    margin: 0;
    color: var(--zpc-muted);
    font-size: 11px;
    line-height: 1.55;
}

.cs-template-accent-controls {
    min-width: 0;
    display: grid;
    grid-template-columns: 74px minmax(222px, 1fr) 112px auto;
    gap: 9px;
    align-items: end;
}

.cs-template-color-picker,
.cs-template-hex-field,
.cs-template-rgb-fields label {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.cs-template-color-picker > span,
.cs-template-hex-field > span,
.cs-template-rgb-fields label > span {
    color: var(--zpc-dim);
    font: 800 8px/1 Consolas, monospace;
    letter-spacing: 1.2px;
}

.cs-template-color-picker input,
.cs-template-hex-field input,
.cs-template-rgb-fields input {
    height: 42px;
    min-width: 0;
    width: 100%;
    border: 1px solid var(--zpc-line);
    border-radius: 8px;
    color: var(--zpc-text);
    background: rgba(4, 7, 11, .64);
    box-shadow: inset 0 1px 4px rgba(0,0,0,.20);
}

.cs-template-color-picker input {
    padding: 4px;
    cursor: pointer;
}

.cs-template-color-picker input::-webkit-color-swatch-wrapper { padding: 0; }
.cs-template-color-picker input::-webkit-color-swatch {
    border: 0;
    border-radius: 5px;
}

.cs-template-rgb-fields {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(62px, 1fr));
    gap: 7px;
}

.cs-template-rgb-fields input,
.cs-template-hex-field input {
    padding: 0 10px;
    font: 800 13px/1 Consolas, monospace;
}

.cs-template-rgb-fields input:focus,
.cs-template-hex-field input:focus,
.cs-template-color-picker input:focus-visible {
    outline: none;
    border-color: var(--zpc-red);
    box-shadow: 0 0 0 3px rgba(var(--cs16-accent-rgb), .14);
}

.cs-template-accent-reset {
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid var(--zpc-line);
    border-radius: 8px;
    color: var(--zpc-text);
    background: rgba(255,255,255,.035);
    cursor: pointer;
    font: 800 9px/1.1 Consolas, monospace;
    letter-spacing: .7px;
    white-space: nowrap;
}

.cs-template-accent-reset:hover {
    border-color: rgba(var(--cs16-accent-rgb), .56);
    background: rgba(var(--cs16-accent-rgb), .11);
}

.cs-template-accent-status {
    grid-column: 2;
    min-height: 14px;
    color: var(--zpc-muted);
    font: 700 10px/1.4 Consolas, monospace;
}

.cs-template-option {
    position: relative;
    min-width: 0;
    padding: 12px;
    display: grid;
    gap: 13px;
    border: 1px solid var(--zpc-line);
    border-radius: 14px;
    color: var(--zpc-text);
    background: rgba(255,255,255,.018);
    cursor: pointer;
    text-align: left;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.cs-template-option:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--cs16-accent-rgb), .55);
}

.cs-template-option.is-active {
    border-color: var(--zpc-red);
    box-shadow: 0 0 0 2px rgba(var(--cs16-accent-rgb), .10), 0 20px 46px rgba(0,0,0,.32);
}

.cs-template-check {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 25px;
    height: 25px;
    display: none;
    place-items: center;
    border-radius: 50%;
    color: #07110d;
    background: #2ee6a6;
    font-weight: 900;
}

.cs-template-option.is-active .cs-template-check {
    display: grid;
}

.cs-template-copy {
    display: grid;
    gap: 6px;
}

.cs-template-copy strong {
    font-size: 17px;
}

.cs-template-copy > span {
    color: var(--zpc-muted);
    font-size: 12px;
    line-height: 1.55;
}

.cs-template-mini {
    height: 160px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 24% 1fr;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
    background: #090b10;
}

.cs-template-mini-side,
.cs-template-mini-main,
.cs-template-mini-cards {
    display: grid;
}

.cs-template-mini-side {
    padding: 10px 7px;
    align-content: start;
    gap: 8px;
    border-right: 1px solid rgba(255,255,255,.08);
    background: #0d1118;
}

.cs-template-mini-logo {
    height: 19px;
    margin-bottom: 7px;
    border-radius: 4px;
    background: linear-gradient(90deg, #fff 0 18%, currentColor 18% 100%);
}

.cs-template-mini-nav {
    height: 10px;
    border-radius: 3px;
    background: rgba(255,255,255,.075);
}

.cs-template-mini-nav.active {
    background: color-mix(in srgb, currentColor 58%, transparent);
}

.cs-template-mini-main {
    padding: 10px;
    grid-template-rows: 13px 54px 1fr;
    gap: 9px;
}

.cs-template-mini-top,
.cs-template-mini-hero,
.cs-template-mini-cards > span {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 5px;
    background: rgba(255,255,255,.035);
}

.cs-template-mini-hero {
    border-color: color-mix(in srgb, currentColor 45%, transparent);
}

.cs-template-mini-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.cs-template-mini.is-classic { color: #4f8dff; background: #101925; }
.cs-template-mini.is-classic .cs-template-mini-side { background: #121d2b; }
.cs-template-mini.is-red { color: #ff3657; background: #090709; }
.cs-template-mini.is-red .cs-template-mini-side { background: #100a0d; }
.cs-template-mini.is-gold { color: #e9b949; background: #0d0e0b; }
.cs-template-mini.is-gold .cs-template-mini-side { background: #151510; }
.cs-template-mini.is-custom { color: var(--cs16-accent); background: #101925; }
.cs-template-mini.is-custom .cs-template-mini-side { background: #121d2b; }

.cs-template-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 100001;
    padding: 13px 16px;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    border: 1px solid var(--zpc-line);
    border-radius: 10px;
    color: var(--zpc-text);
    background: var(--zpc-panel-2);
    box-shadow: var(--zpc-shadow);
    transition: opacity .18s ease, transform .18s ease;
}

.cs-template-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

/* Mobile navigation shared by every template. */
.cs16-mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid var(--zpc-line);
    border-radius: 10px;
    background: rgba(255,255,255,.025);
    cursor: pointer;
}

.cs16-mobile-menu-button span,
.cs16-mobile-menu-button span::before,
.cs16-mobile-menu-button span::after {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 99px;
    background: var(--zpc-text);
}

.cs16-mobile-menu-button span {
    position: relative;
}

.cs16-mobile-menu-button span::before,
.cs16-mobile-menu-button span::after {
    content: "";
    position: absolute;
    left: 0;
}

.cs16-mobile-menu-button span::before { top: -6px; }
.cs16-mobile-menu-button span::after { top: 6px; }

.cs16-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 8999;
    display: none;
    border: 0;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(5px);
}

@media (max-width: 1024px) {
    body.cs16-v111-theme .cs16-mobile-menu-button {
        display: grid;
    }

    body.cs16-v111-theme .cs16-top-brand {
        display: flex;
    }

    body.cs16-v111-theme.cs16-sidebar-open .sidebar {
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    body.cs16-v111-theme.cs16-sidebar-open .cs16-sidebar-backdrop {
        display: block;
    }

    .cs-template-grid {
        grid-template-columns: 1fr;
    }

    .cs-template-customizer {
        grid-template-columns: 1fr;
    }

    .cs-template-mini {
        height: 150px;
    }

    .cs-template-accent {
        grid-template-columns: 1fr;
    }

    .cs-template-accent-status {
        grid-column: 1;
    }
}

@media (max-width: 760px) {
    .cs-template-overlay { padding: 10px; }
    .cs-template-dialog { max-height: 96svh; border-radius: 13px; }
    .cs-template-dialog-head { padding: 18px; }
    .cs-template-grid { padding: 14px; gap: 12px; }
    .cs-template-customizer { padding: 14px; gap: 12px; }
    .cs-template-accent { margin: 0 14px 14px; padding: 14px; }
    .cs-template-customizer .cs-template-accent { margin: 0; }
    .cs-template-accent-controls { grid-template-columns: 70px minmax(200px, 1fr) 104px; }
    .cs-template-accent-reset { grid-column: 1 / -1; }
    body.cs16-v111-theme .cs16-top-brand span { display: none; }
}

@media (max-width: 520px) {
    body.cs16-v111-theme .cs16-login-logo { width: min(315px, 88vw); }
    .cs-template-mini { height: 132px; }
    .cs-template-dialog-head p { display: none; }
    .cs-template-copy strong { font-size: 15px; }
    .cs-template-copy > span { font-size: 11px; }
    .cs-template-preview-card { padding: 11px; }
    .cs-template-customizer .cs-template-preview-card .cs-template-mini { min-height: 126px; }
    .cs-template-accent-controls { grid-template-columns: 66px minmax(0, 1fr); }
    .cs-template-rgb-fields { grid-template-columns: repeat(3, minmax(50px, 1fr)); }
    .cs-template-hex-field { grid-column: 1 / -1; }
    .cs-template-accent-copy p { display: none; }
}

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


/* CS16 v11.1.5 CLEAN IDENTITY START */
body.cs16-v111-theme .cs-template-trigger {
    grid-template-columns: minmax(0, 1fr) 18px;
}

body.cs16-v111-theme .cs-template-trigger > img {
    display: none !important;
}

body.cs16-v111-theme .avatar.cs16-user-initial-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 28%, rgba(255,255,255,.14), transparent 35%),
        linear-gradient(145deg, rgba(var(--cs16-accent-rgb), .22), rgba(7,10,16,.96));
}

body.cs16-v111-theme .avatar.cs16-user-initial-avatar img {
    display: none !important;
}

body.cs16-v111-theme .cs16-user-initials {
    display: block;
    color: #fff;
    font: 900 13px/1 "Arial Narrow", Arial, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(var(--cs16-accent-rgb), .45);
}

@media (max-width: 1024px) {
    body.cs16-v111-theme .avatar.cs16-user-initial-avatar {
        width: 38px;
        height: 38px;
    }
}
/* CS16 v11.1.5 CLEAN IDENTITY END */

/* Crimson Ops responsive navigation contract. */
@media (min-width: 721px) and (max-width: 1024px) {
    body.cs16-v111-theme .sidebar {
        width: 76px;
        padding: 14px 10px;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    body.cs16-v111-theme .main {
        width: calc(100% - 76px);
        margin-left: 76px;
    }

    body.cs16-v111-theme :is(.cs16-mobile-menu-button, .zpc-mobile-menu-button),
    body.cs16-v111-theme :is(.cs16-sidebar-backdrop, .zpc-sidebar-backdrop) {
        display: none;
    }

    body.cs16-v111-theme .brand {
        min-height: 52px;
        margin-inline: 0;
        padding: 0 0 12px;
    }

    body.cs16-v111-theme .cs16-sidebar-logo {
        width: 52px;
        max-width: 52px;
        height: 52px;
        object-fit: cover;
        object-position: left center;
    }

    body.cs16-v111-theme .portal-mode-badge {
        display: none;
    }

    body.cs16-v111-theme .portal-mode-badge > div,
    body.cs16-v111-theme .nav-section-label,
    body.cs16-v111-theme .cs16-nav-label,
    body.cs16-v111-theme .cs-template-trigger-copy,
    body.cs16-v111-theme .cs-template-trigger-arrow {
        display: none;
    }

    body.cs16-v111-theme .nav-item {
        justify-content: center;
        gap: 0;
        padding: 8px;
    }

    body.cs16-v111-theme .cs-template-trigger {
        width: 48px;
        min-width: 48px;
        height: 48px;
        margin-inline: 4px;
        padding: 0;
        place-items: center;
    }

    body.cs16-v111-theme .cs-template-trigger::before {
        content: "\25D0";
        display: block;
        color: var(--zpc-red);
        font: 800 20px/1 "Segoe UI Symbol", sans-serif;
    }
}

@media (max-width: 720px) {
    body.cs16-v111-theme .sidebar {
        width: min(86vw, 288px);
        padding-top: max(18px, env(safe-area-inset-top));
        padding-right: 14px;
        padding-bottom: max(18px, env(safe-area-inset-bottom));
        padding-left: max(14px, env(safe-area-inset-left));
        visibility: hidden;
        pointer-events: none;
        transform: translate3d(-102%, 0, 0);
    }

    body.cs16-v111-theme .main {
        width: 100%;
        margin-left: 0;
    }

    body.cs16-v111-theme :is(.cs16-mobile-menu-button, .zpc-mobile-menu-button) {
        display: grid;
    }

    body.cs16-v111-theme:is(.cs16-sidebar-open, .zpc-sidebar-open) {
        overflow: hidden;
    }

    body.cs16-v111-theme:is(.cs16-sidebar-open, .zpc-sidebar-open) .sidebar {
        visibility: visible;
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
    }

    body.cs16-v111-theme:is(.cs16-sidebar-open, .zpc-sidebar-open) :is(.cs16-sidebar-backdrop, .zpc-sidebar-backdrop) {
        display: block;
        visibility: visible;
        opacity: 1;
    }

    body.cs16-v111-theme .portal-mode-badge > div,
    body.cs16-v111-theme .nav-section-label,
    body.cs16-v111-theme .cs16-nav-label,
    body.cs16-v111-theme .cs-template-trigger-copy,
    body.cs16-v111-theme .cs-template-trigger-arrow {
        display: block;
    }

    body.cs16-v111-theme .nav-item {
        justify-content: flex-start;
        gap: 12px;
        padding: 8px 10px;
    }

    body.cs16-v111-theme .cs-template-trigger::before {
        display: none;
        content: none;
    }
}

/* Desktop-only, opt-in pointer. Native text and special cursors stay intact. */
.cs16-theme-cursor {
    --cs16-cursor-rgb: var(--cs16-accent-rgb, 225, 29, 72);
    position: fixed;
    z-index: 2147483647;
    top: -14px;
    left: -14px;
    width: 48px;
    height: 52px;
    visibility: hidden;
    opacity: 0;
    contain: strict;
    pointer-events: none !important;
    user-select: none;
    -webkit-user-select: none;
    transform: translate3d(-72px, -72px, 0);
    will-change: transform, opacity;
}

.cs16-theme-cursor svg {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 20px;
    height: 26px;
    overflow: visible;
    pointer-events: none;
    filter:
        drop-shadow(0 0 1px rgba(var(--cs16-cursor-rgb), 1))
        drop-shadow(0 0 4px rgba(var(--cs16-cursor-rgb), .68))
        drop-shadow(0 0 8px rgba(var(--cs16-cursor-rgb), .28))
        drop-shadow(0 2px 1px rgba(0, 0, 0, .72));
    transform-origin: 0 0;
    transition: filter 100ms ease-out, transform 90ms ease-out;
}

.cs16-theme-cursor .cursor-arrow-shape {
    fill: #07090d;
    stroke: rgb(var(--cs16-cursor-rgb));
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
    paint-order: stroke fill;
    vector-effect: non-scaling-stroke;
}

.cs16-theme-cursor.is-visible {
    visibility: visible;
    opacity: 1;
}

.cs16-theme-cursor.is-interactive svg {
    filter:
        drop-shadow(0 0 1px rgba(var(--cs16-cursor-rgb), 1))
        drop-shadow(0 0 5px rgba(var(--cs16-cursor-rgb), .76))
        drop-shadow(0 0 9px rgba(var(--cs16-cursor-rgb), .3))
        drop-shadow(0 2px 1px rgba(0, 0, 0, .7));
    transform: scale(1.06);
}

.cs16-theme-cursor.is-pressed svg {
    filter:
        drop-shadow(0 0 1px rgba(var(--cs16-cursor-rgb), 1))
        drop-shadow(0 0 3px rgba(var(--cs16-cursor-rgb), .78))
        drop-shadow(0 1px 1px rgba(0, 0, 0, .72));
    transform: scale(.92);
}

html.cs16-theme-cursor-enabled:not(.cs16-theme-cursor-native-context) body {
    cursor: none !important;
}

html.cs16-theme-cursor-enabled:not(.cs16-theme-cursor-native-context) .cs16-theme-cursor-surface {
    cursor: none !important;
}

@media (hover: none), (pointer: coarse) {
    .cs16-theme-cursor {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs16-theme-cursor,
    .cs16-theme-cursor svg {
        transition: none !important;
    }

    .cs16-theme-cursor.is-interactive svg,
    .cs16-theme-cursor.is-pressed svg {
        transform: none;
    }
}

/* Client dashboard: choose a server card before opening its live overview. */
body.cs16-v111-theme.role-client #dashboardPage.page:not(.hidden) {
    display: flex;
    flex-direction: column;
}

body.cs16-v111-theme.role-client #dashboardPage > .grid {
    display: grid !important;
    order: -20;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 18px;
}

body.cs16-v111-theme.role-client #dashboardPage > :is(#commandDashboard, #commandDashboardEmpty) {
    order: -10;
}

@media (max-width: 720px) {
    body.cs16-v111-theme :is(
        #commandDashboard .command-server-tabs.cs16-server-header-controls button,
        #serverDetailPage .v5-detail-tabs .v5-detail-tab,
        #serverControlModal .server-tabs .server-tab-button
    ) {
        min-height: 44px !important;
    }

    body.cs16-v111-theme #commandDashboard .command-server-tabs.cs16-server-header-controls :is(.cs16-server-nav-button, .cs16-server-action) {
        min-height: 44px !important;
        height: 44px !important;
        line-height: 1.2 !important;
    }
}
