/* ===========================================================
   MCQ Exam Site — Premium Theme
   Design tokens + component overrides (cascades across all pages)
   =========================================================== */

:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #EEF0FF;
    --accent: #FF7A45;
    --accent-2: #FFB020;
    --success: #16A34A;
    --danger: #E11D48;
    --bg: #F4F5FB;
    --card-bg: #FFFFFF;
    --text-main: #1E1B4B;
    --text-muted: #6B7280;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-pill: 999px;
    --shadow-sm: 0 2px 8px rgba(30, 27, 75, 0.06);
    --shadow-md: 0 6px 20px rgba(30, 27, 75, 0.10);
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: 'SolaimanLipi', 'Noto Sans Bengali', 'Segoe UI', Arial, sans-serif;
    padding-bottom: 78px; /* space for bottom nav */
}

a { text-decoration: none; }

/* ---------------- Top Navbar ---------------- */
.topbar {
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}
.brand-mark::after {
    content: "";
    position: absolute;
    inset: 6px;
    background: var(--accent-2);
    border-radius: 5px;
    opacity: .85;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    font-size: 1.1rem;
    position: relative;
}

.icon-btn .badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: #fff;
    font-size: .65rem;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ---------------- Buttons (pill) ---------------- */
.btn {
    border-radius: var(--radius-pill) !important;
    font-weight: 600;
    padding: 0.55rem 1.3rem;
    border: none;
}
.btn-sm { padding: 0.4rem 1rem; font-size: .85rem; }

.btn-primary, .bg-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}
.btn-primary:hover { background: var(--primary-dark) !important; }

.btn-success { background: var(--success) !important; border-color: var(--success) !important; }
.btn-danger  { background: var(--danger) !important; border-color: var(--danger) !important; }
.btn-warning { background: var(--accent-2) !important; border-color: var(--accent-2) !important; color: #fff !important; }

.btn-outline-primary {
    color: var(--primary) !important;
    border: 1.5px solid var(--primary) !important;
    background: transparent !important;
}
.btn-outline-primary:hover { background: var(--primary-light) !important; }

.btn-outline-light {
    border: 1.5px solid rgba(255,255,255,.6) !important;
    color: #fff !important;
}
.btn-light { background: #fff !important; color: var(--primary) !important; }

.btn-secondary { background: #E5E7EB !important; color: var(--text-main) !important; border-color: #E5E7EB !important; }
.btn-outline-secondary { border-radius: var(--radius-pill) !important; }
.btn-outline-danger { border-radius: var(--radius-pill) !important; }
.btn-outline-success { border-radius: var(--radius-pill) !important; }
.btn-outline-warning { border-radius: var(--radius-pill) !important; }
.btn-outline-info { border-radius: var(--radius-pill) !important; }

/* ---------------- Cards ---------------- */
.card {
    border: none !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 1.1rem; }

/* Quick-action tiles (dashboard style, mirrors icon-card grid) */
.tile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 14px 16px;
    font-weight: 700;
    color: var(--text-main);
    height: 100%;
}
.tile:hover { box-shadow: var(--shadow-md); color: var(--primary); }
.tile .tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #fff;
}

/* Section header banners (Study Section / Premium Section style) */
.section-banner {
    background: linear-gradient(90deg, var(--primary) 0%, #6D5CE7 100%);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 10px 18px;
    font-weight: 700;
    text-align: center;
    margin: 22px 0 14px;
}

/* ---------------- Badges ---------------- */
.badge {
    border-radius: var(--radius-pill) !important;
    font-weight: 600;
    padding: 0.4em 0.8em;
}
.badge.bg-success { background: var(--success) !important; }
.badge.bg-danger { background: var(--danger) !important; }
.badge.bg-warning { background: var(--accent-2) !important; }
.badge.bg-secondary { background: #9CA3AF !important; }
.badge.bg-info { background: #0EA5E9 !important; }

/* ---------------- Forms ---------------- */
.form-control, .form-select {
    border-radius: var(--radius-md) !important;
    border: 1.5px solid #E5E7EB;
    padding: 0.6rem 0.9rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ---------------- List group ---------------- */
.list-group-item {
    border: none !important;
    border-bottom: 1px solid #F1F2F8 !important;
    padding: 0.9rem 0.5rem;
}

/* ---------------- Progress bar ---------------- */
.progress {
    border-radius: var(--radius-pill);
    height: 10px;
    background: #EEF0F5;
}
.progress-bar { background: var(--primary); }

/* ---------------- Alerts ---------------- */
.alert {
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
}

/* ---------------- Container spacing ---------------- */
.page-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 18px 14px 24px;
}

/* ---------------- Bottom Navigation ---------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    box-shadow: 0 -2px 14px rgba(30,27,75,0.08);
    display: flex;
    justify-content: space-around;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    z-index: 1030;
}
.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 0;
}
.bottom-nav a i { font-size: 1.25rem; }
.bottom-nav a.active { color: var(--primary); }

/* ---------------- Offcanvas side menu ---------------- */
.offcanvas-header-custom {
    background: linear-gradient(135deg, var(--primary) 0%, #6D5CE7 100%);
    color: #fff;
    padding: 24px 20px;
}
.offcanvas-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}
.side-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    color: var(--text-main);
    font-weight: 600;
    border-bottom: 1px solid #F1F2F8;
}
.side-menu-link i { width: 22px; text-align: center; color: var(--primary); }
.side-menu-link:hover { background: var(--primary-light); color: var(--primary); }

/* ---------------- Admin panel accents ---------------- */
.admin-sidebar {
    background: linear-gradient(180deg, #1E1B4B 0%, #312E81 100%) !important;
}
.admin-sidebar a.active, .admin-sidebar a:hover {
    background: rgba(255,255,255,.08);
    border-radius: var(--radius-md);
}
