/* /var/www/html/control-horario-pwa/v3/css/worker.css
*/

/* --- HEADER Y SIDEBAR V3 --- */

/* Header Superior */
.worker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #1e293b;
    color: white;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.worker-logo {
    font-weight: 900;
    letter-spacing: 1px;
    font-size: 1.2rem;
    color: #38bdf8;
}

#btn-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Sidebar Lateral (El menú que aparece/desaparece) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #0f172a;
    color: white;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
}

.sidebar.hidden {
    transform: translateX(-100%);
    display: block !important; /* Evita conflictos con clases de JS */
}

.sidebar-header {
    padding: 30px 20px;
    background: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #f1f5f9;
}

.sidebar-header button {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Enlaces del Menú */
.nav-links {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links li a:hover {
    background: #1e293b;
    color: #38bdf8;
    padding-left: 30px;
}

.nav-links hr {
    border: none;
    border-top: 1px solid #334155;
    margin: 15px 25px;
}

/* Botón Cerrar Sesión Especial */
.btn-logout {
    color: #f87171 !important; /* Rojo suave */
}

.btn-logout:hover {
    background: #450a0a !important;
}


:root {
    --primary-blue: #2563eb;
    --primary-dark-blue: #1d4ed8;
    --warning-orange: #f59e0b;
    --warning-dark-orange: #d97706;
    --success-green: #10b981;
    --danger-red: #ef4444;
    --text-main: #1e293b;
    --bg-light: #f8fafc;
}

/* Contenedor Principal */
.worker-container {
    padding: 25px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

/* Tarjetas de Estado */
.status-card, .active-card, .paused-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border: 1px solid #f1f5f9;
}

.active-card { border-top: 5px solid var(--success-green); }
.paused-card { border-top: 5px solid var(--warning-orange); }

.label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Cronómetro V3 */
.timer-v3 {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-main);
    margin: 15px 0;
    font-variant-numeric: tabular-nums;
}

.paused-card .timer-v3 {
    color: var(--warning-orange);
}

/* Grid de Botones Táctiles */
.grid-botones-v3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

/* Botones de Actividad (Azul/Naranja) */
.btn-v3-blue, .btn-v3-orange {
    border: none;
    border-radius: 16px;
    padding: 22px 15px;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: transform 0.1s, filter 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-v3-blue { background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark-blue)); }
.btn-v3-orange { background: linear-gradient(135deg, var(--warning-orange), var(--warning-dark-orange)); }

.btn-v3-blue:active, .btn-v3-orange:active {
    transform: scale(0.95);
    filter: brightness(0.9);
}

.btn-v3-blue i, .btn-v3-orange i {
    font-size: 1.6rem;
}

/* Botones de Acción de Jornada (Fin/Reanudar) */
.btn-stop-v3, .btn-resume-v3 {
    border: none;
    width: 100%;
    padding: 20px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.1s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-stop-v3 {
    background: #fee2e2;
    color: var(--danger-red);
    border: 1px solid #fecaca;
}

.btn-resume-v3 {
    background: var(--success-green);
    color: white;
}

.btn-stop-v3:active, .btn-resume-v3:active {
    transform: scale(0.98);
}

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

/* Header Crono (el pequeño de la barra superior) */
#cronometro-header {
    font-weight: 800;
    color: #38bdf8;
    background: #0f172a;
    padding: 4px 12px;
    border-radius: 8px;
    font-family: monospace;
}

/* Scanner V3 Styles */
#editor-modal { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background: #000; z-index: 9999; flex-direction: column; display: none; 
}

.scanner-header { 
    padding: 15px; display: flex; justify-content: space-between; align-items: center; 
    background: #1a1a1a; border-bottom: 1px solid #333; 
}

.btn-scan-cancel { background: none; border: none; color: #ff4444; font-size: 16px; font-weight: 600; }
.btn-scan-ready { background: #3b82f6; border: none; color: white; padding: 8px 20px; border-radius: 8px; font-weight: bold; }

.cropper-container { flex: 1; position: relative; background: #000; overflow: hidden; }

#preview-result { 
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90%; max-width: 400px; background: #1a1a1a; border-radius: 16px;
    z-index: 10000; box-shadow: 0 20px 50px rgba(0,0,0,0.8); overflow: hidden;
}

.res-label { padding: 12px; font-size: 11px; text-transform: uppercase; color: #888; text-align: center; border-bottom: 1px solid #333; }
#final-image { width: 100%; display: block; max-height: 60vh; object-fit: contain; background: #000; }

.preview-actions { padding: 15px; display: flex; flex-direction: column; gap: 10px; }
.btn-confirm { background: #10b981; color: white; border: none; padding: 14px; border-radius: 10px; font-weight: bold; font-size: 16px; }
.btn-repeat { background: #374151; color: #d1d5db; border: none; padding: 10px; border-radius: 10px; font-size: 14px; }