﻿body {

}

:root {
    --cst-red: #C60C2B;
    --cst-blue: #15489D;
    --cst-navy: #00265E;
    --accent-color: var(--cst-navy);
    --accent-hover: var(--cst-red);
    --bg-primary: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-hover: #F1F3F5;
    --text-primary: #1A1A1A;
    --text-secondary: #5C6370;
    --text-muted: #8B929A;
    --border-color: rgba(0, 38, 94, 0.06);
    --border-color-darker: rgba(0, 38, 94, 0.12);
    --border-accent: rgba(21, 72, 157, 0.12);
    --card-shadow: rgba(21, 72, 157, 0.08);
    --card-header-bg: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    --text-2xs: 11px;
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 17px;
    --text-xl: 19px;
    --space-1: 4px;
    --space-2: 6px;
    --space-3: 10px;
    --space-4: 14px;
    --space-5: 18px;
    --space-6: 22px;
    --space-8: 28px;
    --radius-sm: 5px;
    --radius-md: 7px;
    --radius-lg: 10px;
    --radius-full: 9999px;
    --nav-btn-size: 30px;
    --nav-icon-size: 15px;
    --sidebar-width: 230px;
    --sidebar-collapsed: 56px;
    --max-content-width: 1100px;
    --header-height: 54px;
    --content-gap: 18px;
    --schedule-panel-width: 280px;
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 100;
    --z-fixed: 200;
    --z-modal-backdrop: 300;
    --z-modal: 400;
    --z-tooltip: 500;
}

/* Add these styles to prevent dropdown width expansion */
.dropdown {
    min-width: 280px !important;
    max-width: 280px !important;
    width: 280px !important;
}

.dropdown-content {
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
}

.dropdown-item {
    width: calc(100% - 16px) !important;
    box-sizing: border-box;
}

/* Prevent text from expanding dropdown */
.dropdown-item-title,
.dropdown-item-desc,
.dropdown-item-time {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Increase backdrop z-index */
.dropdown-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: calc(var(--z-modal-backdrop) + 50); /* Changed from var(--z-modal-backdrop) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

/* Ensure dropdowns appear above backdrop */
.dropdown.open {
    position: fixed !important;
    z-index: calc(var(--z-modal) + 50) !important; /* Increased z-index */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    min-width: 280px !important; /* Fixed width */
    max-width: 280px !important; /* Fixed width */
}

/* Fix the dropdown container positioning */
.dropdown-container {
    position: relative;
}

/* Ensure dropdown has proper z-index */
.dropdown {
    position: fixed; /* Keep as fixed for proper positioning */
    z-index: var(--z-modal);
    min-width: 280px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color-darker);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: none;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Make sure dropdown appears above other content */
.dropdown-backdrop.active {
    z-index: calc(var(--z-modal) - 1);
}


/* Fix for mobile view */
@@media (max-width: 768px) {
    .dropdown {
        position: fixed;
        left: 50% !important;
        transform: translateX(-50%) translateY(-8px) !important;
        width: 90vw;
        max-width: 320px;
    }

        .dropdown.open {
            transform: translateX(-50%) translateY(0) !important;
        }
}

[data-theme="dark"] {
    --accent-color: #60A5FA;
    --accent-hover: #F87171;
    --bg-primary: #18181B;
    --bg-elevated: #1F1F23;
    --bg-hover: #27272A;
    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --border-color: rgba(255, 255, 255, 0.05);
    --border-color-darker: rgba(255, 255, 255, 0.10);
    --border-accent: rgba(96, 165, 250, 0.15);
    --card-shadow: rgba(96, 165, 250, 0.12);
    --card-header-bg: linear-gradient(135deg, rgba(30, 58, 138, 0.15) 0%, var(--bg-primary) 100%);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(21, 72, 157, 0.28) transparent;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--bg-primary);
    overflow-y: scroll;
}

    html::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    html::-webkit-scrollbar-track {
        background: transparent;
    }

    html::-webkit-scrollbar-thumb {
        background: rgba(21, 72, 157, 0.28);
        border-radius: 3px;
    }

        html::-webkit-scrollbar-thumb:hover {
            background: rgba(21, 72, 157, 0.4);
        }

[data-theme="dark"] html {
    scrollbar-color: rgba(59, 130, 246, 0.28) transparent;
}

    [data-theme="dark"] html::-webkit-scrollbar-thumb {
        background: rgba(59, 130, 246, 0.28);
    }

        [data-theme="dark"] html::-webkit-scrollbar-thumb:hover {
            background: rgba(59, 130, 246, 0.4);
        }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: var(--text-sm);
    line-height: 1.5;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

@@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus:not(:focus-visible) {
    outline: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    z-index: var(--z-tooltip);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 0;
}

    .skip-link:focus {
        top: 0;
    }

.noscript-message {
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color-darker);
    border-radius: var(--radius-lg);
    margin: 20px;
}

    .noscript-message h2 {
        color: var(--cst-red);
        margin-bottom: var(--space-4);
    }

    .noscript-message p {
        color: var(--text-secondary);
    }

.logo-placeholder {
    background: linear-gradient(135deg, var(--cst-navy) 0%, var(--cst-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-2xs);
    font-weight: 700;
}

.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 0.7px solid rgba(21, 72, 157, 0.7);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: var(--z-fixed);
    transition: width 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}

    .sidebar.collapsed {
        width: var(--sidebar-collapsed);
    }

[data-theme="dark"] .sidebar {
    border-right: 0.7px solid rgba(59, 130, 246, 0.7);
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: justify-content 0.3s ease;
}

