/**
 * HopperIT v0.2 — Design System
 * Google Classroom-Inspired Modern UI
 * 
 * Theme: Prussian Blue × Orange × Clean Neutrals
 * Palette: #14213D · #2F2F33 · #FCA311 · #E5E5E5 · #F5F6F7
 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* --- Primary: Prussian Blue --- */
    --primary: #14213D;
    --primary-light: #1b2d52;
    --primary-dark: #0d1628;
    --primary-50: #f0f3f8;
    --primary-100: #dce3ef;
    --primary-200: #b8c6de;
    --primary-300: #8da3c7;
    --primary-400: #6580b0;
    --primary-500: #3d5a8a;
    --primary-600: #2a4270;
    --primary-700: #1b2d52;
    --primary-800: #14213D;
    --primary-900: #0d1628;

    /* --- Accent: Orange (Signature HopperIT) --- */
    --accent: #FCA311;
    --accent-light: #fdb940;
    --accent-dark: #e89300;
    --accent-50: #fff8e6;
    --accent-100: #fef0cc;
    --accent-500: #FCA311;
    --accent-600: #e89300;
    --accent-700: #cc8200;

    /* --- Graphite (Secondary Dark) --- */
    --graphite: #2F2F33;
    --graphite-light: #45454a;
    --graphite-dark: #1a1a1d;

    /* --- Success --- */
    --success: #22c55e;
    --success-light: #dcfce7;
    --success-dark: #16a34a;

    /* --- Warning --- */
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #d97706;

    /* --- Danger --- */
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-dark: #dc2626;

    /* --- Info --- */
    --info: #3b82f6;
    --info-light: #dbeafe;
    --info-dark: #2563eb;

    /* --- Surfaces (Google Classroom-style) --- */
    --bg: #F5F6F7;
    --bg-secondary: #eef0f2;
    --surface: #ffffff;
    --surface-hover: #fafbfc;
    --surface-active: #f0f1f3;

    /* --- Text --- */
    --text: #2F2F33;
    --text-secondary: #5f6368;
    --text-muted: #9aa0a6;
    --text-inverse: #ffffff;

    /* --- Borders --- */
    --border: #E5E5E5;
    --border-light: #f0f0f0;
    --border-focus: #FCA311;

    /* --- Shadows (softer, Google-style) --- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 4px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.1), 0 8px 16px -8px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --shadow-card-hover: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);

    /* --- Radius (rounder, Google-style) --- */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* --- Transitions --- */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* --- Layout --- */
    --sidebar-width: 270px;
    --topbar-height: 64px;
    --mobile-nav-height: 64px;
    --content-max-width: 1280px;

    /* --- Typography --- */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   Dark Mode — Variable Overrides
   ============================================ */
[data-theme="dark"] {
    /* --- Primary: lighter shade for readability --- */
    --primary: #3d5a8a;
    --primary-light: #4d6d9e;
    --primary-dark: #14213D;
    --primary-50: #1a1f2e;
    --primary-100: #1e2538;
    --primary-200: #2a3650;
    --primary-300: #3d5072;
    --primary-400: #5070a0;
    --primary-500: #6890c0;
    --primary-600: #3d5a8a;
    --primary-700: #2a4270;
    --primary-800: #1b2d52;
    --primary-900: #14213D;

    /* --- Surfaces (dark) --- */
    --bg: #111318;
    --bg-secondary: #16181e;
    --surface: #1e2028;
    --surface-hover: #252830;
    --surface-active: #2c2f38;

    /* --- Text (light on dark) --- */
    --text: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-muted: #6e7278;
    --text-inverse: #111318;

    /* --- Borders (dark) --- */
    --border: #32353b;
    --border-light: #282a30;
    --border-focus: #FCA311;

    /* --- Success --- */
    --success-light: rgba(34,197,94,.15);
    /* --- Warning --- */
    --warning-light: rgba(245,158,11,.15);
    /* --- Danger --- */
    --danger-light: rgba(239,68,68,.15);
    /* --- Info --- */
    --info-light: rgba(59,130,246,.15);

    /* --- Shadows (stronger for dark bg) --- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 4px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.4), 0 8px 16px -8px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 1px 2px 0 rgba(0,0,0,.4), 0 1px 3px 1px rgba(0,0,0,.25);
    --shadow-card-hover: 0 1px 3px 0 rgba(0,0,0,.4), 0 4px 8px 3px rgba(0,0,0,.3);

    color-scheme: dark;
}

/* Dark mode: component-specific overrides */
[data-theme="dark"] .topbar { background: #0f1724; }
[data-theme="dark"] .sidebar { background: #0d1628; }
[data-theme="dark"] .card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .mobile-nav { background: #0f1724; border-color: var(--border); }
[data-theme="dark"] .page-hero { background: linear-gradient(135deg, #0d1628, #1b2d52); }
/* Sidebar brand text — HopperIT yellow glow in dark mode */
[data-theme="dark"] .sidebar-brand-text {
    color: #FCA611;
    text-shadow: 0 0 10px rgba(252,166,17,.65), 0 0 22px rgba(252,166,17,.3);
}
/* Dashboard welcome banner — deeper dark gradient */
[data-theme="dark"] .dash-banner {
    background: linear-gradient(135deg, #0a1220 0%, #111d38 100%);
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="dark"] .modal-content,
[data-theme="dark"] .tdp-sheet {
    background: var(--surface);
    border-color: var(--border);
}
[data-theme="dark"] .chip-warning { background: rgba(245,158,11,.15); color: #fbbf24; }
[data-theme="dark"] .chip-success { background: rgba(34,197,94,.15); color: #4ade80; }
[data-theme="dark"] .chip-danger  { background: rgba(239,68,68,.15); color: #f87171; }
[data-theme="dark"] .chip-info    { background: rgba(59,130,246,.15); color: #60a5fa; }

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    transition: background .2s, color .2s;
    font-size: 1.05rem;
}
.theme-toggle:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100%;
}

/* Remove tap highlight on mobile / touch devices */
html, body, * {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   PWA Update Banner
   ============================================ */
#pwa-update-banner {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    width: min(500px, calc(100vw - 2rem));
    background: var(--surface);
    border: 2px solid var(--accent);
    border-radius: 18px;
    box-shadow: 0 12px 48px rgba(14, 20, 36, 0.3), 0 1px 3px rgba(252, 163, 17, 0.5);
    padding: 1.2rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: bottom 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: none;
    opacity: 0;
    backdrop-filter: blur(10px);
}
#pwa-update-banner.show {
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    pointer-events: all;
    opacity: 1;
}
@media (max-width: 768px) {
    #pwa-update-banner {
        width: min(420px, calc(100vw - 1rem));
        padding: 1rem 1.1rem;
    }
    #pwa-update-banner.show {
        bottom: calc(var(--mobile-nav-height, 64px) + 0.75rem + env(safe-area-inset-bottom, 0px));
    }
}
#pwa-update-banner .pwa-update-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark, #c97f00));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(252, 163, 17, 0.35);
}
#pwa-update-banner .pwa-update-text {
    flex: 1;
    min-width: 0;
}
#pwa-update-banner .pwa-update-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 2px;
}
#pwa-update-banner .pwa-update-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}
#pwa-update-banner .pwa-update-actions {
    display: flex;
    gap: 0.45rem;
    flex-shrink: 0;
    pointer-events: auto;
}
#pwa-update-banner .pwa-btn-update {
    background: var(--accent);
    color: #1a1200;
    border: none;
    border-radius: 10px;
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    white-space: nowrap;
    pointer-events: auto;
    z-index: 1000000;
}
#pwa-update-banner .pwa-btn-update:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
#pwa-update-banner .pwa-btn-dismiss {
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    pointer-events: auto;
    z-index: 1000000;
}
#pwa-update-banner .pwa-btn-dismiss:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

/* Lock html scroll when modal or sidebar open */
html.modal-open,
html.sidebar-open {
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100%;
    height: 100%;
    overflow: hidden;
}

/* Modal open state — prevent scroll without layout shift */
body.modal-open {
    overflow: hidden;
}

/* Sidebar open state on mobile — prevent scroll */
body.sidebar-open {
    overflow: hidden;
}

/* ============================================
   Custom Scrollbar — Modern Auto-hide
   ============================================ */

/* Remove scrollbar arrow buttons and corners */
::-webkit-scrollbar-button {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
}

::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Scrollbar size */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* Track transparent */
::-webkit-scrollbar-track {
    background: transparent !important;
}

/* Thumb hidden by default */
::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background 0.8s ease;
}

/* ============================================
   Pull-to-Refresh Indicator
   ============================================ */
.pull-refresh-indicator {
    position: fixed;
    top: calc(var(--topbar-height) + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-72px);
    opacity: 0;
    z-index: 500;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    white-space: nowrap;
    will-change: transform, opacity;
    transition: color 0.2s, border-color 0.2s;
}
.pull-refresh-indicator .ptr-icon {
    font-size: 0.85rem;
    transition: transform 0.2s;
}
.pull-refresh-indicator.ptr-ready {
    color: var(--primary);
    border-color: var(--primary);
}
.pull-refresh-indicator.ptr-refreshing .ptr-icon,
.pull-refresh-indicator.ptr-ready .ptr-icon {
    animation: ptr-spin 0.7s linear infinite;
}
@keyframes ptr-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* app-scroll-body: main scrollable area below topbar */
.app-scroll-body::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background 0.8s ease;
}
.app-scroll-body.is-scrolling::-webkit-scrollbar-thumb {
    background: #FCA311;
    transition: background 0s;
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-button {
    display: none !important;
    height: 0 !important;
}
.sidebar::-webkit-scrollbar-corner {
    background: transparent !important;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent !important;
}
.sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background 0.8s ease;
}
.sidebar.is-scrolling::-webkit-scrollbar-thumb,
.sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(252, 163, 17, 0.6);
    transition: background 0s;
}

/* (Old notification-panel-body scrollbar removed — see .notif-panel-body styles) */

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.app-scroll-body.is-scrolling {
    scrollbar-color: #FCA311 transparent;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: 1.875rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

small, .text-sm {
    font-size: 0.8125rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-muted {
    color: var(--text-muted);
}

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

/* ============================================
   Layout — App Shell
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-height, 100dvh);
    height: 100vh;
    height: 100dvh;
    height: var(--app-height, 100dvh);
    overflow: hidden;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    height: var(--app-height, 100dvh);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
    overflow: hidden;
}

.app-scroll-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: var(--topbar-height);
}

.app-content {
    padding: 24px 32px;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* ============================================
   Sidebar — Google Classroom Inspired
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    height: var(--app-height, 100dvh);
    background: var(--primary);
    color: var(--text-inverse);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-slow);
    overflow: hidden;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: var(--topbar-height);
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 4px;
}

.sidebar-brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.sidebar-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-brand-version {
    font-size: 0.625rem;
    opacity: 0.4;
    margin-left: 4px;
    font-weight: 400;
}

.sidebar-nav {
    padding: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 0 10px 0;
    scrollbar-width: thin;
}

.sidebar-nav-footer {
    margin-top: auto;
    flex-shrink: 0;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(13,22,40,0) 0%, rgba(13,22,40,.78) 18%, rgba(13,22,40,.98) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    box-shadow: 0 -14px 30px rgba(2, 6, 23, 0.22);
}

.sidebar-logout {
    border-top: none;
    padding-top: 0 !important;
    margin-top: 0;
    padding-bottom: 0 !important;
}

/* PWA Install Button in Sidebar */
.sidebar-install-btn {
    background: none;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.55) !important;
    font-family: inherit;
    width: calc(100% - 0px);
    cursor: pointer;
    margin-top: 4px;
    transition: all var(--transition-fast) !important;
}
.sidebar-install-btn:hover {
    background: rgba(252, 163, 17, 0.12) !important;
    border-color: rgba(252, 163, 17, 0.35);
    color: var(--accent) !important;
}
.sidebar-install-btn i {
    font-size: 0.9rem;
}

.sidebar-section {
    padding: 0 14px;
    margin-bottom: 12px;
}

.sidebar-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
    padding: 12px 12px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.875rem;
    font-weight: 450;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 2px;
    position: relative;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

.sidebar-link.active {
    background: rgba(252, 163, 17, 0.15);
    color: var(--accent);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.sidebar-link i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-link:hover i {
    opacity: 1;
}

.sidebar-link.active i {
    opacity: 1;
    color: var(--accent);
}

.sidebar-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================
   Topbar — Clean & Minimal
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: #132952;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 90;
    transition: left var(--transition-slow);
    color: rgba(255, 255, 255, 0.9);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.topbar-breadcrumb {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
    font-size: 1.1rem;
}

.topbar-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.topbar-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
}

.topbar-avatar:hover {
    box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.2);
}

/* Topbar dark background text colors */
.topbar-title {
    color: rgba(255, 255, 255, 0.95);
}

.topbar-breadcrumb {
    color: rgba(255, 255, 255, 0.6);
}

.topbar-btn {
    color: rgba(255, 255, 255, 0.7);
}

.topbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
}

.topbar-btn .badge-dot {
    border: 2px solid #132952;
}

.menu-toggle {
    display: none;
}

/* ============================================
   Online Users Indicator
   ============================================ */
.online-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.07);
    cursor: default;
    transition: background var(--transition-fast);
    position: relative;
}

.online-indicator:hover {
    background: rgba(255, 255, 255, 0.12);
}

.online-avatars {
    display: flex;
    flex-direction: row-reverse;
}

.online-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 2px solid #132952;
    margin-left: -8px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.online-avatar:last-child {
    margin-left: 0;
}

.online-avatar:hover {
    transform: scale(1.15);
    z-index: 5;
}

.online-avatar.is-self {
    background: var(--accent);
    color: #132952;
}

.online-avatar.is-overflow {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.5625rem;
}

/* Profile photo inside online avatar circle */
.online-avatar.has-photo {
    background: none;
    padding: 0;
    overflow: hidden;
}

.online-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Profile photo inside tooltip */
img.ot-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.online-count {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50%      { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

/* Tooltip on hover showing full list */
.online-indicator .online-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    max-width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 200;
}

.online-indicator:hover .online-tooltip {
    display: block;
}

.online-tooltip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    color: var(--text);
}

.online-tooltip-item .ot-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.online-tooltip-item .ot-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-tooltip-item .ot-role {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* ============================================
   Page Header (legacy — kept for compatibility)
   ============================================ */
.page-header {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   Page Hero — Signature Header (all pages)
   ============================================ */
.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--primary);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 6px 24px rgba(20,33,61,.35);
}
/* Left accent stripe */
.page-hero::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
/* Watermark dot pattern top-right */
.page-hero::after {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(252,163,17,.12) 0%, transparent 65%);
    pointer-events: none;
}
.page-hero-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}
.page-hero-icon {
    width: 50px; height: 50px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    box-shadow: 0 4px 16px rgba(252,163,17,.4);
}
.page-hero-text { min-width: 0; }
.page-hero-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
    margin: 0 0 3px;
    letter-spacing: -.02em;
}
.page-hero-subtitle {
    font-size: .78rem;
    color: rgba(255,255,255,.6);
    margin: 0;
}
.page-hero-subtitle strong { color: rgba(255,255,255,.9); font-weight: 600; }
.page-hero-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.page-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-md);
    padding: .45rem .9rem;
    min-width: 56px;
    backdrop-filter: blur(4px);
}
.page-hero-stat-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.page-hero-stat-lbl {
    font-size: .58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: rgba(255,255,255,.5);
    margin-top: 2px;
    white-space: nowrap;
}
.page-hero-stat.accent {
    background: rgba(252,163,17,.18);
    border-color: rgba(252,163,17,.4);
}
.page-hero-stat.accent .page-hero-stat-num { color: var(--accent); }
@media (max-width: 768px) {
    .page-hero { padding: 1.1rem 1.1rem 1.1rem 1.4rem; gap: .7rem; }
    .page-hero-icon { width: 40px; height: 40px; font-size: 1.05rem; border-radius: var(--radius); }
    .page-hero-title { font-size: 1.25rem; }
    .page-hero-subtitle { font-size: .73rem; }
    /* Stats: stacked column, each row = num + label in one line */
    .page-hero-meta {
        flex-direction: column;
        align-items: flex-end;
        gap: .22rem;
    }
    .page-hero-stat {
        flex-direction: row;
        align-items: baseline;
        gap: .32rem;
        padding: .22rem .55rem;
        min-width: unset;
        border-radius: var(--radius-full);
        background: rgba(255,255,255,.1);
        border-color: rgba(255,255,255,.14);
    }
    .page-hero-stat.accent { background: rgba(252,163,17,.18); border-color: rgba(252,163,17,.4); }
    .page-hero-stat-num { font-size: .9rem; }
    .page-hero-stat-lbl { font-size: .62rem; margin-top: 0; letter-spacing: .02em; }
}

/* ============================================
   Day Nav — Snap-Pager + Dots
   ============================================ */
.day-nav-wrap {
    padding-top: .6rem;
    margin-bottom: 0;
}
.day-nav {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
}
.day-nav::-webkit-scrollbar { display: none; }
/* A page = up to 3 pills side by side */
.day-nav-page {
    min-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    gap: .45rem;
    padding: 3px 1px 4px; /* top space so pill shadow+outline isn't clipped */
}
/* Indicator dots row */
.day-nav-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: .45rem;
    margin-bottom: 1.35rem;
}
.dnd-dot {
    width: 6px; height: 6px;
    border-radius: 3px;
    background: var(--border);
    transition: width .3s cubic-bezier(.4,0,.2,1), background .3s;
    flex-shrink: 0;
}
.dnd-dot.active {
    width: 20px;
    background: var(--accent);
}
.day-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem 1rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.day-pill:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-50);
    transform: translateY(-1px);
}
.day-pill.today {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(252,163,17,.35);
}
.day-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px; height: 16px;
    border-radius: 50%;
    font-size: .6rem; font-weight: 700;
    background: rgba(0,0,0,.1);
    color: inherit;
}
.day-pill.today .day-pill-count {
    background: rgba(20,33,61,.2);
}

/* ============================================
   Jadwal Kuliah — Day Section
   ============================================ */
