/* ==========================================================================
   DIRECTOR'S SUITE - SWISS PRECISION & ESPRESSO CONSOLE (css/theme.css)
   ========================================================================== */

/* 1. TYPOGRAFIE-IMPORT: Lokal gehostet (100% autark, offline-fähig & DSGVO-konform, SIL OFL 1.1) */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../assets/fonts/ibm-plex-mono-500-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../assets/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../assets/fonts/ibm-plex-mono-600-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../assets/fonts/ibm-plex-mono-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('../assets/fonts/inter-var-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('../assets/fonts/inter-var-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Studio OLED Black & Anthrazit (Aligned with regardingpicture.com) */
    --bg-base: #050507;
    --bg-surface: #0b0c10;
    --bg-surface-elevated: #12141b;
    --bg-surface-active: #191c26;
    --bg-input: #07080b;

    /* Grenzen & subtile Lichter (Gives the "Hardware" feel) */
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-medium: rgba(255, 255, 255, 0.13);
    --border-highlight: rgba(56, 189, 248, 0.38);
    --surface-edge: inset 0 1px 0 rgba(255, 255, 255, 0.045);

    /* Ausgewogene Funktions-Farbakzente: klares Studio-Gold, Salbei, Mohn (ohne Braunstich) */
    --accent-amber: #38bdf8;
    --accent-brass: #f0c475;
    --accent-sage: #52b788;
    --accent-poppy: #e76f51;
    --accent-ochre: #f59e0b;

    /* RegardingPicture Brand-Akzente (Main Page Bridge) */
    --accent-brand-cyan: #00d8ff;
    --accent-brand-cyan-tw: #22d3ee;
    --accent-brand-pink: #ff006a;
    --accent-brand-pink-tw: #ec4899;
    --gradient-brand: linear-gradient(90deg, #00d8ff 0%, #ff006a 100%);
    --gradient-brand-border: linear-gradient(135deg, #00d8ff, #ff006a);
    --glow-ambient-cyan: radial-gradient(circle, rgba(0, 216, 255, 0.14) 0%, rgba(0, 0, 0, 0) 70%);
    --glow-ambient-pink: radial-gradient(circle, rgba(255, 0, 106, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    --shadow-icon-cyan: 0 0 14px rgba(0, 216, 255, 0.35);

    /* Typografie & Kontraste */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #5b6370;

    --font-display: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    padding: 30px 24px;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

body.player-body {
    /* Im Player bleibt --accent-amber Champagner-Gold, damit Sky-Cyan (#38bdf8) exklusiv für Team-Marker (.is-other) & 360°-Telemetrie reserviert bleibt */
    --accent-amber: #e5b869;
    --border-highlight: rgba(240, 196, 117, 0.4);
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
    width: 100vw;
    height: 100vh;
}

.container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 16px;
}

/* --------------------------------------------------------------------------
   2. HEADER & ARCHITEKTONISCHE CONTAINER
   -------------------------------------------------------------------------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 18px;
    margin-bottom: 26px;
    flex-wrap: wrap;
    gap: 16px;
}

h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-brass);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Karten mit feiner innerer Lichtkante statt dicker 1px Ränder */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px 20px 22px 20px;
    margin-bottom: 24px;
    box-shadow: var(--surface-edge), 0 8px 24px rgba(0, 0, 0, 0.4);
    overflow-x: auto;
    overflow-y: hidden !important;
    height: auto !important;
    max-height: none !important;
    -webkit-overflow-scrolling: touch;
}
.card table {
    min-width: 1380px;
    width: 100%;
}
@media (max-width: 1380px) {
    body:not(.player-body) {
        padding: 18px 12px;
    }
    .container {
        padding: 0 6px;
    }
    .card {
        padding: 14px 14px 18px 14px;
    }
    .card table {
        min-width: 920px;
    }
}
.card::-webkit-scrollbar {
    height: 7px;
    width: 0px; /* Verhindert jeglichen inneren vertikalen Scrollbalken */
}
.card::-webkit-scrollbar-track {
    background: #0f1115;
    border-radius: 4px;
}
.card::-webkit-scrollbar-thumb {
    background: #2a2f38;
    border-radius: 4px;
}
.card::-webkit-scrollbar-thumb:hover {
    background: #424a56;
}

/* --------------------------------------------------------------------------
   3. PRÄZISE, RUHIGE BUTTONS, VEKTOR-ICONS & FORMULARE
   -------------------------------------------------------------------------- */
svg.ui-ico {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    vertical-align: -2px;
    display: inline-block;
}

svg.ui-ico-sm {
    width: 11.5px;
    height: 11.5px;
    flex-shrink: 0;
    vertical-align: -1.5px;
    display: inline-block;
}

svg.ui-ico-lg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    vertical-align: -2.5px;
    display: inline-block;
}

button, .btn {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

button:hover, .btn:hover {
    background: var(--bg-surface-active);
    border-color: var(--border-highlight);
    color: #fff;
}

button.btn-primary, .btn.btn-primary {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    border-color: rgba(56, 189, 248, 0.45);
    color: #f8fafc;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 8px rgba(0, 0, 0, 0.45);
}

button.btn-primary:hover, .btn.btn-primary:hover {
    background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
    border-color: rgba(125, 211, 252, 0.65);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 4px 12px rgba(2, 132, 199, 0.32);
}

button.btn-warning, .btn.btn-warning {
    background: transparent;
    border-color: rgba(240, 196, 117, 0.35);
    color: var(--accent-brass);
}

button.btn-warning:hover {
    background: rgba(240, 196, 117, 0.1);
}

button.btn-danger, .btn.btn-danger {
    background: transparent;
    border-color: rgba(231, 111, 81, 0.3);
    color: var(--accent-poppy);
}

button.btn-danger:hover {
    background: rgba(231, 111, 81, 0.12);
}

button:disabled, .btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: var(--border-subtle);
}

/* Formelemente: Monospace gezielt nur für Werte */
input, select, textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 7px 11px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s ease;
    font-feature-settings: "tnum" 1;
}

input:focus, select:focus, textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45);
}

label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* --------------------------------------------------------------------------
   4. TABELLEN-LAYOUT MIT FRAME-GENAUER AUSRICHTUNG
   -------------------------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.5px;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

th {
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-medium);
}

td {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
}

tr:hover td {
    background: rgba(56, 189, 248, 0.035);
}

/* --------------------------------------------------------------------------
   5. REDUZIERTE STATUS-ANZEIGEN (Keine Bonbon-Pillen mehr)
   -------------------------------------------------------------------------- */
.badge, .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    font-family: var(--font-ui);
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.15s ease;
    background: transparent;
}

.badge-ok, .badge-green, .badge-asset-ready, .badge-review-active {
    color: var(--accent-sage);
}
.badge-ok::before, .badge-green::before, .badge-asset-ready::before, .badge-review-active::before {
    content: "●";
    font-size: 8px;
    color: var(--accent-sage);
}

.badge-partial, .badge-yellow, .badge-asset-partial {
    color: var(--accent-brass);
}
.badge-partial::before, .badge-yellow::before, .badge-asset-partial::before {
    content: "●";
    font-size: 8px;
    color: var(--accent-brass);
}

.badge-missing, .badge-danger, .badge-asset-missing {
    color: var(--accent-poppy);
}
.badge-missing::before, .badge-danger::before, .badge-asset-missing::before {
    content: "●";
    font-size: 8px;
    color: var(--accent-poppy);
}

.badge-review-empty {
    color: var(--text-muted);
}
.badge-review-empty::before {
    content: "○";
    font-size: 8px;
    color: var(--text-muted);
}

/* Live Tag Monitor */
.live-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-sage);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(82, 183, 136, 0.2);
    background: rgba(82, 183, 136, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-sage);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(82, 183, 136, 0.6);
}

/* Tastatur-Shortcuts mit gedämpftem Kontrast */
kbd {
    background: #13161f;
    border: 1px solid var(--border-medium);
    border-bottom: 2px solid #232836;
    color: var(--text-primary);
    padding: 2px 5px;
    font-size: 10.5px;
    font-family: var(--font-mono);
    border-radius: 4px;
    font-feature-settings: "tnum" 1;
}

