/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Color Variables & Design System - Light Corporate Theme */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --color-emerald: #16a34a;
    --color-emerald-glow: rgba(22, 163, 74, 0.08);
    --color-amber: #d97706;
    --color-amber-glow: rgba(217, 119, 6, 0.08);
    --color-sky: #0284c7;
    --color-sky-glow: rgba(2, 132, 199, 0.08);
    --color-red: #dc2626;
    --color-red-glow: rgba(220, 38, 38, 0.08);
    
    --glass-bg: #ffffff;
    --glass-border: #cbd5e1;
    --glass-highlight: #f8fafc;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-full: 9999px;
    
    --transition-fast: 0s;
    --transition-normal: 0s;
    --transition-slow: 0s;
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .grid-cols-4, .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr; }
}

/* Card Styles */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Typography */
.text-gradient {
    color: var(--text-primary);
}
.text-secondary-color { color: var(--text-secondary); }
.text-muted-color { color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
}

.btn-primary {
    background: #0284c7;
    color: white;
}
.btn-primary:hover {
    background: #0369a1;
}

.btn-emerald {
    background: #16a34a;
    color: white;
}
.btn-emerald:hover {
    background: #15803d;
}

.btn-danger {
    background: #dc2626;
    color: white;
}
.btn-danger:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
    background: #e2e8f0;
}

/* Inputs and Forms */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    width: 100%;
}
.form-control:focus {
    border-color: var(--color-sky);
    box-shadow: 0 0 0 3px var(--color-sky-glow);
}

/* Select element fix */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Badges / Status Labels */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-info { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* Header & Navigation */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
    height: 72px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.logo-img {
    height: 40px;
    width: 40px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* =============================================
   Hamburger Button (Desktop)
   ============================================= */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 4px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: background 0.2s ease;
}
.hamburger-btn:hover {
    background: var(--bg-tertiary);
}
.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.25s ease;
}

/* =============================================
   Dashboard Sidebar Layout
   ============================================= */