.jk-day-section { margin-bottom: 1.75rem; }
.jk-day-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .85rem;
}
.jk-day-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    white-space: nowrap;
}
.jk-day-label.is-today {
    color: var(--accent-dark);
}
.jk-today-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--accent);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.jk-day-line {
    flex: 1;
    height: 1px;
    background: var(--border-light);
}
.jk-day-line.is-today {
    background: linear-gradient(90deg, rgba(252,163,17,.35) 0%, transparent 100%);
}

/* ============================================
   Jadwal Kuliah — Schedule Item
   ============================================ */
.jk-items { display: grid; gap: .65rem; }
.jk-item {
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 1rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--border);
    border-radius: var(--radius-md);
    padding: .85rem 1.1rem;
    transition: all var(--transition);
    overflow: hidden;
}
.jk-item:hover {
    border-color: var(--border);
    border-left-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.jk-item.is-berlangsung {
    border-left-color: var(--accent);
    background: rgba(252,163,17,.04);
}
.jk-item.is-akan-datang {
    border-left-color: var(--info);
}
.jk-item.is-selesai {
    opacity: .55;
    border-left-color: var(--success);
}
/* Subtle shimmer for berlangsung */
.jk-item.is-berlangsung::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(252,163,17,.04) 0%, transparent 60%);
    pointer-events: none;
}
.jk-time {
    display: flex;
    flex-direction: column;
}
.jk-time-start {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.jk-time-end {
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}
.jk-body { min-width: 0; }
.jk-nama {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text);
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jk-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}
.jk-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .68rem;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 2px 7px;
    font-weight: 500;
    white-space: nowrap;
}
.jk-status {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: .3rem .75rem;
    border-radius: var(--radius-full);
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}
.jk-status.berlangsung {
    background: var(--accent);
    color: var(--primary);
    animation: jkPulse 2s ease-in-out infinite;
}
.jk-status.akan-datang {
    background: var(--info-light);
    color: var(--info-dark);
}
.jk-status.selesai {
    background: var(--success-light);
    color: var(--success-dark);
}
.jk-status.default {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
@keyframes jkPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(252,163,17,.5); }
    60%      { box-shadow: 0 0 0 5px rgba(252,163,17,0); }
}
/* Mobile jadwal item */
@media (max-width: 576px) {
    .jk-item {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
    }
    .jk-status { grid-column: 2; justify-self: start; margin-top: 4px; }
}


/* ============================================
   Cards — Google Classroom Style
   ============================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}

/* Stat Card — Modern Minimal */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
}

.stat-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.stat-details {
    flex: 1;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--text);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Stat mini progress bar */
.stat-mini-bar {
    width: 100%;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}
.stat-mini-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 1.1s cubic-bezier(.4,0,.2,1);
}
.stat-mini-txt {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ============================================
   Dashboard — Compact Stats Strip
   ============================================ */
.dash-stats-strip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: stretch;
    overflow: hidden;
}
.dss-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.1rem;
    transition: background var(--transition-fast);
    cursor: default;
    min-width: 0;
}
.dss-item:hover { background: var(--bg); }
.dss-divider {
    width: 1px;
    background: var(--border-light);
    margin: .5rem 0;
    flex-shrink: 0;
}
.dss-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.dss-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    display: block;
}
.dss-lbl {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   Dashboard — Tugas Selesai Accordion
   ============================================ */
.ts-card { overflow: visible; }

.ts-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: .75rem;
    padding: .95rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-family);
    transition: background var(--transition-fast);
}
.ts-toggle:hover { background: var(--bg); }
.ts-toggle-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.ts-toggle-right {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-shrink: 0;
}
.ts-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
}
.ts-subtitle { display: flex; align-items: center; gap: 0; }
.ts-progress-wrap {
    grid-column: 1 / -1;
    padding: 0 0 2px;
}
.ts-ring-mini {
    position: relative;
    width: 36px; height: 36px;
    flex-shrink: 0;
}
.ts-ring-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .52rem;
    font-weight: 700;
    color: var(--success);
    pointer-events: none;
}
.ts-chevron {
    font-size: .8rem;
    color: var(--text-muted);
    transition: transform var(--transition);
    flex-shrink: 0;
}
.ts-toggle[aria-expanded="true"] .ts-chevron {
    transform: rotate(180deg);
}

/* Body (collapsed by default) */
.ts-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s cubic-bezier(.4,0,.2,1);
    border-top: 0 solid var(--border-light);
    transition: max-height .4s cubic-bezier(.4,0,.2,1), border-top-width 0s .4s;
}
.ts-body.open {
    max-height: 400px;
    border-top-width: 1px;
    transition: max-height .4s cubic-bezier(.4,0,.2,1), border-top-width 0s 0s;
    overflow-y: auto;
}
.ts-empty {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: .875rem;
}
.ts-list { padding: .5rem 0; }
.ts-task-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1.25rem;
    transition: background var(--transition-fast);
    animation: tsItemIn .25s ease both;
}
@keyframes tsItemIn {
    from { opacity:0; transform: translateY(-6px); }
    to   { opacity:1; transform: translateY(0); }
}
.ts-task-item:hover { background: var(--bg); }
.ts-check {
    width: 22px; height: 22px;
    background: var(--success-light);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .62rem;
    flex-shrink: 0;
}
.ts-task-body  { flex: 1; min-width: 0; }
.ts-task-judul { font-weight: 500; font-size: .875rem; color: var(--text); margin: 0 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-task-meta  { font-size: .7rem; color: var(--text-muted); margin: 0; }
.ts-task-done  { font-size: .7rem; color: var(--success); font-weight: 600; flex-shrink: 0; }

/* ============================================
   Dashboard — Welcome Banner
   ============================================ */
.dash-banner {
    background:
        radial-gradient(circle at 12% 18%, rgba(252,163,17,.16), transparent 22%),
        radial-gradient(circle at 88% 16%, rgba(96,165,250,.14), transparent 24%),
        linear-gradient(135deg, #142847 0%, #183564 48%, #0f223f 100%);
    border-radius: 20px;
    padding: 1rem 1.15rem;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .95rem;
    min-height: 116px;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 34px rgba(15,23,42,.18);
}
.dash-banner::before {
    content: '';
    position: absolute;
    inset: auto auto -42px -14px;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(252,163,17,.14), rgba(252,163,17,0));
    border-radius: 24px;
    transform: rotate(18deg);
    pointer-events: none;
}
.dash-banner::after {
    content: '';
    position: absolute;
    top: 16px;
    right: 118px;
    width: 92px;
    height: 92px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, rgba(255,255,255,.03) 34%, rgba(255,255,255,0) 72%);
    border-radius: 999px;
    filter: blur(2px);
    pointer-events: none;
}
.dash-banner-left {
    display: flex;
    align-items: center;
    gap: .85rem;
    position: relative;
    z-index: 1;
    align-self: center;
    min-width: 0;
}
.dash-greet-icon {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
    color: var(--accent, #FCA311);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    background: rgba(252, 163, 17, 0.16);
    border: 1px solid rgba(252, 163, 17, 0.18);
    border-radius: 14px;
    animation: dash-icon-pulse 4.2s ease-in-out infinite;
    position: relative;
    z-index: 10;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.dash-greet-icon i {
    font-size: 1.25rem;
    font-weight: 900;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro';
    color: var(--accent, #FCA311);
    display: inline-block;
    width: auto;
    height: auto;
}
@keyframes dash-icon-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}
.dash-banner-copy {
    display: flex;
    flex-direction: column;
    gap: .16rem;
    min-width: 0;
}
.dash-banner-kicker {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .61rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(252,163,17,.88);
}
.dash-greet-title {
    color: white;
    font-size: 1.12rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.dash-greet-sub {
    color: rgba(255,255,255,.7);
    font-size: .73rem;
    margin: 0;
}
.dash-banner-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .42rem;
    margin-top: .24rem;
}
.dash-banner-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .58rem;
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 700;
    color: rgba(255,255,255,.92);
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
}
.dash-banner-pill i { color: rgba(255,255,255,.9); font-size: .65rem; }
.dash-banner-pill--warn {
    background: rgba(239,68,68,.14);
    border-color: rgba(239,68,68,.26);
}
/* Progress Ring */
.dash-banner-right {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    gap: .7rem;
}
.dash-banner-next {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-width: 168px;
    max-width: 200px;
    padding: .72rem .82rem;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));
    border: 1px solid rgba(252,163,17,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 14px 28px rgba(15,23,42,.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .16rem;
}
.dash-banner-next::before {
    content: '';
    position: absolute;
    top: -34px;
    right: -20px;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(252,163,17,.28) 0%, rgba(252,163,17,.14) 36%, rgba(252,163,17,0) 74%);
    pointer-events: none;
    z-index: 0;
}
.dash-banner-next::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(252,163,17,.4), rgba(252,163,17,0));
    pointer-events: none;
    z-index: 0;
}
.dash-banner-next > * {
    position: relative;
    z-index: 1;
}
.dash-focus-cat {
    display: none;
}
.dash-banner-next-label {
    font-size: .58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(252,163,17,.92);
}
.dash-banner-next-title {
    font-size: .82rem;
    color: rgba(255,255,255,.98);
    font-weight: 700;
    line-height: 1.2;
}
.dash-banner-next-meta {
    font-size: .66rem;
    color: rgba(255,255,255,.66);
}
.dash-ring-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    cursor: default;
}
.dash-ring-svg {
    transform: rotate(-90deg);
    display: block;
    width: 72px;
    height: 72px;
}
.dash-ring-track {
    fill: none;
    stroke: rgba(255,255,255,.15);
    stroke-width: 6;
}
.dash-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.3s cubic-bezier(.4,0,.2,1);
}
.dash-ring-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    pointer-events: none;
}
.dash-ring-num  { font-size: .98rem; font-weight: 800; line-height: 1; }
.dash-ring-sym  { font-size: .52rem; opacity: .85; line-height: 1; }
.dash-ring-txt  { font-size: .5rem; opacity: .65; letter-spacing: .06em; margin-top: 2px; }
/* Quick Actions */
.dash-quick-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    position: relative;
    z-index: 1;
    padding-top: 1.1rem;
    margin-top: 1.1rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
.qa-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .85rem .35rem .45rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--radius-full);
    color: rgba(255,255,255,.9);
    font-size: .78rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}
.qa-pill:hover {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.3);
    color: white;
    transform: translateY(-1px);
}
.qa-pill-admin {
    border-color: rgba(239,68,68,.4);
}
.qa-dot {
    width: 22px; height: 22px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    flex-shrink: 0;
}
button.qa-pill {
    cursor: pointer;
    font-family: inherit;
}
.qa-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 .35rem;
    border-radius: var(--radius-full);
    font-size: .62rem; font-weight: 700; line-height: 1;
}
.qa-badge-danger {
    background: rgba(239,68,68,.85); color: #fff;
}
.qa-badge-accent {
    background: rgba(252,163,17,.85); color: #fff;
}

/* ============================================
   Dashboard — Jadwal Item
   ============================================ */
