/* ==========================================================================
   SixTails Control — Noir Doré
   Warm black layers, gold hairlines, serif display, tracked small caps.
   Loaded AFTER sixtails-theme.css. UTF-8.
   ========================================================================== */

:root {
    --st-bg-deep: #070706;
    --st-bg-surface: #0e0d0b;
    --st-bg-card: #100f0c;
    --st-bg-card-hover: #15130f;
    --st-bg-subtle: rgba(255, 240, 210, 0.025);

    --st-border: rgba(214, 178, 108, 0.13);
    --st-border-strong: rgba(214, 178, 108, 0.26);
    --st-border-gold: rgba(214, 178, 108, 0.5);
    --st-hair: rgba(255, 240, 210, 0.06);

    --st-gold: #cfa862;
    --st-gold-light: #ecd9ad;
    --st-gold-bright: #e0bd78;
    --st-gold-dark: #8a6d36;
    --st-gold-glow: transparent;
    --st-gold-glow-strong: transparent;
    --st-gold-metal: linear-gradient(180deg, #e3c283 0%, #cfa862 48%, #a98239 100%);

    --st-text-primary: #f1ebdd;
    --st-text-secondary: #a79f8f;
    --st-text-muted: #70695c;

    --st-success: #6cc29a;
    --st-danger: #d9645a;

    --st-font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --st-font-display: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
    --st-font-mono: 'JetBrains Mono', Consolas, monospace;

    --st-surface: linear-gradient(180deg, #14120e 0%, #0d0c09 100%);
    --st-inset: inset 0 1px 0 rgba(255, 238, 200, 0.05);
    --st-shadow-card: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
    --st-shadow-gold: none;
    --st-radius: 6px;
    --st-radius-sm: 4px;
    --st-radius-lg: 8px;
    --st-transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ==========================================================================
   SixTails Control — Ivoire Doré (White Marble & Gold Light Theme)
   Prestigious porcelain / alabaster marble layers with warm burnished gold hairlines.
   ========================================================================== */
[data-theme="light"] {
    color-scheme: light;
    --st-bg-deep: #f6f5f0;
    --st-bg-surface: #ffffff;
    --st-bg-card: #ffffff;
    --st-bg-card-hover: #faf9f6;
    --st-bg-subtle: rgba(184, 138, 56, 0.06);

    --st-border: rgba(184, 138, 56, 0.22);
    --st-border-strong: rgba(184, 138, 56, 0.38);
    --st-border-gold: rgba(184, 138, 56, 0.7);
    --st-hair: rgba(184, 138, 56, 0.12);

    --st-gold: #ab7e28;
    --st-gold-light: #523b0a;
    --st-gold-bright: #c49638;
    --st-gold-dark: #3d2b07;
    --st-gold-glow: rgba(171, 126, 40, 0.18);
    --st-gold-glow-strong: rgba(196, 150, 56, 0.35);
    --st-gold-metal: linear-gradient(180deg, #d8b671 0%, #b88f3e 50%, #997227 100%);

    --st-text-primary: #1a1815;
    --st-text-secondary: #3f3930;
    --st-text-muted: #6b6355;

    --st-success: #208759;
    --st-danger: #c4382e;

    --st-surface: #ffffff;
    --st-inset: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --st-shadow-card: 0 12px 32px -10px rgba(138, 109, 54, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Subtle gold status line on top of entire screen */
body.onelya-layout::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--st-gold-metal);
    z-index: 9999999;
}

/* Fluid transition between themes */
body, body.onelya-layout, .onelya-topbar, .st-card, .stat-metric-card, .chart-card, .class-summary-card, .quick-server-box, .onelya-ch-card, .form-control, .st-select-btn {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

html { scroll-behavior: smooth; }
body, body.onelya-layout {
    background-color: var(--st-bg-deep);
    color: var(--st-text-primary);
    font-family: var(--st-font-family);
    font-size: 13.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.onelya-layout {
    padding: 0;
    background:
        radial-gradient(1100px 520px at 50% -10%, rgba(207, 168, 98, 0.075), transparent 70%),
        radial-gradient(900px 600px at 100% 100%, rgba(207, 168, 98, 0.035), transparent 70%),
        var(--st-bg-deep);
    background-attachment: fixed;
}
::selection { background: rgba(207, 168, 98, 0.32); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2519; border-radius: 10px; border: 2px solid var(--st-bg-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--st-gold-dark); }

h1, h2, h3, h4 { font-family: var(--st-font-display); font-weight: 600; letter-spacing: -0.005em; }

/* Small-caps label utility — used everywhere for chrome text */
.metric-title, .form-label, .st-table thead th, .kicker, .dash-status, .hero-foot span, .index-row .tag, .nav-label {
    font-family: var(--st-font-family);
}

/* ---------- Surfaces ---------- */
.st-card, .stat-metric-card, .chart-card, .class-summary-card, .quick-server-box, .onelya-ch-card {
    position: relative;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    box-shadow: var(--st-inset), var(--st-shadow-card);
    backdrop-filter: none;
}
/* gold hairline crowning each card */
.st-card::before, .stat-metric-card::before, .chart-card::before, .class-summary-card::before, .quick-server-box::before {
    content: ''; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(224, 189, 120, 0.55), transparent);
    opacity: 0.7; pointer-events: none;
}
.st-card:hover, .stat-metric-card:hover, .onelya-ch-card:hover { border-color: var(--st-border-strong); transform: none; }
.st-card { margin-bottom: 20px; }
.st-card-header { background: transparent; border-bottom: 1px solid var(--st-border); padding: 16px 22px; }
.st-card-title { font-family: var(--st-font-display); font-size: 19px; font-weight: 600; color: var(--st-gold-light); letter-spacing: 0.01em; }
.st-card-body { padding: 22px; }

/* ---------- Header ---------- */
.onelya-topbar {
    position: sticky; top: 0; margin: 0; width: 100%;
    border: none; border-radius: 0;
    background: rgba(8, 8, 6, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--st-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.onelya-topbar::after { display: none; }
.topbar-main { max-width: 1440px; padding: 14px 32px 10px; border-bottom: none; }
.topbar-brand img { height: 34px !important; filter: none !important; }

.search-input-group { border: 1px solid var(--st-border); border-radius: 4px; background: rgba(255, 240, 210, 0.025); box-shadow: none; }
.search-input-group:focus-within { border-color: var(--st-border-gold); box-shadow: 0 0 0 3px rgba(207, 168, 98, 0.07); }
.search-select { background: transparent; color: var(--st-gold); font-weight: 500; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; border-right: 1px solid var(--st-border); }
.search-input { font-size: 13px; }
.search-submit-btn { background: transparent; color: var(--st-gold); }
.search-submit-btn:hover { background: rgba(207, 168, 98, 0.1); color: var(--st-gold-light); }

.topbar-icon-btn { background: transparent; border: 1px solid var(--st-border); border-radius: 50%; width: 34px; height: 34px; color: var(--st-text-secondary); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.topbar-icon-btn:hover { background: rgba(207, 168, 98, 0.08); border-color: var(--st-border-gold); color: var(--st-gold-light); transform: none; }
.topbar-icon-btn svg { width: 15px; height: 15px; }

/* Theme Switcher Button */
.theme-toggle-btn {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.2s, border-color 0.2s;
}
.theme-toggle-btn:hover {
    transform: rotate(15deg) scale(1.08) !important;
    border-color: var(--st-border-gold) !important;
    background: rgba(207, 168, 98, 0.14) !important;
}
.theme-toggle-btn svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;
    transition: opacity 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-theme="dark"] .theme-icon-sun,
:root:not([data-theme="light"]) .theme-icon-sun {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0.3);
    pointer-events: none;
}
[data-theme="dark"] .theme-icon-moon,
:root:not([data-theme="light"]) .theme-icon-moon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    stroke: var(--st-gold-bright);
}

[data-theme="light"] .theme-icon-moon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.3);
    pointer-events: none;
}
[data-theme="light"] .theme-icon-sun {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    stroke: var(--st-gold-bright);
}
.notification-badge { background: var(--st-gold-metal); color: #17120a; border: none; box-shadow: none; width: 14px; height: 14px; font-size: 9px; top: -3px; right: -3px; }
.user-pill { background: transparent; border: 1px solid var(--st-border); border-radius: 999px; padding: 3px 12px 3px 4px; }
.user-avatar { background: var(--st-gold-metal); color: #17120a; border-radius: 50%; width: 26px; height: 26px; box-shadow: none; }
.user-avatar svg { width: 13px; height: 13px; }
.user-name { font-weight: 500; font-size: 12.5px; }
.logout-link { color: var(--st-text-muted); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.logout-link:hover { color: var(--st-gold-light); text-decoration: none; }

.onelya-nav-tabs { max-width: 1440px; padding: 0 32px; gap: 4px; flex-wrap: wrap; }
.tab-icon { display: none; }
.dropdown-arrow { font-size: 9px; opacity: 0.55; margin-left: 2px; }
.tab-item, .tab-dropdown-btn {
    position: relative; padding: 12px 14px 13px; border-radius: 0; border: none !important;
    color: var(--st-text-secondary); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
    background: none; text-shadow: none;
}
.tab-item::after, .tab-dropdown-btn::after {
    content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 1px;
    background: var(--st-gold-bright); transform: scaleX(0); transform-origin: left; transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tab-item:hover, .tab-dropdown-btn:hover { background: none; color: var(--st-gold-light); }
.tab-item:hover::after, .tab-dropdown-btn:hover::after { transform: scaleX(0.35); }
.tab-item.active, .tab-dropdown-btn.active { background: none; box-shadow: none; text-shadow: none; color: var(--st-gold-light); border: none !important; }
.tab-item.active::after, .tab-dropdown-btn.active::after { transform: scaleX(1); }
.dropdown-menu {
    display: none !important;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--st-bg-surface);
    backdrop-filter: none;
    border: 1px solid var(--st-border-strong);
    border-radius: 4px;
    padding: 6px;
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.9), var(--st-inset);
    min-width: 260px;
    max-height: 520px;
    overflow-y: auto;
    z-index: 999999;
}
.tab-dropdown.open > .dropdown-menu {
    display: block !important;
    animation: fadeInMenu 0.15s ease-out;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 3px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: var(--st-text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}
.dropdown-item .nav-link-icon, .dropdown-item svg {
    width: 15px;
    height: 15px;
    stroke: var(--st-gold);
    flex-shrink: 0;
    opacity: 0.85;
    transition: transform 0.15s ease, stroke 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dropdown-item:hover {
    background: rgba(207, 168, 98, 0.09);
    padding-left: 15px;
    color: var(--st-gold-light);
}
.dropdown-item:hover .nav-link-icon, .dropdown-item:hover svg {
    opacity: 1;
    stroke: var(--st-gold-bright);
    transform: scale(1.08);
}
.dropdown-submenu {
    position: relative;
    border-radius: 3px;
}
.dropdown-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    background: transparent;
    border: none;
    font-family: inherit;
    text-align: left;
    color: var(--st-text-secondary);
    padding: 8px 12px;
    font-size: 12.5px;
    border-radius: 3px;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.dropdown-submenu-toggle svg {
    width: 15px;
    height: 15px;
    stroke: var(--st-gold);
    flex-shrink: 0;
    opacity: 0.85;
    transition: transform 0.15s ease, stroke 0.15s ease;
}
.dropdown-submenu-toggle:hover {
    background: rgba(207, 168, 98, 0.09);
    color: var(--st-gold-light);
    padding-left: 15px;
}
.dropdown-submenu-toggle:hover svg {
    opacity: 1;
    stroke: var(--st-gold-bright);
    transform: scale(1.08);
}
.dropdown-submenu-toggle .submenu-arrow {
    font-size: 9px;
    transition: transform 0.2s ease;
    color: var(--st-gold-light);
}
.dropdown-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}
.dropdown-submenu-items {
    display: none;
    padding: 4px 0 4px 14px;
    background: var(--st-well);
    border-left: 2px solid var(--st-gold);
    border-radius: 0 0 3px 3px;
    margin-top: 2px;
}
.dropdown-submenu.open .dropdown-submenu-items {
    display: block;
}

.onelya-content-container { max-width: 1440px; padding: 44px 32px 64px; }
.onelya-footer { background: transparent; border-top: 1px solid var(--st-border); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10.5px; color: var(--st-text-muted); padding: 22px; }

/* Inner-page headings */
.onelya-content-container > div:first-child h2 {
    font-family: var(--st-font-display);
    font-size: 40px !important; font-weight: 600 !important; letter-spacing: -0.01em !important; line-height: 1.05;
    color: var(--st-text-primary); background: none; -webkit-text-fill-color: var(--st-text-primary);
}
.onelya-content-container > div:first-child p { color: var(--st-text-secondary) !important; font-size: 13.5px !important; }

/* ---------- Buttons ---------- */
.btn {
    border-radius: 3px; font-weight: 600; font-size: 11.5px; padding: 9px 20px;
    letter-spacing: 0.12em; text-transform: uppercase; overflow: visible; box-shadow: none;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
    background: var(--st-gold-metal) !important; color: #1a1408 !important;
    border: 1px solid #e8c98c !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px -10px rgba(207, 168, 98, 0.55);
}
.btn-gold:hover { filter: brightness(1.08); color: #000 !important; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 26px -10px rgba(207, 168, 98, 0.7); background: var(--st-gold-metal) !important; }
.btn-gold::after { display: none; }
.btn-outline-gold { background: transparent; color: var(--st-gold-light); border: 1px solid var(--st-border-gold); }
.btn-outline-gold:hover { background: rgba(207, 168, 98, 0.09); border-color: var(--st-gold); color: #fff; transform: translateY(-1px); }
.btn-dark { background: rgba(255, 240, 210, 0.03) !important; border: 1px solid var(--st-border-strong) !important; color: var(--st-text-primary) !important; }
.btn-dark:hover { background: rgba(207, 168, 98, 0.09) !important; border-color: var(--st-gold) !important; color: var(--st-gold-light) !important; transform: none; }
.btn-blue, .btn-primary { background: rgba(255, 240, 210, 0.05) !important; border: 1px solid var(--st-border-strong) !important; color: var(--st-gold-light) !important; box-shadow: none; }
.btn-blue:hover, .btn-primary:hover { background: rgba(207, 168, 98, 0.12) !important; border-color: var(--st-gold) !important; box-shadow: none; transform: none; }
.btn-danger { background: rgba(217, 100, 90, 0.07) !important; border: 1px solid rgba(217, 100, 90, 0.5) !important; color: var(--st-bad) !important; box-shadow: none; }
.btn-danger:hover { background: rgba(217, 100, 90, 0.16) !important; box-shadow: none; }
.btn-sm { padding: 6px 12px; font-size: 10.5px; }
.btn-xl { padding: 15px 34px; font-size: 12px; letter-spacing: 0.16em; border-radius: 3px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 8px; font-size: 10.5px; font-weight: 500; color: var(--st-gold); letter-spacing: 0.18em; text-transform: uppercase; }
.form-control { background: var(--st-well) !important; border: 1px solid var(--st-border) !important; border-radius: 3px; padding: 10px 14px; color: var(--st-text-primary) !important; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); }
.form-control:hover { border-color: var(--st-border-strong) !important; }
.form-control:focus { border-color: var(--st-gold) !important; background: var(--st-well) !important; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(207, 168, 98, 0.08); }
select.form-control option { background: #12100c !important; }

/* ---------- Badges / alerts ---------- */
.badge { border-radius: 2px; padding: 4px 9px; font-weight: 600; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.badge-gold { background: rgba(207, 168, 98, 0.08); color: var(--st-gold-light); border: 1px solid var(--st-border-gold); }
.badge-secondary, .badge-dark { background: transparent; color: var(--st-text-secondary); border: 1px solid var(--st-border-strong); }
.badge-success { background: rgba(108, 194, 154, 0.07); color: var(--st-success); border: 1px solid rgba(108, 194, 154, 0.4); }
.badge-danger { background: rgba(217, 100, 90, 0.07); color: var(--st-bad); border: 1px solid rgba(217, 100, 90, 0.45); }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 3px; margin-bottom: 18px; font-size: 13px; border: 1px solid var(--st-border-strong); border-left-width: 2px; background: rgba(255, 240, 210, 0.03); }
.alert-danger { border-color: rgba(217, 100, 90, 0.5); color: var(--st-bad); }
.alert-success { border-color: rgba(108, 194, 154, 0.5); color: #9fdcc0; }
.alert-warning { border-color: var(--st-border-gold); color: var(--st-gold-light); }
.alert-info { border-color: var(--st-border-strong); color: var(--st-text-secondary); }

/* ---------- Tables ---------- */
.st-table thead th { background: rgba(207, 168, 98, 0.04); color: var(--st-gold); font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; border-bottom: 1px solid var(--st-border-strong); padding: 14px 18px; }
.st-table tbody td { border-bottom: 1px solid var(--st-hair); padding: 13px 18px; }
.st-table tbody tr { transition: background 0.2s; }
.st-table tbody tr:hover td { background: rgba(207, 168, 98, 0.045); }
.st-table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--st-gold); }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 32px; margin-bottom: 28px; position: relative; }
.dash-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--st-border-gold), var(--st-border) 40%, transparent); }
.dash-status { display: flex; align-items: center; gap: 10px; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--st-gold); margin-bottom: 14px; }
.dash-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--st-success); box-shadow: 0 0 0 3px rgba(108, 194, 154, 0.15); }
.dash-head h2 { font-size: 64px !important; font-weight: 500 !important; line-height: 0.95; letter-spacing: -0.02em !important; }
.dash-head p { color: var(--st-text-secondary); margin-top: 12px; font-size: 14px; }
.dash-key { display: flex; gap: 0; }
.dash-key div { padding: 4px 36px; border-left: 1px solid var(--st-border); text-align: left; }
.dash-key div:first-child { border-left: none; }
.dash-key div strong { display: block; font-family: var(--st-font-display); font-size: 52px; font-weight: 500; letter-spacing: -0.02em; color: var(--st-text-primary); line-height: 1; font-variant-numeric: lining-nums; }
.dash-key div span { display: block; margin-top: 8px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--st-text-muted); }
.dash-key div.accent strong { background: var(--st-gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.onelya-channel-grid { gap: 10px; margin-bottom: 20px; }
.onelya-ch-card { padding: 14px 16px; min-height: 0; }
.onelya-ch-card::after { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; background: var(--st-border-strong); }
.onelya-ch-card:has(.ch-status.active)::after { background: var(--st-success); }
.onelya-ch-card:has(.ch-status.inactive)::after { background: var(--st-danger); }
.ch-name { font-family: var(--st-font-display); font-size: 19px; font-weight: 600; letter-spacing: 0.02em; }
.ch-port { font-size: 10px; color: var(--st-text-muted); letter-spacing: 0.06em; }
.ch-status { margin-top: 8px; font-weight: 500; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.ch-dot { width: 5px; height: 5px; animation: none !important; box-shadow: none !important; }
.ch-dot.active { background: var(--st-success); }
.ch-dot.inactive { background: var(--st-danger); }
.ch-status.active { color: var(--st-success); }
.ch-status.inactive { color: var(--st-bad); }

.quick-server-box { padding: 24px 26px; margin-bottom: 20px; }
.quick-server-header h3 { font-size: 22px; font-weight: 600; color: var(--st-gold-light); }
.quick-server-header p { color: var(--st-text-muted); }
.ch-action-btn { background: rgba(255, 240, 210, 0.02); border: 1px solid var(--st-border-strong) !important; border-radius: 3px; padding: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--st-text-primary) !important; box-shadow: none !important; transform: none !important; }
.ch-action-btn:hover { background: rgba(207, 168, 98, 0.09) !important; border-color: var(--st-gold) !important; color: var(--st-gold-light) !important; }
.ch-action-btn.btn-reboot { color: var(--st-bad) !important; }
.ch-action-btn.btn-reboot:hover { border-color: rgba(217, 100, 90, 0.7) !important; background: rgba(217, 100, 90, 0.1) !important; color: #ffb4ad !important; }

.onelya-stats-grid { gap: 10px; margin-bottom: 20px; }
.stat-metric-card { padding: 24px 26px 22px; min-height: 136px; }
.metric-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; color: var(--st-gold); }
.metric-value { font-family: var(--st-font-display); font-size: 56px; font-weight: 500; letter-spacing: -0.02em; background: none; -webkit-text-fill-color: var(--st-text-primary); color: var(--st-text-primary); margin: 8px 0 0; line-height: 1.05; font-variant-numeric: lining-nums; }
.metric-subtitle { font-size: 12px; color: var(--st-text-muted); }
.metric-bg-icon { display: none; }
.stat-metric-card.gold-highlight { background: linear-gradient(160deg, #1c170d 0%, #0f0d09 100%); border: 1px solid var(--st-border-gold); }
.stat-metric-card.gold-highlight .metric-title { color: var(--st-gold-light); font-weight: 600; }
.stat-metric-card.gold-highlight .metric-value { background: var(--st-gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.stat-metric-card.gold-highlight .metric-subtitle { color: var(--st-text-secondary); font-weight: 400; }

.onelya-charts-grid { gap: 10px; margin-bottom: 20px; }
.chart-card { padding: 26px; }
.chart-card-header { font-family: var(--st-font-display); font-size: 22px; font-weight: 600; color: var(--st-gold-light); margin-bottom: 24px; }
.donut-visual { box-shadow: none; filter: none; width: 156px; height: 156px; }
.donut-hole { background: var(--st-bg-surface); box-shadow: inset 0 0 0 1px var(--st-border); width: 122px; height: 122px; }
.donut-total { font-family: var(--st-font-display); font-size: 36px; font-weight: 500; }
.donut-label { font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; }
.legend-item { font-size: 12.5px; color: var(--st-text-secondary); }
.bar-pill { background: linear-gradient(180deg, #e3c283, #8a6d36); box-shadow: none; border-radius: 2px 2px 0 0; width: 30px; }
.bar-col:hover .bar-pill { filter: brightness(1.2); }
.bar-val { font-family: var(--st-font-display); font-size: 18px; font-weight: 600; }
.bar-label { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; }
.bar-chart-container { border-bottom: 1px solid var(--st-border-strong); height: 180px; }

.class-summary-card { padding: 26px; }
.summary-header h4 { font-family: var(--st-font-display); font-size: 22px; font-weight: 600; color: var(--st-gold-light); }
.summary-header span { font-size: 10px !important; letter-spacing: 0.18em; text-transform: uppercase; }
.summary-grid { border: 1px solid var(--st-border); border-radius: 4px; gap: 0; background: var(--st-well); overflow: hidden; }
.summary-cell { border: none !important; border-right: 1px solid var(--st-border) !important; border-radius: 0; background: transparent; padding: 22px 14px; transform: none !important; transition: background 0.25s; }
.summary-cell:last-child { border-right: none !important; }
.summary-cell:hover { background: rgba(207, 168, 98, 0.05); }
.summary-cell-title { font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--st-gold); }
.summary-cell-val { font-family: var(--st-font-display); font-size: 40px; font-weight: 500; line-height: 1.1; font-variant-numeric: lining-nums; }

/* ==========================================================================
   LANDING
   ========================================================================== */
body.landing { background: var(--st-bg-deep); color: var(--st-text-primary); font-family: var(--st-font-family); -webkit-font-smoothing: antialiased; line-height: 1.65; overflow-x: hidden; }
.wrap { width: min(1240px, calc(100% - 72px)); margin: 0 auto; }

.landing-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 100; }
.landing-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.landing-nav .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.landing-nav .brand img { height: 38px; }
.landing-nav .brand b { font-size: 10.5px; font-weight: 500; letter-spacing: 0.42em; color: var(--st-gold-light); padding-left: 14px; border-left: 1px solid var(--st-border-strong); }
.landing-nav .links { display: flex; align-items: center; gap: 40px; }
.landing-nav .links a:not(.btn) { color: var(--st-text-secondary); text-decoration: none; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; transition: color 0.2s; }
.landing-nav .links a:not(.btn):hover { color: var(--st-gold-light); }

.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--st-border); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(60% 80% at 74% 50%, rgba(207, 168, 98, 0.14), transparent 70%), radial-gradient(50% 60% at 0% 100%, rgba(207, 168, 98, 0.05), transparent 70%); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; box-shadow: inset 0 0 220px rgba(0, 0, 0, 0.75); pointer-events: none; }
.hero-inner { position: relative; z-index: 10; width: min(1240px, calc(100% - 72px)); margin: 0 auto; padding: 150px 0 140px; }
.hero-copy { max-width: 700px; }
.kicker { display: flex; align-items: center; gap: 18px; font-size: 11px; font-weight: 500; letter-spacing: 0.34em; text-transform: uppercase; color: var(--st-gold); margin-bottom: 36px; }
.kicker::before { content: ''; width: 56px; height: 1px; background: var(--st-gold-metal); }
.hero h1 { font-family: var(--st-font-display); font-size: clamp(54px, 7.6vw, 118px); line-height: 0.92; font-weight: 500; letter-spacing: -0.025em; color: var(--st-text-primary); margin-bottom: 36px; text-transform: none; }
.hero h1 em { font-style: italic; font-weight: 500; background: var(--st-gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: 0.08em; }
.hero p.lead { font-size: 16.5px; color: var(--st-text-secondary); max-width: 480px; line-height: 1.75; margin-bottom: 46px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }

.sigil { position: absolute; z-index: 1; right: -4%; top: 50%; width: min(52vw, 760px); aspect-ratio: 1; transform: translateY(-50%); pointer-events: none; }
.sigil svg { width: 100%; height: 100%; overflow: visible; }
.sigil .ring-a { transform-origin: 300px 300px; animation: st-spin 240s linear infinite; }
.sigil .ring-b { transform-origin: 300px 300px; animation: st-spin 180s linear infinite reverse; }
.sigil .tails { transform-origin: 300px 300px; animation: st-spin 120s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }

.hero-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 11; border-top: 1px solid var(--st-border); background: linear-gradient(180deg, var(--st-well), rgba(7, 7, 6, 0.9)); }
.hero-foot .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.hero-foot div { padding: 24px 0 24px 32px; border-left: 1px solid var(--st-border); }
.hero-foot div:first-child { border-left: none; padding-left: 0; }
.hero-foot strong { display: block; font-family: var(--st-font-display); font-size: 26px; font-weight: 600; color: var(--st-gold-light); line-height: 1.1; }
.hero-foot span { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--st-text-muted); }

.section { padding: 150px 0 0; }
.section-title { text-align: center; max-width: 820px; margin: 0 auto 80px; }
.section-title span { display: inline-flex; align-items: center; gap: 16px; font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--st-gold); font-weight: 500; margin-bottom: 26px; }
.section-title span::before, .section-title span::after { content: ''; width: 44px; height: 1px; background: var(--st-gold-dark); }
.section-title h2 { font-size: clamp(38px, 4.8vw, 68px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.02; color: var(--st-text-primary); }
.section-title h2 em { font-style: italic; color: var(--st-gold-light); }

.index { border-top: 1px solid var(--st-border-strong); }
.index-row { display: grid; grid-template-columns: 90px 1.1fr 1.9fr 200px; gap: 32px; align-items: center; padding: 38px 8px; border-bottom: 1px solid var(--st-border); transition: background 0.3s, padding 0.3s; position: relative; }
.index-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--st-gold-metal); transform: scaleY(0); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.index-row:hover { background: linear-gradient(90deg, rgba(207, 168, 98, 0.06), transparent 70%); padding-left: 22px; }
.index-row:hover::before { transform: scaleY(1); }
.index-row .n { font-family: var(--st-font-display); font-style: italic; font-size: 34px; color: var(--st-gold-dark); line-height: 1; }
.index-row h3 { font-size: 32px; font-weight: 500; letter-spacing: -0.01em; color: var(--st-text-primary); line-height: 1.1; }
.index-row p { color: var(--st-text-secondary); font-size: 14.5px; max-width: 540px; }
.index-row .tag { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--st-text-muted); text-align: right; }
.index-row:hover .n { color: var(--st-gold); }
.index-row:hover .tag { color: var(--st-gold-light); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.facts div { position: relative; padding: 44px 36px; background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 4px; box-shadow: var(--st-inset); }
.facts div::before { content: ''; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(224, 189, 120, 0.7), transparent); }
.facts h3 { font-size: 30px; font-weight: 500; color: var(--st-gold-light); margin-bottom: 14px; line-height: 1.1; }
.facts p { color: var(--st-text-secondary); font-size: 14.5px; }

.closing { position: relative; padding: 170px 0 150px; text-align: center; }
.closing::before { content: ''; position: absolute; left: 50%; top: 50%; width: 760px; height: 760px; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(207, 168, 98, 0.1), transparent 65%); z-index: -1; }
.closing h2 { font-size: clamp(48px, 7vw, 110px); font-weight: 500; letter-spacing: -0.025em; line-height: 0.95; color: var(--st-text-primary); margin-bottom: 48px; }
.closing h2 em { font-style: italic; background: var(--st-gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.landing-foot { border-top: 1px solid var(--st-border); padding: 34px 0; color: var(--st-text-muted); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; }
.landing-foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.landing-foot a { color: var(--st-gold); text-decoration: none; }
.landing-foot a:hover { color: var(--st-gold-light); }

@media (max-width: 992px) {
    .landing-nav .links a:not(.btn) { display: none; }
    .hero { flex-direction: column; align-items: flex-start; padding-bottom: 0; }
    .hero-inner { padding: 130px 0 40px; }
    .sigil { position: relative; right: auto; top: auto; transform: none; width: 90%; margin: 0 auto 40px; opacity: 0.8; }
    .hero-foot { position: relative; }
    .hero-foot .wrap { grid-template-columns: 1fr; }
    .hero-foot div { padding: 18px 0; border-left: none; border-top: 1px solid var(--st-border); }
    .hero-foot div:first-child { border-top: none; }
    .section { padding-top: 100px; }
    .index-row { grid-template-columns: 56px 1fr; gap: 12px 20px; padding: 28px 0; }
    .index-row p, .index-row .tag { grid-column: 2; text-align: left; }
    .index-row .n { font-size: 26px; } .index-row h3 { font-size: 26px; }
    .facts { grid-template-columns: 1fr; }
}

/* ==========================================================================
   LOGIN
   ========================================================================== */
body.login-page { background: var(--st-bg-deep); font-family: var(--st-font-family); color: var(--st-text-primary); -webkit-font-smoothing: antialiased; }
.login-wrap { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px; overflow: hidden; background: radial-gradient(60% 70% at 50% 40%, rgba(207, 168, 98, 0.11), transparent 70%), var(--st-bg-deep) !important; }
.login-wrap::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.8); pointer-events: none; }
.login-box { position: relative; z-index: 2; max-width: 420px !important; padding: 52px 44px 44px !important; border-radius: 4px !important; background: var(--st-surface) !important; border: 1px solid var(--st-border-strong) !important; box-shadow: var(--st-inset), 0 40px 90px -30px #000 !important; backdrop-filter: none; }
.login-box::before { content: '' !important; display: block !important; position: absolute; left: 12%; right: 12%; top: -1px !important; height: 1px !important; background: linear-gradient(90deg, transparent, var(--st-gold-bright), transparent) !important; border-radius: 0 !important; }
.login-brand { text-align: center !important; margin-bottom: 36px !important; }
.login-brand img { height: 46px !important; filter: none !important; margin-bottom: 22px !important; }
.login-brand h2 { font-family: var(--st-font-display) !important; font-size: 34px !important; letter-spacing: -0.005em !important; color: var(--st-text-primary) !important; font-weight: 500; line-height: 1; }
.login-brand p { font-size: 10.5px !important; color: var(--st-gold) !important; letter-spacing: 0.26em; text-transform: uppercase; margin-top: 12px !important; }
.login-link { color: var(--st-text-secondary); text-decoration: none; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.login-link:hover { color: var(--st-gold-light); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 1100px) { .dash-head h2 { font-size: 48px !important; } .dash-key div { padding: 4px 22px; } .dash-key div strong { font-size: 40px; } }
@media (max-width: 760px) { .onelya-content-container { padding: 28px 16px 40px; } .topbar-main, .onelya-nav-tabs { padding-left: 16px; padding-right: 16px; } .dash-key { flex-wrap: wrap; gap: 16px 0; } .dash-key div:first-child { padding-left: 0; } }

.donut-visual { background: conic-gradient(#8b8576 0% var(--jinno-pct, 100%), #cfa862 var(--jinno-pct, 100%) var(--chunjo-pct, 100%), #b5524a var(--chunjo-pct, 100%) 100%) !important; }


/* ==========================================================================
   Refinements v2 — compact dashboard, native selects, edit buttons
   ========================================================================== */
:root { color-scheme: dark; --st-bg-darker: #0a0907; }

/* Native selects & their popup lists: warm black + gold instead of navy */
select, select.form-control, .search-select {
    -webkit-appearance: none; appearance: none;
    background-color: var(--st-well) !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%23cfa862' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1l4 4 4-4'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 30px !important;
    color: var(--st-text-primary) !important;
    border: 1px solid var(--st-border) !important;
    border-radius: 3px;
    cursor: pointer;
}
.search-select { background-color: transparent !important; border: none !important; border-right: 1px solid var(--st-border) !important; border-radius: 0; color: var(--st-gold) !important; padding-right: 28px !important; background-position: right 9px center !important; }
select:hover { border-color: var(--st-border-strong) !important; }
select:focus { outline: none; border-color: var(--st-gold) !important; box-shadow: 0 0 0 3px rgba(207, 168, 98, 0.08); }
select option, select optgroup, select.form-control option, .search-select option {
    background-color: var(--st-elev) !important;
    color: var(--st-text-primary) !important;
    padding: 8px 12px;
}
select option:checked, select option:hover { background: #2b2214 linear-gradient(#2b2214, #2b2214) !important; color: var(--st-gold-light) !important; }

/* Items/mobs edit button (was inline blue) */
.btn-edit { background: rgba(207, 168, 98, 0.08) !important; color: var(--st-gold-light) !important; border: 1px solid var(--st-border-strong) !important; padding: 6px 10px; border-radius: 3px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: none !important; }
.btn-edit:hover { background: rgba(207, 168, 98, 0.18) !important; border-color: var(--st-gold) !important; color: #fff !important; }
.btn-blue, .btn-primary { background: rgba(207, 168, 98, 0.1) !important; border-color: var(--st-border-gold) !important; }

/* Compact dashboard */
.dash-head { padding-bottom: 22px; margin-bottom: 20px; }
.dash-head h2 { font-size: 46px !important; }
.dash-head p { margin-top: 8px; }
.dash-key div { padding: 2px 28px; }
.dash-key div strong { font-size: 38px; }
.dash-key div span { margin-top: 6px; }
.onelya-channel-grid { gap: 8px; margin-bottom: 14px; }
.onelya-ch-card { padding: 10px 14px; }
.ch-name { font-size: 17px; }
.ch-status { margin-top: 4px; }
.quick-server-box { padding: 16px 20px; margin-bottom: 14px; }
.quick-server-header { margin-bottom: 12px; }
.quick-server-header h3 { font-size: 18px; }
.quick-server-header p { font-size: 12px; }
.ch-action-btn { padding: 9px 10px; }
.onelya-stats-grid { gap: 8px; margin-bottom: 14px; }
.stat-metric-card { padding: 16px 20px 14px; min-height: 0; }
.metric-value { font-size: 38px; margin-top: 4px; }
.metric-subtitle { font-size: 11.5px; margin-top: 2px; }
.onelya-charts-grid { gap: 8px; margin-bottom: 14px; }
.chart-card { padding: 20px 22px; }
.chart-card-header { font-size: 19px; margin-bottom: 14px; }
.donut-chart-container { padding: 0; gap: 28px; }
.donut-visual { width: 124px; height: 124px; }
.donut-hole { width: 96px; height: 96px; }
.donut-total { font-size: 28px; }
.bar-chart-container { height: 140px; padding-top: 10px; }
.bar-val { font-size: 15px; }
.class-summary-card { padding: 20px 22px; }
.summary-header { margin-bottom: 12px; }
.summary-header h4 { font-size: 19px; }
.summary-cell { padding: 14px 12px; }
.summary-cell-val { font-size: 30px; }


/* ==========================================================================
   Themed dropdown (premium.js)
   ========================================================================== */
.st-select { position: relative; display: block; }
.st-select.is-inline { display: inline-flex; align-self: stretch; }
.st-select-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; left: 0; bottom: 0; padding: 0 !important; border: 0 !important; }
.st-select-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
    font-family: inherit; font-size: 13px; text-align: left; cursor: pointer;
    background: var(--st-well); color: var(--st-text-primary);
    border: 1px solid var(--st-border); border-radius: 3px; padding: 10px 14px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.st-select-btn.form-control { background: var(--st-well) !important; border: 1px solid var(--st-border) !important; padding-right: 14px !important; background-image: none !important; }
.st-select-btn:hover { border-color: var(--st-border-strong) !important; }
.st-select-btn:focus-visible, .st-select-btn.is-open { outline: none; border-color: var(--st-gold) !important; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(207, 168, 98, 0.08); }
.st-select-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.st-select-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-select-btn[style*="text-align:center"] .st-select-label, .st-select-btn[style*="text-align: center"] .st-select-label { text-align: center; }
.st-select-caret { flex: none; color: var(--st-gold); transition: transform 0.2s; }
.st-select-btn.is-open .st-select-caret { transform: rotate(180deg); }

.st-select-btn.search-select {
    background: transparent !important; border: none !important; border-right: 1px solid var(--st-border) !important; border-radius: 0;
    box-shadow: none; color: var(--st-gold) !important; font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 7px 12px; width: auto !important; min-width: 118px; height: 100%;
}
.st-select-btn.search-select:hover { background: rgba(207, 168, 98, 0.06) !important; }

.st-select-menu {
    position: fixed; z-index: 100000; overflow-y: auto; padding: 5px;
    background: var(--st-elev); border: 1px solid var(--st-border-gold); border-radius: 4px;
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 238, 200, 0.05);
    animation: st-menu-in 0.14s ease-out;
}
@keyframes st-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.st-opt { display: flex; align-items: center; gap: 8px; position: relative; padding: 6px 12px 6px 14px; font-size: 13px; color: var(--st-text-secondary); border-radius: 3px; cursor: pointer; white-space: nowrap; transition: background 0.12s, color 0.12s; }
.st-opt-icon { width: 22px; height: 22px; object-fit: contain; image-rendering: pixelated; background: var(--st-well); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 3px; padding: 1px; flex-shrink: 0; }
.st-opt-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.st-btn-icon { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; background: var(--st-well); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 3px; padding: 1px; flex-shrink: 0; vertical-align: middle; }
.st-opt:hover, .st-opt.is-active { background: rgba(207, 168, 98, 0.12); color: var(--st-gold-light); }
.st-opt.is-selected { color: var(--st-gold-light); font-weight: 500; }
.st-opt.is-selected::before { content: ''; position: absolute; left: 4px; top: 9px; bottom: 9px; width: 2px; background: var(--st-gold); border-radius: 2px; }
.st-opt.is-disabled { opacity: 0.4; cursor: not-allowed; }
.st-opt-group { padding: 8px 12px 4px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--st-gold-dark); }
.st-select-menu::-webkit-scrollbar { width: 8px; }


/* ==========================================================================
   Modals & in-page overrides (win over per-view <style> blocks)
   ========================================================================== */
body .form-label { color: var(--st-gold) !important; font-size: 10.5px !important; font-weight: 500 !important; letter-spacing: 0.16em !important; text-transform: uppercase; margin-bottom: 8px !important; }
body label { letter-spacing: 0.02em; }

.modal-backdrop { background: rgba(4, 3, 2, 0.88) !important; backdrop-filter: blur(3px) !important; }
.modal-card {
    background: linear-gradient(180deg, #15120d 0%, var(--st-bg-surface) 100%) !important;
    border: 1px solid var(--st-border-strong) !important;
    border-radius: 6px !important;
    box-shadow: var(--st-inset), 0 40px 90px -20px #000 !important;
    position: relative;
}
.modal-card::before { content: ''; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(224, 189, 120, 0.7), transparent); z-index: 2; }
.modal-card > div:first-child { background: transparent !important; border-bottom: 1px solid var(--st-border) !important; padding: 18px 26px !important; }
.modal-card > div:last-child:not(:first-child) { background: var(--st-well) !important; border-top: 1px solid var(--st-border) !important; }
.modal-card h3, .modal-card [id$="title"], .modal-card [id*="-title"] { font-family: var(--st-font-display) !important; font-size: 26px !important; font-weight: 500 !important; letter-spacing: -0.005em; color: var(--st-text-primary) !important; line-height: 1.1; }
.modal-card .badge-gold { font-size: 11px !important; }
.modal-card button[onclick*="close"] { color: var(--st-text-muted); }

.mob-tab-btn { font-size: 11px !important; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500 !important; padding: 15px 20px !important; border-bottom: 1px solid transparent !important; position: relative; }
.mob-tab-btn:hover { color: var(--st-gold-light) !important; background: transparent !important; }
.mob-tab-btn.active { color: var(--st-gold-light) !important; background: transparent !important; border-bottom: 1px solid var(--st-gold) !important; }

/* Inline-styled "card" blocks inside modals */
.modal-card div[style*="border-radius:8px"][style*="padding:16px"] { background: rgba(255, 240, 210, 0.025) !important; border: 1px solid var(--st-border) !important; border-radius: 4px !important; }

/* Links: no browser-default lavender */
a { color: var(--st-gold); text-decoration-color: rgba(207, 168, 98, 0.4); }
a:hover { color: var(--st-gold-light); }

/* Themed dropdown: searchable list */
.st-select-menu { display: flex; flex-direction: column; padding: 0; }
.st-select-list { overflow-y: auto; padding: 5px; flex: 1; min-height: 0; }
.st-select-search { width: 100%; background: var(--st-well); border: none; border-bottom: 1px solid var(--st-border-strong); color: var(--st-text-primary); padding: 11px 14px; font: 13px var(--st-font-family); outline: none; border-radius: 4px 4px 0 0; }
.st-select-search:focus { border-bottom-color: var(--st-gold); }
.st-select-search::placeholder { color: var(--st-text-muted); }
.st-opt-note { padding: 10px 12px; font-size: 11.5px; color: var(--st-text-muted); text-align: center; }

/* ==========================================================================
   SixTails Control — Ivoire Doré Component Overrides (Light Mode)
   ========================================================================== */
[data-theme="light"] body.onelya-layout {
    background:
        radial-gradient(1200px 580px at 50% -10%, rgba(207, 168, 98, 0.12), transparent 70%),
        radial-gradient(900px 600px at 100% 100%, rgba(207, 168, 98, 0.05), transparent 70%),
        var(--st-bg-deep);
    background-attachment: fixed;
    color: var(--st-text-primary);
}
[data-theme="light"] ::selection {
    background: rgba(171, 126, 40, 0.25);
    color: #000;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #d6ccba;
    border: 2px solid var(--st-bg-deep);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: var(--st-gold);
}

/* Light Topbar */
[data-theme="light"] .onelya-topbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--st-border);
    box-shadow: 0 4px 20px -8px rgba(184, 138, 56, 0.12);
}
[data-theme="light"] .search-input-group {
    background: #ffffff;
    border: 1px solid var(--st-border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .search-input {
    color: var(--st-text-primary);
}
[data-theme="light"] .search-input::placeholder {
    color: var(--st-text-muted);
}
[data-theme="light"] .search-select {
    color: var(--st-gold-dark);
    border-right: 1px solid var(--st-border);
}
[data-theme="light"] .topbar-icon-btn {
    background: #ffffff;
    border: 1px solid var(--st-border);
    color: var(--st-text-secondary);
}
[data-theme="light"] .topbar-icon-btn:hover {
    background: rgba(184, 138, 56, 0.09);
    border-color: var(--st-border-gold);
    color: var(--st-gold-dark);
}
[data-theme="light"] .user-pill {
    background: #ffffff;
    border: 1px solid var(--st-border);
}
[data-theme="light"] .user-name {
    color: var(--st-text-primary);
}
[data-theme="light"] .logout-link {
    color: var(--st-text-muted);
}
[data-theme="light"] .logout-link:hover {
    color: var(--st-danger);
}

/* Light Navigation Tabs */
[data-theme="light"] .tab-item,
[data-theme="light"] .tab-dropdown-btn {
    color: var(--st-text-secondary);
}
[data-theme="light"] .tab-item:hover,
[data-theme="light"] .tab-dropdown-btn:hover {
    color: var(--st-gold-dark);
}
[data-theme="light"] .tab-item.active,
[data-theme="light"] .tab-dropdown-btn.active {
    color: var(--st-gold-dark);
}
[data-theme="light"] .tab-item::after,
[data-theme="light"] .tab-dropdown-btn::after {
    background: var(--st-gold-bright);
    box-shadow: 0 2px 6px rgba(171, 126, 40, 0.4);
}

/* Light Dropdown Menu */
[data-theme="light"] .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid var(--st-border-strong);
    box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(184, 138, 56, 0.12);
}
[data-theme="light"] .dropdown-item {
    color: var(--st-text-primary);
}
[data-theme="light"] .dropdown-item:hover {
    background: rgba(184, 138, 56, 0.09);
    color: var(--st-gold-dark);
}
[data-theme="light"] .dropdown-submenu-toggle {
    color: var(--st-text-primary);
}
[data-theme="light"] .dropdown-submenu-toggle:hover {
    background: rgba(184, 138, 56, 0.09);
    color: var(--st-gold-dark);
}
[data-theme="light"] .dropdown-submenu-items {
    background: #faf8f5;
    border-left: 2px solid var(--st-gold);
}

/* Light Dashboard Elements */
[data-theme="light"] .dash-head h2 {
    color: var(--st-text-primary);
}
[data-theme="light"] .dash-status {
    color: var(--st-gold-dark);
}
[data-theme="light"] .dash-key div strong {
    color: var(--st-text-primary);
}
[data-theme="light"] .onelya-ch-card {
    background: #ffffff;
    border: 1px solid var(--st-border);
}
[data-theme="light"] .ch-name {
    color: var(--st-text-primary);
}
[data-theme="light"] .quick-server-box {
    background: #ffffff;
    border: 1px solid var(--st-border);
}
[data-theme="light"] .quick-server-header h3 {
    color: var(--st-gold-dark);
}
[data-theme="light"] .ch-action-btn {
    background: #faf8f4 !important;
    border: 1px solid var(--st-border) !important;
    color: var(--st-text-primary) !important;
}
[data-theme="light"] .ch-action-btn:hover {
    background: rgba(184, 138, 56, 0.1) !important;
    border-color: var(--st-gold) !important;
    color: var(--st-gold-dark) !important;
}
[data-theme="light"] .stat-metric-card {
    background: #ffffff;
    border: 1px solid var(--st-border);
}
[data-theme="light"] .metric-title {
    color: var(--st-gold-dark);
}
[data-theme="light"] .metric-value {
    color: var(--st-text-primary) !important;
    -webkit-text-fill-color: var(--st-text-primary) !important;
}
[data-theme="light"] .stat-metric-card.gold-highlight {
    background: linear-gradient(160deg, #fbf7ee 0%, #f4ecdc 100%);
    border: 1px solid var(--st-border-gold);
}
[data-theme="light"] .stat-metric-card.gold-highlight .metric-title {
    color: var(--st-gold-dark);
}
[data-theme="light"] .chart-card,
[data-theme="light"] .class-summary-card {
    background: #ffffff;
    border: 1px solid var(--st-border);
}
[data-theme="light"] .chart-card-header,
[data-theme="light"] .summary-header h4 {
    color: var(--st-gold-dark);
}
[data-theme="light"] .donut-hole {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--st-border);
}
[data-theme="light"] .donut-total {
    color: var(--st-text-primary);
}
[data-theme="light"] .bar-val {
    color: var(--st-text-primary);
}
[data-theme="light"] .summary-grid {
    background: #faf8f4;
    border: 1px solid var(--st-border);
}
[data-theme="light"] .summary-cell {
    border-right: 1px solid var(--st-border) !important;
}
[data-theme="light"] .summary-cell:hover {
    background: rgba(184, 138, 56, 0.08);
}
[data-theme="light"] .summary-cell-title {
    color: var(--st-gold-dark);
}
[data-theme="light"] .summary-cell-val {
    color: var(--st-text-primary);
}

/* Light Cards & General Settings */
[data-theme="light"] .st-card,
[data-theme="light"] .ga-card {
    background: #ffffff !important;
    border: 1px solid var(--st-border) !important;
    box-shadow: var(--st-shadow-card) !important;
}
[data-theme="light"] .st-card::before,
[data-theme="light"] .ga-card::before,
[data-theme="light"] .stat-metric-card::before,
[data-theme="light"] .chart-card::before,
[data-theme="light"] .class-summary-card::before,
[data-theme="light"] .quick-server-box::before {
    background: linear-gradient(90deg, transparent, rgba(171, 126, 40, 0.7), transparent);
}
[data-theme="light"] .st-card-title,
[data-theme="light"] .ga-card-title {
    color: var(--st-gold-dark) !important;
}
[data-theme="light"] .ga-card-header,
[data-theme="light"] .st-card-header {
    border-bottom: 1px solid var(--st-border) !important;
    background: rgba(184, 138, 56, 0.03) !important;
}
[data-theme="light"] .ga-label {
    color: var(--st-text-secondary) !important;
}
[data-theme="light"] .ga-radio-row {
    background: #faf8f4 !important;
    border: 1px solid var(--st-border) !important;
}
[data-theme="light"] .ga-radio-row .form-check-label {
    color: var(--st-text-primary) !important;
}
[data-theme="light"] .ga-tip-bubble {
    background: #ffffff !important;
    border: 1px solid var(--st-border-gold) !important;
    color: var(--st-text-primary) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}
[data-theme="light"] .ga-tip-bubble::after {
    border-color: var(--st-border-gold) transparent transparent transparent !important;
}

/* Light Inputs, Selects & Forms */
[data-theme="light"] .form-control,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="password"],
[data-theme="light"] textarea,
[data-theme="light"] .ga-card-body input[type="text"],
[data-theme="light"] .ga-card-body input[type="number"] {
    background: #ffffff !important;
    border: 1px solid var(--st-border) !important;
    color: var(--st-text-primary) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}
[data-theme="light"] .form-control:focus,
[data-theme="light"] input[type="text"]:focus,
[data-theme="light"] input[type="number"]:focus,
[data-theme="light"] .ga-card-body input[type="text"]:focus,
[data-theme="light"] .ga-card-body input[type="number"]:focus {
    border-color: var(--st-gold) !important;
    box-shadow: 0 0 0 3px rgba(184, 138, 56, 0.15) !important;
}
[data-theme="light"] select,
[data-theme="light"] select.form-control {
    background-color: #ffffff !important;
    color: var(--st-text-primary) !important;
    border: 1px solid var(--st-border) !important;
}
[data-theme="light"] select option {
    background-color: #ffffff !important;
    color: var(--st-text-primary) !important;
}
[data-theme="light"] select option:checked {
    background: #f4ecdc linear-gradient(#f4ecdc, #f4ecdc) !important;
    color: #523b0a !important;
}
[data-theme="light"] .st-select-btn {
    background: #ffffff !important;
    border: 1px solid var(--st-border) !important;
    color: var(--st-text-primary) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .st-select-btn:hover {
    border-color: var(--st-border-strong) !important;
}
[data-theme="light"] .st-select-btn:focus-visible,
[data-theme="light"] .st-select-btn.is-open {
    border-color: var(--st-gold) !important;
    box-shadow: 0 0 0 3px rgba(184, 138, 56, 0.15);
}
[data-theme="light"] .st-select-menu {
    background: #ffffff;
    border: 1px solid var(--st-border-gold);
    box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.18);
}
[data-theme="light"] .st-select-search {
    background: #faf9f6;
    border-bottom: 1px solid var(--st-border);
    color: var(--st-text-primary);
}
[data-theme="light"] .st-opt {
    color: var(--st-text-primary);
}
[data-theme="light"] .st-opt:hover,
[data-theme="light"] .st-opt.is-active {
    background: rgba(184, 138, 56, 0.1);
    color: var(--st-gold-dark);
}
[data-theme="light"] .st-opt.is-selected {
    color: var(--st-gold-dark);
}
[data-theme="light"] .st-opt-group {
    color: var(--st-gold-dark);
}

/* ==========================================================================
   Light Mode Global Text Readability & Contrast Overrides (Bulletproof)
   ========================================================================== */
/* Force dark readable text on ANY inline light/white colors */
[data-theme="light"] [style*="color:#fff"],
[data-theme="light"] [style*="color: #fff"],
[data-theme="light"] [style*="color:#ffffff"],
[data-theme="light"] [style*="color: #ffffff"],
[data-theme="light"] [style*="color:white"],
[data-theme="light"] [style*="color: white"],
[data-theme="light"] [style*="color:var(--st-text-primary)"],
[data-theme="light"] [style*="color: var(--st-text-primary)"],
[data-theme="light"] [style*="color:#f5f5f7"],
[data-theme="light"] [style*="color: #f5f5f7"],
[data-theme="light"] [style*="color:#e6dfcf"],
[data-theme="light"] [style*="color: #e6dfcf"] {
    color: #1a1815 !important;
}

/* Light Tables: crystal-clear readability & bold headings */
[data-theme="light"] .st-table thead th,
[data-theme="light"] table thead th {
    background: #fbf7ee !important;
    color: #3d2b07 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    letter-spacing: 0.12em !important;
    border-bottom: 2px solid rgba(184, 138, 56, 0.4) !important;
    text-transform: uppercase;
}
[data-theme="light"] .st-table tbody td,
[data-theme="light"] table tbody td {
    border-bottom: 1px solid rgba(184, 138, 56, 0.16) !important;
    color: #1a1815 !important;
}
[data-theme="light"] .st-table tbody td strong,
[data-theme="light"] .st-table tbody td b,
[data-theme="light"] table tbody td strong,
[data-theme="light"] table tbody td b {
    color: #1a1815 !important;
    font-weight: 700 !important;
}
[data-theme="light"] .st-table tbody tr:hover td,
[data-theme="light"] table tbody tr:hover td {
    background: rgba(184, 138, 56, 0.08) !important;
}
[data-theme="light"] .st-table tbody tr:hover td:first-child,
[data-theme="light"] table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--st-gold) !important;
}

