:root {
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.3);
    --view-transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --bg-base: #0B0E14;
    --bg-surface: rgba(26, 32, 44, 0.65);
    --bg-surface-hover: rgba(36, 44, 60, 0.8);
    --border-glass: rgba(255, 255, 255, 0.08);
    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --accent: #10B981;
    --accent-hover: #059669;
    --danger: #EF4444;
    --text-main: #F9FAFB;
    --text-dim: #9CA3AF;
    --text-dimmer: #6B7280;
    --calendar-invert: invert(1);
    --bg-calendar-header: rgba(99, 102, 241, 0.15);
    --bg-calendar-grid: rgba(0, 0, 0, 0.2);
}


/* TEMA CLARO */
[data-theme='light'] {
    --bg-base: #F3F4F6;
    --bg-surface: rgba(255, 255, 255, 0.8);
    --bg-surface-hover: rgba(243, 244, 246, 0.9);
    --border-glass: rgba(0, 0, 0, 0.1);
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --accent: #059669;
    --accent-hover: #047857;
    --danger: #DC2626;
    --text-main: #111827;
    --text-dim: #4B5563;
    --text-dimmer: #9CA3AF;
    --calendar-invert: invert(0);
    --bg-calendar-header: rgba(79, 70, 229, 0.08);
    --bg-calendar-grid: rgba(255, 255, 255, 0.5);
}

/* TEMA RUBÍ (Blanco Dominante) */
[data-theme='ruby'] {
    --bg-base: #FFFFFF;
    --bg-surface: rgba(255, 255, 255, 0.95);
    --bg-surface-hover: rgba(255, 230, 230, 0.9);
    --border-glass: rgba(225, 29, 72, 0.1);
    --primary: #E11D48;
    --primary-hover: #BE123C;
    --accent: #E11D48;
    --accent-hover: #BE123C;
    --danger: #DC2626;
    --text-main: #2D0707; /* Casi negro con matiz rubí */
    --text-dim: #E11D48;
    --text-dimmer: #9F1239;
    --calendar-invert: invert(0);
    --bg-calendar-header: rgba(225, 29, 72, 0.05);
    --bg-calendar-grid: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    touch-action: manipulation;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    height: 100dvh;
    transition: opacity 0.5s ease;
    overflow: hidden;
    position: relative;
}

/* Background animated shapes */
.bg-shape {
    position: absolute;
    filter: blur(120px);
    z-index: -1;
    border-radius: 50%;
    animation: drift 20s infinite alternate;
}
.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    opacity: 0.15;

    top: -200px;
    left: -100px;
}
.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    opacity: 0.1;

    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}
.shape-3 {
    width: 400px;
    height: 400px;
    background: rgba(236, 72, 153, 0.1);
    top: 30%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    padding: 1.5rem;
    gap: 1.5rem;
    overflow: hidden;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
}

.modal-content.opaque {
    background: var(--bg-base) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--border-glass);
}
/* Floating Mobile Button */
.mobile-auth-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 200;
    width: 42px;
    height: 42px;
    display: none; /* Se oculta por defecto, se muestra en media queries si es necesario */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-dim);
    cursor: pointer;
    border: 1px solid var(--border-glass);
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .mobile-auth-btn {
        display: flex;
    }
}

/* === CLASIFICACIONES === */
.standings-table-wrapper {
    background: transparent;
    border-radius: 0;
    border: none;
    overflow: hidden;
}

.standings-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    margin-bottom: 1.5rem;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.standings-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    text-align: left;
    color: var(--text-dimer);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.standings-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-glass);
}

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

.standings-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.standings-table .pos-col { width: 50px; text-align: center; font-weight: bold; }
.standings-table .pts-col { font-weight: bold; color: var(--accent); }
.standings-table .team-name { font-weight: 500; }

/* === CHIPS DE FECHAS === */
.date-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text);
    transition: all 0.2s ease;
}

.date-chip:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
}

