/* Crypsys Biometric Attendance Marking & Leave System - Styling */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Orbitron:wght@500;700;900&display=swap');

:root {
    --bg-dark: #070a12;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-color: rgba(56, 189, 248, 0.2);
    --border-glow: rgba(0, 242, 254, 0.5);
    
    --primary-cyan: #00f2fe;
    --primary-blue: #4facfe;
    --accent-glow: #00d2ff;
    
    --clock-in-green: #00e676;
    --clock-in-glow: rgba(0, 230, 118, 0.4);
    
    --clock-out-orange: #ff9100;
    --clock-out-glow: rgba(255, 145, 0, 0.4);

    --danger-red: #ff5252;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --nav-height: 64px;
    --bottom-nav-height: 68px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(79, 172, 254, 0.05) 0%, transparent 40%);
}

/* Header & Top Nav */
.navbar {
    height: var(--nav-height);
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.brand-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.nav-links-desktop {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-cyan);
    background: rgba(0, 242, 254, 0.1);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
}

/* Main Container */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem;
    padding-bottom: calc(var(--bottom-nav-height) + 1.5rem);
}

/* Bottom Mobile Nav */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
}

.b-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    flex: 1;
    height: 100%;
    transition: all 0.2s ease;
}

.b-nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.b-nav-item.active, .b-nav-item:hover {
    color: var(--primary-cyan);
}

.b-nav-item.active svg {
    filter: drop-shadow(0 0 8px var(--primary-cyan));
}

/* Cards & Glassmorphism */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(0, 242, 254, 0.4);
}

/* Futuristic Headings */
.page-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-cyan);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Orbitron', sans-serif;
}

.btn-cyan {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    color: #050b14;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-cyan:hover {
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
    transform: translateY(-1px);
}

/* Attendance Buttons (Clock In / Clock Out) */
.btn-clock-in {
    background: linear-gradient(135deg, #00e676, #00b0ff);
    color: #050b14;
    box-shadow: 0 4px 20px var(--clock-in-glow);
    font-size: 1.05rem;
    padding: 1.1rem;
}

.btn-clock-in:hover {
    box-shadow: 0 6px 25px rgba(0, 230, 118, 0.6);
    transform: translateY(-2px);
}

.btn-clock-out {
    background: linear-gradient(135deg, #ff9100, #ff3d00);
    color: #ffffff;
    box-shadow: 0 4px 20px var(--clock-out-glow);
    font-size: 1.05rem;
    padding: 1.1rem;
}

.btn-clock-out:hover {
    box-shadow: 0 6px 25px rgba(255, 145, 0, 0.6);
    transform: translateY(-2px);
}

.btn-grid-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

/* Scanner HUD Container */
.scanner-viewport-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto 1.5rem auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: #000;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.15);
}

.scanner-video {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    transform: scaleX(-1); /* Mirror camera */
}

.scanner-hud-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scanner-overlay-status {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--primary-cyan);
    color: var(--primary-cyan);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
    white-space: nowrap;
}

/* Intern Info Card */
.intern-card-result {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.25rem;
    display: none;
}

.intern-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.intern-card-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Tables & Logs */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.custom-table th {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.custom-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.custom-table tr:hover td {
    background: rgba(30, 41, 59, 0.4);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(0, 230, 118, 0.15);
    color: var(--clock-in-green);
    border: 1px solid var(--clock-in-green);
}

.badge-warning {
    background: rgba(255, 145, 0, 0.15);
    color: var(--clock-out-orange);
    border: 1px solid var(--clock-out-orange);
}

.badge-info {
    background: rgba(0, 242, 254, 0.15);
    color: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
}

/* Alert Notification Popup */
.alert-banner {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: none;
}

.alert-success {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid var(--clock-in-green);
    color: #b9f6ca;
}

.alert-danger {
    background: rgba(255, 82, 82, 0.15);
    border: 1px solid var(--danger-red);
    color: #ff8a80;
}

/* Responsive Rules */
@media (max-width: 768px) {
    .nav-links-desktop {
        display: none;
    }
    .bottom-nav {
        display: flex;
    }
    .main-content {
        padding: 1rem;
        padding-bottom: calc(var(--bottom-nav-height) + 1.5rem);
    }
    .btn-grid-dual {
        grid-template-columns: 1fr;
    }
}
