/**
 * Control Horario - Estilos
 * Adaptado al estilo FACTU Gerupar
 */

body {
    margin-top: 0 !important;
    padding-top: 0 !important;
    background-color: #f8f9fa;
}

.navbar-brand { 
    font-weight: 600; 
}

.table td, .table th { 
    vertical-align: middle; 
}

.badge { 
    font-size: 0.85rem; 
}

/* ============================================
   Cards
   ============================================ */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.125);
    font-weight: 600;
}

/* ============================================
   Fichaje Widget
   ============================================ */
.fichaje-widget {
    text-align: center;
    padding: 2rem;
}

.fichaje-clock {
    font-size: 3.5rem;
    font-weight: 300;
    color: #212529;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.fichaje-date {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.fichaje-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.fichaje-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
}

.fichaje-status.sin_fichar {
    background: #e9ecef;
    color: #495057;
}

.fichaje-status.trabajando {
    background: #d1e7dd;
    color: #0f5132;
}

.fichaje-status.trabajando .fichaje-status-dot {
    animation: pulse 2s infinite;
}

.fichaje-status.en_pausa_comida {
    background: #fff3cd;
    color: #664d03;
}

.fichaje-status.en_pausa_cafe {
    background: #e2d9f3;
    color: #432874;
}

.fichaje-status.jornada_finalizada {
    background: #cfe2ff;
    color: #084298;
}

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

.fichaje-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.fichaje-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 100px;
    color: #fff;
}

.fichaje-btn i {
    font-size: 1.5rem;
}

.fichaje-btn.entrada {
    background: #198754;
}

.fichaje-btn.entrada:hover {
    background: #157347;
}

.fichaje-btn.pausa-comida {
    background: #fd7e14;
}

.fichaje-btn.pausa-comida:hover {
    background: #e96b02;
}

.fichaje-btn.pausa-cafe {
    background: #6f42c1;
}

.fichaje-btn.pausa-cafe:hover {
    background: #5a32a3;
}

.fichaje-btn.salida {
    background: #dc3545;
}

.fichaje-btn.salida:hover {
    background: #bb2d3b;
}

.fichaje-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fichaje-ubicacion {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #6c757d;
}

/* ============================================
   Stat Cards
   ============================================ */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.stat-card .stat-icon.primary {
    background: #cfe2ff;
    color: #0d6efd;
}

.stat-card .stat-icon.success {
    background: #d1e7dd;
    color: #198754;
}

.stat-card .stat-icon.warning {
    background: #fff3cd;
    color: #fd7e14;
}

.stat-card .stat-icon.danger {
    background: #f8d7da;
    color: #dc3545;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ============================================
   Timeline
   ============================================ */
.timeline {
    padding: 0;
    list-style: none;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    position: relative;
}

.timeline-item:not(:last-child) {
    border-bottom: 1px solid #dee2e6;
}

.timeline-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.timeline-icon.entrada {
    background: #d1e7dd;
    color: #198754;
}

.timeline-icon.pausa {
    background: #fff3cd;
    color: #fd7e14;
}

.timeline-icon.cafe {
    background: #e2d9f3;
    color: #6f42c1;
}

.timeline-icon.salida {
    background: #f8d7da;
    color: #dc3545;
}

.timeline-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-title {
    font-weight: 500;
    color: #212529;
}

.timeline-time {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* ============================================
   Login Page
   ============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
}

.login-card {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 3rem;
    color: #0d6efd;
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1rem;
    color: #212529;
}

.login-logo p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: #495057;
    margin-bottom: 0.5rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .fichaje-clock {
        font-size: 2.5rem;
    }
    
    .fichaje-actions {
        flex-direction: column;
    }
    
    .fichaje-btn {
        width: 100%;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* ============================================
   Notificaciones toast
   ============================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

/* ============================================
   Filtros
   ============================================ */
.filtros-card .form-select,
.filtros-card .form-control {
    font-size: 0.9rem;
}

/* ============================================
   Utilidades
   ============================================ */
.cursor-pointer {
    cursor: pointer;
}

.text-purple {
    color: #6f42c1 !important;
}

.bg-purple {
    background-color: #6f42c1 !important;
}

/* ============================================
   Navbar Dropdowns
   ============================================ */
.dropdown-menu-dark .dropdown-item {
    color: #dee2e6;
}

.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
    background-color: #495057;
    color: #fff;
}

.dropdown-menu-dark .dropdown-item.active {
    background-color: #0d6efd;
    color: #fff;
}

.dropdown-menu-dark .dropdown-header {
    color: #adb5bd;
}

.dropdown-menu-dark .dropdown-header small,
.dropdown-menu-dark .dropdown-header .text-muted {
    color: #adb5bd !important;
    font-size: 0.9rem;
}

/* ============================================
   Geolocalización
   ============================================ */
.fichaje-ubicacion .spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fichaje-ubicacion {
    cursor: help;
}