:root {
    --ink: #1E2433;
    --ink-soft: #8892A6;
    --line: #EEF0F4;
    --sidebar-width: 280px;
    --c-dashboard: #6366F1;
    --c-dashboard-bg: #EEEEFE;
    --c-customers: #8B5CF6;
    --c-customers-bg: #F3EEFE;
    --c-income: #10B981;
    --c-income-bg: #E9FBF3;
    --c-loans: #F43F5E;
    --c-loans-bg: #FEEDF0;
    --c-reports: #06B6D4;
    --c-reports-bg: #E7FAFC;
    --c-backup: #F59E0B;
    --c-backup-bg: #FEF3E1;
}
body {
    font-family: 'Hind Siliguri', 'Nunito', sans-serif;
    background-color: #F5F3EE;
    margin: 0;
}
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 36, 51, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: #FFFFFF;
    color: var(--ink);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--line);
    box-shadow: 10px 0 30px -22px rgba(30, 36, 51, 0.25);
    transition: transform 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: #E2E5EC transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #E2E5EC; border-radius: 10px; }
.sidebar-ribbon {
    height: 4px;
    flex-shrink: 0;
    background: linear-gradient(90deg, var(--c-dashboard), var(--c-customers), var(--c-loans), var(--c-backup));
}
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: all 0.3s ease;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 18px;
    position: relative;
}
.sidebar-brand .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    padding: 3px;
    background: linear-gradient(135deg, var(--c-dashboard), var(--c-customers));
}
.sidebar-brand .brand-logo img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}
.sidebar-brand-name { font-weight: 700; color: var(--ink); font-size: 15px; line-height: 1.2; }
.sidebar-brand-tag { font-size: 10px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.14em; margin-top: 2px; }
.sidebar-close {
    display: none;
    position: absolute;
    right: 14px;
    top: 20px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--line);
    color: var(--ink-soft);
    align-items: center;
    justify-content: center;
    border: none;
}
.sidebar-profile {
    margin: 4px 18px 16px;
    padding: 13px 15px;
    background: #F8F9FB;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar-ring {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--c-dashboard), var(--c-customers));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--c-dashboard);
    font-size: 14px;
}
.profile-name { color: var(--ink); font-weight: 700; font-size: 13px; }
.profile-status { font-size: 10px; color: #10B981; display: flex; align-items: center; gap: 5px; }
.profile-status .dot { width: 6px; height: 6px; border-radius: 50%; background: #10B981; animation: pulse-dot 1.8s infinite; }
@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.45); }
    70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.sidebar-nav { flex: 1; display: flex; flex-direction: column; padding: 4px 0 10px; }
.nav-group-label {
    padding: 14px 24px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #B7BECB;
}
.nav-link {
    color: #5B6478 !important;
    padding: 9px 14px;
    margin: 2px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 13.8px;
    position: relative;
    transition: background 0.18s ease, color 0.18s ease;
}
.nav-link .nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--item-bg, #F1F3F7);
    color: var(--item-color, #8892A6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 11px;
    font-size: 13px;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}
.nav-link:hover { background: #F8F9FB; color: var(--ink) !important; }
.nav-link:hover .nav-icon { transform: translateY(-1px); }
.nav-link.active { background: var(--item-bg) !important; color: var(--item-color) !important; }
.nav-link.active .nav-icon { background: var(--item-color); color: #fff; }
.nav-link.active::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--item-color);
}
.sidebar-footer { padding: 14px 18px 20px; border-top: 1px solid var(--line); }
.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: none;
    background: #FEEDF0;
    color: #F43F5E;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.18s ease;
}
.btn-logout:hover { background: #FDDCE1; color: #F43F5E; }
.card {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 2px rgba(20,33,61,0.04), 0 10px 26px -18px rgba(20,33,61,0.35) !important;
    margin-bottom: 20px;
}
.stat-card { border-left: 4px solid !important; }
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .sidebar-close { display: flex; }
    .main-content { margin-left: 0; width: 100%; padding: 15px; padding-top: 80px; }
    .mobile-header {
        position: fixed; top: 0; left: 0; right: 0; background: #fff; padding: 14px 18px;
        box-shadow: 0 2px 12px rgba(20,33,61,0.08); display: flex; align-items: center; z-index: 1040;
    }
}