.sidebar.collapsed .logo-section {
    justify-content: center;
}

.logo-img {
    width: 24px;
    height: 48px;
    flex-shrink: 0;
    background: var(--bg-hover);
    border-radius: 4px;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.logo-text {
    font-size: var(--text-lg);
    font-weight: 700;
    background: linear-gradient(135deg, #15489D 0%, #D4AF37 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

[data-theme="dark"] .logo-text {
    background: linear-gradient(135deg, #60A5FA 0%, #FCD34D 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.logo-tagline {
    font-family: 'Dancing Script', cursive;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sidebar.collapsed .logo-tagline {
    opacity: 0;
}

.sidebar.collapsed .logo-text-container {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    position: absolute;
    right: -15px;
    top: 90px;
    width: 30px;
    height: 30px;
    background: var(--bg-primary);
    border: 0.7px solid rgba(21, 72, 157, 0.7);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: calc(var(--z-fixed) + 1);
    transition: border-color 0.2s ease;
    box-shadow: 0 2px 8px var(--card-shadow);
    padding-right: 6px;
}

[data-theme="dark"] .sidebar-toggle {
    border: 0.7px solid rgba(59, 130, 246, 0.7);
}

.sidebar-toggle svg {
    width: 15px;
    height: 15px;
    stroke: var(--accent-color);
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .sidebar-toggle:hover {
    border-color: var(--accent-color);
}

.sidebar-toggle:hover svg {
    stroke: var(--accent-hover);
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.nav-menu {
    flex: 1;
    padding: 36px 0 14px 0;
}

.nav-section {
    margin-bottom: 16px;
}

.nav-section-title {
    font-size: var(--text-2xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 var(--space-4) var(--space-2);
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
    min-height: 36px;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    border-radius: 7px;
    margin: 1px 8px;
    width: calc(100% - 16px);
}

    .nav-item span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

[data-theme="dark"] .nav-item {
    color: var(--text-secondary);
}

.nav-item:hover {
    color: var(--cst-navy);
    background: rgba(21, 72, 157, 0.05);
}

[data-theme="dark"] .nav-item:hover {
    color: var(--accent-color);
    background: rgba(96, 165, 250, 0.1);
}

.nav-item.active {
    color: var(--cst-navy);
    background: rgba(21, 72, 157, 0.08);
    border-color: var(--border-accent);
}

[data-theme="dark"] .nav-item.active {
    color: var(--accent-color);
    background: rgba(96, 165, 250, 0.1);
}

.nav-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .nav-icon svg {
        width: 15px;
        height: 15px;
        stroke: var(--cst-navy);
        stroke-width: 2;
    }

[data-theme="dark"] .nav-icon svg {
    stroke: var(--accent-color);
}

.nav-item:hover .nav-icon svg {
    stroke: var(--cst-red);
}

[data-theme="dark"] .nav-item:hover .nav-icon svg {
    stroke: var(--accent-hover);
}

.nav-item.active .nav-icon svg {
    stroke: var(--cst-navy);
}

[data-theme="dark"] .nav-item.active .nav-icon svg {
    stroke: var(--accent-color);
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 8px;
    margin: 0 4px;
    width: calc(100% - 8px);
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left 0.3s ease;
    background: var(--bg-primary);
    margin-left: var(--sidebar-width);
}

.sidebar.collapsed ~ .main-wrapper {
    margin-left: var(--sidebar-collapsed);
}

.title-bar {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 20px 0 0;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: var(--z-sticky);
    transition: all 0.3s ease, left 0.3s ease;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(21, 72, 157, 0.03) 0%, transparent 50%), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(198, 12, 43, 0.02) 0%, transparent 50%), linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 249, 252, 0.75) 100%);
}

.sidebar.collapsed ~ .main-wrapper .title-bar {
    left: var(--sidebar-collapsed);
}

.title-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at center, rgba(21, 72, 157, 0.03) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
}

.title-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
    background-size: 200% 200%;
    pointer-events: none;
    opacity: 0.3;
}

[data-theme="dark"] .title-bar {
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(96, 165, 250, 0.06) 0%, transparent 50%), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(248, 113, 113, 0.04) 0%, transparent 50%), linear-gradient(135deg, rgba(30, 58, 138, 0.25) 0%, rgba(24, 24, 27, 0.85) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

    [data-theme="dark"] .title-bar::before {
        background-image: radial-gradient(circle at center, rgba(96, 165, 250, 0.04) 1px, transparent 1px);
    }

    [data-theme="dark"] .title-bar::after {
        background: linear-gradient(135deg, transparent 40%, rgba(96, 165, 250, 0.1) 50%, transparent 60%);
        opacity: 0.2;
    }

.title-bar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    border-bottom-color: rgba(21, 72, 157, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .title-bar.scrolled {
    background: rgba(24, 24, 27, 0.85);
    border-bottom-color: rgba(96, 165, 250, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.title-bar-left {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 1;
    min-width: 0;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 16px;
    align-self: center;
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

    .breadcrumb-separator svg {
        width: 15px;
        height: 15px;
    }

.breadcrumb-link {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

    .breadcrumb-link:hover {
        color: var(--cst-navy);
    }

[data-theme="dark"] .breadcrumb-link:hover {
    color: var(--accent-color);
}

.breadcrumb-current {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-primary);
}

.title-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.header-control {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color-darker);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    padding: 0;
    box-sizing: border-box;
}

[data-theme="dark"] .header-control {
    background: var(--bg-elevated);
}

.header-control:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .header-control:hover {
    border-color: var(--accent-color);
}

.header-control svg {
    width: 15px;
    height: 15px;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.notification-icon svg {
    color: var(--cst-navy);
}

[data-theme="dark"] .notification-icon svg {
    color: var(--accent-color);
}

.theme-icon svg {
    color: var(--cst-navy);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

[data-theme="dark"] .theme-icon svg {
    color: var(--accent-color);
}

.header-control:hover .theme-icon svg {
    transform: rotate(180deg);
    color: var(--cst-red);
}

[data-theme="dark"] .header-control:hover .theme-icon svg {
    color: var(--accent-hover);
}

.header-control:active .theme-icon svg {
    transform: rotate(360deg);
}

@@keyframes bell-swing {
    0%, 100% {
        transform: rotate(0deg);
    }

    15% {
        transform: rotate(12deg);
    }

    35% {
        transform: rotate(-10deg);
    }

    55% {
        transform: rotate(8deg);
    }

    75% {
        transform: rotate(-5deg);
    }
}

.header-control:hover .notification-icon svg {
    color: var(--cst-red);
    animation: bell-swing 900ms ease-in-out;
}

[data-theme="dark"] .header-control:hover .notification-icon svg {
    color: var(--accent-hover);
}

.user-profile {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cst-blue), var(--cst-red));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-2xs);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

    .user-avatar:hover {
        transform: scale(1.05);
        box-shadow: 0 2px 8px rgba(21, 72, 157, 0.3);
    }

.search-control-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-control {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color-darker);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    padding: 0;
    box-sizing: border-box;
}

[data-theme="dark"] .search-control {
    background: var(--bg-elevated);
}

.search-control:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .search-control:hover {
    border-color: var(--accent-color);
}

.search-control svg {
    width: 15px;
    height: 15px;
    color: var(--cst-navy);
    stroke-width: 2;
    transition: color 0.2s;
}

[data-theme="dark"] .search-control svg {
    color: var(--accent-color);
}

.search-control:hover svg {
    color: var(--cst-red);
}

[data-theme="dark"] .search-control:hover svg {
    color: var(--accent-hover);
}

.inline-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color-darker);
    border-radius: 15px;
    padding: 0 14px;
    height: 30px;
    min-width: 240px;
    max-width: 320px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

    .inline-search:focus-within {
        border-color: var(--cst-navy);
        box-shadow: 0 0 0 3px rgba(21, 72, 157, 0.1);
    }

[data-theme="dark"] .inline-search:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.inline-search .search-icon {
    width: 15px;
    height: 15px;
    color: var(--cst-navy);
    flex-shrink: 0;
    transition: color 0.2s;
}

[data-theme="dark"] .inline-search .search-icon {
    color: var(--accent-color);
}

.inline-search:hover .search-icon {
    color: var(--cst-red);
}

[data-theme="dark"] .inline-search:hover .search-icon {
    color: var(--accent-hover);
}

.inline-search:focus-within .search-icon {
    color: var(--cst-navy);
}

[data-theme="dark"] .inline-search:focus-within .search-icon {
    color: var(--accent-color);
}

.inline-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-sm);
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    min-width: 150px;
}

    .inline-search input::placeholder {
        color: var(--text-muted);
    }

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color-darker);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: var(--z-dropdown);
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

    .search-results.active {
        display: block;
    }

