/* =====================================================
   Responsive Design
===================================================== */

@media (max-width: 768px) {
    .header-container {
        height: auto;
        flex-wrap: wrap;
        padding: var(--space-3);
        gap: var(--space-3);
    }

    .header-right {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .header-right .btn span {
        display: none;
    }

    .logo-text {
        display: none;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .timeline-header,
    .staff-row {
        grid-template-columns: 1fr;
    }

    .timeline-header>div:first-child {
        display: none;
    }

    .staff-profile {
        border-right: none;
        border-bottom: 1px solid var(--slate-100);
    }

    .modal {
        width: 95%;
        max-height: 85vh;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--slate-100);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* =====================================================
   Toast Notifications
===================================================== */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--info);
    min-width: 320px;
    max-width: 420px;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-info {
    border-left-color: var(--info);
}

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

.toast-success .toast-icon {
    background: var(--success-bg);
    color: var(--success);
}

.toast-error .toast-icon {
    background: var(--danger-bg);
    color: var(--danger);
}

.toast-warning .toast-icon {
    background: var(--warning-bg);
    color: var(--warning);
}

.toast-info .toast-icon {
    background: var(--info-bg);
    color: var(--info);
}

.toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-700);
    line-height: 1.4;
}

.toast-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--slate-100);
    color: var(--slate-600);
}

.toast-close svg {
    width: 16px;
    height: 16px;
}

/* =====================================================
   Confirm Dialog
===================================================== */

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-overlay.show {
    opacity: 1;
}

.confirm-modal {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.confirm-overlay.show .confirm-modal {
    transform: scale(1);
}

.confirm-icon {
    width: 60px;
    height: 60px;
    background: var(--warning-bg);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    color: var(--warning);
}

.confirm-icon svg {
    width: 28px;
    height: 28px;
}

.confirm-message {
    font-size: 1rem;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: var(--space-6);
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.confirm-buttons .btn {
    min-width: 120px;
    padding: var(--space-3) var(--space-5);
}

/* Toast responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* View Toggle */
.view-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--slate-100);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    gap: 2px;
    margin-left: var(--space-4);
}

.toggle-btn {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid transparent;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate-500);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: normal;
    text-transform: none;
    margin: 0;
    box-shadow: none;
    white-space: nowrap;
}

.toggle-btn.active {
    background: white;
    color: var(--primary);
    border-color: rgba(79, 70, 229, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-weight: 700;
}

.toggle-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.03);
    color: var(--slate-700);
}

.toggle-btn svg {
    pointer-events: none;
    width: 14px;
    height: 14px;
    margin-right: 2px;
    display: inline-block;
    vertical-align: text-top;
}

/* =====================================================
   New Features & Layouts
===================================================== */

/* Modal Sizes */
.modal-xl {
    max-width: 900px !important;
}

/* Request Modal Grid */
.request-modal-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-4);
    align-items: start;
}

@media (max-width: 768px) {
    .request-modal-grid {
        grid-template-columns: 1fr;
    }
}

.request-schedule-section {
    background: var(--slate-50);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
}

.request-schedule-section h4 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--slate-700);
}

/* Mini Timeline */
.mini-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mini-task-item {
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    background: white;
    border-left: 3px solid var(--slate-400);
    font-size: 0.7rem;
    box-shadow: var(--shadow-sm);
}

/* Multi Select */
.form-select-multiple {
    height: auto !important;
    padding: var(--space-2) !important;
}

