/* ============================================================
   Study Setu — Premium Design System
   ============================================================ */

/* --- CSS VARIABLES --- */
:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --secondary: #0984E3;
    --secondary-light: #74B9FF;
    --accent: #00CEC9;
    --accent-light: #81ECEC;

    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E74C3C;
    --info: #0984E3;

    --bg-body: #F5F6FA;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1B1D2A;
    --bg-sidebar-hover: #272A3A;
    --bg-sidebar-active: #6C5CE720;
    --bg-topbar: #FFFFFF;
    --bg-input: #F0F2F8;
    --bg-hover: #F0F2F8;

    --text-primary: #1A1D2E;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-white: #FFFFFF;
    --text-sidebar: #A0A3B1;
    --text-sidebar-active: #FFFFFF;

    --border: #E5E7EB;
    --border-light: #F0F2F8;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 12px rgba(108,92,231,0.06);
    --shadow-card-hover: 0 8px 24px rgba(108,92,231,0.12);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --sidebar-width: 260px;
    --topbar-height: 70px;
    --mobile-nav-height: 64px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --gradient-primary: linear-gradient(135deg, #6C5CE7 0%, #0984E3 100%);
    --gradient-accent: linear-gradient(135deg, #6C5CE7 0%, #00CEC9 100%);
    --gradient-hero: linear-gradient(135deg, #1B1D2A 0%, #2D3047 50%, #6C5CE7 100%);
    --gradient-warm: linear-gradient(135deg, #E17055 0%, #FDCB6E 100%);
    --gradient-cool: linear-gradient(135deg, #0984E3 0%, #00CEC9 100%);
    --gradient-card: linear-gradient(135deg, #F8F9FF 0%, #F0F2FF 100%);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, textarea, select { font-family: var(--font); font-size: 14px; }

h1 { font-size: 2rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.025em; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 600; line-height: 1.4; }
h5 { font-size: 0.875rem; font-weight: 600; line-height: 1.4; }
h6 { font-size: 0.8rem; font-weight: 600; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

/* --- UTILITY CLASSES --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.8125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.relative { position: relative; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }
.hidden { display: none !important; }

/* --- APP LAYOUT --- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    transition: var(--transition);
}

.page-content {
    padding: 24px 28px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- SIDEBAR --- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #3a3d50; border-radius: 4px; }

.sidebar-logo {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #2a2d3e;
}

.sidebar-logo img {
    height: 54px;
    width: auto;
    padding: 10px 14px;
    background: #fff;
    border-radius: 12px;
}

.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-section-title {
    padding: 12px 12px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555872;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    margin-bottom: 2px;
    position: relative;
}

.sidebar-link:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
}

.sidebar-link.active {
    background: var(--bg-sidebar-active);
    color: var(--primary-light);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-link svg { opacity: 0.7; flex-shrink: 0; }
.sidebar-link.active svg, .sidebar-link:hover svg { opacity: 1; }

.sidebar-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

/* --- TOPBAR --- */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    z-index: 900;
    gap: 16px;
    transition: var(--transition);
}

.topbar-left { display: flex; align-items: center; gap: 16px; flex: 1; }

.topbar-hamburger {
    display: none;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}
.topbar-hamburger:hover { background: var(--bg-hover); color: var(--text-primary); }

.topbar-brand {
    display: none;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}
.topbar-brand img {
    height: 48px;
    width: auto;
    border-radius: 10px;
}

.topbar-page-info { flex: 1; min-width: 0; }
.topbar-title { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }
.topbar-breadcrumb {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.topbar-breadcrumb a { color: var(--text-muted); }
.topbar-breadcrumb a:hover { color: var(--primary); }

.topbar-search {
    position: relative;
    max-width: 360px;
    width: 100%;
}
.topbar-search input {
    width: 100%;
    padding: 9px 14px 9px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-input);
    font-size: 0.8125rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
    outline: none;
}
.topbar-search input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.topbar-right { display: flex; align-items: center; gap: 6px; }

.topbar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition-fast);
    position: relative;
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--primary); }

.topbar-btn .notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

.topbar-quick-action {
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(108,92,231,0.3);
}
.topbar-quick-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108,92,231,0.4);
    color: #fff;
}

.topbar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
}
.topbar-profile:hover { background: var(--bg-hover); }

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
}

