/* ==========================================================================
   ASISTENKU - GLOBAL BENTO-GRID UI THEME (css/style.css)
   Lightweight GPU-Optimized Edition (Low CPU/GPU Usage)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-canvas: #dfe3f0;
    --sidebar-rail: #6966f5;
    --sidebar-rail-hover: #5b57e8;

    --glass-bg: #f6f7fb;
    --glass-card: #ffffff;
    --glass-card-elevated: #ffffff;
    --glass-card-hover: #ffffff;
    --glass-border: rgba(15, 23, 42, 0.05);
    --border-subtle: rgba(15, 23, 42, 0.08);
    --surface-subtle: #f1f3f9;

    --bento-shadow: 0 10px 28px rgba(24, 30, 54, 0.045), 0 2px 6px rgba(24, 30, 54, 0.02);
    --bento-shadow-hover: 0 18px 38px rgba(105, 102, 245, 0.13), 0 4px 12px rgba(24, 30, 54, 0.04);
    --glass-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);

    --text-main: #181c2e;
    --text-muted: #767d92;
    --primary: #1a1f2c;
    --primary-text: #ffffff;
    --accent: #6966f5;
    --accent-soft: rgba(105, 102, 245, 0.12);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --input-bg: #f1f3f9;
    --input-border: rgba(24, 28, 46, 0.1);
}

html.dark-mode,
body.dark-mode {
    --bg-canvas: #070910;
    --sidebar-rail: #4c49c9;
    --sidebar-rail-hover: #5c59df;

    --glass-bg: #111522;
    --glass-card: #181d2e;
    --glass-card-elevated: #1f253b;
    --glass-card-hover: #20273e;
    --glass-border: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.09);
    --surface-subtle: #121624;

    --bento-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
    --bento-shadow-hover: 0 18px 42px rgba(105, 102, 245, 0.24);
    --glass-shadow: 0 24px 54px rgba(0, 0, 0, 0.52);

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #ffffff;
    --primary-text: #111827;
    --accent: #817ef8;
    --accent-soft: rgba(129, 126, 248, 0.18);

    --input-bg: #121624;
    --input-border: rgba(255, 255, 255, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-canvas);
    color: var(--text-main);
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   BACKGROUND AURA RINGAN (NOL BEBAN GPU SAAT IDLE)
   ========================================================================== */
.animated-bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(105, 102, 245, 0.24) 0%, rgba(139, 92, 246, 0.08) 32%, transparent 58%),
        radial-gradient(circle at 88% 82%, rgba(99, 102, 241, 0.22) 0%, rgba(16, 185, 129, 0.08) 34%, transparent 60%);
}