/* Headings in light mode */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: #1a1815 !important;
}
[data-theme="light"] .st-card-title,
[data-theme="light"] .ga-card-title,
[data-theme="light"] .chart-card-header,
[data-theme="light"] .summary-header h4,
[data-theme="light"] .quick-server-header h3 {
    color: #3d2b07 !important;
    font-weight: 700 !important;
}

/* Input, textarea & placeholder contrast in light mode */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] .form-control {
    color: #1a1815 !important;
    font-weight: 500;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder,
[data-theme="light"] .form-control::placeholder {
    color: #6e6556 !important;
    opacity: 1 !important;
}

/* Pagination in light mode */
[data-theme="light"] .btn-dark {
    background: #ffffff !important;
    border: 1px solid rgba(184, 138, 56, 0.35) !important;
    color: #1a1815 !important;
}
[data-theme="light"] .btn-dark:hover {
    background: rgba(184, 138, 56, 0.14) !important;
    border-color: var(--st-gold) !important;
    color: #3d2b07 !important;
}

/* Light Modals */
[data-theme="light"] .st-modal-backdrop,
[data-theme="light"] .modal-backdrop {
    background: rgba(28, 25, 20, 0.6) !important;
    backdrop-filter: blur(8px) !important;
}
[data-theme="light"] .st-modal-container,
[data-theme="light"] .modal-card {
    background: #ffffff !important;
    border: 1px solid rgba(184, 138, 56, 0.35) !important;
    box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.22) !important;
    color: var(--st-text-primary) !important;
}
[data-theme="light"] .st-modal-container h3,
[data-theme="light"] .modal-card h3,
[data-theme="light"] .modal-card [id$="title"],
[data-theme="light"] .modal-card [id*="-title"] {
    color: #1a1815 !important;
}
[data-theme="light"] .item-modal-tabs {
    background: #fbf9f4 !important;
    border-bottom: 1px solid rgba(184, 138, 56, 0.25) !important;
}
[data-theme="light"] .st-modal-container [style*="background:rgba(8,8,12"],
[data-theme="light"] .st-modal-container [style*="background: rgba(8,8,12"],
[data-theme="light"] .modal-card [style*="background:var(--st-elev)"],
[data-theme="light"] .modal-card [style*="background: var(--st-elev)"] {
    background: #fbf9f4 !important;
    border-color: rgba(184, 138, 56, 0.25) !important;
}
[data-theme="light"] .st-modal-container label,
[data-theme="light"] .modal-card label,
[data-theme="light"] .form-group label {
    color: #3d372e !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
}
[data-theme="light"] .st-modal-container input,
[data-theme="light"] .modal-card input,
[data-theme="light"] .form-control {
    background: #ffffff !important;
    border: 1px solid rgba(184, 138, 56, 0.38) !important;
    color: #1a1815 !important;
    font-weight: 600 !important;
}
[data-theme="light"] .st-modal-container input:focus,
[data-theme="light"] .modal-card input:focus,
[data-theme="light"] .form-control:focus {
    border-color: var(--st-gold) !important;
    box-shadow: 0 0 0 3px rgba(184, 138, 56, 0.18) !important;
}
[data-theme="light"] .modal-card > div:last-child:not(:first-child) {
    background: #faf8f5 !important;
    border-top: 1px solid var(--st-border) !important;
}
[data-theme="light"] .modal-card div[style*="border-radius:8px"][style*="padding:16px"] {
    background: #faf8f4 !important;
    border: 1px solid var(--st-border) !important;
}