.form-select-multiple option {
    padding: 4px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.form-select-multiple option:checked {
    background-color: var(--primary-bg);
    color: var(--primary);
    font-weight: bold;
}

/* =====================================================
   New Grid Timeline View (Vertical)
===================================================== */

.timeline-view-wrapper {
    display: flex;
    height: 70vh;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.grid-sidebar-container {
    width: 60px;
    flex-shrink: 0;
    overflow: hidden;
    border-right: 1px solid var(--slate-200);
    background: var(--slate-50);
    margin-top: 61px;
    /* Offset for header height approx */
}

/* Fix: Sidebar needs to scroll with main area, or be sticky? 
   Better approach: One scroll container. 
   Sidebar fixed left? Sticky left? */

/* REVISED GRID LAYOUT */
.daily-grid-container {
    display: flex;
    flex-direction: column;
    height: 70vh;
    overflow: hidden;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
}

.daily-grid-header {
    display: flex;
    overflow-x: auto;
    /* Sync with body */
    border-bottom: 1px solid var(--slate-200);
    background: var(--slate-50);
    scrollbar-width: none;
    /* Hide scrollbar in header, sync via JS */
}

.daily-grid-header::-webkit-scrollbar {
    display: none;
}

.daily-grid-header-spacer {
    width: 60px;
    flex-shrink: 0;
    border-right: 1px solid var(--slate-200);
    background: var(--slate-50);
    position: sticky;
    left: 0;
    z-index: 20;
}

.daily-grid-body {
    flex: 1;
    overflow: auto;
    position: relative;
    display: flex;
}

.time-column {
    width: 60px;
    flex-shrink: 0;
    background: var(--slate-50);
    border-right: 1px solid var(--slate-200);
    position: sticky;
    left: 0;
    z-index: 10;
}

.grid-scroll-content {
    display: flex;
    min-width: min-content;
}

.staff-column {
    width: 200px;
    flex-shrink: 0;
    border-right: 1px solid var(--slate-100);
    position: relative;
    background-image: linear-gradient(to bottom, transparent 79px, var(--slate-100) 80px);
    background-size: 100% 80px;
    /* Must match JS PX_PER_HOUR = 80 */
}

/* Header Cells */
.staff-header-cell {
    width: 200px;
    flex-shrink: 0;
    padding: var(--space-3);
    border-right: 1px solid var(--slate-100);
    text-align: center;
    background: white;
}

/* Time labels */
.time-label {
    height: 60px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--slate-500);
    border-bottom: 1px solid transparent;
    /* Just spacing */
}

/* Tasks */
.grid-task {
    position: absolute;
    left: 4px;
    right: 4px;
    background: white;
    border-radius: 4px;
    font-size: 0.7rem;
    padding: 2px 4px;
    border: 1px solid #ccc;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.grid-task:hover {
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.grid-task.status-failed {
    background-color: #ffe4e6;
    border-color: #f43f5e;
    color: #9f1239;
}

/* Category Colors */
.grid-task.cat-Jobdesk {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #7c3aed;
}

.grid-task.cat-Request {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #f43f5e;
}

.grid-task.cat-Tugas-Tambahan {
    background: #fffbeb;
    border-color: #fde68a;
    color: #d97706;
}

.grid-task.cat-Inisiatif {
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #0d9488;
}

.grid-task.status-done {
    opacity: 0.6;
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #059669;
}


/* =====================================================
   Refactored Components (Previously Inline)
===================================================== */
.header-title {
    padding: 1rem;
    font-weight: 600;
    color: var(--slate-700);
}

.header-legend {
    padding: 1rem;
    font-weight: 600;
    color: var(--slate-700);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--slate-100);
}

.legend-items {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.timeline-body {
    max-height: 70vh;
    overflow-y: auto;
}

.empty-state-timeline {
    padding: 3rem;
    text-align: center;
    color: var(--slate-400);
}

.empty-state-timeline svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    display: inline-block;
}

/* Staff Profile Components */
.staff-profile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.staff-avatar-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
}

.staff-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--slate-100);
    object-fit: cover;
}

.me-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--primary);
    color: white;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.staff-name {
    font-weight: 700;
    color: var(--slate-800);
    font-size: 0.875rem;
}

.staff-role {
    font-size: 10px;
    color: var(--slate-500);
    text-transform: uppercase;
    background: var(--slate-100);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}

.staff-performance {
    background: var(--slate-50);
    padding: 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid var(--slate-200);
}

.perf-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.perf-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--slate-500);
}

.perf-value {
    font-size: 12px;
    font-weight: 700;
}

.perf-bar-bg {
    width: 100%;
    background: var(--slate-200);
    height: 6px;
    border-radius: 99px;
    overflow: hidden;
}

.perf-bar-fill {
    height: 100%;
    transition: all 0.5s;
}

.perf-stats {
    font-size: 9px;
    color: var(--slate-400);
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}


/* =====================================================
   TRUE MOBILE OPTIMIZATION WITH BOTTOM NAV
===================================================== */

/* Default: Hide Mobile Elements on Desktop */
.mobile-bottom-nav,
.mobile-drawer {
    display: none;
}

/* Fix for notification dropdown on mobile */
@media (max-width: 768px) {
    .dropdown {
        position: fixed;
        /* Fix to viewport */
        top: 60px;
        /* Place below header */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90%;
        max-width: 350px;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--slate-200);
    }

    /* Ensure the wrapper doesn't trap it if overflow is hidden (though it shouldn't be usually) */
    .notification-wrapper {
        position: static;
    }
}