.search-results-header {
    padding: 10px 14px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 7px;
    margin: 2px 8px;
    width: calc(100% - 16px);
}

    .search-result-item:hover, .search-result-item.selected {
        background: rgba(21, 72, 157, 0.05);
    }

[data-theme="dark"] .search-result-item:hover, [data-theme="dark"] .search-result-item.selected {
    background: rgba(96, 165, 250, 0.1);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-theme="dark"] .search-result-icon {
    background: transparent;
}

.search-result-icon svg {
    width: 16px;
    height: 16px;
    color: var(--cst-navy);
    transition: color 0.2s;
}

[data-theme="dark"] .search-result-icon svg {
    color: var(--accent-color);
}

.search-result-item:hover .search-result-icon svg {
    color: var(--cst-red);
}

[data-theme="dark"] .search-result-item:hover .search-result-icon svg {
    color: var(--accent-hover);
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.search-result-item:hover .search-result-title {
    color: var(--cst-navy);
}

[data-theme="dark"] .search-result-item:hover .search-result-title {
    color: var(--accent-color);
}

.search-result-subtitle {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-type {
    font-size: var(--text-2xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 2px 6px;
    background: var(--bg-hover);
    border-radius: 4px;
}

.search-no-results {
    padding: 20px 14px;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.search-hint {
    padding: 10px 14px;
    font-size: var(--text-xs);
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .search-hint kbd {
        background: var(--bg-hover);
        padding: 2px 6px;
        border-radius: 4px;
        font-size: var(--text-2xs);
        font-family: inherit;
    }

.content-area {
    flex: 1;
    padding: var(--content-gap);
    padding-top: calc(var(--header-height) + var(--content-gap));
    background: var(--bg-primary);
    min-height: 0;
}

.content-wrapper {
    max-width: var(--max-content-width);
    width: 100%;
    margin: 0 auto;
    height: 100%;
}

@@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.welcome-banner {
    position: relative;
    background: linear-gradient(135deg, var(--cst-navy) 0%, var(--cst-blue) 50%, var(--cst-red) 100%);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    margin-bottom: var(--content-gap);
    overflow: hidden;
    min-height: 100px;
    display: flex;
    align-items: center;
    transition: background 1s ease-in-out;
}

    .welcome-banner[data-animation="1"] {
        background: linear-gradient(135deg, var(--cst-navy) 0%, var(--cst-blue) 50%, var(--cst-red) 100%);
    }

    .welcome-banner[data-animation="2"] {
        background: linear-gradient(135deg, var(--cst-navy) 20%, #000000 60%, var(--cst-red) 100%);
    }

    .welcome-banner[data-animation="3"] {
        background: linear-gradient(to top, #000000, var(--cst-navy));
    }

.banner-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.9;
}

.banner-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.banner-animation-selector {
    position: absolute;
    bottom: 12px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.animation-btn {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

    .animation-btn:hover {
        background: rgba(255, 255, 255, 0.6);
    }

    .animation-btn.active {
        width: 16px;
        height: 4px;
        border-radius: 2px;
        background: rgba(255, 255, 255, 0.9);
    }

.banner-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 8px;
    padding: 0;
}

    .banner-toggle-btn:hover {
        opacity: 0.8;
    }

    .banner-toggle-btn svg {
        width: var(--nav-icon-size, 15px);
        height: var(--nav-icon-size, 15px);
        color: white;
        transition: transform 0.3s;
    }

.welcome-banner.collapsed .banner-toggle-btn svg {
    transform: rotate(180deg);
}

.welcome-banner.collapsed {
    padding: 12px 24px;
    min-height: auto;
}

    .welcome-banner.collapsed .welcome-greeting {
        display: none;
    }

    .welcome-banner.collapsed .banner-canvas {
        display: none;
    }

.banner-content {
    position: relative;
    z-index: 2;
    flex: 1;
    padding-right: 120px;
    overflow: hidden;
}

.welcome-greeting {
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.welcome-quote {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: var(--text-base);
    font-weight: 400;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    position: relative;
}

    .welcome-quote:hover::after {
        content: attr(data-fulltext);
        position: absolute;
        left: 0;
        top: 100%;
        margin-top: 8px;
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: var(--text-xs);
        white-space: normal;
        max-width: 280px;
        z-index: var(--z-tooltip);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        pointer-events: none;
    }

.tabs-container {
    margin-bottom: 16px;
}

.tabs-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--bg-primary);
    border: 0.7px solid rgba(21, 72, 157, 0.7);
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}

[data-theme="dark"] .tabs-wrapper {
    background: var(--bg-elevated);
    border: 0.7px solid rgba(59, 130, 246, 0.7);
}

.nav-btn {
    width: var(--nav-btn-size, 30px);
    height: var(--nav-btn-size, 30px);
    min-width: var(--nav-btn-size, 30px);
    min-height: var(--nav-btn-size, 30px);
    max-width: var(--nav-btn-size, 30px);
    max-height: var(--nav-btn-size, 30px);
    border: 1px solid var(--border-color-darker);
    background: var(--bg-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    flex-grow: 0;
    transition: border-color 0.2s;
    padding: 0;
    box-sizing: border-box;
}

[data-theme="dark"] .nav-btn {
    background: var(--bg-elevated);
}

.tab-nav-btn {
    width: 36px;
    height: auto;
    min-width: 36px;
    max-width: 36px;
    min-height: 100%;
    max-height: none;
    border-radius: 0;
    border: none;
    border-right: 0.7px solid var(--border-color-darker);
    background: rgba(21, 72, 157, 0.02);
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

    .tab-nav-btn:last-of-type {
        border-right: none;
        border-left: 0.7px solid var(--border-color-darker);
    }

[data-theme="dark"] .tab-nav-btn {
    background: rgba(96, 165, 250, 0.02);
}

.tab-nav-btn:first-of-type:hover {
    border-right: 0.7px solid rgba(21, 72, 157, 0.7);
}

[data-theme="dark"] .tab-nav-btn:first-of-type:hover {
    border-right: 0.7px solid rgba(59, 130, 246, 0.7);
}

.tab-nav-btn:last-of-type:hover {
    border-left: 0.7px solid rgba(21, 72, 157, 0.7);
}

[data-theme="dark"] .tab-nav-btn:last-of-type:hover {
    border-left: 0.7px solid rgba(59, 130, 246, 0.7);
}

.tab-nav-btn:hover svg {
    color: var(--cst-red);
}

[data-theme="dark"] .tab-nav-btn:hover svg {
    color: var(--accent-hover);
}

.day-nav-btn {
    width: 36px;
    height: auto;
    min-width: 36px;
    max-width: 36px;
    min-height: 100%;
    max-height: none;
    border-radius: 0;
    border: none;
    background: rgba(21, 72, 157, 0.03);
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s;
}

    .day-nav-btn:first-of-type {
        border-right: 0.7px solid var(--border-color-darker);
    }

    .day-nav-btn:last-of-type {
        border-left: 0.7px solid var(--border-color-darker);
    }

[data-theme="dark"] .day-nav-btn {
    background: rgba(96, 165, 250, 0.05);
}

.day-nav-btn:first-of-type:hover {
    border-right: 0.7px solid rgba(21, 72, 157, 0.7);
}

[data-theme="dark"] .day-nav-btn:first-of-type:hover {
    border-right: 0.7px solid rgba(59, 130, 246, 0.7);
}

.day-nav-btn:last-of-type:hover {
    border-left: 0.7px solid rgba(21, 72, 157, 0.7);
}

[data-theme="dark"] .day-nav-btn:last-of-type:hover {
    border-left: 0.7px solid rgba(59, 130, 246, 0.7);
}

.day-nav-btn:hover svg {
    color: var(--cst-red);
}

[data-theme="dark"] .day-nav-btn:hover svg {
    color: var(--accent-hover);
}

.day-nav-btn svg {
    width: 15px;
    height: 15px;
}

.nav-btn:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .nav-btn:hover {
    border-color: var(--accent-color);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn svg {
    width: var(--nav-icon-size, 15px);
    height: var(--nav-icon-size, 15px);
    color: var(--accent-color);
    flex-shrink: 0;
}

.nav-btn:hover:not(:disabled) svg {
    color: var(--accent-hover);
}

.tab-nav-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
}

    .tab-nav-btn:disabled svg {
        opacity: 0.3;
    }

.subject-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 6px 10px;
}

    .subject-tabs::-webkit-scrollbar {
        display: none;
    }

.subject-tab {
    padding: 6px 14px 6px 16px;
    background: none;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: auto;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

    .subject-tab.active {
        background: rgba(21, 72, 157, 0.08);
        border-color: var(--border-accent);
    }

[data-theme="dark"] .subject-tab.active {
    background: rgba(96, 165, 250, 0.1);
}

.subject-tab-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color 0.2s;
}

.subject-tab:hover {
    background: rgba(21, 72, 157, 0.05);
    border-radius: 7px;
}

[data-theme="dark"] .subject-tab:hover {
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .subject-tab:hover {
    background: rgba(96, 165, 250, 0.1);
}

.subject-tab:hover .subject-tab-name {
    color: var(--cst-navy);
}

[data-theme="dark"] .subject-tab:hover .subject-tab-name {
    color: var(--accent-color);
}

.subject-tab.active .subject-tab-name {
    color: var(--cst-navy);
}

[data-theme="dark"] .subject-tab.active .subject-tab-name {
    color: var(--accent-color);
}

.pin-indicator {
    position: absolute;
    top: 4px;
    left: 6px;
    width: 6px;
    height: 6px;
    background: var(--cst-navy);
    border-radius: 50%;
}

[data-theme="dark"] .pin-indicator {
    background: var(--accent-color);
}

.pin-indicator.current {
    background: var(--cst-red);
    animation: pulse 1.5s ease-in-out infinite;
}

[data-theme="dark"] .pin-indicator.current {
    background: var(--accent-hover);
}

.class-card {
    background: var(--bg-primary);
    border: 0.7px solid rgba(21, 72, 157, 0.7);
    border-radius: 10px;
    min-height: max(calc(100vh - 280px), 420px);
    display: flex;
    flex-direction: column;
    flex: 1;
}

[data-theme="dark"] .class-card {
    background: var(--bg-elevated);
    border: 0.7px solid rgba(59, 130, 246, 0.7);
}

.card-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-radius: 10px 10px 0 0;
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(21, 72, 157, 0.03) 0%, transparent 50%), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(198, 12, 43, 0.02) 0%, transparent 50%), var(--card-header-bg);
}

    .card-header::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle at center, rgba(21, 72, 157, 0.03) 1px, transparent 1px);
        background-size: 8px 8px;
        pointer-events: none;
        border-radius: 10px 10px 0 0;
    }

    .card-header::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
        background-size: 200% 200%;
        pointer-events: none;
        border-radius: 10px 10px 0 0;
        opacity: 0.3;
    }

[data-theme="dark"] .card-header {
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(96, 165, 250, 0.06) 0%, transparent 50%), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(248, 113, 113, 0.04) 0%, transparent 50%), var(--card-header-bg);
}

    [data-theme="dark"] .card-header::before {
        background-image: radial-gradient(circle at center, rgba(96, 165, 250, 0.04) 1px, transparent 1px);
    }

    [data-theme="dark"] .card-header::after {
        background: linear-gradient(135deg, transparent 40%, rgba(96, 165, 250, 0.1) 50%, transparent 60%);
        opacity: 0.2;
    }

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: var(--z-base);
}