.date-chip i {
    cursor: pointer;
    color: var(--text-dimer);
}

.date-chip:hover i {
    color: var(--danger);
}

/* === INDICADORES EN CALENDARIO === */
.match-score-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.note-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.note-indicator:hover {
    background: rgba(245, 158, 11, 0.3);
    transform: scale(1.1);
}

/* Tooltip simple */
.note-indicator[title]::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text);
    width: max-content;
    max-width: 200px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.note-indicator:hover::after {
    opacity: 1;
}

/* Disponibilidad Semanal (L-D) */
.day-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    user-select: none;
}

.day-check input { display: none; }
.day-check:has(input:checked) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Botones de Pista */
.pista-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.pista-btn input { display: none; }
.pista-btn:has(input:checked) {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.flex-center { display: flex; align-items: center; justify-content: center; }

.match-actions-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: var(--bg-surface);
    padding: 4px 8px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow-glass);
}

.match-card:hover .match-actions-overlay {
    opacity: 1;
}

.match-teams {
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 4px;
    border-radius: var(--radius-sm);
}

.match-teams:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Sidebar */
.sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 500;
}

.nav-links li a:hover, .nav-links li.active a {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}
.nav-links li.active a {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-glass) transparent;
}

/* Animations & Transitions */
.view-section {
    opacity: 0;
    transform: translateY(10px);
    transition: var(--view-transition);
    pointer-events: none;
    display: none;
}
.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.stagger-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

#user-profile-section {
    transition: opacity 0.2s;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Confirm Modal */
#modal-confirm .modal-content {
    max-width: 550px;
    text-align: center;
}
#modal-confirm .confirm-icon {
    width: 64px;
    height: 64px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}
#modal-confirm h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
#modal-confirm p { color: var(--text-dim); margin-bottom: 2rem; }
#modal-confirm .modal-actions { 
    display: flex; 
    gap: 0.75rem; 
    justify-content: center; 
    flex-wrap: nowrap;
}
#confirm-buttons .btn {
    flex: 1;
    min-width: fit-content;
    white-space: nowrap;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
}

.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 10px; }