.jadwal-item {
    background: var(--bg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--border);
    padding: .8rem 1rem;
    position: relative;
    transition: all var(--transition);
    overflow: hidden;
}
.jadwal-item.is-berlangsung {
    border-left-color: var(--accent);
    background: rgba(252,163,17,.08);
}
.jadwal-item.is-selesai {
    opacity: .5;
}
.jadwal-item:hover { box-shadow: var(--shadow-sm); }
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--accent);
    color: var(--primary);
    font-size: .62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-bottom: .5rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .65; }
}
.jadwal-row {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}
.jadwal-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 42px;
}
.jt-start { font-size: .82rem; font-weight: 700; color: var(--primary); }
.jt-sep   { width: 1px; height: 12px; background: var(--border); margin: 2px 0; }
.jt-end   { font-size: .72rem; color: var(--text-muted); }
.jadwal-info   { flex: 1; min-width: 0; overflow: hidden; }
.jadwal-eta    { flex-shrink: 0; display: flex; align-items: center; padding-left: .4rem; }
/* ETA Pill variants */
.jeta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: var(--radius-full);
    font-size: .66rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
}
.jeta-far     { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.jeta-coming  { background: rgba(252,163,17,.12); color: #92400e; border: 1px solid rgba(252,163,17,.3); }
.jeta-urgent  { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239,68,68,.25); animation: etaUrgent 1.8s ease-in-out infinite; }
.jeta-live    { background: var(--accent); color: var(--primary); font-weight: 700; animation: etaLive 2s ease-in-out infinite; }
.jeta-done    { background: transparent; color: var(--text-muted); border: 1px solid var(--border); font-size: .62rem; }
@keyframes etaUrgent {
    0%,100% { opacity:1; }
    50%      { opacity:.55; }
}
@keyframes etaLive {
    0%,100% { box-shadow: 0 0 0 0 rgba(252,163,17,.5); }
    60%      { box-shadow: 0 0 0 5px rgba(252,163,17,0); }
}
.jadwal-nama   { font-weight: 600; font-size: .875rem; color: var(--text); margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jadwal-kode   { font-size: .72rem; color: var(--text-muted); margin: 0 0 1px; }
.jadwal-tempat { font-size: .72rem; color: var(--text-secondary); margin: 0; }

/* ============================================
   Dashboard — Tugas Item
   ============================================ */
.tugas-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .8rem .9rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}
.tugas-item:hover { box-shadow: var(--shadow-sm); }
.tugas-body    { flex: 1; min-width: 0; }
.tugas-judul   { font-weight: 600; font-size: .875rem; color: var(--text); margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tugas-meta    { font-size: .72rem; color: var(--text-muted); margin: 0 0 2px; }
.tugas-deadline { font-size: .72rem; color: var(--text-secondary); margin: 0; }
/* Days Chip */
.days-chip        { flex-shrink: 0; padding: 4px 10px; border-radius: var(--radius-full); font-size: .68rem; font-weight: 700; white-space: nowrap; }
.chip-danger  { background: var(--danger-light);  color: var(--danger); }
.chip-warning { background: #fef3c7;              color: #92400e; }
.chip-info    { background: var(--info-light);    color: var(--info); }
.chip-success { background: var(--success-light); color: var(--success); }

/* ============================================
   Dashboard — Pengumuman Item
   ============================================ */
.peng-item {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .8rem .9rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: pointer;
}
.peng-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.peng-dot {
    width: 7px; height: 7px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.peng-dot--umum    { background: var(--text-muted); }
.peng-dot--penting { background: var(--accent); }
.peng-dot--urgent  { background: var(--danger); }
.peng-pin-icon {
    font-size: .6rem;
    color: var(--accent);
    transform: rotate(30deg);
    display: inline-block;
    margin-left: 3px;
    vertical-align: middle;
}
.peng-body    { flex: 1; min-width: 0; }
.peng-judul   { font-weight: 600; font-size: .875rem; color: var(--text); margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peng-meta    { font-size: .7rem; color: var(--text-muted); margin: 0 0 3px; }
.peng-preview {
    font-size: .78rem; color: var(--text-secondary); margin: 0; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================
   Dashboard — Event Item
   ============================================ */
.event-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem .9rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}
.event-item:hover { box-shadow: var(--shadow-sm); }
.event-cal {
    flex-shrink: 0;
    width: 46px; height: 46px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    line-height: 1;
}
.ev-day { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.ev-mon { font-size: .52rem; font-weight: 600; letter-spacing: .04em; opacity: .8; margin-top: 2px; }
.event-body  { flex: 1; min-width: 0; }
.event-judul { font-weight: 600; font-size: .875rem; color: var(--text); margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-loc   { font-size: .7rem; color: var(--text-muted); margin: 0; }

/* ============================================
   Pengumuman Detail Popout
   ============================================ */
.pdp-body {
    flex: 1; overflow-y: auto;
    padding: .85rem 1.1rem 0;
}
.pdp-content {
    font-size: .88rem;
    color: var(--text);
    line-height: 1.75;
    word-break: break-word;
}
.pdp-tipe-badge {
    display: inline-flex; align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: .63rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
}
.pdp-tipe--umum    { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.pdp-tipe--penting { background: rgba(252,163,17,.12); color: #92400e; border: 1px solid rgba(252,163,17,.3); }
.pdp-tipe--urgent  { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239,68,68,.25); }
.pdp-pin-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: .64rem; font-weight: 600; color: var(--accent);
}

/* ============================================
   Dashboard — Next Schedule Banner Section
   ============================================ */
.dash-next-schedule {
    grid-column: 1 / -1;
    position: relative;
    z-index: 1;
    padding-top: 1.1rem;
    margin-top: 1.1rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
.dns-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-lg);
    padding: .85rem 1.2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition);
    animation: dns-slide-in .5s ease-out;
}
.dns-content:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.2);
    transform: translateY(-1px);
}
@keyframes dns-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dns-icon-wrap {
    width: 42px; height: 42px;
    border-radius: var(--radius-md);
    background: rgba(252,163,17,.2);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    position: relative;
}
.dns-icon-wrap::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(252,163,17,.3), transparent);
    z-index: -1;
    animation: dns-glow 3s ease-in-out infinite;
}
@keyframes dns-glow {
    0%, 100% { opacity: .4; }
    50%      { opacity: .8; }
}
.dns-icon-done {
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.6);
}
.dns-icon-done::after { display: none; }
.dns-info { flex: 1; min-width: 0; }
.dns-label {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.5);
    margin-bottom: 2px;
}
.dns-course {
    font-size: .95rem;
    font-weight: 700;
    color: white;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dns-time {
    font-size: .78rem;
    color: rgba(255,255,255,.65);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.dns-time i { font-size: .68rem; }
.dns-sep { opacity: .4; }
.dns-countdown {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .5rem .85rem;
    background: rgba(252,163,17,.15);
    border: 1px solid rgba(252,163,17,.3);
    border-radius: var(--radius-md);
    min-width: 70px;
}
.dns-countdown-val {
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}
.dns-countdown-label {
    font-size: .6rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.dns-empty { opacity: .7; }
.dns-empty:hover { opacity: .9; }

/* ============================================
   Dashboard — Weekly Calendar Widget (dwc-)
   ============================================ */
.dwc-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}
.dwc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: .5rem;
}
.dwc-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
}
.dwc-title-sub {
    font-weight: 400;
    font-size: .78rem;
    color: var(--text-muted);
    margin-left: 6px;
}
.dwc-header-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.dwc-hint {
    font-size: .72rem;
    color: var(--text-muted);
    font-style: italic;
}
.dwc-body {
    padding: .75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.dwc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .4rem;
    min-width: 700px;
}
.dwc-col {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    min-height: 130px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--surface);
    position: relative;
    overflow: hidden;
}
.dwc-col:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(252,163,17,.12);
    transform: translateY(-2px);
}
.dwc-today {
    border-color: var(--accent) !important;
    background: rgba(252,163,17,.04);
}
.dwc-today::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.dwc-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .65rem .4rem;
}
.dwc-day-name {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: capitalize;
}
.dwc-day-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.dwc-today .dwc-day-num {
    color: var(--accent);
    background: rgba(252,163,17,.12);
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}
.dwc-col-body {
    flex: 1;
    padding: 0 .5rem .5rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.dwc-no-event {
    font-size: .68rem;
    color: var(--text-muted);
    padding: .3rem 0;
    opacity: .6;
}
.dwc-event-pill {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .5rem;
    background: rgba(99,102,241,.08);
    border-left: 3px solid var(--info);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all var(--transition-fast);
    animation: dwc-pill-in .3s ease-out backwards;
}
.dwc-event-pill:hover {
    background: rgba(99,102,241,.14);
    transform: translateX(2px);
}
@keyframes dwc-pill-in {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}
.dwc-event-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--info);
    flex-shrink: 0;
}
.dwc-event-name {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.dwc-event-time {
    font-size: .62rem;
    color: var(--text-muted);
    flex-shrink: 0;
    font-weight: 600;
}

/* ============================================
   Dashboard — Announcement Feed (daf-)
   ============================================ */
.daf-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}
.daf-list {
    display: flex;
    flex-direction: column;
}
.daf-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition);
    animation: daf-slide-in .4s ease-out backwards;
    position: relative;
}
.daf-item:last-child { border-bottom: none; }
.daf-item:hover {
    background: var(--surface-hover);
    padding-left: 1.45rem;
}
.daf-item::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: var(--accent);
    transition: width var(--transition-fast);
    border-radius: 0 2px 2px 0;
}
.daf-item:hover::after { width: 3px; }
@keyframes daf-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.daf-item-left { flex-shrink: 0; }
.daf-type-badge {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}
.daf-type--umum    { background: var(--bg); color: var(--text-muted); }
.daf-type--penting { background: rgba(252,163,17,.12); color: var(--accent); }
.daf-type--urgent  { background: rgba(239,68,68,.1); color: var(--danger); }
.daf-type--event   { background: rgba(99,102,241,.1); color: var(--info); }
.daf-item-body { flex: 1; min-width: 0; }
.daf-item-title {
    font-weight: 600;
    font-size: .88rem;
    color: var(--text);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.daf-item-preview {
    font-size: .75rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.daf-item-meta { flex-shrink: 0; text-align: right; }
.daf-item-time {
    font-size: .68rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================
   Dashboard — Course Section (dcs-)
   ============================================ */
.dcs-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}
.dcs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: .5rem;
}
.dcs-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
}
.dcs-header-nav {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.dcs-breadcrumb {
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: default;
    transition: color var(--transition-fast);
}
.dcs-breadcrumb.active {
    color: var(--accent);
    font-weight: 700;
}
.dcs-breadcrumb-sep {
    font-size: .72rem;
    color: var(--text-muted);
    opacity: .5;
}
.dcs-pills-wrap {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.dcs-pills-wrap::-webkit-scrollbar { display: none; }
.dcs-pills {
    display: flex;
    gap: .45rem;
    white-space: nowrap;
}
.dcs-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: .42rem .9rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.dcs-pill:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-50);
}
.dcs-pill.active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(252,163,17,.3);
}
.dcs-no-courses {
    font-size: .78rem;
    color: var(--text-muted);
    padding: .3rem 0;
}
.dcs-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
    padding: 0 1rem;
}
.dcs-tab {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .65rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.dcs-tab:hover {
    color: var(--text);
    background: rgba(252,163,17,.04);
}
.dcs-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.dcs-tab i { font-size: .7rem; }
.dcs-content {
    padding: .75rem 1rem;
    min-height: 100px;
}
.dcs-tugas-list {
    display: grid;
    gap: .5rem;
}
.dcs-tugas-item {
    animation: dcs-item-in .35s ease-out backwards;
}
@keyframes dcs-item-in {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}
.dcs-tugas-status {
    display: inline-flex;
    margin-left: 8px;
    font-size: .68rem;
    font-weight: 600;
    color: var(--info);
}
.dcs-mhs-wrap { padding: 0; }
.dcs-mhs-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: .85rem 1rem;
    border: none;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.dcs-mhs-toggle:hover {
    background: var(--surface-hover);
    color: var(--text);
}
.dcs-mhs-chevron {
    margin-left: auto;
    font-size: .65rem;
    transition: transform var(--transition);
}
.dcs-mhs-list {
    border-top: 1px solid var(--border-light);
    animation: dcs-mhs-expand .3s ease-out;
}
@keyframes dcs-mhs-expand {
    from { opacity: 0; max-height: 0; }
    to   { opacity: 1; max-height: 500px; }
}

/* Enhanced stat strip hover */
.dash-stats-strip .dss-item {
    transition: all var(--transition);
    border-radius: var(--radius-md);
    padding: .5rem;
}
.dash-stats-strip .dss-item:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

/* Dark Mode — New Sections */
[data-theme="dark"] .dwc-card { border-color: var(--border); }
[data-theme="dark"] .dwc-col { border-color: var(--border); background: var(--surface); }
[data-theme="dark"] .dwc-today { background: rgba(252,163,17,.06); }
[data-theme="dark"] .dwc-event-pill { background: rgba(99,102,241,.12); }
[data-theme="dark"] .daf-item:hover { background: var(--surface-hover); }
[data-theme="dark"] .daf-type--umum { background: var(--surface-active); }
[data-theme="dark"] .daf-type--penting { background: rgba(252,163,17,.15); }
[data-theme="dark"] .daf-type--urgent { background: rgba(239,68,68,.15); }
[data-theme="dark"] .daf-type--event { background: rgba(99,102,241,.15); }
[data-theme="dark"] .dcs-pill { background: var(--surface); border-color: var(--border); color: var(--text-secondary); }
[data-theme="dark"] .dcs-pill:hover { background: rgba(252,163,17,.1); }
[data-theme="dark"] .dcs-pill.active { background: var(--accent); color: var(--primary-dark); }
[data-theme="dark"] .dcs-tab:hover { background: rgba(255,255,255,.04); }
[data-theme="dark"] .dcs-mhs-toggle { background: var(--surface-active); }
[data-theme="dark"] .dns-content { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }

/* Mobile Responsive — New Sections */
@media (max-width: 768px) {
    .dwc-grid { min-width: 600px; }
    .dwc-col { min-height: 100px; }
    .dwc-header { flex-direction: column; align-items: flex-start; }
    .dwc-hint { display: none; }
    .daf-item { padding: .7rem 1rem; }
    .daf-item-meta { display: none; }
    .dcs-header { flex-direction: column; align-items: flex-start; }
    .dcs-header-nav { display: none; }
    .dns-countdown { display: none; }
    .dns-content { padding: .65rem .85rem; }
    .dns-course { font-size: .85rem; }
}

/* ============================================
   Page Hero — danger stat variant
   ============================================ */
.page-hero-stat.danger {
    background: rgba(239,68,68,.18);
    border-color: rgba(239,68,68,.35);
}
.page-hero-stat.danger .page-hero-stat-num { color: #f87171; }

/* ============================================
   Pengumuman Page — Modern Redesign (pn-)
   ============================================ */

/* Filter Nav */
.pn-filter-wrap { padding-top: .6rem; margin-bottom: 0; }
.pn-filter-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: .45rem;
    padding: 3px 1px 6px;
}
.pn-filter-nav::-webkit-scrollbar { display: none; }
.pn-pill {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .42rem .95rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: .75rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.pn-pill:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-50); }
.pn-pill.active { border-color: var(--accent); background: var(--accent); color: var(--primary); font-weight: 700; box-shadow: 0 2px 8px rgba(252,163,17,.35); }
.pn-pill.urgent.active  { border-color: var(--danger);  background: var(--danger);  color: #fff; box-shadow: 0 2px 8px rgba(239,68,68,.3); }
.pn-pill.penting.active { border-color: var(--warning); background: var(--warning); color: var(--primary); box-shadow: 0 2px 8px rgba(252,163,17,.3); }
.pn-pill-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 16px; height: 16px; padding: 0 3px;
    border-radius: 50%; font-size: .6rem; font-weight: 700;
    background: rgba(0,0,0,.1); color: inherit;
}

/* Section Heading */
.pn-section { margin-bottom: 1.6rem; }
.pn-section-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: .85rem; }
.pn-section-label {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .71rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-muted); flex-shrink: 0;
    padding: .22rem .65rem;
    border-radius: var(--radius-full);
    background: var(--bg);
}
.pn-section-label.urgent  { color: var(--danger);  background: var(--danger-light); }
.pn-section-label.penting { color: #92400e; background: rgba(252,163,17,.12); }
.pn-section-label.pinned  { color: #b45309; background: rgba(252,163,17,.14); }
.pn-section-label.umum    { color: var(--info);  background: var(--info-light); }
.pn-section-line { flex: 1; height: 1px; background: var(--border-light); }
.pn-section-line.urgent  { background: linear-gradient(90deg, rgba(239,68,68,.3) 0%, transparent 100%); }
.pn-section-line.penting { background: linear-gradient(90deg, rgba(252,163,17,.35) 0%, transparent 100%); }
.pn-section-line.pinned  { background: linear-gradient(90deg, rgba(252,163,17,.4) 0%, transparent 100%); }
.pn-section-line.umum    { background: linear-gradient(90deg, rgba(14,165,233,.3) 0%, transparent 100%); }
.pn-section-count { font-size: .68rem; color: var(--text-muted); flex-shrink: 0; }

/* Items Grid */
.pn-items { display: grid; gap: .85rem; }

/* Single Item Card */
.pn-item {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden; cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    display: grid;
    grid-template-columns: 5px 1fr;
}
.pn-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border); }
.pn-item-stripe { /* left stripe color */ }
.pn-item-stripe.umum    { background: var(--info); }
.pn-item-stripe.penting { background: var(--warning); }
.pn-item-stripe.urgent  { background: var(--danger); }
.pn-item-inner {
    padding: .95rem 1.1rem;
    display: flex; flex-direction: column; gap: .45rem;
}
.pn-item-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.pn-item-title-wrap { flex: 1; min-width: 0; }
.pn-item-title {
    font-size: .925rem; font-weight: 700;
    color: var(--text); margin: 0 0 .32rem; line-height: 1.35;
}
.pn-item-badges { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.pn-type-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 9px;
    border-radius: var(--radius-full);
    font-size: .61rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
}
.pn-type-badge.umum    { background: rgba(14,165,233,.1);  color: var(--info);    border: 1px solid rgba(14,165,233,.25); }
.pn-type-badge.penting { background: rgba(252,163,17,.12); color: #92400e;        border: 1px solid rgba(252,163,17,.3); }
.pn-type-badge.urgent  { background: var(--danger-light);  color: var(--danger);  border: 1px solid rgba(239,68,68,.25); }
.pn-pin-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: .61rem; font-weight: 600;
    color: #b45309; background: rgba(252,163,17,.1); border: 1px solid rgba(252,163,17,.28);
}
.pn-item-meta {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    font-size: .7rem; color: var(--text-muted);
}
.pn-item-meta i { font-size: .62rem; }
.pn-item-preview {
    font-size: .82rem; color: var(--text-secondary); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; margin: 0;
}
.pn-item-arrow {
    flex-shrink: 0;
    width: 24px; height: 24px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--text-muted); font-size: .65rem;
    margin-top: 2px; transition: all var(--transition-fast);
}
.pn-item:hover .pn-item-arrow { background: var(--accent); color: var(--primary); transform: translateX(2px); }

/* urgent item — subtle red glow on hover */
.pn-item.urgent:hover { box-shadow: 0 4px 18px rgba(239,68,68,.15); }

/* ============================================
   Pengumuman Detail Bottom Sheet (pndp-)
   ============================================ */
.pndp-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1100;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.pndp-overlay.open { opacity: 1; pointer-events: all; }
.pndp-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    z-index: 1101;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    max-height: 88vh;
    display: flex; flex-direction: column;
    box-shadow: 0 -8px 32px rgba(0,0,0,.14);
}
.pndp-sheet.open { transform: translateY(0); }
.pndp-handle { width: 38px; height: 4px; background: var(--border); border-radius: 2px; margin: 10px auto 4px; flex-shrink: 0; }
.pndp-header {
    display: flex; align-items: flex-start;
    padding: .75rem 1.25rem .7rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0; gap: .7rem;
}
.pndp-header-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.pndp-header-icon.umum    { background: rgba(14,165,233,.1); color: var(--info); }
.pndp-header-icon.penting { background: rgba(252,163,17,.14); color: #b45309; }
.pndp-header-icon.urgent  { background: var(--danger-light); color: var(--danger); }
.pndp-header-text { flex: 1; min-width: 0; }
.pndp-title { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0 0 5px; line-height: 1.3; }
.pndp-badges { display: flex; gap: .35rem; flex-wrap: wrap; }
.pndp-close {
    width: 32px; height: 32px; flex-shrink: 0;
    border: none; background: var(--bg); border-radius: var(--radius-full);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: .9rem; transition: all var(--transition-fast);
}
.pndp-close:hover { background: var(--danger-light); color: var(--danger); }
.pndp-meta-bar {
    display: flex; align-items: center; gap: .85rem;
    padding: .55rem 1.25rem; background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0; font-size: .72rem; color: var(--text-muted); flex-wrap: wrap;
}
.pndp-meta-bar i { font-size: .62rem; }
.pndp-body { flex: 1; overflow-y: auto; padding: 1.1rem 1.25rem 2.5rem; }
.pndp-content {
    font-size: .9rem; color: var(--text);
    line-height: 1.8; word-break: break-word; white-space: pre-wrap;
}
/* Desktop — centered rounded modal */
@media (min-width: 769px) {
    .pndp-sheet {
        bottom: auto; left: 50%; top: 50%;
        transform: translate(-50%, -46%) scale(0.96);
        right: auto;
        width: 520px; max-width: calc(100vw - 2rem);
        border-radius: 20px;
        opacity: 0; pointer-events: none;
        transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .2s;
        max-height: 82vh;
    }
    .pndp-sheet.open {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1; pointer-events: all;
    }
    .pndp-handle { display: none; }
}

/* ============================================
   Tugas Detail Popout (Bottom Sheet / Modal)
   ============================================ */
.tdp-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1100;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.tdp-overlay.open { opacity: 1; pointer-events: all; }
.tdp-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    z-index: 1101;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 32px rgba(0,0,0,.14);
}
.tdp-sheet.open { transform: translateY(0); }
.tdp-handle {
    width: 38px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 10px auto 4px;
    flex-shrink: 0;
}
.tdp-header {
    display: flex;
    align-items: flex-start;
    padding: .75rem 1.25rem .7rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    gap: .5rem;
}
.tdp-title {
    font-size: 1rem; font-weight: 700;
    color: var(--text); margin: 0 0 3px;
    line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.tdp-matkul { font-size: .72rem; color: var(--text-muted); margin: 0; }
.tdp-close {
    width: 32px; height: 32px; flex-shrink: 0;
    border: none; background: var(--bg);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: .9rem;
    transition: all var(--transition-fast);
}
.tdp-close:hover { background: var(--border); color: var(--text); }
.tdp-body {
    flex: 1; overflow-y: auto;
    padding: .75rem 1.1rem;
    display: grid; gap: .5rem;
}
.tdp-row {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: .6rem .85rem;
}
.tdp-row-inline { display: flex; align-items: center; justify-content: space-between; }
.tdp-lbl {
    display: block;
    font-size: .65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-muted); margin-bottom: 4px;
}
.tdp-val { font-size: .875rem; color: var(--text); margin: 0; line-height: 1.5; }
.tdp-deadline-val { font-weight: 700; color: var(--danger); }
.tdp-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    background: var(--info-light); color: var(--info);
    border-radius: var(--radius-full);
    font-size: .65rem; font-weight: 600;
}
.tdp-link {
    font-size: .8rem; color: var(--accent);
    word-break: break-all; text-decoration: underline;
}
.tdp-files-list { display: grid; gap: .35rem; }
.tdp-file-item {
    display: flex; align-items: center; gap: .5rem;
    padding: .45rem .65rem;
    background: var(--bg); border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none; color: var(--text);
    transition: background .15s, border-color .15s;
}
.tdp-file-item:hover {
    background: var(--surface); border-color: var(--primary);
}
.tdp-file-item i { font-size: .85rem; color: var(--primary); flex-shrink: 0; }
.tdp-file-name {
    flex: 1; min-width: 0;
    font-size: .78rem; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tdp-file-size {
    font-size: .65rem; color: var(--text-muted); flex-shrink: 0;
}
.tdp-footer {
    padding: .8rem 1.1rem;
    padding-bottom: calc(.8rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}
.tdp-check-btn { width: 100%; justify-content: center; }
.tdp-checked {
    background: var(--success-light) !important;
    color: var(--success) !important;
    border-color: rgba(16,185,129,.3) !important;
}
/* Desktop — centered modal */
@media (min-width: 769px) {
    .tdp-sheet {
        position: fixed;
        bottom: auto; left: 50%; top: 50%;
        transform: translate(-50%, -46%) scale(0.96);
        right: auto;
        width: 460px; max-width: calc(100vw - 2rem);
        border-radius: 20px;
        opacity: 0; pointer-events: none;
        transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .2s;
        max-height: 82vh;
    }
    .tdp-sheet.open {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1; pointer-events: all;
    }
    .tdp-handle { display: none; }
}

/* ============================================
   Buttons — Modern, Clean
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(252, 163, 17, 0.35);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-outline:hover {
    background: var(--bg);
    border-color: var(--primary-300);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-dark);
    border-color: var(--danger-dark);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-success:hover {
    background: var(--success-dark);
    border-color: var(--success-dark);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding: 6px 12px;
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ============================================
   Forms — Clean & Modern
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--text);
    background: var(--surface);
    transition: all var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 4px;
}

.form-input.is-error {
    border-color: var(--danger);
}

.form-input.is-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ============================================
   Badges — Soft, Modern
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.badge-primary { background: var(--accent-50); color: var(--accent-700); }
.badge-success { background: var(--success-light); color: var(--success-dark); }
.badge-warning { background: var(--warning-light); color: var(--warning-dark); }
.badge-danger { background: var(--danger-light); color: var(--danger-dark); }
.badge-info { background: var(--info-light); color: var(--info-dark); }
.badge-neutral { background: var(--bg); color: var(--text-secondary); }

/* Priority badges */
.priority-rendah { background: var(--success-light); color: var(--success-dark); }
.priority-sedang { background: var(--warning-light); color: var(--warning-dark); }
.priority-tinggi { background: var(--danger-light); color: var(--danger-dark); }

/* ============================================
   Tabs
   ============================================ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab {
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-family: var(--font-family);
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: toastOut 0.2s ease forwards;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-success .toast-icon { color: var(--success); }
.toast-danger .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--accent); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    animation: toastProgress 4s linear forwards;
}

.toast-success .toast-progress { background: var(--success); }
.toast-danger .toast-progress { background: var(--danger); }
.toast-warning .toast-progress { background: var(--warning); }
.toast-info .toast-progress { background: var(--accent); }

/* ============================================
   Modal — Clean & Modern
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeInOverlay 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show {
    display: flex;
}

/* Direct Modal (without modal-overlay wrapper) */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.show {
    display: flex;
}

.modal-content,
.modal-overlay .modal {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.0625rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ============================================
   Table — Clean Google Style
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: 14px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--surface-hover);
}

/* ============================================
   Grid System
   ============================================ */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================
   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-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.w-full { width: 100%; }
.rounded { border-radius: var(--radius); }

.hidden { display: none !important; }

/* ============================================
   Empty States
   ============================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    opacity: 0.4;
}

.empty-state h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state p {
    font-size: 0.875rem;
}

/* ============================================
   Dropdown Menu — Modern Glass-style
   ============================================ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 150;
    display: none;
    animation: dropdownIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    padding: 6px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 10px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    font-family: var(--font-family);
    border-radius: var(--radius);
}

.dropdown-item:hover {
    background: var(--bg);
    color: var(--text);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background: var(--danger-light);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 6px;
}

/* ============================================
   Notification Bell Button (Topbar)
   ============================================ */
.notif-bell-wrapper {
    position: relative;
}

.notif-bell-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
    padding: 0;
}

