/* Estilos específicos para matches.php */

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #49249d 0%, #6b46c1 100%);
    min-height: 100vh;
    color: #333;
}

/* Contenedor principal */
.matches-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Header específico para matches */
.matches-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.matches-header .header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 20px;
}

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

.tournament-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.tournament-selector label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    white-space: nowrap;
}

.tournament-selector select {
    padding: 8px 12px;
    border: 2px solid #007bff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    background: white;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.3s ease;
}

.tournament-selector select:hover {
    border-color: #0056b3;
    transform: translateY(-1px);
}

.tournament-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.tournament-selector .btn-small {
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    min-width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.matches-header .title-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.matches-header .header-logo {
    height: 100px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.matches-header .header-logo:hover {
    transform: scale(1.05);
}

.matches-header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

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

/* Header */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions h1 {
    color: white;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Sistema de pestañas */
.tabs {
    display: flex;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
    padding: 0 10px;
    backdrop-filter: blur(10px);
}

.tab {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

.tab.active {
    border-bottom-color: #ffd700;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 -2px 10px rgba(255, 215, 0, 0.3);
}

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

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

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

/* Tarjetas de partidos */
.match-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.match-category {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.match-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending { 
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.status-in_progress { 
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.status-completed { 
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Información de jugadores */
.match-players {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin: 20px 0;
}

.player-info {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.player-info:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: scale(1.02);
}

.player-name {
    font-weight: bold;
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.player-details {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.vs {
    font-weight: bold;
    color: #666;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

/* Botones de acciones */
.match-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.btn { 
    padding: 10px 20px; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary { 
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-success { 
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-danger { 
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-warning { 
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.btn-secondary { 
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Secciones de formulario */
.form-section {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-section h2, .form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

/* Sección de jugadores */
.players-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.players-section > div {
    background: rgba(0, 0, 0, 0.02);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.players-section h3 {
    color: #007bff;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2em;
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #007bff, #6b46c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Importación CSV */
.import-section {
    margin-top: 20px;
}

.import-textarea {
    width: 100%;
    height: 150px;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 13px;
    resize: vertical;
}

.import-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Vista de llaves */
.bracket-view {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    overflow-x: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.bracket-round {
    display: inline-block;
    vertical-align: top;
    margin: 0 15px;
}

.bracket-match {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    min-width: 200px;
    transition: all 0.3s ease;
}

.bracket-match:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.bracket-match strong {
    color: #007bff;
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #333;
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .matches-container {
        padding: 10px;
    }
    
    .matches-header {
        padding: 20px;
    }
    
    .matches-header .header-title {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .matches-header .title-row {
        justify-content: center;
        gap: 10px;
    }
    
    .matches-header h1 {
        font-size: 1.8em;
    }
    
    .matches-header .header-logo {
        height: 30px;
    }
    
    .tournament-selector {
        justify-content: center;
        flex-wrap: wrap;
        padding: 8px 12px;
    }
    
    .tournament-selector label {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .tournament-selector select {
        min-width: 150px;
    }
    
    .matches-header .header-nav {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-actions h1 {
        font-size: 1.8em;
    }
    
    .tabs {
        flex-wrap: wrap;
        padding: 5px;
    }
    
    .tab {
        padding: 10px 15px;
        font-size: 14px;
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
    
    .match-players {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .players-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .match-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .header-actions {
        flex-direction: column;
        text-align: center;
    }
    
    .matches-header {
        padding: 15px;
    }
    
    .matches-header h1 {
        font-size: 1.5em;
    }
    
    .matches-header .header-logo {
        height: 25px;
    }
    
    .matches-header .title-row {
        flex-direction: column;
        gap: 8px;
    }
}

/* Animaciones adicionales */
.form-section {
    animation: slideUp 0.5s ease;
}

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

.match-card {
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Efectos de carga */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Tooltip */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Control de Canchas en matches.php */
.courts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.court-control-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.court-control-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.court-control-card .court-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.court-control-card .court-header h3 {
    color: #2c3e50;
    font-size: 1.2em;
    margin: 0;
}

.court-control-card .court-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.court-control-card .status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.court-control-card .status-indicator.available {
    background: #28a745;
}

.court-control-card .status-indicator.occupied {
    background: #dc3545;
}

.court-control-card .status-indicator.maintenance {
    background: #ffc107;
}

.court-control-card .status-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.court-info {
    margin-bottom: 15px;
    min-height: 80px;
}

.current-match-info {
    text-align: center;
}

.current-match-info .match-category {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 8px;
}

.current-match-info .match-players {
    font-size: 14px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.current-match-info .match-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-court-info {
    text-align: center;
    color: #666;
    padding: 20px 0;
}

.empty-court-info p {
    margin-bottom: 10px;
}

.court-actions {
    display: flex;
    justify-content: center;
}

.court-controls {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 15px;
}

.court-controls label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.court-controls select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.court-controls select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

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

/* Navigation Sidebar */
.nav-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 123, 255, 0.2);
}

.sidebar-header h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin: 0;
    font-weight: 600;
}

.nav-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.court-btn:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.timer-btn:hover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.btn-icon {
    font-size: 2em;
    margin-bottom: 8px;
    display: block;
}

.btn-text {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.nav-btn:hover .btn-text {
    color: #007bff;
}

.timer-btn:hover .btn-text {
    color: #28a745;
}

/* Section titles inside tab-content (over gradient bg) -> white */
.tab-content > h2,
.tab-content > h3,
.tab-content > p {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tab-content > p code {
    background: rgba(255, 255, 255, 0.95);
    color: #0056b3;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Court actions (Ver Cancha button) */
.court-actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
}
.court-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    height: 40px;
    line-height: 1;
}
.court-actions .btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
.court-actions .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.court-actions .btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: #1a1a2e;
}
.court-actions .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #3e9ce4 0%, #00d4e4 100%);
}
.court-actions .btn-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border: none;
    color: #1a1a2e;
}
.court-actions .btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #e85f8a 0%, #e0d037 100%);
}

/* Edit court button (in card header) */
.btn-edit-court {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
    padding: 0;
}
.btn-edit-court:hover {
    background: rgba(0, 123, 255, 0.2);
    transform: scale(1.1);
}

/* Delete court button (in card header) */
.btn-delete-court {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}
.btn-delete-court:hover {
    background: #dc3545;
    color: white;
    transform: rotate(90deg);
}

/* ===== Add/Edit Match Form (MVC) ===== */
.match-form {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

.match-form h3 {
    font-size: 1.1em;
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.match-form h3:nth-of-type(1) {
    color: #dc3545;
    border-bottom-color: rgba(220, 53, 69, 0.2);
}

.match-form h3:nth-of-type(2) {
    color: #007bff;
    border-bottom-color: rgba(0, 123, 255, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    color: #5a6c7d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
    font-family: inherit;
    color: #2c3e50;
}

.form-group input:hover,
.form-group select:hover {
    border-color: #cbd5e1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.form-group input::placeholder {
    color: #94a3b8;
}

.match-form button[type="submit"] {
    margin-top: 18px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.match-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.35);
}

.match-form button[type="submit"]:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .match-form {
        padding: 18px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Matches Table (MVC) ===== */
.matches-table {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
}

.matches-table thead {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.matches-table thead th {
    padding: 10px 8px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    white-space: nowrap;
}

.matches-table tbody td {
    padding: 8px 6px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 13px;
    text-align: left;
    vertical-align: middle;
}

.matches-table tbody tr {
    transition: background 0.15s ease;
}

.matches-table tbody tr:hover {
    background: transparent;
}

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

.matches-table tbody tr:nth-child(even) {
    background: transparent;
}

/* Score cell - sin fondo */
.matches-table .score-cell,
.score-cell {
    background-color: transparent !important;
    background: transparent !important;
}

.matches-table tbody tr:nth-child(even) .score-cell,
.matches-table tbody tr:nth-child(odd) .score-cell {
    background: transparent !important;
}

.matches-table tbody tr:hover .score-cell {
    background: transparent !important;
}

.matches-table tbody tr:nth-child(even):hover {
    background: transparent;
}

/* ===== Score Inputs for Walkover ===== */
.score-display {
    cursor: pointer;
    padding: 0;
    border-radius: 0;
    transition: all 0.2s ease;
    user-select: none;
    display: inline;
}

.score-display:hover {
    background: transparent;
}

.score-inputs-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.score-input {
    width: 38px;
    padding: 4px 5px;
    border: 1px solid #333;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    background: #ffffff;
    color: #000000;
    transition: all 0.2s ease;
}

.score-input:focus {
    outline: none;
    border-color: #007bff;
    background: #ffffff;
    box-shadow: 0 0 3px rgba(0, 123, 255, 0.5);
}

.score-separator {
    font-weight: 700;
    color: #000000;
    font-size: 13px;
    margin: 0 3px;
}

/* ===== Verification View ===== */
.verify-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 18px;
}

.verify-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-left: 5px solid #ffc107;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.verify-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.verify-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e0e0e0;
}

.verify-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.verify-category, .verify-gender, .verify-round {
    background: #f0f4f8;
    color: #2c3e50;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.verify-category {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
}

.verify-gender {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: #fff;
}

.verify-time {
    font-size: 13px;
    color: #495057;
    font-weight: 600;
}

.verify-players {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.verify-player {
    padding: 12px;
    border-radius: 10px;
    border: 2px solid transparent;
    background: #f8f9fa;
}

.verify-player.verify-red {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05), rgba(220, 53, 69, 0.12));
    border-color: rgba(220, 53, 69, 0.3);
}

.verify-player.verify-blue {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05), rgba(0, 123, 255, 0.12));
    border-color: rgba(0, 123, 255, 0.3);
}

.verify-player-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #6c757d;
    margin-bottom: 4px;
}

.verify-player-name {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
    word-break: break-word;
}

.verify-player-detail {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.verify-number {
    background: #fff;
    border: 1px solid #dee2e6;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #495057;
}

.verify-vs {
    font-size: 18px;
    font-weight: 800;
    color: #adb5bd;
    letter-spacing: 1px;
}

/* Check-in: presence + cards */
.verify-checkin {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.presence-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: #6c757d;
    user-select: none;
}

.presence-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #28a745;
}

.presence-toggle input[type="checkbox"]:checked + .presence-text {
    color: #1e7e34;
}

.verify-player.is-present {
    box-shadow: inset 0 0 0 2px rgba(40, 167, 69, 0.5), 0 0 0 1px rgba(40, 167, 69, 0.2);
}

.verify-player.is-present::before {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.verify-player {
    position: relative;
}

.card-toggles {
    display: inline-flex;
    gap: 4px;
}

.card-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1.5px solid transparent;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: all 0.15s ease;
    opacity: 0.45;
    filter: grayscale(70%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-btn:hover {
    opacity: 0.85;
    transform: scale(1.08);
}

.card-btn.active {
    opacity: 1;
    filter: none;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.card-btn.card-yellow.active {
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
}

.card-btn.card-red.active {
    background: rgba(220, 53, 69, 0.2);
    border-color: #dc3545;
}

.verify-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
}

.verify-court-select {
    flex: 1;
    min-width: 150px;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 13px;
    background: #fff;
}

.verify-send-btn {
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.empty-verify {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

@media (max-width: 540px) {
    .verify-players {
        grid-template-columns: 1fr;
    }
    .verify-vs {
        text-align: center;
        padding: 4px 0;
    }
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.status-badge .status-icon {
    font-size: 11px;
    line-height: 1;
    display: inline-flex;
}

.status-badge.status-scheduled {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.12), rgba(108, 117, 125, 0.2));
    color: #495057;
    border-color: rgba(108, 117, 125, 0.3);
}

.status-badge.status-in_progress {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.12), rgba(0, 123, 255, 0.2));
    color: #0056b3;
    border-color: rgba(0, 123, 255, 0.35);
    animation: pulse-status 2s infinite;
}

.status-badge.status-in_progress .status-icon {
    animation: spin-icon 2s linear infinite;
}


.status-badge.status-walkover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.25));
    color: #b45309;
    border-color: rgba(255, 193, 7, 0.4);
}

.status-badge.status-cancelled {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.15), rgba(108, 117, 125, 0.25));
    color: #495057;
    border-color: rgba(108, 117, 125, 0.4);
    text-decoration: line-through;
    opacity: 0.85;
}

@keyframes pulse-status {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(0, 123, 255, 0); }
}

@keyframes spin-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Status select (in matches table) */
.status-select {
    display: inline-flex;
    align-items: center;
    padding: 5px 28px 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='currentColor' d='M0 0l5 6 5-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.2s ease;
}

.status-select:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.status-select.status-scheduled {
    background-color: rgba(108, 117, 125, 0.15);
    color: #495057;
    border-color: rgba(108, 117, 125, 0.3);
}

.status-select.status-in_progress {
    background-color: rgba(0, 123, 255, 0.15);
    color: #0056b3;
    border-color: rgba(0, 123, 255, 0.35);
    animation: pulse-status 2s infinite;
}

.status-select.status-completed {
    background-color: rgba(40, 167, 69, 0.15);
    color: #1e7e34;
    border-color: rgba(40, 167, 69, 0.4);
    font-weight: 700;
}

.status-badge.status-completed {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.12), rgba(40, 167, 69, 0.2));
    color: #1e7e34;
    border-color: rgba(40, 167, 69, 0.35);
}


.status-select.status-walkover {
    background-color: rgba(255, 193, 7, 0.18);
    color: #b45309;
    border-color: rgba(255, 193, 7, 0.45);
}

.status-select.status-cancelled {
    background-color: rgba(108, 117, 125, 0.15);
    color: #495057;
    border-color: rgba(108, 117, 125, 0.4);
}

.status-select option {
    background: #fff;
    color: #2c3e50;
    padding: 8px;
}

/* Action buttons inside table */
.matches-table .btn-small {
    padding: 6px 12px;
    font-size: 12px;
    margin-right: 4px;
    white-space: nowrap;
}

.matches-table .btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.matches-table .btn-danger:hover {
    background: #c82333;
}

/* Action buttons container */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-btn.act-load {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.action-btn.act-approve {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.action-btn.act-edit {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #1a1a2e;
}

.action-btn.act-delete {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #1a1a2e;
}

/* Responsive table */
@media (max-width: 768px) {
    .matches-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .matches-table thead th,
    .matches-table tbody td {
        padding: 8px 10px;
    }
}

/* Responsive para sidebar */
@media (max-width: 768px) {
    .nav-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .nav-btn {
        padding: 12px 8px;
    }
    
    .btn-icon {
        font-size: 1.5em;
        margin-bottom: 5px;
    }
    
    .btn-text {
        font-size: 12px;
    }
    
    .sidebar-header h3 {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .nav-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .nav-btn {
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 15px;
        text-align: left;
    }
    
    .btn-icon {
        font-size: 1.3em;
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .btn-text {
        font-size: 13px;
    }
}