.topbar-profile-info { display: flex; flex-direction: column; }
.topbar-profile-name { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.topbar-profile-role { font-size: 0.7rem; color: var(--text-muted); }

/* --- PROFILE DROPDOWN --- */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 1100;
    display: none;
    overflow: hidden;
    animation: dropdownIn 0.2s ease;
}

.profile-dropdown.show { display: block; }

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    transition: var(--transition-fast);
}
.profile-dropdown-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.profile-dropdown-link svg { opacity: 0.6; }

.profile-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.profile-dropdown-link.danger { color: var(--danger); }
.profile-dropdown-link.danger:hover { background: #FDF2F2; }

/* --- CARDS --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover { box-shadow: var(--shadow-card-hover); }
.card-no-hover:hover { box-shadow: var(--shadow-card); }

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body { padding: 20px 22px; }
.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- STAT CARDS --- */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.stat-card-value { font-size: 1.75rem; font-weight: 800; line-height: 1; margin-bottom: 4px; letter-spacing: -0.03em; }
.stat-card-label { font-size: 0.8125rem; color: var(--text-secondary); font-weight: 500; }

.stat-card-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
}
.stat-card-trend.up { color: var(--success); }
.stat-card-trend.down { color: var(--danger); }

/* --- METRIC CARDS --- */
.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }

/* --- GRADIENT CARDS --- */
.gradient-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.gradient-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.gradient-card::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(108,92,231,0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108,92,231,0.4);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: 6px 14px; font-size: 0.75rem; border-radius: 6px; }
.btn-lg { padding: 14px 28px; font-size: 0.9375rem; border-radius: var(--radius); }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #00A383; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #D63031; color: #fff; }
.btn-warning { background: var(--warning); color: var(--text-primary); }

.btn-white {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow);
}
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--primary); }

/* --- BADGES / CHIPS / TAGS --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary { background: rgba(108,92,231,0.1); color: var(--primary); }
.badge-success { background: rgba(0,184,148,0.1); color: var(--success); }
.badge-warning { background: rgba(253,203,110,0.2); color: #E67E22; }
.badge-danger { background: rgba(231,76,60,0.1); color: var(--danger); }
.badge-info { background: rgba(9,132,227,0.1); color: var(--info); }
.badge-neutral { background: var(--bg-input); color: var(--text-secondary); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}
.chip:hover { background: var(--border); color: var(--text-primary); }
.chip.active { background: rgba(108,92,231,0.1); color: var(--primary); border-color: rgba(108,92,231,0.3); }

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

/* --- TAB PANES --- */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* --- TAB BARS --- */
.tab-bar {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-item {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    border: none;
    background: none;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* --- TABLES --- */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-input);
}
.data-table td {
    padding: 14px 16px;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}
.data-table tr:hover td { background: rgba(108,92,231,0.02); }

/* --- FORM ELEMENTS --- */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
    outline: none;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    appearance: none;
    cursor: pointer;
}
.form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,0.1); }
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    resize: vertical;
    min-height: 100px;
}
.form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,0.1); }
.form-checkbox-group { display: flex; align-items: center; gap: 8px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.show { display: flex; }

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.25s ease;
}
.modal-lg { max-width: 720px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition-fast);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* --- PROGRESS BARS --- */
.progress-bar {
    height: 6px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    transition: width 0.6s ease;
}

.progress-bar-lg { height: 10px; }

/* --- SECTION HEADERS --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-actions { display: flex; align-items: center; gap: 8px; }

/* --- GRID LAYOUTS --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* --- TIMELINE --- */
.timeline-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 40px;
    bottom: -12px;
    width: 2px;
    background: var(--border-light);
}
.timeline-item:last-child::before { display: none; }

.timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}
.timeline-content { flex: 1; }
.timeline-title { font-size: 0.8125rem; font-weight: 600; }
.timeline-desc { font-size: 0.8125rem; color: var(--text-secondary); }
.timeline-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* --- NOTIFICATION CARDS --- */
.notif-card {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    cursor: pointer;
    border-left: 3px solid transparent;
}
.notif-card:hover { background: var(--bg-hover); }
.notif-card.unread {
    background: rgba(108,92,231,0.03);
    border-left-color: var(--primary);
}
.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}
.notif-title { font-size: 0.8125rem; font-weight: 600; margin-bottom: 2px; }
.notif-text { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; }
.notif-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; display: flex; gap: 12px; }

/* --- FILE/RESOURCE CARDS --- */
.file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
}
.file-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.file-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 0.8125rem; font-weight: 600; margin-bottom: 2px; }
.file-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 12px; }

/* --- BOOKING CARDS --- */
.booking-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 18px;
    transition: var(--transition);
}
.booking-card:hover { box-shadow: var(--shadow-card-hover); }

/* --- COURSE CARDS --- */
.course-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }

.course-card-banner {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255,255,255,0.4);
    position: relative;
}

.course-card-body { padding: 18px; }
.course-card-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.course-card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.course-card-instructor { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 12px; }
.course-card-progress { margin-top: 12px; }
.course-card-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

/* --- TEST CARDS --- */
.test-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 18px;
    transition: var(--transition);
}
.test-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }

/* --- AI PROMPT CARDS --- */
.ai-prompt-card {
    padding: 14px 18px;
    background: var(--gradient-card);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(108,92,231,0.1);
    cursor: pointer;
    transition: var(--transition-fast);
}
.ai-prompt-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(108,92,231,0.1);
}

/* --- PROFILE SUMMARY --- */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.profile-banner {
    height: 100px;
    background: var(--gradient-primary);
    position: relative;
}
.profile-avatar-wrap {
    position: absolute;
    bottom: -36px;
    left: 24px;
}
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-accent);
    border: 4px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: var(--shadow);
}

/* --- CHARTS CONTAINER --- */
.chart-container { position: relative; width: 100%; }
.chart-container canvas { max-width: 100%; }

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}
.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--text-muted);
}
.empty-state-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.empty-state-text { font-size: 0.8125rem; color: var(--text-secondary); max-width: 360px; margin: 0 auto; }

/* --- MOBILE BOTTOM NAV --- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: #fff;
    border-top: 1px solid var(--border);
    z-index: 1000;
    padding: 0 8px;
    align-items: center;
    justify-content: space-around;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    transition: var(--transition-fast);
    text-decoration: none;
}
.mobile-nav-item:hover, .mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item.active { font-weight: 700; }

/* --- QUICK ACTION MENU (FLOATING) --- */
.quick-action-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
}
.quick-action-overlay.show { display: block; }

.quick-action-menu {
    position: fixed;
    bottom: 80px;
    right: 24px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 12px;
    z-index: 2001;
    display: none;
    width: 280px;
    animation: modalIn 0.25s ease;
}
.quick-action-menu.show { display: block; }

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}
.quick-action-item:hover { background: var(--bg-hover); color: var(--primary); }

.quick-action-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- FAB BUTTON --- */
.fab {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(108,92,231,0.4);
    z-index: 1500;
    transition: var(--transition);
}
.fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(108,92,231,0.5); }

/* --- WELCOME STRIP --- */
.welcome-strip {
    background: var(--gradient-hero);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}
.welcome-strip::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(108,92,231,0.3);
    border-radius: 50%;
    filter: blur(60px);
}
.welcome-strip::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: 30%;
    width: 200px;
    height: 200px;
    background: rgba(0,206,201,0.2);
    border-radius: 50%;
    filter: blur(40px);
}
.welcome-strip-content { position: relative; z-index: 1; }
.welcome-strip h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.welcome-strip p { font-size: 0.9rem; opacity: 0.85; margin-bottom: 16px; }

/* --- LANDING PAGE STYLES --- */
.landing-page { overflow-x: hidden; }

.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 48px;
    transition: var(--transition);
}
.landing-nav.scrolled { box-shadow: var(--shadow); }