/* Light Buttons */
[data-theme="light"] .btn-dark {
    background: #ffffff !important;
    border: 1px solid rgba(184, 138, 56, 0.35) !important;
    color: #1a1815 !important;
}
[data-theme="light"] .btn-dark:hover {
    background: rgba(184, 138, 56, 0.14) !important;
    border-color: var(--st-gold) !important;
    color: #3d2b07 !important;
}
[data-theme="light"] .btn-blue,
[data-theme="light"] .btn-primary {
    background: rgba(184, 138, 56, 0.12) !important;
    border: 1px solid var(--st-border-gold) !important;
    color: var(--st-gold-dark) !important;
}
[data-theme="light"] .btn-blue:hover,
[data-theme="light"] .btn-primary:hover {
    background: rgba(184, 138, 56, 0.22) !important;
    color: var(--st-gold-dark) !important;
}
[data-theme="light"] .btn-outline-gold {
    color: var(--st-gold-dark);
    border-color: var(--st-border-gold);
}
[data-theme="light"] .btn-outline-gold:hover {
    background: rgba(184, 138, 56, 0.12);
    color: var(--st-gold-dark);
}
[data-theme="light"] .btn-edit {
    background: #ffffff !important;
    color: #3d2b07 !important;
    border: 1px solid rgba(184, 138, 56, 0.4) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .btn-edit:hover {
    background: rgba(184, 138, 56, 0.15) !important;
    border-color: var(--st-gold) !important;
    color: #000 !important;
}

/* Light Badges & Alerts */
.mob-level-badge {
    background: rgba(207, 168, 98, 0.1);
    color: var(--st-gold-bright);
    border: 1px solid rgba(207, 168, 98, 0.25);
}
[data-theme="light"] .mob-level-badge {
    background: #fbf6ec !important;
    color: #4a3407 !important;
    border: 1px solid rgba(184, 138, 56, 0.45) !important;
    font-weight: 700 !important;
}
[data-theme="light"] .badge-gold {
    background: #fbf5e8 !important;
    color: #3d2b07 !important;
    border: 1px solid rgba(184, 138, 56, 0.45) !important;
    font-weight: 700 !important;
}
[data-theme="light"] .badge-secondary,
[data-theme="light"] .badge-dark {
    background: #f6f3eb !important;
    color: #2b261f !important;
    border: 1px solid rgba(184, 138, 56, 0.3) !important;
    font-weight: 700 !important;
}
[data-theme="light"] .alert {
    background: #ffffff;
    border: 1px solid var(--st-border-strong);
}
[data-theme="light"] .alert-warning {
    background: #fdfaf3;
    border-color: var(--st-border-gold);
    color: #6e4e10;
}
[data-theme="light"] .alert-danger {
    background: #fdf5f5;
    border-color: rgba(217, 100, 90, 0.4);
    color: #9c2e25;
}
[data-theme="light"] .alert-success {
    background: #f4faf6;
    border-color: rgba(108, 194, 154, 0.4);
    color: var(--st-ok);
}
[data-theme="light"] .onelya-footer {
    border-top: 1px solid var(--st-border);
    color: var(--st-text-muted);
}
[data-theme="light"] .toast-notice {
    background: #ffffff !important;
    border: 1px solid var(--st-border-gold) !important;
    color: var(--st-text-primary) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15) !important;
}

