/**
 * 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-y: auto;
    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: 16px 0 20px 0;
}

.sidebar-logout {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px !important;
    margin-top: 8px;
    padding-bottom: 80px !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: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-xl);
    padding: 1.75rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 1.5rem;
}
.dash-banner::before {
    content: '';
    position: absolute;
    top: -50px; right: -30px;
    width: 240px; height: 240px;
    background: rgba(252,163,17,.1);
    border-radius: 50%;
    pointer-events: none;
}
.dash-banner::after {
    content: '';
    position: absolute;
    bottom: -70px; right: 90px;
    width: 180px; height: 180px;
    background: rgba(252,163,17,.06);
    border-radius: 50%;
    pointer-events: none;
}
.dash-banner-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    align-self: center;
}
.dash-greet-icon {
    font-size: 2.25rem;
    line-height: 1;
    flex-shrink: 0;
    color: var(--accent, #FCA311);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(252, 163, 17, 0.15);
    border-radius: 12px;
    animation: dash-icon-pulse 3s ease-in-out infinite;
    position: relative;
    z-index: 10;
}
.dash-greet-icon i {
    font-size: 2.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-greet-title {
    color: white;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: .2rem;
    line-height: 1.25;
}
.dash-greet-sub {
    color: rgba(255,255,255,.72);
    font-size: .8rem;
    margin: 0;
}
/* Progress Ring */
.dash-banner-right {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}
.dash-ring-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    cursor: default;
}
.dash-ring-svg {
    transform: rotate(-90deg);
    display: block;
}
.dash-ring-track {
    fill: none;
    stroke: rgba(255,255,255,.15);
    stroke-width: 7;
}
.dash-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 7;
    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: 1.2rem; font-weight: 800; line-height: 1; }
.dash-ring-sym  { font-size: .6rem; opacity: .85; line-height: 1; }
.dash-ring-txt  { font-size: .58rem; opacity: .65; letter-spacing: .03em; 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);
}

/* ============================================
   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 {
        grid-template-columns: 1fr;
        padding: 1.35rem 1.25rem;
    }
    .dash-banner-right {
        position: absolute;
        right: 1.25rem;
        top: 1.25rem;
    }
    .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;
}