/* Custom Styling - Sistem Presensi Wisuda Tanpa Login */

:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #0f172a;
    --accent-gold: #f59e0b;
    --accent-emerald: #10b981;
    --accent-rose: #ef4444;
    --bg-light: #f8fafc;
    --surface-card: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    padding-bottom: 85px; /* Space for mobile bottom nav */
    min-height: 100vh;
}

/* Header & Top Bar */
.app-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.brand-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.65rem;
    border-radius: 50rem;
}

/* Bottom Navigation Bar for Mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 1040;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 6px 0;
    transition: all 0.2s ease;
}

.bottom-nav-item i {
    font-size: 1.35rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.bottom-nav-item.active {
    color: var(--primary-light);
    font-weight: 700;
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
}

.bottom-nav-item:hover {
    color: var(--primary-light);
}

/* Camera Scanner Container */
.scanner-card {
    background: #000000;
    border-radius: 1.25rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 3px solid rgba(30, 58, 138, 0.3);
}

#reader {
    width: 100% !important;
    height: 360px !important;
    min-height: 340px !important;
    border: none !important;
    background: #000000;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
}

#reader video {
    width: 100% !important;
    height: 100% !important;
    min-height: 340px !important;
    max-height: 540px;
    object-fit: cover !important;
    display: block !important;
    border-radius: 1rem;
    margin: 0 auto;
}

/* Biarkan html5-qrcode shading terlihat bersih */
#reader__scan_region {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scanner Laser Animation Overlay */
.scanner-laser {
    position: absolute;
    top: 15%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0) 0%, #ef4444 50%, rgba(239, 68, 68, 0) 100%);
    box-shadow: 0 0 15px #ef4444;
    border-radius: 50%;
    animation: laserScan 2.4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 10;
}

@keyframes laserScan {
    0% {
        top: 15%;
        opacity: 0.9;
    }
    100% {
        top: 85%;
        opacity: 0.9;
    }
}

/* Scanner Corner Guides */
.scan-guide-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    pointer-events: none;
    z-index: 5;
}

.guide-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: #38bdf8;
    border-style: solid;
}

.guide-top-left {
    top: 0;
    left: 0;
    border-width: 4px 0 0 4px;
    border-top-left-radius: 8px;
}

.guide-top-right {
    top: 0;
    right: 0;
    border-width: 4px 4px 0 0;
    border-top-right-radius: 8px;
}

.guide-bottom-left {
    bottom: 0;
    left: 0;
    border-width: 0 0 4px 4px;
    border-bottom-left-radius: 8px;
}

.guide-bottom-right {
    bottom: 0;
    right: 0;
    border-width: 0 4px 4px 0;
    border-bottom-right-radius: 8px;
}

/* Stat Cards */
.stat-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

/* Pulse animation for live sync */
.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseSync 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulseSync {
    to {
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }
}

/* QR Code Badge Print Styles */
.id-card-wrapper {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    page-break-inside: avoid;
    margin-bottom: 20px;
}

@media print {
    body {
        background: #ffffff !important;
        padding-bottom: 0 !important;
    }
    .no-print, .bottom-nav, .app-header, .btn, .breadcrumb {
        display: none !important;
    }
    .id-card-wrapper {
        border: 1px solid #94a3b8 !important;
        box-shadow: none !important;
    }
}
