@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-light: #eef2ff;
    --primary-dark: #3730a3;
    --primary-hover: #4338ca;
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-dark: #065f46;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --surface: #ffffff;
    --background: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
}

h1, h2, h3, .brand-font {
    font-family: 'Outfit', 'Inter', sans-serif;
}

/* Glassmorphism Panels */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Scanner Frame and Laser Animation */
.scanner-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #090d16;
}

.scanner-laser {
    position: absolute;
    left: 5%;
    right: 5%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #6366f1, #38bdf8, #6366f1, transparent);
    box-shadow: 0 0 16px 3px rgba(99, 102, 241, 0.8), 0 0 8px 1px rgba(56, 189, 248, 0.9);
    animation: scanAnimation 2.2s ease-in-out infinite alternate;
    z-index: 10;
}

@keyframes scanAnimation {
    0% {
        top: 6%;
        opacity: 0.2;
    }
    15% {
        opacity: 0.95;
    }
    85% {
        opacity: 0.95;
    }
    100% {
        top: 92%;
        opacity: 0.2;
    }
}

/* Viewfinder Target Brackets */
.corner-bracket {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: #6366f1;
    z-index: 12;
    pointer-events: none;
}

.corner-tl {
    top: 16px;
    left: 16px;
    border-top: 3px solid #6366f1;
    border-left: 3px solid #6366f1;
    border-top-left-radius: 8px;
}

.corner-tr {
    top: 16px;
    right: 16px;
    border-top: 3px solid #6366f1;
    border-right: 3px solid #6366f1;
    border-top-right-radius: 8px;
}

.corner-bl {
    bottom: 16px;
    left: 16px;
    border-bottom: 3px solid #6366f1;
    border-left: 3px solid #6366f1;
    border-bottom-left-radius: 8px;
}

.corner-br {
    bottom: 16px;
    right: 16px;
    border-bottom: 3px solid #6366f1;
    border-right: 3px solid #6366f1;
    border-bottom-right-radius: 8px;
}

/* Status Badges */
.badge-in-school {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-checked-out {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Pulse animation for live indicators */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    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);
    }
}

/* Customized HTML5-QRCode styling */
#camera-reader {
    border: none !important;
    width: 100% !important;
}

#camera-reader video {
    width: 100% !important;
    height: auto !important;
    border-radius: 0.75rem !important;
    object-fit: cover !important;
}

#camera-reader__scan_region {
    border: none !important;
}

#camera-reader__dashboard_section_csr button {
    background: #4f46e5 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 0.5rem !important;
    border: none !important;
    cursor: pointer !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth transitions */
.transition-card {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.transition-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
}