.landing-nav-logo { display: flex; align-items: center; }
.landing-nav-logo img { height: 52px; border-radius: 10px; }

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: auto;
}
.landing-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}
.landing-nav-link:hover { color: var(--primary); }

.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 48px 80px;
    background: linear-gradient(180deg, #F8F9FF 0%, #F0F2FF 50%, var(--bg-body) 100%);
    position: relative;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(108,92,231,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.landing-hero::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0,206,201,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.landing-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(108,92,231,0.08);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
}

.landing-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
    color: var(--text-primary);
}
.landing-hero h1 span { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.landing-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 480px;
}

.landing-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.landing-hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.landing-hero-mockup {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 20px;
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border);
}

.landing-section {
    padding: 80px 48px;
    max-width: 1200px;
    margin: 0 auto;
}
.landing-section-alt { background: #fff; padding: 80px 48px; }
.landing-section-dark { background: var(--bg-sidebar); color: #fff; padding: 80px 48px; }

.landing-section-header {
    text-align: center;
    margin-bottom: 48px;
}
.landing-section-header h6 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 0.8rem;
}
.landing-section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}
.landing-section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.landing-module-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    text-align: center;
}
.landing-module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.landing-module-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
}

.landing-module-card h4 { margin-bottom: 8px; }
.landing-module-card p { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.6; }

.landing-segment-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: var(--transition);
}
.landing-segment-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.landing-segment-emoji { font-size: 3rem; margin-bottom: 16px; }

.testimonial-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}
.testimonial-stars { color: #F1C40F; font-size: 1rem; margin-bottom: 12px; }
.testimonial-text { font-size: 0.9rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 16px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}
.testimonial-name { font-weight: 600; font-size: 0.875rem; }
.testimonial-role { font-size: 0.75rem; color: var(--text-muted); }

.landing-cta-band {
    background: var(--gradient-hero);
    padding: 64px 48px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.landing-cta-band::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(108,92,231,0.2);
    border-radius: 50%;
    filter: blur(60px);
}
.landing-cta-band h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; position: relative; z-index: 1; }
.landing-cta-band p { font-size: 1rem; opacity: 0.85; margin-bottom: 28px; position: relative; z-index: 1; }
.landing-cta-band .btn { position: relative; z-index: 1; }

.landing-footer {
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    padding: 48px;
}
.landing-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.landing-footer-brand p { font-size: 0.875rem; line-height: 1.7; margin-top: 12px; max-width: 280px; }
.landing-footer h5 { color: #fff; margin-bottom: 16px; font-size: 0.875rem; }
.landing-footer-link { display: block; font-size: 0.8125rem; color: var(--text-sidebar); margin-bottom: 10px; }
.landing-footer-link:hover { color: var(--primary-light); }
.landing-footer-bottom {
    border-top: 1px solid #2a2d3e;
    margin-top: 32px;
    padding-top: 24px;
    text-align: center;
    font-size: 0.8125rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* --- LOGIN PAGE --- */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-visual {
    background: var(--gradient-hero);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.login-visual::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(108,92,231,0.3);
    border-radius: 50%;
    filter: blur(80px);
}
.login-visual-content { position: relative; z-index: 1; text-align: center; max-width: 400px; }
.login-visual h2 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.login-visual p { font-size: 1rem; opacity: 0.85; line-height: 1.7; }

.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.login-form-container { width: 100%; max-width: 400px; }
.login-form-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }
.login-form-logo img { height: 40px; border-radius: 8px; }
.login-form-logo span { font-size: 1.25rem; font-weight: 800; }

.login-form h2 { font-size: 1.5rem; margin-bottom: 6px; }
.login-form p { color: var(--text-secondary); margin-bottom: 28px; }

.login-form .form-group { margin-bottom: 18px; }
.login-form .form-input { padding: 12px 16px; }

.login-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.8125rem;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}
.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* --- ONBOARDING --- */
.onboarding-page {
    min-height: 100vh;
    background: var(--bg-body);
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.onboarding-container { max-width: 640px; width: 100%; }

.onboarding-progress {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 36px;
}
.onboarding-step-dot {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--border);
    transition: var(--transition);
}
.onboarding-step-dot.completed { background: var(--primary); }
.onboarding-step-dot.current { background: var(--primary-light); }

