.glass { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); }

        /* Zone heatmap panel */
        .zone-grid {
            display: grid;
            grid-template-columns: 28px repeat(3, 1fr) 28px;
            grid-template-rows: 22px repeat(3, 1fr);
            gap: 2px;
            width: 100%;
            aspect-ratio: 5/4;
        }
        .zone-cell {
            border-radius: 4px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: default;
            transition: filter 0.15s;
            position: relative;
            min-height: 38px;
        }
        .zone-cell:hover { filter: brightness(1.12); }
        .zone-cell .zc-goals { font-size: 13px; font-weight: 900; line-height: 1; }
        .zone-cell .zc-shots { font-size: 9px; font-weight: 700; opacity: 0.75; margin-top: 1px; }
        .zone-cell .zc-saves { font-size: 9px; font-weight: 700; color: #818cf8; margin-top: 1px; }
        .zone-top { grid-column: 2 / 5; grid-row: 1; border-radius: 4px; }
        .zone-left  { grid-column: 1; grid-row: 1 / 5; border-radius: 4px; }
        .zone-right { grid-column: 5; grid-row: 1 / 5; border-radius: 4px; }

        /* Sidebar collapsible */
        #sidebar { transition: width 0.25s ease; overflow: hidden; }
        .sidebar-label, #sidebar-logo, #sidebar-export, #sidebar-footer-content {
            transition: opacity 0.15s ease;
        }
        #sidebar.collapsed { width: 3.5rem !important; }
        #sidebar.collapsed .sidebar-label,
        #sidebar.collapsed #sidebar-logo,
        #sidebar.collapsed #sidebar-export,
        #sidebar.collapsed #sidebar-footer-content { opacity: 0; pointer-events: none; width: 0; overflow: hidden; }
        #sidebar.collapsed #sidebar-toggle-icon::before { content: '▶'; }
        #sidebar:not(.collapsed) #sidebar-toggle-icon::before { content: '◀'; }
        #sidebar-toggle-icon { font-size: 10px; }
        #sidebar.collapsed .sidebar-btn { justify-content: center; padding-left: 0; padding-right: 0; }

        .live-blue { background:#082846; }
        .live-control-btn {
            background:#082846;
            color:#f8fafc;
            border-right:1px solid rgba(255,255,255,0.45);
            min-height:28px;
            font-size:13px;
            font-weight:700;
            letter-spacing:.01em;
        }
        .live-control-btn:hover, .live-control-btn.active { background:#1d6fe8; }
        .live-video-shell {
            background:#020617;
            border:1px solid #d8dee8;
            box-shadow:0 8px 22px rgba(15,23,42,.16);
        }
        .live-video-empty {
            background:
                linear-gradient(135deg, rgba(29,111,232,.22), rgba(8,40,70,.22)),
                radial-gradient(circle at 50% 40%, rgba(255,255,255,.12), transparent 34%),
                #07111f;
        }
        .live-scorebug {
            background:rgba(4,23,42,.94);
            border:1px solid rgba(255,255,255,.18);
            box-shadow:0 4px 16px rgba(0,0,0,.28);
        }
        .live-roster-panel {
            max-height:230px;
            overflow:auto;
        }
        #event-log.live-event-table {
            max-height:170px;
            overflow:auto;
            font-size:12px;
        }
        #event-log.live-event-table > div {
            display:grid;
            grid-template-columns:1fr auto;
            align-items:center;
            gap:8px;
            padding:9px 10px;
            border-bottom:1px solid #edf2f7;
        }
        #event-log.live-event-table > div > span:first-child {
            display:none;
        }
        /* En el tab live, el primer span (equipo) SÍ debe mostrarse */
        #tab-live #event-log.live-event-table > div > span:first-child {
            display:block;
        }
        #event-log.live-event-table > div > span:nth-child(2) {
            color:#334155;
            font-size:12px;
            font-weight:700;
        }
        #event-log.live-event-table > div > div {
            display:grid;
            grid-column:1;
            grid-template-columns:1fr;
            gap:2px;
        }
        #event-log.live-event-table p { margin:0; }
        #event-log.live-event-table button {
            grid-column:2;
            grid-row:1 / span 2;
            justify-self:end;
            width:24px;
            height:24px;
            border-radius:999px;
            font-size:16px;
        }
        #tab-live {
            width:100%;
            max-width:none;
            min-height:100%;
            margin:0;
            background:#fff;
            border:0;
            box-shadow:none;
            position:relative;
        }
        main:has(#tab-live:not(.hidden)) {
            padding:0 !important;
            background:#fff;
        }
        main:has(#tab-live-stats:not(.hidden)) {
            padding:0 !important;
            background:#f0f4f8;
        }
        main:has(#tab-live:not(.hidden)) #tab-live {
            min-height:100vh;
        }
        #tab-live #timer-bg {
            border-radius:0 !important;
            border-left:0 !important;
            border-right:0 !important;
            border-top:0 !important;
            box-shadow:none !important;
        }
        #tab-live > .grid.grid-cols-1 {
            display:grid !important;
            grid-template-columns:minmax(185px,220px) minmax(0,1fr) minmax(185px,220px) !important;
            gap:0 !important;
            align-items:stretch;
            background:#fff;
        }
        #tab-live > .grid.grid-cols-1 > div:nth-child(2) {
            grid-column:2;
            order:0;
            width:100%;
            min-width:0;
        }
        #tab-live > .grid.grid-cols-1 > div:nth-child(1) {
            grid-column:1;
            order:0;
            border-right:1px solid #d8dee8;
        }
        #tab-live > .grid.grid-cols-1 > div:nth-child(3) {
            grid-column:3;
            order:0;
            border-left:1px solid #d8dee8;
        }
        #tab-live #video-container {
            border-radius:0 !important;
            box-shadow:none !important;
            overflow:visible !important;
        }
        #tab-live #video-container.video-loaded {
            display:block !important;
            border-top:1px solid #d8dee8;
            border-bottom:1px solid #d8dee8;
        }
        #tab-live #video-wrapper {
            background:#000;
            width:100%;
        }
        #tab-live #video-wrapper video,
        #tab-live #video-wrapper iframe {
            display:block;
            width:100% !important;
            max-height:none !important;
        }
        /* Placeholder cuando no hay video */
        #tab-live #video-placeholder {
            display:flex;
            flex-direction:column;
            align-items:center;
            justify-content:center;
            gap:8px;
            padding:28px 0 24px;
            background:#f8fafc;
            border-bottom:1px solid #e2e8f0;
            color:#94a3b8;
        }
        #tab-live #video-placeholder svg { opacity:.3; }
        #tab-live #video-placeholder p  { font-size:12px; font-weight:700; margin:0; letter-spacing:.02em; }
        #tab-live #video-placeholder small { font-size:10px; font-weight:500; opacity:.75; }
        #tab-live #video-container > .flex {
            background:#082846 !important;
            border-bottom:1px solid rgba(255,255,255,.35);
        }
        #tab-live #video-height-slider,
        #tab-live #video-height-label,
        #tab-live #video-container > .flex span:first-child {
            display:none;
        }
        #tab-live #action-buttons {
            padding:12px;
            background:#fff;
        }
        #tab-live .rounded-xl,
        #tab-live .rounded-lg {
            border-radius:2px !important;
        }
        #tab-live #event-log {
            max-height:230px !important;
        }
        #tab-live > .grid.grid-cols-1 > div:nth-child(3) > div:last-child {
            padding:0 !important;
            overflow:hidden;
        }
        #tab-live > .grid.grid-cols-1 > div:nth-child(3) > div:last-child h3 {
            display:block;
            padding:10px 12px !important;
            margin:0 !important;
            background:#f8fafc;
            border-bottom:1px solid #e2e8f0 !important;
            color:#64748b;
            font-size:11px;
            text-transform:none;
            letter-spacing:0;
        }
        #tab-live > .grid.grid-cols-1 > div:nth-child(3) > div:last-child h3::before,
        #tab-live > .grid.grid-cols-1 > div:nth-child(3) > div:last-child h3::after {
            content:none;
        }
        /* Side columns - clean layout */
        #tab-live > .grid.grid-cols-1 > div:nth-child(1),
        #tab-live > .grid.grid-cols-1 > div:nth-child(3) {
            border:0;
            border-radius:0;
            box-shadow:none;
            background:transparent;
            padding:10px 0 10px !important;
            gap:8px !important;
        }
        #tab-live > .grid.grid-cols-1 > div:nth-child(1) {
            border-right:1px solid #d8dee8 !important;
            padding-right:0 !important;
        }
        #tab-live > .grid.grid-cols-1 > div:nth-child(3) {
            border-left:1px solid #d8dee8 !important;
            padding-left:0 !important;
        }
        /* Team header block */
        #tab-live .team-hdr-block {
            border-radius:0 !important;
            margin:0 !important;
        }
        /* Players card inside side columns — keep rounded corners */
        #tab-live > .grid.grid-cols-1 > div:nth-child(1) > .bg-white,
        #tab-live > .grid.grid-cols-1 > div:nth-child(3) > .bg-white {
            border-radius:0 !important;
            border-left:0 !important;
            border-right:0 !important;
            box-shadow:none !important;
        }
        #tab-live #home-team-name,
        #tab-live #away-team-name {
            font-size:10px !important;
            line-height:1.1;
        }
        #tab-live #score-home,
        #tab-live #score-away {
            font-size:30px !important;
            line-height:1 !important;
        }
        #tab-live .timeout-btn-home,
        #tab-live .timeout-btn-away {
            min-height:28px;
            border:0 !important;
            border-radius:5px !important;
            box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);
        }
        #tab-live #home-players,
        #tab-live #home-bench,
        #tab-live #away-players,
        #tab-live #away-bench,
        #tab-live #home-goalkeeper,
        #tab-live #away-goalkeeper {
            grid-template-columns:repeat(2,minmax(0,1fr)) !important;
            gap:4px !important;
            display:grid !important;
        }
        #tab-live [id^="btn-player-"] {
            min-height:60px;
            border-radius:5px !important;
            border:0 !important;
            background:#0d7a6e;
            display:flex !important;
            flex-direction:column;
            align-items:center;
            justify-content:center;
            padding:3px 2px !important;
            gap:0;
            box-shadow:0 2px 5px rgba(0,0,0,.2),inset 0 -2px 0 rgba(0,0,0,.2);
            transition:filter .12s,transform .1s;
            color:#fff !important;
            overflow:hidden;
            position:relative;
        }
        #tab-live [id^="btn-player-"].gk-card {
            background:#1a4880 !important;
        }
        #tab-live [id^="btn-player-"].bench-card {
            background:#1a6b5e !important;
            opacity:.72;
        }
        #tab-live [id^="btn-player-"]:hover {
            filter:brightness(1.16);
            transform:translateY(-1px);
            border:0 !important;
        }
        /* Suspensiones en cards de video análisis */
        #tab-live [id^="btn-player-"].suspended { cursor: not-allowed !important; filter: brightness(.55) saturate(.4); }
        #tab-live [id^="btn-player-"].suspended:hover { filter: brightness(.55) saturate(.4) !important; transform: none !important; }
        #tab-live [id^="btn-player-"].suspended.susp-expelled { cursor: pointer !important; }
        #tab-live [id^="btn-player-"].susp-2min  { background: #92400e !important; border: 2px solid #f59e0b !important; }
        #tab-live [id^="btn-player-"].susp-roja  { background: #7f1d1d !important; border: 2px solid #ef4444 !important; }
        #tab-live [id^="btn-player-"].susp-azul  { background: #1e3a5f !important; border: 2px solid #3b82f6 !important; }
        #tab-live [id^="btn-player-"].susp-expelled:not(.suspended) { opacity: .45 !important; cursor: not-allowed !important; }
        #tab-live [id^="btn-player-"] .tls-susp-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 900;
            background: rgba(0,0,0,.82);
            color: #fff;
            border-radius: 5px;
            text-shadow: 0 1px 3px rgba(0,0,0,.9);
            pointer-events: none;
            letter-spacing: -.01em;
            z-index: 2;
        }
        #tab-live [id^="btn-player-"] .tls-susp-overlay.hidden { display: none; }
        #tab-live [id^="btn-player-"].bg-blue-600 {
            background:#1d4ed8 !important;
            color:#fff !important;
            border:2px solid #93c5fd !important;
            box-shadow:0 4px 14px rgba(29,78,216,.38);
            opacity:1 !important;
        }
        #tab-live .player-pos-tag {
            font-size:8px;
            font-weight:800;
            text-transform:lowercase;
            letter-spacing:.04em;
            opacity:.65;
            line-height:1;
            margin-bottom:1px;
        }
        #tab-live .player-num {
            font-size:22px;
            font-weight:900;
            line-height:1;
            letter-spacing:-.01em;
        }
        #tab-live .player-name {
            font-size:8px;
            font-weight:800;
            text-transform:uppercase;
            letter-spacing:.06em;
            opacity:.9;
            line-height:1;
            margin-top:2px;
            max-width:calc(100% - 4px);
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }
        #tab-live .player-stats {
            font-size:7px;
            font-weight:700;
            font-family:monospace;
            opacity:.55;
            line-height:1;
            margin-top:1px;
        }
        /* Defense / Offense system sections */
        #tab-live .defense-system-section {
            padding:8px 10px 6px;
            background:#f8fafc;
            border-top:1px solid #e2e8f0;
        }
        #tab-live .defense-system-section .sys-label {
            font-size:9px;
            font-weight:800;
            text-transform:uppercase;
            letter-spacing:.09em;
            color:#94a3b8;
            margin-bottom:5px;
        }
        #tab-live .def-btns-grid {
            display:grid;
            grid-template-columns:repeat(2,1fr);
            gap:3px;
        }
        #tab-live .def-radio-btn {
            display:flex;
            align-items:center;
            gap:4px;
            font-size:9px;
            font-weight:700;
            color:#475569;
            padding:3px 6px;
            border-radius:4px;
            border:1px solid #cbd5e1;
            background:#fff;
            cursor:pointer;
            transition:background .1s,border-color .1s;
            white-space:nowrap;
        }
        #tab-live .def-radio-btn:has(input:checked) {
            background:#1e3a8a;
            border-color:#1e3a8a;
            color:#fff;
        }
        #tab-live .def-radio-btn input[type=radio] {
            accent-color:#3b82f6;
            width:9px;
            height:9px;
            flex-shrink:0;
        }
        #tab-live .offense-system-section {
            padding:4px 10px 8px;
            background:#f8fafc;
        }
        #tab-live .offense-system-section .sys-label {
            font-size:9px;
            font-weight:800;
            text-transform:uppercase;
            letter-spacing:.09em;
            color:#94a3b8;
        }
        #tab-live .offense-val {
            font-size:11px;
            font-weight:900;
            color:#1e293b;
            letter-spacing:.06em;
        }
        /* Event log as table */
        #tab-live .event-table-header {
            display:grid;
            grid-template-columns:2fr 1.2fr .6fr 1.4fr 1fr 18px;
            gap:0;
            background:#f1f5f9;
            border-bottom:2px solid #e2e8f0;
            padding:5px 10px;
        }
        #tab-live .event-table-header span {
            font-size:9px;
            font-weight:800;
            text-transform:uppercase;
            letter-spacing:.08em;
            color:#94a3b8;
        }
        #tab-live #event-log.live-event-table > div {
            display:grid !important;
            grid-template-columns:2fr 1.2fr .6fr 1.4fr 1.2fr 72px !important;
            gap:0 !important;
            padding:6px 10px !important;
            align-items:center;
            border-bottom:1px solid #f1f5f9 !important;
            overflow:visible !important;
        }
        #tab-live #event-log.live-event-table > div > * {
            font-size:10px;
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
        }
        /* La columna de acciones NO debe tener overflow:hidden */
        #tab-live #event-log.live-event-table > div > .ev-actions {
            overflow:visible !important;
            white-space:normal !important;
        }
        #tab-live #event-log.live-event-table .ev-time-cell {
            display:flex;
            flex-direction:column;
            gap:1px;
            line-height:1.2;
        }
        #tab-live #event-log.live-event-table .ev-time-cell .ev-vid-time {
            color:#6366f1;
            font-size:9px;
            font-weight:700;
        }
        #tab-live #event-log.live-event-table .ev-actions {
            display:flex;
            align-items:center;
            justify-content:flex-end;
            gap:3px;
        }
        #tab-live #event-log.live-event-table .ev-actions button {
            background:none;
            border:none;
            cursor:pointer;
            padding:2px;
            border-radius:4px;
            line-height:1;
            transition:color .15s, background .15s;
            font-size:13px;
            width:auto;
            height:auto;
        }
        #tab-live #event-log.live-event-table .ev-btn-play { color:#2563eb; }
        #tab-live #event-log.live-event-table .ev-btn-play:hover { color:#1d4ed8; background:#eff6ff; }
        #tab-live #event-log.live-event-table .ev-btn-play:disabled { color:#cbd5e1; cursor:default; }
        #tab-live #event-log.live-event-table .ev-btn-tag { color:#f59e0b; }
        #tab-live #event-log.live-event-table .ev-btn-tag:hover { background:#fefce8; }
        #tab-live #event-log.live-event-table .ev-btn-tag.active { color:#d97706; }
        #tab-live #event-log.live-event-table .ev-btn-del { color:#cbd5e1; }
        #tab-live #event-log.live-event-table .ev-btn-del:hover { color:#ef4444; background:#fef2f2; }
        /* Overrides para cancelar reglas genéricas del event-log que rompen el grid en tab-live */
        #tab-live #event-log.live-event-table > div > div.ev-actions {
            display:flex !important;
            grid-column:auto !important;
            grid-template-columns:none !important;
            gap:2px !important;
            align-items:center;
            justify-content:flex-end;
        }
        #tab-live #event-log.live-event-table > div > div.ev-actions button {
            grid-column:auto !important;
            grid-row:auto !important;
            justify-self:auto !important;
            width:auto !important;
            height:auto !important;
            border-radius:4px !important;
            font-size:12px !important;
        }
        #tab-live #player-info {
            display:flex;
            flex-direction:column;
            gap:1px;
            padding:7px 12px !important;
            border:0 !important;
            border-left:4px solid #2563eb !important;
            border-radius:6px !important;
            box-shadow:0 2px 8px rgba(37,99,235,.10) !important;
            background:#eff6ff !important;
        }
        /* Section labels in player panels */
        #tab-live .players-section-label {
            display:flex;
            align-items:center;
            gap:5px;
            font-size:8px;
            font-weight:800;
            text-transform:uppercase;
            letter-spacing:.1em;
            color:#94a3b8;
            padding:4px 8px 3px;
            border-top:1px solid #f1f5f9;
            background:#f8fafc;
        }
        #tab-live .players-section-label:first-child {
            border-top:0;
        }
        #tab-live .players-section-label::before {
            content:'';
            display:block;
            width:3px;
            height:10px;
            border-radius:2px;
            background:currentColor;
            flex-shrink:0;
        }
        #tab-live .players-section-label.lbl-gk { color:#3b82f6; }
        #tab-live .players-section-label.lbl-field { color:#0d9488; }
        #tab-live .players-section-label.lbl-bench { color:#94a3b8; }
        /* Center column tighter */
        #tab-live > .grid.grid-cols-1 > div:nth-child(2) {
            padding:0 !important;
        }
        #tab-live > .grid.grid-cols-1 > div:nth-child(2) > .space-y-3 {
            gap:0 !important;
        }
        #tab-live #video-container {
            margin:0 !important;
        }
        @media (max-width: 1280px) {
            main:not(:has(#tab-live:not(.hidden))) { padding-left:10px !important; padding-right:10px !important; }
            #tab-live {
                max-width:100%;
            }
            #tab-live > .grid.grid-cols-1 {
                grid-template-columns:minmax(155px,185px) minmax(0,1fr) minmax(155px,185px) !important;
            }
            #tab-live [id^="btn-player-"] {
                padding-left:6px !important;
                padding-right:6px !important;
            }
            #tab-live [id^="btn-player-"] .w-7 {
                width:24px !important;
                height:24px !important;
            }
        }
        @media (max-width: 1080px) {
            #tab-live > .grid.grid-cols-1 {
                grid-template-columns:1fr 1fr !important;
            }
            #tab-live > .grid.grid-cols-1 > div:nth-child(2) {
                grid-column:1 / -1;
                grid-row:1;
                border-bottom:1px solid #d8dee8;
            }
            #tab-live > .grid.grid-cols-1 > div:nth-child(1) {
                grid-column:1;
                grid-row:2;
                border-right:1px solid #d8dee8 !important;
                border-bottom:1px solid #d8dee8 !important;
            }
            #tab-live > .grid.grid-cols-1 > div:nth-child(3) {
                grid-column:2;
                grid-row:2;
                border-left:0 !important;
                border-bottom:1px solid #d8dee8 !important;
            }
            #tab-live #home-players,
            #tab-live #home-bench,
            #tab-live #away-players,
            #tab-live #away-bench,
            #tab-live #home-goalkeeper,
            #tab-live #away-goalkeeper {
                grid-template-columns:repeat(2,minmax(0,1fr)) !important;
            }
            #tab-live #action-buttons {
                grid-template-columns:repeat(3,minmax(0,1fr)) !important;
            }
            #tab-live #undo-btn {
                grid-column:1 / -1 !important;
            }
        }
        @media (max-width: 760px) {
            body {
                display:block !important;
            }
            #sidebar {
                width:100% !important;
                min-height:auto !important;
                height:auto !important;   /* en escritorio es h-screen; en móvil es una barra arriba */
                overflow:visible !important;
                position:sticky;
                top:0;
            }
            /* El sidebar puede haber quedado "colapsado" (localStorage) de una
               sesión de escritorio anterior: en mobile eso NO debe aplicar, siempre
               mostramos la barra horizontal completa con ícono + etiqueta. */
            #sidebar.collapsed {
                width:100% !important;
                min-height:auto !important;
            }
            #sidebar.collapsed .sidebar-label,
            #sidebar.collapsed #sidebar-logo {
                opacity:1 !important;
                width:auto !important;
                pointer-events:auto !important;
            }
            #sidebar nav {
                display:flex;
                overflow-x:auto;
                padding:8px !important;
            }
            #sidebar .sidebar-btn,
            #sidebar.collapsed .sidebar-btn {
                flex:0 0 auto;
                width:auto !important;
                justify-content:flex-start;
            }
            #sidebar-toggle-icon {
                display:none;
            }
            #sidebar-toggle-btn {
                display:none !important;
            }
            #sidebar-export,
            #sidebar-footer-content,
            #sidebar-logo p {
                display:none !important;
            }
            main {
                padding:8px !important;
            }
            main:has(#tab-live:not(.hidden)) {
                padding:0 !important;
            }
            #tab-live > .grid.grid-cols-4 {
                grid-template-columns:repeat(2,minmax(0,1fr)) !important;
            }
            #tab-live #timer-bg > div:first-child {
                gap:6px !important;
            }
            #match-select {
                width:100% !important;
                max-width:none !important;
            }
            #video-bar-url {
                width:100%;
            }
            #video-url-input {
                flex:1;
                width:auto !important;
                min-width:0;
            }
            #tab-live > .grid.grid-cols-1 {
                grid-template-columns:1fr !important;
            }
            #tab-live > .grid.grid-cols-1 > div:nth-child(2),
            #tab-live > .grid.grid-cols-1 > div:nth-child(1),
            #tab-live > .grid.grid-cols-1 > div:nth-child(3) {
                grid-column:1 !important;
                border-left:0 !important;
                border-right:0 !important;
            }
            #tab-live > .grid.grid-cols-1 > div:nth-child(2) { grid-row:1; }
            #tab-live > .grid.grid-cols-1 > div:nth-child(1) { grid-row:2; }
            #tab-live > .grid.grid-cols-1 > div:nth-child(3) { grid-row:3; }
            #tab-live .grid.grid-cols-8.live-blue {
                grid-template-columns:repeat(4,minmax(0,1fr)) !important;
            }
            #tab-live .live-control-btn {
                min-height:32px;
                font-size:11px;
            }
            #tab-live #action-buttons {
                grid-template-columns:repeat(2,minmax(0,1fr)) !important;
                padding:8px;
            }
            #tab-live #home-players,
            #tab-live #home-bench,
            #tab-live #away-players,
            #tab-live #away-bench,
            #tab-live #home-goalkeeper,
            #tab-live #away-goalkeeper {
                grid-template-columns:1fr !important;
            }
        }

        /* ── Modo análisis / estadísticas ── */
        .mode-toggle-bar {
            display:flex; align-items:center; gap:0;
            background:#082846; border-bottom:2px solid rgba(255,255,255,.15);
            padding:0;
        }
        .mode-tab {
            flex:1; padding:9px 4px; text-align:center;
            font-size:10px; font-weight:900; letter-spacing:.1em;
            text-transform:uppercase; color:rgba(255,255,255,.45);
            cursor:pointer; border:none; background:transparent;
            transition:background .15s, color .15s;
            display:flex; align-items:center; justify-content:center; gap:6px;
        }
        .mode-tab.active {
            background:rgba(255,255,255,.12); color:#fff;
            border-bottom:3px solid #3b82f6;
        }
        .mode-tab svg { flex-shrink:0; }
        /* tab-live = exclusivo Videoanálisis; tab-live-stats = exclusivo Estadísticas en Vivo */
        /* ── Event Detail Modal (EDM) styles ── */
        .edm-sec-hdr {
            background:#0c1f35; color:#fff; font-size:9px; font-weight:900;
            text-transform:uppercase; letter-spacing:.12em; padding:6px 16px;
        }
        .edm-goal-grid {
            display:grid;
            grid-template-columns: 36px 1fr 1fr 1fr 36px;
            grid-template-rows: 32px 52px 52px 52px;
            gap:3px;
            width:100%;
            max-width:420px;
            margin:0 auto;
        }
        /* top bar zone 0 — spans middle 3 columns */
        .edm-gz-top-bar {
            grid-column: 2 / 5; grid-row: 1;
            border:1.5px solid #cbd5e1; border-radius:4px;
            display:flex; align-items:center; justify-content:center;
            cursor:pointer; background:#e2e8f0;
            font-size:13px; font-weight:800; color:#475569; user-select:none;
            transition:background .12s,border-color .12s;
        }
        .edm-gz-top-bar:hover { background:#bfdbfe; border-color:#3b82f6; }
        .edm-gz-top-bar.edm-gz-selected { background:#1d4ed8; border-color:#1d4ed8; color:#fff; }
        /* corner spacers */
        .edm-gz-corner { grid-row:1; background:transparent; border:none; }
        /* side zones 10 & 11 — span rows 2-4 */
        .edm-gz-side {
            border:1.5px solid #cbd5e1; border-radius:4px;
            display:flex; align-items:center; justify-content:center;
            cursor:pointer; background:#e2e8f0;
            font-size:13px; font-weight:800; color:#475569; user-select:none;
            transition:background .12s,border-color .12s;
            writing-mode:vertical-lr;
        }
        .edm-gz-side:hover { background:#bfdbfe; border-color:#3b82f6; }
        .edm-gz-side.edm-gz-selected { background:#1d4ed8; border-color:#1d4ed8; color:#fff; }
        .edm-gz-left  { grid-column:1; grid-row:2/5; }
        .edm-gz-right { grid-column:5; grid-row:2/5; }
        /* inner zones 1-9 */
        .edm-gz {
            border:1.5px solid #cbd5e1; border-radius:4px;
            display:flex; align-items:center; justify-content:center;
            cursor:pointer; background:#f8fafc; transition:background .12s,border-color .12s;
            font-size:13px; font-weight:800; color:#475569; user-select:none;
        }
        .edm-gz:hover { background:#dbeafe; border-color:#3b82f6; }
        .edm-gz.edm-gz-selected { background:#1d4ed8; border-color:#1d4ed8; color:#fff; }
        .edm-pos-btn {
            border:1.5px solid #cbd5e1; border-radius:5px; padding:7px 4px;
            font-size:10px; font-weight:700; color:#334155; background:#fff;
            cursor:pointer; text-align:center; transition:background .1s,border-color .1s;
            line-height:1.2;
        }
        .edm-pos-btn:hover { background:#eff6ff; border-color:#3b82f6; }
        .edm-pos-btn.edm-pos-selected { background:#1d4ed8; border-color:#1d4ed8; color:#fff; }
        .edm-gs-cat-hdr {
            font-size:10px; font-weight:900; color:#fff; padding:4px 10px;
            border-radius:4px; letter-spacing:.04em;
        }
        .edm-gs-grid {
            display:grid; grid-template-columns:repeat(auto-fill,minmax(100px,1fr)); gap:5px;
        }
        .edm-gs-num {
            display:block; font-size:11px; font-weight:900; color:#1d4ed8;
            line-height:1; margin-bottom:1px;
        }
        .edm-gs-btn.edm-gs-selected .edm-gs-num { color:#bfdbfe; }
        .edm-gs-btn {
            border:1.5px solid #cbd5e1; border-radius:5px; padding:8px 6px;
            font-size:10px; font-weight:700; color:#334155; background:#fff;
            cursor:pointer; text-align:center; line-height:1.3;
            transition:background .1s,border-color .1s;
        }
        .edm-gs-btn:hover { background:#f1f5f9; border-color:#94a3b8; }
        .edm-gs-btn.edm-gs-selected { background:#1d4ed8; border-color:#1d4ed8; color:#fff; }
        .edm-assist-btn {
            border:1.5px solid #0d9488; border-radius:7px; padding:8px 4px;
            font-size:10px; font-weight:800; color:#0f766e; background:#f0fdfa;
            cursor:pointer; text-align:center; transition:background .1s;
            display:flex; flex-direction:column; gap:1px; align-items:center;
        }
        .edm-assist-btn:hover { background:#ccfbf1; }
        .edm-assist-btn.edm-assist-selected { background:#0d9488; border-color:#0d9488; color:#fff; }
        .edm-assist-btn .edm-ab-num { font-size:15px; font-weight:900; line-height:1; }
        .edm-assist-btn .edm-ab-name {
            font-size:8px; font-weight:700; text-transform:uppercase;
            letter-spacing:.04em; overflow:hidden; max-width:52px;
            white-space:nowrap; text-overflow:ellipsis;
        }
        .edm-involved-btn {
            border:1.5px solid #0d9488; border-radius:7px; padding:8px 4px;
            font-size:10px; font-weight:800; color:#0f766e; background:#f0fdfa;
            cursor:pointer; text-align:center; transition:background .1s;
            display:flex; flex-direction:column; gap:1px; align-items:center;
        }
        .edm-involved-btn:hover { background:#ccfbf1; }
        .edm-involved-btn.edm-involved-selected { background:#0d9488; border-color:#0d9488; color:#fff; }

/* ====================================================================== */

/* ── Estadísticas en Vivo — diseño tablet ── */
        #tab-live-stats {
            font-family: 'Segoe UI', system-ui, sans-serif;
        }
        /* Header barra superior */
        #tls-topbar {
            background: #082846;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 12px;
            gap: 10px;
            border-bottom: 2px solid rgba(255,255,255,.15);
        }
        #tls-topbar select {
            background: rgba(255,255,255,.12);
            border: 1px solid rgba(255,255,255,.25);
            color: #fff;
            border-radius: 5px;
            padding: 3px 8px;
            font-size: 11px;
            font-weight: 700;
        }
        #tls-topbar select option { color: #000; background: #fff; }
        .tls-timer-box {
            display: flex; align-items: center; gap: 8px;
        }
        #tls-half-badge {
            background: rgba(255,255,255,.15);
            border-radius: 4px;
            padding: 2px 7px;
            font-size: 9px;
            font-weight: 900;
            letter-spacing: .1em;
            text-transform: uppercase;
        }
        #tls-timer {
            font-size: 22px;
            font-weight: 900;
            font-family: monospace;
            letter-spacing: .05em;
        }
        .tls-ctrl-btn {
            background: rgba(255,255,255,.15);
            border: 1px solid rgba(255,255,255,.2);
            color: #fff;
            border-radius: 5px;
            padding: 3px 9px;
            font-size: 10px;
            font-weight: 700;
            cursor: pointer;
            transition: background .1s;
        }
        .tls-ctrl-btn:hover { background: rgba(255,255,255,.28); }
        .tls-ctrl-btn.active-timer { background: #ef4444; }

        /* Layout principal 3 columnas */
        #tls-main {
            display: grid;
            grid-template-columns: minmax(210px, 240px) minmax(360px, 1fr) minmax(210px, 240px);
            gap: 0;
            flex: 1;
            min-height: 0;
            align-items: stretch;
            overflow: visible;
        }
        /* ── Columnas laterales ── */
        .tls-team-col {
            background: #fff;
            border-right: 1px solid #d8dee8;
            display: flex;
            flex-direction: column;
            overflow: visible;
            height: auto;
            min-height: 0;
        }
        .tls-team-col:last-child {
            border-right: 0;
            border-left: 1px solid #d8dee8;
        }
        /* Header equipo */
        .tls-team-hdr {
            padding: 8px 10px 6px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .tls-team-hdr.home { background: #082846; }
        .tls-team-hdr.away { background: #6b0000; }
        .tls-team-name {
            font-size: 9px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .08em;
            color: rgba(255,255,255,.6);
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .tls-score-big {
            font-size: 28px;
            font-weight: 900;
            color: #fff;
            line-height: 1;
            flex-shrink: 0;
        }
        /* Timeouts */
        .tls-timeouts {
            display: flex;
            gap: 3px;
            padding: 4px 8px;
            background: rgba(0,0,0,.04);
            border-bottom: 1px solid #edf2f7;
        }
        .tls-to-lbl {
            font-size: 7px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .08em;
            color: #94a3b8;
            margin-right: 2px;
            align-self: center;
        }
        .tls-to-btn {
            flex: 1;
            background: #2563eb;
            color: #fff;
            border: none;
            border-radius: 4px;
            padding: 4px 2px;
            font-size: 9px;
            font-weight: 900;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            line-height: 1.1;
            box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);
            transition: filter .1s;
        }
        .tls-to-btn:hover { filter: brightness(1.15); }
        .tls-to-btn.used { background: #94a3b8; }
        .tls-to-btn-away { background: #b91c1c; }
        .tls-to-btn-away.used { background: #94a3b8; }
        .tls-to-time { font-size: 7px; opacity: .75; font-family: monospace; }
        /* Section labels */
        .tls-sec-lbl {
            font-size: 7px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .1em;
            color: #94a3b8;
            padding: 4px 8px 2px;
            background: #f8fafc;
            border-top: 1px solid #f1f5f9;
            border-bottom: 1px solid #f1f5f9;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .tls-sec-lbl::before {
            content: '';
            display: block;
            width: 3px;
            height: 9px;
            border-radius: 2px;
            background: currentColor;
        }
        .tls-sec-lbl.gk { color: #3b82f6; }
        .tls-sec-lbl.field { color: #0d9488; }
        .tls-sec-lbl.bench { color: #94a3b8; }
        /* Player cards grid */
        .tls-players-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 3px;
            padding: 3px 6px;
        }
        .tls-player-card {
            background: #0d7a6e;
            border-radius: 5px;
            color: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3px 2px;
            min-height: 58px;
            cursor: pointer;
            box-shadow: 0 2px 4px rgba(0,0,0,.18), inset 0 -2px 0 rgba(0,0,0,.2);
            transition: filter .12s, transform .1s;
            border: none;
            overflow: hidden;
        }
        .tls-player-card:hover { filter: brightness(1.16); transform: translateY(-1px); }
        .tls-player-card.gk { background: #1a4880; }
        .tls-player-card.bench { background: #1a6b5e; opacity: .72; }
        .tls-player-card.selected { background: #1d4ed8 !important; border: 2px solid #93c5fd; box-shadow: 0 4px 14px rgba(29,78,216,.38); opacity: 1 !important; }
        .tls-pc-pos { font-size: 7px; font-weight: 800; text-transform: lowercase; letter-spacing: .04em; opacity: .65; line-height: 1; }
        .tls-pc-num { font-size: 20px; font-weight: 900; line-height: 1; letter-spacing: -.01em; }
        .tls-pc-name { font-size: 6.5px; font-weight: 700; text-align: center; opacity: .8; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; line-height: 1.1; }
        .tls-pc-stats { font-size: 6px; color: rgba(255,255,255,.6); font-weight: 600; display: flex; gap: 4px; margin-top: 1px; }
        /* Defense system */
        .tls-history-section {
            border-top: 1px solid #e8edf3;
            flex: 0 0 auto;
            display: flex;
            flex-direction: column;
            min-height: 180px;
            overflow: visible;
        }
        .tls-history-hdr {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 5px 10px 4px;
            background: #f1f5f9;
            border-bottom: 1px solid #e2e8f0;
            font-size: 8px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .1em;
            color: #64748b;
            flex-shrink: 0;
        }
        .tls-history-count {
            background: #334155;
            color: #fff;
            border-radius: 999px;
            font-size: 8px;
            font-weight: 900;
            padding: 1px 6px;
            letter-spacing: 0;
        }
        .tls-history-list {
            overflow-y: auto;
            flex: 0 0 auto;
            min-height: 120px;
            max-height: 280px;
            padding: 2px 0;
        }
        .tls-history-list::-webkit-scrollbar { width: 6px; }
        .tls-history-list::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 999px; }
        .tls-history-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
        .tls-history-list::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
        .tls-history-list::-webkit-scrollbar-button { display: block; height: 6px; }
        .tls-del-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: #cbd5e1;
            font-size: 13px;
            padding: 2px 4px;
            border-radius: 4px;
            line-height: 1;
            flex-shrink: 0;
            transition: color .15s, background .15s;
        }
        .tls-del-btn:hover { color: #ef4444; background: #fef2f2; }
        .tls-history-empty {
            font-size: 10px;
            color: #94a3b8;
            text-align: center;
            padding: 16px 8px;
            font-style: italic;
        }
        .tls-history-row {
            display: grid;
            grid-template-columns: 32px 1fr auto auto;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            border-bottom: 1px solid #f1f5f9;
            list-style: none;
            margin: 0;
        }
        .tls-history-time {
            font-size: 9px;
            font-weight: 900;
            color: #64748b;
            font-family: monospace;
            line-height: 1.2;
            text-align: center;
        }
        .tls-history-half {
            font-size: 7px;
            font-weight: 700;
            color: #94a3b8;
            text-align: center;
        }
        .tls-history-type {
            font-size: 9px;
            font-weight: 900;
            color: #1e293b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .tls-history-player {
            font-size: 8px;
            font-weight: 700;
            color: #64748b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .tls-history-badge {
            font-size: 8px;
            font-weight: 900;
            padding: 2px 5px;
            border-radius: 4px;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .tls-hbadge-gol      { background:#dcfce7; color:#15803d; }
        .tls-hbadge-parada   { background:#ede9fe; color:#7c3aed; }
        .tls-hbadge-palo     { background:#fef3c7; color:#92400e; }
        .tls-hbadge-perdida  { background:#fee2e2; color:#dc2626; }
        .tls-hbadge-2min     { background:#fef3c7; color:#b45309; }
        .tls-hbadge-amarilla { background:#fef9c3; color:#854d0e; }
        .tls-hbadge-roja     { background:#fee2e2; color:#dc2626; }
        .tls-hbadge-azul     { background:#dbeafe; color:#1d4ed8; }
        .tls-hbadge-default  { background:#f1f5f9; color:#475569; }

        /* ── Columna central ── */
        #tls-center {
            display: flex;
            flex-direction: column;
            background: #fff;
            min-width: 0;
            overflow-y: visible;
            overflow-x: hidden;
            height: auto;
            max-height: calc(100vh - 48px);
        }
        #tls-center::-webkit-scrollbar { width: 6px; }
        #tls-center::-webkit-scrollbar-track { background: #f1f5f9; }
        #tls-center::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
        #tls-center::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
        /* Scorebug / marcador */
        #tls-scorebug {
            background: linear-gradient(135deg, #0a1628 0%, #082846 100%);
            padding: 10px 20px 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            border-bottom: 2px solid rgba(255,255,255,.1);
            position: relative;
        }
        .tls-score-side {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 50px;
        }
        .tls-score-side-name {
            font-size: 8px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .08em;
            color: rgba(255,255,255,.5);
        }
        .tls-score-num {
            font-size: 42px;
            font-weight: 900;
            color: #fff;
            line-height: 1;
            font-family: monospace;
        }
        .tls-score-center {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }
        .tls-score-sep {
            font-size: 32px;
            font-weight: 900;
            color: rgba(255,255,255,.4);
            line-height: 1;
        }
        #tls-match-status {
            font-size: 8px;
            font-weight: 900;
            letter-spacing: .15em;
            text-transform: uppercase;
            color: #22c55e;
        }
        #tls-play-btn {
            width: 36px; height: 36px;
            border-radius: 50%;
            background: rgba(255,255,255,.15);
            border: 2px solid rgba(255,255,255,.3);
            color: #fff;
            font-size: 14px;
            cursor: pointer;

        /* ── Indicador de situación numérica ────────────────── */
        .tls-suspension-badge {
            position: absolute;
            bottom: -14px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 3px 10px 3px 8px;
            border-radius: 20px;
            font-size: 10px;
            font-weight: 900;
            letter-spacing: .06em;
            text-transform: uppercase;
            white-space: nowrap;
            box-shadow: 0 2px 8px rgba(0,0,0,.35);
            z-index: 10;
        }
        /* Situación de igualdad numérica con suspensiones activas */
        .tls-susp-equal {
            background: rgba(30,41,59,.95);
            border: 1px solid rgba(148,163,184,.3);
            color: rgba(255,255,255,.7);
        }
        /* Local en superioridad (visitante tiene más suspensiones) */
        .tls-susp-home-sup {
            background: linear-gradient(135deg, rgba(8,40,70,.97), rgba(29,78,216,.85));
            border: 1px solid rgba(59,130,246,.5);
        }
        .tls-susp-home-sup .tls-susp-home { color: #93c5fd; }
        .tls-susp-home-sup .tls-susp-away { color: #fca5a5; }
        .tls-susp-home-sup .tls-susp-arrow { color: #3b82f6; font-size: 9px; }
        /* Visitante en superioridad (local tiene más suspensiones) */
        .tls-susp-away-sup {
            background: linear-gradient(135deg, rgba(107,0,0,.97), rgba(185,28,28,.85));
            border: 1px solid rgba(248,113,113,.4);
        }
        .tls-susp-away-sup .tls-susp-home { color: #fca5a5; }
        .tls-susp-away-sup .tls-susp-away { color: #fca5a5; }
        .tls-susp-away-sup .tls-susp-arrow { color: #ef4444; font-size: 9px; }
        /* Elementos internos comunes */
        .tls-susp-icon  { font-size: 9px; opacity: .8; }
        .tls-susp-sep   { color: rgba(255,255,255,.3); font-weight: 400; }
        .tls-susp-home,
        .tls-susp-away  { font-weight: 900; }
        .tls-susp-eq    { color: rgba(255,255,255,.6); font-weight: 700; }
            display: flex; align-items: center; justify-content: center;
            transition: background .1s;
        }
        #tls-play-btn:hover { background: rgba(255,255,255,.28); }

        /* Deshacer strip */
        #tls-undo-strip {
            background: #fff3cd;
            border-bottom: 1px solid #fde68a;
            padding: 5px 12px;
            display: none;
            align-items: center;
            justify-content: space-between;
            font-size: 11px;
            font-weight: 700;
            color: #92400e;
        }
        #tls-undo-strip button {
            background: #f59e0b;
            border: none;
            border-radius: 5px;
            color: #fff;
            padding: 3px 10px;
            font-size: 10px;
            font-weight: 900;
            cursor: pointer;
        }

        /* Fases */
        .tls-action-block {
            padding: 7px 14px;
            border-bottom: 1px solid #f1f5f9;
        }
        .tls-action-hdr {
            font-size: 8px;
            font-weight: 900;
            letter-spacing: .12em;
            text-transform: uppercase;
            color: #94a3b8;
            margin-bottom: 5px;
        }
        .tls-phases-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
        }
        .tls-phase-btn {
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 7px 4px;
            font-size: 9px;
            font-weight: 900;
            color: #475569;
            cursor: pointer;
            text-align: center;
            letter-spacing: .03em;
            transition: background .1s, color .1s;
        }
        .tls-phase-btn:hover { background: #dbeafe; color: #1d4ed8; }
        .tls-phase-btn.active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }

        /* Resultado */
        .tls-result-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 5px;
        }
        .tls-result-btn {
            border: none;
            border-radius: 8px;
            padding: 10px 4px;
            font-size: 10px;
            font-weight: 900;
            cursor: pointer;
            text-align: center;
            letter-spacing: .04em;
            transition: filter .1s, transform .1s;
        }
        .tls-result-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
        .tls-rb-gol { background: #16a34a; color: #fff; }
        .tls-rb-parada { background: #7c3aed; color: #fff; }
        .tls-rb-palo { background: #92400e; color: #fff; }
        .tls-rb-perdida { background: #b91c1c; color: #fff; }

        /* Acciones secundarias */
        .tls-actions-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 4px;
        }
        .tls-action-btn {
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 7px 3px;
            font-size: 8px;
            font-weight: 700;
            color: #475569;
            cursor: pointer;
            text-align: center;
            transition: background .1s;
        }
        .tls-action-btn:hover { background: #e2e8f0; }
        .tls-action-btn.disabled-btn { opacity: .35; cursor: default; }

        /* Suspensiones */
        .tls-sanctions-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 4px;
        }
        .tls-sancion-btn {
            border: none;
            border-radius: 6px;
            padding: 7px 3px;
            font-size: 9px;
            font-weight: 900;
            cursor: pointer;
            text-align: center;
            transition: filter .1s;
        }
        .tls-sancion-btn:hover { filter: brightness(1.1); }
        .tls-s-2min { background: #fef3c7; color: #b45309; }
        .tls-s-yellow { background: #fef08a; color: #92400e; }
        .tls-s-red { background: #fee2e2; color: #dc2626; }
        .tls-s-blue { background: #dbeafe; color: #1d4ed8; }

        /* Tabla stats inferior */
        #tls-stats-table-wrap {
            border-top: 2px solid #e2e8f0;
            background: #fff;
            flex: 1;
            overflow: auto;
        }
        #tls-stats-table-hdr {
            background: #0f172a;
            padding: 6px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        #tls-stats-table-hdr span {
            font-size: 8px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .12em;
            color: rgba(255,255,255,.5);
        }
        #tls-stats-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 11px;
        }
        #tls-stats-table thead th {
            padding: 5px 14px;
            font-size: 9px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .07em;
            border-bottom: 2px solid #e2e8f0;
        }
        #tls-stats-table thead th:first-child { color: #94a3b8; text-align: left; }
        #tls-stats-table thead .th-home { background: rgba(8,40,70,.07); color: #082846; text-align: center; }
        #tls-stats-table thead .th-away { background: rgba(107,0,0,.07); color: #7f1d1d; text-align: center; }
        #tls-stats-table tbody tr { border-bottom: 1px solid #f1f5f9; }
        #tls-stats-table tbody tr:hover { background: #f8fafc; }
        #tls-stats-table tbody td { padding: 5px 14px; }
        #tls-stats-table tbody td:first-child { color: #64748b; font-size: 10px; font-weight: 600; }
        #tls-stats-table .val-home { text-align: center; font-weight: 900; color: #082846; background: rgba(8,40,70,.04); }
        #tls-stats-table .val-away { text-align: center; font-weight: 900; color: #7f1d1d; background: rgba(107,0,0,.04); }

        /* Player indicator */
        #tls-player-indicator {
            background: #eff6ff;
            border-left: 4px solid #2563eb;
            border-radius: 4px;
            padding: 5px 10px;
            margin: 6px 14px;
            font-size: 10px;
            font-weight: 700;
            color: #1d4ed8;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        #tls-player-indicator.empty { color: #94a3b8; border-color: #cbd5e1; background: #f8fafc; }

        /* Undo btn */
        #tls-undo-btn-wrap {
            padding: 4px 10px;
            display: flex;
            justify-content: flex-end;
            border-top: 1px solid #f1f5f9;
        }
        #tls-undo-main-btn {
            background: #f1f5f9;
            border: none;
            border-radius: 5px;
            color: #64748b;
            padding: 5px 14px;
            font-size: 9px;
            font-weight: 900;
            cursor: pointer;
            display: none;
        }
        #tls-undo-main-btn:hover { background: #e2e8f0; }

        /* Cambio btn */
        #tls-cambio-btn {
            background: #0d9488;
            border: none;
            border-radius: 7px;
            color: #fff;
            padding: 8px;
            font-size: 10px;
            font-weight: 900;
            cursor: pointer;
            width: 100%;
            margin: 6px 0 0;
            transition: background .1s;
        }
        #tls-cambio-btn:hover { background: #0f766e; }

        @media (max-width: 900px) {
            #tls-main { grid-template-columns: minmax(150px, 180px) minmax(300px, 1fr) minmax(150px, 180px); }
        }
        @media (max-width: 680px) {
            #tls-main {
                grid-template-columns: 1fr 1fr;
                grid-template-areas:
                    "center center"
                    "home away";
                overflow: auto;
                align-items: start;
            }
            #tls-center { grid-area: center; min-height: 0; max-height: none; }
            #tls-home-col { grid-area: home; min-height: 520px; }
            #tls-away-col { grid-area: away; min-height: 520px; }
        }
        @media (max-width: 480px) {
            #tls-main {
                grid-template-columns: 1fr;
                grid-template-areas:
                    "center"
                    "home"
                    "away";
            }
        }

/* ====================================================================== */

/* Refinamiento visual de Videoanalisis */
main:has(#tab-live:not(.hidden)) {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
#tab-live:not(.hidden) {
    display: block;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
    background: #fff;
}
#tab-live.space-y-3 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0 !important;
}
main:has(#tab-live:not(.hidden)) #tab-live {
    min-height: 100dvh;
}
#tab-live > .grid.grid-cols-1 {
    min-height: auto;
    overflow: visible;
    align-items: start !important;
}
#tab-live > .grid.grid-cols-1 > div:nth-child(1),
#tab-live > .grid.grid-cols-1 > div:nth-child(2),
#tab-live > .grid.grid-cols-1 > div:nth-child(3) {
    min-height: 0;
    height: auto;
    overflow: visible;
}
#tab-live > .grid.grid-cols-1 > div:nth-child(1) > .bg-white,
#tab-live > .grid.grid-cols-1 > div:nth-child(3) > .bg-white {
    overflow: visible !important;
}
#tab-live #video-container,
#tab-live #video-wrapper {
    overflow: visible !important;
}
#tab-live #action-buttons {
    position: relative;
    z-index: 1;
}
#tab-live .bg-white:has(#event-log) {
    max-height: clamp(220px, 34vh, 380px);
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}
#tab-live #event-log {
    flex: 1 1 auto;
    min-height: 120px;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
#tab-live #event-log.live-event-table {
    max-height: none !important;
}
#tab-live .event-table-header {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-shrink: 0;
}
#tab-live #timer-bg {
    position: sticky;
    top: 0;
    z-index: 20;
}
#tab-live .video-speed-bar,
#tab-live .video-seek-bar {
    position: relative;
    z-index: 3;
}
#tab-live .defense-system-section,
#tab-live .offense-system-section {
    display: block !important;
}
#tab-live #timer-config-section {
    display: none !important;
}

/* Pulido UI Videoanalisis */
#tab-live {
    background: #eef3f8 !important;
}
#tab-live .video-speed-bar {
    min-height: 36px;
    border-bottom: 1px solid #cbd5e1 !important;
}
#tab-live .video-speed-bar .live-control-btn {
    min-height: 36px;
    font-size: 14px;
}
#tab-live #timer-bg {
    background: #0f1c2e !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
#tab-live #timer-bg > div:first-child {
    min-height: 44px;
    padding: 6px 14px !important;
    column-gap: 16px !important;
    row-gap: 4px !important;
    align-content: center;
}
#tab-live #timer-bg > div:last-child {
    height: 2px !important;
    min-height: 2px !important;
    padding: 0 !important;
}
#tab-live #timer-progress {
    height: 2px !important;
}
#tab-live #match-select {
    min-width: min(560px, 45vw);
    height: 34px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 7px;
    background: #1e3352;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

/* Estilo para el desplegable grande en Videoanálisis */
#tab-live #big-match-select {
    min-width: 0;
    width: clamp(150px, 34vw, 420px);
    max-width: 420px;
    flex: 1 1 auto;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 8px;
    background: #1e3352 !important;
    font-size: 15px;
    font-weight: 700;
    color: #fff !important;
    padding: 6px 10px;
    margin-left: 8px;
}
/* La barra del marcador nunca debe desbordar: si no entra en una fila, envuelve */
#tab-live #timer-bg > div:first-child {
    flex-wrap: wrap;
}
#tab-live #timer-bg > div:first-child > .flex-shrink-0 {
    flex-shrink: 1 !important;
    min-width: 0;
}
#tab-live #big-btn-config-lineup {
    height: 40px;
    border-radius: 8px !important;
    padding: 0 18px !important;
    margin-left: 6px;
    white-space: nowrap;
}
#tab-live #btn-config-lineup {
    height: 34px;
    border-radius: 7px !important;
    padding: 0 18px !important;
    font-size: 14px !important;
    white-space: nowrap;
}
#tab-live #half-badge {
    border-radius: 7px !important;
    padding: 5px 9px !important;
    font-size: 11px !important;
    background: rgba(255,255,255,0.10) !important;
    color: rgba(255,255,255,0.75) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
}
#tab-live #match-timer {
    font-size: 25px !important;
    color: #fff !important;
}
#tab-live #timer-btn,
#tab-live #timer-bg button {
    min-height: 30px;
    border-radius: 7px !important;
}
#tab-live #timer-duration-input {
    width: 48px !important;
    height: 30px;
    font-size: 13px;
}
#tab-live #video-tab-url,
#tab-live #video-tab-local {
    min-height: 30px;
    padding-inline: 14px !important;
}
#tab-live #video-bar-local label,
#tab-live #video-bar-url input,
#tab-live #video-bar-url button {
    min-height: 30px;
}
#tab-live #video-bar-local,
#tab-live #video-bar-url {
    min-width: 0;
}
#tab-live #video-container {
    background: #07111f !important;
    border-top: 12px solid #082846 !important;
}
#tab-live #video-wrapper {
    box-shadow: 0 10px 26px rgba(15, 23, 42, .20);
}
#tab-live .video-seek-bar {
    border-top: 1px solid rgba(255,255,255,.18) !important;
    border-bottom: 1px solid #d8dee8 !important;
}
#tab-live .video-seek-bar .live-control-btn {
    min-height: 34px;
    font-size: 12px;
}
#tab-live > .grid.grid-cols-1 {
    background: #eef3f8 !important;
    margin-top: 0 !important;
}
#tab-live > .grid.grid-cols-1 > div:nth-child(1),
#tab-live > .grid.grid-cols-1 > div:nth-child(3) {
    background: #f8fafc !important;
    padding-top: 0 !important;
}
#tab-live .team-hdr-block {
    min-height: 122px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#tab-live #home-team-name,