.week-grid-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

[data-theme="dark"] .week-grid-indicator {
    background: var(--bg-elevated);
}

.week-grid-label {
    font-size: var(--text-2xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
}

.week-box {
    width: var(--space-2);
    height: var(--space-2);
    border-radius: 2px;
    background: var(--border-color);
    cursor: pointer;
    position: relative;
    transition: transform 0.15s ease;
}

    .week-box:hover {
        transform: scale(1.4);
    }

    .week-box.completed {
        background: var(--accent-color);
    }

    .week-box.current {
        background: var(--cst-red);
        box-shadow: 0 0 0 2px rgba(198, 12, 43, 0.3);
    }

[data-theme="dark"] .week-box.completed {
    background: var(--accent-color);
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.course-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--accent-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .course-title {
    color: var(--text-primary);
}

.course-code {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: var(--z-dropdown);
}

.icon-box {
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color-darker);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
}

[data-theme="dark"] .icon-box {
    background: var(--bg-elevated);
}

.icon-box:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .icon-box:hover {
    border-color: var(--accent-color);
}

.icon-box svg {
    width: 20px;
    height: 20px;
    color: var(--cst-navy);
    fill: none;
    stroke-width: 2;
    transition: color 0.2s;
}

[data-theme="dark"] .icon-box svg {
    color: var(--accent-color);
}

.icon-box:hover svg {
    color: var(--accent-hover);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: var(--space-4);
    height: var(--space-4);
    padding: 0 4px;
    background: var(--cst-red);
    color: white;
    font-size: var(--text-2xs);
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

.dropdown-container {
    position: relative;
}

.dropdown-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

    .dropdown-backdrop.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

[data-theme="dark"] .dropdown-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    min-width: 280px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color-darker);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: var(--z-modal);
    display: none;
    overflow: hidden;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

    .dropdown.left {
        right: 0;
    }

    .dropdown.open {
        display: block;
        transform: translateY(0);
        opacity: 1;
        position: fixed;
    }

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-content {
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 7px;
    margin: 2px 8px;
    width: calc(100% - 16px);
}

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover {
        background: rgba(21, 72, 157, 0.05);
    }

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(96, 165, 250, 0.1);
}