.view-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}
.view-section.active {
    display: block;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 2rem;
}
.section-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.section-header p {
    color: var(--text-dim);
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.95rem;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99,102,241,0.4); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16,185,129,0.4); }
.btn-outline { background: transparent; border: 1px solid var(--border-glass); color: var(--text-main); }
.btn-outline:hover { background: rgba(255,255,255,0.05); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(220,38,38,0.4); }
.btn-text { background: transparent; border: none; cursor: pointer; display:flex; gap:6px; align-items:center; }
.text-danger { color: var(--danger); }
.text-danger:hover { filter: brightness(1.2); }

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon svg { width: 28px; height: 28px; }
.stat-info h3 { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.stat-info span { color: var(--text-dim); font-size: 0.9rem; }

/* Icon Buttons (Glass) */
.btn-icon-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.btn-icon-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-icon-glass svg {
    width: 20px;
    height: 20px;
    fill: none;
}

/* Grid Cards (Sports/Leagues) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.item-card {
    padding: 1.5rem;
    transition: var(--transition);
}
.item-card:hover {
    transform: translateY(-4px);
    background: var(--bg-surface-hover);
    border-color: rgba(255,255,255,0.15);
}
.item-card h3 { margin-bottom: 0.5rem; display:flex; justify-content:space-between; }
.tag {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}
.tag.team { background: rgba(99,102,241,0.2); color: #818CF8; }
.tag.individual { background: rgba(16,185,129,0.2); color: #34D399; }

/* Form Elements */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--text-dim); }
.input-glass {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}
.input-glass::-webkit-calendar-picker-indicator {
    filter: var(--calendar-invert);
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
}
.input-glass::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
.input-glass:focus {
    border-color: var(--primary);
    background: rgba(0,0,0,0.4);
}
select.input-glass option { background: var(--bg-base); color: var(--text-main); }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none; /* Cambiamos a none por defecto para mayor seguridad si no hay active */
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 2000; /* Siempre por encima de todo */
    transition: var(--transition);
}
.modal-overlay.active { 
    display: flex !important; 
    opacity: 1 !important; 
    pointer-events: auto !important; 
}
.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: var(--transition);
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}
.modal-header h2 { font-size: 1.25rem; font-weight: 600; }
.close-modal:not(.btn) { background: none; border: none; color: var(--text-dim); cursor: pointer; transition: color 0.2s; }
.close-modal:hover { color: var(--text-main); }
.modal-body { 
    padding: 1.5rem; 
    flex: 1;
    overflow-y: auto;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Utilities */
.mb-2 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.text-sm { font-size: 0.85rem; }
.text-dim { color: var(--text-dim); }

/* Lists */
/* Layout Panels */
.content-panel {
    padding: 1.5rem;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.filter-bar label {
    font-size: 0.9rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.list-container { 
    border: none; 
    border-radius: 0; 
    overflow: visible; 
}


.list-item { 
    padding: 1rem; 
    border-bottom: 1px solid var(--border-glass); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: rgba(0,0,0,0.1);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: rgba(0,0,0,0.2); }

/* Custom for rules */
.rules-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.rule-panel { padding: 1.5rem; }
.rule-panel h3 { margin-bottom: 1.5rem; }

/* Schedule Styling */
.schedule-wrapper {
    margin-top: 1.5rem;
}
.match-day {
    margin-bottom: 2rem;
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}
.match-day-header {
    padding: 1rem;
    background: var(--bg-calendar-header);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: 1px solid var(--border-glass);
    border-bottom: none;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
}
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-calendar-grid);
    border: 1px solid var(--border-glass);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.match-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    text-align: center;
}
.match-league-tag { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 8px;}
.match-teams { font-size: 1.1rem; font-weight: 600; display:flex; justify-content:space-between; align-items:center;}
.match-vs { font-size: 0.9rem; color: var(--text-dim); font-weight:400; margin: 0 10px;}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
    text-align: center;
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-lg);
}
.empty-state .empty-icon { width: 48px; height: 48px; margin-bottom: 1rem; opacity: 0.5; }
/* Collapsible Sections */
.collapsible-header {
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.collapsible-content {
    padding: 0.5rem 0.75rem 1.5rem 0.75rem;
}
.chevron-icon {
    transition: transform 0.3s ease;
}
.is-collapsed .chevron-icon {
    transform: rotate(-90deg);
}
.collapsed-content {
    display: none;
}
.collapsible-header h4 {
    display: flex;
    align-items: center;
}

/* Dashboard Lists */
.dash-details-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-glass);
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: none;
}

#print-table-container {
    display: none;
}

/* Spinner */
.spinner-sm {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast System */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 3000;
    pointer-events: none;
}

.toast {
    background: #1a1f26; /* Fondo sólido oscuro */
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    min-width: 280px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid var(--primary);
}

.toast.active {
    opacity: 1;
    transform: translateX(0);
}