#tab-live #away-team-name {
    font-size: 12px !important;
    letter-spacing: .06em;
}
#tab-live #score-home,
#tab-live #score-away {
    font-size: 42px !important;
}
#tab-live .timeout-btn-home,
#tab-live .timeout-btn-away {
    min-height: 34px;
    font-size: 14px !important;
}
#tab-live .players-section-label {
    min-height: 32px;
    font-size: 10px !important;
    background: #fff !important;
}
#tab-live #home-players,
#tab-live #home-bench,
#tab-live #away-players,
#tab-live #away-bench,
#tab-live #home-goalkeeper,
#tab-live #away-goalkeeper {
    gap: 8px !important;
    padding: 8px 10px 10px !important;
}
#tab-live [id^="btn-player-"] {
    min-height: 92px;
    border-radius: 8px !important;
    box-shadow: 0 3px 7px rgba(15,23,42,.22), inset 0 -3px 0 rgba(0,0,0,.18);
}
#tab-live .player-pos-tag {
    font-size: 10px;
}
#tab-live .player-num {
    font-size: 34px;
}
#tab-live .player-name {
    font-size: 11px;
    letter-spacing: .02em;
}
#tab-live .player-stats {
    font-size: 9px;
}
#tab-live #action-buttons {
    border-top: 1px solid #d8dee8;
}
#tab-live .bg-white:has(#event-log) {
    margin: 12px;
    border-radius: 8px !important;
    border: 1px solid #d8dee8 !important;
    box-shadow: 0 4px 12px rgba(15,23,42,.08);
}

