/* estilos.css - Estilos del Sistema EIAO */

:root {
    --color-primario: #6A1B29;
    --color-secundario: #f6523b;
    --color-exito: #10b981;
    --color-peligro: #ef4444;
    --color-advertencia: #f59e0b;
    --color-fondo: #f3f4f6;
    --color-texto: #1f2937;
    --sombra: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radio: 8px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: var(--color-primario);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 3rem;
}

/* Formularios */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-texto);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #fecaca;
    border-radius: var(--radio);
    font-size: 1rem;
    transition: all 0.3s;
    background-color: white;
}

.form-control:hover {
    border-color: var(--color-primario);
    background-color: #fef2f2;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(154, 3, 3, 0.2);
    background-color: white;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a0303' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.form-control:disabled {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

/* Botones */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radio);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    color: white; 
}


.btn-primario {
    background-color: #6A1B29; 
    color: white;
    width: 100%;
}

.btn-primario:hover {
    background-color: #52131F; 
    transform: translateY(-2px);
}


.btn-exito {
    background-color: #6A1B29 !important;
    color: white !important;
}

.btn-exito:hover {
    background-color: #52131F !important;
    transform: translateY(-2px);
}


.btn-secundario {
    background-color: #6A1B29 !important; 
    color: white !important;
}

.btn-secundario:hover {
    background-color: #52131F !important;
    transform: translateY(-2px);
}


.btn-peligro {
    background-color: #A22E41 !important; 
    color: white !important;
    border: 1px solid #E996A4 !important;  
}

.btn-peligro:hover {
    background-color: #BD3B51 !important; 
    border-color: white !important;
}

.navbar {
    background-color: #6A1B29; 
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--sombra);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand {
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    flex: 1;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Boton de menu hamburguesa */
.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
}

/* Contenedor principal - espacio suficiente para navbar fija */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    margin-top: 110px;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-title {
    font-size: 1.25rem;
    color: var(--color-primario);
    font-weight: 700;
    text-transform: uppercase;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: var(--radio);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.alert-peligro {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--color-peligro);
}

.alert-advertencia {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--color-advertencia);
}

.alert-exito {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--color-exito);
}

/* Tablas */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: var(--color-primario);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

tr:hover {
    background-color: #f9fafb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-cabello {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-uniforme {
    background-color: #fce7f3;
    color: #be185d;
}

.badge-impuntualidad {
    background-color: #ffedd5;
    color: #9a3412;
}

.badge-alerta {
    background-color: var(--color-peligro);
    color: white;
    animation: pulse 2s infinite;
}

.badge-perdonada {
    background-color: #9ca3af;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    margin-left: 0.5rem;
}

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

/* Grid de estadisticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-primario);
}

.stat-label {
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Sidebar (Menu lateral desplegable) */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #1e1e2f;
    color: white;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.sidebar-header img {
    max-width: 70px;
    margin-bottom: 0.5rem;
}

.sidebar-header h3 {
    color: white;
    font-size: 1rem;
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    text-transform: capitalize;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--color-primario);
}

.sidebar-nav a.active {
    background: rgba(154,3,3,0.2);
    color: white;
    border-left-color: var(--color-primario);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.overlay.show {
    display: block;
}

/* Card de bienvenida */
.card-bienvenida {
    background: white;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    border-left: 5px solid var(--color-peligro);
}

.bienvenido-titulo {
    color: var(--color-peligro);
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.bienvenido-texto {
    color: var(--color-texto);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.bulldog-rojo {
    color: var(--color-peligro);
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

/* ============================================
   RESPONSIVE - PARA CELULAR
   ============================================ */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-brand {
        font-size: 0.7rem;
    }
    
    .navbar-user span {
        font-size: 0.75rem;
    }
    
    .navbar-user .btn-peligro {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .menu-btn span {
        width: 22px;
        height: 2.5px;
    }
    
    .container {
        padding: 0 1rem;
        margin-top: 95px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .card-bienvenida {
        padding: 1rem;
    }
    
    .bienvenido-titulo {
        font-size: 1.3rem;
    }
    
    .bienvenido-texto {
        font-size: 0.85rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .sidebar-nav a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Estilos para impresion */
@media print {
    .no-print, .sidebar, .navbar, .overlay, .btn, .menu-btn, .alert {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .container {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
    }
    
    .card-bienvenida {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    table {
        font-size: 10pt;
    }
    
    th {
        background-color: #ccc;
        color: black;
    }
}

/* Utilidades */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none; }

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--color-primario);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Labels de formularios */
.form-group label {
    text-transform: capitalize;
}

/* Alertas texto normal */
.alert {
    text-transform: none;
}