.dropdown-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .dropdown-item-icon svg {
        width: 15px;
        height: 15px;
        color: var(--cst-navy);
        transition: color 0.2s;
    }

[data-theme="dark"] .dropdown-item-icon svg {
    color: var(--accent-color);
}

.dropdown-item:hover .dropdown-item-icon svg {
    color: var(--cst-red);
}

[data-theme="dark"] .dropdown-item:hover .dropdown-item-icon svg {
    color: var(--accent-hover);
}

.dropdown-item-content {
    flex: 1;
    min-width: 0;
}

.dropdown-item-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    transition: color 0.2s;
}

.dropdown-item:hover .dropdown-item-title {
    color: var(--cst-navy);
}

[data-theme="dark"] .dropdown-item:hover .dropdown-item-title {
    color: var(--accent-color);
}

.dropdown-item-desc {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.dropdown-empty {
    padding: var(--space-6) var(--space-4);
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.notes-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

[data-theme="dark"] .notes-badge {
    background: var(--bg-elevated);
}

.notes-badge:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .notes-badge:hover {
    border-color: var(--accent-color);
}

.notes-badge svg {
    width: var(--nav-icon-size);
    height: var(--nav-icon-size);
    color: var(--cst-navy);
    transition: color 0.2s;
}

[data-theme="dark"] .notes-badge svg {
    color: var(--accent-color);
}

.notes-badge:hover svg {
    color: var(--accent-hover);
}

.notes-badge-text {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.notification-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
}

[data-theme="dark"] .notification-box {
    background: var(--bg-elevated);
}

.notification-box:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .notification-box:hover {
    border-color: var(--accent-color);
}

.notification-box svg {
    width: var(--nav-icon-size);
    height: var(--nav-icon-size);
    color: var(--cst-navy);
    transition: color 0.2s;
}

[data-theme="dark"] .notification-box svg {
    color: var(--accent-color);
}

.notification-box:hover svg {
    color: var(--accent-hover);
}

.notification-box-text {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.card-body {
    padding: 0 20px 14px;
}

.main-content-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
    width: 100%;
}

    .main-content-row #classCardContainer {
        flex: 1;
        min-width: 0;
        width: 0;
        overflow: hidden;
        display: flex;
    }

.right-panel {
    width: var(--schedule-panel-width);
    flex-shrink: 0;
    background: var(--bg-primary);
    border: 0.7px solid rgba(21, 72, 157, 0.7);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-height: max(calc(100vh - 280px), 420px);
}

[data-theme="dark"] .right-panel {
    background: var(--bg-elevated);
    border: 0.7px solid rgba(59, 130, 246, 0.7);
}

.right-panel-header {
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    min-height: 46px;
    position: relative;
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(21, 72, 157, 0.03) 0%, transparent 50%), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(198, 12, 43, 0.02) 0%, transparent 50%), var(--card-header-bg);
    border-radius: 10px 10px 0 0;
}

    .right-panel-header::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle at center, rgba(21, 72, 157, 0.03) 1px, transparent 1px);
        background-size: 8px 8px;
        pointer-events: none;
        border-radius: 10px 10px 0 0;
    }

    .right-panel-header::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
        background-size: 200% 200%;
        pointer-events: none;
        border-radius: 10px 10px 0 0;
        opacity: 0.3;
    }

