/* assets/css/style.css */
:root {
    --primary-color: #2563eb; /* Azul más moderno */
    --primary-hover: #1d4ed8;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #333;
    --input-bg: #2c2c2c;
    --error-color: #cf6679;
    --success-color: #03dac6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- LAYOUT GENERAL --- */

/* Contenedor para el Dashboard (Centrado pero más ancho que el login) */
.main-container {
    width: 100%;
    max-width: 1200px; /* Ancho máximo para que no se estire infinito */
    margin: 0 auto; /* Centrar horizontalmente */
    padding: 40px 20px;
}

/* Cabecera */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: top;
    margin-bottom: 20px;
    /* padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color); <--- COMENTO TODO ESTO PARA RESTAR ALTURA AL DASHBOARD */
}

.main-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.rol-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    margin-top: 10px;
}

.btn-logout:hover {
    color: var(--error-color);
}

/* --- COMPONENTES --- */

/* Tarjetas (Cards) - Estilo unificado Login/Dashboard */
.card {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 12px; /* Bordes más redondeados */
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.card h2, .card h3 {
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: white;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

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

/* Botones */
.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
}

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

.btn-secondary {
    border-radius: 6px;
}

/* Grid para formularios grandes (Admin) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .main-container {
        padding: 20px;
    }
}

/* --- TABLAS --- */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-color);
    font-size: 0.95rem;
}

.table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

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

/* --- LOGIN ESPECÍFICO --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
}

.login-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid var(--border-color);
}

/* Badges de Estado/Rol */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.badge-entrenadora { background: rgba(37, 99, 235, 0.2); color: #60a5fa; }
.badge-admin { background: rgba(207, 102, 121, 0.2); color: #ff8a80; }
.badge-directora { background: rgba(155, 89, 182, 0.2); color: #d2b4de; }

/* --- ESTILOS PANEL EMPLEADO --- */

/* Barra de Progreso */
.progress-container {
    background-color: #2c2c2c;
    border-radius: 8px;
    height: 25px;
    width: 100%;
    overflow: hidden;
    margin: 10px 0;
    border: 1px solid #444;
}

.progress-bar {
    background-color: var(--primary-color); /* Azul por defecto */
    height: 100%;
    width: 0%; /* Se cambiará con JS */
    transition: width 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

/* Colores dinámicos de la barra según lo cerca que esté de acabar */
.progress-bar.warning { background-color: #f59e0b; } /* Naranja */
.progress-bar.danger { background-color: #ef4444; }  /* Rojo (pasado de horas) */

/* Botón Gigante de Fichar */
.big-clock-btn {
    width: 100%;
    height: 200px; /* Botón cuadrado/grande */
    border-radius: 50%; /* Redondo */
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto; /* Centrar */
    max-width: 200px; /* Limitar ancho en escritorio */
}

.big-clock-btn:active {
    transform: scale(0.95);
}

/* Estados del Botón */
.btn-enter {
    background: linear-gradient(145deg, #10b981, #059669); /* Verde Esmeralda */
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-exit {
    background: linear-gradient(145deg, #ef4444, #b91c1c); /* Rojo Intenso */
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.timer-display {
    font-size: 2rem;
    margin-top: 10px;
    font-family: monospace;
    font-weight: 100;
}

.status-text {
    font-size: 0.9rem;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 5px;
}