/* Feature & Fix Manager Light Mode */
[data-theme="light"] .feat-note {
    background: #fffcf5 !important;
    border-color: rgba(184, 138, 56, 0.32) !important;
    border-left: 3px solid var(--st-gold) !important;
    color: #4a4235 !important;
}
[data-theme="light"] .feat-note strong {
    color: #8c6517 !important;
}
[data-theme="light"] .feat-note code {
    color: #8c6517 !important;
    background: rgba(184, 138, 56, 0.12) !important;
    padding: 1px 5px !important;
    border-radius: 3px !important;
}
[data-theme="light"] .feat-group-head h3 {
    color: #4a3407 !important;
}
[data-theme="light"] .feat-group-head:hover h3 {
    color: #8c6517 !important;
}
[data-theme="light"] .feat-group-count {
    color: #6b6355 !important;
}
[data-theme="light"] .feat-group-count b {
    color: #ab7e28 !important;
}
[data-theme="light"] .feat-chips {
    background: #ffffff !important;
    border-color: rgba(184, 138, 56, 0.35) !important;
}
[data-theme="light"] .chip {
    color: #4a4235 !important;
    border-right-color: rgba(184, 138, 56, 0.22) !important;
}
[data-theme="light"] .chip:hover {
    color: #1a1815 !important;
    background: rgba(184, 138, 56, 0.08) !important;
}
[data-theme="light"] .chip.active {
    background: var(--st-gold-metal) !important;
    color: #1a1408 !important;
    font-weight: 700 !important;
}
[data-theme="light"] .feat-card {
    background: #ffffff !important;
    border: 1px solid rgba(184, 138, 56, 0.22) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .feat-card::before {
    background: rgba(184, 138, 56, 0.3) !important;
}
[data-theme="light"] .feat-card:hover {
    border-color: rgba(184, 138, 56, 0.45) !important;
    box-shadow: 0 6px 18px rgba(184, 138, 56, 0.12) !important;
}
[data-theme="light"] .feat-card.is-on {
    background: linear-gradient(165deg, #ffffff 0%, #fbf9f4 100%) !important;
    border-color: rgba(184, 138, 56, 0.45) !important;
    box-shadow: 0 4px 14px rgba(184, 138, 56, 0.1), 0 1px 3px rgba(0,0,0,0.03) !important;
}
[data-theme="light"] .feat-card.is-on::before {
    background: var(--st-gold) !important;
    box-shadow: 0 0 8px rgba(184, 138, 56, 0.5) !important;
}
[data-theme="light"] .feat-top h4 {
    color: #1a1815 !important;
}
[data-theme="light"] .feat-card:not(.is-on) .feat-top h4 {
    color: #5a5245 !important;
}
[data-theme="light"] .feat-tag.fix {
    color: var(--st-bad) !important;
    background: rgba(217, 74, 56, 0.08) !important;
    border: 1px solid rgba(217, 74, 56, 0.35) !important;
    font-weight: 700 !important;
}
[data-theme="light"] .feat-tag.core {
    color: #523b0a !important;
    background: rgba(184, 138, 56, 0.12) !important;
    border: 1px solid rgba(184, 138, 56, 0.45) !important;
    font-weight: 700 !important;
}
[data-theme="light"] .feat-switch .track {
    background: #e8e4dc !important;
    border: 1px solid rgba(184, 138, 56, 0.35) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .feat-switch .knob {
    background: #8c8273 !important;
}
[data-theme="light"] .feat-switch input:checked + .track {
    background: rgba(184, 138, 56, 0.25) !important;
    border-color: var(--st-gold) !important;
}
[data-theme="light"] .feat-switch input:checked + .track .knob {
    background: var(--st-gold-metal) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2), 0 0 6px rgba(184, 138, 56, 0.4) !important;
}
[data-theme="light"] .feat-switch .state {
    color: #6b6355 !important;
}
[data-theme="light"] .feat-card.is-on .feat-switch .state {
    color: #8c6517 !important;
    font-weight: 600 !important;
}


/* ---------- Customer management: dialogs & form grids ---------- */
.st-modal { display: none; position: fixed; inset: 0; z-index: 999; align-items: center; justify-content: center; padding: 20px; background: var(--st-well-strong); backdrop-filter: blur(3px); }
.st-modal.is-open { display: flex; }
.st-modal-card { width: 100%; max-width: 640px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--st-surface); border: 1px solid var(--st-border-gold); border-radius: var(--st-radius-lg); padding: 30px 32px; box-shadow: var(--st-shadow-card); }
.st-modal-card h3 { font-size: 24px; color: var(--st-gold-light); margin-bottom: 4px; }
.st-modal-card .st-modal-sub { color: var(--st-text-muted); font-size: 12.5px; margin-bottom: 22px; }
.st-modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }
.st-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.st-grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.st-form-section { font-family: var(--st-font-display); font-size: 17px; color: var(--st-gold); margin: 22px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--st-hair); }
.st-hint { color: var(--st-text-muted); font-size: 11.5px; margin-top: 5px; }
.st-test-row { display: flex; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--st-hair); font-size: 12.5px; }
.st-test-row strong { min-width: 74px; }
.st-test-row span.detail { color: var(--st-text-muted); }
@media (max-width: 720px) { .st-grid-2, .st-grid-3 { grid-template-columns: 1fr; } .st-modal-card { padding: 22px 18px; } }