@media (max-width: 1280px) {
    #tab-live #timer-bg > div:first-child {
        padding: 6px 10px !important;
    }
    #tab-live #match-select {
        min-width: min(460px, 42vw);
    }
    #tab-live [id^="btn-player-"] {
        min-height: 78px;
    }
    #tab-live .player-num {
        font-size: 28px;
    }
}

@media (max-width: 1080px) {
    #tab-live > .grid.grid-cols-1 {
        align-items: start !important;
    }
    #tab-live .bg-white:has(#event-log) {
        max-height: 320px;
    }
}

@media (max-height: 760px) and (min-width: 1081px) {
    #tab-live .bg-white:has(#event-log) {
        max-height: 260px;
    }
}

/* Refinamiento visual de Estadisticas en Vivo */
#tab-live-stats:not(.hidden) {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    height: auto;
    background: #eef3f8;
    overflow-y: auto;
    overflow-x: hidden;
}
#tab-live-stats #tls-topbar {
    min-height: 52px;
    flex-wrap: wrap;
    row-gap: 6px;
    padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(2, 6, 23, .18);
    flex-shrink: 0;
}
#tab-live-stats #tls-topbar > div {
    min-width: 0;
}
#tab-live-stats #tls-match-select {
    width: min(300px, 42vw);
    max-width: 100%;
}
#tab-live-stats .tls-timer-box {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    padding: 3px 9px;
}
#tab-live-stats #tls-main {
    height: auto;
    max-height: none;
    min-height: calc(100dvh - 52px);
    border-top: 1px solid #d8e1eb;
    overflow: visible;
}
#tab-live-stats .tls-team-col {
    background: #f8fafc;
    height: auto;
    max-height: none;
    min-height: calc(100dvh - 52px);
}
#tab-live-stats .tls-team-hdr {
    min-height: 58px;
    padding: 9px 12px;
}
#tab-live-stats .tls-team-name {
    min-width: 0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#tab-live-stats .tls-timeouts {
    padding: 7px 9px;
    background: #fff;
}
#tab-live-stats .tls-players-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px 8px;
}
#tab-live-stats .tls-player-card {
    min-height: 64px;
    border-radius: 7px;
}
#tab-live-stats .tls-pc-name {
    font-size: 7px;
    letter-spacing: 0;
}
#tab-live-stats .tls-history-section {
    background: #fff;
    margin-top: 4px;
}
#tab-live-stats .tls-history-row {
    grid-template-columns: 38px minmax(0, 1fr) auto 22px;
    min-height: 38px;
}
#tab-live-stats #tls-center {
    max-height: none;
    height: auto;
    background: #fff;
    overflow: visible;
}
#tab-live-stats #tls-scorebug {
    min-height: 84px;
    padding: 12px 20px;
}
#tab-live-stats .tls-score-num {
    font-size: 48px;
}
#tab-live-stats #tls-player-indicator {
    margin: 0;
    min-height: 34px;
    font-size: 11px;
}
#tab-live-stats .tls-action-block {
    padding: 10px 14px;
}
#tab-live-stats .tls-action-hdr {
    font-size: 9px;
    margin-bottom: 7px;
}
#tab-live-stats .tls-phase-btn,
#tab-live-stats .tls-result-btn,
#tab-live-stats .tls-sancion-btn {
    min-height: 42px;
    line-height: 1.12;
    white-space: normal;
    overflow-wrap: anywhere;
}
#tab-live-stats button:disabled,
#tab-live-stats a[aria-disabled="true"] {
    opacity: .45;
    cursor: not-allowed;
    filter: grayscale(.15);
}
#tab-live-stats .tls-result-btn {
    font-size: 11px;
}
#tab-live-stats .tls-sanctions-grid,
#tab-live-stats .tls-result-grid {
    gap: 6px;
}
#tab-live-stats #tls-cambio-btn {
    min-height: 38px;
    font-size: 11px;
}
#tab-live-stats #tls-stats-table-wrap {
    flex: 1 1 auto;
    min-height: 210px;
    overflow: visible;
}
#tab-live-stats #tls-stats-table tbody td,
#tab-live-stats #tls-stats-table thead th {
    padding: 7px 14px;
}