.notif-bell-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(252, 163, 17, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #FCA311;
    font-size: 1rem;
}

.notif-bell-btn:hover .notif-bell-icon {
    background: rgba(252, 163, 17, 0.25);
    transform: scale(1.08);
}

.notif-bell-btn.active .notif-bell-icon {
    background: #FCA311;
    color: #14213D;
    box-shadow: 0 2px 12px rgba(252, 163, 17, 0.35);
}

/* Red bell — license expiry warning */
.notif-bell-btn.has-license-warn .notif-bell-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.notif-bell-btn.has-license-warn:hover .notif-bell-icon {
    background: rgba(239, 68, 68, 0.25);
}
.notif-bell-btn.has-license-warn.active .notif-bell-icon {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.35);
}

/* Notification Counter Badge */
.notif-badge {
    position: absolute;
    top: 2px;
    right: 0px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: #ef4444;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #132952;
    animation: badgePulse 2s ease-in-out infinite;
}

/* ============================================
   Notification Panel — Desktop Popout + Mobile Fullscreen
   ============================================ */

/* Overlay (visible on mobile only via media query) */
.notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.notif-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Desktop Popout Panel */
.notif-panel {
    position: fixed;
    top: calc(var(--topbar-height) + 8px);
    right: 16px;
    width: 400px;
    max-height: calc(100vh - var(--topbar-height) - 32px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.2), 0 8px 20px -8px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.notif-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Panel Header */
.notif-panel-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.notif-panel-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-panel-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.notif-panel-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-mark-all-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.notif-mark-all-btn:hover {
    background: var(--accent-50);
}

.notif-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.notif-close-btn:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

/* Panel Body */
.notif-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

/* Notification panel body scrollbar */
.notif-panel-body::-webkit-scrollbar {
    width: 4px;
}
.notif-panel-body::-webkit-scrollbar-button {
    display: none !important;
    height: 0 !important;
}
.notif-panel-body::-webkit-scrollbar-track {
    background: transparent !important;
}
.notif-panel-body::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background 0.8s ease;
}
.notif-panel-body:hover::-webkit-scrollbar-thumb {
    background: #FCA311;
    transition: background 0s;
}

/* Notification Item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

.notif-item:last-child {
    border-bottom: none;
}

/* Pinned license warning item — rounded card style */
.notif-item.notif-item-pinned {
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 14px;
    margin: 10px 12px 6px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.1);
    transition: all 0.2s ease;
    overflow: hidden;
}
.notif-item.notif-item-pinned:hover {
    background: rgba(239, 68, 68, 0.13);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.18);
    transform: translateY(-1px);
}
.notif-item.notif-item-pinned + .notif-item:not(.notif-item-pinned) {
    border-top: 1px solid var(--border);
}

/* Remove double-background artifact on pinned item inner (no swipe needed) */
.notif-item.notif-item-pinned .notif-item-inner {
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
}

.notif-item:hover {
    background: var(--bg-secondary);
}

/* Read state — faded opacity */
.notif-item.is-read {
    opacity: 0.5;
}

.notif-item.is-read:hover {
    opacity: 0.7;
}

/* Notification Type Icon */
.notif-item-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9375rem;
}

.notif-item-icon.type-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.notif-item-icon.type-success {
    background: var(--success-light);
    color: var(--success-dark);
}

.notif-item-icon.type-info {
    background: var(--info-light);
    color: var(--info-dark);
}

.notif-item-icon.type-pengumuman {
    background: var(--accent-50);
    color: var(--accent-dark);
}

/* Notification Content */
.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
    line-height: 1.3;
}

.notif-item-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-item-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.notif-item-type-badge {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

.notif-item-type-badge.badge-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.notif-item-type-badge.badge-success {
    background: var(--success-light);
    color: var(--success-dark);
}

.notif-item-type-badge.badge-info {
    background: var(--info-light);
    color: var(--info-dark);
}

.notif-item-type-badge.badge-pengumuman {
    background: var(--accent-50);
    color: var(--accent-dark);
}

/* Unread dot indicator */
.notif-item-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-item.is-read .notif-item-unread-dot {
    display: none;
}

/* Swipe delete hint */
.notif-item-swipe-hint {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: var(--danger);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transform: translateX(100%);
    transition: transform 0.2s ease;
}

.notif-item.swiping .notif-item-swipe-hint {
    transform: translateX(0);
}

/* Notification inner (for swipe transform) */
.notif-item-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1;
    background: inherit;
}

/* Empty State */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--text-muted);
    gap: 12px;
}

.notif-empty i {
    font-size: 2.5rem;
    opacity: 0.4;
}

.notif-empty p {
    font-size: 0.875rem;
}

/* ============================================
   Checkbox (Custom)
   ============================================ */
.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkbox input:checked + .checkbox-mark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox input:checked + .checkbox-mark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: 2px solid var(--primary);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    margin-top: -2px;
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--text);
    transition: all var(--transition-fast);
}

.checkbox input:checked ~ .checkbox-label {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* ============================================
   Skeleton Loaders
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-light) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
    border-radius: var(--radius);
}

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); }
.skeleton-card { height: 120px; }

/* ============================================
   FAB (Floating Action Button) — Global Override
   Ensures .mj-fab / .mk-fab always sit above the mobile nav,
   fixed to the viewport regardless of parent overflow context.
   ============================================ */
.mj-fab,
.mk-fab {
    position: fixed !important;
    bottom: calc(var(--mobile-nav-height, 64px) + 16px) !important;
    right: 1.1rem !important;
    z-index: 1050 !important;
}

/* ============================================
   Mobile Bottom Nav — Modern
   ============================================ */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Height expands to absorb the system nav bar on Android */
    height: auto;
    min-height: var(--mobile-nav-height);
    padding-top: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #132952;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 100;
    align-items: flex-start;
    justify-content: space-around;
    padding-left: 8px;
    padding-right: 8px;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 16px 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.625rem;
    font-weight: 500;
    transition: all var(--transition);
    border-radius: var(--radius-md);
    position: relative;
}

.mobile-nav-item.active {
    color: var(--accent);
    font-weight: 600;
}

.mobile-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 4px 4px;
}

.mobile-nav-item i {
    font-size: 1.25rem;
}

/* Hide mobile nav when sidebar opens on mobile */
body.sidebar-open .mobile-nav {
    opacity: 0;
    transform: translateY(64px);
    visibility: hidden;
    pointer-events: none;
}