.onboarding-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 36px;
}

.onboarding-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 8px;
}

.onboarding-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
}

/* --- SEAT PICKER --- */
.seat-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-width: 400px;
}
.seat {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition-fast);
    background: #fff;
}
.seat:hover { border-color: var(--primary); }
.seat.available { background: rgba(0,184,148,0.05); border-color: rgba(0,184,148,0.3); color: var(--success); }
.seat.occupied { background: var(--bg-input); color: var(--text-muted); cursor: not-allowed; opacity: 0.5; }
.seat.selected { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- AI CHAT --- */
.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-height) - 80px);
    max-height: 700px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.ai-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.ai-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 700;
}
.ai-message-avatar.ai { background: var(--gradient-accent); color: #fff; }
.ai-message-avatar.user { background: var(--gradient-primary); color: #fff; }

.ai-message-bubble {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: var(--radius) var(--radius) var(--radius) 4px;
    font-size: 0.875rem;
    line-height: 1.7;
}
.ai-message.user .ai-message-bubble {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius) var(--radius) 4px var(--radius);
    margin-left: auto;
}
.ai-message.bot .ai-message-bubble {
    background: var(--bg-input);
    color: var(--text-primary);
}

.ai-chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: center;
}
.ai-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    outline: none;
    background: var(--bg-input);
}
.ai-chat-input:focus { border-color: var(--primary); background: #fff; }

.ai-chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(108,92,231,0.3);
    transition: var(--transition);
}
.ai-chat-send:hover { transform: scale(1.05); }

/* --- POMODORO WIDGET --- */
.pomodoro-widget {
    background: var(--gradient-card);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(108,92,231,0.1);
}

.pomodoro-timer {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
    margin: 16px 0;
    letter-spacing: 0.05em;
}

/* --- ID CARD --- */
.id-card {
    max-width: 380px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 2px solid var(--primary);
}
.id-card-header {
    background: var(--gradient-primary);
    padding: 16px 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}