@media (min-width: 1180px) {
    #tab-live-stats .tls-players-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    #tab-live-stats:not(.hidden) {
        height: auto;
        min-height: 100dvh;
        overflow: auto;
    }
    #tab-live-stats #tls-topbar {
        align-items: stretch;
    }
    #tab-live-stats #tls-topbar > div {
        width: 100%;
        justify-content: space-between;
    }
    #tab-live-stats #tls-match-select {
        width: 100%;
    }
    #tab-live-stats #tls-main {
        min-height: 0;
    }
    #tab-live-stats #tls-center {
        height: auto;
        border-bottom: 1px solid #d8dee8;
    }
    #tab-live-stats .tls-team-col {
        height: auto;
        max-height: none;
    }
    #tab-live-stats .tls-history-list {
        max-height: 260px;
    }
}

@media (max-width: 520px) {
    #tab-live-stats .tls-phases-grid,
    #tab-live-stats .tls-result-grid,
    #tab-live-stats .tls-sanctions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #tab-live-stats #tls-scorebug {
        gap: 8px;
        padding: 10px 12px;
    }
    #tab-live-stats .tls-score-num {
        font-size: 36px;
    }
    #tab-live-stats .tls-score-side {
        min-width: 0;
    }
}

/* ====================================================================== */

.mgmt-sub-tab { cursor: pointer; }
            .mgmt-player-row { transition: background 0.15s; }
            .mgmt-player-row:hover { background: #f0f7ff; }
            .mgmt-team-card { transition: box-shadow 0.15s; }
            .mgmt-team-card:hover { box-shadow: 0 2px 8px rgba(37,99,235,0.10); }

        /* ── Acción panel jerárquico ── */
        #tab-live #action-panel {
            background:#fff;
            border:1px solid #e2e8f0;
            border-radius:10px;
            overflow:hidden;
            box-shadow:0 2px 8px rgba(15,23,42,.06);
        }
        #tab-live .ap-section { border-top:1px solid #e8edf3; }
        #tab-live .ap-section:first-child { border-top:0; }
        #tab-live .ap-hdr {
            font-size:8px; font-weight:800; text-transform:uppercase;
            letter-spacing:.12em; color:#94a3b8; padding:5px 12px 2px; background:#f8fafc;
        }
        #tab-live .ap-grid-3 { display:grid; grid-template-columns:repeat(3,1fr); }
        #tab-live .ap-grid-4 { display:grid; grid-template-columns:repeat(4,1fr); }
        #tab-live .ap-grid-2 { display:grid; grid-template-columns:repeat(2,1fr); }
        #tab-live .ap-divx > * { border-right:1px solid #e8edf3; }
        #tab-live .ap-divx > *:last-child { border-right:0; }
        #tab-live .phase-btn {
            background:#fff; border:0; padding:9px 4px; font-size:9px; font-weight:800;
            text-transform:uppercase; letter-spacing:.06em; color:#64748b;
            cursor:pointer; transition:background .1s,color .1s; text-align:center; width:100%;
        }
        #tab-live .phase-btn:hover { background:#f1f5f9; color:#1e293b; }
        #tab-live .phase-btn.phase-active { background:#1d4ed8; color:#fff; }
        #tab-live .result-btn {
            border:0; padding:13px 4px; font-size:11px; font-weight:900;
            text-transform:uppercase; letter-spacing:.05em; cursor:pointer;
            text-align:center; transition:filter .1s; width:100%;
        }
        #tab-live .result-btn:hover { filter:brightness(1.1); }
        #tab-live .rb-gol     { background:#16a34a; color:#fff; }
        #tab-live .rb-parada  { background:#92400e; color:#fff; }
        #tab-live .rb-palo    { background:#7c3aed; color:#fff; } /* Lanzamiento recibido */
        #tab-live .rb-perdida { background:#dc2626; color:#fff; }
        #tab-live .accion-btn {
            background:#fff; border:0; padding:10px 4px; font-size:9px; font-weight:800;
            text-transform:uppercase; letter-spacing:.06em; color:#0f766e;
            cursor:pointer; text-align:center; transition:background .1s,color .1s; width:100%;
        }
        #tab-live .accion-btn.accion-lg { font-size:11px; padding:15px 4px; }
        #tab-live .accion-btn:hover { background:#f0fdf4; color:#065f46; }
        #tab-live .sancion-btn {
            background:#fff; border:0; padding:10px 4px; font-size:10px; font-weight:900;
            text-transform:uppercase; letter-spacing:.05em; cursor:pointer;
            text-align:center; transition:filter .1s; width:100%;
        }
        #tab-live .sancion-btn:hover { filter:brightness(.93); }
        #tab-live .s-2min   { color:#d97706; background:#fffbeb; }
        #tab-live .s-yellow { color:#854d0e; background:#fef9c3; }
        #tab-live .s-red    { color:#dc2626; background:#fef2f2; }
        #tab-live .s-blue   { color:#1d4ed8; background:#eff6ff; }
        #tab-live #btn-replay-video {
            width:100%; border:2px solid #cbd5e1; border-radius:7px; background:#fff;
            color:#64748b; font-size:11px; font-weight:800; letter-spacing:.06em;
            padding:8px; cursor:pointer; display:flex; align-items:center;
            justify-content:center; gap:6px; transition:border-color .12s,color .12s,background .12s;
        }
        #tab-live #btn-replay-video:hover { border-color:#2563eb; color:#2563eb; }
        #tab-live #btn-replay-video.clip-marked { border-color:#16a34a; color:#15803d; background:#f0fdf4; }
        #tab-live #clip-info-strip {
            font-size:9px; font-weight:700; color:#15803d; background:#dcfce7;
            border-radius:5px; padding:4px 10px; margin-top:4px;
            display:flex; align-items:center; justify-content:space-between; gap:6px;
        }

        /* ═══ VIDEOANÁLISIS: indicador de jugadora seleccionada ═══ */
        /* Indicador de jugadora seleccionada en el panel de acciones */
        #stats-player-indicator {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: #f1f5f9;
            border-bottom: 2px solid #e2e8f0;
            min-height: 38px;
        }
        #stats-player-indicator .spi-empty {
            font-size: 10px;
            font-weight: 700;
            color: #94a3b8;
            font-style: italic;
            flex: 1;
        }
        #stats-player-indicator .spi-name {
            font-size: 12px;
            font-weight: 900;
            color: #1e293b;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        #stats-player-indicator .spi-team {
            font-size: 9px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: .06em;
            padding: 2px 6px;
            border-radius: 4px;
            flex-shrink: 0;
        }
        #stats-player-indicator .spi-team.home { background:#dbeafe; color:#1d4ed8; }
        #stats-player-indicator .spi-team.away { background:#fee2e2; color:#b91c1c; }
        #stats-player-indicator .spi-desel {
            background: none; border: none; cursor: pointer;
            color: #94a3b8; font-size: 16px; padding: 0 2px;
            line-height:1; flex-shrink:0;
        }
        #stats-player-indicator .spi-desel:hover { color: #ef4444; }
        /* Indicador de jugadora: oculto por defecto, JS lo muestra al seleccionar */
        #stats-player-indicator { display: none; }
        /* Botones más grandes en stats mode (mantenido por compatibilidad con JS que agrega stats-mode) */
        .stats-mode .result-btn  { padding: 18px 4px !important; font-size: 13px !important; }
        .stats-mode .phase-btn   { padding: 12px 4px !important; font-size: 10px !important; }
        .stats-mode .sancion-btn { padding: 14px 4px !important; font-size: 11px !important; }
        .stats-mode .accion-btn  { padding: 13px 4px !important; font-size: 10px !important; }

        /* Mini tabla de estadísticas — visible siempre en Videoanálisis */
        #stats-table-panel { display: block; }
        #stats-live-table {
            width: 100%; border-collapse: collapse; font-size: 11px;
        }
        #stats-live-table thead th {
            background: #0f172a; color: #fff;
            font-size: 9px; font-weight: 800;
            text-transform: uppercase; letter-spacing: .1em;
            padding: 7px 10px; text-align: right;
        }
        #stats-live-table thead th:first-child { text-align: left; }
        #stats-live-table thead th.th-home { color: #93c5fd; }
        #stats-live-table thead th.th-away { color: #fca5a5; }
        #stats-live-table tbody td {
            padding: 6px 10px; font-weight: 700;
            text-align: right; color: #1e293b;
            border-bottom: 1px solid #f1f5f9;
        }
        #stats-live-table tbody td:first-child {
            text-align: left; color: #64748b;
            font-size: 9px; font-weight: 800;
            text-transform: uppercase; letter-spacing: .06em;
        }
        #stats-live-table tbody tr:last-child td { border-bottom: 0; }
        #stats-live-table tbody tr:nth-child(even) td { background: #f8fafc; }
        #stats-live-table .val-home { color: #1d4ed8; font-weight: 900; }
        #stats-live-table .val-away { color: #b91c1c; font-weight: 900; }