[data-theme="dark"] .right-panel-header {
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(96, 165, 250, 0.06) 0%, transparent 50%), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(248, 113, 113, 0.04) 0%, transparent 50%), var(--card-header-bg);
}

    [data-theme="dark"] .right-panel-header::before {
        background-image: radial-gradient(circle at center, rgba(96, 165, 250, 0.04) 1px, transparent 1px);
    }

    [data-theme="dark"] .right-panel-header::after {
        background: linear-gradient(135deg, transparent 40%, rgba(96, 165, 250, 0.1) 50%, transparent 60%);
        opacity: 0.2;
    }

.day-title-container {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.right-panel-title {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--accent-color);
    margin: 0;
}

[data-theme="dark"] .right-panel-title {
    color: var(--text-primary);
}

.day-date {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
}

.right-panel-content {
    padding: 20px var(--space-2) var(--space-2);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.schedule-period {
    display: flex;
    align-items: center;
    padding: 4px var(--space-2);
    border-radius: var(--radius-sm);
    gap: var(--space-1);
    background: transparent;
    border: 1px solid transparent;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

    .schedule-period.current-period {
        background: rgba(21, 72, 157, 0.08);
        border-color: var(--border-accent);
    }

[data-theme="dark"] .schedule-period.current-period {
    background: rgba(96, 165, 250, 0.1);
}

.schedule-period.break-period {
    opacity: 0.7;
}

.schedule-time {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    min-width: 85px;
    flex-shrink: 0;
}

.schedule-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-color-darker);
    flex-shrink: 0;
}

