/* ==========================================================================
   IMA Appweb Face Recognition Attendance - Modern Enterprise Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-subtle: rgba(2, 132, 199, 0.1);
    --brand-teal: #14b8a6;
    --brand-teal-glow: rgba(20, 184, 166, 0.25);
    --sidebar-bg: #0b1120;
    --sidebar-surface: #1e293b;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --body-bg: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-soft: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 12px 30px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --shadow-kiosk: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--body-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.sidebar {
    background: linear-gradient(180deg, #0b1120 0%, #0f172a 100%) !important;
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.brand-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    transition: all 0.2s ease;
}

.brand-wrapper:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(20, 184, 166, 0.3);
}

.brand-logo-img {
    filter: drop-shadow(0 2px 8px rgba(20, 184, 166, 0.25));
}

.sidebar .nav-link {
    color: #94a3b8 !important;
    border-radius: 10px;
    padding: 11px 16px;
    font-weight: 500;
    font-size: 0.92rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar .nav-link i {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

.sidebar .nav-link:hover i {
    transform: scale(1.15);
}

.sidebar .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--brand-teal);
    border-radius: 0 4px 4px 0;
}

/* ==========================================================================
   Top Header & Navigation Bar
   ========================================================================== */
.top-header-bar, .top-navbar-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05);
}

.live-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
}

.clock-badge {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.82rem;
}

/* ==========================================================================
   Cards & Surface Elements
   ========================================================================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transition: all 0.2s ease;
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 20px;
    font-weight: 700;
}

/* ==========================================================================
   Futuristic Face Scanner & Kiosk Styling
   ========================================================================== */
.kiosk-terminal-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.kiosk-camera-viewport {
    position: relative;
    background: #020617;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 15px 35px -5px rgba(2, 6, 23, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: inline-block;
    max-width: 100%;
}

.kiosk-video {
    width: 600px;
    height: 450px;
    object-fit: cover;
    max-width: 100%;
    display: block;
}

/* AI Cyber Reticle & Corner Brackets */
.hud-corner {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: #06b6d4;
    border-style: solid;
    pointer-events: none;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.8));
}

.hud-top-left {
    top: 50px;
    left: 140px;
    border-width: 3px 0 0 3px;
    border-top-left-radius: 8px;
}

.hud-top-right {
    top: 50px;
    right: 140px;
    border-width: 3px 3px 0 0;
    border-top-right-radius: 8px;
}

.hud-bottom-left {
    bottom: 50px;
    left: 140px;
    border-width: 0 0 3px 3px;
    border-bottom-left-radius: 8px;
}

.hud-bottom-right {
    bottom: 50px;
    right: 140px;
    border-width: 0 3px 3px 0;
    border-bottom-right-radius: 8px;
}

/* Scanning Beam Animation */
.hud-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #06b6d4 50%, transparent 100%);
    box-shadow: 0 0 16px #06b6d4, 0 0 32px #06b6d4;
    opacity: 0;
    pointer-events: none;
}

.hud-scanline.active {
    opacity: 1;
    animation: scanSweep 1.8s ease-in-out infinite alternate;
}

@keyframes scanSweep {
    0% { top: 12%; }
    100% { top: 88%; }
}

.hud-pill-status {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.05em;
}

.hud-pill-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

/* Segmented Control */
.segmented-control {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    display: inline-flex;
    gap: 4px;
}

.segmented-control input[type="radio"] {
    display: none;
}

.segmented-control label {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.segmented-control input[type="radio"]:checked + label {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Kiosk Buttons */
.btn-kiosk-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
}

.btn-kiosk-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
    color: #ffffff;
}

.btn-kiosk-primary:active {
    transform: translateY(0);
}

/* Verification Result Box */
.verified-pass-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid #cbd5e1;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.verified-pass-header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    padding: 18px 20px;
    text-align: center;
}

.rejected-pass-header {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: #ffffff;
    padding: 18px 20px;
    text-align: center;
}

.profile-avatar-glow {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 0 0 3px #10b981, 0 8px 20px rgba(16, 185, 129, 0.3);
    object-fit: cover;
}

.confidence-bar {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #06b6d4);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* Table Styling */
.table {
    border-color: #f1f5f9;
}

.table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
}
