/* ========== CSS VARIABLES ========== */
:root {
    /*--bg: #0b0d13;*/
    --bg: #214373;
    --bg-elevated: #111420;
    /* --bg-card: rgba(17, 20, 32, 0.65);*/
    --bg-card: #ffffff;
    /*--bg-sidebar: rgba(10, 12, 18, 0.97);*/
    --bg-sidebar: rgb(10, 17, 38, 0.97);
    /*--accent: #00e5a0;*/
    --accent:#ffffff;
    /*--accent-dim: rgba(0, 229, 160, 0.12);*/
    --accent-gr: #228B22;
    --accent-dim: #2563ea;
    --accent-warm: #ff6b3d;
    --accent-warm-dim: rgba(255, 107, 61, 0.12);
    --accent-blue: #3db8ff;
    --accent-blue-dim: rgba(61, 184, 255, 0.12);
    --accent-purple: #c084fc;
    --text: #eef0f6;
    --text: #1b61e5;
    --text-muted: #6b7394;
    --border: rgba(255, 255, 255, 0.52);
    --border-accent: rgba(0, 229, 160, 0.25);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-accent: 0 4px 30px rgba(0, 229, 160, 0.08);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-w: 260px;
    --sidebar-collapsed: 72px;
    --navbar-h: 64px;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

/* ========== BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; color: var(--text); }
a { color: var(--accent-dim); text-decoration: none; transition: var(--transition); }
a:hover { color: #33ffbb; }

/* ========== LOGIN PAGE ========== */
#loginPage {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    overflow: hidden;
}
.login-orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
    animation: orbFloat 8s ease-in-out infinite;
}
.login-orb.orb1 { width: 500px; height: 500px; background: var(--accent); top: -150px; left: -100px; }
.login-orb.orb2 { width: 400px; height: 400px; background: var(--accent-warm); bottom: -100px; right: -80px; animation-delay: -3s; }
.login-orb.orb3 { width: 300px; height: 300px; background: var(--accent-blue); top: 50%; left: 60%; animation-delay: -5s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}
.login-card {
    position: relative; z-index: 2;
    background: rgba(17, 20, 32, 0.7);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%; max-width: 420px;
    box-shadow: var(--shadow);
}
.login-logo {
    font-family: var(--font-display); font-size: 28px; font-weight: 700;
    text-align: center; margin-bottom: 8px;
}
.login-logo span { color: var(--accent); }
.login-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 32px; font-size: 14px; }
.form-floating-custom { position: relative; margin-bottom: 20px; }
.form-floating-custom label {
    display: block; font-size: 12px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.form-floating-custom input {
    width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: rgba(255,255,255,0.04);
    color: white; font-size: 15px; font-family: var(--font-body);
    transition: var(--transition); outline: none;
}
.form-floating-custom textarea {
    width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: rgba(255,255,255,0.04);
    color: white; font-size: 15px; font-family: var(--font-body);
    transition: var(--transition); outline: none;
}
.form-floating-custom input:focus {
    border-color: var(--accent); background: rgba(0, 229, 160, 0.04);
    box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.08);
}
.form-floating-custom input.is-invalid { border-color: #ef4444; }
.form-error { color: #ef4444; font-size: 12px; margin-top: 4px; display: none; }
.form-select {
    background: rgba(255,255,255,0.04);
    /* background-color: var(--bg) !important;*/
    color: #ffffff !important;
    border-color: var(--border) !important;
    padding: 12px 16px;
}

.form-select option {
    background: var(--bg-elevated);
}

.btn-login {
    width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-dim), #6e93e5);
    /*background: linear-gradient(135deg, var(--accent), #00c48f);*/
    color: #0b0d13; font-family: var(--font-display); font-size: 15px; font-weight: 700;
    cursor: pointer; transition: var(--transition); position: relative; overflow: hidden;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0, 229, 160, 0.3); }