[data-theme="dark"] .schedule-separator {
    background: var(--text-muted);
}

.schedule-subject {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.schedule-period.break-period .schedule-subject {
    color: var(--text-muted);
    font-style: italic;
}

.schedule-period.class-period .schedule-subject {
    color: var(--accent-color);
    font-weight: 600;
}

.weekend-message {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

    .weekend-message svg {
        width: var(--space-8);
        height: var(--space-8);
        color: var(--accent-color);
        margin-bottom: 8px;
    }

.weekend-subtext {
    font-size: var(--text-xs);
    margin-top: var(--space-1);
}

.current-unit {
    background: var(--bg-primary);
    border: 1px solid var(--border-color-darker);
    padding: 24px 14px 24px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    margin-top: 26px;
    position: relative;
}

[data-theme="dark"] .current-unit {
    background: var(--bg-elevated);
}

.lesson-number-display {
    position: absolute;
    top: -12px;
    right: 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color-darker);
    border-radius: 5px;
    padding: 4px 12px;
    font-size: var(--text-2xs);
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

[data-theme="dark"] .lesson-number-display {
    background: var(--bg-elevated);
}

.current-unit-title {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.next-session-info {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 24px;
}

.action-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-primary);
    color: var(--accent-color);
    border: 1px solid var(--border-color-darker);
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: border-color 0.2s;
}

[data-theme="dark"] .action-btn {
    background: var(--bg-elevated);
}

.action-btn:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .action-btn:hover {
    border-color: var(--accent-color);
}

.action-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: color 0.2s;
}

.action-btn:hover svg {
    color: var(--accent-hover);
}

.sessions-toggle {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color-darker);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-base);
    transition: border-color 0.2s;
}

[data-theme="dark"] .sessions-toggle {
    background: var(--bg-elevated);
}

.sessions-toggle:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .sessions-toggle:hover {
    border-color: var(--accent-color);
}

.sessions-toggle svg {
    width: 15px;
    height: 15px;
    color: var(--accent-color);
    transition: transform 0.3s, color 0.2s;
}

.sessions-toggle:hover svg {
    color: var(--accent-hover);
}

.sessions-toggle.expanded svg {
    transform: rotate(180deg);
}

.upcoming-sessions-list {
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    display: none;
}

    .upcoming-sessions-list.expanded {
        display: block;
    }

.session-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

    .session-row:last-child {
        border-bottom: none;
    }

.session-day {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--accent-color);
    min-width: 70px;
    flex-shrink: 0;
}

.session-time {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 90px;
    flex-shrink: 0;
}

.session-topic {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--accent-color);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.card-separator {
    height: 1px;
    background: var(--border-color);
    margin: 25px -20px 18px;
}

.quick-actions-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.quick-action-card {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 85px;
}

.quick-action-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color-darker);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .quick-action-icon {
    background: var(--bg-elevated);
}

.quick-action-card:hover .quick-action-icon {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .quick-action-card:hover .quick-action-icon {
    border-color: var(--accent-color);
}

.quick-action-card svg {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
    stroke-width: 2;
}

.quick-action-card:hover svg {
    color: var(--accent-hover);
}

.quick-action-label {
    font-size: var(--text-xs);
    color: var(--text-primary);
    font-weight: 600;
}

.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    left: 0;
    top: 124px;
    width: 15px;
    height: 30px;
    background: var(--bg-primary);
    border: 0.7px solid rgba(21, 72, 157, 0.7);
    border-left: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: calc(var(--z-fixed) + 1);
    transition: border-color 0.2s ease, left 0.3s ease, border-radius 0.3s ease;
}

[data-theme="dark"] .mobile-sidebar-toggle {
    border-color: rgba(59, 130, 246, 0.7);
}

.mobile-sidebar-toggle:hover {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .mobile-sidebar-toggle:hover {
    border-color: var(--accent-color);
}

.mobile-sidebar-toggle svg {
    width: 12px;
    height: 12px;
    stroke: var(--accent-color);
    stroke-width: 2.5;
    transition: transform 0.3s ease, stroke 0.2s ease;
}

.mobile-sidebar-toggle:hover svg {
    stroke: var(--cst-red);
}

[data-theme="dark"] .mobile-sidebar-toggle:hover svg {
    stroke: var(--accent-hover);
}

.mobile-sidebar-toggle.sidebar-open {
    left: calc(280px - 15px - 1px);
    border-radius: 30px 0 0 30px;
    border: 0.7px solid rgba(21, 72, 157, 0.7);
    border-right: none;
}

[data-theme="dark"] .mobile-sidebar-toggle.sidebar-open {
    border-color: rgba(59, 130, 246, 0.7);
    border-right: none;
}

.mobile-sidebar-toggle.sidebar-open svg {
    transform: rotate(180deg);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-fixed) - 1);
}

.bottom-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: calc(var(--z-fixed) + 50);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

    .bottom-drawer-overlay.open {
        opacity: 1;
        visibility: visible;
    }

.bottom-drawer-trigger {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 5px;
    background: linear-gradient(135deg, var(--cst-blue), var(--cst-red));
    border: none;
    border-radius: 3px;
    cursor: pointer;
    z-index: calc(var(--z-fixed) + 51);
    transition: width 0.2s;
}

    .bottom-drawer-trigger:hover {
        width: 48px;
    }

.bottom-drawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: calc(100% - 24px);
    max-width: 400px;
    background: var(--bg-elevated);
    border-radius: 14px 14px 0 0;
    z-index: calc(var(--z-fixed) + 51);
    transition: transform 0.3s ease;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .bottom-drawer {
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
}