.dashboard-layout {
    display: flex;
    flex: 1;
    align-items: flex-start;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

/* Desktop: Sidebar Collapsed State */
.sidebar.sidebar-collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    border-right: none;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Display utility helpers for responsive layout */
.desktop-only {
    display: flex !important;
}
.mobile-only {
    display: none !important;
}
.desktop-inline {
    display: inline !important;
}
.mobile-inline {
    display: none !important;
}

/* Mobile Bottom Navigation - Hidden on Desktop */
.mobile-bottom-nav {
    display: none;
}
.mobile-sheet-overlay {
    display: none;
}
.mobile-sheet {
    display: none;
}

@media (max-width: 768px) {
    /* ─────────────────────────────────────────── */
    /* Hide desktop-only & show mobile-only        */
    /* ─────────────────────────────────────────── */
    .desktop-sidebar {
        display: none !important;
    }
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: flex !important;
    }
    .desktop-inline {
        display: none !important;
    }
    .mobile-inline {
        display: inline !important;
    }
    .hamburger-btn {
        display: none !important;
    }

    /* ─────────────────────────────────────────── */
    /* Header adjustments                          */
    /* ─────────────────────────────────────────── */
    header {
        height: 56px !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }
    header .container {
        padding: 0 0.75rem !important;
    }
    .logo-text {
        display: none !important;
    }
    .logo-img {
        height: 34px !important;
        width: 34px !important;
    }
    .user-menu {
        font-size: 0.75rem !important;
        gap: 0.4rem !important;
    }
    .user-menu span.badge {
        margin-right: 0.25rem !important;
        font-size: 0.65rem !important;
        padding: 0.15rem 0.35rem !important;
    }

    /* ─────────────────────────────────────────── */
    /* Layout: No sidebar, content fills screen    */
    /* ─────────────────────────────────────────── */
    .dashboard-layout {
        flex-direction: column !important;
        padding: 0 !important;
        margin-top: 56px;
        margin-bottom: 64px;
    }

    .main-content {
        padding: 1rem !important;
        width: 100% !important;
    }

    /* ─────────────────────────────────────────── */
    /* Mobile Bottom Navigation Bar                */
    /* ─────────────────────────────────────────── */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--bg-secondary);
        border-top: 1px solid var(--glass-border);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
        z-index: 100;
        justify-content: space-around;
        align-items: center;
        padding: 0 0.25rem;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        padding: 6px 4px 8px;
        color: var(--text-muted);
        text-decoration: none;
        border: none;
        background: none;
        cursor: pointer;
        position: relative;
        gap: 2px;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-item svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }

    .mobile-nav-item span {
        font-size: 0.65rem;
        font-weight: 500;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 72px;
        text-align: center;
    }

    .mobile-nav-item.active {
        color: var(--color-sky);
    }
    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 3px;
        background: var(--color-sky);
        border-radius: 0 0 4px 4px;
    }

    /* ─────────────────────────────────────────── */
    /* Mobile Bottom Sheet (Sub-menu popup)         */
    /* ─────────────────────────────────────────── */
    .mobile-sheet-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.35);
        z-index: 200;
    }
    .mobile-sheet-overlay.active {
        display: block;
    }

    .mobile-sheet {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-radius: 16px 16px 0 0;
        padding: 0.5rem 1rem 1.25rem;
        z-index: 210;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
        max-height: 70vh;
        overflow-y: auto;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
    }
    .mobile-sheet.open {
        transform: translateY(0);
    }

    .mobile-sheet-handle {
        width: 36px;
        height: 4px;
        background: var(--glass-border);
        border-radius: 4px;
        margin: 0.5rem auto 0.75rem;
    }

    .mobile-sheet-title {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.75rem;
        padding: 0 0.25rem;
    }

    .mobile-sheet-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.85rem 0.75rem;
        border-radius: var(--radius-md);
        color: var(--text-secondary);
        font-size: 0.95rem;
        font-weight: 500;
        text-decoration: none;
    }
    .mobile-sheet-item:hover,
    .mobile-sheet-item:active {
        background: var(--bg-tertiary);
    }
    .mobile-sheet-item.active {
        color: var(--color-sky);
        background: var(--color-sky-glow);
        font-weight: 600;
    }
    .mobile-sheet-item svg {
        flex-shrink: 0;
    }

    /* ─────────────────────────────────────────── */
    /* Responsive Calendar for Mobile View          */
    /* ─────────────────────────────────────────── */
    .calendar-container {
        padding: 0.75rem !important;
    }
    .calendar-header {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    .calendar-title {
        font-size: 1.1rem !important;
    }
    .calendar-nav-btn {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    .calendar-grid {
        gap: 0.2rem !important;
    }
    .calendar-day-header {
        font-size: 0.75rem !important;
        padding: 0.25rem 0 !important;
        font-weight: 600;
    }
    .calendar-day {
        padding: 0.2rem !important;
        aspect-ratio: 1 !important;
        min-height: 40px !important;
        border-radius: 4px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .calendar-day-number {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        line-height: 1 !important;
    }
    .calendar-day .badge {
        font-size: 0 !important;
        padding: 0 !important;
        width: 6px !important;
        height: 6px !important;
        min-width: 6px !important;
        border-radius: 50% !important;
        display: block !important;
        margin: 4px auto 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
    .calendar-day .badge-success { background-color: var(--color-emerald) !important; }
    .calendar-day .badge-warning { background-color: var(--color-amber) !important; }
    .calendar-day .badge-info { background-color: var(--color-sky) !important; }

    /* ─────────────────────────────────────────── */
    /* Responsive Tables & Cards                    */
    /* ─────────────────────────────────────────── */
    table {
        font-size: 0.82rem;
    }
    th, td {
        padding: 0.6rem 0.5rem !important;
    }
    .card {
        border-radius: var(--radius-md);
    }

    /* ─────────────────────────────────────────── */
    /* Peer Review Options                          */
    /* ─────────────────────────────────────────── */
    .peer-review-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    /* Modals Mobile Overrides */
    .modal-content {
        padding: 1.5rem !important;
        max-height: 82vh !important;
        width: calc(100% - 1.5rem) !important;
        margin: 0.75rem !important;
    }
}

.sidebar-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
}
.sidebar-link:hover, .sidebar-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* ── Sidebar Sub-menu ── */
.sidebar-link-parent {
    position: relative;
}
.sidebar-submenu {
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    padding-left: 1.25rem;
}
.sidebar-submenu.open {
    display: flex;
}
.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.sidebar-sublink:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.sidebar-sublink.active {
    color: var(--color-sky);
    background: var(--color-sky-glow);
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 2rem;
    width: 100%;
}


/* Interactive Calendar Styles */
.calendar-container {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.calendar-nav-btn {
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--glass-border);
}
.calendar-nav-btn:hover {
    background: #e2e8f0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
}

.calendar-day {
    aspect-ratio: 1.2;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}
.calendar-day:hover {
    background: var(--bg-tertiary);
    border-color: var(--color-sky);
}
.calendar-day.today {
    border-color: var(--color-emerald);
    background: #f0fdf4;
}
.calendar-day.empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
    pointer-events: none;
}
.calendar-day-number {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
    z-index: 10;
}
.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Peer Review Matrix Styling */
.peer-review-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.peer-review-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.peer-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.peer-review-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-sky);
}