.btn-login:active { transform: translateY(0); }
.btn-login.loading { pointer-events: none; }
.login-hint { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.login-hint code { background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent); }
.btn-edit { width:32px;height:32px; color:var(--accent-blue); width: 50px; height: 38px; 
    border: none; border-radius: var(--radius-sm);
    background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); font-size: 16px; position: relative; }
    .btn-mulai {
        width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm);
        background: linear-gradient(135deg, var(--accent-dim), #6e93e5);
        color: #ffffff; font-family: var(--font-display); font-size: 15px; font-weight: 700;
        cursor: pointer; transition: var(--transition); position: relative; overflow: hidden;
    }
    .btn-mulai:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0, 229, 160, 0.3); }
    .btn-mulai:active { transform: translateY(0); }

    .btn-batal {
        width: auto; padding: 10px 20px; border: none; border-radius: var(--radius-sm);
        background:rgba(201,134,66,0.9); color:#ffffff; font-family: var(--font-display); font-size: 15px; font-weight: 700;
        cursor: pointer; transition: var(--transition); position: relative; overflow: hidden;
    }
    .btn-batal:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0, 229, 160, 0.3); }
    .btn-batal:active { transform: translateY(0); }
    .btn-aksi {display:flex;justify-content:start;align-items:flex-end;flex-wrap:wrap;}
    .bg-batal {background:rgba(201,134,66,0.9); color:#ffffff;}
    .cr-abu {color:#ffffff;}
    /* ========== MAIN APP LAYOUT ========== */
    #appMain { display: none; min-height: 100vh; }
    #appMain.show { display: flex; }

    /* SIDEBAR */
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        width: var(--sidebar-w); background: var(--bg-sidebar);
        display: flex; flex-direction: column;
        transition: width var(--transition);
        z-index: 100; overflow: hidden;
    }
    .sidebar.collapsed { width: var(--sidebar-collapsed); }
    .sidebar-brand {
        height: var(--navbar-h); display: flex; align-items: center;
        padding: 0 20px; gap: 12px; 
        flex-shrink: 0;
        background: #395789;
    }
    .sidebar-brand .brand-icon {
        width: 32px; height: 32px; border-radius: 8px;
        background: linear-gradient(338deg, var(--bg-sidebar), #ffffff3b);
        display: flex; align-items: center; justify-content: center;
        font-weight: 900; color: #0b0d13; font-size: 16px; font-family: var(--font-display);
        flex-shrink: 0;
    }
    .sidebar-brand .brand-text {
        font-family: var(--font-display); font-size: 20px; font-weight: 700;
        white-space: nowrap; overflow: hidden; transition: var(--transition);
    }
    .sidebar-brand .brand-text span { color: var(--accent); }
    .sidebar.collapsed .brand-text { opacity: 0; width: 0; }
    .sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
    .nav-section-title {
        font-size: 10px; font-weight: 700; text-transform: uppercase;
        letter-spacing: 1.2px; color: var(--text-muted); padding: 8px 12px 8px;
        white-space: nowrap; overflow: hidden; transition: var(--transition);
    }
    .sidebar.collapsed .nav-section-title { opacity: 0; height: 0; padding: 0; margin: 0; }
    .nav-item {
        display: flex; align-items: center; gap: 12px;
        padding: 11px 14px; border-radius: var(--radius-sm);
        color: white; font-size: 14px; font-weight: 500;
        cursor: pointer; transition: var(--transition); white-space: nowrap;
        margin-bottom: 2px; position: relative;
    }
    .nav-item i { font-size: 18px; width: 20px; text-align: center; flex-shrink: 0; }
    .nav-item .nav-label { overflow: hidden; transition: var(--transition); }
    .nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
    .nav-item.active {
        color: var(--accent); 
        background: var(--accent-dim);
    }
    .nav-item.active::before {
        content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
        width: 3px; height: 20px; background: var(--accent); border-radius: 0 3px 3px 0;
    }
    .sidebar.collapsed .nav-label { opacity: 0; width: 0; }
    .sidebar.collapsed .nav-item { justify-content: center; padding: 11px; }
    .sidebar-footer {
        padding: 16px; flex-shrink: 0;
    }
    .sidebar-user {
        display: flex; align-items: center; gap: 10px; padding: 8px;
        border-radius: var(--radius-sm); transition: var(--transition);
    }
    .sidebar-user:hover { background: rgba(255,255,255,0.04); }
    .sidebar-user .avatar {
        width: 36px; height: 36px; border-radius: 10px;
        background: linear-gradient(135deg, var(--accent-warm), #ff8f6b);
        display: flex; align-items: center; justify-content: center;
        font-weight: 700; color: #fff; font-size: 14px; flex-shrink: 0;
    }
    .sidebar-user .user-info { overflow: hidden; transition: var(--transition); }
    .sidebar-user .user-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
    .sidebar-user .user-role { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
    .sidebar.collapsed .user-info { opacity: 0; width: 0; }

    /* MAIN CONTENT */
    .main-wrap {
        margin-left: var(--sidebar-w); flex: 1; min-height: 100vh;
        transition: margin-left var(--transition);
        display: flex; flex-direction: column;
    }
    .sidebar.collapsed ~ .main-wrap { margin-left: var(--sidebar-collapsed); }

    /* TOP NAVBAR */
    .topbar {
        height: var(--navbar-h); display: flex; align-items: center;
        padding: 0 28px; gap: 16px; position: sticky; top: 0; z-index: 50;
        /*    background: rgba(11, 13, 19, 0.85); backdrop-filter: blur(20px);*/
        background: #395789;
        box-shadow: 0px 1px 15px black;
    }
    .topbar-toggle {
        width: 36px; height: 36px; border: none; border-radius: var(--radius-sm);
        background: transparent; 
        color: white; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        transition: var(--transition); font-size: 18px;
    }
    .topbar-toggle:hover { color: var(--text); background: rgba(255,255,255,0.05); }
    .topbar-search {
        flex: 1; max-width: 400px; position: relative;
    }
    .topbar-search input {
        width: 100%; padding: 9px 16px 9px 40px; border-radius: 50px;
        border: 1px solid var(--border); background: rgba(255,255,255,0.04);
        color: var(--text); font-size: 13px; outline: none; transition: var(--transition);
    }
    .topbar-search input:focus { border-color: var(--accent); background: rgba(0,229,160,0.04); }
    .topbar-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
    .topbar-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
    .topbar-btn {
        width: 50px; height: 38px; border: none; border-radius: var(--radius-sm);
        background: transparent; color: white; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        transition: var(--transition); font-size: 16px; position: relative;
    }
    /*.topbar-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }*/
    .topbar-btn .badge-dot {
        position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
        border-radius: 50%; background: var(--accent-warm);
    }

    /* CONTENT AREA */
    .content-area {
        flex: 1; padding: 28px; overflow-y: auto;
    }
    .page-section { display: none; animation: fadeInPage 0.4s ease; }
    .page-section.active { display: block; }
    @keyframes fadeInPage { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

    /* ========== GLASSMORPHISM CARDS ========== */
    .glass {
        background: var(--bg-card);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        /* border: 1px solid var(--border);*/
        border-radius: var(--radius);
        transition: var(--transition);
    }
    .glass-hover:hover {
        border-color: var(--border-accent);
        transform: translateY(-3px);
        box-shadow: var(--shadow-accent);
    }
    .glass-warm:hover {
        border-color: rgba(255, 107, 61, 0.3);
        box-shadow: 0 4px 30px rgba(255, 107, 61, 0.08);
    }

    /* ========== STAT CARDS ========== */
    .stat-card {
        padding: 22px 24px; display: flex; align-items: flex-start; gap: 16px;
    }
    .stat-icon {
        width: 48px; height: 48px; border-radius: 12px;
        display: flex; align-items: center; justify-content: center;
        font-size: 20px; flex-shrink: 0;
    }
    .stat-icon.green { background: var(--accent-dim); color: var(--accent); }
    .stat-icon.orange { background: var(--accent-warm-dim); color: var(--accent-warm); }
    .stat-icon.blue { background: var(--accent-blue-dim); color: var(--accent-blue); }
    .stat-icon.purple { background: rgba(192, 132, 252, 0.12); color: var(--accent-purple); }
    .stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1; }
    .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
    .stat-change { font-size: 12px; font-weight: 600; margin-top: 6px; }
    .stat-change.up { color: var(--accent-dim); }
    .stat-change.down { color: var(--accent-warm); }

    /* ========== COURSE CARDS ========== */
    .course-card { overflow: hidden; cursor: pointer; }
    .course-card .card-img {
        height: 160px; background-size: cover; background-position: center;
        position: relative;
    }
    .course-card .card-img::after {
        content: ''; position: absolute; inset: 0;
        background: linear-gradient(to top, rgba(11,13,19,0.8), transparent);
    }
    .course-card .card-badge {
        position: absolute; top: 12px; left: 12px; z-index: 2;
        padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.5px;
    }
    .badge-adaptive { background: var(--accent); color: #0b0d13; }
    .badge-standard { background: rgba(255,255,255,0.15); color: var(--text); backdrop-filter: blur(8px); }
    .course-card .card-body-custom { padding: 18px; }
    .course-card .card-category { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
    .course-card .card-title-custom { font-size: 16px; font-weight: 700; margin: 6px 0 4px; line-height: 1.3; }
    .course-card .card-instructor { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
    .progress-bar-custom {
        height: 4px; background: rgba(8,8,8,0.18); border-radius: 4px; overflow: hidden;
    }
    .progress-bar-fill {
        height: 100%; border-radius: 4px; transition: width 1s ease;
        background: var(--accent-dim);
    }
    .progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 6px; }

    /* ========== FILTER TABS ========== */
    .filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
    .filter-tab {
        padding: 7px 16px; border-radius: 50px; border: 1px solid var(--border);
        background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 500;
        cursor: pointer; transition: var(--transition); font-family: var(--font-body);
    }
    .filter-tab:hover { border-color: rgba(255,255,255,0.15); color: var(--text); }
    .filter-tab.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }

    /* ========== QUIZ / ASSESSMENT ========== */
    .quiz-container { max-width: 720px; margin: 0 auto; }
    .quiz-header { margin-bottom: 28px; }
    .quiz-progress-bar { height: 6px; background: rgb(177 171 171 / 65%); border-radius: 6px; overflow: hidden; margin-top: 16px; }
    .quiz-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent-blue)); border-radius: 6px; transition: width 0.5s ease; }
    .quiz-question { font-size: 20px; font-weight: 600; line-height: 1.5; margin-bottom: 24px; }
    .quiz-option {
        padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border);
        background:rgb(57 87 137); cursor: pointer; margin-bottom: 10px; color:#ffffff;
        transition: var(--transition); display: flex; align-items: center; gap: 12px;
    }
    .quiz-option:hover { border-color: rgba(255,255,255,0.15); background: rgb(9 67 149); }
    .quiz-option.selected { border-color: var(--accent); background: var(--accent-dim); }
    .quiz-option.correct { border-color: var(--accent); background: var(--accent-dim); }
    .quiz-option.wrong { border-color: #ef4444; background: rgba(239,68,68,0.1); }
    .quiz-option .opt-letter {
        width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
        display: flex; align-items: center; justify-content: center;
        font-weight: 700; font-size: 13px; flex-shrink: 0; transition: var(--transition);
    }
    .quiz-option.selected .opt-letter { background: var(--accent); color: #0b0d13; border-color: var(--accent); }
    .quiz-option.correct .opt-letter { background: var(--accent); color: #0b0d13; border-color: var(--accent); }
    .quiz-option.wrong .opt-letter { background: #ef4444; color: #fff; border-color: #ef4444; }

    /* ========== AI CHAT ========== */
    .chat-container { display: flex; flex-direction: column; height: calc(80vh - var(--navbar-h) - 56px); margin: 0 20px; }
    .chat-messages { flex: 1; overflow-y: auto; padding: 20px 0; }
    .chat-msg { display: flex; gap: 12px; margin-bottom: 20px; animation: fadeInPage 0.3s ease; }
    .chat-msg.user { flex-direction: row-reverse; }
    .chat-avatar {
        width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center; font-size: 14px;
    }
    .chat-avatar.ai-avatar { background: linear-gradient(135deg, var(--accent), #214373); color: #0b0d13; font-weight: 800; }
    .chat-avatar.user-avatar { background: linear-gradient(135deg, var(--accent-warm), #ff8f6b); color: #fff; font-weight: 700; }
    .chat-bubble {
        max-width: 70%; padding: 14px 18px; border-radius: 14px;
        font-size: 14px; line-height: 1.6;
    }
    .chat-msg.assistant .chat-bubble { background: #5ac9d52b; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
    .chat-msg.user .chat-bubble { background: var(--accent-dim); border: 1px solid var(--border-accent); border-bottom-right-radius: 4px; color:#ffffff; }
    .chat-input-area {
        display: flex; gap: 10px; padding: 16px 0 8px;
        border-top: 1px solid var(--border);
    }
    .chat-input-area input {
        flex: 1; padding: 12px 18px; border-radius: 10px;
        border: 1px solid var(--text-muted); background: rgba(255,255,255,0.04);
        color: var(--text); font-size: 14px; outline: none; transition: var(--transition);
    }
    .chat-input-area input:focus { border-color: black; }
    .chat-send-btn {
        width: 70px; height: 44px; border-radius: 10%; border: none;
        background: linear-gradient(135deg, var(--accent-dim), #6e93e5); color: #ffffff; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        font-size: 16px; transition: var(--transition);
    }
    .chat-send-btn:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(0,229,160,0.3); }
    .chat-suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
    .chat-suggestion {
        padding: 7px 14px; border-radius: 50px; border: 1px solid var(--border);
        background: transparent; color: var(--text-muted); font-size: 12px;
        cursor: pointer; transition: var(--transition); font-family: var(--font-body);
    }
    .chat-suggestion:hover { border-color: var(--accent); color: var(--accent); }
    .typing-indicator span {
        display: inline-block; width: 6px; height: 6px; background: var(--text-muted);
        border-radius: 50%; margin-right: 4px; animation: typingBounce 1.4s infinite;
    }
    .typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
    .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
    @keyframes typingBounce {
        0%, 60%, 100% { transform: translateY(0); }
        30% { transform: translateY(-8px); }
    }

    /* ========== ANALYTICS ========== */
    .chart-card { padding: 24px; }
    .chart-card h5 { font-size: 15px; margin-bottom: 4px; }
    .chart-card .chart-subtitle { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }

    /* ========== WELCOME BANNER ========== */
    .welcome-banner {
        padding: 10px; border-radius: var(--radius-lg);
        /*background: linear-gradient(135deg, rgba(0,229,160,0.08), rgba(61,184,255,0.06));*/
        background: #ffffff;
        border: 1px solid rgba(0,229,160,0.12);
        position: relative; overflow: hidden; margin-bottom: 28px;
    }
    .welcome-banner::before {
        content: ''; position: absolute; right: -40px; top: -40px;
        width: 200px; height: 200px; border-radius: 50%;
        background: rgba(0,229,160,0.06); filter: blur(40px);
    }
    .welcome-banner h2 { font-size: 24px; margin-bottom: 6px; }
    .welcome-banner p { color: var(--text-muted); font-size: 14px; }
    .welcome-banner .welcome-date { font-size: 13px; color: var(--text-muted); }

    /* ========== ACTIVITY LIST ========== */
    .activity-item {
        display: flex; align-items: flex-start; gap: 12px; padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }
    .activity-item:last-child { border-bottom: none; }
    .activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
    .activity-dot.green { background: var(--accent); }
    .activity-dot.orange { background: var(--accent-warm); }
    .activity-dot.blue { background: var(--accent-blue); }
    .activity-text { font-size: 13px; line-height: 1.5; }
    .activity-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

    /* ========== TOAST ========== */
    .toast-container-custom {
        position: fixed; bottom: 24px; right: 24px; z-index: 9999;
        display: flex; flex-direction: column; gap: 8px;
    }
    .toast-custom {
        padding: 14px 20px; border-radius: var(--radius-sm);
        background: var(--bg-elevated); border: 1px solid var(--border);
        box-shadow: var(--shadow); font-size: 13px;
        display: flex; align-items: center; gap: 10px;
        animation: slideInToast 0.3s ease;
        min-width: 280px;
    }
    .toast-custom.success { border-color: var(--border-accent); }
    .toast-custom.success i { color: var(--accent); }
    .toast-custom.error { border-color: rgba(239,68,68,0.3); }
    .toast-custom.error i { color: #ef4444; }
    @keyframes slideInToast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

    /* ========== SECTION HEADER ========== */
    .section-header { margin-bottom: 24px; }
    .section-header h3 { font-size: 22px; }
    .section-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

    /* ========== MISC ========== */
    .badge-level {
        font-size: 10px; font-weight: 700; padding: 3px 8px;
        border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
    }
    .badge-easy { background: rgba(0,229,160,0.12); color: var(--accent-dim); }
    .badge-medium { background: rgba(255,193,7,0.12); color: #ffc107; }
    .badge-hard { background: rgba(255,107,61,0.12); color: var(--accent-warm); }

    .difficulty-meter { display: flex; gap: 3px; }
    .difficulty-meter span {
        width: 4px; height: 14px; border-radius: 2px; background: rgba(255,255,255,0.08);
    }
    .difficulty-meter span.filled { background: var(--accent); }
    .difficulty-meter span.filled.medium { background: #ffc107; }
    .difficulty-meter span.filled.hard { background: var(--accent-warm); }

    /* ========== RESULT CARD ========== */
    .result-card {
        text-align: center; padding: 40px; max-width: 500px; margin: 0 auto;
    }
    .result-score {
        width: 120px; border-radius: 50%; margin: 0 auto 20px;
        display: flex; align-items: center; justify-content: center;
        font-size: 36px; font-weight: 800; font-family: var(--font-display);
    }

    .result-score.excellent { background: var(--accent-dim); color: var(--accent); border: 3px solid var(--accent); }
    .result-score.good { background: rgba(255,193,7,0.12); color: #ffc107; border: 3px solid #ffc107; }
    .result-score.needs-work { background: var(--accent-warm-dim); color: var(--accent-warm); border: 3px solid var(--accent-warm); }

    /* ========== RESPONSIVE ========== */
    @media (max-width: 992px) {
        .sidebar {
            transform: translateX(-100%); width: var(--sidebar-w) !important;
        }
        .sidebar.mobile-open { transform: translateX(0); }
        .main-wrap { margin-left: 0 !important; }
        .content-area { padding: 20px 16px; }
    }
    @media (max-width: 576px) {
        .welcome-banner { padding: 20px; }
        .welcome-banner h2 { font-size: 18px; }
        .stat-value { font-size: 22px; }
        .chat-bubble { max-width: 85%; }
    }

    /* Overlay mobile */
    .sidebar-overlay {
        display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
        z-index: 99;
    }
    .sidebar-overlay.show { display: block; }

    /* Pulse animation untuk AI features */
    .ai-pulse {
        animation: aiPulse 2s ease-in-out infinite;
    }
    @keyframes aiPulse {
        0%, 100% { box-shadow: 0 0 0 0 rgba(0, 229, 160, 0.2); }
        50% { box-shadow: 0 0 0 8px rgba(0, 229, 160, 0); }
    }

    /* Module detail panel */
    .module-list-item {
        display: flex; align-items: center; gap: 12px; padding: 12px 14px;
        border-radius: var(--radius-sm); border: 1px solid var(--border);
        margin-bottom: 6px; cursor: pointer; transition: var(--transition);
    }
    .module-list-item:hover { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.1); }
    .module-list-item.completed { border-color: rgba(0,229,160,0.15); }
    .module-list-item .mod-icon {
        width: 32px; height: 32px; border-radius: 8px;
        display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0;
    }
    .module-list-item.completed .mod-icon { background: var(--accent-dim); color: var(--accent); }
    .module-list-item:not(.completed) .mod-icon { background: rgba(255,255,255,0.05); color: var(--text-muted); }
    .module-list-item .mod-title { font-size: 13px; font-weight: 500; }
    .module-list-item .mod-duration { font-size: 11px; color: var(--text-muted); }
    .module-list-item.completed .mod-title { color: var(--accent-dim); }

    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    }

    /* ========== ADAPTIVE QUIZ IN CHAT ========== */
    .adaptive-option {
        padding: 12px 14px !important;
        margin-bottom: 8px !important;
        border-radius: 10px !important;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 10px;
        border: 1px solid var(--border) !important;
        background: rgba(255,255,255,0.02) !important;
    }

    .adaptive-option:hover {
        border-color: rgba(255,255,255,0.15) !important;
        background: rgba(255,255,255,0.04) !important;
        transform: translateX(4px);
    }

    .adaptive-option .opt-letter {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        border: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 12px;
        flex-shrink: 0;
        transition: all 0.2s ease;
    }

    .adaptive-option.selected .opt-letter {
        background: var(--accent);
        color: #0b0d13;
        border-color: var(--accent);
    }

    .adaptive-option.correct {
        border-color: var(--accent) !important;
        background: var(--accent-dim) !important;
    }
    .adaptive-option.correct .opt-letter {
        background: var(--accent);
        color: #0b0d13;
        border-color: var(--accent);
    }

    .adaptive-option.wrong {
        border-color: #ef4444 !important;
        background: rgba(239,68,68,0.08) !important;
    }
    .adaptive-option.wrong .opt-letter {
        background: #ef4444;
        color: #fff;
        border-color: #ef4444;
    }

    /* Quiz feedback animation */
    #quizFeedback_<id> {
        animation: slideInToast 0.3s ease;
    }

    .border-left-warning {
        border-left: .25rem solid #f6c23e !important;
    }
    .border-left-success {
        border-left: .25rem solid #1cc88a !important;
    }
    .border-left-danger {
        border-left: .25rem solid #e74a3b !important;
    }

    .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate {
        color: var(--text-muted) !important;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        color: var(--text-muted) !important;
        border: 1px solid var(--border) !important;
        margin: 0 2px !important;
        border-radius: 6px !important;
        background: transparent !important;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
        color: #0b0d13 !important;
        background: var(--accent) !important;
        border: 1px solid var(--accent) !important;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
        background: rgba(255,255,255,0.05) !important;
        border: 1px solid var(--border) !important;
        color: var(--text) !important;
    }
    .dataTables_filter input, .dataTables_length select {
        background: rgba(255,255,255,0.04) !important;
        color: var(--text) !important;
        border: 1px solid var(--accent-dim) !important;
        border-radius: 8px !important;
        padding: 6px 12px !important;
    }
    table.dataTable tbody tr {
        background-color: transparent !important;
    }
    table.dataTable thead th {
        border-bottom: 1px solid var(--border) !important;
        color: var(--text-muted);
        font-weight: 600;
    }
    table.dataTable tbody td {
        border-top: 1px solid var(--border) !important;
    }