.id-card-header img { height: 32px; border-radius: 6px; }
.id-card-body { padding: 20px; display: flex; gap: 16px; }
.id-card-photo {
    width: 80px;
    height: 100px;
    border-radius: var(--radius-sm);
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.id-card-info { flex: 1; }
.id-card-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.id-card-detail { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 3px; }
.id-card-footer {
    padding: 12px 20px;
    background: var(--bg-input);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.id-card-barcode {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* --- SHIMMER / LOADING --- */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- ANIMATIONS --- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: slideUp 0.4s ease forwards; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-pulse { animation: pulse 2s infinite; }

/* --- CIRCULAR PROGRESS --- */
.circular-progress-text { font-family: var(--font); }

/* --- SEARCH RESULTS --- */
.search-result-group { margin-bottom: 28px; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}
.search-result-item:hover { background: var(--bg-hover); }

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .landing-hero-content { gap: 40px; }
    .landing-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .topbar { left: 0; }
    .topbar-hamburger { display: flex; }
    .topbar-brand { display: flex; }
    .mobile-nav { display: flex; }
    .page-content { padding-bottom: calc(var(--mobile-nav-height) + 24px); }
    .fab { display: flex; bottom: calc(var(--mobile-nav-height) + 16px); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .landing-hero-content { grid-template-columns: 1fr; text-align: center; }
    .landing-hero p { margin: 0 auto 32px; }
    .landing-hero-actions { justify-content: center; }
    .landing-hero-visual { display: none; }
    .landing-nav { padding: 0 24px; }
    .landing-section, .landing-section-alt, .landing-section-dark, .landing-cta-band { padding: 60px 24px; }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-content { padding: 16px 16px 100px; }
    .topbar { padding: 0 16px; }
    .topbar-search { display: none; }
    .topbar-profile-info { display: none; }
    .landing-hero { padding: 100px 24px 60px; }
    .landing-hero h1 { font-size: 2rem; }
    .landing-nav-links { display: none; }
    .landing-footer-grid { grid-template-columns: 1fr; }
    .seat-grid { grid-template-columns: repeat(6, 1fr); }
    .welcome-strip { padding: 20px; }
    .welcome-strip h2 { font-size: 1.1rem; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .tab-bar { overflow-x: auto; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .onboarding-card { padding: 24px 18px; }
    .login-form-side { padding: 32px 20px; }
}

/* --- SIDEBAR OVERLAY (MOBILE) --- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    display: none;
}
.sidebar-overlay.show { display: block; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* --- DOCUMENT VAULT --- */
.doc-vault-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}
.doc-vault-card:hover { box-shadow: var(--shadow-card-hover); }

.doc-vault-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- GAMIFICATION --- */
.badge-card {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.badge-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.badge-card.earned { border-color: rgba(108,92,231,0.2); }
.badge-card.locked { opacity: 0.5; filter: grayscale(0.5); }
.badge-emoji { font-size: 2.5rem; margin-bottom: 8px; }
.badge-card h5 { margin-bottom: 4px; }
.badge-card p { font-size: 0.75rem; color: var(--text-secondary); }

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.leaderboard-row:hover { background: var(--bg-hover); }
.leaderboard-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}
.leaderboard-rank.gold { background: linear-gradient(135deg, #F1C40F, #F39C12); color: #fff; }
.leaderboard-rank.silver { background: linear-gradient(135deg, #BDC3C7, #95A5A6); color: #fff; }
.leaderboard-rank.bronze { background: linear-gradient(135deg, #E67E22, #D35400); color: #fff; }

/* ============ DRAWER / SIDE PANEL ============ */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1100;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.drawer-overlay.show { opacity: 1; visibility: visible; }
.drawer-panel {
    position: fixed; top: 0; right: -480px; width: 480px; max-width: 92vw; height: 100vh;
    background: #fff; box-shadow: -8px 0 30px rgba(0,0,0,0.12);
    z-index: 1101; transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column; overflow: hidden;
}
.drawer-overlay.show .drawer-panel { right: 0; }
.drawer-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.drawer-header h3 { font-size: 1.05rem; font-weight: 700; }
.drawer-close {
    width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center;
    justify-content: center; cursor: pointer; color: var(--text-muted); transition: all 0.2s;
}
.drawer-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; }
.drawer-footer {
    padding: 16px 24px; border-top: 1px solid var(--border-light); flex-shrink: 0;
    display: flex; gap: 8px; justify-content: flex-end;
}
.drawer-section { margin-bottom: 20px; }
.drawer-section-title {
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); margin-bottom: 10px;
}
.drawer-field { display: flex; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.drawer-field-label { width: 120px; font-size: 0.8125rem; color: var(--text-muted); flex-shrink: 0; }
.drawer-field-value { font-size: 0.8125rem; font-weight: 500; }

/* ============ CONFIRMATION MODAL (small) ============ */
.modal-sm .modal-dialog { max-width: 420px; }
.confirm-icon {
    width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; margin: 0 auto 16px; font-size: 1.5rem;
}
.confirm-icon.success { background: rgba(0,184,148,0.1); color: var(--success); }
.confirm-icon.warning { background: rgba(253,203,110,0.2); color: #E67E22; }
.confirm-icon.danger { background: rgba(231,76,60,0.1); color: var(--danger); }
.confirm-icon.info { background: rgba(108,92,231,0.1); color: var(--primary); }

/* ============ DOWNLOAD SIMULATION ============ */
.download-progress {
    height: 4px; background: var(--bg-hover); border-radius: 4px; overflow: hidden; margin-top: 8px;
}
.download-progress-bar {
    height: 100%; background: var(--gradient-primary); border-radius: 4px;
    width: 0; transition: width 1.5s ease;
}
.download-progress-bar.active { width: 100%; }

/* Print styles for ID card */
@media print {
    body * { visibility: hidden; }
    .id-card, .id-card * { visibility: visible; }
    .id-card { position: absolute; left: 0; top: 0; }
}