.toast.success { border-left-color: #2ecc71; }
.toast.error { border-left-color: #e74c3c; }
.toast-icon { width: 22px; height: 22px; color: rgba(255,255,255,0.9); }
.toast-msg { font-size: 1rem; font-weight: 500; }
.dash-details-list::-webkit-scrollbar { display: none; }

.dash-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    gap: 12px;
}
.dash-list-item:last-child {
    border-bottom: none;
}
.dash-list-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Day selector chips */
.day-chip {
    flex: 1;
    min-width: 45px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 8px 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.75rem;
    position: relative;
}
.day-chip input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.day-chip:has(input:checked) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.day-chip:hover:not(:has(input:checked)) {
    background: rgba(255, 255, 255, 0.1);
}
.dash-list-item span:last-child {
    flex-shrink: 0;
}

/* Theme Selector */
.theme-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}
.theme-dot:hover {
    transform: scale(1.2);
}
.theme-dot.active {
    border-color: var(--text-main);
    transform: scale(1.1);
}
.dot-dark { background-color: #0B0E14; border-color: rgba(255,255,255,0.2) !important; }
.dot-light { background-color: #F3F4F6; border-color: rgba(0,0,0,0.1) !important; }
.dot-ruby { background-color: #E11D48; }

/* Color Picker for Sports */
.color-picker-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}
.color-dot:hover {
    transform: scale(1.15);
}
.color-dot.active {
    border-color: white;
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* Match Card Colored Border */
.match-card.colored {
    border-left-width: 4px;
}



/* NATIVE PRINT & PDF EXPORT STYLES */
@media print {
    body {
        background: white !important;
        color: #1a1f26 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .sidebar, .btn, .section-header, .modal-overlay, .bg-shape, .lang-container, .theme-selector {
        display: none !important;
    }

    .app-container {
        display: block !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    .view-section {
        display: none !important;
    }

    .view-section.active {
        display: block !important;
    }

    #schedule-container {
        width: 100% !important;
        padding: 0 !important;
        background: transparent !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    #print-table-container {
        display: none !important;
    }

    body.print-table #schedule-container {
        display: none !important;
    }

    body.print-table #print-table-container {
        display: block !important;
        width: 100% !important;
    }

    /* Orientation */
    body.print-landscape {
        @page { size: landscape; margin: 10mm; }
    }
    body.print-portrait {
        @page { size: portrait; margin: 10mm; }
    }

    /* Print Themes */
    body.print-mode-bw {
        background: white !important;
        color: black !important;
    }
    body.print-mode-bw .match-day {
        background: white !important;
        border: 1px solid #ddd !important;
        color: black !important;
    }
    body.print-mode-bw .match-card {
        background: white !important;
        border: 1px solid #eee !important;
        color: black !important;
    }
    body.print-mode-bw .match-league-tag {
        background: #eee !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }

    /* Weekly Format in Print (High Density) */
    body.print-weekly #schedule-container {
        transform: scale(0.92);
        transform-origin: top left;
        width: 108% !important;
    }

    body.print-weekly .match-day {
        margin-bottom: 8px !important;
        padding: 6px !important;
        page-break-inside: avoid;
    }

    body.print-weekly .match-day-header {
        font-size: 0.8rem !important;
        margin-bottom: 5px !important;
    }

    body.print-weekly .match-card {
        padding: 4px 8px !important;
        margin-bottom: 2px !important;
    }

    body.print-weekly .match-teams {
        font-size: 0.75rem !important;
    }

    .print-page-break {
        page-break-after: always !important;
        height: 0;
        display: block;
    }

    /* Technical Table View */
    .pdf-technical-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-family: 'Inter', sans-serif !important;
        font-size: 10pt !important;
        margin-top: 10px !important;
        color: black !important;
    }

    .pdf-technical-table th, .pdf-technical-table td {
        border: 1px solid #e2e8f0 !important;
        padding: 6px 10px !important;
        text-align: left !important;
    }

    .pdf-technical-table th {
        background: #f8fafc !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        font-size: 8pt !important;
    }

    .pdf-technical-table .day-row {
        background: #f1f5f9 !important;
        font-weight: bold !important;
        border-top: 2px solid #94a3b8 !important;
    }

    .pdf-technical-table .league-cell {
        font-size: 8pt !important;
        color: #64748b !important;
    }

    .pdf-technical-table .teams-cell {
        font-weight: 500 !important;
    }

    .pdf-technical-table tr:nth-child(even):not(.day-row) {
        background: #fafafa !important;
    }
}

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

/* Mobile Buttons Base Styles */
.mobile-auth-btn {
    display: none;
    position: fixed;
    top: calc(15px + env(safe-area-inset-top, 0px));
    right: 15px;
    z-index: 200;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    align-self: flex-start; /* Evita que se estire en flex column */
    border-radius: 50%;
    color: var(--text-dim);
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-auth-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-main);
    transform: translateY(-2px);
}

