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

:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', 'Hind Siliguri', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* Sidebar */
.sidebar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    padding-top: 2rem;
    z-index: 1000;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-brand span {
    color: var(--accent-blue);
}

.nav-link {
    color: var(--text-secondary);
    padding: 0.8rem 1.5rem;
    margin: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link:hover, .nav-link.active {
    background: var(--accent-blue);
    color: white;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 2rem;
}

/* Dashboard Stats */
.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

.stat-icon.blue { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); }
.stat-icon.green { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); }
.stat-icon.red { background: rgba(239, 68, 68, 0.2); color: var(--accent-red); }

.stat-info h4 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-info h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

/* Typography Helpers */
.bn {
    font-family: 'Hind Siliguri', sans-serif;
}

/* Live Camera Feed Container */
.video-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    border: 2px solid var(--accent-blue);
}

.video-container video, .video-container canvas {
    width: 100%;
    height: auto;
    display: block;
}

.video-container canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.alert-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Custom Table */
.custom-table {
    width: 100%;
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0 10px;
}

.custom-table th {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0 1rem 0.5rem;
    border: none;
}

.custom-table td {
    background: var(--card-bg);
    padding: 1rem;
    border: none;
}

.custom-table td:first-child { border-radius: 8px 0 0 8px; }
.custom-table td:last-child { border-radius: 0 8px 8px 0; }

/* Status Pills */
.status-pill {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-present { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); }
.status-late { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.status-absent { background: rgba(239, 68, 68, 0.2); color: var(--accent-red); }

/* Switch Toggle (Offline/Online Sync) */
.sync-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.online { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
.dot.offline { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