/* ====================================================================== */

.sidebar-btn.active {
            background-color: rgba(255,255,255,0.18);
            font-weight: 700;
        }

/* ====================================================================== */

.vam-phase-btn {
        background:rgba(255,255,255,.08);color:#94a3b8;border:1px solid rgba(255,255,255,.1);
        border-radius:7px;padding:8px 4px;font-size:10px;font-weight:900;cursor:pointer;
        text-align:center;letter-spacing:.04em;transition:background .1s;
    }
    .vam-phase-btn:hover { background:rgba(255,255,255,.16);color:#fff; }
    .vam-phase-btn.vam-phase-active { background:#1d4ed8;color:#fff;border-color:#3b82f6; }
/* ── Sistema Defensivo en columnas TLS ── */
.tls-def-section {
    padding: 8px 10px 6px;
    background: #f0f4f8;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2px;
}
.tls-def-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #94a3b8;
    margin: 0 0 5px 0;
}
.tls-def-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
}
.tls-def-radio {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    padding: 4px 7px;
    border-radius: 5px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    transition: background .1s, border-color .1s;
    white-space: nowrap;
}
.tls-def-radio:has(input:checked) {
    background: #1e3a8a;
    border-color: #1e3a8a;
    color: #fff;
}
.tls-def-radio input[type=radio] {
    accent-color: #3b82f6;
    width: 9px;
    height: 9px;
    flex-shrink: 0;
}