.mobile-auth-btn.pulse {
    animation: authPulse 2s infinite;
}

@keyframes authPulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}
.sidebar-close-btn:hover { color: var(--text-main); }
.sidebar-close-btn svg { width: 20px; height: 20px; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 90;
}

@media (max-width: 1024px) {
    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .app-container {
        flex-direction: column;
        padding: 0;
        gap: 0;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .sidebar {
        display: none !important;
    }
    .sidebar-overlay {
        display: none !important;
    }

    .main-content {
        flex: 1;
        padding: 16px;
        padding-top: env(safe-area-inset-top, 16px);
        padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .section-header h1 {
        font-size: 1.6rem;
        letter-spacing: -0.01em;
        font-weight: 700;
    }

    .flex-between {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 15px;
    }

    /* Column layout solo para móviles muy pequeños */
    @media (max-width: 500px) {
        .flex-between {
            flex-direction: column;
            align-items: flex-start;
        }
        .header-actions {
            width: 100%;
            display: flex;
            flex-direction: column;
        }
        .header-actions .btn {
            width: 100%;
        }
    }

    .header-actions {
        display: flex;
        gap: 10px;
    }

    .header-actions .btn {
        justify-content: center;
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1rem;
    }

    .rules-container {
        grid-template-columns: 1fr;
    }

    .matches-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1rem;
    }

    .modal-content {
        max-width: 95vw !important;
        margin: 10px;
        padding: 1.5rem;
        border-radius: 16px;
    }

    /* Ajuste de fuentes profesional */
    body {
        font-size: 17px;
    }

    .stat-card {
        padding: 1.2rem;
    }
}

/* ========== DUAL NAV: MOBILE BOTTOM BAR ========== */

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    z-index: 1000;
    border-top: 1px solid var(--border-glass);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom, 2px);
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
}

.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    list-style: none;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-dim);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    padding: 6px 2px;
    text-align: center;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item span:not(.badge-beta) {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

/* Optimización para pantallas ultra-estrechas */
@media (max-width: 360px) {
    .mobile-nav-item {
        font-size: 0.6rem;
        gap: 1px;
    }
    .mobile-nav-item svg {
        width: 20px;
        height: 20px;
    }
}

.badge-beta {
    background: var(--accent);
    color: white;
    font-size: 0.5rem;
    padding: 1px 3px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 0.02em;
}

.mobile-nav-item .badge-beta {
    position: absolute;
    top: 6px;
    right: 50%;
    transform: translateX(18px);
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
    transition: var(--transition);
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active svg {
    transform: translateY(-2px);
    stroke: var(--primary);
}

@media (max-width: 1024px) {
    .mobile-nav {
        display: block;
    }
    .mobile-only {
        display: flex !important;
    }
    .mobile-auth-btn {
        display: flex !important;
    }
    .desktop-only {
        display: none !important;
    }

    /* Toasts en la parte superior para no tapar la navegación inferior */
    #toast-container {
        top: calc(1rem + env(safe-area-inset-top, 0px));
        bottom: auto;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: calc(100% - 2rem);
        max-width: 450px;
        flex-direction: column-reverse;
        align-items: center;
        padding-top: 10px;
    }

    .toast {
        width: 100%;
        min-width: unset;
        transform: translateY(-20px);
        margin: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .toast.active {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-only {
    display: none;
}
.desktop-only {
    display: flex;
}

/* Settings Modal Styles */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-section h3 {
    font-size: 0.9rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.settings-section h3 svg {
    width: 16px;
    height: 16px;
}

/* Theme Selector Grid */
.theme-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.theme-option {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dim);
}

.theme-option:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary);
}

.theme-option.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--text-main);
}