body.dark-mode .animated-bg-wrapper {
    background:
        radial-gradient(circle at 10% 20%, rgba(105, 102, 245, 0.32) 0%, rgba(139, 92, 246, 0.12) 34%, transparent 62%),
        radial-gradient(circle at 90% 82%, rgba(99, 102, 241, 0.28) 0%, rgba(16, 185, 129, 0.10) 36%, transparent 64%);
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(118, 125, 146, 0.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(118, 125, 146, 0.45); }

/* ==========================================================================
   JENDELA APLIKASI MELAYANG DI TENGAH
   ========================================================================== */
@keyframes windowEntrance {
    from { opacity: 0; transform: scale(0.985) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.app-window {
    width: 100%;
    max-width: 1520px;
    height: calc(100vh - 32px);
    min-height: 0;
    background: var(--glass-bg);
    border: none;
    border-radius: 36px;
    box-shadow: 0 28px 70px rgba(24, 30, 54, 0.12),
                0 6px 20px rgba(24, 30, 54, 0.05),
                inset 0 0 0 1px rgba(255, 255, 255, 0.65);
    display: flex;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: windowEntrance 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.dark-mode .app-window {
    box-shadow: 0 30px 75px rgba(0, 0, 0, 0.58),
                inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   SIDEBAR MELENGKUNG S-CURVE ORGANIK (GPU-ACCELERATED EXPAND, ZERO REFLOW)
   ========================================================================== */
.sidebar-icons {
    align-self: center;
    position: relative;
    width: 77px;
    min-width: 77px;
    max-width: 77px;
    height: auto;
    margin: 44px 0 44px -1px;
    padding: 20px 0 20px 1px;
    border-radius: 0 42px 42px 0;
    background: linear-gradient(180deg, #7471ff 0%, var(--sidebar-rail) 55%, #5652e4 100%);
    box-shadow: none;
    filter: drop-shadow(10px 12px 24px rgba(105, 102, 245, 0.34));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    overflow: visible;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 60;
    contain: layout style;
}

/* Kurva S terbalik di ujung atas sidebar */
.sidebar-icons::before {
    content: "";
    position: absolute;
    top: -39px;
    left: 0;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 100% 0%, transparent 39.8px, #7471ff 40px);
    pointer-events: none;
}

/* Kurva S terbalik di ujung bawah sidebar */
.sidebar-icons::after {
    content: "";
    position: absolute;
    bottom: -39px;
    left: 0;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 100% 100%, transparent 39.8px, #5652e4 40px);
    pointer-events: none;
}

/* Saat hover, sidebar melebar secara melayang tanpa mendorong konten utama */
.sidebar-icons:hover {
    width: 233px;
    max-width: 233px;
    margin-right: -156px; /* Mengunci posisi .main-container agar nol reflow! */
    box-shadow: none;
    filter: drop-shadow(16px 18px 34px rgba(105, 102, 245, 0.44));
}

.sidebar-brand-top,
.sidebar-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px;
    overflow: hidden;
}

.sidebar-bottom {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-icons .nav-icon-btn {
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 0 4px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-icons .nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.sidebar-icons .nav-icon-box {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease, background-color 0.15s ease, color 0.15s ease;
}

.sidebar-icons .nav-icon-btn:hover .nav-icon-box {
    transform: scale(1.06);
}

.sidebar-icons .nav-icon-btn.active {
    color: #ffffff;
}

.sidebar-icons .nav-icon-btn.active .nav-icon-box {
    background: #ffffff;
    color: var(--sidebar-rail);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.sidebar-icons .brand-logo-btn {
    height: 48px;
    min-height: 48px;
}

.sidebar-icons .brand-icon-box {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #e6e7ff 100%);
    color: var(--sidebar-rail);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(20, 18, 92, 0.25);
    transition: transform 0.25s ease;
}

.sidebar-icons .brand-logo-btn:hover .brand-icon-box {
    transform: rotate(-8deg) scale(1.06);
}

.brand-title-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title-text {
    font-size: 15.5px !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub-text {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-icons .nav-logout-btn:hover {
    background: rgba(239, 68, 68, 0.28);
    color: #fecaca;
}

.sidebar-icons .sidebar-text {
    opacity: 0;
    visibility: hidden;
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    transform: translate3d(-6px, 0, 0);
    transition: opacity 0.18s ease, transform 0.2s ease, visibility 0.18s ease;
}

.sidebar-icons:hover .sidebar-text {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
}
/* ==========================================================================
   KARTU PROFIL PREMIUM DI BAWAH SIDEBAR
   ========================================================================== */
.sidebar-profile-card {
    margin-top: 6px;
    padding: 6px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 20px rgba(24, 20, 102, 0.18);
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sidebar-profile-card:hover,
.sidebar-profile-card.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.16) 100%);
    border-color: rgba(255, 255, 255, 0.45);
}

.sidebar-avatar-wrap {
    position: relative;
    width: 38px;
    min-width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.sidebar-avatar-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--sidebar-rail);
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.sidebar-avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid var(--sidebar-rail);
}

.sidebar-profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sidebar-profile-info strong {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role-pill {
    display: inline-block;
    width: fit-content;
    padding: 1px 8px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.profile-arrow-icon {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.75) !important;
    margin-right: 4px;
}

/* ==========================================================================
   AREA KONTEN UTAMA & TOP NAVBAR + STATUS PILLS
   ========================================================================== */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px 30px 28px 26px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    animation: pageFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    flex-shrink: 0;
}

.top-status-pills {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pill-badge {
    background: var(--glass-card);
    border: 1px solid var(--border-subtle);
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    transition: transform 0.2s ease;
}

.status-pill-badge:hover { transform: translateY(-2px); }

.pulse-green-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    display: inline-block;
}

.brand-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
}

.top-search-pill {
    flex: 1;
    max-width: 340px;
    background: var(--glass-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    padding: 9px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search-pill:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.top-search-pill i { color: var(--text-muted); font-size: 13px; }
.top-search-pill input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
    outline: none;
}

.page-center-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-pill-switch {
    background: var(--glass-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.theme-pill-switch .theme-opt {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    transition: background 0.2s ease, color 0.2s ease;
}

body:not(.dark-mode) .theme-pill-switch .light-opt { background: var(--accent); color: #ffffff; }
body.dark-mode .theme-pill-switch .dark-opt        { background: var(--accent); color: #ffffff; }

.top-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.top-icon-circle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-dark-cta {
    background: var(--primary);
    color: var(--primary-text);
    border: none;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-dark-cta:hover {
    opacity: 0.92;
    transform: translateY(-2px);
}

/* ==========================================================================
   KARTU BENTO GLOBAL (BERLAKU DI SEMUA HALAMAN)
   ========================================================================== */
@keyframes globalCardReveal {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.glass-card,
.dash-panel-box,
.dash-widget-card,
.quiz-question-card,
.vault-item-card,
.schedule-day {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--bento-shadow);
    animation: globalCardReveal 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card.interactive:hover,
.dash-widget-card:hover,
.quiz-question-card:hover,
.vault-item-card:hover,
.schedule-day:hover {
    transform: translateY(-4px);
    box-shadow: var(--bento-shadow-hover);
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.page-hero-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.page-hero-bar h1,
#header-text h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 4px;
}

.page-hero-bar p,
#header-text p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ==========================================================================
   TOMBOL, KAPSUL & PENGUNCI EFEK RIPPLE
   ========================================================================== */
button,
.btn-pill,
.btn-pill-secondary,
.btn-primary,
.btn-secondary,
.btn-ai-magic,
.btn-done,
.btn-icon-small,
.tab-btn,
.nav-icon-btn,
.btn-dark-cta {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.ripple-circle {
    position: absolute !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.35) !important;
    transform: scale(0);
    animation: rippleExpand 0.5s ease-out forwards !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
}

body:not(.dark-mode) .tab-btn:not(.active) > .ripple-circle,
body:not(.dark-mode) .btn-pill-secondary > .ripple-circle,
body:not(.dark-mode) .btn-secondary > .ripple-circle {
    background: rgba(105, 102, 245, 0.2) !important;
}

@keyframes rippleExpand {
    0%   { transform: scale(0); opacity: 0.85; }
    100% { transform: scale(2.4); opacity: 0; }
}

.btn-pill,
.btn-primary {
    background: var(--primary);
    color: var(--primary-text);
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-pill:hover,
.btn-primary:hover { opacity: 0.92; transform: translateY(-2px); }

.btn-pill-secondary,
.btn-secondary {
    background: var(--glass-card);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-pill-secondary:hover,
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.ai-badge {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ai-hint { font-size: 13px; color: var(--text-muted); }

/* ==========================================================================
   TAB HORIZONTAL & KARTU TUGAS (PUSAT TUGAS)
   ========================================================================== */
.horizontal-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }

.tab-btn {
    background: var(--glass-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.tab-btn:hover { color: var(--text-main); border-color: var(--accent); }
.tab-btn.active { background: var(--accent); color: #ffffff; border-color: var(--accent); box-shadow: 0 6px 16px rgba(105, 102, 245, 0.28); }

.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }

.task-card {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: var(--bento-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.task-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--accent); }
.task-card[data-priority="kritis"]::before     { background: linear-gradient(90deg, #ef4444, #f97316); }
.task-card[data-priority="peringatan"]::before { background: linear-gradient(90deg, #f59e0b, #eab308); }
.task-card[data-priority="aman"]::before       { background: linear-gradient(90deg, #10b981, #3b82f6); }
.task-card:hover { transform: translateY(-4px); box-shadow: var(--bento-shadow-hover); }

.task-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.task-course-icon { width: 40px; height: 40px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.task-course-icon.kritis     { background: rgba(239, 68, 68, 0.14); color: var(--danger); }
.task-course-icon.peringatan { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.task-course-icon.aman       { background: rgba(16, 185, 129, 0.14); color: var(--success); }

.task-card .badge { padding: 5px 13px; border-radius: 50px; font-size: 11.5px; font-weight: 700; }
.task-card .badge.kritis     { background: rgba(239, 68, 68, 0.14); color: var(--danger); }
.task-card .badge.peringatan { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.task-card .badge.aman       { background: rgba(16, 185, 129, 0.14); color: var(--success); }

.task-card-body h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 5px; }
.task-card-body .course { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 7px; }

.task-meta-box { background: var(--surface-subtle); border-radius: 16px; padding: 11px 14px; display: flex; flex-direction: column; gap: 6px; }
.task-meta-box .meta-row,
.task-meta-box .time-left { font-size: 12.5px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.task-meta-box .time-left { color: var(--text-main); }
.task-meta-box .time-left.text-danger { color: var(--danger); }

.task-actions { display: flex; align-items: center; gap: 8px; }
.btn-done {
    flex: 1; background: rgba(16, 185, 129, 0.14); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 10px 16px; border-radius: 50px; font-size: 13px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: all 0.2s ease;
}
.btn-done:hover { background: var(--success); color: #ffffff; }

.btn-icon-small {
    width: 38px; height: 38px; border-radius: 50%; background: var(--surface-subtle); border: 1px solid var(--border-subtle);
    color: var(--text-main); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease;
}
.btn-icon-small.edit:hover   { background: var(--info); color: #ffffff; border-color: var(--info); }
.btn-icon-small.delete:hover { background: var(--danger); color: #ffffff; border-color: var(--danger); }

.empty-state-box {
    grid-column: 1 / -1; text-align: center; padding: 44px 20px; background: var(--glass-card);
    border: 1.5px dashed var(--border-subtle); border-radius: 28px; color: var(--text-muted);
}
.empty-state-box i { font-size: 2.4rem; color: var(--accent); margin-bottom: 12px; display: block; }

/* ==========================================================================
   KALENDER AGENDA BENTO
   ========================================================================== */
.calendar-nav-controls { display: flex; align-items: center; gap: 6px; }
.calendar-nav-btn {
    width: 28px; height: 28px; border-radius: 50%; background: var(--surface-subtle); border: 1px solid var(--border-subtle);
    color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; transition: all 0.2s ease;
}
.calendar-nav-btn:hover { background: var(--accent); color: #ffffff; border-color: var(--accent); }

.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); padding-bottom: 8px; margin-bottom: 6px; }
.calendar-days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }

.calendar-day-cell {
    min-height: 44px; padding: 5px 2px; border-radius: 12px; background: transparent; border: 1px solid transparent;
    color: var(--text-main); font-size: 12.5px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; cursor: pointer;
    transition: background 0.15s ease;
}
.calendar-day-cell:hover { background: var(--surface-subtle); }
.calendar-day-cell.empty { pointer-events: none; }

.calendar-day-cell > span:first-child { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.calendar-day-cell.today > span:first-child { background: var(--accent); color: #ffffff; font-weight: 800; box-shadow: 0 4px 12px rgba(105, 102, 245, 0.4); }

.cal-previews { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cal-text-preview { width: 92%; font-size: 9px; font-weight: 600; padding: 1px 4px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.cal-text-preview.is-note { background: var(--accent-soft); color: var(--accent); }
.cal-text-preview.is-task { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.cal-text-preview.is-more { color: var(--text-muted); }

.calendar-legend { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-subtle); font-size: 11px; color: var(--text-muted); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.cal-dot.note { background: var(--accent); }
.cal-dot.task { background: var(--danger); }

.cal-modal-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--surface-subtle); margin-bottom: 8px; font-size: 13.5px; }
.cal-modal-item.is-task { border-left: 3px solid var(--danger); }
.cal-modal-item.is-note { border-left: 3px solid var(--accent); }

/* ==========================================================================
   MODAL, FORM, CUSTOM SELECT, TOAST & CONFETTI
   ========================================================================== */
@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-overlay,
.glass-modal-overlay {
    position: fixed; inset: 0; background: rgba(15, 20, 30, 0.55);
    display: none; align-items: center; justify-content: center; z-index: 9999; padding: 20px;
}
.modal-overlay.active,
.modal-overlay[style*="display: flex"] { display: flex; }

.modal-content,
.glass-modal-box {
    background: var(--glass-card); border: 1px solid var(--border-subtle); border-radius: 28px;
    padding: 28px; width: 100%; max-width: 460px; box-shadow: var(--glass-shadow);
    animation: modalPopIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.modal-content h2 { font-size: 20px; font-weight: 800; margin-bottom: 18px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea,
.glass-input,
.glass-select,
.glass-textarea {
    width: 100%; background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text-main);
    padding: 11px 15px; border-radius: 14px; font-size: 14px; outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.glass-input:focus,
.glass-select:focus,
.glass-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.custom-select-wrapper { position: relative; flex: 1; width: 100%; user-select: none; }
.custom-select-trigger {
    width: 100%; background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text-main);
    padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 500;
    display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
}
.vault-filter-group .custom-select-trigger { background: var(--glass-card); border: 1px solid var(--border-subtle); padding: 12px 16px 12px 42px; border-radius: 50px; }
.custom-select-menu {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: 230px; overflow-y: auto;
    background: var(--glass-card); border: 1px solid var(--border-subtle); border-radius: 18px; padding: 6px;
    box-shadow: var(--glass-shadow); z-index: 10020; opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.2s ease, visibility 0.18s ease;
}
.custom-select-wrapper.open .custom-select-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.custom-select-option { padding: 10px 14px; border-radius: 12px; font-size: 13.5px; display: flex; justify-content: space-between; cursor: pointer; transition: background 0.15s ease; }
.custom-select-option:hover { background: var(--accent-soft); color: var(--accent); }
.custom-select-option.selected { background: var(--accent); color: #ffffff; font-weight: 600; }

/* Brankas, Kuis & Jadwal Komponen Global */
.vault-card { display: flex; flex-direction: column; height: 100%; }
.vault-card > div:nth-child(2) { flex: 1; margin-bottom: 14px; }
.custom-file-dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 8px; padding: 22px 16px; border-radius: 18px;
    background: var(--input-bg); border: 1.5px dashed var(--input-border); cursor: pointer;
}
.custom-file-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.vault-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: auto; padding-top: 10px; }
.btn-vault-action { padding: 9px 10px; border-radius: 50px; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid transparent; }
.btn-vault-action.span-2 { grid-column: 1 / -1; }
.btn-vault-action.primary { background: rgba(16, 185, 129, 0.14); color: var(--success); }
.btn-vault-action.secondary { background: var(--surface-subtle); color: var(--text-main); }
.btn-vault-action.quiz { background: var(--accent-soft); color: var(--accent); }
.btn-vault-action.danger { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

.quiz-question-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; gap: 10px; }
.quiz-options-list { display: flex; flex-direction: column; gap: 10px; }
.quiz-option-label { display: flex; align-items: center; gap: 12px; background: var(--input-bg); border: 1px solid var(--input-border); padding: 12px 16px; border-radius: 14px; cursor: pointer; }
.quiz-essay-input { width: 100%; background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text-main); padding: 14px; border-radius: 14px; min-height: 90px; }

.schedule-next { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 18px; border-radius: 18px; background: var(--accent-soft); font-size: 13.5px; }
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.schedule-day.is-today { border-color: var(--accent); }
.schedule-day-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 10px; }
.schedule-today-badge { background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 50px; }
.schedule-item { padding: 10px 12px; border-radius: 14px; background: var(--surface-subtle); border-left: 3px solid var(--accent); margin-bottom: 8px; }
.schedule-time { font-size: 11.5px; color: var(--accent); font-weight: 700; }
.schedule-course { font-weight: 700; font-size: 13.5px; }
.schedule-room { font-size: 12px; color: var(--text-muted); }

/* Toast & Confetti */
.global-toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 10000; pointer-events: none; }
.global-toast-item { background: var(--glass-card); border: 1px solid var(--border-subtle); color: var(--text-main); padding: 12px 18px; border-radius: 16px; box-shadow: var(--glass-shadow); display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; opacity: 0; transform: translateY(14px) scale(0.96); transition: opacity 0.25s ease, transform 0.25s ease; }
.global-toast-item.show { opacity: 1; transform: translateY(0) scale(1); }
.confetti-piece { position: fixed; top: -12px; width: 9px; height: 9px; border-radius: 2px; z-index: 10001; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   RESPONSIF LAYAR KECIL (MOBILE)
   ========================================================================== */
@media (max-width: 900px) {
    html, body { overflow: auto; height: auto; }
    body { padding: 0; display: block; }
    .app-window {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        border-radius: 0;
        border: none;
    }
    .sidebar-icons,
    .sidebar-icons:hover {
        align-self: stretch;
        width: calc(100% - 24px);
        min-width: auto;
        max-width: none;
        height: 64px;
        max-height: none;
        margin: 12px 12px 0 12px;
        padding: 0 14px;
        border-radius: 24px;
        flex-direction: row;
        align-items: center;
    }
    .sidebar-icons::before,
    .sidebar-icons::after,
    .sidebar-brand-top,
    .top-status-pills,
    .top-search-pill { display: none; }
    .sidebar-bottom { padding-top: 0; border-top: none; }
    .sidebar-group { flex-direction: row; width: auto; padding: 0; gap: 6px; }
    .sidebar-icons .nav-icon-btn { width: 42px; height: 42px; padding: 0; justify-content: center; }
    .sidebar-icons .sidebar-text { display: none !important; }
    .sidebar-profile-card { padding: 2px; background: transparent; border: none; margin-top: 0; box-shadow: none; }
    .main-container { padding: 18px 16px 28px 16px; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ANIMASI TRANSISI TEMA GPU SOFT SWEEP (RINGAN & HEMAT MEMORI)
   ========================================================================== */
#gpu-theme-sweep {
    position: fixed;
    inset: -10%;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(110%, 0, 0) skewX(-12deg);
}

#gpu-theme-sweep.to-dark {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(15, 23, 42, 0.85) 28%,
        #0b0f19 50%,
        rgba(30, 27, 75, 0.92) 72%,
        transparent 100%
    );
}

#gpu-theme-sweep.to-light {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(241, 245, 249, 0.88) 28%,
        #f8fafc 50%,
        rgba(224, 231, 255, 0.92) 72%,
        transparent 100%
    );
}

#gpu-theme-sweep.is-active {
    animation: capcutGpuSweep 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes capcutGpuSweep {
    0% {
        opacity: 0.4;
        transform: translate3d(110%, 0, 0) skewX(-12deg);
    }
    45% {
        opacity: 1;
    }
    55% {
        opacity: 1;
    }
    100% {
        opacity: 0.2;
        transform: translate3d(-110%, 0, 0) skewX(-12deg);
    }
}

.main-workspace {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-theme-sweeping .main-workspace {
    transform: scale(0.992);
}

body.is-theme-sweeping *,
body.is-theme-sweeping *::before,
body.is-theme-sweeping *::after {
    transition: none !important;
}

/* ==========================================================================
   TRANSISI PERPINDAHAN HALAMAN (MPA - CROSS DOCUMENT VIEW TRANSITIONS)
   ========================================================================== */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: 0.3s cubic-bezier(0.4, 0, 1, 1) both page-fade-out;
}

::view-transition-new(root) {
    animation: 0.4s cubic-bezier(0, 0, 0.2, 1) 0.1s both page-fade-in;
}

@keyframes page-fade-out {
    to {
        opacity: 0;
        transform: translateY(-15px);
    }
}

@keyframes page-fade-in {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ==========================================================================
   GPU SOFT LIGHT/DARK SWEEP (SAPUAN TIRAI CAHAYA MULUS)
   ========================================================================== */
#gpu-theme-sweep {
    position: fixed;
    inset: -12%;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
    transform: translate3d(115%, 0, 0) skewX(-14deg);
}

#gpu-theme-sweep.to-dark {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(105, 102, 245, 0.22) 18%,
        rgba(15, 23, 42, 0.90) 34%,
        #070910 50%,
        rgba(30, 27, 75, 0.92) 68%,
        rgba(105, 102, 245, 0.18) 84%,
        transparent 100%
    );
}

#gpu-theme-sweep.to-light {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(129, 126, 248, 0.24) 18%,
        rgba(241, 245, 249, 0.92) 34%,
        #f6f7fb 50%,
        rgba(224, 231, 255, 0.94) 68%,
        rgba(129, 126, 248, 0.20) 84%,
        transparent 100%
    );
}

#gpu-theme-sweep.is-active {
    animation: gpuSoftLightSweep 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

@keyframes gpuSoftLightSweep {
    0% {
        opacity: 0.35;
        transform: translate3d(115%, 0, 0) skewX(-14deg);
    }
    45% {
        opacity: 1;
    }
    55% {
        opacity: 1;
    }
    100% {
        opacity: 0.15;
        transform: translate3d(-115%, 0, 0) skewX(-14deg);
    }
}

.app-window {
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-theme-sweeping .app-window {
    transform: scale(0.992);
}

body.is-theme-sweeping *,
body.is-theme-sweeping *::before,
body.is-theme-sweeping *::after {
    transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
    *:not(#gpu-theme-sweep), *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
