:root {
    --brand-blue: #1a5fb4;
    --brand-green: #2ec27e;
    --brand-purple: #5e3a9e;
    --sidebar-width: 250px;
}

body {
    background: #f4f6f9;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    color: #2b2b33;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f2a52 0%, #1a5fb4 55%, #2ec27e 100%);
    color: #fff;
    overflow-y: auto;
    z-index: 1030;
    transition: transform .25s ease;
}
.sidebar .brand {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.sidebar .brand img { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.sidebar .brand-text { font-weight: 700; font-size: 15px; line-height: 1.2; }
.sidebar .brand-text small { display:block; font-weight: 400; opacity: .8; font-size: 11px; }

.sidebar .nav-section-title {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .06em;
    opacity: .65;
    padding: 14px 18px 4px;
}
.sidebar a.nav-link {
    color: rgba(255,255,255,.9);
    padding: 10px 18px;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid transparent;
}
.sidebar a.nav-link:hover, .sidebar a.nav-link.active {
    background: rgba(255,255,255,.12);
    border-left-color: #fff;
    color: #fff;
}
.sidebar a.nav-link i { width: 18px; text-align: center; }

.main-wrap {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.topbar {
    background: #fff;
    padding: 12px 22px;
    border-bottom: 1px solid #e6e8ee;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1020;
}
.content { padding: 22px; flex: 1; }

.card { border: none; border-radius: 12px; box-shadow: 0 2px 10px rgba(20,30,60,.06); }
.stat-card { border-radius: 14px; color: #fff; padding: 20px; position: relative; overflow: hidden; }
.stat-card.blue { background: linear-gradient(135deg, #1a5fb4, #2a7de1); }
.stat-card.green { background: linear-gradient(135deg, #1f9d5f, #2ec27e); }
.stat-card.purple { background: linear-gradient(135deg, #4b2d81, #5e3a9e); }
.stat-card.red { background: linear-gradient(135deg, #b0233b, #e4455f); }
.stat-card h3 { font-size: 26px; font-weight: 700; margin-bottom: 2px; }
.stat-card .label { opacity: .9; font-size: 13px; }
.stat-card i.bg-icon { position: absolute; right: 12px; top: 10px; font-size: 46px; opacity: .25; }

.badge-success { background: #d7f5e6; color: #1a7a4c; }
.badge-secondary { background: #eceef1; color: #555; }
.badge-warning { background: #fff3cd; color: #8a6300; }
.badge-info { background: #d9edf7; color: #2470a0; }
.badge-primary { background: #dbe6fb; color: #1a5fb4; }
.badge-danger { background: #fbdada; color: #a11d2d; }
.badge { font-weight: 600; padding: 5px 10px; border-radius: 20px; font-size: 11.5px; }

.table thead th { background: #f7f8fb; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; color: #666; border-bottom: none; }
.table td, .table th { vertical-align: middle; }

.btn-brand { background: var(--brand-blue); border-color: var(--brand-blue); color:#fff; }
.btn-brand:hover { background: #144a8d; color: #fff; }

.section-title { font-weight: 700; font-size: 20px; margin-bottom: 4px; }
.section-sub { color: #888; font-size: 13.5px; margin-bottom: 20px; }

@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-wrap { margin-left: 0; }
}

/* Print / Document templates */
.doc-paper {
    background: #fff; max-width: 800px; margin: 0 auto; padding: 40px;
    box-shadow: 0 0 15px rgba(0,0,0,.08); border-radius: 6px;
}
.doc-header { display:flex; justify-content: space-between; align-items:flex-start; border-bottom: 3px solid var(--brand-blue); padding-bottom: 16px; margin-bottom: 20px; }
.doc-header img { height: 60px; }
.doc-title { font-size: 26px; font-weight: 800; color: var(--brand-blue); letter-spacing: .04em; }
@media print {
    .no-print { display: none !important; }
    .sidebar, .topbar { display: none !important; }
    .main-wrap { margin-left: 0 !important; }
    body { background: #fff; }
    .doc-paper { box-shadow: none; }
}
