/* style.css - Viva La Quiniela */
:root {
    --bg-color: #ffffff;
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    --card-bg: #ffffff;
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --neon-green: #00c853;
    --neon-green-dim: rgba(0, 200, 83, 0.2);
    --accent-green: #00c853;
    --accent-gold: #00c853;
    --accent-blue: #00c853;
    --danger: #ff4444;
    /* Usado por los botones de login/registro (index.php, login.php,
       register.php) — antes referenciaban una variable que no existía
       en ningún CSS. */
    --color-primary: #00c853;
    --color-primary-dark: #00a844;
    --btn-primary-text: #ffffff;
    --header-bg: linear-gradient(135deg, #1a472a 0%, #2d5a3f 100%);
    --header-text: #ffffff;
    --font-family: 'Segoe UI', system-ui, sans-serif;
    /* 1/X/2 (informativo: quién ganó), deliberadamente distinto del
       verde/rojo de acierto-fallo (.sg-dot/.sg-pick en seguimiento.css) —
       ver themes.css para las variantes de los temas oscuro/teletexto. */
    --signo-1: #1d4ed8;
    --signo-x: #a16207;
    --signo-2: #0e7490;
    --bar-1: #1d4ed8;
    --bar-x: #a16207;
    --bar-2: #0e7490;
    /* Chip de marcador (.q-scorechip): SIEMPRE un bloque oscuro con texto
       claro, no ligado al texto normal de la página (ver themes.css). */
    --chip-bg: #1a1a1a;
    --chip-text: #ffffff;
}

/* Los <button> no heredan color de texto por defecto en algunos
   navegadores — sin esto, un botón sin "color:" explícito se queda con
   el negro/blanco del sistema en vez del tono del tema activo. */
button {
    color: inherit;
    font: inherit;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #1a1a1a;
    border: none;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 50px;
    width: auto;
    background: #fff;
    padding: 5px;
    border-radius: 8px;
}

.logo-bonoloto {
    height: 40px;
    width: auto;
    margin-left: 0.5rem;
}

.logo-text h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.logo-text h1 span {
    color: var(--neon-green);
}

.last-draw {
    font-size: 0.8rem;
    color: #aaa;
}

.jackpot-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-action {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border: none;
    border-radius: 0.5rem;
    color: var(--btn-primary-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Variantes de .btn-action: antes se resolvían con color a mano por
   atributo style= en cada página (admin.php), ahora son clases del
   mismo sistema para que un botón "secundario"/"peligro"/"aviso" se vea
   igual en toda la sección Quiniela. */
.btn-action.btn-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.btn-action.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    box-shadow: none;
}

.btn-action.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c1272d);
}

.btn-action.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-action.btn-warn {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #1a1a1a;
}

.btn-action.btn-warn:hover {
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

/* Panel con aviso de gestión manual (mismo ámbar que .btn-warn/signo-X) */
.glass-panel-warn {
    border-left: 4px solid #ffc107;
}

/* Escrutinio Panel */
.escrutinio-panel {
    margin-bottom: 2rem;
}

.escrutinio-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.preset-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.custom-dates {
    display: flex;
    gap: 1rem;
}

/* Selector de cliente */
.cliente-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cliente-selector label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cliente-selector label i {
    color: var(--accent-blue);
}

.select-cliente {
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    color: #1a1a1a;
    font-size: 0.95rem;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-cliente:hover,
.select-cliente:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn-escrutar {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--accent-gold), #d97706);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-escrutar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-card:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-green);
}

.action-icon {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-green);
}

.card-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.card-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Results Section */
.results-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Lottery Balls */
.balls-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    justify-items: center;
    margin-bottom: 2rem;
}

.ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    background: #1a1a1a;
    border: 3px solid var(--neon-green);
    color: var(--neon-green);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
    position: relative;
}

.ball::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 20%;
    width: 30%;
    height: 20%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    filter: blur(2px);
}

.ball.comp {
    background: #333;
    border-color: #fff;
    color: #fff;
}

.ball.reintegro {
    background: var(--neon-green);
    border-color: var(--neon-green);
    color: #fff;
}

.extra-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Table */
.winners-table {
    width: 100%;
    border-collapse: collapse;
}

.winners-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.winners-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.winners-table tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
}