.peer-review-weight {
    background: #e0f2fe;
    color: var(--color-sky);
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.peer-review-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.peer-review-options {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}


.peer-review-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    text-align: center;
}

.peer-review-option input[type="radio"] {
    display: none;
}

.peer-review-option-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.peer-review-option-num {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.peer-review-option:hover {
    background: var(--bg-tertiary);
}

.peer-review-option input[type="radio"]:checked + .peer-review-option-num {
    background: var(--color-emerald);
    color: white;
}

.peer-review-option input[type="radio"]:checked ~ .peer-review-option-label {
    color: var(--text-primary);
}

.peer-review-option:has(input[type="radio"]:checked) {
    border-color: var(--color-emerald);
    background: #f0fdf4;
}

/* File Upload Drag & Drop Area */
.file-upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    background: var(--bg-primary);
}
.file-upload-area:hover, .file-upload-area.dragover {
    border-color: var(--color-sky);
    background: var(--bg-tertiary);
}

.file-upload-icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.file-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.file-item {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.file-item-delete {
    color: var(--color-red);
    cursor: pointer;
    font-weight: bold;
}
.file-item-delete:hover {
    text-decoration: underline;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--bg-secondary);
    border-left: 4px solid var(--color-sky);
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    min-width: 300px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toast.show {
    display: flex;
}

.toast-success { border-left-color: var(--color-emerald); }
.toast-warning { border-left-color: var(--color-amber); }
.toast-danger { border-left-color: var(--color-red); }





/* Profile Dropdown Menu */
.profile-dropdown-container {
    position: relative;
    display: inline-block;
}

.profile-avatar-trigger {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    outline: none;
}

.profile-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 220px;
    z-index: 1000;
    text-align: left;
}

.profile-dropdown-menu.show {
    display: block;
}

.profile-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-tertiary);
}

.profile-dropdown-header-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-header-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 0.15rem;
}

.profile-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    background: none;
    text-align: left;
    cursor: pointer;
}

.profile-dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.profile-dropdown-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Responsive Filter Toggle */
.filter-toggle-btn {
    display: none;
}

@media (max-width: 768px) {
    .filter-toggle-btn {
        display: inline-flex !important;
    }

    .filter-card-wrapper {
        display: none;
        margin-top: 1rem;
        animation: fadeIn 0.2s ease-in-out;
    }

    .filter-card-wrapper.show {
        display: block !important;
    }
}

/* ─────────────────────────────────────────── */
/* Notification Badges / Counters              */
/* ─────────────────────────────────────────── */
.menu-badge {
    background-color: var(--color-red);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-full);
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 1.5rem;
    height: 1.1rem;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2);
}

.submenu-badge {
    background-color: #fee2e2;
    color: var(--color-red);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-full);
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 1.25rem;
    height: 1rem;
}

/* Mobile Nav Badge Dot */
.mobile-badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: var(--color-red);
    border-radius: 50%;
    border: 1.5px solid var(--bg-secondary);
}

/* Bottom Sheet Badge */
.sheet-badge {
    background-color: #fee2e2;
    color: var(--color-red);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-full);
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 1.5rem;
}

/* ── Notification Dropdown and Badges ── */
.notification-dropdown-menu.show {
    display: block !important;
}

.notification-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    background-color: var(--color-red);
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--bg-secondary);
    line-height: 1;
}

.notification-item {
    background: transparent;
}
.notification-item:hover {
    background: var(--bg-tertiary) !important;
}
.notification-item.unread {
    background: rgba(2, 132, 199, 0.03);
    border-left: 3px solid var(--color-sky);
}
.notification-item.unread:hover {
    background: rgba(2, 132, 199, 0.06) !important;
}