/* ==========================================================================
   SixTails Control — Left Sidebar Navigation & App Shell Layout
   Seamlessly integrates collapsible accordions, light/dark themes, and responsive shell
   UTF-8 Strict
   ========================================================================== */

body.with-sidebar {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--st-bg-deep);
}

.onelya-sidebar {
    width: 264px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: var(--st-bg-surface);
    border-right: 1px solid var(--st-border);
    transition: width 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.onelya-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(224, 189, 120, 0.35), transparent);
    pointer-events: none;
}

.sidebar-brand {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--st-border);
    min-height: 64px;
    flex-shrink: 0;
    position: relative;
}

.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(207, 168, 98, 0.5), transparent);
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.sidebar-brand-expanded {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.sidebar-brand-collapsed {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sidebar-logo {
    height: 34px;
    max-width: 130px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--st-gold-glow));
    transition: transform 0.25s ease;
}

.sidebar-brand-link:hover .sidebar-logo {
    transform: scale(1.04);
}

.brand-badge-nexus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #120e06;
    background: var(--st-gold-metal);
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 1px 6px rgba(207, 168, 98, 0.45);
    line-height: 1.1;
    white-space: nowrap;
}

.nexus-crest-box {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nexus-crest-box:hover {
    transform: scale(1.08);
}

.nexus-crest-box:hover .nexus-crest-svg {
    filter: drop-shadow(0 0 10px rgba(207, 168, 98, 0.75));
}

.nexus-crest-svg {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 5px rgba(207, 168, 98, 0.4));
    transition: filter 0.25s ease;
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--st-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
}

