/* ── User bar (left column only) ── */
#user-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}
#user-bar-name {
    background: none;
    border: 1px solid #555;
    color: #f0a500;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}
#user-bar-name:hover { border-color: #f0a500; background: rgba(240,165,0,0.1); }
#user-bar-logout {
    background: none;
    border: 1px solid #444;
    color: #888;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}
#user-bar-logout:hover { border-color: #888; color: #ccc; }

#chpw-error { color: #e44; font-size: 0.8rem; min-height: 1.1em; margin-top: 0.5rem; }
#chpw-ok    { color: #4c4; font-size: 0.8rem; min-height: 1.1em; margin-top: 0.5rem; }
#chpw-save  { background: #f0a500; color: #111; font-weight: 700; border-color: #f0a500; }
#chpw-save:hover { background: #ffc72c; }

.collapsible-content {
    display: none;
    margin-top: 10px;
}

.collapsible-btn {
    background-color: #f1f1f1;
    color: #333;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
}
.settings-group-heading {
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}
.settings-group-heading:first-child { margin-top: 0; }

.scoreboard-overlay-wrap { background: transparent; }
/* Centered horizontally; top edge 300px; bottom leaves room for small VDO */
#scoreboard-content.scoreboard-content-wrap,
#custom-scoreboard-content.scoreboard-content-wrap {
    position: absolute; left: 50%; top: 120px; bottom: 40px;
    width: calc(100% - 60px); max-width: calc(100vw - 60px);
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    overflow: auto; box-sizing: border-box;
}
.scoreboard-panel { padding: 0.35rem 0.5rem; color: #fff; font-family: 'Exo 2', sans-serif; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; }
.scoreboard-panel-inner { width: 100%; max-width: 100%; min-width: 0; margin: 0 auto; }
.scoreboard-header { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; padding-bottom: 0.35rem; border-bottom: 2px solid rgba(108, 92, 231, 0.3); flex-wrap: nowrap; }
.scoreboard-team-block { min-width: 0; flex: 1; }
.scoreboard-team-a { text-align: center; }
.scoreboard-team-b { text-align: center; }
.scoreboard-team-name { display: block; font-size: 2.6rem; font-weight: 600; line-height: 1.2; color: #e0e0e0; font-family: 'Exo 2', sans-serif; }
.scoreboard-team-a .scoreboard-team-name { color: #e0e0e0; }
.scoreboard-team-b .scoreboard-team-name { color: #e0e0e0; }
.scoreboard-vs-block { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 0.5rem; flex-shrink: 0; }
.scoreboard-score-main { font-size: 2.75rem; font-weight: 700; color: #99eeff; font-family: 'Rajdhani', sans-serif; }
.scoreboard-score-label { font-size: 0.9rem; color: #00b894; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.08rem; font-weight: 600; font-family: 'Rajdhani', sans-serif; }
.scoreboard-table-wrap { background: rgba(0, 0, 0, 0.25); border-radius: 8px; overflow: hidden; border: 1px solid rgba(108, 92, 231, 0.2); margin-top: 0.35rem; width: 100%; max-width: 100%; min-width: 0; }
.scoreboard-table { width: 100%; max-width: 100%; min-width: 0; table-layout: auto; border-collapse: collapse; font-size: 1.15rem; font-family: 'Exo 2', sans-serif; }
/* Narrow columns shrink to content; team/map columns autosize (no width = fit content) */
.scoreboard-table col:nth-child(1), .scoreboard-table col:nth-child(6), .scoreboard-table col:nth-child(10) { width: 0.1%; }
.scoreboard-table col:nth-child(2) { width: 1%; min-width: 2.8em; }
.scoreboard-table col:nth-child(5), .scoreboard-table col:nth-child(9) { width: 1%; min-width: 2em; }
.scoreboard-table thead { border-bottom: none; }
.scoreboard-table th { padding: 0.3rem 0.4rem; text-align: center; color: #fff; font-weight: 600; font-size: 1.1rem; background: rgba(108, 92, 231, 0.25); border-bottom: 1px solid rgba(255,255,255,0.08); white-space: nowrap; }
.scoreboard-table th.scoreboard-th-empty { padding-left: 4px; padding-right: 4px; background: rgba(108, 92, 231, 0.15); }
.scoreboard-table th.scoreboard-th-map { color: #a29bfe; font-weight: 500; font-size: 0.88rem; }
.scoreboard-table th.scoreboard-th-group { text-align: center; }
.scoreboard-table td { padding: 0.28rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.08); color: #e0e0e0; text-align: center; font-size: 1.12rem; }
.scoreboard-table tr:last-child td { border-bottom: none; }
.scoreboard-table tr:nth-child(even) td { background: rgba(255,255,255,0.03); }
.scoreboard-table td.scoreboard-empty-cell { padding-left: 4px; padding-right: 4px; overflow: hidden; border-color: rgba(255,255,255,0.06); }
.scoreboard-table td.scoreboard-type { font-size: 1.12rem; }
.scoreboard-table td.scoreboard-num { color: #FFD700; font-size: 1.25rem; font-weight: 700; text-align: center; white-space: nowrap; }
.scoreboard-table tbody tr:hover td { background: rgba(108, 92, 231, 0.12); }
.scoreboard-type { color: #00b894; font-weight: 600; font-family: 'Rajdhani', sans-serif; text-align: center; white-space: nowrap; }
.scoreboard-num { color: #FFD700; font-weight: 700; text-align: center; white-space: nowrap; }
.scoreboard-table td.scoreboard-map { color: #a29bfe; font-size: 0.88rem; text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.scoreboard-map { color: #a29bfe; text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.scoreboard-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.scoreboard-table td.scoreboard-cell-team { padding-left: 0.4rem; padding-right: 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scoreboard-table td.scoreboard-cell-team-a { text-align: left; padding-right: 0.6rem; }
.scoreboard-table td.scoreboard-cell-team-b { text-align: left; padding-left: 0.6rem; padding-right: 0.4rem; }
.scoreboard-slot { font-size: 0.75em; color: #a29bfe; font-weight: 600; }
.scoreboard-race-icon { width: 1em; height: 1em; vertical-align: middle; }
.scoreboard-empty { color: #a29bfe; text-align: center; padding: 1rem; font-size: 1.075rem; }

/* ═══════════════════════════════════
   LEFT PANEL — LIGHT PRODUCTION THEME
   ═══════════════════════════════════ */
.left-column {
    background: #f2f4f8 !important;
    color: #1e293b;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 0.82rem;
}

/* Section headings — dark band, stands out on light panel */
.left-column h2 {
    background: #2d3748;
    color: #f0f4ff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 7px 8px 7px 11px;
    margin: 6px 0 0 0;
    border-left: 3px solid #5a7fd4;
    border-bottom: none;
    line-height: 1;
}
/* Collapsible h2 sections */
.left-column h2.collapsible-h2 {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
}
.left-column h2.collapsible-h2::before {
    content: "−";
    font-size: 0.85em;
    font-weight: 400;
    opacity: 0.6;
    flex-shrink: 0;
    line-height: 1;
}
.left-column h2.collapsible-h2.collapsed::before {
    content: "+";
}
.left-column h2.collapsible-h2:hover {
    background: #3a4a5e;
}
.left-column h3.settings-group-heading {
    margin: 4px 0 0 0;
    padding: 5px 8px 5px 10px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #e2e8f0;
    background: #475569;
    border-left: 3px solid #94a3b8;
}
.left-column hr {
    border: none;
    border-top: 1px solid #cbd5e1;
    margin: 5px 0;
}
.left-column br { display: none; }

/* Collapsible headers — light but clearly a drawer-pull */
.collapsible-btn {
    background: #e2e8f0 !important;
    color: #374151 !important;
    border: none !important;
    border-top: 1px solid #cbd5e1 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    border-radius: 0 !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .08em !important;
    padding: 8px 10px 8px 10px !important;
    transition: background .12s !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.collapsible-btn::before {
    content: "+";
    font-size: 0.9em;
    opacity: 0.55;
    flex-shrink: 0;
    margin-right: 5px;
    font-weight: 400;
    line-height: 1;
}
.collapsible-btn.open::before {
    content: "−";
}
.collapsible-btn:hover {
    background: #d1d9e8 !important;
    color: #111827 !important;
}
.collapsible-content {
    background: #f2f4f8;
}

/* Scene buttons — solid, clearly buttons */
.scenes-buttons button {
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid #b8c4d4;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 7px 8px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .1s, border-color .1s;
}
.scenes-buttons button:hover {
    background: #d1d9e8;
    color: #111827;
    border-color: #8090b0;
}
.scenes-buttons button.active {
    background: #15803d !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
    text-decoration: none !important;
    box-shadow: 0 0 0 2px rgba(22,163,74,0.2) !important;
}
.scene-btn-major {
    font-size: 0.92rem !important;
    padding: 10px 12px !important;
    font-weight: 800 !important;
}

/* VDO / panel utility buttons */
.vdo-controls {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}
.vdo-controls button {
    flex: 1;
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid #b8c4d4;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 4px 2px;
    cursor: pointer;
    text-decoration: none;
    transition: background .1s, border-color .1s;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}
.vdo-controls button:hover {
    background: #d1d9e8;
    border-color: #8090b0;
    color: #111827;
}
.vdo-controls button.active {
    background: #15803d;
    color: #ffffff;
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22,163,74,0.2);
}
/* VDO hidden = amber warning — obviously something is off */
#btn-hide-vdo.vdo-hidden {
    background: #b45309;
    color: #ffffff;
    border-color: #d97706;
    box-shadow: 0 0 0 2px rgba(180,83,9,0.3);
}
#btn-hide-vdo.vdo-hidden:hover {
    background: #92400e;
    border-color: #b45309;
}

/* Player intro forms */
.media-form input[type="text"] {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #b8c4d4 !important;
    border-radius: 4px !important;
    font-size: 0.78rem !important;
    padding: 5px 8px !important;
}
.media-form input[type="text"]:focus {
    border-color: #5a7fd4 !important;
    outline: none !important;
}
.media-form button[type="submit"] {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border: 1px solid #b8c4d4 !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    padding: 5px 10px !important;
}
.media-form button[type="submit"]:hover {
    background: #d1d9e8 !important;
    color: #111827 !important;
}

/* Break timer inline inputs */
#break-quick-min, #break-quick-sec {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #b8c4d4 !important;
    border-radius: 3px !important;
}

/* ── Settings button in user-bar ── */
#user-bar #btn-settings {
    background: rgba(255,255,255,0.18) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    border-bottom: 1px solid rgba(255,255,255,0.4) !important;
    border-top: none !important;
    color: #e0e8f0 !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    width: auto !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    white-space: nowrap !important;
    flex-shrink: 0;
}
#user-bar #btn-settings:hover {
    background: rgba(255,255,255,0.3) !important;
    color: #ffffff !important;
}

/* ── Music Player Widget ─────────────────── */
.lp-music { border-bottom: 1px solid #1e2637; margin-top: 6px; position: relative; }

.lp-mx-help-btn {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: rgba(255,255,255,0.45) !important;
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 0 !important;
    cursor: pointer;
    flex-shrink: 0;
}
.lp-mx-help-btn:hover { border-color: rgba(255,255,255,0.7) !important; color: #fff !important; }



/* Bar: matches .left-column h2 section heading exactly */
.lp-music-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: #2d3748;
    color: #f0f4ff;
    border-left: 3px solid #5a7fd4;
    border-bottom: 1px solid #1e2637;
    cursor: pointer;
    user-select: none;
}
.lp-music-bar:hover { background: #3a4a5e; }
.lp-music-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #f0f4ff;
    flex: 1;
}
/* Controls row — transport + knobs, always visible */
.lp-music-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    background: #f2f4f8;
    border-bottom: 1px solid #cbd5e1;
}
.lp-music-transport {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}
.lp-music-transport button {
    width: 26px !important;
    height: 22px !important;
    background: #e2e8f0 !important;
    border: 1px solid #b8c4d4 !important;
    border-radius: 3px !important;
    color: #1e293b !important;
    font-size: 11px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    text-decoration: none !important;
    transition: background .1s !important;
}
.lp-music-transport button:hover {
    background: #c7d2e4 !important;
    color: #0f172a !important;
    border-color: #8fa3be !important;
}
.lp-music-transport button.lp-mx-dim {
    background: #eef0f5 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
}
.lp-music-transport button.lp-mx-paused {
    background: rgba(251,191,36,0.18) !important;
    color: #b45309 !important;
    border-color: rgba(180,83,9,0.35) !important;
}
.lp-music-transport button.active {
    background: #15803d !important;
    color: #fff !important;
    border-color: #16a34a !important;
}
.lp-music-knobs {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}
.lp-mx-knob-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    cursor: ns-resize;
}
.lp-mx-dial-lbl {
    font-size: 0.55rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.lp-mx-knob {
    display: block;
    width: 30px;
    height: 30px;
    cursor: ns-resize;
}
/* Toggle icon — left side of bar */
.lp-mx-toggle-icon {
    font-size: 0.9em;
    font-weight: 400;
    color: rgba(255,255,255,0.4);
    line-height: 1;
    flex-shrink: 0;
    margin-right: 2px;
}
/* Filename row — compact, always visible */
.lp-mx-song-row {
    padding: 3px 10px;
    background: #f2f4f8;
    border-bottom: 1px solid #cbd5e1;
}
.lp-mx-song {
    display: block;
    font-size: 0.58rem;
    color: #64748b;
    font-family: Consolas, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}
.lp-mx-song.playing { color: #15803d; font-style: normal; font-weight: 600; }
.lp-mx-song.lp-mx-err { color: #b91c1c; font-style: normal; }
.lp-mx-seek-wrap { display:flex; align-items:center; gap:4px; padding:3px 0 1px; }
.lp-mx-time { font-size:0.52rem; color:#94a3b8; font-family:Consolas,monospace; flex-shrink:0; }
.lp-mx-seek { flex:1; height:3px; accent-color:#3b82f6; cursor:pointer; margin:0; padding:0; }
/* Mood grid */
.lp-music-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 5px;
    background: #f2f4f8;
    border-bottom: 1px solid #b8c4d4;
}
.lp-music-grid button {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border: 1px solid #b8c4d4 !important;
    border-radius: 4px !important;
    padding: 4px 2px !important;
    font-size: 0.59rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-decoration: none !important;
    transition: background .1s !important;
}
.lp-music-grid button:hover {
    background: #d1d9e8 !important;
    color: #111827 !important;
}
.lp-music-grid button.active {
    background: #15803d !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 2px rgba(22,163,74,0.2) !important;
}