/* --------------------------------------------------------------------------
   6. DASHBOARD SPECIFICS
   -------------------------------------------------------------------------- */
.header-actions { display: flex; align-items: center; gap: 12px; }

#create-card {
    display: none;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: var(--surface-edge);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto auto;
    gap: 14px;
    align-items: end;
}

.presence-list { display: flex; flex-direction: column; gap: 4px; }
.user-row {
    display: flex; align-items: center; gap: 8px;
    color: var(--accent-sage);
    padding: 2px 6px; border-radius: 4px; font-size: 11px;
    background: rgba(82, 183, 136, 0.06);
    border: 1px solid rgba(82, 183, 136, 0.15);
    width: fit-content;
}
.user-row .clip-info {
    color: var(--text-secondary); font-size: 10.5px;
    background: #000; padding: 1px 5px; border-radius: 3px;
}
.no-activity { color: var(--text-muted); font-style: italic; font-size: 11px; }

.btn-id-copy {
    background: transparent; border: 1px solid var(--border-medium); color: var(--text-secondary);
    padding: 2px 6px; font-size: 11px; border-radius: 4px; cursor: pointer;
}
.btn-id-copy:hover { border-color: var(--accent-brass); color: #fff; }

.player-links-stack { display: flex; flex-direction: column; gap: 4px; }
.player-link-row { display: flex; align-items: center; gap: 5px; }
.player-links-stack .link-pill {
    width: 96px;
    box-sizing: border-box;
    justify-content: flex-start;
}
.link-pill {
    text-decoration: none; padding: 3px 8px; border-radius: 4px; font-size: 11px;
    font-family: var(--font-ui); font-weight: 500;
    background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); color: var(--text-secondary);
    transition: all 0.15s; display: inline-flex; align-items: center; gap: 5px;
}
.link-pill:hover { border-color: var(--accent-brass); color: var(--text-primary); }

.btn-copy { padding: 3px 6px; font-size: 10px; color: var(--text-muted); background: transparent; border: 1px solid var(--border-subtle); border-radius: 3px; }
.btn-copy:hover { color: var(--text-primary); border-color: var(--border-medium); }

.btn-history-trigger {
    background: transparent; border: 1px solid var(--border-medium); color: var(--text-secondary);
    padding: 3px 8px; font-size: 11px; border-radius: 4px; cursor: pointer;
}
.btn-history-trigger:hover { border-color: var(--accent-brass); color: #fff; }

.btn-delete-row {
    opacity: 0; background: transparent; border: none; color: var(--accent-poppy);
    padding: 4px; font-size: 12px; cursor: pointer; transition: all 0.15s;
}
.btn-delete-row:hover { opacity: 1 !important; transform: scale(1.1); }
tr:hover .btn-delete-row { opacity: 0.5; }

/* Dashboard Log Modal */
#log-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(6, 7, 10, 0.86); backdrop-filter: blur(8px); z-index: 100;
    display: none; justify-content: center; align-items: center;
}
.log-modal {
    background: var(--bg-surface); border: 1px solid var(--border-medium); border-radius: 10px;
    width: 90vw; max-width: 1100px; height: 80vh; display: flex;
    flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}
.log-modal-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); display: flex;
    justify-content: space-between; align-items: center;
}
.log-modal-title { font-size: 13px; font-weight: 500; font-family: var(--font-mono); color: var(--accent-brass); }
.log-modal-controls {
    display: flex; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-base); align-items: center;
}
.log-modal-body { flex-grow: 1; overflow-y: auto; padding: 0 20px 20px 20px; }
.log-table th { position: sticky; top: 0; background: var(--bg-surface); z-index: 2; }
.log-table td { padding: 10px 8px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   7. PLAYLIST MANAGER SPECIFICS
   -------------------------------------------------------------------------- */
.actions-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.auth-bar {
    display: flex; gap: 8px; align-items: center; background: var(--bg-surface-elevated);
    padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border-subtle);
}
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.stat-box, .stat-card {
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: 8px; padding: 14px 18px; text-align: left;
    box-shadow: var(--surface-edge);
}
.stat-val, .stat-value {
    font-size: 24px; font-weight: 500; font-family: var(--font-mono); margin-bottom: 2px;
    color: var(--text-primary); font-feature-settings: "tnum" 1;
}
.stat-lbl, .stat-label {
    font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 500;
}
.stat-sub { font-size: 11px; font-family: var(--font-mono); color: var(--text-secondary); margin-top: 3px; }

.progress-container {
    margin-top: 15px; display: none; background: var(--bg-surface-elevated); border-radius: 8px;
    border: 1px solid var(--border-medium); padding: 16px;
}
.progress-alert-banner {
    background: rgba(56, 189, 248, 0.07); border-left: 3px solid #38bdf8;
    padding: 8px 12px; font-size: 12px; color: #bae6fd; margin-bottom: 12px;
}
.progress-bar-bg {
    background: var(--bg-input); height: 6px; border-radius: 3px; overflow: hidden;
    margin: 8px 0;
}
.progress-bar-fill { background: linear-gradient(90deg, #00d8ff 0%, #38bdf8 100%); height: 100%; width: 0%; transition: width 0.15s ease; }
.status-txt { font-family: var(--font-mono); font-size: 11.5px; color: #7dd3fc; }
.clip-preview-thumb {
    width: 44px; height: 26px; object-fit: cover; border-radius: 3px;
    background: #000; vertical-align: middle; border: 1px solid var(--border-subtle);
}
.btn-table-action { padding: 3px 8px; font-size: 11px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   8. SCREENING REPORT (review.html) SPECIFICS
   -------------------------------------------------------------------------- */
header.report-studio-header {
    position: relative;
    background: linear-gradient(180deg, rgba(16, 18, 25, 0.95) 0%, rgba(11, 12, 16, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}
header.report-studio-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 216, 255, 0.55) 28%, rgba(229, 169, 108, 0.45) 52%, rgba(255, 0, 106, 0.45) 76%, transparent 100%);
    pointer-events: none;
}
.report-brand-badge-wrap {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(0, 216, 255, 0.07);
    border: 1px solid rgba(0, 216, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(0, 216, 255, 0.12);
}
.report-brand-badge {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0, 216, 255, 0.4));
}
.report-print-brand {
    display: none;
}
.header-top-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    width: 100%; gap: 16px; flex-wrap: wrap;
}
.header-title-group { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.header-sub-info { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.production-badge, .timestamp-badge, .scope-badge {
    font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted);
}

/* Full-width Report Basis Strip (Screen & Print/PDF) */
.report-basis-strip {
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11.5px;
}
.report-basis-strip.is-filtered {
    border-color: rgba(217, 119, 54, 0.45);
    background: rgba(217, 119, 54, 0.04);
}
.basis-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.5;
}
.basis-label {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.basis-label.is-filtered {
    color: var(--accent-brass);
}
.filter-status-badge {
    color: var(--text-secondary);
    font-weight: 500;
}
.filter-status-badge.is-filtered {
    color: var(--accent-brass);
    font-weight: 600;
}
.reviewer-pills-list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.reviewer-basis-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.reviewer-basis-pill:hover {
    border-color: var(--accent-brass);
}
.reviewer-basis-pill.is-selected {
    border-color: var(--accent-amber);
    background: rgba(217, 119, 54, 0.14);
    color: var(--accent-brass);
    font-weight: 600;
}
.reviewer-basis-pill.is-excluded {
    opacity: 0.38;
    border-style: dashed;
}

/* Interactive KPI Cards */
.stat-card.kpi-clickable {
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}
#kpi-card-all { border-top: 2px solid rgba(156, 163, 175, 0.55); }
#kpi-card-circled { border-top: 2px solid var(--accent-sage, #52b788); }
#kpi-card-ranges { border-top: 2px solid #a78bfa; }
#kpi-card-selects { border-top: 2px solid #38bdf8; }
#kpi-card-notes { border-top: 2px solid var(--accent-brass, #e5a96c); }

.stat-card.kpi-clickable:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: var(--bg-surface-elevated);
    transform: translateY(-1px);
}
.stat-card.kpi-clickable.is-active-kpi {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.07);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.25), 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Structured Filter & View Toolbar */
.toolbar {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-surface); border: 1px solid var(--border-medium);
    border-radius: 8px; padding: 10px 14px; margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
    box-shadow: var(--surface-edge);
}
.toolbar.is-active-filter { border-color: var(--accent-brass); }