.sidebar-close-btn:hover {
    color: var(--st-gold);
}

.sidebar-close-btn svg {
    width: 20px;
    height: 20px;
}

.sidebar-nav-container {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav-container::-webkit-scrollbar {
    width: 6px;
}
.sidebar-nav-container::-webkit-scrollbar-thumb {
    background: rgba(207, 168, 98, 0.2);
    border-radius: 4px;
}
.sidebar-nav-container::-webkit-scrollbar-thumb:hover {
    background: var(--st-gold-dark);
}

.sidebar-nav-item,
.sidebar-accordion-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9.5px 14px;
    border-radius: 5px;
    color: var(--st-text-secondary);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-bottom: 2px;
}

.sidebar-nav-item:hover,
.sidebar-accordion-btn:hover {
    color: var(--st-gold-light);
    background: rgba(207, 168, 98, 0.07);
}

.sidebar-nav-item.active,
.sidebar-accordion-btn.active {
    color: var(--st-text-strong) !important;
    background: linear-gradient(90deg, rgba(207, 168, 98, 0.18) 0%, rgba(207, 168, 98, 0.03) 100%) !important;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--st-gold), 0 2px 12px -2px rgba(207, 168, 98, 0.25) !important;
}

.sidebar-nav-item.active .sidebar-icon svg,
.sidebar-accordion-btn.active .sidebar-icon svg {
    filter: drop-shadow(0 0 6px rgba(207, 168, 98, 0.7));
    stroke: var(--st-gold-bright) !important;
}

.sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--st-gold);
}

.sidebar-icon svg {
    width: 17px;
    height: 17px;
}

.sidebar-btn-left {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 1;
    min-width: 0;
}

.sidebar-chevron {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
    color: var(--st-text-muted);
}

.sidebar-chevron svg {
    width: 14px;
    height: 14px;
}

.sidebar-accordion.open > .sidebar-accordion-btn .sidebar-chevron {
    transform: rotate(180deg);
    color: var(--st-gold);
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
    padding-left: 14px;
    border-left: 1px solid var(--st-border);
    margin-left: 21px;
    margin-top: 2px;
    margin-bottom: 4px;
}

.sidebar-accordion.open > .sidebar-submenu {
    max-height: 1600px;
}

.sidebar-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6.5px 10px;
    font-size: 12px;
    color: var(--st-text-muted);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    margin-bottom: 1px;
}

.sidebar-sub-item:hover {
    color: var(--st-gold-light);
    background: rgba(207, 168, 98, 0.05);
}

.sidebar-sub-item.active {
    color: var(--st-gold);
    font-weight: 600;
    background: rgba(207, 168, 98, 0.1);
}

.sub-bullet {
    font-size: 9px;
    color: var(--st-gold-dark);
}

.sidebar-sub-item.active .sub-bullet {
    color: var(--st-gold);
}

/* Nested Accordion for Efsun Yönetimi */
.sidebar-nested-accordion {
    margin: 2px 0;
}

.nested-accordion-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6.5px 10px;
    font-size: 12px;
    color: var(--st-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.nested-accordion-btn:hover {
    color: var(--st-gold-light);
    background: rgba(207, 168, 98, 0.05);
}

.nested-accordion-btn.active,
.sidebar-nested-accordion.open > .nested-accordion-btn {
    color: var(--st-gold);
    font-weight: 600;
}

.nested-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
    color: var(--st-text-muted);
}

.sidebar-nested-accordion.open > .nested-accordion-btn .nested-chevron {
    transform: rotate(180deg);
    color: var(--st-gold);
}

.nested-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding-left: 12px;
    border-left: 1px dashed var(--st-border);
    margin-left: 10px;
}

.sidebar-nested-accordion.open > .nested-submenu {
    max-height: 200px;
}

.sidebar-bottom {
    padding: 12px 18px;
    border-top: 1px solid var(--st-border);
    margin-top: auto;
    flex-shrink: 0;
    background: var(--st-well);
}

.sidebar-live-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--st-gold);
    font-weight: 600;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--st-ok);
    box-shadow: 0 0 8px var(--st-ok);
    animation: stPulse 2s infinite;
}

@keyframes stPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(108, 194, 154, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(108, 194, 154, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(108, 194, 154, 0); }
}

/* App Main Wrapper with Left Sidebar Layout */
.onelya-main-wrapper {
    flex: 1;
    margin-left: 264px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.onelya-topbar {
    position: sticky;
    top: 0;
    z-index: 990;
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--st-border);
    background: rgba(14, 13, 11, 0.94);
    backdrop-filter: blur(14px);
}

.topbar-main {
    max-width: none;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-left-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle-btn {
    border-radius: 4px;
}

.topbar-mobile-brand {
    display: none;
}

/* Desktop Collapsed Sidebar Mode */
body.sidebar-collapsed .onelya-sidebar {
    width: 68px;
}

body.sidebar-collapsed .onelya-main-wrapper {
    margin-left: 68px;
}

body.sidebar-collapsed .sidebar-brand-expanded,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-chevron,
body.sidebar-collapsed .sidebar-submenu,
body.sidebar-collapsed .sidebar-bottom {
    display: none !important;
}

body.sidebar-collapsed .sidebar-brand-collapsed {
    display: flex !important;
}

body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 12px 0;
}

body.sidebar-collapsed .sidebar-brand-link {
    width: 100%;
    justify-content: center;
}

body.sidebar-collapsed .sidebar-nav-item,
body.sidebar-collapsed .sidebar-accordion-btn {
    justify-content: center;
    padding: 10px 0;
}

body.sidebar-collapsed .sidebar-nav-item.active,
body.sidebar-collapsed .sidebar-accordion-btn.active {
    box-shadow: inset 3px 0 0 var(--st-gold), 0 0 14px rgba(207, 168, 98, 0.25) !important;
}

body.sidebar-collapsed .sidebar-btn-left {
    justify-content: center;
}

/* Mobile Responsive Sidebar (< 992px) */
@media (max-width: 992px) {
    .onelya-sidebar {
        transform: translateX(-100%);
        width: 270px;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.7);
    }

    .onelya-main-wrapper {
        margin-left: 0 !important;
    }

    .sidebar-close-btn {
        display: block;
    }

    .topbar-mobile-brand {
        display: block;
    }

    body.sidebar-mobile-open .onelya-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(7, 7, 6, 0.55);
        backdrop-filter: blur(3px);
        z-index: 995;
    }

    body.sidebar-mobile-open .sidebar-backdrop {
        display: block;
    }

    .topbar-main {
        padding: 10px 16px;
    }

    .topbar-center-search {
        display: none; /* Hide top search bar on small screens */
    }
}

/* Light Theme (Ivoire Doré) Overrides for Sidebar */
[data-theme="light"] .onelya-sidebar {
    background: #ffffff;
    border-right: 1px solid rgba(184, 138, 56, 0.22);
    box-shadow: 2px 0 16px rgba(184, 138, 56, 0.08);
}

[data-theme="light"] .onelya-topbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(184, 138, 56, 0.22);
    box-shadow: 0 1px 0 rgba(184, 138, 56, 0.1);
}

[data-theme="light"] .sidebar-brand {
    border-bottom: 1px solid rgba(184, 138, 56, 0.18);
}

[data-theme="light"] .brand-title {
    color: #523b0a;
}

[data-theme="light"] .brand-badge-nexus {
    background: var(--st-gold-metal);
    color: #1a1408;
}

[data-theme="light"] .nexus-crest-box .nexus-crest-svg polygon {
    fill: #ffffff !important;
    stroke: #8c6517 !important;
}
[data-theme="light"] .nexus-crest-box .nexus-crest-svg path {
    stroke: #8c6517 !important;
}
[data-theme="light"] .nexus-crest-box .nexus-crest-svg circle {
    fill: #8c6517 !important;
}

[data-theme="light"] .sidebar-nav-item,
[data-theme="light"] .sidebar-accordion-btn {
    color: #4a4235;
}

[data-theme="light"] .sidebar-nav-item:hover,
[data-theme="light"] .sidebar-accordion-btn:hover {
    color: #1a1815;
    background: rgba(184, 138, 56, 0.08);
}

[data-theme="light"] .sidebar-nav-item.active,
[data-theme="light"] .sidebar-accordion-btn.active {
    color: #523b0a;
    background: rgba(184, 138, 56, 0.12);
    box-shadow: inset 3px 0 0 #ab7e28;
}

[data-theme="light"] .sidebar-icon {
    color: #ab7e28;
}

[data-theme="light"] .sidebar-submenu {
    border-left-color: rgba(184, 138, 56, 0.25);
}

[data-theme="light"] .sidebar-sub-item {
    color: #6b6355;
}

[data-theme="light"] .sidebar-sub-item:hover {
    color: #1a1815;
    background: rgba(184, 138, 56, 0.06);
}

[data-theme="light"] .sidebar-sub-item.active {
    color: #8c6517;
    background: rgba(184, 138, 56, 0.12);
}

[data-theme="light"] .nested-accordion-btn {
    color: #6b6355;
}

[data-theme="light"] .nested-accordion-btn:hover {
    color: #1a1815;
    background: rgba(184, 138, 56, 0.06);
}

[data-theme="light"] .sidebar-bottom {
    background: #faf8f3;
    border-top: 1px solid rgba(184, 138, 56, 0.18);
}

[data-theme="light"] .sidebar-live-pill {
    color: #8c6517;
}

/* ==========================================================================
   SixTails Nexus - Sovereign Luxury Dashboard Styles (Noir Doré)
   ========================================================================== */

.dash-luxury-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* 1. Prestige Header */
.dash-prestige-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(24, 20, 14, 0.96) 0%, rgba(14, 12, 9, 0.98) 100%);
    border: 1px solid var(--st-border-gold);
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.dash-prestige-head::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--st-gold-metal);
}

.nexus-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
    background: rgba(207, 168, 98, 0.1);
    border: 1px solid rgba(207, 168, 98, 0.25);
    border-radius: 20px;
    margin-bottom: 6px;
}

.live-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--st-ok);
    box-shadow: 0 0 10px var(--st-ok);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.live-pill-text {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--st-gold-light);
    text-transform: uppercase;
}

.live-profile-tag {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    background: rgba(207, 168, 98, 0.2);
    border-radius: 4px;
    color: var(--st-text-strong);
}

.dash-prestige-title {
    font-family: var(--st-font-display);
    font-size: 30px;
    font-weight: 600;
    color: var(--st-gold-light);
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin: 0;
}

.dash-prestige-desc {
    font-size: 13px;
    color: var(--st-text-secondary);
    margin: 4px 0 0;
}

.dash-prestige-kpi {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kpi-block {
    text-align: right;
}

.kpi-block.kpi-online .kpi-val {
    background: var(--st-gold-metal);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 10px rgba(207, 168, 98, 0.3));
}

.kpi-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--st-gold);
}

.kpi-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--st-ok);
}

.kpi-val {
    font-family: var(--st-font-mono);
    font-size: 28px;
    font-weight: 700;
    color: var(--st-text-primary);
    line-height: 1.1;
    margin-top: 2px;
}

.kpi-sub {
    font-size: 10.5px;
    color: var(--st-text-muted);
}

.kpi-divider {
    width: 1px;
    height: 34px;
    background: var(--st-border);
}

/* 2. Section Containers & Bars */
.nexus-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.nexus-section-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 2px;
}

.section-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-bar-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--st-gold);
}