.bottom-drawer.open {
    transform: translateX(-50%) translateY(0);
}

.bottom-drawer-header {
    padding: 14px 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(21, 72, 157, 0.03) 0%, transparent 50%), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(198, 12, 43, 0.02) 0%, transparent 50%), var(--card-header-bg);
}

[data-theme="dark"] .bottom-drawer-header {
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(96, 165, 250, 0.06) 0%, transparent 50%), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(248, 113, 113, 0.04) 0%, transparent 50%), var(--card-header-bg);
}

.bottom-drawer-handle {
    width: 36px;
    height: 4px;
    background: linear-gradient(135deg, var(--cst-blue), var(--cst-red));
    border-radius: 2px;
}

.bottom-drawer-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--cst-navy);
    letter-spacing: -0.2px;
}

[data-theme="dark"] .bottom-drawer-title {
    color: var(--text-primary);
}

.bottom-drawer-content {
    padding: 8px 20px 24px;
}

.bottom-drawer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.drawer-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    width: 90px;
    font-family: inherit;
    color: inherit;
}

.drawer-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease;
}

[data-theme="dark"] .drawer-action-icon {
    background: var(--bg-elevated);
}

.drawer-action:hover .drawer-action-icon {
    border-color: var(--cst-navy);
}

[data-theme="dark"] .drawer-action:hover .drawer-action-icon {
    border-color: var(--accent-color);
}

.drawer-action-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
    stroke-width: 2;
    transition: color 0.2s ease;
}

.drawer-action:hover .drawer-action-icon svg {
    color: var(--accent-hover);
}

.drawer-action-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-primary);
}

@@media (max-width: 1100px) {
    :root {
        --max-content-width: 100%;
        --nav-btn-size: 28px;
        --nav-icon-size: 14px;
    }

    .main-content-row {
        flex-direction: column;
        gap: var(--space-4);
    }

        .main-content-row #classCardContainer {
            width: 100%;
        }

    .class-card {
        height: auto;
        min-height: auto;
    }

    .right-panel {
        width: 100%;
        height: auto;
        min-height: auto;
    }
}

@@media (max-width: 900px) {
    :root {
        --nav-btn-size: 26px;
        --nav-icon-size: 13px;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        position: fixed;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }

        .sidebar.mobile-open {
            transform: translateX(0);
        }

    .sidebar-overlay.active {
        display: block;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .title-bar {
        left: 0;
    }

    .mobile-sidebar-toggle {
        display: flex;
    }

    .sidebar-toggle {
        display: none;
    }
}

@@media (max-width: 768px) {
    :root {
        --nav-btn-size: 26px;
        --nav-icon-size: 13px;
    }

    .title-bar {
        padding: 0 var(--space-4) 0 0;
    }

    .title-bar-right {
        gap: 8px;
    }

    .search-control {
        display: flex;
    }

    .inline-search {
        display: none;
    }

        .inline-search.active {
            display: flex;
            position: absolute;
            right: 0;
            top: calc(100% + 8px);
            min-width: 250px;
            max-width: 300px;
            z-index: var(--z-dropdown);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            height: 30px;
        }

    .search-results {
        left: auto;
        right: 0;
        min-width: 250px;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        max-width: 30px;
        max-height: 30px;
    }

    .content-area {
        padding: var(--space-4);
        padding-top: calc(var(--header-height) + var(--space-4));
    }

    .welcome-banner {
        padding: var(--space-5);
    }

    .banner-content {
        padding-right: 16px;
    }

    .welcome-greeting {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .welcome-quote {
        font-size: var(--text-sm);
    }

    .banner-animation-selector {
        bottom: 8px;
        right: 12px;
    }

    .notes-badge {
        padding: 6px 8px;
        border-radius: 50%;
    }

    .notes-badge-text {
        display: none;
    }

    .notification-box {
        padding: 6px 8px;
        border-radius: 50%;
    }

    .notification-box-text {
        display: none;
    }
}

@@media (max-width: 576px) {
    :root {
        --content-gap: var(--space-3);
        --header-height: 52px;
        --nav-btn-size: 24px;
        --nav-icon-size: 12px;
    }

    .title-bar-right {
        gap: 6px;
    }

    .inline-search.active {
        min-width: 220px;
        max-width: 260px;
        padding: 0 10px;
        height: 30px;
    }

        .inline-search.active input {
            font-size: var(--text-xs);
            min-width: 100px;
        }

    .search-results {
        min-width: 220px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        max-width: 28px;
        max-height: 28px;
        font-size: 9px;
    }

    .header-control {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        max-width: 28px;
        max-height: 28px;
    }

    .content-area {
        padding: var(--space-3);
        padding-top: calc(var(--header-height) + var(--space-3));
    }

    .welcome-banner {
        padding: var(--space-4);
    }

    .banner-content {
        padding-right: 12px;
    }

    .welcome-greeting {
        font-size: 18px;
        margin-bottom: 1px;
    }

    .welcome-quote {
        font-size: var(--text-xs);
    }

    .banner-animation-selector {
        bottom: 6px;
        right: 10px;
        gap: 4px;
    }

    .animation-btn {
        width: 5px;
        height: 5px;
    }

        .animation-btn.active {
            width: 12px;
            height: 3px;
        }

    .notes-badge {
        padding: 5px 7px;
    }

    .notification-box {
        padding: 5px 7px;
    }
}