/* ── Asegurar visibilidad del sistema defensivo en Videoanálisis ── */
#tab-live .bg-white.overflow-hidden {
    overflow: visible !important;
}
#tab-live .defense-system-section {
    display: block !important;
    visibility: visible !important;
}
#tab-live .offense-system-section {
    display: block !important;
    visibility: visible !important;
}
        /* ══════════════════════════════════════════════
           COMPARATIVA — Panel estilo ESPN/Sofascore
           ══════════════════════════════════════════════ */
        .comp-container { max-width: 640px; margin: 0 auto; padding: 4px 0 16px; }

        .comp-matchup-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            padding: 14px 16px;
            background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
            border-radius: 12px;
            box-shadow: 0 2px 12px rgba(0,0,0,.12);
        }
        .comp-team-name {
            font-size: 12px;
            font-weight: 900;
            letter-spacing: .01em;
            max-width: 140px;
            line-height: 1.2;
        }
        .comp-team-name.comp-home { color: #60a5fa; text-align: left; }
        .comp-team-name.comp-away { color: #f87171; text-align: right; }
        .comp-score-box { display: flex; align-items: center; gap: 8px; }
        .comp-score-num { font-size: 28px; font-weight: 900; color: #fff; line-height: 1; }
        .comp-score-sep { font-size: 18px; color: rgba(255,255,255,.4); }

        .comp-section-title {
            font-size: 9.5px;
            font-weight: 900;
            color: #94a3b8;
            letter-spacing: .1em;
            text-transform: uppercase;
            padding: 14px 0 6px;
            border-bottom: 1px solid #e2e8f0;
            margin-bottom: 8px;
        }

        .comp-stat-row { margin-bottom: 8px; }
        .comp-stat-label {
            text-align: center;
            font-size: 10px;
            color: #64748b;
            font-weight: 600;
            margin-bottom: 3px;
            letter-spacing: .02em;
        }
        .comp-bar-wrap {
            display: flex;
            align-items: center;
            gap: 8px;
            height: 26px;
        }
        .comp-val-home {
            width: 36px;
            text-align: right;
            font-size: 13px;
            font-weight: 900;
            flex-shrink: 0;
        }
        .comp-val-away {
            width: 36px;
            text-align: left;
            font-size: 13px;
            font-weight: 900;
            flex-shrink: 0;
        }
        .comp-bars { flex: 1; display: flex; height: 18px; gap: 0; }
        .comp-track-home {
            flex: 1;
            display: flex;
            justify-content: flex-end;
            background: #f1f5f9;
            border-radius: 4px 0 0 4px;
            overflow: hidden;
        }
        .comp-track-away {
            flex: 1;
            display: flex;
            justify-content: flex-start;
            background: #f1f5f9;
            border-radius: 0 4px 4px 0;
            overflow: hidden;
        }
        .comp-fill-home {
            height: 100%;
            border-radius: 4px 0 0 4px;
            transition: width .6s cubic-bezier(.4,0,.2,1);
        }
        .comp-fill-away {
            height: 100%;
            border-radius: 0 4px 4px 0;
            transition: width .6s cubic-bezier(.4,0,.2,1);
        }
        .comp-divider {
            width: 2px;
            background: #cbd5e1;
            flex-shrink: 0;
            align-self: stretch;
        }

        /* ══════════════════════════════════════════════
           DASHBOARD — Tab stats modal
           ══════════════════════════════════════════════ */
        .dash-section { margin-bottom: 20px; }
        .dash-section-title {
            font-size: 10px;
            font-weight: 900;
            color: #1e3a8a;
            text-transform: uppercase;
            letter-spacing: .08em;
            padding: 5px 10px 4px;
            border-left: 4px solid #1d4ed8;
            background: #e8f0fe;
            margin-bottom: 8px;
            border-radius: 0 4px 4px 0;
        }
        .dash-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid #e2e8f0; }
        .dash-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 11px;
        }
        .dash-table thead th {
            background: #1e3a5f;
            color: #fff;
            padding: 6px 8px;
            text-align: center;
            font-size: 9px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .04em;
            white-space: nowrap;
        }
        .dash-table thead th:first-child { text-align: left; padding-left: 10px; }
        .dash-table tbody td { border-bottom: 1px solid #f1f5f9; font-size: 11px; }
        .dash-table tbody tr:last-child td { border-bottom: none; }
        .dash-table tbody tr:hover td { background: #f8fafc; }

        /* KPI grid */
        .dash-kpi-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 8px;
        }
        .dash-kpi {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 8px 10px;
            text-align: center;
        }
        .dash-kpi-label {
            font-size: 8.5px;
            font-weight: 700;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: .04em;
            margin-bottom: 4px;
        }
        .dash-kpi-val {
            font-size: 20px;
            font-weight: 900;
            color: #1e293b;
            line-height: 1;
        }
        /* Aviso "sin arquera" — parpadeo sutil para que se note en vivo */
        .situation-7v6-note {
            margin-top: 4px;
            font-size: 9px;
            font-weight: 800;
            color: #f97316;
            text-align: center;
        }
        #home-7v6-badge, #away-7v6-badge, #tls-home-7v6-badge, #tls-away-7v6-badge {
            animation: pulse-7v6 1.6s ease-in-out infinite;
        }
        @keyframes pulse-7v6 {
            0%, 100% { opacity: 1; }
            50%      { opacity: .45; }
        }

/* ══════════════════════════════════════════════════════════════════════════════ */
/*  DASHBOARD — identidad visual alineada con el perfil de jugador (Bebas Neue +   */
/*  DM Sans, paleta navy/naranja, hero tipo "marcador"). Todo escopeado a          */
/*  #tab-dashboard con clases dash-* para no interferir con Videoanálisis / TLS.   */
/* ══════════════════════════════════════════════════════════════════════════════ */
#tab-dashboard {
    --db-brand:   #0f2235;
    --db-brand2:  #1e3a5f;
    --db-accent:  #e85d04;
    --db-accent2: #f97316;
    --db-blue:    #1d4ed8;
    --db-blue2:   #3b82f6;
    --db-border:  #e2e8f0;
    --db-muted:   #64748b;
    --db-light:   #94a3b8;
    --db-green:   #10b981;
    --db-yellow:  #f59e0b;
    font-family: 'DM Sans', sans-serif;
}

.dash-eyebrow {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--db-light);
}
.dash-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.45rem;
    letter-spacing: .5px;
    color: var(--db-brand2);
    line-height: 1.1;
    margin-top: 1px;
}