.theme-option .dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.dot-dark .dot { background: #0B0E14; border: 1px solid rgba(255,255,255,0.2); }
.dot-light .dot { background: #F3F4F6; border: 1px solid rgba(0,0,0,0.1); }
.dot-ruby .dot { background: #120B0B; border: 1px solid #E11D48; }

.theme-option span:last-child {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Data Buttons Grid */
.data-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.data-buttons-grid .btn {
    padding: 0.75rem;
    font-size: 0.8rem;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.settings-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.settings-tab:hover {
    color: var(--text-main);
}

.settings-tab.active {
    background: var(--bg-surface);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.settings-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.settings-tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Daily View Focus Mode */
.view-mode-btn.active {
    background: var(--primary) !important;
    color: white !important;
}

.daily-day-card {
    width: 100%;
    max-width: 1000px;
}

#schedule-daily-nav h2 {
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.nav-arrow:hover {
    color: var(--primary);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    #schedule-daily-nav {
        gap: 1rem;
    }
    #schedule-daily-nav h2 {
        font-size: 1.25rem;
    }
}

/* Changelog Styles */
.changelog-item {
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.changelog-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.changelog-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.changelog-version {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.changelog-date {
    font-size: 0.8rem;
    color: var(--text-main);
    opacity: 0.8;
    font-weight: 500;
}
.changelog-desc {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
    padding-left: 4px;
}

.btn-icon-glass svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
    color: var(--text-main);
    fill: none;
}

/* ==========================================
   Daily View & Navigation (v3.5.0 Stability)
   ========================================== */

#schedule-container.daily-mode {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

.daily-court-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
    min-height: 200px;
    margin-top: 1rem;
}

/* Navigation arrows: bigger and more visible */
#schedule-daily-nav .btn-icon-glass {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#schedule-daily-nav .btn-icon-glass svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    flex-shrink: 0;
    stroke: white !important;
    fill: none !important;
    opacity: 1 !important;
}

/* View mode toggle buttons */
.view-mode-btn svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    flex-shrink: 0;
    stroke: currentColor !important;
    fill: none !important;
}

/* Modal close button SVG */
.modal-content .btn-icon-glass svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0;
    stroke: currentColor !important;
    fill: none !important;
}

/* Court card edit button SVG */
.daily-court-grid .btn-icon-glass svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    flex-shrink: 0;
    stroke: currentColor !important;
    fill: none !important;
}

/* Force inherit to paths and lines */
svg * {
    stroke: inherit;
    stroke-width: inherit;
    stroke-linecap: inherit;
    stroke-linejoin: inherit;
    fill: inherit;
}

/* ==========================================================================
   NUEVO CENTRO DE EXPORTACIÓN v4.0
   ========================================================================== */

.export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.export-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.export-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.export-card i, .export-card svg {
    width: 24px;
    height: 24px;
    color: var(--text-dim);
    transition: color 0.3s ease;
    stroke-width: 2px;
}

.export-card:hover i, .export-card:hover svg {
    color: var(--primary);
}

.export-card span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-main);
    display: block;
}

.export-card .export-type {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-top: -4px;
}