.toolbar-filters-zone {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 1; min-width: 0;
}
.toolbar-view-zone {
    display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; margin-left: auto;
    padding-left: 14px; border-left: 1px solid var(--border-subtle); align-self: stretch;
}

.filter-group, .thumb-control-group, .user-filter-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.control-label { font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-right: 2px; }

/* Segmented Button Bar */
.segmented-group {
    display: inline-flex; align-items: center; background: var(--bg-input);
    border: 1px solid var(--border-medium); border-radius: 6px; padding: 2px; gap: 2px; flex-wrap: wrap;
}
.segmented-group .btn {
    border: 1px solid transparent; background: transparent; color: var(--text-secondary);
    padding: 4px 10px; font-size: 11.5px; border-radius: 4px; box-shadow: none;
}
.segmented-group .btn:hover {
    color: var(--text-primary); background: rgba(255, 255, 255, 0.04); border-color: transparent;
}
.segmented-group .btn.active {
    background: var(--accent-amber); color: #0c0b0a; border-color: var(--accent-amber); font-weight: 600;
}

.search-input-wrap {
    position: relative; display: inline-flex; align-items: center;
}
.search-input-wrap input {
    background: var(--bg-input); border: 1px solid var(--border-medium); color: var(--text-primary);
    padding: 5px 26px 5px 10px; border-radius: 6px; font-family: var(--font-mono); font-size: 11.5px; width: 195px;
}
.search-input-wrap input:focus {
    border-color: var(--accent-brass);
}
.search-clear-btn {
    position: absolute; right: 5px; background: transparent; border: none; color: var(--text-muted);
    padding: 2px 5px; font-size: 11px; cursor: pointer; display: none; box-shadow: none;
}
.search-clear-btn:hover { color: #fff; background: transparent; border: none; }

.btn.active {
    background: var(--accent-amber); color: #0c0b0a; border-color: var(--accent-amber); font-weight: 600;
}
.btn-action { background: var(--bg-surface-elevated); border-color: var(--border-medium); color: var(--text-primary); }
.btn-action:hover { background: var(--border-medium); color: #fff; }

/* Clip Cards Layout */
.clip-card {
    background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 8px;
    margin-bottom: 16px; display: flex; flex-direction: row; align-items: stretch;
    box-shadow: var(--surface-edge); position: relative;
}
.clip-card:has(.audit-log-details[open]) { z-index: 50; }
.clip-card.is-circled { border-left: 3px solid var(--accent-sage); }
.clip-thumb-column {
    flex-shrink: 0; background: #000; border-right: 1px solid var(--border-subtle);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    padding: 10px; box-sizing: border-box;
    border-top-left-radius: 7px; border-bottom-left-radius: 7px;
}
.clip-thumb-wrapper { width: 100%; height: auto; border-radius: 4px; overflow: hidden; background: #000; }
.clip-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-thumb-placeholder { color: var(--text-muted); font-size: 10px; font-family: var(--font-mono); text-align: center; }

body.thumb-lg .clip-thumb-column { width: 180px; }
body.thumb-lg .clip-thumb-wrapper { aspect-ratio: 16 / 9; }
body.thumb-md .clip-thumb-column { width: 130px; }
body.thumb-md .clip-thumb-wrapper { aspect-ratio: 16 / 9; }
body.thumb-sm .clip-thumb-column { width: 90px; }
body.thumb-sm .clip-thumb-wrapper { aspect-ratio: 16 / 9; }
body.thumb-none .clip-thumb-column { display: none !important; }

.clip-main-column { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.clip-header {
    padding: 10px 16px; display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 1px solid var(--border-subtle); gap: 12px; position: relative; z-index: 10;
}
.clip-title-group { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.clip-title-line-primary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.clip-title-line-sub { display: flex; align-items: center; margin-top: 2px; }
.clip-index-badge { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.clip-name { font-size: 13.5px; font-weight: 500; font-family: var(--font-mono); color: var(--text-primary); word-break: break-all; }
.clip-name.sub-line { font-size: 12px; color: var(--text-secondary); letter-spacing: 0.01em; }
.circle-badge {
    font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px;
}
.circle-badge.yes { color: var(--accent-sage); }
.circle-badge.no { color: var(--text-muted); }

.clip-meta-right {
    display: flex; flex-direction: column; align-items: flex-end;
    position: relative; flex-shrink: 0; margin-left: auto; text-align: right;
}
.clip-meta-actions-row {
    display: flex; align-items: center; gap: 12px; justify-content: flex-end; flex-wrap: nowrap;
}
.clip-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; }

.audit-log-details { position: relative; font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.audit-log-summary {
    cursor: pointer; color: var(--accent-brass); outline: none; user-select: none; white-space: nowrap;
    padding: 2px 6px; border-radius: 4px; transition: background 0.15s ease;
}
.audit-log-summary:hover { background: rgba(229, 169, 108, 0.1); text-decoration: none; }
.audit-log-details[open] .audit-log-summary { background: rgba(229, 169, 108, 0.18); font-weight: 600; }
.audit-log-list {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 100;
    margin: 0; padding: 8px 12px; background: #0d0f15; border: 1px solid var(--border-medium);
    border-radius: 6px; list-style: none; display: flex; flex-direction: column; gap: 6px;
    min-width: 340px; max-width: 480px; max-height: 220px; overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 2px 6px rgba(0, 0, 0, 0.4); text-align: left;
}
.audit-log-item {
    display: flex; gap: 6px; align-items: flex-start; font-size: 11px; line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 4px;
}
.audit-log-item:last-child { border-bottom: none; padding-bottom: 0; }

.clip-body { padding: 10px 16px 14px 16px; flex-grow: 1; overflow-x: auto; }
.notes-table { font-size: 12px; }
.notes-table th { border-bottom: 1px solid var(--border-subtle); padding: 6px 10px; }
.notes-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); }
.col-tc { width: 230px; white-space: nowrap; }
.col-author { width: 130px; white-space: nowrap; }
.col-note { max-width: 500px; }

.tc-display {
    font-family: var(--font-mono); color: var(--text-primary); font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px; font-feature-settings: "tnum" 1;
}
.tc-display.range-badge { color: var(--accent-amber); }
.range-dur-tag {
    font-size: 10.5px; font-weight: 500; font-family: var(--font-mono);
    color: var(--text-muted);
}
.author-tag {
    font-size: 11px; font-family: var(--font-ui); color: var(--accent-brass); font-weight: 500;
}
.note-text { line-height: 1.45; font-family: var(--font-ui); color: var(--text-secondary); }
.no-notes-row { color: var(--text-muted); font-style: italic; font-size: 11.5px; font-family: var(--font-ui); }

.clip-slate-badge {
    background: rgba(229, 169, 108, 0.16);
    border: 1px solid var(--accent-brass);
    color: var(--accent-brass);
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Review Print / PDF Export (Optimized for A4 Portrait Density & High Contrast) */
@media print {
    @page {
        size: A4 portrait;
        margin: 8mm 10mm 10mm 10mm;
    }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    body {
        background: #fff !important;
        color: #000 !important;
        padding: 0 !important;
        font-size: 8.5pt !important;
        line-height: 1.3 !important;
        font-family: var(--font-ui), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    }
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .toolbar, .btn, .btn-action, .audit-log-details, #report-search, select.filter-select, .thumb-control-group, #report-playlist-switcher-wrap, #reviewer-multiselect-wrap, .tc-play-icon {
        display: none !important;
    }
    header,
    header.report-studio-header {
        background: transparent !important;
        border: none !important;
        border-bottom: 1.5px solid #111 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 0 6px 0 !important;
        margin-bottom: 8px !important;
        display: block !important;
    }
    header.report-studio-header::before,
    .report-brand-badge-wrap {
        display: none !important;
    }
    .report-print-brand {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 2px !important;
        font-family: var(--font-mono) !important;
        font-size: 6.5pt !important;
        font-weight: 700 !important;
        letter-spacing: 0.06em !important;
        color: #475569 !important;
    }
    .report-print-logo {
        height: 16px !important;
        width: auto !important;
        object-fit: contain !important;
        filter: brightness(0.15) contrast(1.2) !important;
    }
    h1, #report-project-title {
        font-size: 13.5pt !important;
        font-weight: 700 !important;
        color: #000 !important;
        margin: 0 0 2px 0 !important;
        letter-spacing: 0.01em !important;
    }
    .header-sub-info {
        font-size: 8pt !important;
        color: #222 !important;
        gap: 12px !important;
        margin-top: 2px !important;
    }
    .production-badge, .timestamp-badge, .scope-badge {
        font-size: 8pt !important;
        color: #222 !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        font-weight: 500 !important;
    }
    .report-basis-strip {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 3px !important;
        padding: 4px 8px !important;
        margin-top: 5px !important;
        gap: 3px !important;
    }
    .report-basis-strip.is-filtered {
        background: #fffbeb !important;
        border-color: #b45309 !important;
    }
    .basis-row {
        gap: 6px !important;
        line-height: 1.35 !important;
    }
    .basis-label {
        color: #333 !important;
        font-size: 7.5pt !important;
        font-weight: 700 !important;
    }
    .basis-label.is-filtered, .filter-status-badge.is-filtered {
        color: #92400e !important;
        font-weight: 700 !important;
    }
    .filter-status-badge {
        color: #000 !important;
        font-size: 8pt !important;
        font-weight: 600 !important;
    }
    .reviewer-pills-list {
        gap: 4px !important;
    }
    .reviewer-basis-pill {
        background: #fff !important;
        border: 1px solid #64748b !important;
        color: #000 !important;
        font-size: 7.5pt !important;
        padding: 0.5px 5px !important;
        border-radius: 3px !important;
        font-weight: 600 !important;
    }
    .reviewer-basis-pill.is-selected {
        background: #fef3c7 !important;
        border-color: #b45309 !important;
        color: #78350f !important;
    }
    .reviewer-basis-pill.is-excluded {
        display: none !important;
    }

    /* Compact High-Contrast 5-Column KPI Grid */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 6px !important;
        margin-bottom: 10px !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
    .stat-card {
        border: 1px solid #cbd5e1 !important;
        background: #f8fafc !important;
        border-radius: 3px !important;
        padding: 4px 6px !important;
        box-shadow: none !important;
        transform: none !important;
    }
    .stat-card.is-active-kpi {
        border: 1.5px solid #111 !important;
        background: #f1f5f9 !important;
    }
    .stat-label {
        font-size: 7pt !important;
        font-weight: 700 !important;
        color: #1e293b !important;
        text-transform: uppercase !important;
        letter-spacing: 0.02em !important;
        margin-bottom: 1px !important;
        line-height: 1.15 !important;
    }
    .stat-value {
        font-size: 10.5pt !important;
        font-weight: 700 !important;
        font-family: var(--font-mono) !important;
        color: #000 !important;
        margin-bottom: 1px !important;
        line-height: 1.15 !important;
    }
    .stat-value span {
        font-size: 8pt !important;
        color: #334155 !important;
        font-weight: 600 !important;
    }
    .stat-sub {
        font-size: 6.8pt !important;
        color: #334155 !important;
        font-family: var(--font-mono) !important;
        margin-top: 1px !important;
        line-height: 1.2 !important;
    }

    /* Multi-Playlist Section Divider in Print */
    .playlist-section-banner {
        margin: 10px 0 5px 0 !important;
        padding: 3px 8px !important;
        background: #f1f5f9 !important;
        border-left: 3px solid #0f172a !important;
        border-top: 1px solid #cbd5e1 !important;
        border-right: 1px solid #cbd5e1 !important;
        border-bottom: 1px solid #cbd5e1 !important;
        border-radius: 2px !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
    .playlist-section-banner strong {
        color: #000 !important;
        font-size: 8.5pt !important;
    }

    /* Compact High-Density Clip Cards */
    .clip-card {
        border: 1px solid #cbd5e1 !important;
        background: #fff !important;
        margin-bottom: 5px !important;
        border-radius: 3px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: row !important;
        opacity: 1 !important;
    }
    .clip-card.is-compact-empty {
        margin-bottom: 3px !important;
        border-color: #e2e8f0 !important;
        background: #fcfcfc !important;
    }
    .clip-card.is-compact-empty .clip-header {
        padding: 3px 8px !important;
        background: transparent !important;
    }
    .clip-card.is-compact-empty .compact-empty-label {
        color: #64748b !important;
        font-size: 7.5pt !important;
    }
    .clip-card.is-circled {
        border-left: 3.5px solid #15803d !important;
    }

    /* Compact Thumbnail Column (Hidden if Off or if no image exists) */
    body.thumb-none .clip-thumb-column,
    .clip-thumb-column.has-no-thumb {
        display: none !important;
    }
    .clip-thumb-column {
        width: 64px !important;
        min-width: 64px !important;
        max-width: 64px !important;
        padding: 3px !important;
        background: #f8fafc !important;
        border-right: 1px solid #e2e8f0 !important;
    }
    .clip-thumb-wrapper {
        border: 1px solid #cbd5e1 !important;
        border-radius: 2px !important;
        aspect-ratio: 16 / 9 !important;
    }
    .clip-thumb-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Single-Line Compact Clip Header */
    .clip-header {
        padding: 3.5px 8px !important;
        background: #f1f5f9 !important;
        border-bottom: 1px solid #cbd5e1 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .clip-card.has-no-notes .clip-header {
        border-bottom: none !important;
    }
    .clip-title-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .clip-title-line-primary,
    .clip-title-line-sub {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        margin: 0 !important;
    }
    .clip-index-badge {
        font-weight: 700 !important;
        color: #334155 !important;
        font-size: 8pt !important;
    }
    .clip-slate-badge {
        background: #fff !important;
        border: 1px solid #334155 !important;
        color: #000 !important;
        font-weight: 700 !important;
        font-size: 7.8pt !important;
        padding: 0.5px 5px !important;
        border-radius: 2px !important;
    }
    .circle-badge.yes {
        color: #14532d !important;
        font-weight: 700 !important;
        font-size: 7.5pt !important;
        background: #dcfce7 !important;
        padding: 0.5px 5px !important;
        border-radius: 2px !important;
        border: 1px solid #15803d !important;
    }
    .circle-badge.no {
        display: none !important;
    }
    .clip-name,
    .clip-name.sub-line {
        font-size: 8.5pt !important;
        font-weight: 700 !important;
        color: #000 !important;
        font-family: var(--font-mono) !important;
    }
    .clip-meta {
        font-size: 7.5pt !important;
        color: #334155 !important;
        font-family: var(--font-mono) !important;
        font-weight: 500 !important;
    }

    /* Collapse empty clip body; hide repeated table headers */
    .clip-body.is-empty-body,
    .no-notes-row,
    .notes-table thead {
        display: none !important;
    }
    .clip-body {
        padding: 2px 8px 4px 8px !important;
    }
    .notes-table {
        font-size: 7.8pt !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }
    .notes-table tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .notes-table td {
        padding: 2.5px 5px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        vertical-align: top !important;
    }
    .notes-table tbody tr:last-child td {
        border-bottom: none !important;
    }
    .col-tc {
        width: 145px !important;
        white-space: nowrap !important;
        padding-left: 0 !important;
    }
    .col-author {
        width: 115px !important;
        white-space: nowrap !important;
    }
    .tc-display {
        color: #000 !important;
        font-weight: 700 !important;
        font-size: 7.8pt !important;
    }
    .tc-display.range-badge {
        color: #9a3412 !important;
    }
    .range-dur-tag {
        font-size: 7.2pt !important;
        color: #475569 !important;
        font-weight: 600 !important;
    }
    .author-tag {
        color: #1e293b !important;
        font-weight: 700 !important;
        font-size: 7.8pt !important;
    }
    .note-text {
        color: #000 !important;
        font-size: 8pt !important;
        line-height: 1.3 !important;
        padding-right: 0 !important;
    }
}

/* --------------------------------------------------------------------------
   9. DOCUMENTATION / HELP (help.html) SPECIFICS
   -------------------------------------------------------------------------- */
.nav-toolbar {
    position: sticky; top: 15px; z-index: 100; display: flex; gap: 8px;
    background: rgba(11, 12, 16, 0.94); border: 1px solid var(--border-medium);
    padding: 8px 12px; border-radius: 8px; backdrop-filter: blur(8px);
    margin-bottom: 30px; box-shadow: var(--surface-edge); flex-wrap: wrap;
}
.nav-btn {
    background: transparent; color: var(--text-secondary); border: 1px solid var(--border-subtle); padding: 5px 10px;
    border-radius: 5px; font-size: 11.5px; font-weight: 500; text-decoration: none;
    transition: all 0.15s ease;
}
.nav-btn:hover { border-color: var(--border-highlight); color: #fff; }
.nav-btn.primary { background: var(--accent-amber); border-color: var(--accent-amber); color: #0c0b0a; font-weight: 600; }

.section-card {
    background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 10px;
    padding: 24px; margin-bottom: 28px; box-shadow: var(--surface-edge);
}
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-subtle); padding-bottom: 12px; margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.section-header h2 {
    margin: 0; font-family: var(--font-ui); font-size: 16px; font-weight: 600; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
}
.file-tag {
    font-family: var(--font-mono); font-size: 11px; background: #000;
    padding: 2px 7px; border-radius: 4px; border: 1px solid var(--border-subtle); color: var(--accent-brass);
}
.intention-box {
    background: rgba(56, 189, 248, 0.06); border-left: 2px solid #38bdf8;
    padding: 12px 16px; border-radius: 0 6px 6px 0; margin-bottom: 20px; font-size: 13px; color: var(--text-secondary);
}
.intention-box strong { color: var(--text-primary); }

.section-card h3 {
    font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: #38bdf8;
    text-transform: uppercase; letter-spacing: 0.06em; margin: 22px 0 10px 0;
}
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px; margin: 12px 0 18px 0;
}
.feature-item {
    background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); border-radius: 6px; padding: 14px;
}
.feature-item-title {
    font-size: 12px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 5px; display: flex; align-items: center; gap: 6px;
}
.feature-item-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.45; }
.pro-tip {
    background: var(--bg-surface-elevated); border-left: 2px solid #38bdf8;
    border-radius: 0 6px 6px 0; padding: 10px 14px; margin-top: 14px; font-size: 12px; color: var(--text-secondary);
}
.pro-tip strong { color: #38bdf8; }

/* Inline-Editing für Dashboard Projekt & Produktion */
.editable-field-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.editable-text {
    outline: none;
    border-radius: 4px;
    padding: 2px 4px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid transparent;
    cursor: text;
    word-break: break-word;
}

.editable-text:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-medium);
}

.editable-text:focus {
    background: var(--bg-input);
    border-color: var(--accent-brass);
    box-shadow: 0 0 0 1px var(--accent-brass);
}

.btn-edit-trigger {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 2px;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

tr:hover .btn-edit-trigger {
    opacity: 0.6;
}

.btn-edit-trigger:hover {
    opacity: 1 !important;
    color: var(--accent-brass);
}

/* Punkte vor Report und Asset-Status im Dashboard ausblenden */
.badge-review-active::before,
.badge-review-empty::before,
.badge-asset-ready::before,
.badge-asset-partial::before,
.badge-asset-missing::before {
    content: none !important;
}

/* Zweizeiliges Layout für den Report-Status */
.report-badge-stacked {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 1px !important;
    line-height: 1.25 !important;
    vertical-align: middle !important;
}

.report-badge-title {
    font-weight: 600;
}

.report-badge-sub {
    font-size: 10.5px;
    opacity: 0.85;
}

/* Zweizeilige, horizontal zentrierte Badges für Report & Asset-Status */
.badge-stacked-center {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.25 !important;
    vertical-align: middle !important;
}

.badge-stacked-center .badge-title,
.badge-stacked-center .report-badge-title {
    font-weight: 600;
}

.badge-stacked-center .badge-sub,
.badge-stacked-center .report-badge-sub {
    font-size: 10.5px;
    opacity: 0.85;
}

/* 3D Vehicle Multi-Select Styling (Dashboard & Player) */
.vehicle-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.vehicle-check-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #181818;
    color: #ccc;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.vehicle-check-pill:hover {
    border-color: var(--accent-brass, #e5a96c);
    color: #fff;
}

.vehicle-check-pill input[type="checkbox"] {
    accent-color: var(--accent-brass, #e5a96c);
    cursor: pointer;
    margin: 0;
}

.vehicle-check-pill.active {
    background: rgba(229, 169, 108, 0.15);
    border-color: var(--accent-brass, #e5a96c);
    color: var(--accent-brass, #e5a96c);
    font-weight: 500;
}

/* Masken (Nadir / Zenith) Toggles im Dashboard */
.mask-toggle-stack {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.mask-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #111316;
    color: #666;
    border: 1px solid #282c32;
    border-radius: 3px;
    padding: 2px 0;
    font-size: 10px;
    font-family: var(--font-mono, monospace);
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    width: 52px;
    box-sizing: border-box;
}
.mask-toggle-btn:hover {
    border-color: #555;
    color: #bbb;
}
.mask-toggle-btn.active {
    background: rgba(0, 255, 128, 0.14);
    border-color: #00ff80;
    color: #00ff80;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(0, 255, 128, 0.35);
}

.mask-setup-link {
    font-size: 9px;
    color: #888;
    text-decoration: none;
    margin-top: 2px;
    padding: 1px 4px;
    border-radius: 2px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    display: inline-block;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.mask-setup-link:hover {
    color: var(--accent-brass, #e5a96c);
    border-color: var(--accent-brass, #e5a96c);
    background: rgba(229, 169, 108, 0.1);
}

/* Kombinierte 3D & Masken Spalte */
.rig-masks-cell {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.rig-masks-toggles {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.rig-setup-btn {
    font-size: 10px;
    padding: 2px 6px;
    border-color: rgba(229, 169, 108, 0.45);
    color: var(--accent-brass, #e5a96c);
    display: inline-block;
    transition: all 0.15s ease;
    width: 108px;
    box-sizing: border-box;
    text-align: center;
}
.rig-setup-btn:hover {
    background: rgba(229, 169, 108, 0.15);
    border-color: var(--accent-brass, #e5a96c);
    box-shadow: 0 0 6px rgba(229, 169, 108, 0.3);
}

/* Timebase Pill */
.timebase-pill {
    display: inline-block;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    font-weight: 600;
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.08);
    border: 1px solid rgba(255, 204, 0, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    min-width: 62px;
    text-align: center;
}

/* Live-Präsenz (Gerade aktiv) Kompakt-Badge & Popover */
.presence-badge-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.presence-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111418;
    border: 1px solid rgba(0, 255, 128, 0.35);
    color: #00ff80;
    border-radius: 12px;
    padding: 3px 9px;
    font-size: 10.5px;
    font-family: var(--font-mono, monospace);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}
.presence-badge-btn:hover {
    background: rgba(0, 255, 128, 0.12);
    border-color: #00ff80;
    box-shadow: 0 0 10px rgba(0, 255, 128, 0.25);
}

.live-dot-pulse {
    width: 6px;
    height: 6px;
    background: #00ff80;
    border-radius: 50%;
    box-shadow: 0 0 6px #00ff80;
    animation: livePulse 2s infinite ease-in-out;
    display: inline-block;
    flex-shrink: 0;
}
@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px #00ff80; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.presence-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 500;
    background: #12151a;
    border: 1px solid #2d333b;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75);
    padding: 10px 12px;
    min-width: 250px;
    max-width: 320px;
    text-align: left;
    display: none;
    pointer-events: auto;
}

.presence-badge-wrapper:hover .presence-popover,
.presence-popover.show {
    display: block;
}
.presence-popover.flip-up {
    top: auto;
    bottom: calc(100% + 6px);
}
.presence-popover.floating-portal {
    position: fixed !important;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none !important;
    z-index: 10000 !important;
    background: #12151a !important;
    border: 1px solid #2d333b !important;
    border-radius: 6px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    padding: 10px 12px !important;
    min-width: 260px !important;
    max-width: 320px !important;
}

.presence-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #24292f;
    padding-bottom: 6px;
    margin-bottom: 8px;
    font-size: 10px;
    font-family: var(--font-mono, monospace);
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.presence-popover-count {
    color: #00ff80;
    font-weight: 600;
}

.presence-popover-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.popover-user-row {
    background: #181c22;
    border: 1px solid #252b33;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 11px;
}
.popover-user-main {
    display: flex;
    align-items: center;
    gap: 6px;
}
.popover-user-name {
    color: #fff;
    font-weight: 600;
}
.popover-user-role {
    color: #8b949e;
    font-size: 10px;
}
.popover-page-tag {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: auto;
    font-family: var(--font-mono, monospace);
}
.popover-page-tag.player {
    background: rgba(82, 183, 136, 0.15);
    color: var(--accent-sage, #52b788);
    border: 1px solid rgba(82, 183, 136, 0.3);
}
.popover-page-tag.review {
    background: rgba(229, 169, 108, 0.15);
    color: var(--accent-brass, #e5a96c);
    border: 1px solid rgba(229, 169, 108, 0.3);
}
.popover-clip {
    font-size: 10px;
    color: #aaa;
    margin-top: 4px;
    background: #0f1115;
    padding: 2px 5px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.popover-ip-row {
    font-size: 9.5px;
    color: #555;
    margin-top: 3px;
    font-family: var(--font-mono, monospace);
}

.vehicle-multiselect-dropdown {
    position: relative;
    display: inline-block;
}

.vehicle-multiselect-btn {
    background: #111;
    color: #fff;
    border: 1px solid #444;
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 108px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-multiselect-btn:hover {
    border-color: var(--accent-brass, #e5a96c);
}

.vehicle-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #141414;
    border: 1px solid var(--accent-brass, #e5a96c);
    border-radius: 5px;
    padding: 6px;
    z-index: 1000;
    box-shadow: 0 4px 14px rgba(0,0,0,0.7);
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}
.vehicle-dropdown-menu.flip-up {
    top: auto;
    bottom: calc(100% + 6px);
}
.vehicle-dropdown-menu.floating-portal {
    position: fixed !important;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none !important;
    z-index: 10000 !important;
    background: #141414 !important;
    border: 1px solid var(--accent-brass, #e5a96c) !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(229, 169, 108, 0.3) !important;
    min-width: 175px !important;
}

.vehicle-dropdown-menu label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #ddd;
    padding: 3px 5px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.vehicle-dropdown-menu label:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* --------------------------------------------------------------------------
   8. DASHBOARD TOOLBAR, SUCHE, KPIS & KOMPAKT-TABELLE
   -------------------------------------------------------------------------- */
.dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.search-box-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 320px;
    max-width: 100%;
}
.search-box-wrap .search-icon {
    position: absolute;
    left: 10px;
    font-size: 11px;
    opacity: 0.6;
    pointer-events: none;
}
.search-box-wrap input {
    width: 100%;
    padding: 6px 28px 6px 30px;
    background: #111317;
    border: 1px solid #282d35;
    border-radius: 5px;
    color: #fff;
    font-size: 11.5px;
    outline: none;
    transition: all 0.15s ease;
}
.search-box-wrap input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.22);
    background: #15181e;
}
.btn-clear-search {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 4px;
}
.btn-clear-search:hover {
    color: #fff;
}

.kpi-metrics-bar {
    display: flex;
    gap: 8px;
    align-items: center;
}
.kpi-metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #12151a;
    border: 1px solid #242932;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
    font-family: var(--font-mono, monospace);
    color: #aaa;
}
.kpi-metric-pill .kpi-val {
    color: #fff;
    font-weight: 600;
}
.kpi-metric-pill .kpi-label {
    color: #666;
    text-transform: uppercase;
    font-size: 9.5px;
    letter-spacing: 0.3px;
}

/* Kompaktes Zeilen-Padding im Dashboard */
.card table th {
    padding: 9px 10px;
    font-size: 10.5px;
    background: #121419;
}
.card table td {
    padding: 8px 10px;
    font-size: 12px;
    vertical-align: middle !important;
}
.card table td .link-pill,
.card table td .status-badge,
.card table td .btn-history-trigger,
.card table td .btn-delete-row {
    vertical-align: middle;
}
.card table tbody tr {
    transition: background 0.1s ease;
}
.card table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

/* Delete Safety Modal */
#delete-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.delete-modal-card {
    background: #16191f;
    border: 1px solid rgba(255, 68, 68, 0.35);
    border-radius: 8px;
    width: 440px;
    max-width: 90vw;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 18px rgba(255, 68, 68, 0.18);
    overflow: hidden;
    animation: modalPop 0.18s ease-out;
}
@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.delete-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 68, 68, 0.08);
    border-bottom: 1px solid rgba(255, 68, 68, 0.2);
}
.delete-modal-title {
    color: #ff5555;
    font-weight: 600;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    letter-spacing: 0.5px;
}
.delete-modal-body {
    padding: 18px 20px 14px 20px;
}
.delete-target-info {
    background: #0f1115;
    border: 1px solid #252a33;
    border-radius: 5px;
    padding: 10px 12px;
}
.del-confirm-input {
    width: 100%;
    padding: 8px 12px;
    background: #0d0f12;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-family: var(--font-mono, monospace);
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s;
}
.del-confirm-input:focus {
    border-color: #ff5555;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}
.delete-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px;
    background: #111317;
    border-top: 1px solid #20242c;
}
.btn-danger {
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-danger:hover:not(:disabled) {
    background: #ff1111;
    box-shadow: 0 0 12px rgba(255, 51, 51, 0.4);
}
.btn-danger:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #444;
}

/* ==========================================================================
   BACKEND & PORTAL LOGIN GATE (Unified Cinema-Grade Login Card)
   Hides the underlying page completely before & during authentication.
   Bridges visual identity with regardingpicture.com (LED Dot-Matrix & Gradient Border).
   ========================================================================== */
html.auth-gate-locked,
html.auth-gate-locked body {
    background:
        radial-gradient(circle at 18% 12%, rgba(0, 216, 255, 0.08) 0%, rgba(0, 0, 0, 0) 52%),
        radial-gradient(circle at 82% 88%, rgba(255, 0, 106, 0.07) 0%, rgba(0, 0, 0, 0) 52%),
        #050507 !important;
    min-height: 100vh;
    overflow: hidden !important;
}
html.auth-gate-locked body > *:not(#auth-login-overlay):not(#help-overlay) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#auth-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 12%, rgba(0, 216, 255, 0.09) 0%, rgba(0, 0, 0, 0) 52%),
        radial-gradient(circle at 82% 88%, rgba(255, 0, 106, 0.08) 0%, rgba(0, 0, 0, 0) 52%),
        #050507;
    font-family: var(--font-ui, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    color: var(--text-primary, #f3f4f6);
    isolation: isolate;
}

/* Signature LED Volume Dot-Matrix Background (from regardingpicture.com) */
#auth-login-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0, 216, 255, 0.22) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 34%, #000 18%, transparent 80%);
    mask-image: radial-gradient(ellipse 75% 60% at 50% 34%, #000 18%, transparent 80%);
    opacity: 0.5;
    pointer-events: none;
    z-index: -1;
}

#auth-login-overlay .portal-login-card {
    position: relative;
    max-width: 440px;
    width: 92vw;
    padding: 28px 30px;
    background: linear-gradient(135deg, rgba(0, 216, 255, 0.03) 0%, rgba(255, 0, 106, 0.025) 100%), #0a0b0f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.94), 0 0 40px rgba(0, 216, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: modalPop 0.18s ease-out;
    isolation: isolate;
}

#auth-login-overlay .portal-login-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0, 216, 255, 0.65), rgba(229, 169, 108, 0.45), rgba(255, 0, 106, 0.65));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.36;
    pointer-events: none;
}

#auth-login-overlay .portal-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(0, 216, 255, 0.07);
    border: 1px solid rgba(0, 216, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent-brass, #e5a96c);
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(0, 216, 255, 0.15);
}

#auth-login-overlay .portal-login-input {
    width: 100%;
    background: #06070a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-family: var(--font-ui, 'Inter', sans-serif);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#auth-login-overlay .portal-login-input:focus {
    border-color: var(--accent-brand-cyan, #00d8ff);
    box-shadow: 0 0 0 1px rgba(0, 216, 255, 0.45), 0 0 12px rgba(0, 216, 255, 0.12);
}

#auth-login-overlay .portal-login-submit {
    margin-top: 4px;
    background: var(--accent-brass, #e5a96c);
    color: #0b0c10;
    border: none;
    border-radius: 7px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 800;
    font-family: var(--font-mono, monospace);
    cursor: pointer;
    letter-spacing: 0.4px;
    width: 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 4px 14px rgba(0, 0, 0, 0.45);
    transition: filter 0.15s ease, opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

#auth-login-overlay .portal-login-submit:hover:not(:disabled) {
    filter: brightness(1.08);
    background: var(--accent-brass, #e5a96c);
    color: #000;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 6px 18px rgba(0, 0, 0, 0.55);
}

#auth-login-overlay .portal-login-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

#auth-login-overlay .auth-legal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.42);
    font-family: var(--font-mono, monospace);
}

#auth-login-overlay .auth-legal-btn {
    background: none;
    border: none;
    box-shadow: none;
    color: rgba(229, 169, 108, 0.82);
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    padding: 0 2px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#auth-login-overlay .auth-legal-btn:hover {
    color: var(--accent-brass, #e5a96c);
    background: none;
}

#auth-login-overlay .auth-legal-panel {
    max-width: 520px;
    width: 92vw;
    max-height: 44vh;
    overflow-y: auto;
    margin-top: 10px;
    padding: 14px 16px;
    background: #0a0b0f;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.88);
    text-align: left;
    font-size: 11.5px;
    line-height: 1.48;
    color: #9ca3af;
}

#auth-login-overlay .auth-legal-sec {
    margin-bottom: 10px;
}
#auth-login-overlay .auth-legal-sec:last-child {
    margin-bottom: 0;
}
#auth-login-overlay .auth-legal-head {
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-brass, #e5a96c);
    margin-bottom: 3px;
}
#auth-login-overlay .auth-legal-panel strong {
    color: #f3f4f6;
}
#auth-login-overlay .auth-legal-panel code {
    font-family: var(--font-mono, monospace);
    font-size: 10.5px;
    color: #e5a96c;
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 4px;
    border-radius: 3px;
}

/* ==========================================================================
   10. SWITCHABLE BACKEND THEMES (Dark / Medium / Light) + LED DOT-MATRIX GRID
   Strictly scoped to body:not(.player-body) and @media screen so the 360°/2D
   Player (index.html) and PDF Print stylesheet remain 100% untouched.
   ========================================================================== */
@media screen {
    /* --- SIGNATURE LOGIN-PAGE LED DOT-MATRIX GRID FOR ALL BACKEND PAGES --- */
    body:not(.player-body) {
        position: relative;
        isolation: isolate;
        min-height: 100vh;
        background:
            radial-gradient(circle at 18% 12%, rgba(0, 216, 255, 0.075) 0%, rgba(0, 0, 0, 0) 52%),
            radial-gradient(circle at 82% 88%, rgba(255, 0, 106, 0.055) 0%, rgba(0, 0, 0, 0) 52%),
            var(--bg-base);
        background-attachment: fixed;
    }

    body:not(.player-body)::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: radial-gradient(rgba(0, 216, 255, 0.24) 1px, transparent 1px);
        background-size: 24px 24px;
        -webkit-mask-image: radial-gradient(ellipse 88% 72% at 50% 26%, #000 22%, transparent 88%);
        mask-image: radial-gradient(ellipse 88% 72% at 50% 26%, #000 22%, transparent 88%);
        opacity: 0.46;
        pointer-events: none;
        z-index: -1;
    }

    /* --- THEME 2: MEDIUM (Broadcast Slate / Charcoal) --- */
    html[data-admin-theme="medium"] body:not(.player-body),
    html[data-admin-theme="slate"] body:not(.player-body) {
        --bg-base: #14171f;
        --bg-surface: #1c202b;
        --bg-surface-elevated: #242937;
        --bg-surface-active: #2d3344;
        --bg-input: #11141c;
        --border-subtle: rgba(255, 255, 255, 0.085);
        --border-medium: rgba(255, 255, 255, 0.16);
        --border-highlight: rgba(56, 189, 248, 0.48);
        --text-primary: #eef2f6;
        --text-secondary: #a8b3c4;
        --text-muted: #788497;
        background:
            radial-gradient(circle at 18% 12%, rgba(0, 216, 255, 0.085) 0%, rgba(0, 0, 0, 0) 52%),
            radial-gradient(circle at 82% 88%, rgba(255, 0, 106, 0.06) 0%, rgba(0, 0, 0, 0) 52%),
            var(--bg-base);
        background-attachment: fixed;
    }

    html[data-admin-theme="medium"] body:not(.player-body)::before,
    html[data-admin-theme="slate"] body:not(.player-body)::before {
        background-image: radial-gradient(rgba(56, 189, 248, 0.26) 1px, transparent 1px);
        opacity: 0.48;
    }

    html[data-admin-theme="medium"] body:not(.player-body) .card table th,
    html[data-admin-theme="slate"] body:not(.player-body) .card table th {
        background: #181c26;
    }
    html[data-admin-theme="medium"] body:not(.player-body) header.report-studio-header,
    html[data-admin-theme="slate"] body:not(.player-body) header.report-studio-header {
        background: linear-gradient(180deg, rgba(31, 36, 48, 0.96) 0%, rgba(24, 28, 38, 0.96) 100%);
        border-color: rgba(255, 255, 255, 0.12);
    }
    html[data-admin-theme="medium"] body:not(.player-body) .search-box-wrap input,
    html[data-admin-theme="slate"] body:not(.player-body) .search-box-wrap input {
        background: #11141c;
        border-color: #2e3545;
    }
    html[data-admin-theme="medium"] body:not(.player-body) .search-box-wrap input:focus,
    html[data-admin-theme="slate"] body:not(.player-body) .search-box-wrap input:focus {
        background: #161a24;
        border-color: #38bdf8;
    }
    html[data-admin-theme="medium"] body:not(.player-body) .kpi-metric-pill,
    html[data-admin-theme="slate"] body:not(.player-body) .kpi-metric-pill {
        background: #181c26;
        border-color: #2c3342;
        color: #b4bece;
    }
    html[data-admin-theme="medium"] body:not(.player-body) .delete-modal-card,
    html[data-admin-theme="slate"] body:not(.player-body) .delete-modal-card {
        background: #1d222e;
    }
    html[data-admin-theme="medium"] body:not(.player-body) .delete-modal-footer,
    html[data-admin-theme="slate"] body:not(.player-body) .delete-modal-footer {
        background: #161a24;
        border-top-color: #2a303f;
    }
    html[data-admin-theme="medium"] body:not(.player-body) .delete-target-info,
    html[data-admin-theme="medium"] body:not(.player-body) .del-confirm-input,
    html[data-admin-theme="slate"] body:not(.player-body) .delete-target-info,
    html[data-admin-theme="slate"] body:not(.player-body) .del-confirm-input {
        background: #12151e;
        border-color: #2d3444;
    }
    html[data-admin-theme="medium"] body:not(.player-body) .audit-log-list,
    html[data-admin-theme="slate"] body:not(.player-body) .audit-log-list {
        background: #181c26;
    }

    /* --- THEME 3: LIGHT (Daylight / Production Office) --- */
    html[data-admin-theme="light"] body:not(.player-body) {
        --bg-base: #f1f5f9;
        --bg-surface: #ffffff;
        --bg-surface-elevated: #f8fafc;
        --bg-surface-active: #e2e8f0;
        --bg-input: #ffffff;
        --border-subtle: rgba(15, 23, 42, 0.09);
        --border-medium: rgba(15, 23, 42, 0.16);
        --border-highlight: rgba(2, 132, 199, 0.45);
        --surface-edge: 0 1px 3px rgba(15, 23, 42, 0.06);
        --text-primary: #0f172a;
        --text-secondary: #475569;
        --text-muted: #64748b;
        --accent-amber: #0284c7;
        --accent-brass: #b45309;
        --accent-sage: #15803d;
        --accent-poppy: #dc2626;
        --accent-ochre: #d97706;
        background:
            radial-gradient(circle at 18% 12%, rgba(2, 132, 199, 0.075) 0%, rgba(241, 245, 249, 0) 52%),
            radial-gradient(circle at 82% 88%, rgba(225, 29, 72, 0.045) 0%, rgba(241, 245, 249, 0) 52%),
            var(--bg-base);
        background-attachment: fixed;
        color: var(--text-primary);
    }

    html[data-admin-theme="light"] body:not(.player-body)::before {
        background-image: radial-gradient(rgba(2, 132, 199, 0.22) 1px, transparent 1px);
        opacity: 0.6;
    }

    html[data-admin-theme="light"] body:not(.player-body) .card {
        background: #ffffff;
        border-color: rgba(15, 23, 42, 0.12);
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    }
    html[data-admin-theme="light"] body:not(.player-body) .card table th {
        background: #f1f5f9;
        color: #334155;
        border-bottom-color: rgba(15, 23, 42, 0.12);
    }
    html[data-admin-theme="light"] body:not(.player-body) .card table tbody tr:hover td,
    html[data-admin-theme="light"] body:not(.player-body) tr:hover td {
        background: rgba(2, 132, 199, 0.045);
    }
    html[data-admin-theme="light"] body:not(.player-body) button,
    html[data-admin-theme="light"] body:not(.player-body) .btn,
    html[data-admin-theme="light"] body:not(.player-body) .btn-secondary {
        background: #ffffff;
        color: #1e293b;
        border-color: #cbd5e1;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }
    html[data-admin-theme="light"] body:not(.player-body) button:hover:not(:disabled),
    html[data-admin-theme="light"] body:not(.player-body) .btn:hover:not(:disabled),
    html[data-admin-theme="light"] body:not(.player-body) .btn-secondary:hover:not(:disabled) {
        background: #f8fafc;
        color: #0f172a;
        border-color: #0284c7;
    }
    html[data-admin-theme="light"] body:not(.player-body) button.btn-primary,
    html[data-admin-theme="light"] body:not(.player-body) .btn.btn-primary {
        background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
        color: #ffffff;
        border-color: #0284c7;
        box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
    }
    html[data-admin-theme="light"] body:not(.player-body) button.btn-primary:hover:not(:disabled),
    html[data-admin-theme="light"] body:not(.player-body) .btn.btn-primary:hover:not(:disabled) {
        background: linear-gradient(180deg, #0369a1 0%, #075985 100%);
        color: #ffffff;
        border-color: #0369a1;
    }
    html[data-admin-theme="light"] body:not(.player-body) .segmented-group .btn {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        color: #475569;
    }
    html[data-admin-theme="light"] body:not(.player-body) .segmented-group .btn:hover {
        background: rgba(15, 23, 42, 0.05);
        color: #0f172a;
    }
    html[data-admin-theme="light"] body:not(.player-body) .segmented-group .btn.active,
    html[data-admin-theme="light"] body:not(.player-body) .btn.active {
        background: #0284c7;
        color: #ffffff;
        border-color: #0284c7;
    }
    html[data-admin-theme="light"] body:not(.player-body) header.report-studio-header {
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        border-color: rgba(15, 23, 42, 0.12);
        box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    }
    html[data-admin-theme="light"] body:not(.player-body) .search-box-wrap input {
        background: #ffffff;
        border-color: #cbd5e1;
        color: #0f172a;
    }
    html[data-admin-theme="light"] body:not(.player-body) .search-box-wrap input:focus {
        background: #ffffff;
        border-color: #0284c7;
        box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.16);
    }
    html[data-admin-theme="light"] body:not(.player-body) .btn-clear-search:hover,
    html[data-admin-theme="light"] body:not(.player-body) .search-clear-btn:hover {
        color: #0f172a;
    }
    html[data-admin-theme="light"] body:not(.player-body) .kpi-metric-pill {
        background: #ffffff;
        border-color: #cbd5e1;
        color: #475569;
    }
    html[data-admin-theme="light"] body:not(.player-body) .kpi-metric-pill .kpi-val {
        color: #0f172a;
    }
    html[data-admin-theme="light"] body:not(.player-body) .kpi-metric-pill .kpi-label {
        color: #64748b;
    }
    html[data-admin-theme="light"] body:not(.player-body) .delete-modal-card {
        background: #ffffff;
        border-color: rgba(220, 38, 38, 0.35);
        box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18);
    }
    html[data-admin-theme="light"] body:not(.player-body) .delete-modal-footer {
        background: #f8fafc;
        border-top-color: #e2e8f0;
    }
    html[data-admin-theme="light"] body:not(.player-body) .delete-target-info,
    html[data-admin-theme="light"] body:not(.player-body) .del-confirm-input {
        background: #f8fafc;
        border-color: #cbd5e1;
        color: #0f172a;
    }
    html[data-admin-theme="light"] body:not(.player-body) .audit-log-list {
        background: #ffffff;
        border-color: #cbd5e1;
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    }
    html[data-admin-theme="light"] body:not(.player-body) .audit-log-item {
        border-bottom-color: #f1f5f9;
    }
    html[data-admin-theme="light"] body:not(.player-body) .presence-badge-btn {
        background: #f0fdf4;
        border-color: #86efac;
        color: #15803d;
    }
    html[data-admin-theme="light"] body:not(.player-body) .presence-popover,
    html[data-admin-theme="light"] body:not(.player-body) .presence-popover.floating-portal {
        background: #ffffff !important;
        border-color: #cbd5e1 !important;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16) !important;
    }
    html[data-admin-theme="light"] body:not(.player-body) .popover-user-row {
        background: #f8fafc;
        border-color: #e2e8f0;
    }
    html[data-admin-theme="light"] body:not(.player-body) .popover-user-name {
        color: #0f172a;
    }
    html[data-admin-theme="light"] body:not(.player-body) .popover-clip {
        background: #f1f5f9;
        color: #334155;
    }
    html[data-admin-theme="light"] body:not(.player-body) .file-tag,
    html[data-admin-theme="light"] body:not(.player-body) kbd {
        background: #f1f5f9;
        border-color: #cbd5e1;
        color: #0f172a;
        box-shadow: none;
    }
    html[data-admin-theme="light"] body:not(.player-body) .stat-card.kpi-clickable:hover {
        border-color: #0284c7;
        background: #f8fafc;
    }
    html[data-admin-theme="light"] body:not(.player-body) .stat-card.kpi-clickable.is-active-kpi {
        border-color: #0284c7;
        background: rgba(2, 132, 199, 0.06);
        box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.2), 0 4px 12px rgba(15, 23, 42, 0.06);
    }
}


