:root {
    --sidebar-width: 250px;
    --primary: #0d6efd;
}

body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar .nav-link {
    border-radius: 8px;
    margin-bottom: 2px;
    transition: background .15s;
}

.sidebar .nav-link:hover { background: rgba(255,255,255,.1); }
.sidebar .nav-link.active { background: var(--primary) !important; color: #fff !important; }

#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border-radius: 12px;
}

.card h2, .card h5 { color: #1a1a2e; font-weight: 600; }

.stat-card { border-left: 4px solid var(--primary); }
.stat-card:hover { transform: translateY(-2px); }
.stat-card h3 { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card p { font-size: .85rem; color: #6c757d; margin: 0; text-transform: uppercase; letter-spacing: .5px; }
.stat-card.success { border-left-color: #198754; }
.stat-card.success h3 { color: #198754; }
.stat-card.warning { border-left-color: #ffc107; }
.stat-card.warning h3 { color: #d39e00; }
.stat-card.danger { border-left-color: #dc3545; }
.stat-card.danger h3 { color: #dc3545; }

.table { margin-bottom: 0; font-size: .9rem; }
.table thead th { background: #f8f9fa; border-bottom: 2px solid #e9ecef; color: #495057; font-weight: 600; padding: 12px 16px; }
.table tbody td { padding: 12px 16px; vertical-align: middle; }
.table tbody tr:hover { background: #f0f4ff; }

.badge { font-weight: 500; padding: 4px 10px; border-radius: 20px; font-size: .8rem; }
.badge.bg-success { background: #d1e7dd !important; color: #0f5132 !important; }
.badge.bg-warning { background: #fff3cd !important; color: #664d03 !important; }
.badge.bg-danger { background: #f8d7da !important; color: #842029 !important; }
.badge.bg-info { background: #cff4fc !important; color: #055160 !important; }

.filter-bar {
    background: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-control, .form-select { border-radius: 8px; font-size: .9rem; padding: 8px 12px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,110,253,.15); }

.btn { border-radius: 8px; font-weight: 500; font-size: .875rem; padding: 8px 18px; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }

.login-container { max-width: 420px; width: 100%; }
.login-container .card { border-radius: 16px; padding: 2rem; }
.login-container .form-control { padding: 10px 14px; }
.login-demo { font-size: .8rem; color: #adb5bd; }

.clock-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.sidebar-toggle {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1100;
    border-radius: 8px;
    padding: 6px 10px;
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
}
.sidebar-overlay.show { display: block; }

@media (max-width: 768px) {
    .sidebar-toggle { display: block; }
    .sidebar {
        width: 250px !important;
        transform: translateX(-100%);
        transition: transform .3s ease;
        z-index: 1000;
    }
    .sidebar.show { transform: translateX(0); }
    .sidebar .nav-link span, .sidebar .fs-6, .sidebar .dropdown span { display: inline !important; }
    .sidebar .nav-link { text-align: left; padding: 8px 16px; }
    .sidebar .nav-link i { margin-right: 8px !important; font-size: 1rem !important; }
    #main-content { margin-left: 0 !important; padding: 1rem !important; padding-top: 56px !important; }
}
