:root {
    --sidebar-width: 260px;
    --brand: #4f46e5;
    --brand-dark: #4338ca;
    --bg-body: #f4f6fb;
    --bg-card: #ffffff;
    --text-main: #1f2430;
    --text-muted: #6b7280;
    --border-color: #e7e9f0;
}

[data-bs-theme="dark"] {
    --bg-body: #12131a;
    --bg-card: #1b1d28;
    --text-main: #e9eaf0;
    --text-muted: #9aa0ac;
    --border-color: #2b2e3d;
}

* { box-sizing: border-box; }

body {
    background: var(--bg-body);
    color: var(--text-main);
    font-family: 'Hind Siliguri', 'Segoe UI', system-ui, -apple-system, sans-serif;
    transition: background .2s ease, color .2s ease;
}

/* ---------------- Auth screen ---------------- */
.auth-body {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    min-height: 100vh;
}
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.auth-brand { text-align: center; margin-bottom: 1.75rem; }
.auth-brand i { font-size: 2.5rem; color: var(--brand); }
.auth-brand h1 { font-size: 1.25rem; font-weight: 700; margin: .5rem 0 0; }

/* ---------------- App shell ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: #171a26;
    color: #cfd2e0;
    flex-shrink: 0;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    z-index: 1030;
    transition: transform .25s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: .6rem;
    padding: 1.25rem 1.25rem; font-weight: 700; font-size: 1.1rem; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i { color: #818cf8; font-size: 1.4rem; }
.sidebar-nav { padding: .75rem; display: flex; flex-direction: column; gap: .15rem; }
.sidebar-nav .nav-link {
    color: #b6bad0; padding: .6rem .9rem; border-radius: 8px; font-size: .9rem;
    display: flex; align-items: center; gap: .65rem;
}
.sidebar-nav .nav-link i { width: 18px; text-align: center; }
.sidebar-nav .nav-link:hover:not(.disabled) { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--brand); color: #fff; }
.sidebar-nav .nav-link.disabled { opacity: .4; cursor: not-allowed; }

.main-area { margin-left: var(--sidebar-width); flex: 1; min-width: 0; }

.topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: .85rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    position: sticky; top: 0; z-index: 1020;
}
.topbar-title { font-weight: 600; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }

.content { padding: 1.5rem; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
.card-header { background: transparent; border-bottom: 1px solid var(--border-color); }

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.1rem;
    display: flex; align-items: center; gap: .9rem;
}
.stat-icon {
    width: 46px; height: 46px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.stat-value { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--text-muted); font-size: .8rem; margin-top: .25rem; }

.table { color: var(--text-main); }

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