.section-bar-count {
    font-size: 10.5px;
    font-family: var(--st-font-mono);
    color: var(--st-text-muted);
    background: rgba(207, 168, 98, 0.08);
    padding: 1px 7px;
    border-radius: 4px;
    border: 1px solid rgba(207, 168, 98, 0.15);
}

.nexus-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 22px;
    height: 22px;
    color: var(--st-gold);
    flex-shrink: 0;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--st-gold-light);
    margin: 0;
}

.section-desc {
    font-size: 12px;
    color: var(--st-text-muted);
    margin: 2px 0 0;
}

.matrix-legend {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--st-text-secondary);
}

.legend-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-badge.active .dot {
    background: var(--st-ok);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

.legend-badge.inactive .dot {
    background: #70695c;
}

/* 3. Channel Matrix */
.nexus-channel-matrix {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}

.nexus-ch-card {
    background: var(--st-bg-surface);
    border: 1px solid var(--st-border);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.nexus-ch-card.is-active {
    border-color: rgba(207, 168, 98, 0.35);
    background: linear-gradient(180deg, rgba(207, 168, 98, 0.06) 0%, rgba(18, 16, 12, 0.95) 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.nexus-ch-card.is-active::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--st-ok);
    box-shadow: 0 0 8px var(--st-ok);
}

.nexus-ch-card.is-inactive {
    opacity: 0.65;
    background: var(--st-bg-surface);
}

.nexus-ch-card:hover {
    transform: translateY(-2px);
    border-color: var(--st-gold);
}

.ch-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ch-badge-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--st-text-primary);
}

.ch-badge-port {
    font-family: var(--st-font-mono);
    font-size: 10px;
    color: var(--st-gold);
    background: rgba(207, 168, 98, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
}

.ch-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ch-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nexus-ch-card.is-active .ch-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--st-ok);
    box-shadow: 0 0 6px var(--st-ok);
}

.nexus-ch-card.is-inactive .ch-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--st-bad);
}

.ch-status-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--st-text-primary);
}

.nexus-ch-card.is-active .ch-status-label {
    color: var(--st-ok);
}

.nexus-ch-card.is-inactive .ch-status-label {
    color: var(--st-bad);
}

.ch-type-label {
    font-size: 10px;
    color: var(--st-text-muted);
}

/* 4. Action Deck */
.nexus-action-deck {
    background: var(--st-bg-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-deck-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deck-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.deck-icon {
    width: 22px;
    height: 22px;
    color: var(--st-gold);
    flex-shrink: 0;
}

.deck-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--st-gold-light);
    margin: 0;
}

.deck-desc {
    font-size: 12px;
    color: var(--st-text-muted);
    margin: 2px 0 0;
}

.deck-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--st-text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.action-btn-matrix {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.nexus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nexus-btn svg {
    width: 15px;
    height: 15px;
}

.nexus-btn.btn-ch {
    background: linear-gradient(180deg, #1f1b14 0%, #16130e 100%);
    border-color: var(--st-border-gold);
    color: var(--st-gold-light);
}

.nexus-btn.btn-ch:hover {
    background: linear-gradient(180deg, #2a241a 0%, #1e1913 100%);
    border-color: var(--st-gold);
    box-shadow: 0 4px 12px rgba(207, 168, 98, 0.2);
    transform: translateY(-1px);
}

.nexus-btn.btn-danger {
    background: rgba(181, 82, 74, 0.12);
    border-color: rgba(181, 82, 74, 0.4);
    color: var(--st-bad);
}

.nexus-btn.btn-danger:hover {
    background: rgba(181, 82, 74, 0.25);
    border-color: var(--st-bad);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}

.nexus-btn.btn-warning {
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.4);
    color: var(--st-warn);
}

.nexus-btn.btn-warning:hover {
    background: rgba(217, 119, 6, 0.25);
    border-color: var(--st-warn);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
    transform: translateY(-1px);
}

.btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 5. 8 Stat Cards */
.stat-luxury-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--st-bg-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: var(--st-border-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--st-gold);
}

.stat-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(207, 168, 98, 0.1);
    color: var(--st-gold-light);
}

.stat-icon-wrap svg {
    width: 15px;
    height: 15px;
}

.stat-icon-wrap.icon-success {
    background: rgba(52, 211, 153, 0.1);
    color: var(--st-ok);
}

.stat-icon-wrap.icon-crimson {
    background: rgba(181, 82, 74, 0.15);
    color: var(--st-bad);
}

.stat-icon-wrap.icon-gold {
    background: var(--st-gold-metal);
    color: #120e06;
    box-shadow: 0 0 10px rgba(207, 168, 98, 0.4);
}

.stat-card-num {
    font-family: var(--st-font-mono);
    font-size: 36px;
    font-weight: 700;
    color: var(--st-text-primary);
    line-height: 1.1;
    margin: 8px 0 4px;
}

.stat-card-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--st-text-muted);
}

.stat-sub-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--st-gold);
}

.stat-sub-dot.dot-success { background: var(--st-ok); }
.stat-sub-dot.dot-crimson { background: var(--st-bad); }

/* Crimson Card Variant */
.stat-card.stat-crimson {
    border-color: rgba(181, 82, 74, 0.3);
}

.num-crimson {
    color: var(--st-bad);
}

/* Sovereign Gold Highlight Card */
.stat-card.stat-sovereign-gold {
    background: linear-gradient(145deg, #221c12 0%, #15120c 100%);
    border: 1px solid var(--st-gold);
    box-shadow: 0 8px 24px rgba(207, 168, 98, 0.18);
}

.gold-card-shine {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--st-gold-metal);
}

.gold-pill-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gold-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--st-ok);
    box-shadow: 0 0 6px var(--st-ok);
}

.gold-label {
    color: var(--st-gold-light);
    font-weight: 700;
}

.num-gold {
    background: var(--st-gold-metal);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(207, 168, 98, 0.35));
}

.gold-sub {
    color: var(--st-gold-light);
    font-weight: 500;
}

.gold-indicator-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--st-ok);
    animation: livePulse 1.8s infinite;
}

/* 6. Charts Row */
.nexus-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.chart-luxury-card {
    background: var(--st-bg-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(207, 168, 98, 0.1);
}

.chart-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header-icon {
    width: 20px;
    height: 20px;
    color: var(--st-gold);
    flex-shrink: 0;
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--st-gold-light);
    margin: 0;
}

.chart-subtitle {
    font-size: 11.5px;
    color: var(--st-text-muted);
    margin: 2px 0 0;
}