/* Colores específicos por formato para dar un toque premium */
.export-card[data-format="pdf"] i, .export-card[data-format="pdf"] svg { color: #ff4d4d; }
.export-card[data-format="table"] i, .export-card[data-format="table"] svg { color: #4dadff; }
.export-card[data-format="excel"] i, .export-card[data-format="excel"] svg { color: #2ecc71; }
.export-card[data-format="whatsapp"] i, .export-card[data-format="whatsapp"] svg { color: #25D366; }
.export-card[data-format="calendar"] i, .export-card[data-format="calendar"] svg { color: #f1c40f; }
.export-card[data-format="image"] i, .export-card[data-format="image"] svg { color: #9b59b6; }

/* Contenedor de configuración extra */
.export-settings-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid var(--border-glass);
    margin-top: 15px;
}

.export-settings-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 10px;
    display: block;
    font-weight: 600;
}

/* === SOPORTE DE IMPRESIÓN (PDF MULTI-PÁGINA) === */
@media print {
    html, body {
        height: auto !important;
        width: 100% !important;
        overflow: visible !important;
        background: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* 2. OCULTAR UI NO DESEADA (Limpieza total) */
    .sidebar, .section-header, .header-actions, #toast-container, .modal-overlay, .bg-shape,
    .mobile-menu-btn, .sidebar-overlay, #mobile-auth-floating-btn, .app-loading {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
    }
    
    /* Ocultar secciones inactivas que empujan el contenido */
    .view-section:not(.active) {
        display: none !important;
    }

    /* Ocultar contenedores de filtros y selectores específicos en Horarios */
    #view-schedule > div.flex-between.flex-wrap.gap-4.mb-4,
    #view-schedule .glass-input-group, 
    #view-schedule .view-mode-btn {
        display: none !important;
    }

    /* 3. DESBLOQUEO DE CONTENEDORES PADRES */
    .app-container, 
    .main-content, 
    .view-section.active, 
    .schedule-wrapper, 
    #sched-container,
    #schedule-container {
        display: block !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
        position: relative !important;
        top: 0 !important;
    }

    /* 4. VISIBILIDAD DE PARTIDOS (PDF STANDARD) */
    .match-card {
        background: white !important;
        border: 1px solid #000 !important;
        color: black !important;
        opacity: 1 !important;
        display: block !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        padding: 10px !important;
        margin-bottom: 10px !important;
    }

    .team-name {
        color: black !important;
        font-weight: bold !important;
    }

    .match-pista, .match-time {
        color: #444 !important;
    }

    /* Re-layout vertical */
    .schedule-grid-container {
        display: block !important;
        width: 100% !important;
    }

    .day-block {
        width: 100% !important;
        margin-bottom: 30px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .day-block h3 {
        border-bottom: 2px solid #000 !important;
        margin-bottom: 15px !important;
        padding-bottom: 5px !important;
        color: black !important;
    }

    /* 5. ESTILOS DE TABLA TÉCNICA (PDF TABLE) */
    #print-table-container {
        display: none;
    }

    .print-table #print-table-container {
        display: block !important;
        width: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }

    .print-table .app-container {
        display: none !important;
    }

    .pdf-technical-table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-top: 0 !important;
        color: black !important;
    }

    .pdf-technical-table th, .pdf-technical-table td {
        border: 1px solid #000 !important;
        padding: 8px !important;
        color: black !important;
    }

    .pdf-technical-table th {
        background-color: #eee !important;
    }

    /* Ocultar elementos de UI internos */
    .match-actions-overlay, 
    .status-select,
    .btn-icon-glass {
        display: none !important;
    }
}

/* === DISEÑO PREMIUM PARA CAPTURA DE IMAGEN (Share Card) === */
.share-card {
    background: #0B0E14; /* Forzamos un tema oscuro elegante para capturas */
    color: white;
    padding: 40px;
    border-radius: 0; /* Sin bordes para la imagen final */
    font-family: 'Outfit', sans-serif;
    position: relative;
    overflow: hidden;
    width: 800px;
}

.share-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.15;
    z-index: 0;
}

.share-card-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}

.share-card-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-card-logo i {
    color: var(--primary);
    width: 32px;
    height: 32px;
}

.share-card-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.share-title-group {
    text-align: right;
}

.share-title-group h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    text-transform: uppercase;
}

.share-title-group p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 4px 0 0 0;
}

.share-matches-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.share-match-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.share-team {
    flex: 1;
    font-weight: 600;
    font-size: 1.1rem;
}

.share-team.team-1 { text-align: left; }
.share-team.team-2 { text-align: right; }

.share-vs-badge {
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.share-vs-text {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 10px;
    border-radius: 10px;
}

.share-time-pista {
    font-size: 0.65rem;
    color: var(--text-dim);
}

.share-card-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
}