@media (max-width: 768px) {

    /* ================= Navbar & Header ================= */
    .header {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        height: 60px;
        z-index: 100;
        background: white;
        border-bottom: 1px solid var(--slate-100);
        padding: 0 var(--space-3);
    }

    .header-container {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
    }

    /* Hide Desktop Elements */
    .header-left .logo span,
    .header-left h1,
    .app-view-toggle {
        display: none !important;
    }

    /* Hide text labels on buttons */
    .btn span:not(.badge) {
        display: none;
    }

    /* Except for bottom nav buttons */
    .mobile-bottom-nav .btn span,
    .nav-action-btn span,
    .nav-btn-mobile span {
        display: inline-block !important;
    }

    /* Header Right: Only Show Bell */
    .header-right {
        width: auto;
        gap: var(--space-2);
    }

    /* Hide Desktop Buttons EXCEPT Logout, Notification, and Profile */
    .header-right>button:not(#notif-btn):not(#btn-logout):not(#btn-profile) {
        display: none !important;
    }

    /* Style Logout Button for Mobile */
    #btn-logout {
        display: flex !important;
        width: 36px;
        height: 36px;
        background: #fee2e2;
        /* Red background for visibility */
        color: #ef4444;
        border: 1px solid #fecaca;
        border-radius: var(--radius-full);
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    #btn-logout span {
        display: none;
        /* Hide text, keep icon */
    }

    #btn-logout svg {
        width: 16px;
        height: 16px;
        margin: 0;
    }

    .divider-vertical {
        display: none !important;
    }

    /* Notification Bell */
    #notif-btn {
        width: 36px;
        height: 36px;
        background: var(--slate-50);
        border: 1px solid var(--slate-200);
    }

    #btn-profile {
        width: 36px;
        height: 36px;
        background: var(--slate-50);
        border: 1px solid var(--slate-200);
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Notification Dropdown Fixed Center */
    /* Notification Dropdown Fixed Center */
    .dropdown {
        position: fixed;
        top: 70px;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90vw;
        max-width: 350px;
        border: 1px solid var(--slate-200);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        border-radius: var(--radius-xl);
        z-index: 101;
    }

    .notification-wrapper {
        position: static;
        /* Release parent constraint */
    }

    /* ================= Main Content & Spacing ================= */
    .main-content {
        margin-top: 60px;
        /* Header height */
        padding-top: var(--space-2);
        padding-bottom: var(--space-2);
        /* Bottnav Height */
        padding-left: var(--space-2);
        padding-right: var(--space-2);
        height: calc(100vh - 60px - 72px);
        /* 60px header + 72px bottom nav */
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    /* Fix Announcement Banner Width in Main Content */
    .announcement-banner {
        margin-left: calc(var(--space-2) * -1);
        margin-right: calc(var(--space-2) * -1);
        width: calc(100% + var(--space-2) * 2);
        margin-top: calc(var(--space-2) * -1);
        border-radius: 0 0 0 0 !important;
        margin-bottom: var(--space-2);
    }

    /* ================= Page Controls (Toggle & Date) ================= */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-2);
        background: white;
        padding: var(--space-2);
        border-radius: var(--radius-xl);
        border: 1px solid var(--slate-100);
        margin-bottom: var(--space-2);
        flex-shrink: 0;
    }

    .page-header-left {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: var(--space-3);
    }

    .page-header-left h2 {
        display: none;
        /* Hide 'Timeline Kerja' title to save space */
    }

    .view-toggle {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
        background: var(--slate-50) !important;
    }

    .view-toggle button {
        flex: 1;
        justify-content: center;
    }

    /* Date Info */
    .page-header-left p {
        width: 100%;
        text-align: center;
        padding-bottom: var(--space-2);
        border-bottom: 1px dashed var(--slate-200);
        margin: 0;
    }

    .date-picker-wrapper {
        width: 100%;
        height: 40px;
    }

    .date-picker-wrapper input {
        width: 100%;
        text-align: center;
    }

    .page-header-right {
        display: flex !important;
        width: 100%;
        gap: var(--space-2);
        overflow-x: auto;
        padding-bottom: var(--space-1);
    }

    .page-header-right button,
    .page-header-right select {
        flex-shrink: 0;
        font-size: 0.75rem;
        padding: 6px 10px;
    }


    /* ================= Timeline & Cards ================= */
    /* Container for staff rows */
    .staff-row {
        flex-direction: column !important;
        /* Force vertical stack */
        background: white !important;
        border: 1px solid var(--slate-200) !important;
        border-radius: var(--radius-xl);
        margin-bottom: var(--space-4);
        overflow: hidden;
        box-shadow: var(--shadow-md);
        height: auto !important;
        /* Reset min-height */
        display: flex !important;
    }

    /* 1. Staff Profile (Top Part) */
    .staff-profile {
        width: 100%;
        padding: var(--space-3);
        border-right: none;
        border-bottom: 1px solid var(--slate-100);
        background: linear-gradient(to bottom, #fff, var(--slate-50));
        z-index: 2;
    }

    .staff-profile-header {
        margin-bottom: 0;
        /* Compact */
    }

    /* Show Performance but Compact */
    .staff-profile>div:nth-child(2) {
        display: flex !important;
        align-items: center;
        gap: 10px;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dashed var(--slate-200);
    }

    .staff-performance {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        flex: 1;
    }

    .perf-header,
    .perf-stats {
        display: none !important;
    }

    .perf-bar-bg {
        height: 8px;
        background: var(--slate-200);
    }

    /* 2. Tasks Column (Bottom Part - Scrollable) */
    .tasks-column {
        width: 100%;
        display: flex;
        flex-direction: row;
        /* Horizontal scroll */
        overflow-x: auto;
        padding: var(--space-3);
        gap: var(--space-3);
        background: var(--slate-50);
        min-height: 120px;
        align-items: flex-start;
        /* Align items to top */
        /* Smooth Scroll */
        -webkit-overflow-scrolling: touch;
        scroll-padding: var(--space-3);
    }

    .task-card {
        flex: 0 0 auto;
        /* Don't shrink */
        width: 260px;
        /* Fixed width for cards */
        background: white;
        border: 1px solid var(--slate-200);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    /* Empty State in tasks column */
    .tasks-column:empty::after {
        content: 'Tidak ada jadwal';
        display: block;
        width: 100%;
        text-align: center;
        padding: var(--space-4);
        color: var(--slate-400);
        font-style: italic;
        font-size: 0.8rem;
    }


    /* ================= Bottom Navigation (Burger + Action + Request) ================= */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        padding: 10px 16px;
        background: white;
        border-top: 1px solid var(--slate-200);
        z-index: 200;
        justify-content: space-between;
        align-items: center;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
        gap: 12px;
    }

    /* General Mobile Nav Button Style */
    .nav-btn-mobile {
        display: flex !important;
        /* Force show */
        align-items: center;
        justify-content: center;
        height: 42px;
        border-radius: var(--radius-lg);
        background: var(--slate-100);
        color: var(--slate-600);
        border: none;
        flex-shrink: 0;
        font-weight: 600;
        font-size: 0.85rem;
        padding: 0 12px;
        /* Add padding for text */
        gap: 6px;
    }

    .nav-btn-mobile.icon-only {
        width: 42px;
        padding: 0;
    }

    .nav-btn-mobile svg {
        width: 20px;
        height: 20px;
    }

    .nav-btn-mobile span {
        display: inline-block !important;
        /* Force show text */
    }

    /* Dynamic Action Button */
    .nav-action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 42px;
        padding: 0 20px;
        border-radius: var(--radius-lg);
        font-weight: 600;
        font-size: 0.9rem;
        flex: 1;
        /* Take remaining space */
        white-space: nowrap;
    }

    .nav-action-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Drawer Section Title */
    .drawer-section-title {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--slate-400);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin: 16px 0 8px 0;
    }

    /* Hide specific old elements, but keep nav-btn-mobile */
    .nav-item,
    .nav-fab-wrapper,
    .nav-fab {
        display: none !important;
    }

    /* Unhide History Button on Mobile */
    #btn-announcement-history {
        display: flex !important;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        background: #eef2ff;
        color: #6366f1;
        border: none;
        border-radius: var(--radius-full);
        margin-right: 8px;
    }

    #btn-announcement-history svg {
        width: 18px;
        height: 18px;
    }

    .header-right>button:not(#notif-btn):not(#btn-logout):not(#btn-profile):not(#btn-announcement-history) {
        display: none !important;
    }

    /* ================= Mobile Drawer ================= */
    .mobile-drawer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 2000;
        /* Above everything */
        display: none;
        /* Hidden by default */
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-drawer.active {
        display: block;
        opacity: 1;
    }

    .drawer-content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        border-radius: 20px 20px 0 0;
        padding: 20px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        max-height: 85vh;
        overflow-y: auto;
    }

    .mobile-drawer.active .drawer-content {
        transform: translateY(0);
    }

    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
    }

    .drawer-header h3 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--slate-800);
    }

    .drawer-close {
        background: var(--slate-100);
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--slate-600);
    }

    .user-card-drawer {
        display: flex;
        align-items: center;
        gap: 12px;
        background: var(--slate-50);
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .drawer-link {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 12px;
        border: none;
        background: transparent;
        color: var(--slate-700);
        font-weight: 500;
        text-align: left;
        border-radius: 10px;
    }

    .drawer-link:active {
        background: var(--slate-100);
    }

    .drawer-link i {
        width: 20px;
        height: 20px;
    }

    .drawer-link.text-danger {
        color: var(--danger);
    }

    .drawer-divider {
        height: 1px;
        background: var(--slate-200);
        margin: 8px 0;
    }

    /* Legend Delete */
    .timeline-header {
        display: none;
    }

    /* Ensure timeline-container uses all available space */
    .timeline-container {
        flex: 1;
        min-height: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
}

