/* Custom Styling & Dynamic Enhancements for Smart Presensi Batola */
:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    overflow-x: hidden;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
}

/* Glassmorphism Card Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

/* Status Badges */
.badge-hadir {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.badge-dinas {
    background-color: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
.badge-cuti {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.badge-sakit {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.badge-izin {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

/* Pulse animation for active radar */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Face guide oval on camera */
.face-oval-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 230px;
    border: 2px dashed rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-load 1.5s infinite;
}
@keyframes skeleton-load {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================
   Smartphone & Web Dynamic Responsiveness Enhancements
   ========================================================== */

/* Safe Area Inset Support for iPhone Notch & Modern Android */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 12px);
}
.safe-area-top {
    padding-top: env(safe-area-inset-top, 0px);
}

/* Bottom Navigation Bar (Smartphone) */
.mobile-bottom-nav {
    box-shadow: 0 -4px 20px -2px rgba(0, 0, 0, 0.08), 0 -2px 6px -1px rgba(0, 0, 0, 0.04);
}

/* Elevated Center Button for Attendance on Mobile */
.elevated-action-btn {
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.45), 0 4px 8px -2px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.elevated-action-btn:active {
    transform: scale(0.92);
    box-shadow: 0 4px 10px -2px rgba(37, 99, 235, 0.3);
}

/* Touch feedback ripple & tap targets */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}
.touch-press:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* Responsive Table Wrapper with Touch Momentum Scrolling */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Mobile Friendly Form Inputs on Touch Devices */
@media (max-width: 640px) {
    input[type="text"],
    input[type="date"],
    input[type="password"],
    select,
    textarea {
        font-size: 14px !important; /* Prevents auto-zoom on iOS Safari */
    }
}

