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

:root {
    --color-primario: #9a0303;
    --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 #e5e7eb;
    border-radius: var(--radio);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-secundario);
}

select.form-control {
    cursor: pointer;
}

/* 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;
}

.btn-primario {
    background-color: var(--color-primario);
    color: white;
    width: 100%;
}

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

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

.btn-exito:hover {
    background-color: #059669;
}

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

.btn-peligro:hover {
    background-color: #dc2626;
}

.btn-secundario {
    background-color: #6b7280;
    color: white;
}

/* Layout Principal */
.navbar {
    background-color: var(--color-primario);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--sombra);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

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

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* 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;
}

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

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

.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;
    text-transform: uppercase;
    font-size: 0.875rem;
}

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;
}

.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;
}

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

/* Grid de estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 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;
}

/* Menú de navegación */
.nav-menu {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: var(--radio);
    text-decoration: none;
    color: var(--color-texto);
    font-weight: 600;
    box-shadow: var(--sombra);
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--color-primario);
    color: white;
}

/* Estilos para impresión */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .container {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }
    
    table {
        font-size: 12pt;
    }
    
    .alert-peligro {
        border: 2px solid var(--color-peligro);
        background: white;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        justify-content: center;
    }
    
    table {
        font-size: 0.875rem;
    }
}

/* 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); }
}