/* ============================================
   Sistema de Asistencia - Estilos Custom
   Mobile-First Design — Bootstrap 5
   ============================================ */

:root {
    --primary: #0d6efd;
    --success: #198754;
    --danger:  #dc3545;
    --warning: #ffc107;
    --info:    #0dcaf0;
    --dark:    #212529;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-600: #6c757d;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--gray-100);
    min-height: 100vh;
}

/* ===== NAVBAR ===== */
.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.navbar-brand { font-weight: 700; font-size: 1.15rem; }
.nav-link { font-size: 0.9rem; }

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== STAT CARDS ===== */
.stat-card {
    border: none;
    border-radius: 12px;
    padding: 1.2rem;
    color: white;
    text-align: center;
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card .stat-icon { font-size: 2.5rem; opacity: 0.8; }
.stat-card .stat-number { font-size: 2rem; font-weight: 700; }
.stat-card .stat-label { font-size: 0.8rem; opacity: 0.9; text-transform: uppercase; letter-spacing: 0.5px; }

.bg-stat-blue   { background: linear-gradient(135deg, #0d6efd, #0b5ed7); }
.bg-stat-green  { background: linear-gradient(135deg, #198754, #157347); }
.bg-stat-orange { background: linear-gradient(135deg, #fd7e14, #e8590c); }
.bg-stat-red    { background: linear-gradient(135deg, #dc3545, #bb2d3b); }
.bg-stat-purple { background: linear-gradient(135deg, #6f42c1, #5a32a3); }

/* ===== TABLES ===== */
.table-responsive { border-radius: 12px; overflow: hidden; }
.table { margin-bottom: 0; }
.table thead th {
    background-color: var(--dark);
    color: white;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    white-space: nowrap;
    padding: 0.75rem 0.6rem;
}
.table tbody td { vertical-align: middle; font-size: 0.88rem; padding: 0.7rem 0.6rem; }
.table-hover tbody tr:hover { background-color: rgba(13,110,253,0.05); }

/* ===== BUTTONS ===== */
.btn { border-radius: 8px; font-weight: 500; font-size: 0.9rem; }
.btn-lg { padding: 0.65rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.25rem 0.55rem; font-size: 0.8rem; }
.btn-action {
    width: 34px; height: 34px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
}

/* ===== BIG MARCAJE BUTTON ===== */
.btn-marcar {
    width: 180px; height: 180px; border-radius: 50%;
    font-size: 1.1rem; font-weight: 700;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(13,110,253,0.4);
    transition: all 0.3s;
    border: 4px solid rgba(255,255,255,0.3);
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white; cursor: pointer;
}
.btn-marcar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(13,110,253,0.5);
    color: white;
}
.btn-marcar .btn-marcar-icon { font-size: 3rem; }

/* ===== CAMERA ===== */
.camera-container {
    position: relative; width: 100%; max-width: 640px;
    border-radius: 12px; overflow: hidden;
    background: #000; margin: 0 auto;
}
.camera-container video { width: 100%; display: block; border-radius: 12px; }
.camera-overlay {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 200px; height: 200px;
    border: 3px dashed rgba(255,255,255,0.7);
    border-radius: 50%;
    pointer-events: none;
}

/* ===== FORMS ===== */
.form-control, .form-select { border-radius: 8px; border: 1px solid var(--gray-200); padding: 0.6rem 0.9rem; }
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}
.form-label { font-size: 0.88rem; }

/* ===== MODALS ===== */
.modal-content { border: none; border-radius: 12px; }

/* ===== ALERTS ===== */
.alert { border-radius: 8px; border: none; }

/* ===== BADGES ===== */
.badge { font-weight: 500; padding: 0.35em 0.65em; border-radius: 6px; }

/* ===== EMPLOYEE PHOTO ===== */
.emp-photo {
    width: 38px; height: 38px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--gray-200);
}

/* ===== MAP ===== */
#map { height: 400px; border-radius: 12px; z-index: 1; }

/* ===== LOADING ===== */
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.85);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .btn-marcar { width: 150px; height: 150px; font-size: 1rem; }
    .btn-marcar .btn-marcar-icon { font-size: 2.5rem; }
    .stat-card { padding: 0.8rem; }
    .stat-card .stat-number { font-size: 1.4rem; }
    .stat-card .stat-label { font-size: 0.7rem; }
    .table { font-size: 0.78rem; }
    .container { padding-left: 0.5rem; padding-right: 0.5rem; }
    #map { height: 280px; }
}

/* ===== PRINT ===== */
@media print {
    .navbar, .btn, .no-print { display: none !important; }
}
