:root {
    --brand: #4f46e5;
    --brand-600: #4338ca;
    --brand-50: #eef2ff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f6f7fb;
    --card: #ffffff;
    --radius: 16px;
    --sidebar-w: 268px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
}

* { -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    background: #0f172a; color: #cbd5e1;
    flex-direction: column; padding: 22px 14px; z-index: 1030;
    overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo {
    width: 42px; height: 42px; flex: none; border-radius: 13px; color: #fff; font-size: 21px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 6px 16px rgba(99, 102, 241, .4);
}
.brand-logo.sm { width: 36px; height: 36px; font-size: 18px; border-radius: 11px; }
.brand-name { color: #fff; font-weight: 700; line-height: 1.2; }
.brand-sub { font-size: 12px; color: #94a3b8; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-link-x {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 4px;
    border-radius: 12px; color: #94a3b8; text-decoration: none; font-weight: 500; transition: .15s;
}
.nav-link-x i { font-size: 18px; width: 22px; text-align: center; }
.nav-link-x:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link-x.active { background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(79, 70, 229, .35); }
.nav-link-x.is-soon { opacity: .55; }
.soon-tag { margin-left: auto; font-size: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.1); }

.offcanvas-dark { background: #0f172a; color: #cbd5e1; width: 300px !important; }

/* ---------- Main ---------- */
@media (min-width: 992px) { .main { margin-left: var(--sidebar-w); } }
.topbar {
    position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; justify-content: space-between;
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
    background: rgba(246, 247, 251, .88); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar-title { font-weight: 700; font-size: 17px; line-height: 1.2; }
.topbar-sub { font-size: 12px; color: var(--muted); max-width: 200px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.content { padding: 18px 16px 120px; max-width: 1180px; margin: 0 auto; }
@media (min-width: 992px) {
    .topbar { padding: 14px 32px; }
    .content { padding: 28px 32px 48px; }
}

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: #e8eaf3; }
.lang-switch a {
    padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
    color: var(--muted); text-decoration: none;
}
.lang-switch a.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

/* ---------- Bottom navigation (mobile) ---------- */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15,23,42,.06);
}
.bottom-nav a, .bottom-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 7px 2px; border: 0; background: none; border-radius: 14px;
    font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none;
}
.bottom-nav i { font-size: 21px; }
.bottom-nav .active { color: var(--brand); background: var(--brand-50); font-weight: 700; }
.bottom-nav .is-soon { opacity: .5; }

/* ---------- Components ---------- */
.card-x { background: var(--card); border: 1px solid rgba(226,232,240,.7); border-radius: var(--radius); box-shadow: var(--shadow); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-size: 20px; font-weight: 700; margin: 0; }

.hero {
    position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 22px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 14px 30px rgba(79, 70, 229, .3);
}
.hero::after {
    content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
    background: rgba(255,255,255,.12);
}
.hero h2 { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.hero p { margin: 0; opacity: .85; font-size: 14px; }
.hero .pill { display: inline-block; margin-top: 12px; padding: 4px 12px; font-size: 12px; border-radius: 999px; background: rgba(255,255,255,.18); }

.stat { display: flex; align-items: center; gap: 14px; padding: 16px; }
.stat-icon { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 22px; }
.stat-num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 13px; }
.tone-indigo { background: #eef2ff; color: #4f46e5; }
.tone-green  { background: #ecfdf5; color: #059669; }
.tone-amber  { background: #fffbeb; color: #d97706; }
.tone-rose   { background: #fff1f2; color: #e11d48; }
.tone-sky    { background: #f0f9ff; color: #0284c7; }

.section-title { font-size: 15px; font-weight: 700; margin: 26px 0 12px; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .quick { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .quick { grid-template-columns: repeat(6, 1fr); } }
.tile {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px;
    text-align: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px;
}
.tile .stat-icon { width: 52px; height: 52px; }
.tile .soon { position: absolute; top: 8px; right: 8px; font-size: 10px; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-weight: 500; }

/* ---------- Forms & buttons ---------- */
.form-label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-control, .form-select { border-radius: 12px; padding: .7rem .95rem; border: 1px solid var(--line); background-color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
.btn { border-radius: 12px; font-weight: 600; padding: .65rem 1.1rem; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-600); border-color: var(--brand-600); }
.btn-lg { padding: .85rem 1.2rem; }

.table-x { margin: 0; }
.table-x th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; border-bottom-color: var(--line); white-space: nowrap; }
.table-x td { vertical-align: middle; border-bottom-color: var(--line); }

/* ---------- Login ---------- */
.auth-wrap {
    min-height: 100vh; display: grid; place-items: center; padding: 20px;
    background:
        radial-gradient(900px 400px at 10% -10%, rgba(99,102,241,.22), transparent 60%),
        radial-gradient(700px 400px at 100% 0%, rgba(139,92,246,.2), transparent 60%),
        var(--bg);
}
.auth-card { width: 100%; max-width: 420px; padding: 30px 24px; }
.auth-logo { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; font-size: 30px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 17px; }
.input-icon .form-control { padding-left: 42px; }
.input-icon .toggle-pass { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #94a3b8; padding: 6px 10px; }