.chart-stat-badge {
    font-family: var(--st-font-mono);
    font-size: 11px;
    color: var(--st-gold-light);
    background: rgba(207, 168, 98, 0.12);
    border: 1px solid rgba(207, 168, 98, 0.25);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Empire Layout */
.empire-visual-layout {
    display: flex;
    align-items: center;
    gap: 26px;
}

.donut-display-box {
    flex-shrink: 0;
}

.donut-conic-ring {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.donut-conic-ring:hover {
    transform: scale(1.03);
}

.donut-inner-hole {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #14110d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

.donut-count {
    font-family: var(--st-font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--st-text-strong);
    line-height: 1.1;
}

.donut-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--st-text-muted);
    margin-top: 2px;
}

.empire-progress-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empire-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.empire-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.empire-identity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.empire-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.swatch-shinsoo { background: #b5524a; box-shadow: 0 0 6px rgba(181, 82, 74, 0.6); }
.swatch-chunjo { background: #cfa862; box-shadow: 0 0 6px rgba(207, 168, 98, 0.6); }
.swatch-jinno { background: #8b8576; box-shadow: 0 0 6px rgba(139,133,118, 0.6); }

.empire-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--st-text-primary);
}

.empire-metrics {
    display: flex;
    align-items: center;
    gap: 8px;
}

.empire-count {
    font-family: var(--st-font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--st-text-strong);
}

.empire-pct {
    font-family: var(--st-font-mono);
    font-size: 11px;
    color: var(--st-gold);
    width: 36px;
    text-align: right;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.fill-shinsoo { background: linear-gradient(90deg, #b5524a, #d46b62); }
.fill-chunjo { background: var(--st-gold-metal); }
.fill-jinno { background: linear-gradient(90deg, #8b8576, #8b8576); }

/* Jobs Layout */
.jobs-list-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

.job-item-row:hover {
    background: rgba(207, 168, 98, 0.04);
    border-color: rgba(207, 168, 98, 0.15);
}

.job-info {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 160px;
    flex-shrink: 0;
}

.job-icon-tag {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(207, 168, 98, 0.1);
    color: var(--st-gold-light);
    flex-shrink: 0;
}

.job-icon-tag svg {
    width: 14px;
    height: 14px;
}

.job-text {
    display: flex;
    flex-direction: column;
}

.job-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--st-text-primary);
    line-height: 1.2;
}

.job-detail {
    font-size: 9.5px;
    color: var(--st-text-muted);
}

.job-stats-track {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.job-nums {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-nums .val {
    font-family: var(--st-font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--st-text-strong);
}

.job-nums .pct {
    font-family: var(--st-font-mono);
    font-size: 11px;
    color: var(--st-gold);
}

.job-bar-bg {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.job-bar-fill {
    height: 100%;
    background: var(--st-gold-metal);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* 7. Module Shortcuts */
.module-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.module-card {
    background: var(--st-bg-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.module-card:hover {
    border-color: var(--st-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    background: linear-gradient(180deg, rgba(207, 168, 98, 0.06) 0%, rgba(20, 18, 14, 0.95) 100%);
}

.module-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(207, 168, 98, 0.1);
    color: var(--st-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.module-card-icon svg {
    width: 18px;
    height: 18px;
}

.module-card:hover .module-card-icon {
    background: var(--st-gold-metal);
    color: #120e06;
    box-shadow: 0 0 12px rgba(207, 168, 98, 0.4);
}

.module-card-body {
    flex: 1;
}

.module-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--st-gold-light);
    margin: 0;
    line-height: 1.2;
}

.module-card-desc {
    font-size: 11px;
    color: var(--st-text-muted);
    margin: 3px 0 0;
    line-height: 1.3;
}

.module-card-arrow {
    font-size: 16px;
    color: var(--st-text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.module-card:hover .module-card-arrow {
    color: var(--st-gold);
    transform: translateX(4px);
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    .nexus-channel-matrix { grid-template-columns: repeat(4, 1fr); }
    .action-btn-matrix { grid-template-columns: repeat(3, 1fr); }
    .stat-luxury-grid { grid-template-columns: repeat(2, 1fr); }
    .nexus-charts-row { grid-template-columns: 1fr; }
    .module-shortcuts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .dash-prestige-head { flex-direction: column; align-items: flex-start; gap: 16px; }
    .dash-prestige-kpi { width: 100%; justify-content: space-between; }
    .nexus-channel-matrix { grid-template-columns: repeat(2, 1fr); }
    .action-btn-matrix { grid-template-columns: repeat(2, 1fr); }
    .stat-luxury-grid { grid-template-columns: 1fr; }
    .module-shortcuts-grid { grid-template-columns: 1fr; }
    .empire-visual-layout { flex-direction: column; }
}

/* Light Mode Overrides */
[data-theme="light"] .dash-prestige-head {
    background: #ffffff;
    border-color: rgba(184, 138, 56, 0.3);
}

[data-theme="light"] .dash-prestige-title {
    color: #1a1815;
}

[data-theme="light"] .kpi-val {
    color: #1a1815;
}

[data-theme="light"] .nexus-ch-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nexus-action-deck,
[data-theme="light"] .stat-card,
[data-theme="light"] .chart-luxury-card,
[data-theme="light"] .module-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .stat-card.stat-sovereign-gold {
    background: linear-gradient(145deg, #fbf7ee 0%, #f4ecdc 100%);
    border-color: var(--st-gold);
}

[data-theme="light"] .stat-card-num {
    color: #1a1815;
}

[data-theme="light"] .donut-inner-hole {
    background: #ffffff;
}

[data-theme="light"] .donut-count {
    color: #1a1815;
}

[data-theme="light"] .job-item-row {
    background: #faf8f5;
    border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .job-name {
    color: #1a1815;
}

[data-theme="light"] .job-nums .val,
[data-theme="light"] .empire-count {
    color: #1a1815;
}

/* ==========================================================================
   SixTails Nexus - Item Armory Grid & Dual View Styles (Noir Doré)
   ========================================================================== */

.item-catalog-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.item-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Dual View Toggle */
.view-mode-toggle {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--st-border);
    border-radius: 6px;
    padding: 3px;
    gap: 2px;
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    background: transparent;
    border: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--st-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn svg {
    width: 14px;
    height: 14px;
}

.view-toggle-btn:hover {
    color: var(--st-text-primary);
}

.view-toggle-btn.active {
    background: var(--st-gold-metal);
    color: #120e06;
    box-shadow: 0 1px 6px rgba(207, 168, 98, 0.35);
}

/* Category Pills Bar */
.item-category-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.item-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    background: var(--st-bg-surface);
    border: 1px solid var(--st-border);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--st-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.item-category-pill:hover {
    border-color: var(--st-gold);
    color: var(--st-gold-light);
    transform: translateY(-1px);
}

.item-category-pill.active {
    background: linear-gradient(135deg, rgba(207, 168, 98, 0.2) 0%, rgba(20, 18, 14, 0.95) 100%);
    border-color: var(--st-gold);
    color: var(--st-gold-light);
    box-shadow: 0 2px 10px rgba(207, 168, 98, 0.25);
}

/* Armory Card Grid */
.item-armory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.item-armory-card {
    background: var(--st-bg-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.item-armory-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--st-gold), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.item-armory-card:hover {
    border-color: var(--st-border-gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(207, 168, 98, 0.15);
}

.item-armory-card:hover::before {
    opacity: 1;
}

.armory-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.armory-vnum-badge {
    font-family: var(--st-font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--st-gold-light);
    background: rgba(207, 168, 98, 0.12);
    border: 1px solid rgba(207, 168, 98, 0.25);
    padding: 3px 8px;
    border-radius: 4px;
}

.armory-type-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--st-text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 8px;
    border-radius: 4px;
}

.armory-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.armory-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: radial-gradient(circle, rgba(207, 168, 98, 0.15) 0%, rgba(20, 18, 14, 0.9) 70%);
    border: 1px solid var(--st-border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--st-gold);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease;
}

.item-armory-card:hover .armory-icon-box {
    transform: scale(1.08);
    border-color: var(--st-gold);
}

.armory-item-info {
    flex: 1;
    overflow: hidden;
}

.armory-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--st-text-primary);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.armory-item-subname {
    font-family: var(--st-font-mono);
    font-size: 10.5px;
    color: var(--st-text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specs Row */
.armory-specs-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--st-well);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

.armory-spec-item {
    display: flex;
    flex-direction: column;
}

.armory-spec-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--st-text-muted);
}

.armory-spec-val {
    font-family: var(--st-font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--st-text-secondary);
    margin-top: 2px;
}

.armory-spec-val.gold {
    color: var(--st-gold);
}

/* Class Dots */
.armory-class-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.class-compat-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.class-badge-micro {
    font-size: 8.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--st-text-muted);
}

.class-badge-micro.active {
    background: rgba(207, 168, 98, 0.2);
    color: var(--st-gold-light);
    border: 1px solid rgba(207, 168, 98, 0.35);
}

.armory-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.armory-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(207, 168, 98, 0.1);
    border: 1px solid var(--st-border-gold);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--st-gold-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.armory-edit-btn:hover {
    background: var(--st-gold-metal);
    color: #120e06;
    border-color: var(--st-gold);
    transform: translateY(-1px);
}

.armory-refine-link {
    font-family: var(--st-font-mono);
    font-size: 10.5px;
    color: var(--st-gold);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(207, 168, 98, 0.06);
    border: 1px solid rgba(207, 168, 98, 0.15);
}

.armory-refine-link:hover {
    background: rgba(207, 168, 98, 0.15);
}

/* Light Theme Overrides */
[data-theme="light"] .item-armory-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .armory-item-name {
    color: #1a1815;
}

[data-theme="light"] .armory-specs-row {
    background: #f7f5f0;
}

[data-theme="light"] .item-category-pill {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Mob Bestiary Card Styles */
.mob-specs-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: var(--st-well);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

[data-theme="light"] .mob-specs-row {
    background: #f7f5f0;
}

.mob-rank-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
}

.mob-rank-badge.rank-boss {
    background: rgba(220, 53, 69, 0.15);
    color: var(--st-bad);
    border: 1px solid rgba(220, 53, 69, 0.35);
}

.mob-rank-badge.rank-king {
    background: rgba(207, 168, 98, 0.2);
    color: var(--st-gold-light);
    border: 1px solid var(--st-border-gold);
    box-shadow: 0 0 10px rgba(207, 168, 98, 0.2);
}

.mob-rank-badge.rank-normal {
    background: rgba(255, 255, 255, 0.04);
    color: var(--st-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
/* ---- semantic status tokens (single palette, theme aware) ---- */
:root {
    --st-text-strong: #ffffff;
    --st-ok: #6cc29a;
    --st-bad: #ee9a92;
    --st-warn: #e0bd78;
}
[data-theme="light"] {
    --st-text-strong: #1a1815;
    --st-ok: #1f7a52;
    --st-bad: #b0372c;
    --st-warn: #8c6517;
}

/* ---- surface tokens used by view-level styles ---- */
:root { --st-elev: #17140e; --st-well: rgba(0, 0, 0, 0.28); --st-well-strong: rgba(7, 7, 6, 0.7); }
[data-theme="light"] { --st-elev: #f1eee6; --st-well: rgba(184, 138, 56, 0.07); --st-well-strong: rgba(184, 138, 56, 0.1); }

/* ==========================================================================
   Theme consistency fixes (day / night)
   ========================================================================== */
[data-theme="light"] { --st-gold-bright: #a2761f; }

/* active sidebar entry: white text on a pale gold wash was unreadable in the day theme */
[data-theme="light"] .sidebar-nav-item.active,
[data-theme="light"] .sidebar-nav-item.active .sidebar-label,
[data-theme="light"] .sidebar-accordion-btn.active,
[data-theme="light"] .sidebar-accordion-btn.active .sidebar-label { color: var(--st-gold-light); }

/* channel start buttons on the dashboard were a dark island in the day theme */
[data-theme="light"] .nexus-btn.btn-ch { background: linear-gradient(180deg, #fffdf8 0%, #f3eee2 100%); border-color: var(--st-border-gold); color: var(--st-gold-light); }
[data-theme="light"] .nexus-btn.btn-ch:hover { background: linear-gradient(180deg, #fff8e8 0%, #efe6cf 100%); border-color: var(--st-gold); box-shadow: 0 4px 12px rgba(171, 126, 40, 0.18); }
[data-theme="light"] .nexus-btn.btn-ch span, [data-theme="light"] .nexus-btn.btn-ch svg { color: inherit; }

/* solid status buttons: dark text on the pastel night fills, white text on the deeper day fills */
body .bk-action-btn { color: #14110c !important; }
[data-theme="light"] body .bk-action-btn, [data-theme="light"] .bk-action-btn { color: #ffffff !important; }

/* ==========================================================================
   Responsive layer v3 — phone / tablet / desktop
   Breakpoints: 1200 (small desktop) · 992 (tablet, off-canvas menu) · 768 · 560 (phone)
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, svg, video, canvas { max-width: 100%; }
pre, code, kbd { max-width: 100%; overflow-wrap: anywhere; }
.form-control, input, select, textarea { min-width: 0; max-width: 100%; }
.onelya-main-wrapper, .onelya-content-container { min-width: 0; }

/* Wide data tables scroll inside their card instead of stretching the page */
.st-card-body, .table-responsive, .table-wrap, [class$="-table-wrap"], [class*="table-scroll"] { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 992px) {
    /* tablet: topbar becomes two rows, search stays usable */
    .topbar-main { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
    .topbar-left-actions { flex: 0 0 auto; }
    .topbar-center-search { display: block !important; order: 3; flex: 1 1 100%; margin: 0; max-width: none; }
    .topbar-actions { margin-left: auto; gap: 8px; flex-wrap: nowrap; min-width: 0; }
    .onelya-content-container { padding: 24px 18px 48px; }
    .st-table { min-width: 620px; }
    .st-card-header { flex-wrap: wrap; gap: 10px; }
    .onelya-footer { padding: 18px 16px; }
}

@media (max-width: 768px) {
    .onelya-content-container { padding: 20px 14px 40px; }
    .onelya-content-container > div:first-child h2 { font-size: 30px !important; line-height: 1.1; }
    .dash-head { padding-bottom: 18px; margin-bottom: 16px; gap: 18px; }
    .dash-head h2 { font-size: 40px !important; }
    .dash-key { flex-wrap: wrap; gap: 14px 0; }
    .dash-key div { padding: 2px 18px; }
    .dash-key div:first-child { padding-left: 0; }
    .dash-key div strong { font-size: 32px; }
    .quick-btn-grid, .action-btn-matrix { grid-template-columns: repeat(2, 1fr); }
    .onelya-charts-grid { grid-template-columns: 1fr; }
    .onelya-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .metric-value { font-size: 32px; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .summary-cell { border-right: none !important; border-bottom: 1px solid var(--st-border); }
    .donut-chart-container { flex-direction: column; gap: 18px; }

    /* inline multi-column grids in views collapse on tablets/phones */
    [style*="grid-template-columns:1fr 1fr 1fr"], [style*="grid-template-columns: 1fr 1fr 1fr"],
    [style*="grid-template-columns:repeat(3"], [style*="grid-template-columns: repeat(3"],
    [style*="grid-template-columns:repeat(4"], [style*="grid-template-columns: repeat(4"],
    [style*="grid-template-columns:1fr 1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }

    /* modals: full width sheets */
    .modal-backdrop { padding: 10px !important; align-items: flex-end !important; }
    .modal-card { max-width: 100% !important; width: 100% !important; max-height: 92vh !important; border-radius: 8px !important; }
    .modal-card [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .modal-card > div[style*="padding:24px"], .modal-card > div[style*="padding: 24px"] { padding: 16px !important; }
    .mob-tab-btn, .modal-tab-btn { padding: 13px 14px !important; }
}

@media (max-width: 560px) {
    body.onelya-layout, body { font-size: 14px; }
    .topbar-main { padding: 8px 12px; }
    .topbar-actions .topbar-icon-btn:not(.theme-toggle-btn):not(.sidebar-toggle-btn) { display: none; }
    .topbar-actions .notification-wrapper { display: inline-flex !important; }
    .topbar-actions #global-profile-switcher, .topbar-actions .st-select { max-width: 130px !important; }
    .topbar-actions .st-select-btn.search-select { min-width: 0; max-width: 130px; }
    .user-pill { padding: 3px 8px 3px 4px; gap: 6px; }
    .user-pill .user-name { display: none; }
    .logout-link { font-size: 10px; }
    .topbar-icon-btn { width: 38px; height: 38px; }
    .onelya-content-container { padding: 16px 12px 36px; }
    .onelya-content-container > div:first-child { flex-wrap: wrap; gap: 14px; }
    .onelya-content-container > div:first-child h2 { font-size: 26px !important; }
    .dash-head h2 { font-size: 34px !important; }
    .dash-key div strong { font-size: 28px; }
    .onelya-stats-grid, .stat-luxury-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-metric-card { padding: 14px 14px 12px; }
    .metric-value { font-size: 28px; }
    .onelya-channel-grid, .nexus-channel-matrix { grid-template-columns: 1fr 1fr; }
    .quick-btn-grid, .action-btn-matrix { grid-template-columns: 1fr 1fr; }
    .st-card-body { padding: 14px; }
    .st-card-header { padding: 12px 14px; }
    .st-table { min-width: 560px; font-size: 12.5px; }
    .st-table thead th, .st-table tbody td { padding: 10px 12px; }
    .btn { min-height: 40px; }
    .btn-sm { min-height: 34px; }
    .btn-xl { padding: 14px 22px; }
    input, select, textarea, .form-control, .st-select-btn { font-size: 16px; }   /* stops iOS zoom-on-focus */
    .form-label { font-size: 10px; }
    [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .st-select-menu { max-width: calc(100vw - 16px); }
    .st-opt { padding: 11px 14px; }
    .dropdown-menu { min-width: 0; max-width: calc(100vw - 24px); }
    /* generic button rows wrap instead of overflowing */
    .onelya-content-container [style*="display:flex"][style*="gap"] { flex-wrap: wrap; }
}

@media (max-width: 380px) {
    .onelya-stats-grid, .stat-luxury-grid, .onelya-channel-grid, .nexus-channel-matrix { grid-template-columns: 1fr; }
    .dash-key div { padding: 2px 12px; }
}

/* 404 content */
.nf-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 80px 16px; gap: 6px; }
.nf-code { font-family: var(--st-font-display); font-size: clamp(72px, 18vw, 140px); font-weight: 500; line-height: 1; letter-spacing: -0.03em; background: var(--st-gold-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nf-wrap h2 { font-size: clamp(24px, 5vw, 34px); margin: 6px 0 0; }
.nf-target { color: var(--st-text-secondary); margin: 10px 0 22px; }
.nf-target code { color: var(--st-gold); font-family: var(--st-font-mono); overflow-wrap: anywhere; }

/* flex children must be allowed to shrink, otherwise a wide table stretches the whole page */
.row > *, [style*="flex:1"], [style*="flex: 1"] { min-width: 0; }
@media (max-width: 992px) {
    .row { flex-wrap: wrap; }
    .row > [style*="flex:1"], .row > [style*="flex: 1"] { flex: 1 1 100% !important; }
}
/* hover-only info bubbles cannot be used on touch screens and only stretch the page */
@media (max-width: 992px), (hover: none) {
    .feat-tooltip-pop, .ga-tip-bubble, [class$="-tip-bubble"], [class$="-tooltip-pop"] { display: none !important; }
}

/* Intentionally dark code panes (Quest Studio): keep their text tokens dark-theme values inside the day theme */
.qs-editor, .qs-result, .qs-editor *, .qs-result * { --st-text-primary: #f1ebdd; --st-text-secondary: #a79f8f; --st-text-muted: #70695c; --st-gold: #cfa862; --st-gold-light: #ecd9ad; --st-border: rgba(214, 178, 108, 0.13); --st-border-strong: rgba(214, 178, 108, 0.26); }
.qs-editor h4, .qs-result h4 { color: var(--st-gold-light); }

body .qs-result h4, body .qs-editor h4 { color: #ecd9ad !important; }