/* ── Hero / marcador de temporada ── */
.dash-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--db-brand) 0%, var(--db-brand2) 55%, #0d2241 100%);
    padding: 1.6rem 1.75rem 1.4rem;
    box-shadow: 0 12px 34px rgba(15,23,42,.28);
}
.dash-hero::before { /* líneas de cancha, muy sutiles, como una gráfica de transmisión */
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(ellipse at 26% 15%, #000 0%, transparent 62%);
            mask-image: radial-gradient(ellipse at 26% 15%, #000 0%, transparent 62%);
    pointer-events: none;
}
.dash-hero::after {
    content: '';
    position: absolute;
    top: -70px; right: -70px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,93,4,.22), transparent 70%);
    pointer-events: none;
}
.dash-hero-top {
    position: relative; z-index: 1;
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 1.15rem; flex-wrap: wrap; gap: .5rem;
}
.dash-hero-eyebrow { color: rgba(255,255,255,.48); }
.dash-hero-heading {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.65rem; letter-spacing: .5px; color: #fff; line-height: 1;
}
.dash-scoreboard {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.dash-score-cell {
    padding: 0 1.1rem;
    border-left: 1px solid rgba(255,255,255,.12);
}
.dash-score-cell:first-child { border-left: none; padding-left: 0; }
.dash-score-value {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.5rem;
    line-height: 1;
    letter-spacing: .5px;
    color: #fff;
}
.dash-score-label {
    margin-top: 6px;
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .1em; color: rgba(255,255,255,.46);
    display: flex; align-items: center; gap: 5px;
}
.dash-score-icon { font-size: 12px; filter: saturate(1.3); }

@media (max-width: 640px) {
    .dash-scoreboard { grid-template-columns: repeat(2, 1fr); row-gap: 1.1rem; }
    .dash-score-cell:nth-child(3) { border-left: none; }
}

/* ── Encabezados de sección ── */
.dash-section-head { display: flex; align-items: center; gap: 10px; }
.dash-section-icon {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
    background: rgba(29,78,216,.10);
}
.dash-section-icon.accent { background: rgba(232,93,4,.12); }
.dash-section-icon.green  { background: rgba(16,185,129,.12); }
.dash-section-icon.indigo { background: rgba(99,102,241,.12); }

/* ── Podio de goleadores ── */
.dash-rank-chip {
    width: 26px; height: 26px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Bebas Neue', cursive; font-size: 14px;
    flex-shrink: 0; color: #fff;
    background: var(--db-light);
}
.dash-rank-chip.r1 { background: linear-gradient(135deg, var(--db-accent), var(--db-accent2)); }
.dash-rank-chip.r2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #334155; }
.dash-rank-chip.r3 { background: linear-gradient(135deg, #b45309, #d97706); }

/* ── Barras de progreso ── */
.dash-track { background: #f1f5f9; border-radius: 999px; height: 8px; overflow: hidden; }
.dash-fill  { height: 100%; border-radius: 999px; transition: width .8s cubic-bezier(.16,1,.3,1); }

/* ── Cards de porteras ── */
.dash-gk-card {
    position: relative; overflow: hidden;
    background: #f8fafc; border: 1px solid var(--db-border); border-radius: 16px;
    padding: 1rem; transition: transform .15s, box-shadow .15s;
}
.dash-gk-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.08); }


/* ══════════════════════════════════════════════════════════════════════════════ */
/*  VIDEOANÁLISIS — Línea de tiempo del partido + eventos con color por tipo       */
/*  (estilo "broadcast": panel oscuro, línea fina, dots con ícono adentro)         */
/* ══════════════════════════════════════════════════════════════════════════════ */
.tl-filter-select {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    outline: none;
    border-radius: 6px;
    background: #1e3352;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.15);
}
.tl-filter-select:focus { border-color: #60a5fa; }

#match-timeline-track {
    position: relative;
    height: 46px;
}
/* Línea fina central, como en un gráfico de transmisión */
#match-timeline-track::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.12);
    transform: translateY(-50%);
    border-radius: 2px;
}
.tl-dot {
    position: absolute;
    width: 13px; height: 13px;
    border-radius: 50%;
    border: 2px solid #0f1c2e;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15), 0 1px 4px rgba(0,0,0,.5);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform .12s;
    z-index: 1;
}
.tl-dot:hover { transform: translate(-50%, -50%) scale(1.7); z-index: 5; }
.tl-empty-note {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    height: 46px; color: rgba(255,255,255,0.3); font-size: 11px; font-style: italic;
}

.tl-legend-item {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10px; font-weight: 700;
    color: rgba(255,255,255,0.45);
    letter-spacing: .02em;
}
.tl-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* Puntito de color por tipo de evento en el log lateral */
.ev-type-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    margin-right: 4px; flex-shrink: 0; vertical-align: middle;
}

