/* =========================================================================
   MFU SPORTS - HOJA DE ESTILOS DE ESTRUCTURA Y COMPONENTES
   Esta hoja estandariza el diseño de toda la aplicación.
   ========================================================================= */

:root {
    --primary-color: #28a745;
    --primary-hover: #218838;
    --secondary-color: #007bff;
    --secondary-hover: #0056b3;
    --dark-bg: #343a40;
    --dark-hover: #495057;
    --danger-color: #dc3545;
    --danger-hover: #c82333;
    --bg-color: #f4f6f9;
    --text-color: #333;
    --text-light: #6c757d;
    --border-color: #ced4da;
    --white: #ffffff;
    --card-bg: #ffffff;
    --line-strong: #111111;
    --surface-muted: #fafafa;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 10px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

/* ------------------- NAVEGACIÓN Y CABECERAS ------------------- */
.nav-bar {
    background: var(--dark-bg);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.nav-links a {
    color: #f8f9fa;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    margin-right: 5px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    font-size: 14px;
}

.nav-links a:hover {
    background: var(--dark-hover);
}

.nav-links a.active {
    background: var(--primary-color);
    color: var(--white);
}

.nav-action-link {
    color: #f8f9fa;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    font-size: 14px;
}

.nav-action-link:hover {
    background: var(--dark-hover);
}

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.nav-link-label {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.notif-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
}

.nav-logout {
    color: #ff6b6b !important;
    font-weight: bold;
}
.nav-logout:hover {
    background: rgba(255,107,107,0.1) !important;
}

/* En vista móvil, acomodar la barra de navegación */
@media (max-width: 600px) {
    .nav-bar {
        flex-direction: column;
        gap: 10px;
    }
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    .nav-links a {
        margin-right: 0;
    }
    .nav-action-link {
        justify-content: center;
    }
}

/* ------------------- TARJETAS Y CONTENEDORES ------------------- */
.card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
    box-shadow: var(--shadow-sm);
}

.section-title {
    color: var(--dark-bg);
    margin-top: 0;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 18px;
}

/* ------------------- FORMULARIOS ------------------- */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-hover);
    font-size: 14px;
    margin-top: 15px;
}

input[type="text"], 
input[type="number"], 
input[type="date"], 
input[type="time"], 
input[type="email"], 
input[type="password"], 
select {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    margin-top: 5px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(40,167,69,.25);
}

.row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.col {
    flex: 1;
    min-width: 200px;
}
@media (max-width: 500px) {
    .row {
        flex-direction: column;
        gap: 0;
    }
}

/* ------------------- BOTONES ------------------- */
.btn, button {
    display: inline-block;
    text-align: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px;
    font-weight: bold;
    font-size: 18px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(40,167,69,0.2);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
}
.btn-secondary:hover {
    background: var(--secondary-hover);
}

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

/* ------------------- ALERTAS Y MENSAJES ------------------- */
.alert {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ------------------- COMPONENTES ESPECÍFICOS (Match Layout) ------------------- */
.result-card {
    background: var(--white);
    padding: 15px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 500px) {
    .result-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .result-card > div {
        width: 100%;
    }
    .result-card .btn-secondary {
        width: 100%;
        box-sizing: border-box;
    }
}

.notification-item {
    transition: border-color 0.2s, box-shadow 0.2s;
}

.notification-unread {
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.12);
}

.hidden { display: none !important; }
/* Utilidades adicionales */
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.text-md { font-size: 16px; }
.text-muted { color: #6c757d; }
.text-dark { color: #343a40; }
.text-primary { color: #0056b3; }
.text-danger { color: #dc3545; }
.text-center { text-align: center; }
.fw-bold { font-weight: bold; }
.d-block { display: block; }
.p-3 { padding: 1rem !important; }
.me-2 { margin-right: 0.5rem !important; }

.alert-info { background: #e9ecef; border-left: 4px solid #007bff; }
.alert-warning { background: #fff3cd; border-left: 4px solid #ffc107; }
.text-warning-dark { color: #856404; }
.text-inherit { color: inherit; }