.badge.win {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.pending-text {
    color: var(--accent-gold) !important;
    font-style: italic;
}

.prize-amount {
    font-weight: 700;
    color: var(--accent-gold);
    font-family: monospace;
    font-size: 1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    flex-direction: column;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-green);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

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

.hidden {
    display: none;
}

/* Detalle cliente en tabla */
.cliente-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cliente-nombre {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.cliente-numeros {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.cliente-numeros .numeros {
    color: var(--accent-blue);
}

.cliente-numeros .reintegro-num {
    color: var(--accent-gold);
}

.cliente-numeros .importe-apuesta {
    color: #888;
}

.desglose-col {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 300px;
}

/* Grid de Sorteos */
.sorteos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.sorteo-card {
    background: #fff;
    border: 2px solid var(--neon-green);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sorteo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sorteo-fecha {
    font-weight: 700;
    font-size: 1.1rem;
}

.sorteo-bote {
    color: var(--accent-gold);
    font-weight: 600;
}

.sorteo-numeros {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.ball-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    background: #1a1a1a;
    border: 2px solid var(--neon-green);
    color: #fff;
}

.ball-mini.comp {
    background: #333;
    border-color: #fff;
    color: #fff;
}

.ball-mini.reint {
    background: var(--neon-green);
    border-color: var(--neon-green);
    color: #fff;
    font-size: 0.7rem;
}

.sorteo-premios {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.premio-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.premio-cat {
    flex: 2;
    color: #333;
}

.premio-ganadores {
    flex: 1;
    text-align: center;
    color: var(--neon-green);
    font-weight: 600;
}

.premio-importe {
    flex: 1;
    text-align: right;
    color: #1a1a1a;
    font-weight: 700;
}

.lugares-section {
    font-size: 0.8rem;
    color: #333;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid rgba(0, 200, 83, 0.2);
    border-radius: 0.5rem;
}

.lugares-section p {
    margin: 0.25rem 0;
    color: #1a1a1a;
}

.sorteo-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-small {
    padding: 0.5rem 1rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-small:hover {
    background: #2563eb;
}

.no-data {
    color: var(--text-secondary);
    font-style: italic;
}

/* Escrutinio Results */
.escrutinio-header-panel {
    margin-bottom: 1.5rem;
}

.escrutinio-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.escrutinio-summary h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.escrutinio-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.escrutinio-total {
    font-size: 1.1rem;
}

.escrutinio-total strong {
    color: var(--neon-green);
    font-size: 1.3rem;
}

.escrutinio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.escrutinio-card {
    padding: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.escrutinio-card.has-prize {
    border-left: 4px solid var(--neon-green);
}

.escrutinio-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.escrutinio-card-header .cliente-nombre {
    font-weight: 700;
    font-size: 1.1rem;
}

.cliente-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.cliente-total.ganador {
    color: var(--neon-green);
}

.cliente-apuesta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-family: monospace;
}

.cliente-apuesta .numeros {
    color: var(--text-primary);
}

.cliente-apuesta .reintegro {
    color: var(--neon-green);
}

.escrutinio-dias {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.escrutinio-dia {
    display: grid;
    grid-template-columns: 85px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.03);
}

.escrutinio-dia.dia-premio {
    background: rgba(0, 200, 83, 0.1);
}

.dia-fecha {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dia-desglose {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.dia-importe {
    font-weight: 700;
    font-size: 0.95rem;
    text-align: right;
}

.escrutinio-dia.dia-premio .dia-importe {
    color: var(--neon-green);
}

.escrutinio-dia.dia-sin-premio .dia-importe {
    color: var(--text-secondary);
}

/* Date Selector Panel */
.date-selector-panel {
    margin-bottom: 1.5rem;
}

.date-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.date-input-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.date-input {
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    color: #1a1a1a;
    font-size: 1rem;
    min-width: 160px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-input:hover,
.date-input:focus {
    border-color: var(--neon-green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.2);
}

.date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.date-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-preset {
    padding: 0.6rem 1rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
    color: var(--accent-blue);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-preset:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

.btn-preset.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .date-selector-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .date-input {
        width: 100%;
    }

    .date-presets {
        justify-content: center;
    }
}

/* ============================================
   LA QUINIELA - ESTILOS ESPECÍFICOS
   ============================================ */

/* Header Quiniela */
.header-quiniela {
    background: var(--header-bg);
}

/* Menú de diseño (Blanco/Oscuro/Teletexto) — ver theme-switcher.js */
.theme-switcher {
    display: flex;
    gap: 0.4rem;
}

.theme-btn {
    flex: 1;
    font: inherit;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.5rem;
    border: 1.5px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.theme-btn.active {
    border-color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    background: var(--text-primary);
    color: var(--card-bg);
}

.logo-quiniela {
    height: 40px;
    width: auto;
    margin-left: 0.5rem;
    border-radius: 4px;
}

/* Grid de Jornadas */
.jornadas-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Card de Jornada histórica: ver .jh-* en quiniela_table.css */

/* Selector de Jornada */
.jornada-selector-container {
    padding: 0.5rem 0;
}

.select-jornada {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    color: #1a1a1a;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-jornada:hover,
.select-jornada:focus {
    border-color: #1a472a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 71, 42, 0.2);
}

/* Responsive Quiniela */
@media (max-width: 768px) {
    .signo-badge {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

/* Premios sin ganadores o sin premio: ver .jh-sin-ganadores/.jh-sin-premio
   en quiniela_table.css (el .premio-row de aquí es el del componente de
   Sorteos, no el histórico de Quiniela) */

/* Escrutinio Quiniela - Selector específico */
.escrutinio-quiniela {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.selector-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.selector-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selector-group label i {
    color: #1a472a;
}

.selector-group.separador {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

.o-text {
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
    padding-top: 1.5rem;
}

.select-temporada {
    padding: 0.6rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    color: #1a1a1a;
    font-size: 0.95rem;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-temporada:hover,
.select-temporada:focus {
    border-color: #1a472a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 71, 42, 0.2);
}

/* Responsive para escrutinio quiniela */
@media (max-width: 768px) {
    .escrutinio-quiniela {
        flex-direction: column;
        align-items: stretch;
    }

    .selector-group.separador {
        display: none;
    }

    .select-temporada,
    .select-jornada {
        width: 100%;
    }
}

/* ========================================
   JORNADA ACTUAL
   ======================================== */

.jornada-actual-section {
    margin-bottom: 2rem;
}

/* Pestañas de navegación (Jornada Actual / Resultados Anteriores) */
.tabs-nav {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--glass-border);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

@media (max-width: 600px) {
    .tabs-nav {
        gap: 0.1rem;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
        text-align: center;
    }
}

.jornada-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.jornada-badge,
.temporada-badge,
.fecha-badge {
    padding: 0.4rem 0.85rem;
    border-radius: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.jornada-badge {
    background: linear-gradient(135deg, var(--neon-green), #059669);
    color: white;
}

.temporada-badge {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.fecha-badge {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Tabla de Partidos: el contenido interno ahora es .qrows/.qrow (ver
   quiniela_table.css), este contenedor solo aporta el scroll horizontal. */
.partidos-tabla-container {
    overflow-x: auto;
}

/* Responsive */
@media (max-width: 768px) {
    /* Antes forzaba flex-direction:column: cada badge (En Juego, Jornada
       2, 2026-2027, 0/15 finalizados...) en su propia línea, centrado,
       cuando #jornada-actual-info (quiniela_table.css, gana por ser un
       selector de ID) ya trae flex-wrap:wrap — solo hacía falta dejarlo
       fluir en fila y que envuelva según el ancho disponible. */
    .jornada-info {
        gap: 0.5rem;
    }

    .jornada-badge,
    .temporada-badge,
    .fecha-badge {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
}



/* =============================================
   MOBILE RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
    }

    .glass-panel {
        padding: 0.85rem;
    }

    /* Antes: flex-direction:column forzaba logo+botones apilados y
       centrados a tamaño completo (padding 1rem 2rem, título a 1.5rem que
       encima envolvía a 2 líneas) — la cabecera entera podía ocupar el
       40% de la pantalla en un móvil normal. Ahora es una barra compacta:
       fila única mientras quepa, y solo pasa a envolver si hay muchos
       botones (vista de admin con Panel Admin/Mis Apuestas/Salir). */
    header {
        flex-wrap: wrap;
        padding: 0.6rem 0.9rem;
        gap: 0.5rem 0.75rem;
        border-radius: 0.75rem;
    }

    .logo {
        gap: 0.6rem;
    }

    .logo-img,
    .logo-quiniela,
    .logo-bonoloto {
        height: 28px;
    }

    .logo-text h1 {
        font-size: 1.05rem;
        line-height: 1.2;
    }

    .logo-text h1 span {
        font-size: 0.75rem;
        display: block;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .login-btn {
        padding: 0.4rem 0.85rem;
        font-size: 0.85rem;
    }
}