/* La línea de tiempo ahora es una fila de ancho completo debajo de las 3
   columnas (ya no vive apretada en la columna angosta del visitante), así que
   normalmente no hace falta scroll horizontal en desktop. min-width se deja
   como piso solo para pantallas muy angostas (celulares en vertical). */
#match-timeline-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
#match-timeline-inner {
    min-width: 420px;
}
#match-timeline-scroll::-webkit-scrollbar { height: 5px; }
#match-timeline-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }

/* ====================================================================== */
/* Responsive: correcciones móviles (revisión 2026-11)                    */
/* ====================================================================== */

/* Menú flotante de acciones del video: nunca más ancho/alto que la pantalla
   (antes tenía min-width:360px fijo y se salía en Android de 360-412px). */
#video-action-menu > div {
    min-width: min(360px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    overflow-y: auto !important;
}

/* Mini tabla de stats en vivo: scroll horizontal en vez de cortar columnas */
#stats-table-panel { overflow-x: auto !important; }

@media (max-width: 760px) {
    /* Barra del cronómetro: antes era una sola fila sin wrap dentro de un
       contenedor overflow-hidden, y los botones Iniciar / ↺ / ⏭ quedaban
       cortados fuera de pantalla. Ahora las secciones bajan de línea. */
    #timer-bg > div:first-child {
        flex-wrap: wrap;
        row-gap: 6px;
        padding: 6px 0;
    }
    #timer-bg > div:first-child > div {
        border-left: 0 !important;
        border-right: 0 !important;
    }
    /* Sección partido: ocupa toda la fila, el select se achica */
    #timer-bg > div:first-child > div:first-child {
        flex: 1 1 100%;
        flex-shrink: 1 !important;
        min-width: 0;
    }
    #big-match-select {
        min-width: 0 !important;
        flex: 1 1 auto;
        width: 100%;
    }
    /* Cronómetro y botones comparten la segunda fila */
    #timer-bg > div:first-child > div:nth-child(2) {
        flex: 1 1 auto;
        justify-content: flex-start;
        padding-left: 12px;
    }
    #timer-config-section {
        flex: 1 1 100%;
        flex-wrap: wrap;
        order: 3;
    }
    /* Fila de video: permitir wrap y que el input use el ancho disponible */
    #timer-bg > div:nth-child(2) {
        flex-wrap: wrap;
    }
    #video-bar-url {
        flex: 1 1 160px;
        min-width: 0;
    }
}


/* ══════════════════════════════════════════════════════════════════════ */
/*  Sistema visual HandballNext (rediseño 2026-11)                          */
/*  Misma identidad que el login: azul noche + acento naranja + DM Sans.  */
/* ══════════════════════════════════════════════════════════════════════ */
:root {
    --hiq-navy-950: #0a1424;
    --hiq-navy-900: #0f1c2e;
    --hiq-navy-800: #142a47;
    --hiq-orange:   #f26b1d;
    --hiq-orange-2: #f59e0b;
    --hiq-muted:    #7d8ba3;
    --hiq-line:     rgba(255,255,255,.07);
}
body { font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }

/* ── Barra lateral ── */
#sidebar {
    background: linear-gradient(180deg, var(--hiq-navy-950) 0%, #0f2038 100%);
    border-right: 1px solid var(--hiq-line);
    box-shadow: 4px 0 24px rgba(2,8,23,.16);
}
.hiq-brand { border-bottom: 1px solid var(--hiq-line); }
.hiq-logo {  /* emblema (static/img/emblema-128.png) */
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: block;
    filter: drop-shadow(0 2px 6px rgba(37,99,235,.35));
}
.hiq-brand-name { font-size: 17px; font-weight: 900; letter-spacing: -.01em; line-height: 1.1; color: #fff; }
.hiq-brand-sub  { font-size: 10px; color: var(--hiq-muted); margin-top: 1px; }
.hiq-icon-btn { color: var(--hiq-muted); transition: background .15s, color .15s; }
.hiq-icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.hiq-nav-section {
    font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: #52627a; padding: 14px 12px 4px; white-space: nowrap;
}
#sidebar nav > .hiq-nav-section:first-child { padding-top: 0; }
#sidebar .sidebar-btn {
    position: relative; display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 9px 12px; border-radius: 10px; border: 0;
    background: transparent; color: #aab6c8; text-align: left; text-decoration: none;
    font-size: 13.5px; font-weight: 600; line-height: 1.2; cursor: pointer;
    transition: background .15s, color .15s;
}
#sidebar .sidebar-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
#sidebar .sidebar-btn.active,
#sidebar .sidebar-btn.bg-blue-600 { background: rgba(242,107,29,.14) !important; color: #fff; }
#sidebar .sidebar-btn.active::before,
#sidebar .sidebar-btn.bg-blue-600::before {
    content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--hiq-orange);
}
#sidebar .sidebar-btn.active .hiq-nav-icon,
#sidebar .sidebar-btn.bg-blue-600 .hiq-nav-icon { color: #fb923c; }
.hiq-nav-icon {
    width: 18px; height: 18px; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.hiq-live-dot {
    width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex-shrink: 0;
    background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18);
}
#sidebar .sidebar-label { white-space: nowrap; overflow: hidden; }
#sidebar-userbox { border-top: 1px solid var(--hiq-line); }
.hiq-avatar {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--hiq-orange), var(--hiq-orange-2));
}
.hiq-muted { color: var(--hiq-muted); }
#sidebar .hiq-logout { font-size: 12.5px; color: #8b97aa; }
#sidebar .hiq-logout:hover { color: #fca5a5; background: rgba(239,68,68,.08); }

/* Colapsada: sin títulos de sección; el activo se sigue viendo */
#sidebar.collapsed .hiq-nav-section { display: none; }
#sidebar.collapsed .sidebar-btn.active::before,
#sidebar.collapsed .sidebar-btn.bg-blue-600::before { left: -10px; }
#sidebar.collapsed #sidebar-user { justify-content: center; padding: 0; }

/* ── Celular: una franja compacta (marca + usuario arriba, menú deslizable abajo) ── */
@media (max-width: 760px) {
    #sidebar {
        flex-direction: row !important; flex-wrap: wrap; align-items: center;
        box-shadow: 0 4px 16px rgba(2,8,23,.25); border-right: 0;
    }
    #sidebar .hiq-brand { order: 1; flex: 1 1 auto; border-bottom: 0; min-height: 3.25rem !important; }
    #sidebar-userbox {
        order: 2; margin: 0; padding: 0 8px; border-top: 0;
        display: flex; align-items: center; gap: 2px;
    }
    #sidebar-user { margin: 0 !important; padding: 0 !important; }
    #sidebar-user .sidebar-label,
    #sidebar-userbox .hiq-logout .sidebar-label { display: none !important; }
    #sidebar .hiq-logout { width: auto !important; padding: 8px !important; }
    #sidebar nav {
        order: 3; flex: 1 1 100%; display: flex; gap: 4px; overflow-x: auto;
        padding: 6px 8px 8px !important; border-top: 1px solid var(--hiq-line);
        scrollbar-width: none;
    }
    #sidebar nav::-webkit-scrollbar { display: none; }
    #sidebar nav > * { margin-top: 0 !important; }
    #sidebar .hiq-nav-section { display: none; }
    #sidebar .sidebar-btn { width: auto !important; flex: 0 0 auto; padding: 8px 12px; font-size: 13px; }
    #sidebar .sidebar-btn.active::before,
    #sidebar .sidebar-btn.bg-blue-600::before { left: 12px; right: 12px; top: auto; bottom: 0; width: auto; height: 2px; border-radius: 2px; }
}
