/* ============================================ */
/* FIXTURES CSS - Tema Claro (igual Admin)      */
/* ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #e31e24;
    --dark-red: #b71c1c;
    --dark-gray: #2d2d2d;
    --medium-gray: #4a4a4a;
    --light-gray: #6b6b6b;
    --bg-light: #fafafa;
    --white: #ffffff;
    --border: #e0e0e0;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* ============================================ */
/* HEADER                                       */
/* ============================================ */

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
}

/* ============================================ */
/* MAIN CONTENT                                 */
/* ============================================ */

.main-content {
    padding: 40px 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================ */
/* SECTION                                      */
/* ============================================ */

.section {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    color: var(--dark-gray);
    font-weight: 700;
}

.section-header h3 i {
    width: 24px;
    height: 24px;
    color: var(--primary-red);
}

.badge-info {
    background: var(--info);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-count {
    background: var(--bg-light);
    color: var(--medium-gray);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================ */
/* INPUT & BUTTONS                              */
/* ============================================ */

.input-group {
    display: flex;
    gap: 15px;
    max-width: 500px;
}

.input-field {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--white);
    color: var(--dark-gray);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
}

.btn i { width: 18px; height: 18px; }

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--dark-red);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--dark-gray);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #218838;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-sm i { width: 16px; height: 16px; }

/* ============================================ */
/* CHAMPIONSHIP INFO                            */
/* ============================================ */

.championship-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.championship-info {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-label {
    color: var(--light-gray);
    font-size: 0.9rem;
}

.info-value {
    color: var(--dark-gray);
    font-weight: 600;
}

/* ============================================ */
/* FILTERS                                      */
/* ============================================ */

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    width: 100%;
}

/* ============================================ */
/* MATCHES CONTAINER                            */
/* ============================================ */

.matches-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 700px;
    overflow-y: auto;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--light-gray);
    text-align: center;
}

.empty-state i {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

/* ============================================ */
/* DATE GROUP                                   */
/* ============================================ */

.date-group {
    margin-bottom: 20px;
}

.date-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary-red);
}

.date-group-header .date-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.date-group-header .date-count {
    background: var(--primary-red);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================ */
/* MATCH CARD                                   */
/* ============================================ */

.match-card {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: var(--bg-light);
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.match-card:hover {
    border-color: var(--primary-red);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.match-card.active {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.05);
}

/* Match Time */
.match-time {
    text-align: center;
}

.match-time .time {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.match-time .date {
    font-size: 0.8rem;
    color: var(--light-gray);
    margin-top: 2px;
}

/* Match Teams */
.match-teams {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-badge {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.team-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.team-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.team-score {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
    color: var(--medium-gray);
}

.team-row.winner .team-name,
.team-row.winner .team-score {
    color: var(--success);
}

/* Match Info */
.match-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 120px;
}

.match-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-status.scheduled {
    background: var(--info);
    color: white;
}

.match-status.live {
    background: var(--success);
    color: white;
    animation: pulse 2s infinite;
}

.match-status.finished {
    background: var(--light-gray);
    color: white;
}

.match-round {
    font-size: 0.8rem;
    color: var(--light-gray);
}

.match-id {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--light-gray);
}

/* Match Actions */
.match-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action i { width: 18px; height: 18px; }

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-action.load {
    background: var(--success);
    color: white;
}

.btn-action.view {
    background: var(--info);
    color: white;
}

/* ============================================ */
/* MODAL                                        */
/* ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-header .modal-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-red);
}

.modal-header .modal-icon.success {
    color: var(--success);
}

.modal-header h3 {
    font-size: 1.3rem;
    color: var(--dark-gray);
}

.modal-body {
    padding: 20px 24px;
}

.modal-body p {
    color: var(--medium-gray);
    margin-bottom: 8px;
}

.modal-body strong {
    color: var(--primary-red);
}

.modal-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    justify-content: flex-end;
}

/* ============================================ */
/* TOAST                                        */
/* ============================================ */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--info);
    animation: toastIn 0.3s ease;
}

.toast i { width: 20px; height: 20px; }

.toast.success { border-left-color: var(--success); }
.toast.success i { color: var(--success); }

.toast.error { border-left-color: var(--danger); }
.toast.error i { color: var(--danger); }

.toast.info i { color: var(--info); }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================ */
/* LOADING                                      */
/* ============================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2500;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    margin-top: 16px;
    color: var(--medium-gray);
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================ */
/* SCROLLBAR                                    */
/* ============================================ */

.matches-container::-webkit-scrollbar {
    width: 8px;
}

.matches-container::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.matches-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.matches-container::-webkit-scrollbar-thumb:hover {
    background: var(--light-gray);
}

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

@media (max-width: 900px) {
    .match-card {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }
    
    .match-info {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    
    .match-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 600px) {
    .header-content {
        padding: 16px 20px;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .section {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .match-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .match-time {
        text-align: left;
        display: flex;
        gap: 10px;
        align-items: baseline;
    }
}