/* Blur FAB button when sidebar opens on mobile */
body.sidebar-open .mj-fab,
body.sidebar-open .mk-fab {
    opacity: 0.3;
    filter: blur(4px);
    pointer-events: none;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-20px); }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    html {
        font-size: 14px;
    }

    .app-content {
        max-width: 960px;
    }

    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    
    .stat-card {
        padding: 16px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .app-scroll-body {
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    }

    /* PWA Standalone mode — extra bottom padding for Android system nav bar.
       env(safe-area-inset-bottom) returns 0 on Android, so we add a
       fixed extra buffer that covers gesture-bar / 3-button nav overlap. */
    @media all and (display-mode: standalone) {
        .app-scroll-body {
            padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 8px);
        }
    }

    .topbar {
        left: 0;
        padding: 0 16px;
    }

    .menu-toggle {
        display: flex;
    }

    /* Online indicator: compact on mobile */
    .online-avatars {
        display: none;
    }
    .online-indicator {
        padding: 4px 8px;
        gap: 5px;
    }
    .online-indicator .online-tooltip {
        right: -40px;
    }

    .app-content {
        padding: 16px;
        max-width: 100%;
    }

    .mobile-nav {
        display: flex;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 12px;
        gap: 10px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }

    /* Dashboard banner mobile */
    .dash-banner {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    .dash-banner-right {
        position: static;
        width: 100%;
        justify-content: space-between;
    }
    .dash-banner-next { min-width: 0; max-width: none; flex: 1; }
    .dash-ring-wrap { width: 76px; height: 76px; }
    .dash-ring-svg  { width: 76px; height: 76px; }
    .dash-ring-num  { font-size: 1rem; }
    .dash-greet-title { font-size: 1.1rem; }
    /* QA Snap Pager — mobile only */
    .dash-quick-actions {
        flex-wrap: nowrap;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 0;
    }
    .dash-quick-actions::-webkit-scrollbar { display: none; }
    .qa-page {
        min-width: 100%;
        display: flex;
        gap: .55rem;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    .qa-pill { flex-shrink: 0; }
    /* Snap dots */
    .qa-dots-row {
        grid-column: 1 / -1;
        display: flex;
        justify-content: center;
        gap: 5px;
        padding-top: .55rem;
    }
    .qa-dot-ind {
        width: 6px; height: 6px;
        border-radius: 3px;
        background: rgba(255,255,255,.3);
        transition: all .25s;
        flex-shrink: 0;
    }
    .qa-dot-ind.active {
        background: var(--accent);
        width: 16px;
    }
    /* Compact stats responsive */
    .dss-item { padding: .75rem .6rem; gap: .5rem; }
    .dss-icon { width: 32px; height: 32px; font-size: .85rem; }
    .dss-val  { font-size: 1.1rem; }
    .dss-lbl  { font-size: .65rem; }

    /* Table responsive */
    .table {
        font-size: 0.875rem;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 12px;
        margin-bottom: 12px;
        background: var(--surface);
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex: 0 0 100px;
    }
    
    /* Filter responsive */
    .card .card-body > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Form grid responsive */
    .modal-body > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .form-label {
        font-size: 0.8rem;
    }
    
    .form-control {
        font-size: 0.875rem;
        padding: 8px 10px;
    }
    
    /* Modal responsive */
    .modal,
    .modal-content {
        max-width: calc(100vw - 16px) !important;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 12px 16px;
    }
    
    .modal-footer {
        padding: 12px 16px;
        gap: 6px;
    }
    
    /* Button responsive */
    .btn {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    /* Mobile notification panel — fullscreen slide-in from left */
    .notif-panel {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        height: var(--app-height, 100vh);
        max-height: 100vh;
        max-height: var(--app-height, 100vh);
        border-radius: 0;
        border: none;
        transform: translateX(100%);
        transform-origin: right center;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 1;
    }

    .notif-panel.show {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .notif-overlay.show {
        display: none; /* Hide overlay on mobile, panel is fullscreen */
    }

    .notif-panel-header {
        padding: 16px 20px 12px;
        border-bottom: 1px solid var(--border-light);
        background: var(--surface);
    }

    .notif-panel-title {
        font-size: 1.125rem;
    }

    .notif-mark-all-btn span {
        display: none; /* Icon only on mobile */
    }

    .notif-close-btn {
        width: 36px;
        height: 36px;
    }

    .notif-panel-body {
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 20px);
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-header .btn {
        width: 100%;
    }

    /* Prevent horizontal scroll */
    html,
    body,
    .app-main,
    .app-content {
        overflow-x: hidden !important;
        width: 100%;
    }
    
    /* Card and table constraints */
    .card {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .table tbody td {
        word-break: break-word;
        word-wrap: break-word;
        max-width: 100% !important;
        overflow-wrap: break-word;
    }
    
    .table tbody td strong {
        word-break: break-word;
    }
    
    .table tbody td div {
        max-width: 100% !important;
        width: 100%;
    }
    
    /* Filter grid must be single column */
    .card .card-body > div[style*="grid-template-columns: repeat(auto-fit"],
    .card .card-body > div[style*="grid-template-columns: repeat(auto-fit, minmax"] {
        grid-template-columns: 1fr !important;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .topbar-title {
        display: none;
    }

    .stat-card {
        padding: 16px;
    }

    .card-body {
        padding: 16px;
    }
}
/* ============================================
   MODERN CALENDAR RESPONSIVE DESIGN
   ============================================ */

/* Desktop - Calendar with Sidebar */
@media (min-width: 1025px) {
    div[style*="grid-template-columns: 1fr 300px"] {
        display: grid;
        grid-template-columns: 1fr 300px !important;
        gap: 2rem !important;
    }
}

/* Tablet - Hide sidebar, stack vertically */
@media (max-width: 1024px) {
    div[style*="grid-template-columns: 1fr 300px"] {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    aside[style*="flex-direction: column"] {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile - Full width, single column sidebar */
@media (max-width: 768px) {
    div[style*="grid-template-columns: 1fr 300px"] {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    aside[style*="flex-direction: column"] {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Calendar header responsive */
    div[style*="background: linear-gradient(135deg, var(--primary-800)"] {
        padding: 2rem 1.5rem !important;
    }
    
    /* Calendar header flex responsive */
    div[style*="justify-content: space-between"] > div:last-child {
        width: 100%;
        justify-content: space-between;
        flex-basis: 100%;
    }
    
    /* Calendar day cells */
    div[style*="grid-template-columns: repeat(7, 1fr)"] {
        grid-template-columns: repeat(7, 1fr) !important;
    }
    
    div[style*="min-height: 110px"] {
        min-height: 90px !important;
        padding: 0.5rem !important;
        font-size: 0.75rem;
    }
    
    /* Day names header */
    div[style*="min-height: 110px"] ~ div {
        gap: 0.2rem !important;
    }
}

/* Small Mobile - Further adjustments */
@media (max-width: 480px) {
    div[style*="background: linear-gradient(135deg, var(--primary-800)"] {
        padding: 1.5rem 1rem !important;
    }
    
    div[style*="background: linear-gradient(135deg, var(--primary-800)"] h1 {
        font-size: 1.3rem !important;
    }
    
    div[style*="background: linear-gradient(135deg, var(--primary-800)"] p {
        font-size: 0.8rem !important;
    }
    
    div[style*="grid-template-columns: 1fr 300px"] {
        gap: 0.75rem !important;
    }
    
    aside[style*="flex-direction: column"] {
        gap: 0.75rem !important;
    }
    
    div[style*="min-height: 110px"] {
        min-height: 70px !important;
        padding: 0.4rem !important;
    }
    
    div[style*="grid-template-columns: repeat(7, 1fr)"] > div[style*="padding: 1rem"] {
        padding: 0.6rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Hide sidebar on very small screens */
    aside[style*="flex-direction: column"] {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

/* ============================================
   CALENDAR ANIMATIONS & TRANSITIONS
   ============================================ */

/* Smooth transitions for interactive elements */
div[style*="transition: all 0.2s ease"] {
    will-change: background, transform;
}

/* Alert animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

div[style*="background: linear-gradient(135deg, #ef4444"],
div[style*="background: linear-gradient(135deg, #f59e0b"] {
    animation: slideDown 0.3s ease;
}

/* Hover effects for day cells */
div[style*="min-height: 110px"]:hover {
    transform: translateY(-2px);
}

/* ============================================
   PHASE 14 — Polish & Micro-interactions
   ============================================ */

/* Staggered card entrance animation */
@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: cardIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(6) { animation-delay: 0.25s; }

/* Smooth icon hover */
.sidebar-link i,
.mobile-nav-link i {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-link:hover i {
    transform: scale(1.1);
}

/* Button press effect */
.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
    transform: scale(0.97);
}

/* Smooth badge pulse for notifications */
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Bell ring animation */
@keyframes bellRing {
    0% { transform: rotate(0); }
    15% { transform: rotate(14deg); }
    30% { transform: rotate(-14deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
    85% { transform: rotate(-2deg); }
    100% { transform: rotate(0); }
}

.notif-bell-btn.has-unread .notif-bell-icon i {
    animation: bellRing 0.8s ease-in-out;
}

/* Notif item slide-in animation */
@keyframes notifItemIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.notif-item {
    animation: notifItemIn 0.2s ease forwards;
}

.notif-item:nth-child(2) { animation-delay: 0.03s; }
.notif-item:nth-child(3) { animation-delay: 0.06s; }
.notif-item:nth-child(4) { animation-delay: 0.09s; }
.notif-item:nth-child(5) { animation-delay: 0.12s; }

/* Notification swipe-out animation */
@keyframes notifSwipeOut {
    to { transform: translateX(-100%); opacity: 0; height: 0; padding: 0; margin: 0; border: 0; overflow: hidden; }
}

/* Table row hover lift */
.table tbody tr {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.table tbody tr:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Form input focus glow */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Link underline animation */
a:not(.btn):not(.sidebar-link):not(.mobile-nav-link):not(.dropdown-item) {
    position: relative;
}

/* Smooth content fade on page load */
.content {
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Skeleton shimmer for loading states */
.skeleton {
    background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

/* Focus-visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Selection color */
::selection {
    background: rgba(252, 163, 17, 0.2);
    color: var(--text);
}

/* Smooth scrollbar thumb hover */
::-webkit-scrollbar-thumb:hover {
    background: #FCA311;
    transition: background 0s;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Events Page — Modern Redesign (ev-)
   ============================================ */

/* ---- Filter Nav — Snap-Pager ---- */
.ev-filter-wrap { padding-top: .6rem; margin-bottom: 0; }
.ev-filter-nav {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
}
.ev-filter-nav::-webkit-scrollbar { display: none; }

/* One page = up to 3 pills side-by-side */
.ev-nav-page {
    min-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    gap: .4rem;
    padding: 3px 1px 4px;
}

/* Indicator dots row */
.ev-nav-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: .1rem;
    margin-bottom: .6rem;
}
.evnd-dot {
    width: 6px; height: 6px;
    border-radius: 3px;
    background: var(--border);
    transition: width .3s cubic-bezier(.4,0,.2,1), background .3s;
    flex-shrink: 0;
}
.evnd-dot.active {
    width: 20px;
    background: var(--accent);
}

.ev-pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .38rem .9rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: .78rem; font-weight: 600;
    white-space: nowrap;
    cursor: pointer; text-decoration: none;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.ev-pill:hover { border-color: var(--accent); color: var(--accent); background: rgba(252,163,17,.06); }
.ev-pill.active { border-color: var(--accent); background: var(--accent); color: var(--primary); font-weight: 700; box-shadow: 0 2px 8px rgba(252,163,17,.35); }

/* Colour overrides for type pills */
.ev-pill.today.active     { border-color: var(--accent);   background: var(--accent);   color: var(--primary); box-shadow: 0 2px 8px rgba(252,163,17,.4); }
.ev-pill.ujian.active     { border-color: var(--danger);   background: var(--danger);   color: #fff;           box-shadow: 0 2px 8px rgba(239,68,68,.3); }
.ev-pill.workshop.active  { border-color: var(--success);  background: var(--success);  color: #fff;           box-shadow: 0 2px 8px rgba(34,197,94,.3); }
.ev-pill.pertemuan.active { border-color: var(--info);     background: var(--info);     color: #fff;           box-shadow: 0 2px 8px rgba(14,165,233,.3); }
.ev-pill.done.active      { border-color: var(--text-muted); background: var(--bg);     color: var(--text-muted); }

.ev-pill-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: rgba(0,0,0,.08);
    border-radius: var(--radius-full);
    font-size: .68rem; font-weight: 700;
    line-height: 1;
}
.ev-pill.active .ev-pill-count { background: rgba(0,0,0,.18); }

/* Pulsing dot for "Hari Ini" pill */
.ev-pulse-dot {
    font-size: .38rem !important;
    animation: evPulse 1.8s ease-in-out infinite;
}
@keyframes evPulse {
    0%, 100% { opacity: 1; }
    50%        { opacity: .3; }
}

/* ---- Section ---- */
.ev-section { margin-bottom: 1.75rem; }

.ev-section-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }

.ev-section-label {
    display: inline-flex; align-items: center; gap: .38rem;
    padding: .28rem .75rem;
    border-radius: var(--radius-full);
    font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    flex-shrink: 0;
}
.ev-section-label i { font-size: .55rem; }
.ev-section-label.today    { color: #b45309;          background: rgba(252,163,17,.14); }
.ev-section-label.upcoming { color: var(--info);       background: var(--info-light);   }
.ev-section-label.done     { color: var(--text-muted); background: var(--bg);           border: 1px solid var(--border-light); }

.ev-section-line { flex: 1; height: 1px; }
.ev-section-line.today    { background: linear-gradient(90deg, rgba(252,163,17,.35) 0%, transparent 100%); }
.ev-section-line.upcoming { background: linear-gradient(90deg, rgba(14,165,233,.3)  0%, transparent 100%); }
.ev-section-line.done     { background: var(--border-light); }

.ev-section-count { font-size: .68rem; color: var(--text-muted); flex-shrink: 0; }

/* ---- Items Grid ---- */
.ev-items { display: grid; gap: .8rem; }

/* ---- Single ev-item Card ---- */
.ev-item {
    display: grid;
    grid-template-columns: 62px 1fr auto auto;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: .9rem 1rem .9rem .9rem;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.ev-item::before {
    /* subtle shimmer line on top when live */
    content: '';
    position: absolute; inset: 0 0 auto 0;
    height: 2px;
    background: transparent;
    transition: background var(--transition);
}
.ev-item.is-live::before {
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    animation: evLiveShimmer 2.5s linear infinite;
}
@keyframes evLiveShimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200%  center; }
}
.ev-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border); }
.ev-item.is-done { opacity: .68; }
.ev-item.is-done:hover { opacity: 1; }
.ev-item.is-live { border-color: rgba(252,163,17,.4); background: rgba(252,163,17,.03); }
.ev-item.is-live:hover { box-shadow: 0 4px 20px rgba(252,163,17,.15); }

/* ---- Cal Box (date block) ---- */
.ev-cal-box {
    flex-shrink: 0;
    width: 54px; height: 62px;
    border-radius: var(--radius-md);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    line-height: 1; gap: 1px;
    color: #fff;
}
.ev-cal-box.ujian     { background: linear-gradient(145deg, var(--danger),  #b91c1c); box-shadow: 0 3px 10px rgba(239,68,68,.35); }
.ev-cal-box.workshop  { background: linear-gradient(145deg, var(--success), #15803d); box-shadow: 0 3px 10px rgba(34,197,94,.35); }
.ev-cal-box.pertemuan { background: linear-gradient(145deg, var(--info),    #0369a1); box-shadow: 0 3px 10px rgba(14,165,233,.35); }
.ev-cal-box.lainnya   { background: linear-gradient(145deg, var(--accent),  #d97706); box-shadow: 0 3px 10px rgba(252,163,17,.35); }

.ev-cal-day { font-size: 1.4rem; font-weight: 800; }
.ev-cal-mon { font-size: .52rem; font-weight: 700; letter-spacing: .06em; opacity: .85; text-transform: uppercase; }
.ev-cal-yr  { font-size: .48rem; font-weight: 600; opacity: .6 ; }

/* ---- Body ---- */
.ev-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }

.ev-title-row { display: flex; align-items: flex-start; gap: .5rem; flex-wrap: wrap; }

.ev-title {
    font-size: .9rem; font-weight: 700;
    color: var(--text); margin: 0;
    line-height: 1.3; flex: 1; min-width: 0;
}
.ev-title.is-done { text-decoration: line-through; color: var(--text-muted); }

.ev-type-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 9px;
    border-radius: var(--radius-full);
    font-size: .6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
    flex-shrink: 0;
}
.ev-type-badge.ujian     { background: rgba(239,68,68,.1);  color: var(--danger);  border: 1px solid rgba(239,68,68,.25);    }
.ev-type-badge.workshop  { background: rgba(34,197,94,.1);  color: var(--success); border: 1px solid rgba(34,197,94,.25);    }
.ev-type-badge.pertemuan { background: rgba(14,165,233,.1); color: var(--info);    border: 1px solid rgba(14,165,233,.25);   }
.ev-type-badge.lainnya   { background: rgba(252,163,17,.1); color: #92400e;        border: 1px solid rgba(252,163,17,.28);   }

.ev-meta {
    display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}

.ev-chip {
    display: inline-flex; align-items: center; gap: .28rem;
    font-size: .7rem; color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.ev-chip i { font-size: .62rem; }
.ev-chip.live-pulse { color: var(--accent); background: rgba(252,163,17,.08); border-color: rgba(252,163,17,.28); font-weight: 600; }
.ev-chip.live-pulse i { animation: evPulse 1.4s ease-in-out infinite; }

.ev-excerpt {
    font-size: .78rem; color: var(--text-secondary);
    line-height: 1.55; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

.ev-by {
    display: flex; align-items: center; gap: .38rem;
    font-size: .68rem; color: var(--text-muted); margin: 0;
}
.ev-by i { font-size: .58rem; }

/* ---- Countdown Badge ---- */
.ev-countdown {
    flex-shrink: 0;
    padding: .38rem .65rem;
    border-radius: var(--radius-md);
    font-size: .72rem; font-weight: 800;
    text-align: center; line-height: 1.2;
    min-width: 52px;
    white-space: nowrap;
}
.ev-countdown.live     { background: rgba(252,163,17,.15); color: #b45309; border: 1px solid rgba(252,163,17,.35); animation: evPulse 2s ease-in-out infinite; }
.ev-countdown.soon     { background: rgba(239,68,68,.1);   color: var(--danger);       border: 1px solid rgba(239,68,68,.25); }
.ev-countdown.upcoming { background: rgba(14,165,233,.1);  color: var(--info);         border: 1px solid rgba(14,165,233,.25); }
.ev-countdown.done     { background: var(--bg);            color: var(--text-muted);   border: 1px solid var(--border-light); }

/* ---- Arrow ---- */
.ev-arrow {
    flex-shrink: 0; width: 24px; height: 24px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--text-muted);
    font-size: .6rem;
    transition: all var(--transition-fast);
}
.ev-item:hover .ev-arrow { background: var(--accent); color: var(--primary); transform: translateX(2px); }

/* ---- Detail Bottom Sheet (evdp-) ---- */
.evdp-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1100;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.evdp-overlay.open { opacity: 1; pointer-events: all; }

.evdp-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    z-index: 1101;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 -8px 32px rgba(0,0,0,.14);
}
.evdp-sheet.open { transform: translateY(0); }

.evdp-handle {
    width: 38px; height: 4px;
    background: var(--border); border-radius: 2px;
    margin: 10px auto 4px; flex-shrink: 0;
}

.evdp-header {
    display: flex; align-items: flex-start;
    padding: .75rem 1.25rem .7rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0; gap: .75rem;
}
.evdp-header-icon {
    width: 42px; height: 42px; flex-shrink: 0;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.evdp-header-icon.ujian     { background: rgba(239,68,68,.12); color: var(--danger);  }
.evdp-header-icon.workshop  { background: rgba(34,197,94,.12); color: var(--success); }
.evdp-header-icon.pertemuan { background: rgba(14,165,233,.12);color: var(--info);    }
.evdp-header-icon.lainnya   { background: rgba(252,163,17,.12);color: #b45309;        }

.evdp-header-text { flex: 1; min-width: 0; }
.evdp-title { font-size: 1.025rem; font-weight: 700; color: var(--text); margin: 0 0 5px; line-height: 1.3; }
.evdp-badges { display: flex; gap: .35rem; flex-wrap: wrap; }

.evdp-close {
    width: 32px; height: 32px; flex-shrink: 0;
    border: none; background: var(--bg); border-radius: var(--radius-full);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: .9rem;
    transition: all var(--transition-fast);
}
.evdp-close:hover { background: var(--danger-light); color: var(--danger); }

.evdp-meta-bar {
    display: flex; align-items: center; gap: .7rem;
    padding: .5rem 1.25rem; background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0; font-size: .71rem; color: var(--text-muted); flex-wrap: wrap;
}
.evdp-meta-bar i { font-size: .6rem; }
.evdp-meta-sep { opacity: .3; }

.evdp-body {
    flex: 1; overflow-y: auto;
    padding: .85rem 1.25rem 2.5rem;
    display: grid; gap: .55rem;
}

.evdp-row {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: .65rem .9rem;
}
.evdp-lbl {
    display: block;
    font-size: .64rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted); margin-bottom: 5px;
}
.evdp-lbl i { font-size: .58rem; margin-right: 2px; }
.evdp-val { font-size: .875rem; color: var(--text); margin: 0; font-weight: 600; }
.evdp-content {
    font-size: .875rem; color: var(--text);
    line-height: 1.8; word-break: break-word;
    white-space: pre-wrap; margin: 0;
}
/* Desktop — centered rounded modal */
@media (min-width: 769px) {
    .evdp-sheet {
        bottom: auto; left: 50%; top: 50%;
        transform: translate(-50%, -46%) scale(0.96);
        right: auto;
        width: 520px; max-width: calc(100vw - 2rem);
        border-radius: 20px;
        opacity: 0; pointer-events: none;
        transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .2s;
        max-height: 82vh;
    }
    .evdp-sheet.open {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1; pointer-events: all;
    }
    .evdp-handle { display: none; }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .ev-item {
        grid-template-columns: 50px 1fr auto;
        grid-template-rows: auto auto;
    }
    .ev-arrow { display: none; }
    .ev-cal-box { width: 48px; height: 54px; }
    .ev-cal-day { font-size: 1.2rem; }
    .ev-item { padding: .75rem .85rem .75rem .75rem; gap: .75rem; }
    .evdp-meta-bar { gap: .45rem; font-size: .68rem; }
}

/* ============================================
   Page Transition Animations
   ============================================ */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Main content entry animation */
.app-content {
    animation: pageEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Staggered children animations */
.app-content > *:nth-child(1) { animation: pageEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both; }
.app-content > *:nth-child(2) { animation: pageEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
.app-content > *:nth-child(3) { animation: pageEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }
.app-content > *:nth-child(4) { animation: pageEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both; }
.app-content > *:nth-child(5) { animation: pageEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both; }
.app-content > *:nth-child(6) { animation: pageEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both; }
.app-content > *:nth-child(7) { animation: pageEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both; }
.app-content > *:nth-child(8) { animation: pageEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both; }
.app-content > *:nth-child(n+9) { animation: pageEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both; }

/* Exclude fixed-position popout overlays, sheets & modals from page-enter animation */
.app-content > [class*="-overlay"],
.app-content > [class*="-sheet"] {
    animation: none !important;
}

/* ============================================
   Skeleton Loading System — Modern
   ============================================ */

/* Overlay that covers the content area (below topbar, above mobile nav) */
.skeleton-overlay {
    position: fixed;
    top: var(--topbar-height);
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 80;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.skeleton-overlay.skeleton-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Skeleton body */
.skel-body {
    flex: 1;
    padding: 24px;
    overflow: hidden;
}

/* Skeleton shimmer animation */
@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skel-bone {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        #e8eaed 20%,
        var(--bg-secondary) 40%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.8s ease-in-out infinite;
    border-radius: var(--radius);
}
/* Dark mode: dim the skeleton shimmer so it's not glaring */
[data-theme="dark"] .skel-bone {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        #2a2d38 20%,
        var(--bg-secondary) 40%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
}

/* Skeleton shapes */
.skel-circle {
    border-radius: var(--radius-full);
}

.skel-rounded {
    border-radius: var(--radius-md);
}

.skel-pill {
    border-radius: var(--radius-full);
}

/* Skeleton: Page Hero */
.skel-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.skel-hero-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.skel-hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Skeleton: Filter Nav */
.skel-filter-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 4px;
}

/* Skeleton: Cards grid */
.skel-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.skel-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Skeleton: Stat cards row */
.skel-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.skel-stat-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Skeleton: List items */
.skel-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skel-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
}

/* Skeleton: Table rows (admin pages) */
.skel-table {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.skel-table-header {
    display: flex;
    gap: 16px;
    padding: 14px 20px;
    background: var(--bg-secondary);
}

.skel-table-row {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

/* Skeleton: Banner (dashboard) */
.skel-banner {
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.skel-banner-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.skel-banner-right {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
}

/* Responsive skeleton */
@media (max-width: 1024px) {
    .skeleton-overlay {
        left: 0;
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    }

    .skel-cards {
        grid-template-columns: 1fr;
    }

    .skel-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .skel-body {
        padding: 16px;
    }

    .skel-stats {
        grid-template-columns: 1fr 1fr;
    }

    .skel-hero {
        padding: 18px;
    }

    .skel-banner {
        flex-direction: column;
        gap: 16px;
    }
}

/* ============================================
   License Warning Banners
   ============================================ */
.license-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    margin: 0 0 12px;
    border-radius: var(--radius);
    font-size: .84rem;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
}
.license-banner i { font-size: .9rem; flex-shrink: 0; }
.license-banner a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.license-banner-info {
    background: color-mix(in srgb, #3b82f6 8%, transparent);
    border-color: color-mix(in srgb, #3b82f6 20%, transparent);
    color: #2563eb;
}
.license-banner-info a { color: #1d4ed8; }

.license-banner-warning {
    background: color-mix(in srgb, #f59e0b 8%, transparent);
    border-color: color-mix(in srgb, #f59e0b 20%, transparent);
    color: #b45309;
}
.license-banner-warning a { color: #92400e; }

.license-banner-danger {
    background: color-mix(in srgb, #ef4444 8%, transparent);
    border-color: color-mix(in srgb, #ef4444 20%, transparent);
    color: #dc2626;
}
.license-banner-danger a { color: #b91c1c; }

/* ============================================
   Trial / Freemium Banners
   ============================================ */
.trial-banner {
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #fcd34d;
    padding: 8px 16px;
    text-align: center;
    font-size: .8rem;
    color: #92400e;
}
.trial-banner-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.trial-banner a {
    color: #b45309;
    font-weight: 700;
    text-decoration: underline;
}
.trial-banner a:hover { color: #78350f; }
.trial-banner.trial-urgent {
    background: linear-gradient(90deg, #fee2e2, #fecaca);
    border-bottom-color: #f87171;
    color: #991b1b;
}
.trial-banner.trial-urgent a { color: #dc2626; }
.trial-banner.trial-expired {
    background: linear-gradient(90deg, #fecaca, #fca5a5);
    border-bottom-color: #ef4444;
    color: #7f1d1d;
}
.trial-banner.trial-expired a { color: #b91c1c; }

[data-theme="dark"] .trial-banner {
    background: linear-gradient(90deg, #422006, #451a03);
    border-bottom-color: #92400e;
    color: #fde68a;
}
[data-theme="dark"] .trial-banner a { color: #fbbf24; }
[data-theme="dark"] .trial-banner.trial-urgent {
    background: linear-gradient(90deg, #450a0a, #7f1d1d);
    border-bottom-color: #dc2626;
    color: #fecaca;
}
[data-theme="dark"] .trial-banner.trial-expired {
    background: linear-gradient(90deg, #7f1d1d, #991b1b);
    border-bottom-color: #ef4444;
    color: #fee2e2;
}

/* ============================================
   Desktop Redesign — Phase 1: Topbar Logout
   ============================================ */
.topbar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    transition: background var(--transition-fast), color var(--transition-fast);
    text-decoration: none;
}
.topbar-logout-btn:hover {
    background: var(--danger-light);
    color: var(--danger);
}
@media (max-width: 1023px) {
    .topbar-logout-btn { display: none; }
}

/* ============================================
   Desktop Redesign — Phase 2: Sidebar Collapsible
   ============================================ */
.sidebar-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.35rem 1rem 0.35rem 1.1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.45);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color var(--transition-fast);
}
.sidebar-section-toggle:hover { color: rgba(255,255,255,0.75); }
.sidebar-section-toggle.has-active { color: var(--accent); }

.sst-arrow {
    font-size: 0.55rem;
    transition: transform 0.2s ease;
}
.sidebar-section-toggle.open .sst-arrow {
    transform: rotate(180deg);
}

.sidebar-section-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}
.sidebar-section-body.open {
    max-height: 600px;
}

/* ============================================
   Desktop Redesign — Phase 3: Dashboard Grid
   ============================================ */
.dash-desktop-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.dash-main {
    min-width: 0;
    flex: 1;
}
.dash-right-panel {
    display: none;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 1200px) {
    .app-scroll-body.dashboard-scroll-lock {
        overflow: hidden;
    }
    .app-content.dashboard-content-lock {
        height: calc(var(--app-height) - var(--topbar-height));
        padding: 18px 24px 18px;
        overflow: hidden;
        max-width: none;
        min-height: 0;
        box-sizing: border-box;
    }
    .dash-desktop-grid {
        display: grid;
        grid-template-columns: 1fr 340px;
        gap: 1rem;
        align-items: stretch;
        height: 100%;
        min-height: 0;
        padding-top: 0;
        box-sizing: border-box;
        overflow: visible;
    }
    .dash-main {
        display: grid;
        grid-template-rows: auto minmax(238px, 1fr) minmax(0, 1.26fr);
        gap: .48rem;
        height: 100%;
        min-height: 0;
        overflow: visible;
        overflow-x: visible;
        padding-right: 0;
        padding-bottom: 0;
    }
    .dash-right-panel {
        display: flex;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        gap: .48rem;
        padding-bottom: 0;
        box-sizing: border-box;
    }
    #dashUpcomingTasks,
    #dashMyCourses {
        min-height: 0;
        margin-bottom: 0 !important;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        transition: none;
    }
    #dashUpcomingTasks {
        overflow: visible;
        position: relative;
        z-index: 40;
        isolation: isolate;
    }
    #dashMyCourses {
        overflow: hidden;
    }
    #dashUpcomingTasks:hover,
    #dashMyCourses:hover {
        box-shadow: var(--shadow-card);
        transform: none;
    }
    .dut-scroll,
    .dmc-pager-wrap {
        min-height: 0;
    }
    .dut-scroll {
        flex: 1;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        align-content: stretch;
        padding-right: 0;
    }
    .dmc-pager-wrap {
        flex: 1;
    }
    .dmc-pager {
        height: 100%;
    }
    .dmc-page {
        height: 100%;
        align-content: start;
    }
}
@media (min-width: 1440px) {
    .dash-desktop-grid {
        grid-template-columns: 1fr 380px;
    }
}

@media (max-width: 1199.98px) {
    .dash-banner,
    #dashUpcomingTasks,
    #dashMyCourses {
        margin-bottom: .55rem !important;
    }
    .dash-main > :last-child {
        margin-bottom: 0 !important;
    }
}

.dash-banner {
    min-height: 86px;
    padding: .72rem .92rem;
    border-radius: 18px;
    gap: .64rem;
}
.dash-banner::before {
    inset: auto auto -52px -18px;
    width: 118px;
    height: 118px;
}
.dash-banner::after {
    display: none;
}
.dash-banner-left {
    gap: .64rem;
}
.dash-greet-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 12px;
    font-size: .92rem;
}
.dash-greet-title {
    font-size: .96rem;
}
.dash-greet-sub {
    font-size: .68rem;
}
.dash-banner-pills {
    margin-top: .16rem;
    gap: .28rem;
}
.dash-banner-pill {
    padding: .22rem .48rem;
    font-size: .59rem;
}
.dash-banner-right {
    gap: .48rem;
}
.dash-banner-next {
    min-width: 144px;
    max-width: 170px;
    padding: .54rem .68rem;
    border-radius: 14px;
}
.dash-banner-next::before {
    top: -28px;
    right: -18px;
    width: 82px;
    height: 82px;
}
.dash-banner-next-title {
    font-size: .72rem;
}
.dash-banner-next-meta {
    font-size: .6rem;
}
.dash-ring-wrap {
    width: 58px;
    height: 58px;
}
.dash-ring-svg {
    width: 58px;
    height: 58px;
}
.dash-ring-label {
    transform: translate(-50%,-50%) scale(.82);
    transform-origin: center;
}
.dash-ring-value {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 1px;
    line-height: 1;
}
.dash-ring-num,
.dash-ring-sym {
    line-height: 1;
}
.dash-ring-sym {
    margin-top: 0;
}

.dut-card,
.dmc-card,
.dta-card {
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--border) 84%, rgba(255,255,255,.06) 16%);
    box-shadow: 0 18px 34px rgba(15,23,42,.1);
}
.dut-card {
    padding: .88rem .95rem .92rem;
}
.dut-header,
.dmc-header,
.dta-header {
    margin-bottom: .62rem;
}
.dut-scroll {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
}
.dut-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: .68rem;
    padding: .78rem .82rem;
    border-radius: 16px;
}
.dut-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}
.dut-item-title {
    font-size: .78rem;
}
.dut-item-meta {
    font-size: .66rem;
}

.dmc-card {
    padding: .88rem .95rem .92rem;
}
.dmc-page {
    gap: .62rem;
}
.dmc-course-card {
    padding: .8rem;
    border-radius: 16px;
    gap: .58rem;
}
.dmc-course-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
}
.dmc-course-nama {
    font-size: .76rem;
}
.dmc-chip {
    font-size: .6rem;
    padding: .2rem .42rem;
}
.dmc-detail-link {
    padding: .34rem .66rem;
}

.dta-card {
    padding: .88rem .95rem .9rem;
}
.dta-list {
    max-height: 238px;
}
.dta-row {
    gap: .62rem;
    padding: .62rem .32rem;
}
.dta-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}
.dta-row-title {
    font-size: .78rem;
}
.dta-row-sub {
    font-size: .66rem;
}

/* ============================================
   Desktop Redesign — Phase 4: Profile Card
   ============================================ */
.drp-profile-card {
    background:
        radial-gradient(circle at top left, rgba(99,102,241,.12), transparent 28%),
        radial-gradient(circle at top right, rgba(245,158,11,.1), transparent 24%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #111827 4%), var(--surface));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .5rem .75rem .4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.drp-profile-card::before,
.drp-profile-card::after {
    content: '';
    position: absolute;
    pointer-events: none;
    opacity: .7;
}
.drp-profile-card::before {
    top: 10px;
    left: 12px;
    width: 64px;
    height: 34px;
    background:
        linear-gradient(90deg, rgba(99,102,241,.22) 0 8px, transparent 8px 14px, rgba(99,102,241,.14) 14px 22px, transparent 22px 28px, rgba(99,102,241,.2) 28px 36px, transparent 36px 100%),
        linear-gradient(180deg, rgba(99,102,241,.16) 0 7px, transparent 7px 13px, rgba(99,102,241,.12) 13px 20px, transparent 20px 100%);
    filter: blur(.2px);
}
.drp-profile-card::after {
    top: 12px;
    right: 14px;
    width: 72px;
    height: 38px;
    background:
        linear-gradient(90deg, transparent 0 16px, rgba(245,158,11,.18) 16px 24px, transparent 24px 32px, rgba(245,158,11,.12) 32px 40px, transparent 40px 48px, rgba(245,158,11,.18) 48px 56px, transparent 56px 100%),
        linear-gradient(180deg, rgba(245,158,11,.12) 0 8px, transparent 8px 14px, rgba(245,158,11,.1) 14px 22px, transparent 22px 100%);
    filter: blur(.25px);
}
.drp-avatar-wrap {
    position: relative;
    width: 48px;
    height: 48px;
}
.drp-avatar-img, .drp-avatar-initials {
    width: 48px; height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700;
    border: 2px solid var(--accent-50);
}
.drp-role-badge {
    position: absolute;
    bottom: 0; right: -4px;
    font-size: .6rem;
    font-weight: 700;
    text-transform: capitalize;
    padding: 2px 6px;
    border-radius: 99px;
    border: 2px solid var(--bg);
}
.drp-role--mahasiswa { background: var(--accent); color: #fff; }
.drp-role--admin     { background: var(--danger);  color: #fff; }
.drp-role--pj        { background: var(--warning); color: #fff; }
.drp-profile-name {
    font-size: .82rem; font-weight: 700;
    color: var(--text); margin: 0;
    position: relative;
    z-index: 1;
}
.drp-profile-nim, .drp-profile-class {
    font-size: .72rem;
    color: var(--text);
    opacity: .7;
    margin: 0;
    position: relative;
    z-index: 1;
}
.drp-profile-class i { margin-right: 4px; }
.drp-profile-stats {
    display: flex;
    gap: .36rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: .34rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    width: 100%;
    position: relative;
    z-index: 1;
}
.drp-pstat {
    display: inline-flex;
    align-items: center;
    gap: .34rem;
    min-width: 0;
    padding: .36rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(248,184,78,.22);
    background: linear-gradient(180deg, rgba(248,184,78,.12), rgba(248,184,78,.06));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    color: var(--text-muted);
    font-size: .66rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
}
.drp-pstat-val {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: -.01em;
}
.drp-pstat-lbl {
    color: #cbd4e4;
    text-transform: none;
}
.drp-pstat--jadwal .drp-pstat-val {
    color: #ff7b72;
}
.drp-pstat--event .drp-pstat-val {
    color: #f6c15b;
}
.drp-pstat--focus .drp-pstat-val {
    color: #58d6a2;
}
.drp-pstat-divider { display: none; }
.drp-profile-actions {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: .4rem;
    width: 100%;
    margin-top: .15rem;
}
.drp-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    justify-content: flex-start;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text);
    padding: .4rem .75rem;
    min-width: 0;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface-hover), var(--surface));
    box-shadow: 0 8px 18px rgba(15,23,42,.08);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.drp-profile-btn:hover {
    color: var(--text);
    background: linear-gradient(180deg, var(--surface), var(--surface-hover));
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(15,23,42,.12);
    transform: translateY(-1px);
}
.drp-profile-btn:active {
    transform: translateY(0);
}
.drp-role-tag {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    font-size: .6rem;
    font-weight: 700;
    text-transform: capitalize;
    padding: .28rem .62rem;
    border-radius: 999px;
    letter-spacing: .03em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 18px rgba(15,23,42,.12);
}
.drp-role-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.drp-role-tag.drp-role--mahasiswa {
    background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(99,102,241,.08));
    color: var(--accent);
    border: 1px solid rgba(99,102,241,.28);
}
.drp-role-tag.drp-role--admin {
    background: linear-gradient(135deg, rgba(239,68,68,.2), rgba(239,68,68,.08));
    color: #ff6b6b;
    border: 1px solid rgba(239,68,68,.32);
}
.drp-role-tag.drp-role--pj {
    background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(245,158,11,.08));
    color: #ffb84d;
    border: 1px solid rgba(245,158,11,.32);
}

/* ============================================
   Desktop Redesign — Phase 5: Mini Calendar
   ============================================ */
/* ============================================
   Desktop Redesign — Mini Calendar (Full Month)
   ============================================ */
.drp-mini-cal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .5rem .65rem .35rem;
    flex-shrink: 0;
}
.drp-mini-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .35rem;
}
.drp-mc-nav {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: .75rem;
    padding: .3rem .5rem; border-radius: 8px;
    transition: all var(--transition-fast);
}
.drp-mc-nav:hover { background: var(--surface-hover); color: var(--accent); }
.drp-mc-month-title {
    font-size: .85rem; font-weight: 700; color: var(--text);
}
.drp-mc-weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 0; margin-bottom: .1rem;
}
.drp-mc-weekdays span {
    text-align: center; font-size: .55rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase;
    padding: .1rem 0;
}
.drp-mc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}
.drp-mc-cell {
    display: flex; flex-direction: column; align-items: center;
    gap: 1px; padding: .05rem .05rem; border-radius: 6px;
    cursor: pointer; transition: background var(--transition-fast);
    min-height: 26px;
}
.drp-mc-cell:hover:not(.drp-mc-cell--empty) { background: var(--surface-hover); }
.drp-mc-cell--empty { min-height: 26px; cursor: default; }
.drp-mc-num {
    font-size: .63rem; font-weight: 600; color: var(--text);
    width: 19px; height: 19px;
    display: flex; align-items: center; justify-content: center;
}
.drp-mc-today .drp-mc-num {
    background: var(--accent); color: #fff; border-radius: 50%;
    font-weight: 700;
}
.drp-mc-dots { display: flex; gap: 2px; min-height: 3px; }
.drp-mc-dot {
    width: 3px; height: 3px; border-radius: 50%; flex-shrink: 0;
}
.drp-mc-dot--jadwal { background: var(--accent); }
.drp-mc-dot--tugas  { background: var(--danger); }
.drp-mc-dot--event  { background: var(--warning); }

/* ============================================
   Desktop Redesign — Timeline (Clean Hourly)
   ============================================ */
.drp-timeline {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at top left, rgba(148,163,184,.05), transparent 34%),
        radial-gradient(circle at top right, rgba(245,158,11,.12), transparent 22%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #0f172a 4%), color-mix(in srgb, var(--surface) 92%, #020617 8%));
    border: 1px solid color-mix(in srgb, var(--border) 80%, rgba(99,102,241,.2) 20%);
    border-radius: 14px 14px 20px 20px;
    padding: .52rem .72rem .56rem;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: .34rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15,23,42,.16);
}
.drp-timeline::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 34%;
    background: linear-gradient(180deg, rgba(245,158,11,.08), rgba(245,158,11,0));
    pointer-events: none;
    z-index: 0;
}
.drp-timeline > * {
    position: relative;
    z-index: 1;
}
.drp-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .08rem 0 .18rem;
}
.drp-timeline-head-main {
    display: flex;
    flex-direction: column;
    gap: .14rem;
    min-width: 0;
}
.drp-timeline-head-sub {
    font-size: .62rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}
.drp-timeline-head-sub span:not(.drp-tl-today-badge) {
    display: inline-flex;
    align-items: center;
    padding: 0;
}
.drp-tl-day, .drp-tl-date {
    font-size: .84rem; font-weight: 800; color: var(--text); margin-right: 2px;
}
.drp-tl-today-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .58rem;
    background: rgba(245,158,11,.16);
    color: var(--warning);
    border-radius: 999px;
    padding: 3px 8px;
    font-weight: 700;
    border: 1px solid rgba(245,158,11,.22);
    margin-left: 0;
}
.drp-tl-clock {
    font-size: .82rem; font-weight: 800; color: var(--warning);
    font-variant-numeric: tabular-nums;
    padding: .32rem .55rem;
    border-radius: 999px;
    background: rgba(245,158,11,.1);
    border: 1px solid rgba(245,158,11,.18);
}
.drp-tl-scroll-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-bottom: .14rem;
}
.drp-tl-body {
    height: 100%;
    overflow: hidden; min-height: 0;
    display: flex; flex-direction: column; gap: 0;
    padding: .04rem 2px 0 0;
    scrollbar-width: thin;
}
.drp-tl-now-overlay {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    pointer-events: none;
    z-index: 5;
}
.drp-tl-now-triangle {
    position: absolute;
    right: 2px;
    top: 50%;
    width: 0;
    height: 0;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 9px solid #ef4444;
    filter: drop-shadow(0 3px 10px rgba(239,68,68,.28));
}
.drp-tl-body::-webkit-scrollbar {
    width: 4px;
}
.drp-tl-body::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,.28);
    border-radius: 999px;
}
.drp-tl-slot {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: .35rem;
    padding: .14rem 0;
    position: relative;
    min-height: 34px;
    align-items: center;
}
.drp-tl-hour {
    font-size: .64rem; color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    text-align: left;
    padding-right: 0;
    display: flex;
    align-items: center;
    min-height: 100%;
    transition: opacity var(--transition-fast);
}
.drp-tl-items {
    position: relative;
    isolation: isolate;
    padding: .18rem 1rem .18rem .24rem;
    min-height: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.drp-tl-items::before {
    content: '';
    position: absolute;
    left: .24rem;
    right: 1rem;
    top: 50%;
    height: 1px;
    background: color-mix(in srgb, var(--border) 86%, rgba(255,255,255,.08) 14%);
    transform: translateY(-50%);
    z-index: 0;
}
.drp-tl-item {
    border-radius: 12px;
    padding: .6rem .72rem;
    margin-bottom: 0;
    margin-right: .78rem;
    font-size: .72rem;
    position: relative;
    z-index: var(--drp-item-layer, 2);
    border: 1px solid transparent;
    box-shadow: 0 14px 24px rgba(2,6,23,.16);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), z-index var(--transition-fast);
}
.drp-tl-item + .drp-tl-item {
    margin-top: -.42rem;
}
.drp-tl-item:hover {
    z-index: 30;
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(2,6,23,.24);
}
.drp-tl-item--jadwal {
    background: linear-gradient(135deg, #273469, #1b2348);
    border-color: rgba(148,163,184,.18);
    border-left: 3px solid #7c8fda;
    color: rgba(255,255,255,.96);
}
.drp-tl-item--event {
    background: linear-gradient(135deg, #3b2d1f, #241811);
    border-color: rgba(251,191,36,.16);
    border-left: 3px solid #b78a47;
    color: rgba(255,255,255,.96);
}
.drp-tl-item-title { font-weight: 700; color: var(--text); font-size: .8rem; letter-spacing: -.01em; }
.drp-tl-item-sub { color: var(--text-muted); font-size: .66rem; margin-top: 4px; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.drp-tl-item--jadwal .drp-tl-item-title,
.drp-tl-item--event .drp-tl-item-title {
    color: rgba(255,255,255,.98);
}
.drp-tl-item--jadwal .drp-tl-item-sub,
.drp-tl-item--event .drp-tl-item-sub {
    color: rgba(226,232,240,.8);
}
.drp-tl-item-sub span {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    padding: .16rem .42rem;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
}
.drp-tl-item-sub i {
    font-size: .62rem;
    opacity: .9;
}
[data-theme="light"] .drp-timeline {
    background: linear-gradient(180deg, #ffffff, #fbfbfd);
    border-color: rgba(15,23,42,.08);
}
[data-theme="light"] .drp-tl-item-sub span {
    background: rgba(15,23,42,.04);
    border-color: rgba(15,23,42,.06);
}
[data-theme="light"] .drp-tl-item--jadwal {
    background: linear-gradient(135deg, rgba(245,240,221,.95), rgba(255,255,255,.9));
    border-color: rgba(15,23,42,.06);
}
[data-theme="light"] .drp-tl-item--event {
    background: linear-gradient(135deg, rgba(255,243,214,.95), rgba(255,255,255,.92));
    border-color: rgba(15,23,42,.06);
}
[data-theme="dark"] .drp-tl-item {
    box-shadow: 0 10px 20px rgba(0,0,0,.22);
}

/* ============================================
   Dashboard — Day Detail Modal
   ============================================ */
.dmc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9000;
    cursor: pointer;
}
.dmc-modal-overlay.show { display: block; }
.dmc-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -46%) scale(.94);
    opacity: 0;
    width: min(640px, 92vw);
    max-height: 80vh;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15,23,42,.22), 0 0 0 1px var(--border);
    z-index: 9001;
    flex-direction: column;
    overflow: hidden;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .18s ease;
}
.dmc-modal.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}
.dmc-modal-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; padding: 1rem 1.2rem .7rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.dmc-modal-date { font-size: 1rem; font-weight: 800; color: var(--text); margin: 0 0 2px; }
.dmc-modal-sub { font-size: .74rem; color: var(--text-muted); margin: 0; }
.dmc-modal-close {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: 1px solid var(--border); border-radius: 8px;
    background: none; cursor: pointer;
    color: var(--text-muted); font-size: .8rem;
    transition: all var(--transition-fast); flex-shrink: 0;
}
.dmc-modal-close:hover { background: rgba(239,68,68,.1); color: var(--danger); transform: rotate(90deg); }
.dmc-modal-tabs {
    display: flex; gap: .25rem; padding: .5rem 1.2rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0; overflow-x: auto; scrollbar-width: none;
}
.dmc-modal-tabs::-webkit-scrollbar { display: none; }
.dmc-modal-tab {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .3rem .7rem; border-radius: 99px;
    font-size: .7rem; font-weight: 600; cursor: pointer;
    border: 1.5px solid transparent; white-space: nowrap;
    background: var(--bg); color: var(--text-muted);
    transition: all var(--transition-fast);
}
.dmc-modal-tab.active { color: #fff; }
.dmc-modal-tab[data-type="all"]    { border-color: var(--accent); }
.dmc-modal-tab[data-type="all"].active { background: var(--accent); }
.dmc-modal-tab[data-type="jadwal"] { border-color: var(--accent); }
.dmc-modal-tab[data-type="jadwal"].active { background: var(--accent); }
.dmc-modal-tab[data-type="tugas"]  { border-color: var(--warning); }
.dmc-modal-tab[data-type="tugas"].active { background: var(--warning); color: #000; }
.dmc-modal-tab[data-type="event"]  { border-color: var(--danger); }
.dmc-modal-tab[data-type="event"].active { background: var(--danger); }
.dmc-modal-tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 99px; font-size: .58rem; font-weight: 800;
    background: rgba(255,255,255,.2); color: inherit;
}
.dmc-modal-tab:not(.active) .dmc-modal-tab-count { background: var(--border); color: var(--text-muted); }
.dmc-modal-body {
    overflow-y: auto; flex: 1;
    padding: .8rem 1.2rem;
    display: flex; flex-direction: column; gap: .4rem;
}
.dmc-section-title {
    display: flex; align-items: center; gap: .4rem;
    font-size: .64rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .06em;
    margin-top: .3rem;
}
.dmc-item {
    display: flex; gap: .6rem;
    padding: .65rem .8rem; border-radius: 10px;
    border: 1px solid var(--border);
    transition: box-shadow var(--transition-fast);
}
.dmc-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.dmc-item.type-jadwal { border-left: 4px solid var(--accent); }
.dmc-item.type-tugas  { border-left: 4px solid var(--warning); }
.dmc-item.type-event  { border-left: 4px solid var(--danger); }
.dmc-item.done { opacity: .5; }
.dmc-item-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: .8rem;
}
.type-jadwal .dmc-item-icon { background: rgba(99,102,241,.1); color: var(--accent); }
.type-tugas  .dmc-item-icon { background: rgba(245,158,11,.1); color: var(--warning); }
.type-event  .dmc-item-icon { background: rgba(239,68,68,.1);  color: var(--danger); }
.dmc-item-title { font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.dmc-item.done .dmc-item-title { text-decoration: line-through; color: var(--text-muted); }
.dmc-item-meta { display: flex; flex-wrap: wrap; gap: .25rem; }
.dmc-chip {
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .12rem .4rem; border-radius: 99px;
    font-size: .62rem; font-weight: 500;
    background: var(--bg); color: var(--text-muted); border: 1px solid var(--border);
}
.dmc-chip.prio-high { background: rgba(239,68,68,.08); color: var(--danger); border-color: rgba(239,68,68,.2); }
.dmc-chip.prio-med  { background: rgba(245,158,11,.08); color: var(--warning); border-color: rgba(245,158,11,.2); }
.dmc-chip.prio-low  { background: rgba(16,185,129,.08); color: #10b981; border-color: rgba(16,185,129,.2); }
.dmc-chip.done-chip { background: rgba(16,185,129,.08); color: #10b981; }
.dmc-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 2rem 1rem;
    text-align: center; gap: .5rem; color: var(--text-muted);
}
.dmc-empty i { font-size: 2rem; opacity: .3; }
.dmc-empty p { font-size: .82rem; margin: 0; }

/* ============================================
   Desktop Redesign — Upcoming Tasks (Horizontal Scroll)
   ============================================ */
.dut-card {
    padding: .88rem .94rem .9rem;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 97%, #111827 3%), color-mix(in srgb, var(--surface) 94%, #0b1220 6%));
    border: 1px solid color-mix(in srgb, var(--border) 82%, rgba(255,255,255,.05) 18%);
    box-shadow: 0 18px 34px rgba(2, 6, 23, .18);
}
.dut-header {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .62rem;
}
.dut-title-group {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}
.dut-title {
    font-size: .94rem; font-weight: 800; color: var(--text);
    display: flex; align-items: center; gap: 6px;
    margin: 0;
}
.dut-title i { color: #f8b84e; }
.dut-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .7rem;
    margin-bottom: .42rem;
    flex-wrap: wrap;
}
.dut-meta-copy {
    display: flex;
    flex-direction: column;
    gap: .08rem;
    min-width: 0;
    flex: 1 1 260px;
}
.dut-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .52rem;
    margin-left: auto;
    flex-wrap: wrap;
}
.dut-toolbar .tk-filter-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .38rem .8rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    outline: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.dut-toolbar .tk-filter-badge-label {
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dut-toolbar .tk-filter-badge i { font-size: .72rem; }
.dut-toolbar .tk-matkul-popout {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    min-width: 230px;
    max-width: 300px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(0,0,0,.16);
    z-index: 200;
    animation: tkPopIn .18s cubic-bezier(.34,1.56,.64,1);
    overflow: hidden;
}
@keyframes tkPopIn { from { opacity:0; transform:translateY(-8px) scale(.97); } to { opacity:1; transform:none; } }
.dut-toolbar .tk-matkul-popout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .9rem .5rem;
    border-bottom: 1px solid var(--border-light);
}
.dut-toolbar .tk-matkul-popout-title {
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.dut-toolbar .tk-matkul-popout-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1;
    padding: 0 .2rem;
}
.dut-toolbar .tk-matkul-popout-close:hover { color: var(--text); }
.dut-toolbar .tk-matkul-popout-list {
    padding: .4rem .5rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    max-height: 260px;
    overflow-y: auto;
}
.dut-toolbar .tk-matkul-popout-list::-webkit-scrollbar { width: 4px; }
.dut-toolbar .tk-matkul-popout-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.dut-toolbar .tk-matkul-pick-option {
    padding: .6rem .8rem;
    font-size: .84rem;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.dut-toolbar .tk-matkul-pick-option:hover {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    color: var(--accent-dark);
}
.dut-toolbar .tk-matkul-pick-option.selected {
    font-weight: 700;
    color: var(--accent-dark);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.dut-toolbar .tk-matkul-popout-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}
.dut-filter-wrap,
.dut-matkul-wrap {
    position: relative;
}
.dut-filter-trigger.tk-filter-badge,
.dut-matkul-trigger.tk-filter-badge {
    border-color: rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
    color: var(--text-secondary);
    padding: .45rem .78rem;
}
.dut-filter-trigger.tk-filter-badge i,
.dut-matkul-trigger.tk-filter-badge i {
    color: #f8b84e;
}
.dut-filter-trigger.tk-filter-badge:hover,
.dut-filter-trigger.tk-filter-badge.active,
.dut-filter-trigger.tk-filter-badge.has-filter,
.dut-matkul-trigger.tk-filter-badge:hover,
.dut-matkul-trigger.tk-filter-badge.active,
.dut-matkul-trigger.tk-filter-badge.has-filter {
    border-color: rgba(248,184,78,.24);
    color: #f8b84e;
    background: rgba(248,184,78,.08);
}
.dut-filter-popout.tk-matkul-popout,
.dut-matkul-popout.tk-matkul-popout {
    right: 0;
    min-width: 220px;
    max-width: 280px;
    z-index: 260;
}
.dut-filter-popout-backdrop,
.dut-matkul-popout-backdrop {
    z-index: 259;
}
.dut-meta-kicker {
    margin: 0;
    font-size: .74rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.01em;
}
.dut-meta-sub {
    margin: 0;
    font-size: .66rem;
    color: var(--text-muted);
    line-height: 1.38;
}
.dut-meta-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .28rem .56rem;
    border-radius: 999px;
    border: 1px solid rgba(248,184,78,.16);
    background: rgba(248,184,78,.08);
    color: #f8b84e;
    font-size: .62rem;
    font-weight: 800;
    white-space: nowrap;
}
.dut-scroll {
    display: flex;
    gap: .52rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: .08rem;
    padding-bottom: .06rem;
}
.dut-scroll:hover {
    cursor: ew-resize;
}
.dut-scroll::-webkit-scrollbar { display: none; }
.dut-page {
    min-width: 100%;
    width: 100%;
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .52rem;
    min-height: 0;
}
.dut-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    gap: .56rem;
    padding: .58rem .62rem;
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 16px;
    min-width: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.014)),
        linear-gradient(135deg,
            color-mix(in srgb, var(--dut-accent, #2f8f83) 12%, transparent) 0%,
            color-mix(in srgb, var(--dut-accent, #2f8f83) 6%, transparent) 34%,
            color-mix(in srgb, var(--dut-accent, #2f8f83) 2%, transparent) 56%,
            transparent 82%);
    min-height: 82px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.dut-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 16% 0%, color-mix(in srgb, var(--dut-accent, #2f8f83) 8%, transparent) 0, transparent 54%),
        linear-gradient(135deg, rgba(255,255,255,.016), transparent 58%),
        linear-gradient(135deg, color-mix(in srgb, var(--dut-accent, #2f8f83) 0%, transparent) 12%, color-mix(in srgb, var(--dut-accent, #2f8f83) 7%, transparent) 42%, color-mix(in srgb, var(--dut-accent, #2f8f83) 3%, transparent) 60%, transparent 84%);
    opacity: .72;
    pointer-events: none;
    z-index: 0;
}
.dut-item::after {
    content: "";
    position: absolute;
    inset: -12% -8% auto 22%;
    height: 132px;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--dut-accent, #2f8f83) 7%, transparent) 0, transparent 68%);
    opacity: .5;
    filter: blur(6px);
    pointer-events: none;
    z-index: 0;
}
.dut-item.is-done {
    opacity: .82;
}
.dut-item--glow::before {
    background:
    radial-gradient(ellipse at 16% 0%, color-mix(in srgb, var(--dut-accent, #2f8f83) 8%, transparent) 0, transparent 54%),
        linear-gradient(135deg, rgba(255,255,255,.016), transparent 58%),
    linear-gradient(135deg, color-mix(in srgb, var(--dut-accent, #2f8f83) 0%, transparent) 12%, color-mix(in srgb, var(--dut-accent, #2f8f83) 7%, transparent) 42%, color-mix(in srgb, var(--dut-accent, #2f8f83) 3%, transparent) 60%, transparent 84%);
}
.dut-item--mesh::before {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--dut-accent, #f6c15b) 68%, transparent), transparent 76%) top left / 100% 2px no-repeat,
        radial-gradient(circle at 12% 16%, color-mix(in srgb, var(--dut-accent, #f6c15b) 14%, transparent) 0, transparent 42%),
        linear-gradient(145deg, rgba(255,255,255,.04) 0, rgba(255,255,255,0) 44%),
        repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 9px, transparent 9px 18px);
}
.dut-item--sheen::before {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--dut-accent, #f6c15b) 72%, transparent), transparent 74%) top left / 100% 2px no-repeat,
        linear-gradient(120deg, transparent 0 56%, color-mix(in srgb, var(--dut-accent, #f6c15b) 10%, transparent) 68%, transparent 82%),
        radial-gradient(circle at 100% 12%, rgba(255,255,255,.055) 0, transparent 26%);
}
.dut-item--band::before {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--dut-accent, #f6c15b) 70%, transparent), transparent 74%) top left / 100% 2px no-repeat,
        linear-gradient(180deg, color-mix(in srgb, var(--dut-accent, #f6c15b) 10%, transparent), transparent 42%),
        radial-gradient(circle at 85% 18%, rgba(255,255,255,.04) 0, transparent 24%);
}
.dut-item--mesh::after {
    inset: auto -18% -32% 38%;
    height: 96px;
}
.dut-item--sheen::after {
    inset: -24% 18% auto auto;
    width: 112px;
    height: 112px;
    background: radial-gradient(circle, rgba(255,255,255,.06) 0, transparent 62%);
    opacity: .55;
}
.dut-item--band::after {
    inset: auto -14% -26% auto;
    width: 132px;
    height: 84px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--dut-accent, #f6c15b) 11%, transparent), transparent 68%);
    opacity: .9;
}
.dut-item-deco {
    display: none;
    position: absolute;
    bottom: .4rem;
    right: .6rem;
    font-size: 3.6rem;
    color: var(--dut-accent, #2f8f83);
    opacity: .08;
    pointer-events: none;
    z-index: 0;
    line-height: 1;
}
.dut-item-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}
.dut-item-icon {
    width: 30px; height: 30px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.14);
}
.dut-item-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    position: relative;
    z-index: 1;
}
.dut-item-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .38rem;
    margin-bottom: .16rem;
}
.dut-item-title {
    font-size: .72rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.24;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dut-item-meta-row {
    display: flex;
    align-items: flex-start;
    gap: .22rem .38rem;
    margin-top: .2rem;
    flex-wrap: wrap;
}
.dut-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: .4rem;
}
.dut-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .4rem .84rem;
    min-height: 32px;
    border-radius: 12px;
    border: 1px solid rgba(248,184,78,.22);
    background: linear-gradient(180deg, rgba(248,184,78,.14), rgba(248,184,78,.08));
    color: #ffd98d;
    font-size: .6rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 8px 18px rgba(0,0,0,.14);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.dut-detail-btn:hover {
    border-color: rgba(248,184,78,.36);
    background: linear-gradient(180deg, rgba(248,184,78,.2), rgba(248,184,78,.11));
    color: #ffe7b5;
    transform: translateY(-1px) scale(1.01);
}
.dut-detail-btn i {
    font-size: .58rem;
}
.dut-item-date-badges-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    margin-top: .22rem;
    flex-wrap: wrap;
}
.dut-item-footer {
    display: flex;
    align-items: center;
    gap: .34rem;
    flex-wrap: wrap;
    flex-shrink: 0;
    justify-content: flex-end;
    margin-left: auto;
}
.dut-item-meta {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    font-size: .54rem;
    color: #98a7c2;
    line-height: 1.3;
}
.dut-item-chip {
    font-size: .48rem; font-weight: 800; padding: .14rem .34rem;
    border-radius: 99px; white-space: nowrap; flex-shrink: 0;
    text-transform: none; letter-spacing: 0;
}
.dut-item-course {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    font-size: .52rem;
    font-weight: 700;
    color: #c6d0e2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dut-chip--overdue { background: rgba(239,68,68,.12); color: #ef4444; }
.dut-chip--urgent  { background: rgba(239,68,68,.12); color: #ef4444; }
.dut-chip--soon    { background: rgba(245,158,11,.12); color: #f6c15b; }
.dut-chip--warning { background: rgba(245,158,11,.1); color: #f6c15b; }
.dut-chip--normal  { background: rgba(16,185,129,.1); color: #67d7a1; }
.dut-chip--done    { background: rgba(16,185,129,.12); color: #67d7a1; }
.dut-mini-chip {
    display: inline-flex;
    align-items: center;
    gap: .24rem;
    padding: .16rem .38rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.03);
    color: var(--text-muted);
    font-size: .5rem;
    font-weight: 700;
    line-height: 1;
}
.dut-mini-chip i {
    font-size: .48rem;
    opacity: .92;
}
.dut-mini-chip--type {
    color: #c6d0e2;
    background: rgba(255,255,255,.035);
}
.dut-mini-chip--prio-high {
    color: #ff8c84;
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.16);
}
.dut-mini-chip--prio-med {
    color: #f6c15b;
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.18);
}
.dut-mini-chip--prio-low {
    color: #67d7a1;
    background: rgba(16,185,129,.12);
    border-color: rgba(16,185,129,.16);
}
.dut-dots {
    display: flex;
    justify-content: center;
    gap: .3rem;
    padding-top: .36rem;
    flex-shrink: 0;
}
.dut-dots.is-hidden { display: none; }
.dut-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: var(--border);
    cursor: pointer;
    transition: all .2s;
}
.dut-dot.active {
    width: 14px;
    border-radius: 99px;
    background: var(--accent);
}
.dut-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center;
    padding: 1.6rem 0; color: var(--text-muted); gap: .5rem;
    font-size: .8rem; width: 100%; min-height: 100%;
    border: 1px dashed rgba(255,255,255,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.02);
}
.dut-empty i { font-size: 1.5rem; }

@media (max-width: 767.98px) {
    .dash-desktop-grid {
        gap: .62rem;
    }
    .dash-banner {
        min-height: 0;
        padding: .86rem .7rem .86rem .38rem;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        gap: .72rem;
    }
    .dash-banner-left {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: center;
        gap: .38rem;
    }
    .dash-greet-icon {
        width: 3.3rem;
        height: 3.3rem;
        border-radius: 17px;
        font-size: 1.14rem;
        align-self: center;
        justify-self: start;
        margin-top: 0;
        margin-left: -.5rem;
    }
    .dash-banner-copy {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "kicker pills"
            "title pills"
            "sub pills";
        column-gap: 1.6rem;
        row-gap: .14rem;
        min-width: 0;
        align-items: start;
    }
    .dash-banner-kicker {
        grid-area: kicker;
        align-self: center;
        margin-top: .06rem;
    }
    .dash-greet-title {
        grid-area: title;
        font-size: 1rem;
        line-height: 1.18;
    }
    .dash-greet-sub {
        grid-area: sub;
        font-size: .66rem;
    }
    .dash-banner-pills {
        grid-area: pills;
        display: inline-flex;
        flex-direction: column;
        align-items: flex-end;
        gap: .24rem;
        margin-top: 0;
        margin-right: -.55rem;
        padding-bottom: 0;
        overflow: visible;
        scrollbar-width: none;
    }
    .dash-banner-pills::-webkit-scrollbar { display: none; }
    .dash-banner-pill {
        flex-shrink: 0;
        min-width: 92px;
        justify-content: center;
    }
    .dash-banner-pill--nextclass {
        display: none;
    }
    .dash-banner-right {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: stretch;
        gap: .56rem;
    }
    .dash-banner-next {
        min-width: 0;
        max-width: none;
        padding: .56rem .66rem;
        border-radius: 16px;
        position: relative;
        overflow: visible;
    }
    .dash-banner-next::before,
    .dash-banner-next::after {
        display: none;
    }
    .dash-focus-cat {
        display: block;
        position: absolute;
        right: 3rem;
        bottom: -18px;
        width: 62px;
        height: auto;
        pointer-events: none;
        z-index: 2;
        filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
        image-rendering: pixelated;
    }
    .dash-ring-wrap {
        width: 64px;
        height: 64px;
    }
    .dash-ring-svg {
        width: 64px;
        height: 64px;
    }

    .dut-card {
        padding: .82rem .78rem .84rem;
        border-radius: 20px;
    }
    .dut-header {
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: .52rem;
        margin-bottom: .52rem;
    }
    .dut-title-group {
        flex: 1;
        min-width: 0;
    }
    .dut-header .btn {
        width: auto;
        margin-left: auto;
        justify-content: center;
        flex-shrink: 0;
        padding: .42rem .66rem;
        border-radius: 999px;
        border: 1px solid rgba(248,184,78,.2);
        background: rgba(248,184,78,.08);
        color: #ffd787;
        font-size: .66rem;
        font-weight: 800;
    }
    .dut-toolbar {
        gap: .54rem;
        margin-bottom: .42rem;
    }
    .dut-toolbar,
    .dut-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .dut-filter-wrap,
    .dut-matkul-wrap {
        width: 100%;
    }
    .dut-title-group {
        flex-wrap: wrap;
    }
    .dut-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .dut-header .btn {
        margin-left: auto;
    }
    .dut-meta-copy {
        width: 100%;
        flex: none;
    }
    .dut-meta-kicker {
        font-size: .7rem;
    }
    .dut-meta-sub {
        font-size: .64rem;
        line-height: 1.4;
    }
    .dut-controls {
        flex-direction: row;
        align-items: stretch;
        justify-content: stretch;
        flex-wrap: nowrap;
        gap: .48rem;
        width: 100%;
        margin-left: 0;
    }
    .dut-filter-wrap,
    .dut-matkul-wrap {
        flex: 1 1 0;
        width: auto;
    }
    .dut-filter-trigger.tk-filter-badge,
    .dut-matkul-trigger.tk-filter-badge {
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }
    .dut-toolbar .tk-filter-badge-label { max-width: none; }
    .dut-toolbar .tk-matkul-popout {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        min-width: 0;
        max-width: none;
        width: 100%;
        border-radius: 22px 22px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + .4rem);
        animation: tkBottomSheetIn .22s cubic-bezier(.22,1,.36,1);
    }
    .dut-toolbar .tk-matkul-popout-header {
        padding: .78rem .92rem .62rem;
    }
    .dut-toolbar .tk-matkul-popout-list {
        padding: .42rem .7rem .2rem;
        max-height: min(46vh, 360px);
    }
    .dut-toolbar .tk-matkul-popout-backdrop {
        background: rgba(3, 8, 18, .56);
        backdrop-filter: blur(3px);
    }
    @keyframes tkBottomSheetIn {
        from { opacity: 0; transform: translateY(18px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .dut-scroll {
        display: flex;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        max-height: none !important;
        min-height: 0;
        padding-top: 0;
        padding-bottom: .08rem;
        padding-right: 0;
        gap: .56rem;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        align-items: start;
    }
    .dut-scroll::-webkit-scrollbar { display: none; }
    .dut-page {
        grid-template-columns: 1fr;
        gap: .56rem;
        min-width: 100%;
        min-height: 0;
        align-self: start;
        align-content: start;
        height: auto;
    }
    .dut-item {
        min-height: 0;
        align-self: start;
        padding: .72rem .74rem;
        border-radius: 18px;
    }
    .dut-item-actions {
        margin-top: .36rem;
    }
    .dut-detail-btn {
        width: 100%;
        justify-content: center;
        padding: .46rem 1rem;
        font-size: .62rem;
    }
    .dut-item-icon {
        width: 28px;
        height: 28px;
        font-size: .68rem;
    }
    .dut-scroll:hover {
        cursor: auto;
    }
    .dut-dots {
        padding-top: .28rem;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .dut-page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dut-page .dut-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* ============================================
   Desktop Redesign — My Classes (Upgraded)
   ============================================ */
.dmc-card {
    padding: .82rem .88rem .86rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 97%, #101827 3%), color-mix(in srgb, var(--surface) 94%, #0b1220 6%));
    border: 1px solid color-mix(in srgb, var(--border) 82%, rgba(255,255,255,.05) 18%);
    box-shadow: 0 18px 34px rgba(2, 6, 23, .18);
    overflow: hidden;
}
.dmc-header {
    margin-bottom: .68rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.dmc-title {
    font-size: .94rem; font-weight: 800; color: var(--text);
    display: flex; align-items: center; gap: 6px;
}
.dmc-title i { color: #8ab4ff; }
.dmc-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .18rem .52rem;
    border-radius: 999px;
    font-size: .57rem;
    font-weight: 700;
    color: #8ab4ff;
    background: rgba(138,180,255,.08);
    border: 1px solid rgba(138,180,255,.14);
}
.dmc-pager-wrap { overflow: hidden; }
.dmc-pager {
    display: flex; scroll-snap-type: x mandatory;
    overflow-x: auto; scrollbar-width: none; gap: .75rem;
    padding-bottom: .1rem;
}
.dmc-pager:hover {
    cursor: ew-resize;
}
.dmc-pager::-webkit-scrollbar { display: none; }
.dmc-page {
    scroll-snap-align: start; flex: 0 0 100%; min-width: 100%;
    display: grid; grid-template-columns: 1fr 1fr; gap: .74rem;
}
.dmc-course-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.014)),
        linear-gradient(135deg,
            color-mix(in srgb, var(--dmc-accent, #4e78a8) 18%, transparent) 0%,
            color-mix(in srgb, var(--dmc-accent-soft, #78a2d3) 9%, transparent) 36%,
            transparent 76%);
    border-radius: 24px;
    padding: .92rem;
    display: flex;
    flex-direction: column;
    gap: .72rem;
    border: 1px solid color-mix(in srgb, var(--dmc-accent, #4e78a8) 18%, rgba(255,255,255,.05));
    box-shadow: 0 18px 32px rgba(2, 6, 23, .18);
}
.dmc-course-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--dmc-accent-soft, #78a2d3) 16%, transparent) 0, transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,.02), transparent 46%);
    opacity: .9;
    pointer-events: none;
    z-index: 0;
}
.dmc-course-card:hover {
    box-shadow: 0 18px 32px rgba(2, 6, 23, .18);
    transform: none;
    border-color: color-mix(in srgb, var(--dmc-accent, #4e78a8) 18%, rgba(255,255,255,.05));
}
.dmc-course-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .72rem;
    position: relative;
    z-index: 1;
}
.dmc-course-head {
    display: flex;
    align-items: flex-start;
    gap: .78rem;
    min-width: 0;
    flex: 1;
}
.dmc-course-icon {
    width: 52px; height: 52px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: .92rem; font-weight: 800; flex-shrink: 0;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 18px rgba(15, 23, 42, .18);
}
.dmc-course-icon i {
    font-size: 1rem;
}
.dmc-course-info { flex: 1; min-width: 0; }
.dmc-course-eyebrow {
    font-size: .56rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--dmc-accent-soft, #78a2d3) 58%, #d6dceb);
    margin: .08rem 0 .22rem;
}
.dmc-course-nama {
    font-size: 1rem; font-weight: 800; color: #f5f7fb; margin: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dmc-course-kode {
    font-size: .67rem;
    color: #b3bfd3;
    margin: .18rem 0 0;
}
.dmc-course-kode span {
    color: #dce4f2;
}
.dmc-enrolled-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: .54rem .44rem;
    border-radius: 18px;
    background: rgba(250,250,252,.94);
    color: #111827;
    box-shadow: 0 10px 20px rgba(15, 23, 42, .16);
    position: relative;
    z-index: 1;
}
.dmc-enrolled-count {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.03em;
}
.dmc-enrolled-label {
    margin-top: .2rem;
    font-size: .58rem;
    font-weight: 700;
    color: #667085;
}
.dmc-stats-board {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: .26rem;
    column-gap: .24rem;
    padding: .72rem .52rem .62rem;
    background: rgba(7, 12, 20, .34);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.dmc-stats-head,
.dmc-stats-num {
    position: relative;
    text-align: center;
    min-width: 0;
}
.dmc-stats-head {
    font-size: .54rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #91a0b8;
}
.dmc-stats-head:not(:nth-child(4))::after,
.dmc-stats-num:not(:nth-child(8))::after {
    content: "";
    position: absolute;
    right: -.12rem;
    top: 50%;
    width: 1px;
    height: 54%;
    background: rgba(255,255,255,.06);
    transform: translateY(-50%);
}
.dmc-stats-num {
    font-size: 1rem;
    font-weight: 800;
    color: #f7f9fd;
    line-height: 1;
}
.dmc-course-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .72rem;
    margin-top: auto;
}
.dmc-activity-block {
    flex: 1;
    min-width: 0;
}
.dmc-activity-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    margin-bottom: .34rem;
}
.dmc-activity-label,
.dmc-activity-state {
    font-size: .58rem;
    font-weight: 700;
}
.dmc-activity-label {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.dmc-activity-state {
    color: color-mix(in srgb, var(--dmc-accent-soft, #78a2d3) 74%, #f7f9fd);
}
.dmc-activity-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.09);
    overflow: hidden;
}
.dmc-activity-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--dmc-accent, #4e78a8) 88%, #ffffff 12%), color-mix(in srgb, var(--dmc-accent-soft, #78a2d3) 92%, #ffffff 8%));
    box-shadow: 0 0 14px color-mix(in srgb, var(--dmc-accent-soft, #78a2d3) 26%, transparent);
}
.dmc-detail-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    align-self: flex-start;
    font-size: .64rem; font-weight: 800; color: #f7fafc;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    padding: .46rem .82rem; text-decoration: none;
    background: rgba(255,255,255,.04);
}
.dmc-detail-link:hover {
    background: color-mix(in srgb, var(--dmc-accent, #4e78a8) 18%, rgba(255,255,255,.06));
    color: #ffffff;
    border-color: color-mix(in srgb, var(--dmc-accent-soft, #78a2d3) 26%, rgba(255,255,255,.1));
}
.dmc-detail-link i { font-size: .65rem; }
.dmc-dots {
    display: flex; justify-content: center; gap: .3rem; padding-top: .36rem; flex-shrink: 0;
}
.dmc-dot {
    width: 5px; height: 5px; border-radius: 50%; background: var(--border);
    cursor: pointer; transition: all .2s;
}
.dmc-dot.active { width: 14px; border-radius: 99px; background: var(--accent); }
.dmc-empty {
    grid-column: 1 / -1; text-align: center; padding: 1.5rem;
    color: var(--text-muted); font-size: .8rem;
}

/* ============================================
   Desktop Redesign — Today Tasks (Upgraded)
   ============================================ */
.dta-card {
    padding: .84rem .9rem .86rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 97%, #0d1722 3%), color-mix(in srgb, var(--surface) 94%, #081118 6%));
    border: 1px solid color-mix(in srgb, var(--border) 82%, rgba(255,255,255,.05) 18%);
    box-shadow: 0 18px 34px rgba(2, 6, 23, .18);
}
.dta-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: .52rem; gap: .75rem;
}
.dta-title {
    font-size: .94rem; font-weight: 800; color: var(--text);
    display: flex; align-items: center; gap: 6px;
}
.dta-title i { color: #67d7a1; }
.dta-count-badge {
    font-size: .72rem; font-weight: 500; color: #8d98ad;
    background: transparent; padding: 0; border-radius: 0;
    border: none;
}
.dta-list {
    display: flex; flex-direction: column; gap: 0;
    max-height: 312px; overflow-y: auto; overflow-x: hidden;
    scrollbar-width: thin; padding-right: 2px;
    padding-bottom: .08rem;
}
.dta-divider {
    height: 1px; background: rgba(255,255,255,.05); margin: .12rem 0;
}
.dta-row {
    display: grid; align-items: center; gap: .7rem;
    grid-template-columns: 48px minmax(0, 1.2fr) minmax(96px, .85fr) minmax(74px, .7fr) auto;
    padding: .58rem .08rem;
    border-radius: 14px;
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.dta-row:hover {
    background: rgba(255,255,255,.02);
    transform: translateX(1px);
}
.dta-row--done { opacity: .5; }
.dta-row--done .dta-row-title { text-decoration: line-through; }
.dta-row-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: .68rem; font-weight: 800; flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.05);
}
.dta-row-body { flex: 1; min-width: 0; }
.dta-row-title {
    font-size: .78rem; font-weight: 700; color: var(--text); margin: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dta-row-sub {
    font-size: .64rem; color: #a3afc2; margin: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dta-row-time {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    font-size: .66rem;
    color: #8d98ad;
}
.dta-row-status {
    flex-shrink: 0; display: flex; align-items: center;
}
.dta-status-btn {
    background: transparent; border: 1px solid rgba(255,255,255,.06); cursor: pointer;
    width: 30px; height: 30px; padding: 0; border-radius: 10px; line-height: 1;
    transition: all var(--transition-fast);
}
.dta-status-btn:hover { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.dta-empty {
    text-align: center; padding: .6rem 1rem 0; color: var(--text-muted);
    font-size: .8rem; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: .28rem; min-height: 100%;
}
.dta-empty i { font-size: 1.15rem; }
.dta-empty p { margin: 0; font-size: .72rem; }

@media (max-width: 1024px) {
    .dut-scroll {
        display: flex;
        overflow-x: auto;
        padding-bottom: .2rem;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }
    .dut-scroll::-webkit-scrollbar { height: 4px; }
    .dut-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
    .dut-item {
        min-width: 280px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .dmc-page {
        grid-template-columns: 1fr;
    }
    .dmc-course-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .dmc-detail-link {
        align-self: stretch;
    }
    .dmc-pager:hover {
        cursor: auto;
    }
    .dta-row {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }
    .dta-row-sub,
    .dta-row-time {
        grid-column: 2;
    }
}

@media (max-width: 767.98px) {
    .dmc-card {
        padding: .8rem .78rem .84rem;
        border-radius: 20px;
    }
    .dmc-pager-wrap {
        overflow: hidden;
    }
    .dmc-pager {
        gap: .62rem;
        align-items: stretch;
    }
    .dmc-page {
        min-width: 100%;
        flex: 0 0 100%;
        align-content: start;
    }
    .dmc-course-card {
        padding: .78rem;
        border-radius: 22px;
        gap: .64rem;
        min-height: 0;
    }
    .dmc-course-top {
        gap: .6rem;
    }
    .dmc-course-head {
        gap: .64rem;
    }
    .dmc-course-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: .84rem;
    }
    .dmc-enrolled-badge {
        min-width: 62px;
        padding: .48rem .38rem;
        border-radius: 16px;
    }
    .dmc-enrolled-count {
        font-size: 1rem;
    }
    .dmc-course-nama {
        font-size: .9rem;
    }
    .dmc-stats-board {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        row-gap: .22rem;
        column-gap: .12rem;
        padding: .62rem .3rem .54rem;
        border-radius: 18px;
    }
    .dmc-stats-head,
    .dmc-stats-num {
        text-align: center;
    }
    .dmc-stats-head {
        font-size: .46rem;
        line-height: 1.2;
    }
    .dmc-stats-num {
        font-size: .88rem;
    }
    .dmc-stats-head:not(:nth-child(4))::after,
    .dmc-stats-num:not(:nth-child(8))::after {
        display: block;
        right: -.06rem;
        height: 50%;
    }
    .dmc-course-footer {
        gap: .56rem;
    }
    .dmc-activity-meta {
        margin-bottom: .28rem;
    }
    .dmc-detail-link {
        min-height: 40px;
    }
}