:root {
    --sidebar-w: 250px;
    --brand: #0b5d8a;
    --brand-dark: #08425f;
}

body { background: #f4f6f9; font-size: .93rem; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--brand-dark), var(--brand));
    color: #fff;
    flex-shrink: 0;
}
@media (min-width: 992px) {
    .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.sidebar-brand { display: flex; gap: .75rem; align-items: center; padding: 1.1rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.sidebar-brand .bi { font-size: 1.8rem; }
.sidebar-nav { padding: .5rem; }
.sidebar-nav .nav-heading { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; color: rgba(255, 255, 255, .5); padding: 1rem .75rem .25rem; }
.sidebar-nav .nav-link { color: rgba(255, 255, 255, .85); border-radius: .4rem; display: flex; gap: .65rem; align-items: center; padding: .5rem .75rem; }
.sidebar-nav .nav-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.sidebar-nav .nav-link.active { background: rgba(255, 255, 255, .18); color: #fff; font-weight: 600; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid #e3e7ed; padding: .6rem 1.25rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 100; }
.content { padding: 1.5rem; flex: 1; }

.page-header { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.4rem; margin: 0; }

.card { border: 0; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }
.card-header { background: #fff; font-weight: 600; }

.stat-card .icon { width: 48px; height: 48px; border-radius: .75rem; display: grid; place-items: center; font-size: 1.4rem; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }

.table thead th { white-space: nowrap; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #5b6573; background: #f8f9fb; }
.table td { vertical-align: middle; }
.table a.sort { color: inherit; text-decoration: none; }
.table a.sort:hover { color: var(--brand); }

.filter-bar .form-control, .filter-bar .form-select { font-size: .85rem; }

.progress.thin { height: 8px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); padding: 1rem; }
.login-card { width: 100%; max-width: 400px; }

.print-sheet { background: #fff; padding: 1.5rem; }
.print-sheet h2 { font-size: 1.15rem; }
.print-sheet .meta td { padding: .1rem .75rem .1rem 0; }

@media print {
    body { background: #fff; font-size: 11px; }
    .sidebar, .topbar, footer, .no-print { display: none !important; }
    .content { padding: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    .print-sheet { padding: 0; }
    a { text-decoration: none; color: inherit; }
}
