/* Reset and CSS Variables */
:root {
    --bg-deep: #0a0d14;
    --bg-dark: #101524;
    --bg-panel: #182035;
    --bg-card: #202b48;
    
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    
    /* RPG State Colors */
    --color-locked: #4b5563;
    --color-locked-bg: rgba(31, 41, 55, 0.6);
    --color-available: #38bdf8;
    --color-available-bg: rgba(56, 189, 248, 0.1);
    --color-active: #fbbf24;
    --color-active-bg: rgba(251, 191, 36, 0.15);
    --color-mastered: #10b981;
    --color-mastered-bg: rgba(16, 185, 129, 0.15);
    
    /* UI Accent Colors */
    --accent-gold: #fbbf24;
    --accent-gold-dark: #d97706;
    --accent-blue: #0ea5e9;
    --border-color: #2e3c60;
    --border-hover: #4b5f90;
    
    --font-header: 'Orbitron', 'Rubik', sans-serif;
    --font-body: 'Rubik', sans-serif;
    
    --shadow-main: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-glow-blue: 0 0 15px rgba(14, 165, 233, 0.4);
    --shadow-glow-gold: 0 0 15px rgba(251, 191, 36, 0.4);
    --shadow-glow-green: 0 0 15px rgba(16, 185, 129, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    overscroll-behavior-x: none;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-light);
    font-family: var(--font-body);
    overflow: hidden; /* We handle scrolling in specific viewports */
    overflow-x: clip;
    overscroll-behavior-x: none;
    height: 100vh;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

/* Accessibility: Screen Reader Only */
.sr-only {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Layout Core */
.hud-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Header & HUD Bar */
.hud-header {
    background-color: var(--bg-dark);
    border-bottom: 2px solid var(--border-color);
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 86px;
    height: 86px;
    gap: 20px;
    flex-shrink: 0;
    box-shadow: var(--shadow-main);
    z-index: 10;
}

.hud-logo {
    font-family: var(--font-header);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.hud-brand-logo-img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.45));
    border-radius: 12px;
    transition: transform 0.25s ease, filter 0.25s ease;
    flex-shrink: 0;
}

.hud-brand-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.75));
}

.glitch-text {
    color: var(--text-light);
    position: relative;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Top Right Section: Brand & Dedicated Login Button */
.hud-top-right-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.btn-hud-login-top {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(2, 132, 199, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    padding: 7px 14px;
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-hud-login-top:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.38), rgba(2, 132, 199, 0.28));
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
    transform: translateY(-1px);
}

.btn-hud-login-top:active {
    transform: scale(0.97);
}

.btn-hud-login-top.logged-in {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(56, 189, 248, 0.35);
    color: #f1f5f9;
}

.btn-hud-login-top.logged-in:hover {
    border-color: #38bdf8;
    background: rgba(30, 41, 59, 0.98);
}

.login-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
}

.login-status-dot.offline {
    background: #94a3b8;
    box-shadow: none;
}

/* Auth Controls & Single User Logout */
.hud-auth-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-hud-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-hud-user-chip:hover {
    border-color: #38bdf8;
    background: rgba(30, 41, 59, 0.98);
}

.btn-hud-logout {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-hud-logout:hover {
    background: rgba(239, 68, 68, 0.28);
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.btn-hud-logout:active {
    transform: scale(0.97);
}

/* Degree Progress Card (Flagship Centerpiece) */
.character-card {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(22, 28, 46, 0.95), rgba(13, 17, 29, 0.95));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 10px 16px;
    min-width: 0;
    max-width: 580px;
    flex: 1 1 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.25s ease;
}

.character-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.15);
}

.char-avatar {
    font-size: 1.6rem !important;
    margin-left: 14px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.char-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.char-name-row {
    display: flex;
    justify-content: stretch;
    align-items: center;
    margin-bottom: 2px;
    min-width: 0;
    width: 100%;
}

.char-title {
    font-weight: 700;
    font-size: 0.96rem;
    color: #f8fafc;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-level {
    font-weight: 800;
    font-size: 0.88rem;
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.35);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 1px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 0 !important;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.hud-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-right: 14px;
}

.xp-bar-container {
    position: relative;
    height: 22px;
    background-color: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6);
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981, #34d399) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: width;
    border-radius: 11px;
}

.xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.82rem;
    font-weight: 800;
    font-family: 'Assistant', 'Rubik', 'Segoe UI', system-ui, sans-serif;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.5px;
    pointer-events: none;
    white-space: nowrap;
}

/* HUD Stats */
.hud-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 6px 15px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.stat-value {
    font-family: var(--font-header);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent-blue);
}

/* Workspace Panels */
.hud-workspace {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.hud-workspace[style*="display: none"],
.hud-workspace[style*="display:none"],
.hud-workspace.hidden {
    display: none !important;
}

#curriculum-tree-workspace {
    overflow: hidden;
}

#notion-tasks-workspace,
#timetable-workspace,
#settings-workspace {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain;
}

/* Sidebar */
.hud-sidebar {
    width: 320px;
    flex-shrink: 0;
    background-color: var(--bg-dark);
    border-left: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    overflow-y: auto;
}

.sidebar-section {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}

.sidebar-section h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    color: var(--text-light);
}

.active-quests-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.empty-quests {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 10px 0;
    line-height: 1.4;
}

.quest-item-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-right: 3px solid var(--accent-gold);
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.quest-item-sidebar:hover {
    background: rgba(255, 255, 255, 0.05);
}

.quest-sidebar-title {
    font-size: 0.8rem;
    font-weight: 700;
}

.quest-sidebar-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quest-sidebar-xp {
    font-size: 0.7rem;
    color: var(--accent-gold);
    font-weight: bold;
    align-self: flex-end;
}

.sidebar-section.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.db-actions {
    display: flex;
    gap: 8px;
}

.db-actions button {
    flex: 1;
}

/* Button System */
.btn {
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: var(--accent-gold);
    color: #000;
}
.btn-primary:hover {
    background: #fcd34d;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    color: var(--text-light);
    border-color: var(--border-hover);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 4px;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.w-full {
    width: 100%;
}
.mt-10 {
    margin-top: 10px;
}

/* Skill Tree Canvas */
.tree-canvas-container {
    flex-grow: 1;
    min-width: 0;
    position: relative;
    background-color: var(--bg-deep);
    display: flex;
    flex-direction: column;
}

.tree-controls {
    position: relative;
    top: auto;
    right: auto;
    background: rgba(13, 17, 28, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 10;
    backdrop-filter: blur(10px);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.tree-legend {
    display: flex;
    align-items: center;
    gap: 14px;
}

.legend-item {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dot-locked { background-color: var(--color-locked); }
.dot-available { background-color: var(--color-available); }
.dot-active { background-color: var(--color-active); }
.dot-mastered { background-color: var(--color-mastered); }

.tree-viewport {
    flex-grow: 1;
    overflow: auto;
    position: relative;
    padding: 24px 30px;
    /* Enable horizontal scrolling for semesters */
}

.connections-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Semesters Grid - Flow RTL */
.semesters-grid {
    display: flex;
    flex-direction: row; /* Flex row flow naturally aligns RTL in RTL html */
    gap: 60px;
    position: relative;
    z-index: 2;
    min-height: 100%;
    width: max-content;
}

.semester-column {
    display: flex;
    flex-direction: column;
    width: 240px;
    gap: 20px;
}

.semester-header {
    font-family: var(--font-header);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    text-align: center;
    text-transform: uppercase;
}

/* Course Card styling */
.course-card {
    background-color: var(--bg-panel);
    border: 2px solid var(--color-locked);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    user-select: none;
}

.course-card::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

/* States of Course Cards */
.course-card.locked {
    border-color: var(--color-locked);
    background-color: var(--color-locked-bg);
    opacity: 0.7;
}
.course-card.locked:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.course-card.available {
    border-color: var(--color-available);
    background-color: var(--color-available-bg);
    box-shadow: 0 0 5px rgba(56, 189, 248, 0.1);
}
.course-card.available:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-blue);
    border-color: #7dd3fc;
}

.course-card.active {
    border-color: var(--color-active);
    background-color: var(--color-active-bg);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}
.course-card.active:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-gold);
    border-color: #fde047;
}

.course-card.mastered {
    border-color: var(--color-mastered);
    background-color: var(--color-mastered-bg);
}
.course-card.mastered:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-green);
    border-color: #34d399;
}

/* Course Card Type Tags */
.course-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.course-type-tag {
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}
.course-type-tag.type-core {
    background-color: rgba(14, 165, 233, 0.15);
    color: var(--accent-blue);
}
.course-type-tag.type-elective {
    background-color: rgba(251, 191, 36, 0.15);
    color: var(--accent-gold);
}
.course-type-tag.type-humanities {
    background-color: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}
.course-type-tag.type-sports {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

/* Course Card Type Borders (for non-locked nodes) */
.course-card.available.type-elective { border-color: rgba(251, 191, 36, 0.6); }
.course-card.active.type-elective { border-color: var(--accent-gold); background-color: rgba(251, 191, 36, 0.03); }
.course-card.mastered.type-elective { border-color: #f59e0b; }

.course-card.available.type-humanities { border-color: rgba(168, 85, 247, 0.6); }
.course-card.active.type-humanities { border-color: #a855f7; background-color: rgba(168, 85, 247, 0.03); }
.course-card.mastered.type-humanities { border-color: #8b5cf6; }

.course-card.available.type-sports { border-color: rgba(16, 185, 129, 0.6); }
.course-card.active.type-sports { border-color: #10b981; background-color: rgba(16, 185, 129, 0.03); }
.course-card.mastered.type-sports { border-color: #059669; }

/* Course Card Details */
.course-code {
    font-family: var(--font-header);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.course-card.available .course-code { color: var(--color-available); }
.course-card.active .course-code { color: var(--color-active); }
.course-card.mastered .course-code { color: var(--color-mastered); }

.course-name {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.course-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    font-size: 0.75rem;
}

.course-credits {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--text-muted);
}

.course-status-icon {
    font-size: 0.95rem;
}

/* Modals Overlay & Content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9000;
    display: none; /* JS triggers display: flex */
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex !important;
    z-index: 100050 !important;
}

/* High-Priority Active Modals (Ensures all dialogs always appear in front of tours, overlays, and sidebars) */
.modal-overlay.active,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display: block"],
.modal-backdrop.active,
.modal-backdrop[style*="display: flex"],
#direct-download-modal.active,
#direct-download-modal[style*="display: flex"],
#course-comparison-modal.active,
#course-comparison-modal[style*="display: flex"],
#academic-faq-modal.active,
#academic-faq-modal[style*="display: flex"],
#keyboard-shortcuts-modal.active,
#keyboard-shortcuts-modal[style*="display: flex"],
#planner-graduation-clearance-modal,
#tutorial-hub-modal.active,
#tutorial-hub-modal[style*="display: flex"] {
    z-index: 100050 !important;
}

.command-palette-overlay.active,
.command-palette-overlay[style*="display: flex"],
#command-palette-modal.active,
#command-palette-modal[style*="display: flex"] {
    z-index: 100060 !important;
}

.modal-content {
    background-color: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    width: 700px;
    max-width: 90%;
    max-height: 85%;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-main);
    opacity: 1;
    animation: modalSlideUp 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.modal-content.small {
    width: 450px;
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px; /* RTL modal close on far left */
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-light);
}

.modal-header {
    padding: 25px 25px 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-course-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.course-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.course-status-badge.locked { background: var(--color-locked); color: white; }
.course-status-badge.available { background: var(--color-available); color: black; }
.course-status-badge.active { background: var(--color-active); color: black; }
.course-status-badge.mastered { background: var(--color-mastered); color: black; }

.modal-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Registration Action Box */
.register-action-box {
    background: var(--bg-panel);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.prereqs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.prereq-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.prereq-tag.passed {
    border-color: var(--color-mastered);
    color: var(--color-mastered);
}

.prereq-tag.missing {
    border-color: #ef4444;
    color: #ef4444;
}

/* Tasks columns */
.tasks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .tasks-grid {
        grid-template-columns: 1fr;
    }
}

.tasks-column {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.column-header h3 {
    font-size: 0.85rem;
    color: var(--text-light);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 50px;
    max-height: 200px;
    overflow-y: auto;
}

.task-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.task-item.completed {
    border-color: var(--color-mastered-bg);
    opacity: 0.6;
}

.task-item-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    flex-grow: 1;
}

.task-item-label input {
    cursor: pointer;
    width: 15px;
    height: 15px;
    accent-color: var(--accent-gold);
}

.task-xp {
    font-family: var(--font-header);
    font-size: 0.7rem;
    color: var(--accent-gold);
    font-weight: 700;
}

.add-task-form {
    display: flex;
    gap: 6px;
    margin-top: 5px;
}

.add-task-form input {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.75rem;
}

.add-task-form input[type="text"] {
    flex-grow: 1;
}

.add-task-form input[type="number"] {
    width: 65px;
}

/* Boss Battle Section */
.boss-battle-section {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.boss-battle-section h3 {
    font-size: 1rem;
    color: #ef4444;
    margin-bottom: 12px;
    font-family: var(--font-header);
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.3);
}

.boss-card {
    background: var(--bg-panel);
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.boss-icon {
    font-size: 3rem;
    animation: bossPulse 2s infinite ease-in-out;
}

.boss-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.boss-health-bar {
    width: 100%;
    height: 12px;
    background: #000;
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 6px;
    overflow: hidden;
}

.boss-health-fill {
    height: 100%;
    background: linear-gradient(90deg, #b91c1c, #ef4444);
    width: 100%;
    transition: width 0.5s ease-out;
}

/* Form Styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-group input, .form-group select {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 4px;
    padding: 10px;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 5px rgba(14, 165, 233, 0.3);
}

.form-group small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes modalSlideUp {
    from {
        transform: translateY(15px);
        opacity: 0.9;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}



/* Moodle Sync Panel Customizations */
.moodle-sync {
    border: 1px dashed var(--accent-blue);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.05);
}
.moodle-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 2px 7px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    line-height: 1.2;
}
.moodle-sync .form-group input {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
}
.moodle-sync .form-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 5px rgba(14, 165, 233, 0.4);
}
#btn-moodle-sync {
    margin-top: 10px;
}
#moodle-sync-status {
    line-height: 1.4;
}

/* CheeseFork Import Panel Customizations */
.cheesefork-import {
    border: 1px dashed var(--accent-gold);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.05);
}
.cheesefork-import .form-group input {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
}
.cheesefork-import .form-group input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 5px rgba(251, 191, 36, 0.4);
}
#btn-cheesefork-import {
    margin-top: 10px;
    background-color: var(--accent-gold);
    color: #000;
    border: none;
    font-weight: bold;
}
#btn-cheesefork-import:hover {
    background-color: #f59e0b;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}
#cheesefork-import-status {
    line-height: 1.4;
}

/* Course Card Quick Actions */
.course-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.course-card:hover .course-card-actions {
    opacity: 1;
    pointer-events: auto;
}
.card-sem-select {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 4px;
    font-size: 0.6rem;
    padding: 1px 3px;
    font-family: inherit;
    cursor: pointer;
    max-width: 75px;
}
.card-sem-select:focus {
    border-color: var(--accent-blue);
    outline: none;
}
.btn-card-action {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.6;
}
.btn-card-action:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}
.btn-complete.is-completed {
    opacity: 1;
    color: var(--color-mastered);
    filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.4));
}
.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Course Settings Dropdown */
.settings-trigger:hover {
    color: var(--text-light) !important;
}
.settings-dropdown button {
    transition: background 0.15s ease;
}
.settings-dropdown button:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Notion-Style Questline */
.questline-container {
    position: relative;
    padding-right: 20px; /* in RTL, timeline line on the right side of cards */
    border-right: 2px solid var(--border-color);
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.quest-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.2s ease;
}
.quest-row:hover {
    border-color: var(--accent-blue);
    transform: translateX(-2px); /* RTL slide left slightly */
}
/* Timeline dot */
.quest-row::before {
    content: "";
    position: absolute;
    right: -27px; /* align exactly with the container border */
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid var(--bg-deep);
    transition: all 0.2s ease;
}
.quest-row.done::before {
    background: var(--color-mastered);
    box-shadow: 0 0 8px var(--color-mastered);
}
.quest-row.in-progress::before {
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
}
/* Quest fields */
.quest-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.quest-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.quest-title {
    font-size: 0.9rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.quest-date-picker {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
    color-scheme: dark; /* makes date picker calendar popups render nicely in dark theme */
}
.quest-date-picker:hover {
    border-color: var(--border-color);
    background: var(--bg-deep);
}
/* Notion status badge select */
.quest-status-select {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.quest-status-select.not-started {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
.quest-status-select.in-progress {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
.quest-status-select.done {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
.quest-status-select.late {
    background: rgba(220, 38, 38, 0.25);
    color: #ef4444;
}
.quest-xp {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: bold;
    flex-shrink: 0;
}
.btn-delete-quest {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    line-height: 1;
}
.btn-delete-quest:hover {
    opacity: 1;
    color: #ef4444;
}



/* ==========================================================================
   Notion-Style Tasks Dashboard & Side Peek Styles
   ========================================================================== */

/* Navigation Tabs */
.hud-nav-tabs {
    display: flex;
    gap: 10px;
    margin: 15px auto;
    width: 95%;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.nav-tab {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 6px 6px 0 0;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-tab:hover {
    color: var(--text-light);
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--accent-blue);
}
.nav-tab.active {
    color: var(--accent-blue);
    background: var(--bg-panel);
    border-color: var(--accent-blue);
    border-bottom-color: var(--bg-panel);
    font-weight: bold;
    box-shadow: 0 -2px 8px rgba(14, 165, 233, 0.2);
}

/* Notion Tasks View */
.notion-tasks-container {
    width: 95%;
    margin: 15px auto 40px auto;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.notion-tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.notion-tasks-header h2 {
    font-family: var(--font-display);
    color: var(--text-light);
    font-size: 1.5rem;
    margin: 0;
}
.notion-filters-toolbar {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}
.filter-group select {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}
.filter-group select:focus {
    border-color: var(--accent-blue);
}
.filter-group.search input {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    width: 180px;
    transition: all 0.2s;
}
.filter-group.search input:focus {
    border-color: var(--accent-blue);
    width: 220px;
}

/* Notion Table Styling */
.notion-table-wrapper {
    overflow-x: auto;
}
.notion-tasks-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-family: var(--font-body);
    font-size: 0.9rem;
}
.notion-tasks-table th, 
.notion-tasks-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.notion-tasks-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    background: #0f172a;
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}
.notion-tasks-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.notion-tasks-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.5);
}
.notion-tasks-table input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
}

/* Notion-style Status Pills */
.notion-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    cursor: pointer;
    border: 1px solid transparent;
    user-select: none;
}
.notion-status-pill.not_started {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}
.notion-status-pill.in_progress {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}
.notion-status-pill.submitted {
    background: rgba(14, 165, 233, 0.1);
    color: #38bdf8;
    border-color: rgba(14, 165, 233, 0.2);
}
.notion-status-pill.done {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}
.notion-status-pill.late {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.2);
}

/* Due Date Time Remaining Styling */
.time-remaining {
    font-size: 0.8rem;
    font-weight: 500;
}
.time-remaining.completed {
    color: #34d399;
}
.time-remaining.late {
    color: #fb7185;
    font-weight: bold;
}
.time-remaining.warning {
    color: #fbbf24;
}
.time-remaining.normal {
    color: var(--text-muted);
}

/* Notion Course and Type label tags */
.notion-course-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.notion-course-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex-shrink: 0;
    line-height: 1;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.notion-course-icon:hover {
    transform: scale(1.22);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}
.notion-course-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    transition: transform 0.15s ease;
}

/* Notion Task Badges (WebWork WWW, HW, Lab, Project, Exam) */
.notion-task-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.73rem;
    font-weight: 700;
    line-height: 1.2;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.notion-task-badge .badge-icon {
    font-size: 0.84rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.notion-task-badge.webwork {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}
.notion-task-badge.webwork .badge-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 900;
    letter-spacing: 0.6px;
    color: #38bdf8;
}
.notion-task-badge.hw {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.notion-task-badge.exam {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.notion-task-badge.exam.done {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
}
.notion-task-badge.lab {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.notion-task-badge.project {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.notion-task-badge.general {
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.notion-type-tag {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}
.notion-type-tag.hw {
    background: rgba(16, 185, 129, 0.05);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.15);
}
.notion-type-tag.project {
    background: rgba(245, 158, 11, 0.05);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.15);
}
.notion-type-tag.exam {
    background: rgba(239, 68, 68, 0.05);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.15);
}

/* Notion Slide-in Side Peek Panel */
.task-side-peek {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    width: 500px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    box-shadow: 8px 0 32px rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
    will-change: transform;
    visibility: hidden;
    pointer-events: none;
}
.task-side-peek.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}
.peek-cover {
    display: none !important;
}
.peek-content {
    padding: 20px 24px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: right;
    position: relative;
}
.peek-close-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 1.4rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.2s, border-color 0.2s;
    z-index: 10;
}
.peek-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
}
.peek-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.peek-icon {
    font-size: 2.2rem;
    line-height: 1;
}
.peek-title-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1.8rem;
    font-weight: 700;
    width: 100%;
    outline: none;
    padding: 4px 0;
    transition: border-bottom-color 0.2s;
}
.peek-title-input:focus {
    border-bottom-color: var(--accent-blue);
}

/* Properties list styling inside side peek */
.peek-properties {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.peek-property-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    font-size: 0.9rem;
}
.peek-property-label {
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.peek-property-value {
    color: var(--text-light);
    font-weight: 600;
}
.peek-date-input,
.peek-status-select,
.peek-grade-input {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.peek-date-input:focus,
.peek-status-select:focus,
.peek-grade-input:focus {
    border-color: var(--accent-blue);
}
.peek-separator {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 10px 0;
}

/* Comments Section */
.peek-comments-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}
.peek-comments-section h3 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}
.peek-comments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.2);
    padding: 10px;
}
.peek-comment-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(30, 41, 59, 0.4);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.02);
}
.peek-comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.peek-comment-text {
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: pre-wrap;
    line-height: 1.4;
}
.peek-comment-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.peek-comment-input-row textarea {
    flex-grow: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    resize: none;
    height: 40px;
    transition: height 0.2s;
}
.peek-comment-input-row textarea:focus {
    border-color: var(--accent-blue);
    height: 60px;
}

/* Background Overlay for Side Peek */
.peek-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.peek-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   Notion Status Dropdown Menu & Inline Table Controls
   ========================================================================== */

.notion-status-dropdown-menu {
    position: fixed;
    z-index: 9999;
    width: 190px;
    max-height: 300px;
    overflow-y: auto;
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.7), 0 6px 12px rgba(0,0,0,0.5);
    padding: 6px 0;
    display: none;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #e3e3e3;
    animation: fadeInDropdown 0.12s ease-out;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.notion-dropdown-search-wrapper {
    padding: 6px 10px 8px 10px;
    border-bottom: 1px solid #2f2f2f;
}

.notion-dropdown-search {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #3f3f3f;
    border-radius: 4px;
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 8px;
    outline: none;
    box-sizing: border-box;
}

.notion-dropdown-search:focus {
    border-color: var(--accent-blue);
}

.notion-dropdown-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #878787;
    padding: 8px 12px 4px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notion-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.notion-dropdown-item:hover {
    background: #2c2c2c;
}

.notion-dropdown-item.selected {
    background: #333333;
}

.notion-dropdown-footer {
    border-top: 1px solid #2f2f2f;
    margin-top: 4px;
    padding-top: 4px;
}

.notion-dropdown-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    color: #9b9b9b;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.notion-dropdown-action:hover {
    background: #2c2c2c;
    color: #fff;
}

/* Open Peek button on row hover */
.notion-open-peek-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #2b2b2b;
    border: 1px solid #444;
    color: #aaa;
    border-radius: 4px;
    font-size: 0.7rem;
    padding: 2px 6px;
    margin-right: 8px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.notion-tasks-table tbody tr:hover .notion-open-peek-btn {
    opacity: 1;
}

.notion-open-peek-btn:hover {
    background: #3a3a3a;
    color: #fff;
    border-color: var(--accent-blue);
}

/* Inline date picker in table */
.notion-table-date-cell {
    position: relative;
    cursor: pointer;
}

.notion-inline-date-input {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.85rem;
    border-radius: 4px;
    padding: 2px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notion-inline-date-input:hover,
.notion-inline-date-input:focus {
    background: var(--bg-dark);
    border-color: var(--accent-blue);
}

.notion-title-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notion-title-editable {
    outline: none;
    border-bottom: 1px solid transparent;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s;
}

.notion-title-editable:focus {
    background: rgba(0,0,0,0.4);
    border-bottom-color: var(--accent-blue);
}

/* Notion Filter Popover */
.notion-filter-pill-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notion-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notion-filter-btn:hover,
.notion-filter-btn.active {
    border-color: var(--accent-blue);
    background: rgba(14, 165, 233, 0.1);
}

.notion-filter-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 3000;
    width: 230px;
    background: #1e1e1e;
    border: 1px solid #383838;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.6), 0 10px 10px rgba(0,0,0,0.4);
    padding: 8px 0;
    display: none;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #e3e3e3;
    animation: fadeInDropdown 0.12s ease-out;
}

.notion-filter-popover.show {
    display: flex;
}

.notion-filter-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px 8px 12px;
    color: #8c8c8c;
    font-size: 0.8rem;
    border-bottom: 1px solid #2d2d2d;
    user-select: none;
}

.notion-filter-popover-header strong {
    color: #dfdfdf;
}

.notion-filter-popover-body {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    max-height: 280px;
    overflow-y: auto;
}

.notion-filter-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    color: #9e9e9e;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.notion-filter-group-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notion-filter-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 30px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.notion-filter-item-row.flat {
    padding: 7px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 6px;
    margin: 1px 4px;
}

.notion-filter-item-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notion-filter-cb {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #2383e2;
}

.notion-filter-popover-footer {
    border-top: 1px solid #2d2d2d;
    padding: 6px 12px 2px 12px;
}

.notion-filter-clear-btn {
    background: transparent;
    border: none;
    color: #8c8c8c;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 0;
    text-align: right;
    width: 100%;
    transition: color 0.15s;
}

.notion-filter-clear-btn:hover {
    color: #e5e5e5;
    text-decoration: underline;
}


/* ==========================================================================
   Star Wars Jedi Radial Constellation Skill Tree Styles (SVG-Native Engine)
   ========================================================================== */

.view-mode-toggles {
    display: flex;
    gap: 8px;
}

.btn-mode {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: all 0.2s ease;
    font-size: 0.8rem;
    padding: 6px 12px;
}

.btn-mode.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}

.constellation-viewport {
    position: relative;
    width: 100%;
    height: 750px;
    background: radial-gradient(circle at 50% 85%, #151a26 0%, #0a0d14 65%, #040508 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.8), 0 12px 36px rgba(0,0,0,0.5);
    overflow: hidden;
    user-select: none;
}

.constellation-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Watermark background radial text */
.constellation-watermark-text {
    font-family: var(--font-display);
    font-size: 7.5rem;
    font-weight: 900;
    letter-spacing: 18px;
    fill: rgba(255, 255, 255, 0.02);
    text-anchor: middle;
    pointer-events: none;
}

.constellation-sector-label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    fill: rgba(255, 255, 255, 0.45);
    text-anchor: middle;
    text-shadow: 0 0 12px rgba(255,255,255,0.2);
    pointer-events: none;
}

/* Skill Inspector Card */
.skill-inspector-card {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: rgba(10, 14, 24, 0.88);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.85), inset 0 0 15px rgba(56, 189, 248, 0.06);
    z-index: 40;
    text-align: right;
    transition: all 0.25s ease;
    pointer-events: auto;
}

.skill-inspector-card.collapsed {
    transform: translateX(-280px);
    opacity: 0;
    pointer-events: none;
}

.inspector-toggle-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 51;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.inspector-toggle-btn:hover {
    background: var(--accent-blue);
    color: #fff;
}

/* Concentric Semester Ring Guides */
.semester-orbit-arc {
    stroke: rgba(56, 189, 248, 0.12);
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 6 6;
    transition: stroke 0.3s;
}

.semester-orbit-arc.highlighted {
    stroke: rgba(56, 189, 248, 0.5);
    stroke-width: 2.5;
    stroke-dasharray: none;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.semester-orbit-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    fill: rgba(56, 189, 248, 0.65);
    letter-spacing: 0.5px;
    user-select: none;
    pointer-events: none;
}

.inspector-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}

.inspector-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.inspector-tier {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.inspector-domain {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
}

.inspector-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    color: #cbd5e1;
    margin: 0 0 12px 0;
    white-space: pre-line;
}

.inspector-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
}

.inspector-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inspector-stat .lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.inspector-stat .val {
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
}

/* Bottom Skill Points HUD */
.constellation-bottom-hud {
    position: absolute;
    top: 20px;
    right: 25px;
    text-align: right;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    pointer-events: none;
    background: rgba(10, 14, 24, 0.7);
    backdrop-filter: blur(12px);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.skill-points-num {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 900;
    color: #f59e0b;
    text-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
    line-height: 1;
}

.skill-points-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #94a3b8;
    text-transform: uppercase;
}

.constellation-xp-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.constellation-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
    transition: width 0.4s ease;
}

/* SVG Node Group Styles */
.constellation-node-group {
    cursor: pointer;
}

.constellation-node-group .node-body,
.constellation-node-group .node-outer-ring,
.constellation-node-group .node-icon-svg {
    transition: all 0.2s ease-out;
}

.constellation-node-group.locked .node-body {
    fill: #11151f;
    stroke: #252c3d;
    stroke-width: 2;
    opacity: 0.5;
}

.constellation-node-group.available .node-body {
    fill: #182234;
    stroke: #94a3b8;
    stroke-width: 2.2;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
}

.constellation-node-group.active .node-body {
    fill: #09263f;
    stroke: #0ea5e9;
    stroke-width: 2.5;
    filter: drop-shadow(0 0 12px rgba(14, 165, 233, 0.7));
}

.constellation-node-group.mastered .node-body {
    fill: #043828;
    stroke: #10b981;
    stroke-width: 2.5;
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.7));
}

.constellation-node-group:hover .node-body,
.constellation-node-group.selected .node-body {
    r: 25;
    filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.9));
}

.constellation-node-group .node-outer-ring {
    stroke: transparent;
    stroke-width: 1.5;
    transition: stroke 0.2s, stroke-dasharray 0.2s, r 0.2s;
}

.constellation-node-group.active .node-outer-ring {
    stroke: rgba(14, 165, 233, 0.5);
    stroke-dasharray: 4 3;
    animation: ringSpin 12s linear infinite;
}

.constellation-node-group:hover .node-outer-ring,
.constellation-node-group.selected .node-outer-ring {
    r: 30;
    stroke: #38bdf8;
    stroke-dasharray: 5 3;
    animation: ringSpin 8s linear infinite;
}

.constellation-node-group .node-icon-svg {
    font-size: 15px;
    fill: #fff;
    user-select: none;
    pointer-events: none;
}

.constellation-node-group:hover .node-icon-svg,
.constellation-node-group.selected .node-icon-svg {
    font-size: 17px;
}

.constellation-node-group.locked .node-icon-svg {
    opacity: 0.35;
}

.constellation-node-group .node-label-svg {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    fill: #94a3b8;
    user-select: none;
    pointer-events: none;
    transition: fill 0.2s, font-size 0.2s;
}

.constellation-node-group:hover .node-label-svg,
.constellation-node-group.selected .node-label-svg {
    fill: #ffffff;
    font-weight: 700;
    font-size: 11px;
}

@keyframes ringSpin {
    from { transform: rotate(0deg); transform-origin: center; }
    to { transform: rotate(360deg); transform-origin: center; }
}

/* Constellation Beam Connections */
.constellation-beam {
    stroke-linecap: round;
    transition: stroke 0.3s, stroke-width 0.3s;
}

.constellation-beam.mastered {
    stroke: url(#beam-grad-mastered);
    stroke-width: 3;
    filter: drop-shadow(0 0 5px rgba(52, 211, 153, 0.6));
}

.constellation-beam.active {
    stroke: url(#beam-grad-active);
    stroke-width: 2.5;
    stroke-dasharray: 6 4;
    animation: beamDashAnimation 1.2s linear infinite;
}

.constellation-beam.locked {
    stroke: #222938;
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
    opacity: 0.45;
}

.constellation-beam.highlighted {
    stroke: #ffffff !important;
    stroke-width: 4 !important;
    filter: drop-shadow(0 0 10px #ffffff) !important;
    stroke-dasharray: none !important;
}

@keyframes beamDashAnimation {
    from { stroke-dashoffset: 20; }
    to { stroke-dashoffset: 0; }
}


/* ==========================================================================
   Cheesefork-Style Study Runway Component
   ========================================================================== */
.study-runway-card {
    background: #15192c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.study-runway-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
    opacity: 0.8;
}

.study-runway-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.study-runway-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.study-runway-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.study-runway-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
}

.legend-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.legend-badge.green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.legend-badge.yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.legend-badge.red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.study-runway-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.runway-moed-filters {
    display: flex;
    background: #0d1120;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.runway-btn-filter {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s ease;
}

.runway-btn-filter:hover {
    color: #fff;
}

.runway-btn-filter.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 1px 6px rgba(37, 99, 235, 0.4);
}

.runway-term-end-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.runway-term-end-picker input[type="date"] {
    background: #0d1120;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-family: inherit;
}

.study-runway-scroll-wrapper {
    overflow-x: auto;
    padding: 8px 4px 14px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}

.study-runway-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}
.study-runway-scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 4px;
}

.study-runway-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    min-height: 85px;
}

/* Runway Cards */
.runway-node-card {
    background: #1e243d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 140px;
    max-width: 190px;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.runway-node-card:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
    background: #252d4d;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.3);
}

.runway-node-card.term-end {
    background: #11162b;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    cursor: default;
    min-width: 110px;
}
.runway-node-card.term-end:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.runway-node-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.runway-node-date {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.runway-node-moed-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    margin-left: 4px;
}

/* Runway Gap Pill & Connector */
.runway-gap-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    flex-shrink: 0;
    position: relative;
    min-width: 80px;
}

.runway-gap-pill {
    padding: 4px 12px;
    border-radius: 18px;
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    min-width: 44px;
    transition: transform 0.2s ease;
}

.runway-gap-pill:hover {
    transform: scale(1.08);
}

.runway-gap-pill.green {
    background: #102e26;
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.45);
}

.runway-gap-pill.yellow {
    background: #332712;
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.45);
}

.runway-gap-pill.red {
    background: #35151c;
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.45);
}

.runway-gap-label {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.6px;
    margin-top: 4px;
    text-transform: uppercase;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 2px;
    width: 100%;
    text-align: center;
}


/* ==========================================================================
   Mermaid-Style Flowchart DAG Viewport
   ========================================================================== */
.flowchart-viewport {
    position: relative;
    width: 100%;
    height: 850px;
    background: #0d111d;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.flowchart-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: rgba(13, 17, 29, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 10;
}

.flowchart-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.flowchart-scroll-wrapper {
    flex: 1;
    overflow: auto;
    position: relative;
    direction: ltr;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}

.flowchart-svg {
    display: block;
    width: 100%;
    min-width: 1560px;
    height: 1380px;
    background: radial-gradient(circle at 50% 15%, rgba(30, 41, 69, 0.4) 0%, #0a0d17 100%);
}

/* Semester Bands in SVG */
.fc-semester-band {
    fill: rgba(255, 255, 255, 0.015);
}
.fc-semester-band.alt {
    fill: rgba(0, 0, 0, 0.15);
}
.fc-semester-divider {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}
.fc-semester-col-divider {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
}
.fc-semester-badge-rect {
    fill: #111827;
    stroke: rgba(56, 189, 248, 0.3);
    stroke-width: 1.2;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.fc-sem-year {
    fill: #f1f5f9;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Assistant', 'Rubik', 'Segoe UI', system-ui, sans-serif;
    pointer-events: none;
}
.fc-sem-term {
    fill: #38bdf8;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Assistant', 'Rubik', 'Segoe UI', system-ui, sans-serif;
    pointer-events: none;
}
.fc-semester-label {
    fill: #64748b;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.5px;
}

/* Semester Row Add Course Button in Flowchart */
.fc-sem-add-btn {
    cursor: pointer;
    transition: transform 0.15s ease;
}
.fc-sem-add-btn:hover {
    transform: scale(1.03);
}
.fc-sem-add-rect {
    fill: rgba(2, 132, 199, 0.12);
    stroke: rgba(56, 189, 248, 0.35);
    stroke-width: 1.2;
    rx: 6;
    ry: 6;
    transition: all 0.2s ease;
}
.fc-sem-add-btn:hover .fc-sem-add-rect {
    fill: rgba(2, 132, 199, 0.32);
    stroke: #38bdf8;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}
.fc-sem-add-text {
    fill: #38bdf8;
    font-size: 11.5px;
    font-weight: 700;
    pointer-events: none;
    font-family: 'Assistant', 'Rubik', 'Segoe UI', system-ui, sans-serif;
}
.fc-sem-add-btn:hover .fc-sem-add-text {
    fill: #ffffff;
}

/* Flowchart Nodes (Rectangles like Mermaid) */
.fc-node-group {
    cursor: pointer;
    transition: transform 0.18s ease;
}

.fc-node-rect {
    fill: #161c2e;
    stroke: #334155;
    stroke-width: 1.5;
    rx: 6;
    ry: 6;
    transition: all 0.2s ease;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.fc-node-group:hover .fc-node-rect {
    stroke: #38bdf8;
    stroke-width: 2.2;
    fill: #1e263d;
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.45));
}

.fc-node-group.mastered .fc-node-rect {
    stroke: #10b981;
    fill: #102422;
}
.fc-node-group.mastered:hover .fc-node-rect {
    stroke: #34d399;
    fill: #15332f;
    filter: drop-shadow(0 0 14px rgba(52, 211, 153, 0.5));
}

.fc-node-group.active .fc-node-rect {
    stroke: #38bdf8;
    fill: #132438;
}

.fc-node-group.available .fc-node-rect {
    stroke: #0284c7;
    stroke-dasharray: 4 3;
}

.fc-node-group.locked .fc-node-rect {
    stroke: #334155;
    fill: #111420;
    opacity: 0.75;
}

/* Node Text (Standard Unicode BiDi rendering for iOS Safari, WebKit, and Blink) */
.fc-node-title {
    fill: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Assistant', 'Rubik', 'Segoe UI', system-ui, sans-serif;
    pointer-events: none;
    letter-spacing: 0;
    text-anchor: middle !important;
    direction: rtl !important;
    unicode-bidi: isolate !important;
    white-space: nowrap !important;
}

.fc-node-sub, .fc-node-badge {
    direction: rtl !important;
    unicode-bidi: isolate !important;
    text-anchor: middle !important;
    white-space: nowrap !important;
}

.fc-node-title.multi-line {
    font-size: 11.5px;
}

.fc-node-sub {
    fill: #94a3b8;
    font-size: 10.5px;
    font-weight: 500;
    font-family: 'Assistant', 'Rubik', 'Segoe UI', system-ui, sans-serif;
    pointer-events: none;
    letter-spacing: 0;
    text-anchor: middle;
}

.fc-node-badge {
    font-size: 10.5px;
    font-weight: 600;
    font-family: 'Assistant', 'Rubik', 'Segoe UI', system-ui, sans-serif;
    pointer-events: none;
    letter-spacing: 0;
    text-anchor: middle;
}
.fc-node-group.mastered .fc-node-badge { fill: #34d399; }
.fc-node-group.active .fc-node-badge { fill: #38bdf8; }
.fc-node-group.available .fc-node-badge { fill: #7dd3fc; }
.fc-node-group.locked .fc-node-badge { fill: #64748b; }

/* Flowchart Directed Beams / Arrows */
.fc-beam {
    fill: none;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: stroke 0.2s ease, stroke-width 0.2s ease;
}

.fc-beam.mastered {
    stroke: #10b981;
    stroke-width: 2.2;
}

.fc-beam.active {
    stroke: #38bdf8;
    stroke-width: 2;
    stroke-dasharray: 5 4;
}

.fc-beam.locked {
    stroke: #334155;
    stroke-width: 1.3;
    opacity: 0.6;
}

.fc-beam.highlighted {
    stroke: #38bdf8 !important;
    stroke-width: 3.5 !important;
    stroke-dasharray: none !important;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.85));
    opacity: 1 !important;
}


/* ==========================================================================
   Finals Mode & Google Calendar-Style Daily Past Exams Grid
   ========================================================================== */
.finals-tab-btn {
    margin-right: auto;
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    color: #f87171 !important;
    font-weight: 700 !important;
    transition: all 0.2s ease;
}

.finals-tab-btn:hover, .finals-tab-btn.active {
    background: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.5) !important;
}

/* Finals Active Banner */
.finals-mode-active-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(185, 28, 28, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 18px;
}

.finals-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.finals-fire-icon {
    font-size: 1.6rem;
    animation: pulse 1.5s infinite alternate;
}

.finals-banner-content strong {
    color: #fca5a5;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 2px;
}

.finals-banner-content p {
    margin: 0;
    font-size: 0.78rem;
    color: #cbd5e1;
}

/* Runway View Sub-Toggle */
.runway-subview-toggle {
    display: flex;
    background: #0d1120;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.runway-view-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s ease;
}

.runway-view-btn.active {
    background: #38bdf8;
    color: #0b0f19;
    font-weight: 700;
}

/* Calendar Container */
.finals-calendar-container {
    padding-top: 10px;
}

.finals-calendar-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cal-nav-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-month-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cal-nav-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-nav-btns-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    direction: ltr;
}

.cal-current-month {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    min-width: 135px;
    text-align: right;
}

/* 6-Column Calendar Grid (Sunday - Friday, excluding Saturday) */
.finals-calendar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.finals-calendar-grid.is-week-view {
    grid-template-columns: repeat(6, 1fr);
}

.finals-calendar-grid.is-week-view .cal-day-cell {
    min-height: 480px;
    padding: 10px 8px;
}

.cal-view-mode-toggle {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.6);
}

.cal-view-mode-toggle button {
    border: none !important;
    border-radius: 0 !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    color: #94a3b8 !important;
    background: transparent !important;
    cursor: pointer;
    transition: all 0.18s ease;
}

.cal-view-mode-toggle button.active {
    background: #38bdf8 !important;
    color: #0b0f19 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.cal-event-time-badge {
    display: inline-block;
    padding: 1px 4px;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    margin-left: 3px;
    direction: ltr;
    font-family: monospace;
}

.day-modal-event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.82rem;
    color: #e2e8f0;
    transition: background 0.15s ease;
}

.day-modal-event-item:hover {
    background: rgba(30, 41, 59, 1);
    border-color: rgba(56, 189, 248, 0.25);
}

.day-modal-event-time-tag {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: monospace;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    direction: ltr;
}

.btn-del-modal-event {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.btn-del-modal-event:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
}

.cal-day-header {
    background: #0d1120;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    padding: 8px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cal-day-cell {
    background: #13182b;
    min-height: 110px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.18s ease;
    position: relative !important;
    overflow: hidden !important;
}

.cal-day-cell:hover {
    background: #181f38;
}

.cal-day-cell.other-month {
    background: #0d111e;
    opacity: 0.45;
}

.cal-day-cell.has-exam {
    background: rgba(239, 68, 68, 0.05);
    border-left: 2px solid #ef4444;
}

.cal-day-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cal-day-cell:hover .cal-day-num {
    color: #e2e8f0;
}

.btn-add-day-item {
    position: absolute !important;
    bottom: 3px !important;
    left: 3px !important;
    width: 19px !important;
    height: 19px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    color: #38bdf8 !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 0 !important;
    border-radius: 4px !important;
    line-height: 1 !important;
    z-index: 5 !important;
    opacity: 0.7 !important;
    transition: all 0.2s ease !important;
}
.cal-day-cell:hover .btn-add-day-item,
.cal-day-cell.is-today .btn-add-day-item {
    opacity: 1 !important;
    display: inline-flex !important;
}
.btn-add-day-item:hover {
    color: #0b0f19 !important;
    background: #38bdf8 !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5) !important;
    opacity: 1 !important;
}

/* Event Items in Calendar */
.cal-event-pill {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

/* Official Exam Event (Red dot / crimson for upcoming, Green for passed) */
.cal-event-pill.exam-event {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.5);
    font-weight: 700;
}
.cal-event-pill.exam-event:hover {
    background: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* Exam that has passed or was completed -> Green */
.cal-event-pill.exam-event.passed,
.cal-event-pill.exam-event.completed {
    background: rgba(16, 185, 129, 0.22) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.55) !important;
    font-weight: 700 !important;
}
.cal-event-pill.exam-event.passed:hover,
.cal-event-pill.exam-event.completed:hover {
    background: rgba(16, 185, 129, 0.38) !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4) !important;
}

.cal-day-cell.has-past-exam {
    background: rgba(16, 185, 129, 0.05) !important;
    border-left: 2px solid #10b981 !important;
}

/* Past Exam Marathon Task (Grey pill with checkmark) */
.cal-event-pill.past-exam {
    background: #1f2742;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.cal-event-pill.past-exam:hover {
    background: #273153;
    border-color: #38bdf8;
}

.cal-event-pill.past-exam.completed {
    text-decoration: none;
    opacity: 0.9;
    background: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.cal-event-cb {
    font-size: 0.72rem;
    flex-shrink: 0;
}

/* Personal Calendar Event (Blue pill matching Google Calendar) */
.cal-event-pill.personal-event {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 0.68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
    transition: all 0.15s ease;
}
.cal-event-pill.personal-event:hover {
    background: rgba(59, 130, 246, 0.3);
}
.cal-event-pill.personal-event.done {
    opacity: 0.55;
    text-decoration: line-through;
}

/* Technion Academic Events & Official Holidays */
.cal-event-pill.technion-event {
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 0.69rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: block;
}

.cal-event-pill.technion-event.holiday-event {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.18));
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.45);
}
.cal-event-pill.technion-event.holiday-event:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.28));
    border-color: rgba(245, 158, 11, 0.7);
    color: #fef08a;
    transform: translateY(-1px);
}

.cal-event-pill.technion-event.academic-event {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(126, 34, 206, 0.18));
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.45);
}
.cal-event-pill.technion-event.academic-event:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(126, 34, 206, 0.28));
    border-color: rgba(168, 85, 247, 0.7);
    color: #f3e8ff;
    transform: translateY(-1px);
}

.cal-day-cell.has-holiday {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 70%), #15192c;
    border-color: rgba(245, 158, 11, 0.25);
}
.cal-day-cell.has-academic-milestone {
    background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.10), transparent 70%), #15192c;
    border-color: rgba(168, 85, 247, 0.25);
}

#cal-nav-today:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #38bdf8;
}

/* Finals Calendar Card (Direct Calendar without Runway Track) */
.finals-calendar-card {
    background: #15192c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 24px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.finals-calendar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #ef4444);
    opacity: 0.9;
}

.finals-calendar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-subtitle {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.cal-legend-bar {
    display: none;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.74rem;
    color: #94a3b8;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: rgba(13, 17, 32, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.cal-legend-bar.is-open {
    display: flex !important;
}

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

.cal-legend-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.cal-legend-item .dot-exam {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.cal-legend-item .dot-pe-active {
    background: #38bdf8;
}

.cal-legend-item .dot-pe-done {
    background: #10b981;
}

.cal-hint-text {
    margin-right: auto;
    font-size: 0.7rem;
    color: #64748b;
}


/* ==========================================================================
   Finals Mode Toggle Switch UI
   ========================================================================== */
.hud-nav-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px auto;
    width: 95%;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    flex-shrink: 0;
}

.nav-tabs-left {
    display: flex;
    gap: 10px;
}

/* 2. Finals Mode Switch (Put to sleep / dormant per user request) */
.finals-switch-control,
#finals-switch-control {
    display: none !important;
    align-items: center;
    gap: 14px;
    background: rgba(21, 25, 44, 0.85);
    padding: 6px 14px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
}

.finals-switch-control:hover {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}

.finals-switch-info {
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.finals-switch-icon {
    font-size: 1.15rem;
    animation: flamePulse 2s infinite ease-in-out;
}

@keyframes flamePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px #f59e0b); }
    50% { transform: scale(1.12); filter: drop-shadow(0 0 6px #ef4444); }
}

.finals-switch-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.finals-switch-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.2px;
}

.finals-switch-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s ease;
}

/* Modern Toggle Switch Component */
.finals-toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.finals-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.finals-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 26px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.finals-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #94a3b8;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.finals-toggle-switch input:checked + .finals-toggle-slider {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.finals-toggle-switch input:checked + .finals-toggle-slider:before {
    transform: translateX(22px);
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}


/* ==========================================================================
   Past Exams Manager Modal & Auto-Scheduler Styles
   ========================================================================== */
.modal-content.medium-large {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.pem-course-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.pem-course-tab-btn {
    background: #12172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pem-course-tab-btn:hover {
    color: #f8fafc;
    background: #1a223e;
    border-color: #38bdf8;
}

.pem-course-tab-btn.active {
    background: #1e294d;
    color: #38bdf8;
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.pem-badge-count {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Scheduler Bar */
.pem-scheduler-bar {
    background: #14192d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.pem-sched-inputs {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pem-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #cbd5e1;
}

.pem-input-group input {
    background: #0d1120;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: inherit;
}

.pem-select-year {
    background: #0d1120;
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}
.pem-select-year:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.pem-sched-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Selection Toolbar & Quick Actions */
.pem-selection-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    background: #11172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 8px;
}

.pem-selection-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

#pem-selection-count {
    color: #38bdf8;
    font-weight: 700;
}

.pem-selection-hint {
    color: #94a3b8;
    font-size: 0.76rem;
}

.pem-selection-btns {
    display: flex;
    gap: 6px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.72rem;
    border-radius: 4px;
}

/* Past Exams Matrix Table */
.pem-table-wrapper {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 8px 8px;
    margin-bottom: 16px;
    background: #0f1424;
}

.pem-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.pem-table th {
    background: #151b30;
    color: #94a3b8;
    padding: 10px 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 2;
}

.pem-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    vertical-align: middle;
    transition: opacity 0.15s ease;
}

.pem-exam-check {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #38bdf8;
}

.pem-table tr.unselected td {
    opacity: 0.45;
}

.pem-table tr.unselected:hover td {
    opacity: 0.75;
}

.pem-table tr.selected {
    background: rgba(56, 189, 248, 0.06);
}

.pem-table tr.selected td {
    opacity: 1;
}

.pem-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.pem-solution-tag {
    display: inline-block;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    text-decoration: none;
    font-weight: 600;
}

.pem-date-picker {
    background: #182038;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-family: inherit;
    width: 130px;
}

.pem-status-pill {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.pem-status-pill.done {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.pem-status-pill.scheduled {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.pem-status-pill.unscheduled {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.pem-btn-del {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
.pem-btn-del:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
}

/* Add Custom Exam Row */
.pem-add-custom-row {
    background: #12172b;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px 16px;
}

.pem-add-grid {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pem-add-grid input {
    background: #0d1120;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: inherit;
}

.pem-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding: 14px 20px;
    background: rgba(13, 17, 32, 0.6);
}

.pem-export-buttons {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   Tasks Workspace Subviews: Table vs Calendar & Exam Gap Runway
   ========================================================================== */

.notion-subview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 10px;
}

.notion-subview-tabs {
    display: flex;
    gap: 6px;
    background: #0d1222;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.notion-subview-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 7px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.84rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notion-subview-tab:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.04);
}

.notion-subview-tab.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* Exam Gap Runway Chart (מרווחי ימים בין המבחנים) */
.exam-gap-runway-card {
    background: #0f1424;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    transition: padding 0.2s ease, margin 0.2s ease;
}

.exam-gap-runway-card.is-collapsed,
.exam-gap-runway-card.collapsed-mobile {
    padding: 8px 16px !important;
    margin-bottom: 8px !important;
}

.exam-gap-runway-card.is-collapsed .runway-track,
.exam-gap-runway-card.is-collapsed .runway-subtitle,
.exam-gap-runway-card.collapsed-mobile .runway-track,
.exam-gap-runway-card.collapsed-mobile .runway-subtitle {
    display: none !important;
}

.exam-gap-runway-card.is-collapsed .runway-header,
.exam-gap-runway-card.collapsed-mobile .runway-header {
    margin-bottom: 0 !important;
}

.runway-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.runway-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.runway-subtitle {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.runway-track {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    padding: 6px 4px 12px 4px;
}

.runway-exam-node {
    background: #151b30;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    padding: 10px 14px;
    min-width: 140px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: transform 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
}

.runway-exam-node:hover {
    transform: translateY(-2px);
    border-color: #f59e0b;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25);
}

.runway-exam-node.is-next-exam {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.runway-today-node {
    background: #0d1627;
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 8px;
    padding: 10px 14px;
    min-width: 130px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: transform 0.18s ease;
}

.runway-today-node:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.25);
}

.runway-node-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 4px;
}

.runway-node-badge.today {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.runway-node-badge.next-up {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.25);
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.runway-node-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 3px;
    white-space: nowrap;
}

.runway-node-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 2px;
}

.runway-node-day {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.runway-connector.countdown-to-next .runway-badge {
    background: rgba(245, 158, 11, 0.22);
    border: 1px solid #f59e0b;
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.runway-connector.countdown-to-next .runway-line {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.5), rgba(245, 158, 11, 0.6));
}

.runway-connector {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 90px;
    position: relative;
    padding: 0 4px;
}

.runway-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
}

.runway-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 14px;
    flex-shrink: 0;
    margin: 0 6px;
    font-weight: 700;
}

.runway-connector.urgent .runway-badge {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}
.runway-connector.urgent .runway-line {
    background: rgba(239, 68, 68, 0.35);
}

.runway-connector.moderate .runway-badge {
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}
.runway-connector.moderate .runway-line {
    background: rgba(56, 189, 248, 0.35);
}

.runway-connector.comfortable .runway-badge {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.runway-connector.comfortable .runway-line {
    background: rgba(16, 185, 129, 0.35);
}

.runway-days {
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.runway-pace {
    display: none;
}

/* Task Type Pills in Task Creation Modal */
.task-type-pills-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.task-type-pill {
    background: #11172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
}

.task-type-pill:hover {
    border-color: #38bdf8;
    color: #fff;
    background: rgba(56, 189, 248, 0.08);
}

.task-type-pill.active {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* Calendar Event Pills for Tasks inside Day Cells */
.cal-event-pill.task-event {
    background: rgba(56, 189, 248, 0.12);
    border-right: 3px solid #38bdf8;
    color: #f1f5f9;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.cal-event-pill.task-event:hover {
    background: rgba(56, 189, 248, 0.22);
    transform: translateX(-2px);
}

.cal-event-pill.task-event.done {
    opacity: 0.55;
    text-decoration: line-through;
    border-color: #10b981;
}

.cal-event-pill.task-event.webwork {
    border-right-color: #818cf8;
    background: rgba(129, 140, 248, 0.12);
}

.cal-event-pill.task-event.lab {
    border-right-color: #34d399;
    background: rgba(52, 211, 153, 0.12);
}

.cal-event-pill.task-event.project {
    border-right-color: #c084fc;
    background: rgba(192, 132, 252, 0.12);
}


/* Clean Academic Theme: Hide RPG elements */
.quest-sidebar-xp,
.task-xp,
.quest-xp,
.constellation-xp-progress,
.level-up-splash,
.boss-battle-section,
#peek-property-xp,
.peek-property-label:has(+ #peek-property-xp),
label[for="new-task-xp-input"],
#new-task-xp-input {
    display: none !important;
}

.char-avatar {
    background: rgba(56, 189, 248, 0.15) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    font-size: 1.3rem !important;
}

.xp-bar-fill {
    background: linear-gradient(90deg, #059669, #10b981, #34d399) !important;
}


/* Flowchart Viewport Modes (Fit-to-Width vs Full-Size) */
.flowchart-viewport.fit-width-mode .flowchart-scroll-wrapper {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.flowchart-viewport.fit-width-mode .flowchart-svg {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    vertical-align: top !important;
    margin: 0 auto !important;
}

.flowchart-viewport.full-size-mode .flowchart-scroll-wrapper {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

.flowchart-viewport.full-size-mode .flowchart-svg {
    width: 100% !important;
    min-width: 2028px !important;
    height: 1794px !important;
}

/* Interactive Dimming & Multi-Generational Highlighting */
.flowchart-svg.has-highlight .fc-beam:not(.highlighted) {
    opacity: 0.10 !important;
    stroke-width: 1px !important;
}

.flowchart-svg.has-highlight .fc-node-group:not(.highlighted-node) {
    opacity: 0.28 !important;
    transition: opacity 0.2s ease;
}

/* Selected Target Node */
.fc-node-group.highlighted-target .fc-node-rect {
    stroke: #fbbf24 !important;
    stroke-width: 3.4px !important;
    filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.85)) !important;
}

/* Multi-Generational Ancestor Nodes (Prerequisites Chain Backwards) */
.fc-node-group.highlighted-ancestor .fc-node-rect {
    stroke: #38bdf8 !important;
    stroke-width: 2.8px !important;
    filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.75)) !important;
}

/* Next Generation Child Nodes (Unlocked Dependents Gen +1) */
.fc-node-group.highlighted-child .fc-node-rect {
    stroke: #10b981 !important;
    stroke-width: 2.8px !important;
    filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.8)) !important;
}

/* Ancestor Beams (Prerequisites Flow Backwards) */
.fc-beam.highlighted.highlighted-ancestor {
    stroke: #38bdf8 !important;
    stroke-width: 3.8px !important;
    stroke-dasharray: none !important;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.9)) !important;
    opacity: 1 !important;
}

/* Child Beams (Next Generation Flow Forward) */
.fc-beam.highlighted.highlighted-child {
    stroke: #10b981 !important;
    stroke-width: 3.8px !important;
    stroke-dasharray: 6 3 !important;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.9)) !important;
    opacity: 1 !important;
}

.fc-beam.highlighted:not(.highlighted-ancestor):not(.highlighted-child) {
    stroke: #38bdf8 !important;
    stroke-width: 3.6px !important;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.85)) !important;
    opacity: 1 !important;
}

.fc-node-group.highlighted-node:not(.highlighted-target):not(.highlighted-ancestor):not(.highlighted-child) .fc-node-rect {
    stroke: #38bdf8 !important;
    stroke-width: 2.6 !important;
    filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.6)) !important;
}

/* Modal Prerequisites Interactive Tags & Flow */
.prereq-tag, .prereq-child-tag, .prereq-chain-chip {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.prereq-tag:hover, .prereq-child-tag:hover, .prereq-chain-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.prereq-child-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #34d399;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prereq-chain-chip {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fc-beam {
    stroke-linejoin: round;
    stroke-linecap: round;
}


/* Flowchart Zoom & Panning Styles */
.btn-fc-zoom-step:hover {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
}

#btn-fc-zoom-reset:hover {
    color: #7dd3fc !important;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.flowchart-scroll-wrapper {
    flex: 1;
    overflow: auto;
    position: relative;
    direction: ltr;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
    cursor: grab;
}

.flowchart-scroll-wrapper.panning {
    cursor: grabbing !important;
    user-select: none;
}

.flowchart-svg {
    display: block;
    margin: 0 auto;
    vertical-align: top;
    transform-origin: 50% 0%;
    will-change: transform;
    background: radial-gradient(circle at 50% 15%, rgba(30, 41, 69, 0.4) 0%, #0a0d17 100%);
}

.fc-beam {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;
}

.fc-beam.mastered {
    stroke: #10b981;
    stroke-width: 2.4;
    opacity: 0.85;
}

.fc-beam.active {
    stroke: #38bdf8;
    stroke-width: 2.2;
    stroke-dasharray: 6 4;
    opacity: 0.9;
}

.fc-beam.locked {
    stroke: #475569;
    stroke-width: 1.5;
    opacity: 0.55;
}

.fc-beam.highlighted {
    stroke: #38bdf8 !important;
    stroke-width: 3.8 !important;
    stroke-dasharray: none !important;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.85));
    opacity: 1 !important;
}


/* Strict LTR BiDi enforcement for credit ratios */
#stat-credits, #xp-text, .credits-ratio {
    direction: ltr !important;
    unicode-bidi: isolate !important;
    display: inline-block !important;
}


/* ==========================================================================
   Tasks Reminders Banner & Urgency Notifications (Notion & Calendar Sync)
   ========================================================================== */
.tasks-reminders-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.88) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
}

.tasks-reminders-banner:hover {
    border-color: rgba(56, 189, 248, 0.45);
}

.reminders-banner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.reminders-banner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
}

.reminders-pulse-icon {
    font-size: 1.1rem;
    animation: reminderPulse 2s infinite ease-in-out;
}

@keyframes reminderPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.4)); }
    50% { transform: scale(1.15) rotate(6deg); filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.8)); }
}

.reminders-count-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.45);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 700;
}

.reminders-banner-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-toggle-reminders-collapse {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    transition: background 0.15s, color 0.15s;
}

.btn-toggle-reminders-collapse:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.reminders-banner-body {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.reminders-banner-body.collapsed {
    display: none !important;
}

.reminder-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    will-change: transform;
}

.reminder-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(30, 41, 59, 0.95);
}

.reminder-chip.overdue {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

.reminder-chip.overdue .reminder-urgency-badge {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.reminder-chip.today {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.12);
}

.reminder-chip.today .reminder-urgency-badge {
    background: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.6);
}

.reminder-chip.tomorrow {
    border-color: rgba(234, 179, 8, 0.4);
    background: rgba(234, 179, 8, 0.08);
}

.reminder-chip.tomorrow .reminder-urgency-badge {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.reminder-chip.upcoming {
    border-color: rgba(56, 189, 248, 0.3);
}

.reminder-chip.upcoming .reminder-urgency-badge {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.reminder-chip.no-date {
    border-color: rgba(148, 163, 184, 0.25);
    opacity: 0.85;
}

.reminder-chip.no-date .reminder-urgency-badge {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.reminder-urgency-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.reminder-course-tag {
    font-weight: 700;
    color: #38bdf8;
    white-space: nowrap;
}

.reminder-task-title {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reminder-quick-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.72rem;
    color: transparent;
    transition: all 0.15s ease;
    margin-right: 2px;
}

.reminder-quick-check:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.25);
    color: #10b981;
}

/* In-app Toast Notification */
.ast-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    border: 1px solid rgba(56, 189, 248, 0.5);
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    direction: rtl;
    animation: toastSlideUp 0.25s ease-out;
    pointer-events: none;
}

@keyframes toastSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ==========================================================================
   Semester Badges with Completed GPA & Status Indicators
   ========================================================================== */
.fc-semester-badge-rect {
    fill: rgba(15, 23, 42, 0.85);
    stroke: rgba(255, 255, 255, 0.14);
    stroke-width: 1;
    transition: all 0.2s ease;
}

.fc-semester-badge-rect.completed {
    fill: rgba(15, 23, 42, 0.92);
    stroke: rgba(16, 185, 129, 0.55);
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.2));
}

.fc-sem-gpa-pill {
    fill: rgba(16, 185, 129, 0.18);
    stroke: rgba(16, 185, 129, 0.65);
    stroke-width: 1;
    cursor: default;
}

.fc-sem-gpa-text {
    fill: #34d399;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
    pointer-events: none;
}

.fc-semester-badge-rect.active {
    fill: rgba(15, 23, 42, 0.92);
    stroke: rgba(56, 189, 248, 0.55);
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.2));
}

.fc-sem-status-pill.in-progress {
    fill: rgba(56, 189, 248, 0.16);
    stroke: rgba(56, 189, 248, 0.5);
    stroke-width: 1;
}

.fc-sem-status-text {
    fill: #38bdf8;
    font-size: 10px;
    font-weight: 700;
    pointer-events: none;
}


/* Settings & Revisions Workspace Styling */
#settings-workspace {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    padding: 24px 32px 100px 32px;
    background: #080c14;
}

.settings-container {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.settings-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px 24px;
}

.settings-page-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 4px 0;
}

.settings-page-subtitle {
    font-size: 0.84rem;
    color: #94a3b8;
    margin: 0;
}

.settings-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-card {
    background: #101726;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.settings-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.settings-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
}

.revision-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.rev-stat-item {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rev-stat-label {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 600;
}

.rev-stat-val {
    font-size: 1.15rem;
    color: #38bdf8;
    font-weight: 800;
    font-family: var(--font-header);
}

.revisions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.revision-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #141e33;
    border: 1px solid #24324f;
    border-radius: 8px;
    padding: 14px 18px;
    transition: all 0.2s ease;
}

.revision-item:hover {
    border-color: #38bdf8;
    background: #18253e;
}

.revision-item.current {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.revision-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.revision-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.revision-item-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #f8fafc;
}

.revision-tag {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

.revision-tag.current {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.revision-tag.snapshot {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.5);
}

.revision-item-meta {
    font-size: 0.78rem;
    color: #94a3b8;
}

.revision-item-actions {
    display: flex;
    gap: 8px;
}

.sync-calendars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
}

.sync-cal-box {
    background: #131c30;
    border: 1px solid #202d4a;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sync-cal-box-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #f1f5f9;
}

.sync-cal-code {
    font-size: 0.72rem;
    color: #94a3b8;
    word-break: break-all;
    background: #090e1a;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #1a253e;
}

.academic-goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}


.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.setting-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.setting-hint {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 4px;
}

.setting-cal-input {
    width: 100%;
    font-family: monospace;
    font-size: 0.75rem;
    background: #090e1a;
    border-color: #263554;
}

.setting-cal-input:focus {
    border-color: #38bdf8;
}

/* Section 5: Degree & Data Controls Grid */
.settings-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.settings-control-box {
    background: #131c30;
    border: 1px solid #202d4a;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.2s ease;
}

.settings-control-box:hover {
    border-color: #334155;
    background: #162038;
}

.settings-control-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.settings-control-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid #202d4a;
    flex-shrink: 0;
}

.settings-control-info strong {
    display: block;
    font-size: 0.92rem;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.settings-control-info span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.settings-control-box.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.04);
}

.settings-control-box.danger-zone:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.08);
}

/* ==========================================================================
   Mobile Responsive Styles (Smartphone & PWA Optimization)
   ========================================================================== */
@media (max-width: 768px), screen and (max-device-width: 768px) {
    /* Base Body & Container for Mobile */
    body {
        overflow: hidden !important;
        height: 100vh !important;
        height: 100dvh !important;
        width: 100vw !important;
        padding-bottom: 0 !important;
    }

    .hud-container {
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        width: 100vw !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* Ultra-Sleek Compact Mobile Header */
    /* Mobile Tab Focus: Display Top HUD Header strictly on Curriculum Tree */
    body:not([data-active-tab="curriculum"]) .hud-header {
        display: none !important;
    }

    /* Maximize vertical workspace height on mobile when top header is hidden */
    body:not([data-active-tab="curriculum"]) .hud-workspace {
        padding-top: max(16px, env(safe-area-inset-top, 16px)) !important;
    }

    html.is-iphone body:not([data-active-tab="curriculum"]) .hud-workspace,
    .is-iphone body:not([data-active-tab="curriculum"]) .hud-workspace {
        padding-top: max(env(safe-area-inset-top, 0px), 44px) !important;
    }

    /* Android Native & Capacitor Safe Insets to prevent status bar collision */
    html.is-android-native body:not([data-active-tab="curriculum"]) .hud-workspace,
    body.is-android-native:not([data-active-tab="curriculum"]) .hud-workspace,
    html.is-capacitor body:not([data-active-tab="curriculum"]) .hud-workspace,
    body.is-capacitor:not([data-active-tab="curriculum"]) .hud-workspace {
        padding-top: max(36px, env(safe-area-inset-top, 36px)) !important;
    }

    .hud-header {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        padding: max(12px, env(safe-area-inset-top, 12px)) max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left)) !important;
        height: auto !important;
        min-height: auto !important;
        flex-shrink: 0 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
    }

    /* iPhone Specific Status Bar / Dynamic Island / Notch Inset (Exclusive to iPhone) */
    html.is-iphone .hud-header,
    body.is-iphone .hud-header,
    .is-iphone .hud-header {
        padding-top: max(env(safe-area-inset-top, 0px), 52px) !important;
    }

    /* Android Native & Capacitor Header Inset */
    html.is-android-native .hud-header,
    body.is-android-native .hud-header,
    html.is-capacitor .hud-header,
    body.is-capacitor .hud-header {
        padding-top: max(34px, env(safe-area-inset-top, 34px)) !important;
    }

    @supports (-webkit-touch-callout: none) {
        .hud-header {
            padding-top: max(env(safe-area-inset-top, 0px), 52px) !important;
        }
    }

    .hud-top-right-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 2px 2px 5px 2px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin-bottom: 2px !important;
    }

    .hud-top-right-bar .hud-logo {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .hud-top-right-bar .hud-logo img {
        width: 26px !important;
        height: 26px !important;
    }

    .hud-top-right-bar .degree-title-text {
        font-size: 0.96rem !important;
        line-height: 1.1 !important;
    }

    .hud-top-right-bar .hud-sub-faculty {
        font-size: 0.58rem !important;
    }

    .hud-auth-controls {
        order: -1 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .btn-hud-login-top {
        padding: 6px 14px !important;
        font-size: 0.80rem !important;
        min-height: 36px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    .btn-hud-login-top .login-text {
        max-width: 95px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .btn-hud-user-chip {
        padding: 4px 8px !important;
        font-size: 0.74rem !important;
        gap: 4px !important;
    }

    .btn-hud-user-chip .user-name-text {
        max-width: 70px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .btn-hud-logout {
        padding: 4px 8px !important;
        font-size: 0.72rem !important;
        gap: 3px !important;
    }

    .character-card {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 4px 6px !important;
        gap: 6px !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }

    .char-info {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .btn-hud-bell {
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
    }

    .char-avatar {
        font-size: 1.1rem !important;
        width: 30px !important;
        height: 30px !important;
        margin-left: 4px !important;
        border-radius: 6px !important;
        flex-shrink: 0 !important;
    }

    .char-name-row {
        margin-bottom: 2px !important;
    }

    .char-title {
        font-size: 0.74rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .char-level {
        font-size: 0.68rem !important;
        padding: 1px 6px !important;
        white-space: nowrap !important;
        border-radius: 4px !important;
    }

    .xp-bar-container {
        height: 15px !important;
        border-radius: 8px !important;
    }

    .xp-text {
        font-size: 0.68rem !important;
        font-weight: 700 !important;
    }

    /* Compact 4-Grid HUD Stats */
    .hud-stats {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
        width: 100% !important;
    }

    .stat-item {
        padding: 3px 4px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        min-height: 38px !important;
        min-width: 0 !important;
        border-radius: 6px !important;
    }

    .stat-label {
        font-size: 0.58rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        line-height: 1.1 !important;
    }

    .stat-value {
        font-size: 0.82rem !important;
        line-height: 1.1 !important;
        font-weight: 800 !important;
    }

    .stat-gpa-sub {
        display: none !important;
    }

    .finals-switch-control {
        margin: 2px 4px 4px !important;
        padding: 3px 8px !important;
        min-height: 28px !important;
        justify-content: space-between !important;
        background: rgba(15, 23, 42, 0.6) !important;
        border-radius: 6px !important;
    }

    .finals-switch-title {
        font-size: 0.72rem !important;
    }

    .finals-switch-desc {
        font-size: 0.62rem !important;
    }

    /* Fixed Native-Style Bottom Navigation Bar */
    .hud-nav-tabs {
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: none !important;
        width: 100% !important;
    }

    .nav-tabs-left {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: rgba(10, 15, 29, 0.98) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border-top: 1px solid rgba(56, 189, 248, 0.25) !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8) !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 4px 4px calc(6px + env(safe-area-inset-bottom)) !important;
        gap: 2px !important;
        height: calc(56px + env(safe-area-inset-bottom)) !important;
    }

    .nav-tab {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 4px 2px !important;
        font-size: 0.68rem !important;
        border-radius: 8px !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        gap: 1px !important;
        border: none !important;
        background: transparent !important;
    }

    .nav-tab.active {
        background: rgba(56, 189, 248, 0.15) !important;
        color: #38bdf8 !important;
        border: 1px solid rgba(56, 189, 248, 0.3) !important;
    }

    .nav-tab-sublabel {
        display: none !important;
    }

    .nav-tab-icon {
        font-size: 1.25rem !important;
        line-height: 1 !important;
    }

    .nav-tab-label {
        font-size: 0.68rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
    }

    /* Workspaces on Mobile */
    .hud-workspace {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        padding: 4px 4px calc(86px + env(safe-area-inset-bottom, 0px)) 4px !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /* Strictly honor hidden workspaces */
    .hud-workspace[style*="display: none"],
    .hud-workspace[style*="display:none"],
    .hud-workspace.hidden {
        display: none !important;
    }

    /* On Mobile Course Map: Hide duplicate sidebar so Flowchart gets full screen */
    .hud-sidebar {
        display: none !important;
    }

    .tree-canvas-container {
        flex: 1 !important;
        min-height: 0 !important;
        height: 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .tree-controls {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 3px 6px !important;
        min-height: auto !important;
        gap: 4px !important;
    }

    .view-mode-toggles {
        display: none !important;
    }

    .tree-legend {
        font-size: 0.64rem !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
    }

    .flowchart-viewport {
        flex: 1 !important;
        min-height: 0 !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        overflow: hidden !important;
        border-radius: 8px !important;
    }

    .flowchart-toolbar {
        padding: 3px 6px !important;
        min-height: auto !important;
        gap: 4px !important;
    }

    .flowchart-hint {
        display: none !important;
    }

    .flowchart-actions {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .flowchart-scroll-wrapper {
        flex: 1 !important;
        min-height: 0 !important;
        height: 100% !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y pinch-zoom !important;
    }

    /* Scrollable Workspaces for Tasks, Timetable, Calendar & Settings */
    #notion-tasks-workspace,
    #timetable-workspace,
    #settings-workspace {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        overscroll-behavior-y: contain;
        padding: 6px 6px calc(130px + env(safe-area-inset-bottom, 0px)) 6px !important;
    }

    .notion-tasks-container {
        padding: 2px !important;
    }

    /* ======================================================================
       Mobile Calendar & Study Runway Enhancements
       ====================================================================== */
    .finals-calendar-card {
        padding: 4px 4px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
    }

    .finals-calendar-header-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        margin-bottom: 4px !important;
        padding-bottom: 4px !important;
    }

    .cal-title-group {
        display: none !important; /* Hide title on mobile to maximize calendar vertical visibility */
    }

    .finals-calendar-title {
        display: none !important;
    }

    .cal-subtitle {
        display: none !important;
    }

    .cal-nav-group {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 4px !important;
    }

    .cal-month-nav-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .cal-nav-controls-right {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .cal-view-mode-toggle button {
        padding: 3px 6px !important;
        font-size: 0.68rem !important;
    }

    .cal-nav-btns-group {
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        direction: ltr !important;
    }

    .cal-nav-btns-group button {
        padding: 3px 5px !important;
        font-size: 0.68rem !important;
    }

    .cal-current-month {
        font-size: 0.82rem !important;
        min-width: unset !important;
        text-align: right !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
    }

    .cal-actions-row {
        display: flex !important;
        gap: 4px !important;
        width: 100% !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
    }

    .cal-actions-row::-webkit-scrollbar {
        display: none !important;
    }

    .cal-actions-row .btn {
        flex: 1 !important;
        font-size: 0.70rem !important;
        padding: 4px 5px !important;
        white-space: nowrap !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Calendar Legend on Mobile: Collapsible */
    .cal-legend-bar {
        display: none !important;
        gap: 4px !important;
        padding: 6px 8px !important;
        font-size: 0.65rem !important;
        flex-direction: column !important;
        background: rgba(15, 23, 42, 0.9) !important;
        border-radius: 6px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin-bottom: 6px !important;
    }

    .cal-legend-bar.is-open {
        display: flex !important;
    }

    .cal-hint-text {
        display: none !important;
    }

    /* 6-Column Responsive Calendar Grid (Sunday - Friday) */
    .finals-calendar-card {
        display: flex !important;
        flex-direction: column !important;
        min-height: calc(100vh - 165px) !important;
        margin-bottom: 24px !important;
    }

    .finals-calendar-container {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        padding-top: 2px !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .finals-calendar-grid {
        flex: 1 !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 1px !important;
        width: 100% !important;
    }

    .finals-calendar-grid.is-week-view {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }

    .finals-calendar-grid.is-week-view .cal-day-cell {
        min-height: calc(100vh - 275px) !important;
        padding: 6px 3px !important;
    }

    .cal-day-header {
        padding: 4px 1px !important;
        font-size: 0.70rem !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        letter-spacing: 0 !important;
        background: #0d1222 !important;
    }

    .cal-day-cell {
        min-height: 72px !important;
        padding: 3px 2px !important;
        gap: 2px !important;
        cursor: pointer !important;
    }

    .cal-day-num {
        font-size: 0.62rem !important;
        margin-bottom: 0px !important;
        padding: 0 1px !important;
    }

    .cal-event-pill {
        padding: 2px 3px !important;
        font-size: 0.58rem !important;
        line-height: 1.15 !important;
        border-radius: 3px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        display: block !important;
    }

    .cal-event-pill.exam-event span {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        display: block !important;
    }

    /* Exam Gap Runway Track on Mobile (Collapsible) */
    .exam-gap-runway-card {
        padding: 6px 10px !important;
        margin-bottom: 6px !important;
        border-radius: 8px !important;
        overflow: visible !important;
    }

    .exam-gap-runway-card.collapsed-mobile {
        padding: 5px 10px !important;
        margin-bottom: 6px !important;
    }

    .exam-gap-runway-card.collapsed-mobile .runway-track,
    .exam-gap-runway-card.collapsed-mobile .runway-subtitle {
        display: none !important;
    }

    .exam-gap-runway-card.collapsed-mobile .runway-header {
        margin-bottom: 0 !important;
    }

    .runway-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 2px !important;
        margin-bottom: 6px !important;
    }

    .runway-track {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        padding: 6px 4px 10px 4px !important;
        gap: 8px !important;
    }

    .runway-today-node,
    .runway-exam-node {
        min-width: 110px !important;
        max-width: 135px !important;
        padding: 6px 8px !important;
        flex-shrink: 0 !important;
        border-radius: 6px !important;
    }

    .runway-exam-title {
        font-size: 0.78rem !important;
        line-height: 1.2 !important;
    }

    .runway-exam-date {
        font-size: 0.68rem !important;
    }

    /* ======================================================================
       Mobile Tasks Reminders Banner & Task Items
       ====================================================================== */
    .tasks-reminders-banner {
        padding: 8px 10px !important;
        margin-bottom: 10px !important;
        border-radius: 8px !important;
    }

    .reminders-banner-header {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .reminders-banner-title {
        font-size: 0.85rem !important;
    }

    .reminders-banner-controls {
        width: 100% !important;
        justify-content: space-between !important;
        gap: 6px !important;
        margin-top: 4px !important;
    }

    .reminders-banner-controls .btn {
        flex: 1 !important;
        font-size: 0.68rem !important;
        padding: 4px 6px !important;
        justify-content: center !important;
    }

    .reminders-banner-body {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        max-height: 250px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 6px 2px !important;
    }

    .reminder-chip {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        padding: 6px 8px !important;
        gap: 8px !important;
        box-sizing: border-box !important;
        border-radius: 6px !important;
    }

    .reminder-task-title {
        max-width: none !important;
        white-space: normal !important;
        font-size: 0.78rem !important;
        line-height: 1.25 !important;
        overflow: visible !important;
        text-overflow: unset !important;
        flex: 1 !important;
        word-break: break-word !important;
    }

    .reminder-course-tag {
        font-size: 0.72rem !important;
        flex-shrink: 0 !important;
    }

    .reminder-urgency-badge {
        font-size: 0.65rem !important;
        padding: 2px 5px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    .reminder-quick-check {
        flex-shrink: 0 !important;
        width: 22px !important;
        height: 22px !important;
    }

    /* Notion Tasks Header & Filters on Mobile */
    .notion-tasks-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .notion-tasks-header h2 {
        font-size: 1.05rem !important;
        text-align: center !important;
    }

    /* Collapsible Filters on Mobile */
    .notion-filters-toolbar {
        display: none !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        width: 100% !important;
        background: rgba(15, 23, 42, 0.85) !important;
        padding: 8px !important;
        border-radius: 8px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-sizing: border-box !important;
    }

    .notion-filters-toolbar.is-open {
        display: grid !important;
    }

    .notion-filters-toolbar .filter-group {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 2px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .notion-filters-toolbar .filter-group.search {
        grid-column: span 2 !important;
        width: 100% !important;
    }

    .notion-filters-toolbar .filter-group.search input {
        width: 100% !important;
        height: 34px !important;
    }

    .notion-filters-toolbar select,
    .notion-filter-btn {
        width: 100% !important;
        height: 34px !important;
        font-size: 0.75rem !important;
    }

    .notion-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        border-radius: 8px !important;
    }

    .notion-tasks-table {
        min-width: 580px !important;
    }

    .runway-actions {
        justify-content: center !important;
    }

    .settings-container {
        padding: 6px !important;
    }

    .settings-header-banner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .settings-header-actions {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .settings-controls-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Mobile/iPhone Class-Based Direct Fallback (Guaranteed Active in Desktop Request Mode)
   ========================================================================== */
html.is-mobile-device,
html.is-iphone,
body.is-mobile-device,
body.is-iphone {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

html.is-mobile-device .hud-container,
html.is-iphone .hud-container {
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

html.is-mobile-device .hud-sidebar,
html.is-iphone .hud-sidebar {
    display: none !important;
}

html.is-mobile-device .hud-header,
html.is-iphone .hud-header {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left)) !important;
    height: auto !important;
    min-height: auto !important;
    flex-shrink: 0 !important;
}

html.is-mobile-device .character-card,
html.is-iphone .character-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 4px 6px !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
}

html.is-mobile-device .hud-stats,
html.is-iphone .hud-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    width: 100% !important;
}

html.is-mobile-device .stat-item,
html.is-iphone .stat-item {
    padding: 3px 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 38px !important;
    min-width: 0 !important;
    border-radius: 6px !important;
}

html.is-mobile-device .stat-label,
html.is-iphone .stat-label {
    font-size: 0.58rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

html.is-mobile-device .stat-value,
html.is-iphone .stat-value {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
}

html.is-mobile-device .stat-gpa-sub,
html.is-iphone .stat-gpa-sub {
    display: none !important;
}

html.is-mobile-device .hud-nav-tabs,
html.is-iphone .hud-nav-tabs {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
    width: 100% !important;
}

html.is-mobile-device .nav-tabs-left,
html.is-iphone .nav-tabs-left {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(10, 15, 29, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(56, 189, 248, 0.25) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 4px 4px calc(6px + env(safe-area-inset-bottom)) !important;
    gap: 2px !important;
    height: calc(56px + env(safe-area-inset-bottom)) !important;
}

html.is-mobile-device .nav-tab,
html.is-iphone .nav-tab {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 2px !important;
    font-size: 0.68rem !important;
    border-radius: 8px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    gap: 1px !important;
    border: none !important;
    background: transparent !important;
}

html.is-mobile-device .nav-tab.active,
html.is-iphone .nav-tab.active {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

html.is-mobile-device .nav-tab-sublabel,
html.is-iphone .nav-tab-sublabel {
    display: none !important;
}

html.is-mobile-device .hud-workspace,
html.is-iphone .hud-workspace {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 4px 4px calc(86px + env(safe-area-inset-bottom, 0px)) 4px !important;
    overflow: hidden !important;
    position: relative !important;
}

html.is-mobile-device .hud-workspace[style*="display: none"],
html.is-mobile-device .hud-workspace[style*="display:none"],
html.is-mobile-device .hud-workspace.hidden,
html.is-iphone .hud-workspace[style*="display: none"],
html.is-iphone .hud-workspace[style*="display:none"],
html.is-iphone .hud-workspace.hidden {
    display: none !important;
}

html.is-mobile-device .tree-canvas-container,
html.is-iphone .tree-canvas-container {
    flex: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden !important;
}

html.is-mobile-device .flowchart-viewport,
html.is-iphone .flowchart-viewport {
    flex: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important;
}

html.is-mobile-device .flowchart-hint,
html.is-iphone .flowchart-hint {
    display: none !important;
}

html.is-mobile-device .app-global-footer,
html.is-iphone .app-global-footer {
    position: fixed !important;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    direction: rtl !important;
    z-index: 999 !important;
    background: rgba(10, 15, 29, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(56, 189, 248, 0.25) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.6) !important;
    box-sizing: border-box !important;
    font-size: 0.68rem !important;
    pointer-events: auto !important;
}

/* ==========================================================================
   Notion-Style Course Icon & Color Picker Modal
   ========================================================================== */

#notion-icon-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.notion-icon-picker-card {
    background: #0d1222;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(56, 189, 248, 0.12);
    width: 530px;
    max-width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pickerPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pickerPopIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.icon-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #11182c;
}

.icon-picker-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-picker-preview {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.icon-picker-preview svg {
    width: 26px;
    height: 26px;
    display: block;
}

.icon-picker-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
}

.icon-picker-subtitle {
    font-size: 0.76rem;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
}

.btn-close-picker {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 8px;
    line-height: 1;
    transition: all 0.15s ease;
}

.btn-close-picker:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.icon-picker-section {
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #0c101e;
}

.icon-picker-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Notion 10-Color Palette Swatches */
.notion-color-palette {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 4px 2px;
}

.color-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.color-circle:hover {
    transform: scale(1.18);
}

.color-circle.active {
    transform: scale(1.22);
    border-color: #ffffff;
    box-shadow: 0 0 12px currentColor, 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.color-circle.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Search Bar */
.icon-picker-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #090d18;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.icon-picker-search-bar .search-icon {
    font-size: 0.88rem;
    color: #64748b;
}

.icon-picker-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 0.86rem;
    font-family: inherit;
    outline: none;
}

.icon-picker-search-bar input::placeholder {
    color: #64748b;
}

.btn-clear-search {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.btn-clear-search:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

/* Category Filter Pills */
.icon-picker-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #0d1222;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.category-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #94a3b8;
    padding: 4px 11px;
    font-size: 0.74rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    font-family: inherit;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #f8fafc;
}

.category-pill.active {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.45);
    color: #38bdf8;
    font-weight: 700;
}

/* Icon Grid */
.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 9px;
    padding: 14px 18px;
    overflow-y: auto;
    max-height: 310px;
    min-height: 190px;
    background: #0a0e1b;
}

.icon-picker-grid::-webkit-scrollbar {
    width: 6px;
}
.icon-picker-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.icon-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 54px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.icon-grid-item svg {
    width: 26px;
    height: 26px;
    display: block;
    stroke-width: 2;
    transition: transform 0.15s ease;
}

.icon-grid-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.icon-grid-item.selected {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.icon-grid-item.selected::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #38bdf8;
}

.icon-picker-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 10px;
    color: #64748b;
    font-size: 0.85rem;
}

/* Modal Footer */
.icon-picker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0d1222;
}

/* ==========================================================================
   Weekly Timetable (מערכת שעות שבועית מסונכרנת מ-CheeseFork)
   ========================================================================== */
.timetable-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Timetable Header Card globally removed per user directive to eliminate wasted space, but Sync Bar & Generator is visible */
#timetable-header-card,
.timetable-header-card {
    display: none !important;
}

#timetable-sync-bar,
.timetable-sync-bar {
    display: flex !important;
}

.timetable-title-group h2 {
    margin: 0 0 4px 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timetable-title-group p {
    margin: 0;
    font-size: 0.84rem;
    color: #94a3b8;
}

.timetable-stats-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.timetable-stat-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #e2e8f0;
}

.timetable-stat-pill strong {
    color: #38bdf8;
    font-size: 0.95rem;
}

/* Timetable Daily Sync Status Bar */
.timetable-sync-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.timetable-sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #cbd5e1;
}

.sync-dot-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.btn-sync-action {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-sync-action:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.btn-sync-action.btn-cheesefork-action:hover {
    background: rgba(245, 158, 11, 0.28) !important;
    border-color: #fbbf24 !important;
    color: #fef08a !important;
}

/* Today's Live Schedule Card (Today's Agenda) */
.timetable-today-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.today-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.today-banner-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.today-banner-badge {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
}

.today-banner-badge.free {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.today-classes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.today-class-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.today-class-item:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.5);
}

.today-class-item.current-live {
    border: 1px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.95));
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.today-class-item.next-upcoming {
    border: 1px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(15, 23, 42, 0.95));
}

.today-class-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.today-class-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
}

.today-class-status {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
}

.today-class-status.live {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.today-class-status.next {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.today-class-status.done {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.today-class-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
}

.today-class-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 3px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.today-free-day-msg {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    color: #94a3b8;
    font-size: 0.86rem;
}

.today-free-day-msg .emoji {
    font-size: 1.8rem;
}

/* Mobile & Desktop Day Selector Tabs */
.timetable-day-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.timetable-day-selector::-webkit-scrollbar {
    display: none;
}

.day-tab-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.day-tab-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

.day-tab-pill.active {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.day-tab-pill.day-tab-sync {
    margin-right: auto;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.day-tab-pill.day-tab-sync:hover {
    background: rgba(56, 189, 248, 0.28);
    color: #ffffff;
}

.timetable-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 4px;
}

@media (max-width: 1440px) and (min-width: 769px) {
    .hud-header {
        padding: 6px 18px;
        gap: 10px;
    }
    .hud-top-right-bar {
        gap: 10px;
    }
    .hud-brand-logo-img {
        width: 44px;
        height: 44px;
    }
    .degree-title-text {
        font-size: 1.15rem !important;
    }
    .hud-sub-faculty {
        font-size: 0.68rem;
    }
    .btn-hud-login-top {
        padding: 5px 10px;
        font-size: 0.78rem;
    }
    .hud-stats {
        gap: 8px;
        flex-shrink: 0;
    }
    .stat-item {
        padding: 4px 8px;
        min-width: 75px;
    }
    .stat-label {
        font-size: 0.62rem;
    }
    .stat-value {
        font-size: 0.95rem;
    }
    .stat-gpa-sub {
        font-size: 0.54rem !important;
    }
    .character-card {
        padding: 6px 12px;
        max-width: 500px;
        flex: 1 1 auto;
    }
    .char-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.35rem !important;
        margin-left: 8px;
        flex-shrink: 0;
    }
    .char-title {
        font-size: 0.92rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .char-level {
        font-size: 0.82rem;
        padding: 1px 6px;
    }
    .xp-bar-container {
        height: 18px;
    }
    .xp-text {
        font-size: 0.72rem;
    }
    .hud-card-actions {
        gap: 6px;
        margin-right: 10px;
    }
    .btn-hud-bell {
        width: 32px;
        height: 32px;
    }
    .bell-icon {
        font-size: 0.95rem;
    }
}

@media (max-width: 1180px) and (min-width: 769px) {
    .hud-header {
        padding: 6px 10px;
        gap: 8px;
    }
    .hud-top-right-bar {
        gap: 8px;
    }
    .hud-brand-logo-img {
        width: 38px;
        height: 38px;
    }
    .degree-title-text {
        font-size: 1.02rem !important;
    }
    .hud-sub-faculty {
        display: none;
    }
    .hud-stats {
        gap: 6px;
    }
    .stat-item {
        padding: 3px 6px;
        min-width: 65px;
    }
    .stat-label {
        font-size: 0.58rem;
    }
    .stat-value {
        font-size: 0.88rem;
    }
    .character-card {
        padding: 5px 8px;
        max-width: 430px;
    }
    .char-info {
        min-width: 0 !important;
        overflow: hidden !important;
    }
    .char-avatar {
        width: 34px;
        height: 34px;
        font-size: 1.2rem !important;
        margin-left: 6px;
        flex-shrink: 0;
    }
    .char-title {
        font-size: 0.86rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .char-level {
        font-size: 0.78rem;
        padding: 1px 5px;
    }
    .xp-bar-container {
        height: 16px;
    }
    .xp-text {
        font-size: 0.68rem;
    }
    .hud-card-actions {
        gap: 4px;
        margin-right: 6px;
    }
    .hud-card-actions .btn-hud-bell {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
    }
    .bell-icon {
        font-size: 0.88rem;
    }
}

@media (max-width: 980px) and (min-width: 769px) {
    .hud-header {
        height: auto;
        min-height: auto;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 6px 12px;
        gap: 8px;
    }
    .hud-top-right-bar {
        order: 1;
    }
    .hud-stats {
        order: 2;
    }
    .character-card {
        order: 3;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .timetable-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px), screen and (max-device-width: 768px) {
    #timetable-workspace {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        overscroll-behavior-y: contain;
    }

    .timetable-container {
        padding: 4px 6px calc(75px + env(safe-area-inset-bottom)) !important;
        touch-action: pan-y !important;
    }

    /* Hide redundant top headers and banners on mobile to show schedule immediately */
    #timetable-header-card,
    #timetable-today-banner {
        display: none !important;
    }

    #timetable-sync-bar {
        display: flex !important;
        margin: 4px 0 8px 0 !important;
        padding: 6px 10px !important;
        overflow-x: auto !important;
    }

    .timetable-day-selector {
        margin: 2px 0 6px 0 !important;
        padding: 2px 0 !important;
        gap: 4px !important;
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .day-tab-pill {
        padding: 5px 8px !important;
        font-size: 0.74rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .day-tab-pill.day-tab-sync {
        margin-right: auto !important;
        background: rgba(56, 189, 248, 0.15) !important;
        border-color: rgba(56, 189, 248, 0.4) !important;
        color: #38bdf8 !important;
    }

    .timetable-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        touch-action: pan-y;
    }

    .timetable-day-col {
        min-height: auto;
        touch-action: pan-y;
    }

    /* When a single day is filtered on mobile */
    .timetable-grid[data-mobile-filter="today"] .timetable-day-col:not(.is-today),
    .timetable-grid[data-mobile-filter="0"] .timetable-day-col:not([data-day-col="0"]),
    .timetable-grid[data-mobile-filter="1"] .timetable-day-col:not([data-day-col="1"]),
    .timetable-grid[data-mobile-filter="2"] .timetable-day-col:not([data-day-col="2"]),
    .timetable-grid[data-mobile-filter="3"] .timetable-day-col:not([data-day-col="3"]),
    .timetable-grid[data-mobile-filter="4"] .timetable-day-col:not([data-day-col="4"]) {
        display: none !important;
    }

    .timetable-free-state {
        padding: 14px 10px;
        min-height: auto;
    }

    .timetable-card {
        padding: 10px 12px;
        margin-bottom: 4px;
        touch-action: pan-y;
    }

    .timetable-card-title {
        font-size: 0.84rem;
    }

    .timetable-sync-bar {
        padding: 6px 10px;
        font-size: 0.74rem;
    }
}

.timetable-day-col {
    background: rgba(13, 18, 34, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 480px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.timetable-day-col.is-today {
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.timetable-day-header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 2px solid rgba(56, 189, 248, 0.35);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timetable-day-col.is-today .timetable-day-header {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.25) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-bottom: 2px solid #38bdf8;
}

.today-star-indicator {
    background: #0284c7;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.timetable-day-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f8fafc;
}

.timetable-day-badge {
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.timetable-day-badge.active-day {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.timetable-day-badge.free-day {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.timetable-day-body {
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.timetable-card {
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.timetable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    filter: brightness(1.08);
}

.timetable-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
}

.timetable-card-physics {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.18) 0%, rgba(14, 116, 144, 0.1) 100%);
    border-color: rgba(6, 182, 212, 0.35);
}
.timetable-card-physics::before { background: #06b6d4; }

.timetable-card-solids {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.18) 0%, rgba(126, 34, 206, 0.1) 100%);
    border-color: rgba(168, 85, 247, 0.35);
}
.timetable-card-solids::before { background: #a855f7; }

.timetable-card-computing {
    background: linear-gradient(135deg, rgba(219, 39, 119, 0.18) 0%, rgba(190, 24, 93, 0.1) 100%);
    border-color: rgba(236, 72, 153, 0.35);
}
.timetable-card-computing::before { background: #ec4899; }

.timetable-card-thermo {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.18) 0%, rgba(194, 65, 12, 0.1) 100%);
    border-color: rgba(249, 115, 22, 0.35);
}
.timetable-card-thermo::before { background: #f97316; }

.timetable-card-pde {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.18) 0%, rgba(190, 18, 60, 0.1) 100%);
    border-color: rgba(244, 63, 94, 0.35);
}
.timetable-card-pde::before { background: #f43f5e; }

.timetable-card-yoga {
    background: linear-gradient(135deg, rgba(101, 163, 13, 0.18) 0%, rgba(77, 124, 15, 0.1) 100%);
    border-color: rgba(132, 204, 22, 0.35);
}
.timetable-card-yoga::before { background: #84cc16; }

.timetable-card-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.timetable-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
    line-height: 1.3;
}

.timetable-card-meta {
    font-size: 0.74rem;
    color: #cbd5e1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.timetable-tag {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #94a3b8;
}

.timetable-lecturer {
    font-size: 0.78rem;
    color: #e2e8f0;
    margin-top: 6px;
    font-style: normal;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.timetable-lecturer.is-tutorial {
    background: rgba(168, 85, 247, 0.14);
    border-color: rgba(168, 85, 247, 0.35);
    color: #f1f5f9;
}

.timetable-lecturer.is-tutorial strong {
    color: #c084fc;
}

.timetable-lecturer.is-lecture strong {
    color: #38bdf8;
}

.timetable-lecturer.is-sport {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #f1f5f9;
}

.timetable-lecturer.is-sport strong {
    color: #34d399;
}

.timetable-free-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 14px;
    color: #64748b;
    gap: 10px;
    height: 100%;
}

.timetable-free-state span.emoji {
    font-size: 2.2rem;
}

.timetable-break-gap {
    text-align: center;
    font-size: 0.72rem;
    color: #64748b;
    padding: 4px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.15);
}

/* Course Modal CheeseFork Section */
.modal-cheesefork-section {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.85) 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.modal-cheesefork-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-cheesefork-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-cheesefork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.modal-schedule-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 12px;
}

.modal-schedule-item-time {
    font-size: 0.76rem;
    font-weight: 700;
    color: #38bdf8;
}

.modal-schedule-item-desc {
    font-size: 0.82rem;
    color: #f1f5f9;
    margin-top: 2px;
}

.modal-schedule-item-lecturer {
    font-size: 0.74rem;
    color: #94a3b8;
    margin-top: 2px;
}

.modal-exam-dates-strip {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.modal-exam-date-badge {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   Mobile Notification Hub & Drawer (v1.4.0)
   ========================================================================== */

.btn-hud-bell {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    color: #f8fafc;
    flex-shrink: 0;
    margin: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-hud-bell:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
    transform: translateY(-1px);
}

.btn-hud-bell:active {
    transform: scale(0.95);
}

.bell-icon {
    font-size: 1.15rem;
    line-height: 1;
    display: inline-block;
}

.bell-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid #0b0f19;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.85);
    will-change: transform, opacity;
    animation: notif-pulse-badge 2s infinite ease-in-out;
}

@keyframes notif-pulse-badge {
    0%, 100% {
        transform: scale(1);
        opacity: 0.92;
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
    }
}

/* Notification Drawer Modal */
.notif-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(5, 9, 18, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    opacity: 1 !important;
}

.notif-drawer-panel {
    background: #0f172a;
    background: linear-gradient(180deg, #111827 0%, #0b0f19 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(56, 189, 248, 0.15);
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    max-height: 88dvh;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    opacity: 1 !important;
    margin: auto 0;
}

.notif-drawer-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.85);
    flex-shrink: 0;
}

.notif-drawer-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notif-drawer-icon {
    font-size: 1.4rem;
}

.notif-drawer-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: 0.3px;
}

.notif-drawer-subtitle {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 1px;
}

.notif-drawer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-dispatch-btn {
    font-size: 0.76rem !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.notif-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.15s;
}

.notif-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.notif-cards-container {
    padding: 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}

.notif-cards-container::-webkit-scrollbar {
    width: 6px;
}

.notif-cards-container::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.4);
    border-radius: 3px;
}

.notif-card {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.notif-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
}

.notif-card.is-expanded {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.notif-card-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.6);
    user-select: none;
    transition: background 0.15s;
    gap: 10px;
}

.notif-card-header:hover {
    background: rgba(30, 41, 59, 0.7);
}

.notif-card-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.notif-card-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
}

.notif-badge-lectures {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.notif-badge-tasks {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.notif-card-summary {
    font-size: 0.84rem;
    color: #e2e8f0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.notif-card-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.notif-count-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 7px;
    color: #94a3b8;
}

.notif-toggle-arrow {
    font-size: 0.75rem;
    color: #94a3b8;
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-card.is-expanded .notif-toggle-arrow {
    transform: rotate(180deg);
    color: #38bdf8;
}

.notif-card-body {
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 14, 26, 0.6);
    max-height: 52vh;
    max-height: 52dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}

.notif-card-body::-webkit-scrollbar {
    width: 5px;
}

.notif-card-body::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.4);
    border-radius: 3px;
}

.notif-card-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.notif-card-empty-msg {
    text-align: center;
    padding: 14px 10px;
    color: #94a3b8;
    font-size: 0.84rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Individual Lecture Item inside Notification Hub */
.notif-lecture-item {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-right: 3px solid #38bdf8;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.notif-lecture-item:hover {
    background: rgba(30, 41, 59, 0.75);
}

.notif-lecture-item.is-live {
    border-right-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.notif-lecture-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-lecture-item-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
    direction: ltr;
    display: inline-block;
}

.notif-lecture-item-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

.notif-lecture-item-status.live {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.notif-lecture-item-status.next {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.notif-lecture-item-status.upcoming {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
}

.notif-lecture-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
}

.notif-lecture-item-sub {
    font-size: 0.74rem;
    color: #94a3b8;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Individual Task Item inside Notification Hub */
.notif-task-item {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-right: 3px solid #f59e0b;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s;
}

.notif-task-item:hover {
    background: rgba(30, 41, 59, 0.75);
}

.notif-task-item.is-overdue {
    border-right-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.notif-task-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #38bdf8;
    cursor: pointer;
    flex-shrink: 0;
}

.notif-task-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
}

.notif-task-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-task-sub {
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-task-course-tag {
    color: #38bdf8;
    font-weight: 700;
}

.notif-task-timing-badge {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
}

.notif-task-timing-badge.overdue {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.notif-task-timing-badge.today {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.notif-task-timing-badge.upcoming {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.notif-card-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
}

.notif-card-footer button {
    font-size: 0.76rem !important;
}

@media (max-width: 768px), screen and (max-device-width: 768px) {
    .btn-hud-bell {
        width: 32px;
        height: 32px;
        margin-right: 6px;
    }
    
    .bell-icon {
        font-size: 1.0rem;
    }
    
    .notif-drawer-overlay {
        padding: 8px 6px calc(65px + env(safe-area-inset-bottom)) 6px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
    
    .notif-drawer-panel {
        max-height: calc(100vh - 85px - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 85px - env(safe-area-inset-bottom));
        border-radius: 12px;
        min-height: 0;
    }

    .notif-cards-container {
        padding: 10px 8px;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }

    .notif-card-body {
        max-height: 46vh;
        max-height: 46dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
}

/* App Global Footer (Developer Credit & Version) */
.app-global-footer {
    position: relative;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 5px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl; /* Right side: Credit, Left side: Version */
    flex-shrink: 0;
    z-index: 50;
    font-size: 0.72rem;
    color: #64748b;
    min-height: 28px;
    width: 100%;
    box-sizing: border-box;
}

.footer-credit-content {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    direction: ltr; /* Keeps English credit text readable */
    flex-shrink: 0;
}

.footer-left-version {
    display: flex;
    align-items: center;
    direction: ltr;
    flex-shrink: 0;
}

.app-version-badge {
    display: inline-flex;
    align-items: center;
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: #cbd5e1;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.28);
    padding: 2px 7px;
    border-radius: 5px;
    user-select: none;
    transition: all 0.2s ease;
    cursor: default;
    line-height: 1.2;
}

.app-version-badge:hover {
    color: #f8fafc;
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.footer-credit-content {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    direction: ltr;
}

.footer-credit-content .credit-text {
    color: #94a3b8;
    font-size: 0.72rem;
    letter-spacing: 0.2px;
}

.footer-credit-content strong {
    color: #f8fafc;
    font-weight: 600;
}

.footer-linkedin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
    opacity: 0.7;
    padding: 2px 4px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
}

.footer-linkedin-btn:hover {
    opacity: 1;
    color: #38bdf8;
    background: rgba(2, 132, 199, 0.12);
    transform: scale(1.15);
}

.developer-credit-card {
    border-color: rgba(56, 189, 248, 0.3) !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(14, 165, 233, 0.08)) !important;
}

@media (max-width: 768px), screen and (max-device-width: 768px) {
    .app-global-footer {
        position: fixed !important;
        bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 28px !important;
        min-height: 28px !important;
        margin: 0 !important;
        padding: 0 10px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        direction: rtl !important; /* Right: Credit, Left: Version */
        z-index: 999 !important; /* Above canvas, below nav tabs (1000) */
        background: rgba(10, 15, 29, 0.96) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-top: 1px solid rgba(56, 189, 248, 0.25) !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.6) !important;
        box-sizing: border-box !important;
        font-size: 0.68rem !important;
        pointer-events: auto !important;
    }
    .footer-left-version {
        position: static !important;
        transform: none !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
    .footer-credit-content {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        direction: ltr !important;
        flex-shrink: 0 !important;
    }
    .footer-credit-content .credit-text {
        font-size: 0.68rem !important;
    }
    .app-version-badge {
        font-size: 0.62rem !important;
        padding: 1px 6px !important;
        white-space: nowrap !important;
    }
}

/* Multi-Account & Cloud Sync Styles */
.btn-hud-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #f8fafc;
    font-size: 0.84rem;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
    direction: rtl;
}

.btn-hud-user:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.user-avatar-pill {
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hud-user-avatar-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.65));
    display: inline-block;
    vertical-align: middle;
}

.char-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.user-name-text {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    unicode-bidi: isolate;
}

.user-caret-icon {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.cloud-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 500;
}

.cloud-status-pill.offline {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.cloud-status-pill.connected {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.account-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.account-item-card.active {
    border-color: #38bdf8;
    background: rgba(14, 165, 233, 0.08);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.account-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-avatar {
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.account-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-badge-dev {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.account-badge-active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.account-email {
    display: block;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.account-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.active-indicator-text {
    font-size: 0.78rem;
    color: #34d399;
    font-weight: 600;
}

.add-account-form-wrapper.active,
.supabase-config-wrapper.active {
    display: block !important;
}

/* Onboarding Wizard Chips */
.onboarding-sem-header {
    font-size: 0.84rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 6px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

.onboarding-chips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.onboarding-course-chip {
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.onboarding-course-chip input[type="checkbox"] {
    position: absolute;
    top: 8px;
    left: 8px;
    cursor: pointer;
}

.onboarding-course-chip.selected {
    border-color: #34d399;
    background: rgba(16, 185, 129, 0.12);
}

.onboarding-course-chip .chip-code {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.onboarding-course-chip .chip-name {
    font-size: 0.82rem;
    color: #f8fafc;
    font-weight: 600;
    margin: 2px 0;
}

.onboarding-course-chip .chip-credits {
    font-size: 0.7rem;
    color: #94a3b8;
}

@media (max-width: 768px), screen and (max-device-width: 768px) {
    .btn-hud-user {
        padding: 2px 8px;
        font-size: 0.76rem;
    }
    .user-name-text {
        max-width: 75px;
    }
    .onboarding-chips-grid {
        grid-template-columns: 1fr;
    }
}

/* CheeseFork Auto-Fill & Autocomplete in Add Course Modal */
.cf-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.65);
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
}

.cf-suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease;
}

.cf-suggestion-item:last-child {
    border-bottom: none;
}

.cf-suggestion-item:hover, .cf-suggestion-item.active {
    background: rgba(56, 189, 248, 0.18);
}

.cf-sugg-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #f8fafc;
}

.cf-sugg-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    display: flex;
    gap: 8px;
}

.cf-sugg-code {
    color: #38bdf8;
    font-family: monospace;
    font-weight: 700;
}

.cf-match-banner {
    margin-top: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    font-size: 0.78rem;
    color: #e2e8f0;
}

.cf-match-banner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 4px;
}

.cf-match-banner-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.74rem;
}

.cf-match-pill {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: #f1f5f9;
}

/* ==========================================================================
   Degree Planner (תכנון תואר אקדמי) & Drag-and-Drop Board Styles
   ========================================================================== */
#planner-workspace {
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 40%),
                radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.05), transparent 50%),
                #070d18;
}

.planner-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Header Banner */
.planner-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    backdrop-filter: blur(12px);
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.planner-header-left,
.planner-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.planner-mode-switch {
    display: inline-flex;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.btn-planner-mode {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-planner-mode:hover {
    color: #f1f5f9;
}

.btn-planner-mode.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.85), rgba(37, 99, 235, 0.85));
    color: #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.planner-summary-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.planner-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 6px;
    font-size: 0.78rem;
}

.planner-stat-pill .pill-label {
    color: #94a3b8;
}

.planner-stat-pill .pill-value {
    color: #38bdf8;
    font-weight: 800;
    direction: ltr;
}

/* Main Split Container */
.planner-main-container {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    gap: 14px;
    padding: 12px 14px;
    box-sizing: border-box;
}

/* Left Board: Semesters */
.planner-board-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.planner-semesters-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    height: 100%;
    padding-bottom: 8px;
    align-items: stretch;
}

.planner-semester-col {
    width: 275px;
    min-width: 260px;
    max-width: 290px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.planner-semester-col:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.planner-summer-col {
    border-color: rgba(245, 158, 11, 0.35) !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

.planner-summer-col .summer-header {
    background: rgba(245, 158, 11, 0.15) !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.btn-delete-semester,
.btn-delete-summer-sem {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    border-radius: 6px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    margin-right: 4px;
}

.btn-delete-semester:hover,
.btn-delete-summer-sem:hover {
    background: rgba(239, 68, 68, 0.4);
    border-color: #ef4444;
    color: #fff;
    opacity: 1;
    transform: scale(1.1);
}

.planner-add-sem-col-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    flex-shrink: 0;
    padding: 0 10px;
}

.btn-add-regular-sem-col {
    background: rgba(56, 189, 248, 0.08);
    border: 1px dashed rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    border-radius: 12px;
    padding: 20px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-add-regular-sem-col:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #fff;
    transform: scale(1.02);
}

.planner-add-summer-col-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    flex-shrink: 0;
}

.btn-add-summer-col {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 16px 8px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.btn-add-summer-col:hover {
    background: rgba(245, 158, 11, 0.18);
    border-style: solid;
    border-color: #fbbf24;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.semester-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    background: rgba(30, 41, 59, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.semester-col-title {
    font-weight: 800;
    font-size: 0.88rem;
    color: #f8fafc;
}

.semester-col-credits {
    font-size: 0.76rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 2px 7px;
    border-radius: 9999px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    direction: ltr;
}

.planner-course-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 120px;
    transition: background 0.15s ease;
}

.planner-course-list.drag-over {
    background: rgba(56, 189, 248, 0.15) !important;
    border: 2px dashed #38bdf8 !important;
    border-radius: 8px;
}

/* Course Card */
.planner-course-card {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: grab;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    user-select: none;
}

.planner-course-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.planner-course-card:active {
    cursor: grabbing;
}

.planner-course-card.dragging {
    opacity: 0.4;
    transform: scale(0.96);
    border-color: #38bdf8;
}

.course-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.course-card-code {
    font-size: 0.72rem;
    font-family: monospace;
    color: #94a3b8;
    font-weight: 600;
}

.course-card-tag {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.tag-mandatory {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.tag-final_project {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.tag-list-A {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-list-B {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-list-C {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.tag-list-D {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.tag-list-E {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.tag-sports,
.tag-list-SPORTS {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.tag-malag,
.tag-humanities,
.tag-list-MALAG {
    background: rgba(168, 85, 247, 0.15) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.course-card-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.25;
}

.course-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
    gap: 4px;
}

.course-card-credits {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    direction: ltr;
}

.course-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-card-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 11px;
    padding: 1px 4px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.btn-card-remove:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
}

.prereq-warning-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
}

/* CheeseFork Style Semester Workload Widget */
.cheesefork-workload-widget {
    margin: 4px 10px 8px 10px;
    padding: 6px 12px;
    background: #19202c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    user-select: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.cheesefork-workload-widget .cf-wl-header {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e2e8f0;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.cheesefork-workload-widget .cf-wl-title {
    color: #cbd5e1;
}

.cheesefork-workload-widget .cf-wl-score {
    font-size: 0.72rem;
    font-family: monospace;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.6);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cheesefork-workload-widget .cf-wl-gauge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    direction: ltr;
}

.cheesefork-workload-widget .cf-wl-end {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
}

.cheesefork-workload-widget .cf-wl-end.scale,
.cheesefork-workload-widget .cf-wl-end.feather {
    color: #cbd5e1;
}

.cheesefork-workload-widget .cf-wl-end.scale:hover {
    color: #38bdf8;
    transform: scale(1.1);
}

.cheesefork-workload-widget .cf-wl-end.dumbbell {
    color: #94a3b8;
}

.cheesefork-workload-widget .cf-wl-weights {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cheesefork-workload-widget .cf-weight {
    color: #94a3b8;
    transition: all 0.2s ease;
}

.cheesefork-workload-widget .cf-weight.filled {
    color: #e2e8f0;
}

.cheesefork-workload-widget .cf-weight.half {
    color: #cbd5e1;
}

.cheesefork-workload-widget .cf-weight.empty {
    color: #64748b;
    opacity: 0.55;
}

/* Fallback & Compact Workload Badges */
.semester-workload-badge {
    margin: 4px 10px 6px 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.semester-workload-badge.workload-light {
    background: rgba(40, 167, 69, 0.18);
    border: 1px solid rgba(40, 167, 69, 0.45);
    color: #4ade80;
}

.semester-workload-badge.workload-moderate {
    background: rgba(255, 193, 7, 0.18);
    border: 1px solid rgba(255, 193, 7, 0.45);
    color: #facc15;
}

.semester-workload-badge.workload-heavy {
    background: rgba(220, 53, 69, 0.22);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #f87171;
}

/* Course Card Workload Badge & Edit Trigger */
.btn-course-workload {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.67rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s ease;
}

.btn-course-workload:hover {
    border-color: #38bdf8;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

.btn-course-workload.has-override {
    border-color: rgba(234, 179, 8, 0.5);
    color: #fde047;
    background: rgba(234, 179, 8, 0.15);
}

/* Interactive Workload Micro-Popover */
.workload-popover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workload-popover-box {
    background: #0b1329;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    padding: 22px 24px;
    width: 360px;
    max-width: 92vw;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(56, 189, 248, 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
    direction: rtl;
    text-align: right;
    animation: popoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.workload-popover-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0;
}

.workload-popover-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.45;
}

/* Full-width interactive slider card */
.workload-popover-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(15, 23, 42, 0.7);
    padding: 16px 16px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    width: 100%;
    box-sizing: border-box;
}

.workload-slider-hero {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.workload-slider-hero-num {
    font-size: 2.3rem;
    font-weight: 900;
    color: #38bdf8;
    font-family: monospace;
    line-height: 1;
    text-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
}

.workload-slider-hero-max {
    font-size: 1rem;
    font-weight: 700;
    color: #64748b;
}

.workload-range-slider {
    width: 100%;
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(to left, rgba(239, 68, 68, 0.4), rgba(234, 179, 8, 0.4), rgba(56, 189, 248, 0.4));
    outline: none;
    cursor: pointer;
    accent-color: #38bdf8;
    -webkit-appearance: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
    margin: 4px 0;
}

.workload-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: grab;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.8), 0 2px 6px rgba(0, 0, 0, 0.5);
    border: 3px solid #ffffff;
    transition: transform 0.12s ease, background-color 0.12s ease;
}

.workload-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.18);
    background: #7dd3fc;
}

.workload-range-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.25);
    box-shadow: 0 0 18px rgba(56, 189, 248, 1);
}

.workload-popover-actions {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

/* Right Sidebar: Rules & Add Electives */
.planner-sidebar {
    width: 380px;
    min-width: 340px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-right: 2px;
    flex-shrink: 0;
}

/* Elective Rules Card */
.planner-rules-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.planner-rules-header {
    font-weight: 800;
    font-size: 0.94rem;
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: opacity 0.15s ease;
}

.planner-rules-header:hover {
    opacity: 0.9;
}

.planner-rules-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.planner-rules-body.collapsed {
    display: none;
}

.planner-rules-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.planner-rule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #cbd5e1;
    padding: 4px 8px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.planner-rule-row.rule-completed {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.08);
}

.planner-rule-row.rule-row-highlight {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-weight: 700;
    color: #38bdf8;
}

.planner-rule-row.rule-row-total {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    font-weight: 800;
    color: #34d399;
}

.planner-rule-row .rule-score {
    direction: ltr;
    font-weight: 700;
}

.planner-rules-note {
    font-size: 0.70rem;
    color: #94a3b8;
    line-height: 1.35;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Add Electives Card */
.planner-add-electives-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    min-height: 480px;
}

.add-electives-header {
    font-weight: 800;
    font-size: 0.92rem;
    color: #f1f5f9;
    flex-shrink: 0;
}

.planner-ready-section {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.ready-badge-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #38bdf8;
}

.planner-ready-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 100px;
    overflow-y: auto;
}

.planner-elective-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
    min-height: 36px;
    padding: 4px 0;
}

.planner-elective-filters .filter-pill {
    padding: 5px 11px;
    font-size: 0.74rem;
    font-weight: 700;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
    user-select: none;
}

.planner-elective-filters .filter-pill:hover {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(30, 41, 59, 1);
}

.planner-elective-filters .filter-pill.active {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.planner-search-wrap {
    width: 100%;
    flex-shrink: 0;
}

.planner-search-input {
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    font-size: 0.8rem;
    box-sizing: border-box;
    outline: none;
}

.planner-search-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.planner-electives-pool {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    min-height: 380px;
    max-height: 520px;
    padding-right: 4px;
    flex: 1;
}

.planner-pool-item {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.planner-pool-item:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(30, 41, 59, 0.95);
}

.planner-pool-item:active {
    cursor: grabbing;
}

.pool-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pool-item-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pool-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    color: #94a3b8;
}

.btn-add-to-plan {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    padding: 3px 7px;
    line-height: 1;
    font-weight: 700;
    transition: all 0.15s ease;
}

.btn-add-to-plan:hover {
    background: #0284c7;
    color: #ffffff;
}

/* Completed Course Lock Styling */
.planner-course-card.course-card-completed {
    border-color: rgba(16, 185, 129, 0.45) !important;
    background: rgba(16, 185, 129, 0.08) !important;
    cursor: pointer !important;
}

.planner-course-card.course-card-completed:hover {
    transform: none !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2) !important;
}

.tag-completed {
    background: rgba(16, 185, 129, 0.22) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
}

/* Sidebar Drop Zone for Removing Courses */
.planner-sidebar.drag-over,
.planner-electives-pool.drag-over,
.planner-unassigned-dropzone.drag-over {
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35) !important;
}

.planner-unassigned-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
    transition: all 0.2s ease;
    user-select: none;
    margin-bottom: 6px;
}

.planner-unassigned-banner.drag-over {
    border-color: #f59e0b !important;
    color: #fef08a !important;
    background: rgba(245, 158, 11, 0.18) !important;
    transform: scale(1.02);
}

/* Prerequisite Warning Beacon Animation */
@keyframes prereqBeaconPulse {
    0% {
        border-color: #ef4444;
        transform: scale(1);
        opacity: 0.88;
    }
    50% {
        border-color: #f59e0b;
        transform: scale(1.04);
        opacity: 1;
    }
    100% {
        border-color: #ef4444;
        transform: scale(1);
        opacity: 0.88;
    }
}

.prereq-pulse-beacon {
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.6) !important;
    will-change: transform, opacity;
    animation: prereqBeaconPulse 0.75s ease-in-out infinite alternate !important;
    z-index: 100 !important;
    position: relative !important;
}

/* Prerequisite Block Column Shake */
.semester-col-shake {
    animation: columnShake 0.6s ease-in-out !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.6) !important;
}

@keyframes columnShake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-8px); }
    30%, 60%, 90% { transform: translateX(8px); }
}

/* Prerequisite Block Toast Alert */
.planner-toast-alert {
    position: fixed;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.96);
    border: 2px solid #ef4444;
    color: #f8fafc;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 28px rgba(239, 68, 68, 0.55);
    z-index: 999999;
    display: none;
    align-items: center;
    gap: 14px;
    max-width: 90vw;
    width: max-content;
    text-align: right;
    direction: rtl;
    backdrop-filter: blur(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.planner-toast-alert.toast-active {
    display: flex !important;
    animation: toastSlideDown 0.3s ease-out forwards;
}

@keyframes toastSlideDown {
    from { opacity: 0; transform: translate(-50%, -25px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Mobile Responsiveness */
@media (max-width: 768px), screen and (max-device-width: 768px) {
    .planner-header-banner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        padding: 4px 6px !important;
    }

    .planner-header-left {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        width: 100% !important;
    }

    .planner-mode-switch {
        display: flex !important;
        width: 100% !important;
    }

    .btn-planner-mode {
        flex: 1 !important;
        padding: 4px 6px !important;
        font-size: 0.74rem !important;
        justify-content: center !important;
    }

    .planner-summary-stats {
        display: flex !important;
        width: 100% !important;
        gap: 4px !important;
    }

    .planner-stat-pill {
        flex: 1 !important;
        padding: 3px 6px !important;
        font-size: 0.70rem !important;
        justify-content: space-between !important;
    }

    .planner-header-right {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        width: 100% !important;
    }

    .planner-header-right .btn {
        flex: 1 1 calc(50% - 4px) !important;
        padding: 4px 6px !important;
        font-size: 0.72rem !important;
        min-height: 28px !important;
        justify-content: center !important;
    }

    .planner-main-container {
        flex-direction: column;
        padding: 6px;
        gap: 8px;
        overflow-y: auto;
    }

    .planner-board-area {
        height: auto;
        min-height: 380px;
    }

    .planner-semesters-scroll {
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .planner-semester-col {
        width: 240px;
        min-width: 220px;
    }

        .planner-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: auto;
    }
}

/* =======================================================
   Mobile Tap-to-Move Action Sheet & Touch Ergonomics
   ======================================================= */
.planner-action-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.planner-action-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.planner-action-sheet {
    width: 100%;
    max-width: 520px;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    padding: 20px 20px 28px 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.65);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
}

.planner-action-sheet-overlay.active .planner-action-sheet {
    transform: translateY(0);
}

.sheet-handle-bar {
    width: 44px;
    height: 5px;
    background: #334155;
    border-radius: 3px;
    margin: 0 auto 16px auto;
}

.sheet-header-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 4px;
}

.sheet-header-sub {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.sheet-semesters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.sheet-sem-btn {
    padding: 12px 6px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sheet-sem-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}



.sheet-sem-btn.current {
    background: rgba(37, 99, 235, 0.25);
    border-color: #3b82f6;
    color: #60a5fa;
}

.sheet-actions-row {
    display: flex;
    gap: 10px;
}

.sheet-btn-remove {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sheet-btn-remove:hover {
    background: rgba(239, 68, 68, 0.22);
}

.sheet-btn-cancel {
    padding: 12px 20px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
}

/* =======================================================
   What-If Degree GPA Simulator
   ======================================================= */
.planner-whatif-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(234, 179, 8, 0.45);
    box-shadow: 0 4px 18px rgba(234, 179, 8, 0.12);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 12px;
    direction: rtl;
    animation: fadeInWhatIf 0.25s ease-out;
}

@keyframes fadeInWhatIf {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.whatif-stats-cluster {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.whatif-stat-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.whatif-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
}

.whatif-stat-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
    font-family: var(--font-mono, monospace);
}

.whatif-stat-val.highlight {
    color: #facc15;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
}

.whatif-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-whatif-preset {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #fde047;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-whatif-preset:hover {
    background: rgba(234, 179, 8, 0.25);
    border-color: #fde047;
}

.course-card-whatif-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    border-radius: 6px;
    padding: 1px 6px;
}

.course-card-whatif-input {
    width: 36px;
    background: transparent;
    border: none;
    color: #fde047;
    font-weight: 800;
    font-size: 0.74rem;
    text-align: center;
    outline: none;
    font-family: monospace;
}

/* =======================================================
   Degree Planner Export Choice Modal
   ======================================================= */
.planner-export-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    direction: rtl;
}

.planner-export-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.planner-export-modal {
    width: 90%;
    max-width: 500px;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.planner-export-modal-overlay.active .planner-export-modal {
    transform: scale(1);
}

.export-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.export-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.export-modal-close:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
}

.export-options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.export-choice-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #1e293b;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
    color: #f8fafc;
}

.export-choice-card:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
}

.export-choice-icon {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    flex-shrink: 0;
}

.export-choice-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.export-choice-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #38bdf8;
}

.export-choice-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
}

/* Degree Planner Semesters Manager Modal */
.planner-semesters-mgr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    direction: rtl;
}

.planner-semesters-mgr-modal-overlay.active {
    display: flex !important;
    opacity: 1;
}

.planner-semesters-mgr-modal {
    width: 92%;
    max-width: 520px;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.planner-semesters-mgr-modal-overlay.active .planner-semesters-mgr-modal {
    transform: scale(1);
}

.btn-sem-mgr-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #1e293b;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #f8fafc;
}

.btn-sem-mgr-action:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.sem-mgr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.15s ease;
}

.sem-mgr-row:hover {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.04);
}

.btn-sem-mgr-delete {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-sem-mgr-delete:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    transform: scale(1.05);
}

/* =======================================================
   Phone Account & Notification Preferences Styling
   ======================================================= */
.phone-settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #090d16;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 10px;
    padding: 6px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-input-wrapper:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.phone-input-flag {
    font-size: 1.25rem;
    user-select: none;
}

.phone-input-field {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #f8fafc !important;
    font-size: 1rem !important;
    font-family: monospace, sans-serif !important;
    letter-spacing: 0.5px;
    padding: 6px 0 !important;
}

.phone-input-field::placeholder {
    color: #475569 !important;
}

.phone-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.phone-status-badge.badge-verified {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.phone-status-badge.badge-pending {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.notif-pref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.notif-pref-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.notif-pref-card:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-1px);
}

.notif-pref-checkbox-wrap {
    margin-top: 2px;
    display: flex;
    align-items: center;
}

.notif-pref-checkbox {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #0284c7;
}

.notif-pref-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-pref-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
}

.notif-pref-desc {
    font-size: 0.73rem;
    color: #94a3b8;
    line-height: 1.35;
}

.notif-channels-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-top: 14px;
}

.notif-channels-label {
    font-size: 0.80rem;
    font-weight: 700;
    color: #cbd5e1;
}

.channel-toggle-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #e2e8f0;
    cursor: pointer;
}

.channel-toggle-item input[type="checkbox"] {
    accent-color: #10b981;
    width: 15px;
    height: 15px;
}

/* Quick Phone Bar inside Mobile Notification Drawer */
.drawer-phone-bar {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.drawer-phone-bar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-phone-badge {
    font-size: 0.70rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.drawer-phone-badge.has-phone {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.drawer-desktop-badge {
    font-size: 0.70rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.drawer-toggle-prefs-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.drawer-toggle-prefs-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #ffffff;
}

#cal-nav-today:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #38bdf8;
}

/* Highlight Today in Calendar */
.cal-day-cell.is-today {
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 75%), #151d33 !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: inset 0 0 16px rgba(56, 189, 248, 0.18), 0 0 14px rgba(56, 189, 248, 0.35) !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 2;
}

.cal-day-cell.is-today .cal-day-num {
    color: #38bdf8 !important;
    font-weight: 800;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.cal-day-number-label.is-today-num {
    background: #38bdf8 !important;
    color: #0b0f19 !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6) !important;
    flex-shrink: 0 !important;
}

.cal-today-pill-badge {
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.18) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    max-width: calc(100% - 24px) !important;
    margin: 0 !important;
}

.cal-day-cell.is-today .btn-add-day-item {
    display: inline-flex !important;
    color: #38bdf8 !important;
    opacity: 1 !important;
}

/* Personal Custom Events in Calendar */
.cal-event-pill.personal-event {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #bae6fd;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-event-pill.personal-event:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
    color: #fff;
    transform: translateY(-1px);
}

.cal-event-pill.personal-event.done {
    opacity: 0.6;
    text-decoration: line-through;
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

.cal-event-pill.personal-event .btn-del-cal-event {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.cal-event-pill.personal-event:hover .btn-del-cal-event {
    opacity: 1;
}

.drawer-prefs-collapsible {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-phone-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.drawer-phone-field {
    flex: 1;
    font-size: 0.82rem !important;
    padding: 5px 8px !important;
    background: #090d16 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    border-radius: 6px !important;
    color: #fff !important;
}

.drawer-quick-prefs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.drawer-pref-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    color: #e2e8f0;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.drawer-pref-chip:hover {
    border-color: #38bdf8;
}

.drawer-pref-chip input[type="checkbox"] {
    accent-color: #38bdf8;
    cursor: pointer;
}

/* =======================================================
   Print / PDF A4 Landscape Layout - Single Page Guarantee
   ======================================================= */
@page {
    size: A4 landscape;
    margin: 4mm 5mm;
}

@media print {
    html, body {
        width: 100% !important;
        height: 100% !important;
        background: #ffffff !important;
        color: #0f172a !important;
        margin: 0 !important;
        padding: 0 !important;
        font-family: Arial, "Rubik", sans-serif !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        overflow: hidden !important;
    }

    body * {
        visibility: hidden !important;
    }

    #planner-workspace,
    #planner-workspace * {
        visibility: visible !important;
    }

    #planner-workspace {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        background: #ffffff !important;
        color: #0f172a !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        zoom: 0.84 !important;
    }

    .hud-header,
    .hud-nav-tabs,
    .app-global-footer,
    .planner-header-banner,
    .planner-sidebar,
    .planner-rules-card,
    .planner-ready-section,
    #planner-whatif-container,
    .planner-action-sheet-overlay,
    .planner-export-modal-overlay,
    .btn-card-remove,
    .btn-add-to-plan,
    .course-card-whatif-wrap,
    .prereq-warning-pill,
    button {
        display: none !important;
    }

    .planner-main-container {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .planner-board-area {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #planner-workspace::before {
        content: "🎓 הטכניון - מכון טכנולוגי לישראל | הפקולטה להנדסת מכונות — תוכנית לימודים לתואר ראשון";
        display: block !important;
        visibility: visible !important;
        font-size: 11pt !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        text-align: center !important;
        border-bottom: 2px solid #0284c7 !important;
        padding-bottom: 2px !important;
        margin-bottom: 5px !important;
        direction: rtl !important;
    }

    .planner-semesters-scroll {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(2, auto) !important;
        gap: 5px !important;
        width: 100% !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .planner-semester-col {
        min-width: 0 !important;
        width: 100% !important;
        border: 1.2px solid #64748b !important;
        border-radius: 4px !important;
        background: #f8fafc !important;
        color: #0f172a !important;
        padding: 3px 5px !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        box-shadow: none !important;
    }

    .semester-col-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 1px solid #94a3b8 !important;
        padding-bottom: 2px !important;
        margin-bottom: 3px !important;
        direction: rtl !important;
    }

    .semester-col-title {
        font-size: 8.5pt !important;
        font-weight: 800 !important;
        color: #0369a1 !important;
    }

    .semester-col-credits {
        font-size: 7.5pt !important;
        font-weight: 700 !important;
        color: #475569 !important;
    }

    .planner-course-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5px !important;
        min-height: 0 !important;
    }

    .planner-course-card {
        border: 1px solid #94a3b8 !important;
        border-radius: 3px !important;
        background: #ffffff !important;
        color: #0f172a !important;
        padding: 2px 4px !important;
        box-shadow: none !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        direction: rtl !important;
    }

    .course-card-top {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 0 !important;
        line-height: 1 !important;
    }

    .course-card-code {
        font-size: 6.8pt !important;
        font-weight: 700 !important;
        color: #475569 !important;
        font-family: monospace !important;
    }

    .course-card-tag {
        font-size: 6.2pt !important;
        padding: 0 3px !important;
        border-radius: 2px !important;
        font-weight: 700 !important;
        border: 1px solid #cbd5e1 !important;
        background: #f1f5f9 !important;
        color: #334155 !important;
        line-height: 1.1 !important;
    }

    .course-card-tag.tag-completed {
        background: #dcfce7 !important;
        border-color: #86efac !important;
        color: #15803d !important;
    }

    .course-card-title {
        font-size: 7.2pt !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        line-height: 1.15 !important;
        margin: 1px 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .course-card-bottom {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        line-height: 1 !important;
    }

    .course-card-credits {
        font-size: 6.4pt !important;
        color: #64748b !important;
        font-weight: 600 !important;
    }
}

/* v1.8.9: Custom Avatar & Settings Status Card Styles */
.phone-settings-status-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.phone-settings-status-card:hover {
    border-color: rgba(56, 189, 248, 0.45) !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.15);
}
.btn-avatar-pick-item:hover {
    transform: scale(1.1);
    background: rgba(56, 189, 248, 0.2) !important;
}
.btn-avatar-pick-item:active {
    transform: scale(0.95);
}
.course-card.exempt {
    opacity: 0.55;
    filter: grayscale(0.5);
    border: 1px dashed rgba(148, 163, 184, 0.35);
}
.course-card.exempt:hover {
    opacity: 0.85;
    filter: none;
}

/* ==============================================================================
   v1.8.24 Design Fixes: Calendar Sync Inputs, Planner Cards & Header Alignment
   ============================================================================== */

/* 1. Calendar Sync Settings Inputs (High Contrast & Clear Readability) */
.setting-cal-input,
#input-apps-script-webhook,
.settings-card input[type="text"],
.settings-card input[type="number"],
.settings-card .modal-input {
    background: #090e1a !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    color: #38bdf8 !important;
    border-radius: 6px !important;
    padding: 9px 12px !important;
    font-family: 'Rubik', 'Segoe UI', monospace !important;
    font-size: 0.84rem !important;
    direction: ltr !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.setting-cal-input:focus,
#input-apps-script-webhook:focus,
.settings-card input[type="text"]:focus,
.settings-card input[type="number"]:focus,
.settings-card .modal-input:focus {
    border-color: #38bdf8 !important;
    background: #0f172a !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.45) !important;
    outline: none !important;
}

.setting-cal-input::placeholder,
#input-apps-script-webhook::placeholder {
    color: #475569 !important;
}

/* 2. Degree Planner Course Cards & Column Header Fixes */
.semester-col-header {
    background: rgba(22, 30, 46, 0.98) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
    z-index: 5 !important;
    position: relative !important;
}

.planner-course-list {
    padding: 10px 8px 20px 8px !important;
    gap: 8px !important;
    scroll-padding-top: 10px !important;
}

.planner-course-card {
    padding: 9px 11px !important;
    overflow: visible !important;
}

.course-card-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    direction: rtl !important;
    gap: 8px !important;
    margin-bottom: 3px !important;
    width: 100% !important;
}

.course-card-code {
    font-size: 0.74rem !important;
    font-family: monospace !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
    direction: ltr !important;
}

.course-card-tag {
    font-size: 0.68rem !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
    flex-shrink: 0 !important;
}

.course-card-title {
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    line-height: 1.25 !important;
}

.planner-sidebar {
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(56, 189, 248, 0.35) transparent !important;
    padding-bottom: 32px !important;
}

/* 3. Header Progress Bar & Sidebar Polish */
.char-title {
    white-space: nowrap !important;
    font-size: 0.98rem !important;
    line-height: 1.2 !important;
}

.char-level {
    white-space: nowrap !important;
    font-size: 0.86rem !important;
    padding: 2px 10px !important;
    line-height: 1.2 !important;
}

.hud-sidebar {
    padding: 14px !important;
    gap: 14px !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(56, 189, 248, 0.35) transparent !important;
}

.sidebar-section {
    padding: 12px 14px !important;
}

.sidebar-section.moodle-sync input[type="text"],
.sidebar-section.cheesefork-import input[type="text"] {
    background: #090e1a !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    color: #38bdf8 !important;
    border-radius: 6px !important;
    padding: 7px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    direction: ltr !important;
    text-align: left !important;
}

/* ==============================================================================
   Distribution & Release Enhancements (v1.9.6)
   ============================================================================== */

/* Footer Action Links */
.footer-action-link {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.68rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.2;
}

.footer-action-link:hover {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-1px);
}

.app-version-badge.has-update {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.45) !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    will-change: transform, opacity;
    animation: pulseUpdateBadge 2s infinite ease-in-out;
}

@keyframes pulseUpdateBadge {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}

/* SmartScreen Guide Styles */
.smartscreen-mockup-window {
    background: #005a9e;
    color: #ffffff;
    border-radius: 8px;
    padding: 22px 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    margin: 14px 0;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: right;
    direction: rtl;
}

.smartscreen-mockup-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.smartscreen-mockup-text {
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 14px;
    color: #e2e8f0;
}

.smartscreen-mockup-link {
    color: #93c5fd;
    text-decoration: underline;
    font-weight: 700;
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    border: 1px dashed #bfdbfe;
    cursor: pointer;
}

.smartscreen-mockup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 12px;
}

.smartscreen-mockup-btn-run {
    background: #1d4ed8;
    color: #ffffff;
    border: 2px solid #60a5fa;
    padding: 6px 18px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.86rem;
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
    cursor: pointer;
}

.smartscreen-step-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #38bdf8;
    color: #0f172a;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.78rem;
    margin-left: 6px;
    vertical-align: middle;
}

/* Bug Report & Update Grid Styles */
.bug-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.bug-report-card-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    padding: 14px;
    text-align: right;
    direction: rtl;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.bug-report-card-btn:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

.bug-report-card-btn .btn-title {
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bug-report-card-btn .btn-desc {
    color: #94a3b8;
    font-size: 0.76rem;
    line-height: 1.4;
}

.diagnostics-code-box {
    background: #090e1a;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 10px;
    font-family: monospace;
    font-size: 0.72rem;
    color: #38bdf8;
    max-height: 110px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

/* ==============================================================================
   Semestero ME v2.0.0 - Aceternity UI Micro-Animations & Polished Interactions
   ============================================================================== */

/* Modal Backdrop Blur & Spring Scale Entrance */
.modal-overlay {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.modal-content {
    animation: modalSpringIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes modalSpringIn {
    0% {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* XP Bar Glossy Shimmer Sweep (Aceternity style) */
.xp-bar-container {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.xp-bar-container:hover {
    transform: scale(1.015);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

.xp-bar-fill {
    position: relative;
    overflow: hidden;
}

.xp-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-25deg);
    animation: xpShimmer 3.8s infinite ease-in-out;
}

@keyframes xpShimmer {
    0% { left: -100%; }
    40% { left: 160%; }
    100% { left: 160%; }
}

/* Aceternity Rotating Border Beam */
.border-beam-card {
    position: relative;
    border-radius: 12px;
    background: #0f172a;
    overflow: hidden;
    z-index: 1;
}

.border-beam-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg 300deg,
        #38bdf8 340deg,
        #818cf8 360deg
    );
    animation: borderBeamRotate 6s linear infinite;
    z-index: -2;
}

.border-beam-card::after {
    content: '';
    position: absolute;
    inset: 1.5px;
    background: #0b1120;
    border-radius: 10.5px;
    z-index: -1;
}

@keyframes borderBeamRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* HUD Interactive KPI Badge Enhancements */
#stat-item-gpa {
    cursor: pointer;
    border-radius: 8px;
    padding: 6px 12px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

#stat-item-gpa:hover {
    background: rgba(56, 189, 248, 0.14);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.28);
    transform: translateY(-2px);
    border: 1px solid rgba(56, 189, 248, 0.4);
}

#stat-completed-courses {
    cursor: pointer;
}

/* Enhanced Course Card Micro-Interactions */
.course-card {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}

.course-card.mastered:hover {
    transform: translateY(-3px) scale(1.012) !important;
    box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.45) !important;
}

.course-card.available:hover {
    transform: translateY(-3px) scale(1.012) !important;
    box-shadow: 0 8px 24px -4px rgba(56, 189, 248, 0.45) !important;
}

.course-card.active:hover {
    transform: translateY(-3px) scale(1.012) !important;
    box-shadow: 0 8px 24px -4px rgba(251, 191, 36, 0.45) !important;
}

/* ==============================================================================
   Semestero ME v2.0.0 - Bklit UI / Shadcn Charts Style Analytics Modal
   ============================================================================== */

.analytics-modal-content {
    width: 960px !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    background: #090e1a !important;
    border: 1px solid rgba(56, 189, 248, 0.28) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.15) !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

.analytics-header-banner {
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.75));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.analytics-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-title-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}

.analytics-title-text h2 {
    font-size: 1.35rem;
    color: #f8fafc;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-title-text p {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 3px 0 0 0;
}

.analytics-badge-v2 {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.5);
}

.analytics-body-scrollable {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 4 KPI Summary Cards Grid */
.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.analytics-kpi-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.analytics-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.analytics-kpi-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.analytics-kpi-value {
    font-size: 1.65rem;
    font-weight: 900;
    color: #f8fafc;
    font-family: 'Orbitron', 'Rubik', sans-serif;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.analytics-kpi-sub {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

/* Charts Main Panels */
.analytics-panel {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.analytics-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.analytics-panel-header h3 {
    font-size: 1.05rem;
    color: #f1f5f9;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-panel-subtitle {
    font-size: 0.78rem;
    color: #94a3b8;
}

.analytics-panel-tag {
    font-size: 0.72rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 3px 9px;
    border-radius: 9999px;
    font-weight: 600;
}

/* SVG Chart Container & Tooltips */
.analytics-chart-canvas-box {
    position: relative;
    width: 100%;
    min-height: 240px;
}

.analytics-svg-chart {
    width: 100%;
    height: 240px;
    overflow: visible;
}

.chart-grid-line {
    stroke: rgba(255, 255, 255, 0.06);
    stroke-dasharray: 4 4;
}

.chart-axis-text {
    fill: #64748b;
    font-size: 11px;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
}

.chart-benchmark-line {
    stroke: #f59e0b;
    stroke-width: 1.5;
    stroke-dasharray: 6 4;
    opacity: 0.85;
}

.chart-area-path {
    fill: url(#gpaAreaGradient);
    opacity: 0.35;
}

.chart-spline-line {
    fill: none;
    stroke: #38bdf8;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.chart-point-outer {
    fill: #0b1120;
    stroke: #38bdf8;
    stroke-width: 3;
    cursor: pointer;
    transition: r 0.15s ease, stroke-width 0.15s ease;
}

.chart-point-outer:hover {
    r: 7;
    stroke: #ffffff;
    stroke-width: 4;
    filter: drop-shadow(0 0 10px #38bdf8);
}

.chart-tooltip-box {
    position: absolute;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.76rem;
    color: #f8fafc;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
    pointer-events: none;
    z-index: 20;
    display: none;
    white-space: nowrap;
    text-align: right;
    direction: rtl;
    line-height: 1.35;
    transition: opacity 0.15s ease;
}

/* Two-Column Middle Section: Donut + Category Breakdown */
.analytics-mid-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
}

/* Donut Chart Visual */
.analytics-donut-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 10px 0;
}

.analytics-donut-svg-box {
    position: relative;
    width: 170px;
    height: 170px;
    flex-shrink: 0;
}

.analytics-donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-center-pct {
    font-size: 1.55rem;
    font-weight: 900;
    color: #10b981;
    font-family: 'Orbitron', 'Rubik', sans-serif;
    line-height: 1.1;
}

.donut-center-label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
}

.analytics-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.donut-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.donut-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
    flex-shrink: 0;
}

/* Category Progress Bars */
.analytics-categories-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.analytics-cat-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.analytics-cat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
}

.analytics-cat-track {
    height: 10px;
    background: #090e1a;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-cat-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Grade Distribution Histogram */
.analytics-histogram-bars {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 160px;
    padding: 10px 0 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.histogram-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 6px;
}

.histogram-bar {
    width: 100%;
    max-width: 46px;
    border-radius: 6px 6px 2px 2px;
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
    min-height: 4px;
    cursor: pointer;
    position: relative;
}

.histogram-bar:hover {
    filter: brightness(1.2);
}

.histogram-count {
    font-size: 0.72rem;
    font-weight: 800;
    color: #f8fafc;
}

.histogram-label {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 6px;
    font-weight: 600;
    white-space: nowrap;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Responsive adjustment for Mobile & Tablet */
@media (max-width: 768px) {
    .analytics-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .analytics-kpi-card {
        padding: 12px 14px !important;
    }
    .analytics-kpi-value {
        font-size: 1.35rem !important;
    }
    .analytics-panel {
        padding: 14px 12px !important;
    }
    .analytics-mid-split {
        grid-template-columns: 1fr !important;
    }
    .analytics-donut-container {
        flex-direction: column;
        gap: 16px !important;
    }
    .analytics-histogram-bars {
        gap: 8px !important;
    }
    .histogram-label {
        font-size: 0.62rem !important;
    }
    .analytics-cat-header {
        font-size: 0.75rem !important;
        flex-wrap: wrap;
        gap: 4px;
    }
    .analytics-chart-canvas-box {
        min-height: auto !important;
    }
    .analytics-svg-chart {
        height: auto !important;
        max-height: 220px !important;
    }

    /* Notion Slide-in Side Peek Mobile Optimization */
    .task-side-peek {
        width: 100vw !important;
        max-width: 100vw !important;
        border-right: none !important;
    }
    .peek-content {
        padding: 16px 16px calc(24px + env(safe-area-inset-bottom)) 16px !important;
    }
    .peek-property-row {
        grid-template-columns: 1fr !important;
        gap: 4px !important;
        margin-bottom: 8px !important;
    }
    .peek-property-label {
        font-size: 0.8rem !important;
    }
    .peek-header {
        padding-left: 40px !important; /* Leave room for close button on the left */
    }
    .peek-title-input {
        font-size: 1.4rem !important;
    }

    /* Calendar Day Details Modal Mobile Optimization */
    #calendar-day-modal .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 14px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    .day-modal-add-section {
        padding: 10px !important;
    }
    .day-modal-add-section .form-control {
        font-size: 0.8rem !important;
    }

    /* Onboarding Wizard Modal Mobile & Desktop Robust Centering */
    #onboarding-wizard-modal {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.8) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        z-index: 99999 !important;
        display: none;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        padding: 16px !important;
    }
    #onboarding-wizard-modal.active {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    #onboarding-wizard-modal .modal-content {
        width: 100% !important;
        max-width: 620px !important;
        max-height: 90vh !important;
        margin: auto !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        background: #0b1329 !important;
        border: 1px solid rgba(56, 189, 248, 0.35) !important;
        border-radius: 16px !important;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7) !important;
        overflow: hidden !important;
        direction: rtl !important;
    }
    #onboarding-wizard-modal .modal-header {
        padding: 16px 20px 12px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        flex-shrink: 0 !important;
    }
    #onboarding-wizard-modal .modal-body {
        padding: 16px 20px !important;
        overflow-y: auto !important;
        flex: 1 1 auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    #onboarding-wizard-modal .modal-footer {
        padding: 12px 20px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        background: #080e1e !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 12px !important;
        flex-shrink: 0 !important;
    }
    #onboarding-wizard-modal .modal-footer .btn {
        flex: 1 !important;
        padding: 10px 14px !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
    }
}

/* ==============================================================================
   Privacy Policy Modal (מדיניות פרטיות והגנת מידע)
   ============================================================================== */
.privacy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 29, 0.78);
    backdrop-filter: blur(8px);
    z-index: 10010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.privacy-modal-overlay.active {
    display: flex;
}

.privacy-modal-card {
    background: #0b1329;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 18px;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(16, 185, 129, 0.15);
    color: #f8fafc;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: right;
    direction: rtl;
    animation: privacyFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes privacyFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.privacy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
    flex-shrink: 0;
}

.privacy-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #34d399;
}

.privacy-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.privacy-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.privacy-badge-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.privacy-section-block {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
}

.privacy-section-block h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: #f1f5f9;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.privacy-section-block p,
.privacy-section-block ul {
    margin: 0;
    font-size: 0.84rem;
    color: #94a3b8;
    line-height: 1.55;
}

.privacy-section-block ul {
    padding-right: 18px;
}

.privacy-modal-footer {
    padding: 12px 22px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}


/* -------------------------------------------------------------------------- */
/* Inline Form Validation & Forgiving Input Feedback (Reel 2 UX Standard)     */
/* -------------------------------------------------------------------------- */
.form-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
    animation: shake-input-error 0.35s ease-in-out;
}

@keyframes shake-input-error {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.form-field-helper-error {
    color: #f87171;
    font-size: 0.74rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}


/* Mobile Footer Spacing Optimization */
@media (max-width: 768px), screen and (max-device-width: 768px) {
    .app-global-footer {
        padding: 0 8px !important;
    }
    .footer-left-version {
        gap: 5px !important;
    }
    .footer-credit-content {
        gap: 4px !important;
    }
    .footer-credit-content .credit-text {
        font-size: 0.66rem !important;
        white-space: nowrap !important;
    }
    .app-version-badge {
        font-size: 0.62rem !important;
        padding: 1px 5px !important;
        white-space: nowrap !important;
    }
}

/* ==============================================================================
   Prerequisites Interactive Chips & Autocomplete Search Styling (v2.2.2)
   ============================================================================== */
.prereq-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 44px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    align-items: center;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.prereq-chips-container:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.prereq-chips-empty {
    font-size: 0.76rem;
    color: #64748b;
    font-style: italic;
    user-select: none;
}

.prereq-chip-block {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.78rem;
    color: #f1f5f9;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: prereqChipPopIn 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes prereqChipPopIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.prereq-chip-badge {
    font-family: monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.prereq-chip-title {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: #e2e8f0;
}

.prereq-chip-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    margin-right: 2px;
    transition: all 0.15s ease;
}

.prereq-chip-del:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.18);
    transform: scale(1.15);
}

.prereq-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    max-height: 230px;
    overflow-y: auto;
    background: #0b132b;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    z-index: 1050;
    padding: 4px;
    direction: rtl;
    text-align: right;
}

.prereq-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #cbd5e1;
    transition: background 0.15s ease, color 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.prereq-dropdown-item:last-child {
    border-bottom: none;
}

.prereq-dropdown-item:hover,
.prereq-dropdown-item.highlighted {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.prereq-dropdown-item.is-selected {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent !important;
}

.prereq-dropdown-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.prereq-dropdown-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.prereq-dropdown-meta {
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
}

/* Direct Moodle Submission Link Button */
.notion-moodle-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8 !important;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.18s ease;
    margin-right: 6px;
    vertical-align: middle;
}

.notion-moodle-link-btn:hover {
    background: rgba(14, 165, 233, 0.28);
    border-color: #38bdf8;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(56, 189, 248, 0.3);
}

/* Ensure modal help button is always visible, prominent red-pink and never squeezed */
.btn-modal-help {
    flex-shrink: 0 !important;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #fda4af !important;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.45), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.btn-modal-help:hover {
    background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(244, 63, 94, 0.75), 0 3px 6px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-1.5px) scale(1.12) !important;
}

.flowchart-actions {
    flex-shrink: 0;
}

/* ==========================================================================
   Flowchart High-Contrast Fix (Mac / iOS Safari & Clean Beams Mode)
   ========================================================================== */
.fc-node-rect {
    fill: #161c2e !important;
    stroke: #334155 !important;
}

.fc-node-group.mastered .fc-node-rect {
    fill: #064e3b !important;
    stroke: #10b981 !important;
}

.fc-node-group.active .fc-node-rect {
    fill: #0c4a6e !important;
    stroke: #38bdf8 !important;
}

.fc-node-group.locked .fc-node-rect {
    fill: #0f172a !important;
    stroke: #334155 !important;
}

.fc-node-title {
    fill: #f8fafc !important;
    color: #f8fafc !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.fc-node-sub {
    fill: #94a3b8 !important;
}


/* ==========================================================================
   Preferred Sources Quick Bar (Google, Drive, CheeseFork, Moodle, Panopto)
   ========================================================================== */
.pref-source-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.15s ease;
}

.pref-source-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.pref-source-btn.google-search:hover {
    background: rgba(66, 133, 244, 0.2);
    border-color: #4285F4;
    color: #93c5fd;
}

.pref-source-btn.google-drive:hover {
    background: rgba(15, 157, 88, 0.2);
    border-color: #0F9D58;
    color: #86efac;
}

.pref-source-btn.cheesefork:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #fde68a;
}

.pref-source-btn.moodle:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #bae6fd;
}

.pref-source-btn.panopto:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

/* ==========================================================================
   CNF Prerequisites Structure (Conjunction of Alternative Disjunctions)
   ========================================================================== */
.prereq-cnf-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
}

.prereq-cnf-clause-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.6);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s ease;
}

.prereq-cnf-clause-row.clause-satisfied {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.05);
}

.prereq-cnf-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    text-decoration: none;
}

.prereq-cnf-pill.satisfied {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #f8fafc;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.prereq-cnf-pill.satisfied:hover {
    background: rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.prereq-cnf-pill.missing {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
}

.prereq-cnf-pill.missing:hover {
    background: #27354f;
    color: #e2e8f0;
    transform: translateY(-1px);
    border-color: #64748b;
}

.prereq-cnf-or-chip {
    font-size: 0.7rem;
    font-weight: 800;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    user-select: none;
}

.prereq-cnf-and-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 4px 0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    user-select: none;
}

.prereq-cnf-and-divider::before,
.prereq-cnf-and-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   New Academic Features: Clashes, Panopto, Honors & Consensus Styling
   ========================================================================== */

.runway-gap-pill.clash,
.runway-connector.clash .runway-badge {
    background: #ef4444 !important;
    border-color: #f87171 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    animation: pulseClash 1.8s infinite ease-in-out;
}

.runway-connector.clash .runway-line {
    background: #ef4444 !important;
}

@keyframes pulseClash {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
        transform: scale(1.04);
    }
}

.runway-conflict-banner {
    animation: fadeInSlideDown 0.3s ease-out;
}

@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-toggle-panopto-item {
    transition: all 0.15s ease;
}

.btn-toggle-panopto-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-toggle-panopto-item.is-watched {
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.modal-peer-consensus-box {
    animation: fadeIn 0.25s ease;
}

.analytics-honors-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analytics-honors-card:hover {
    box-shadow: 0 6px 24px rgba(251, 191, 36, 0.15);
}

/* ==========================================================================
   Technion++ & Organit++ Integration Styles (v2.4.11)
   ========================================================================== */

/* Organit++ Category Filter Pills */
.organit-category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
    padding: 2px 0;
}

.organit-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-light, #cbd5e1);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    font-family: inherit;
}

.organit-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: translateY(-1px);
}

.organit-pill.active {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.organit-pill-count {
    font-size: 0.70rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    margin-right: 2px;
    transition: all 0.15s ease;
}

.organit-pill.active .organit-pill-count {
    background: rgba(56, 189, 248, 0.3);
    color: #fff;
}

/* Task Pinning Button in Notion Table */
.notion-pin-task-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 4px;
    transition: transform 0.15s ease, opacity 0.15s ease;
    opacity: 0.35;
    color: #94a3b8;
}

.notion-pin-task-btn:hover {
    opacity: 0.85;
    transform: scale(1.15);
}

.notion-pin-task-btn.is-pinned {
    opacity: 1;
    color: #f59e0b;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
}

/* Row Pinned Indicator */
tr.is-task-pinned {
    background: rgba(245, 158, 11, 0.04) !important;
    border-right: 3px solid #f59e0b !important;
}

/* Miluim Badge */
.miluim-task-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 2px 7px;
    border-radius: 4px;
    margin-right: 6px;
}

/* Technion++ Quick Links Bar in Course Modal */
.modal-technion-plus-bar {
    animation: fadeIn 0.2s ease;
}

.technion-link-btn {
    transition: all 0.18s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.technion-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    filter: brightness(1.15);
}

/* =========================================================================
   Algorithmic Timetable Generator & Combinations Studio (v2.4.11)
   ========================================================================= */

.btn-generator-action {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(99, 102, 241, 0.25) 100%) !important;
    border: 1px solid rgba(168, 85, 247, 0.5) !important;
    color: #e9d5ff !important;
    font-weight: 700 !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-generator-action:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.4) 0%, rgba(99, 102, 241, 0.4) 100%) !important;
    border-color: #c084fc !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35);
}

.ttg-modal-content {
    max-width: 1240px !important;
    width: 95vw !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-card, #111827) !important;
    border: 1px solid rgba(168, 85, 247, 0.35) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(168, 85, 247, 0.15) !important;
}

.ttg-sort-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.ttg-sort-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    font-family: inherit;
}

.ttg-sort-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.ttg-sort-btn.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(14, 165, 233, 0.25) 100%);
    border-color: #38bdf8;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.ttg-options-pills-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px 10px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}

.ttg-options-pills-row::-webkit-scrollbar {
    height: 6px;
}

.ttg-options-pills-row::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.4);
    border-radius: 4px;
}

.ttg-opt-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
    user-select: none;
    font-family: inherit;
}

.ttg-opt-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

.ttg-opt-pill.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(126, 34, 206, 0.3) 100%);
    border-color: #c084fc;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
    transform: translateY(-1px);
}

.ttg-preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: min-content;
    align-items: start;
    gap: 10px;
    margin: 12px 0;
    min-height: max-content;
    height: auto;
}

.ttg-mobile-day-tabs {
    display: none;
}

@media (max-width: 900px) {
    .ttg-mobile-day-tabs {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 4px 2px 8px 2px;
        margin-top: 6px;
        margin-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .ttg-mobile-day-tabs::-webkit-scrollbar {
        display: none;
    }
    .ttg-mobile-day-tab {
        flex: 1;
        min-width: 54px;
        padding: 6px 6px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        color: #cbd5e1;
        font-size: 0.74rem;
        font-weight: 700;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
        font-family: inherit;
    }
    .ttg-mobile-day-tab:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
    .ttg-mobile-day-tab.active {
        background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(14, 165, 233, 0.25) 100%);
        border-color: #38bdf8;
        color: #ffffff;
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
    }
    .ttg-mobile-day-tab.is-free-day {
        border-color: rgba(16, 185, 129, 0.4);
        color: #34d399;
    }

    .ttg-preview-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding: 4px 2px 14px 2px;
        margin: 8px 0 12px 0;
        scrollbar-width: thin;
        scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
        height: auto;
        min-height: max-content;
    }
    .ttg-preview-grid::-webkit-scrollbar {
        height: 6px;
    }
    .ttg-preview-grid::-webkit-scrollbar-thumb {
        background: rgba(56, 189, 248, 0.4);
        border-radius: 4px;
    }
    .ttg-preview-day-col {
        width: 82vw !important;
        min-width: 270px !important;
        max-width: 360px !important;
        flex-shrink: 0 !important;
        scroll-snap-align: center !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 768px) {
    .ttg-modal-content {
        width: 96vw !important;
        max-height: 94vh !important;
        max-height: 94dvh !important;
        margin: 6px auto !important;
        border-radius: 12px !important;
    }
    #modal-timetable-generator .modal-header {
        padding: 10px 14px 6px 14px !important;
    }
    #modal-timetable-generator .modal-header h2 {
        font-size: 1.05rem !important;
    }
    #modal-timetable-generator .modal-header p {
        display: none !important;
    }
    #modal-timetable-generator .modal-body {
        padding: 8px 12px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    #modal-timetable-generator .modal-footer {
        padding: 8px 12px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    #modal-timetable-generator .modal-footer > div:first-child {
        display: none !important;
    }
    #modal-timetable-generator .modal-footer > div:last-child {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }
    #modal-timetable-generator .modal-footer > div:last-child button {
        flex: 1 !important;
    }
    #ttg-active-anchors-container {
        padding: 6px 10px !important;
    }
}

.ttg-preview-day-col {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    transition: border-color 0.2s ease;
}

.ttg-preview-day-col.is-free-col {
    background: rgba(16, 185, 129, 0.03);
    border: 1px dashed rgba(16, 185, 129, 0.35);
}

.ttg-preview-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ttg-preview-classes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.ttg-gap-indicator {
    padding: 4px 8px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed rgba(245, 158, 11, 0.35);
    border-radius: 5px;
    color: #fbbf24;
    font-size: 0.68rem;
    text-align: center;
    margin: 2px 0;
}

.ttg-breakdown-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 10px;
}

/* =========================================================================
   Timetable Generator Anchor Controls & Badges
   ========================================================================= */
.ttg-anchor-chip {
    transition: all 0.2s ease;
    user-select: none;
}

.ttg-anchor-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ttg-anchor-chip.is-user-anchor {
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.ttg-anchor-chip.is-system-anchor {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.ttg-btn-toggle-anchor {
    font-family: inherit;
    user-select: none;
}

.ttg-btn-toggle-anchor:hover {
    transform: translateY(-1px);
    background: rgba(56, 189, 248, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.5) !important;
    color: #ffffff !important;
}

.ttg-btn-toggle-anchor.is-anchored {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(14, 165, 233, 0.25) 100%) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.ttg-btn-toggle-anchor.is-anchored:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #f87171 !important;
    color: #f87171 !important;
}

.ttg-breakdown-anchor-btn {
    font-family: inherit;
    transition: all 0.15s ease;
    user-select: none;
}

.ttg-breakdown-anchor-btn:hover {
    background: rgba(56, 189, 248, 0.2) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}

.ttg-breakdown-anchor-btn.is-anchored {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.ttg-breakdown-anchor-btn.is-anchored:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: #f87171 !important;
    color: #f87171 !important;
}

/* =========================================================================
   Timetable Pre-Anchoring Hub (Step 1 upfront anchor & lecturer selector)
   ========================================================================= */
.ttg-pre-anchor-hub {
    transition: all 0.25s ease;
}

.ttg-pre-anchor-card {
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.ttg-pre-anchor-card:hover {
    border-color: rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ttg-pre-anchor-select:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

@media (max-width: 768px) {
    #ttg-pre-anchor-hub {
        padding: 10px 12px !important;
    }
    #ttg-pre-anchor-grid {
        grid-template-columns: 1fr !important;
    }
    #ttg-btn-run-generate {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* =========================================================================
   4-LINE TIMETABLE CARD DESIGN & GOOGLE CALENDAR MANAGER MODAL (v2.4.19)
   ========================================================================= */

/* 4-Line Class Card Components */
.timetable-card-room-bar {
    font-size: 0.82rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 6px;
    padding: 3px 8px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
}

.timetable-card-room-bar .room-icon {
    font-size: 0.88rem;
    line-height: 1;
}

.timetable-card-room-bar .room-text {
    letter-spacing: 0.2px;
}

.course-code-dim {
    font-size: 0.74rem;
    color: #94a3b8;
    font-weight: normal;
}

/* Google Calendar Manager Modal */
.gcal-manager-modal-content {
    background: linear-gradient(180deg, #111827 0%, #0b0f19 100%);
    border-radius: 16px;
    animation: fadeIn 0.2s ease-out;
}

.gcal-guide-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 14px;
}

.gcal-guide-title {
    font-size: 0.95rem;
    color: #f8fafc;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gcal-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.gcal-method-box {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s ease;
}

.gcal-method-box:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(30, 41, 59, 0.75);
}

.gcal-method-box.highlight-gold {
    border-color: rgba(251, 191, 36, 0.4);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.gcal-method-box.highlight-gold:hover {
    border-color: #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}

.method-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: #f8fafc;
}

.method-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #38bdf8;
    color: #0b0f19;
    font-weight: 800;
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.highlight-gold .method-num {
    background: #fbbf24;
}

.method-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.45;
    margin: 0;
    flex-grow: 1;
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ffffff;
}

/* In-App Timetable Class Editor */
.gcal-editor-section {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
}

.gcal-classes-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.gcal-class-edit-row {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s ease;
}

.gcal-class-edit-row:hover {
    border-color: rgba(56, 189, 248, 0.35);
}

.gcal-class-edit-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gcal-class-edit-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gcal-class-edit-header .day-badge {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

.gcal-class-edit-header .time-badge {
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 600;
}

.gcal-class-edit-header .type-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
}

.gcal-class-edit-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #f8fafc;
}

.gcal-class-edit-title .code-dim {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: normal;
}

.gcal-class-edit-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    flex-wrap: wrap;
    color: #cbd5e1;
}

.gcal-class-edit-details .room-chip {
    color: #38bdf8;
}

.gcal-class-edit-details .room-chip.dim {
    color: #64748b;
}

.gcal-class-edit-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    align-self: flex-end;
}

.gcal-btn-edit {
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.gcal-btn-delete {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.gcal-btn-delete:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

.gcal-class-inline-form {
    margin-top: 8px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px dashed rgba(56, 189, 248, 0.35);
    border-radius: 8px;
}

.gcal-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.gcal-form-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gcal-form-field label {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.gcal-form-field input {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    padding: 5px 8px;
    color: #f8fafc;
    font-size: 0.78rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.gcal-form-field input:focus {
    border-color: #38bdf8;
}

.gcal-form-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .gcal-methods-grid {
        grid-template-columns: 1fr;
    }
    .gcal-form-grid {
        grid-template-columns: 1fr;
    }
    .gcal-class-edit-actions {
        width: 100%;
        justify-content: flex-end;
    }
}


/* ==========================================================================
   Technion Sports Club Selection & Schedule Conflict Badges
   ========================================================================== */
.btn-select-sport-club {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    text-align: right;
    transition: all 0.2s ease;
    user-select: none;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-select-sport-club.need-club {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
    border: 1px dashed rgba(34, 197, 94, 0.6);
}

.btn-select-sport-club.need-club:hover {
    background: rgba(34, 197, 94, 0.16);
    border-color: #4ade80;
    transform: translateY(-1px);
}

.btn-select-sport-club.has-club {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.btn-select-sport-club.has-club:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: #86efac;
}

.badge-malag-schedule {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.70rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(168, 85, 247, 0.12);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.25);
    user-select: none;
    white-space: nowrap;
}

.pool-clubs-preview {
    font-size: 0.68rem;
    color: #4ade80;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pool-schedule-preview {
    font-size: 0.68rem;
    color: #d8b4fe;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal Cards & Conflict Badges */
.sport-club-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s ease;
}

.sport-club-card:hover {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(15, 23, 42, 0.9);
}

.sport-club-card.is-selected-card {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.club-conflict-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.club-conflict-badge.conflict-free {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.club-conflict-badge.conflict-warning {
    background: rgba(234, 179, 8, 0.12);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.club-conflict-badge.conflict-busy {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-choose-club {
    background: #10b981;
    color: #042f2e;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-choose-club:hover {
    background: #34d399;
    transform: translateY(-1px);
}

.btn-choose-club.btn-selected {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid #10b981;
    cursor: default;
}

.btn-club-timetable-link {
    background: transparent;
    color: #38bdf8;
    border: 1px solid #38bdf8;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-club-timetable-link:hover {
    background: rgba(56, 189, 248, 0.15);
}

/* Green Download Arrow Button Styling Harmonized with .btn-hud-bell */
#card-btn-direct-downloads:hover {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.12) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25) !important;
    transform: translateY(-2px);
}

/* ==========================================================================
   UI ENHANCEMENTS SUITE (Inspired by Top Student Web App Features)
   ========================================================================== */

/* 1. Floating Back to Top Button (Purple Semi-Transparent, Bottom-Right) */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 28px;
    left: auto !important;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.35); /* Purple semi-transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(192, 132, 252, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 14px rgba(168, 85, 247, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btn-back-to-top:hover {
    background: rgba(168, 85, 247, 0.55);
    border-color: #c084fc;
    box-shadow: 0 6px 22px rgba(168, 85, 247, 0.65);
    transform: translateY(-2px) scale(1.05);
}

.btn-back-to-top:active {
    transform: translateY(0) scale(0.96);
}

@media (max-width: 768px), screen and (max-device-width: 768px) {
    .btn-back-to-top {
        bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
        right: 18px !important;
        left: auto !important;
        width: 42px !important;
        height: 42px !important;
    }

    #notion-tasks-workspace,
    #timetable-workspace,
    #settings-workspace,
    #planner-workspace {
        padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* 2. Modal Reading & Scroll Progress Bar */
.modal-reading-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #10b981 0%, #38bdf8 100%);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
    z-index: 100;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transition: width 0.08s ease-out;
}

/* 3. Recently Viewed Courses Strip */
#recent-courses-chips-container {
    display: none;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 10px;
    margin-bottom: 10px;
}

.recent-course-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 3px 9px;
    border-radius: 14px;
    font-size: 0.74rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.recent-course-chip:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.16);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
}

/* 4. Global Command Palette & Smart Search (Ctrl+K) */
.command-palette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.78);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    z-index: 99999;
    animation: fadeIn 0.18s ease-out;
}

.command-palette-container {
    max-width: 650px;
    width: 92%;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.command-palette-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(30, 41, 59, 0.55);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.command-palette-search-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

.command-palette-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-size: 1.05rem;
    font-family: inherit;
}

.command-palette-input::placeholder {
    color: #64748b;
}

.command-palette-esc-kbd {
    background: #1e293b;
    border: 1px solid #475569;
    color: #94a3b8;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.command-palette-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.command-palette-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 8px 12px 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.command-palette-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 3px;
    border: 1px solid transparent;
    transition: all 0.12s ease;
}

.command-palette-item:hover,
.command-palette-item.selected {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.35);
}

.command-palette-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    font-size: 0.92rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-palette-item-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.command-palette-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-palette-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.command-palette-credits {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
}

.command-palette-shortcut {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
}

.command-palette-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px 20px;
    color: #94a3b8;
    text-align: center;
}

.command-palette-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 18px;
    background: #090d16;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.75rem;
    color: #64748b;
}

.command-palette-footer kbd {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.68rem;
}

/* 5. Course Comparison Modal & Table */
.comparison-modal-content {
    max-width: 820px;
    width: 95%;
}

.comparison-selectors-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    background: rgba(15, 23, 42, 0.75);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.comparison-select-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comparison-select-box label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
}

.comparison-select {
    width: 100%;
    background: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
}

.comparison-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.comparison-vs-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    flex-shrink: 0;
    margin-top: 16px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.88rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.comparison-table th,
.comparison-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    vertical-align: top;
}

.comparison-table th {
    background: rgba(30, 41, 59, 0.6);
    text-align: right;
}

.compare-label {
    font-weight: 700;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.6);
}

.compare-val {
    color: #f1f5f9;
}

.compare-val.highlight-num {
    font-weight: 800;
    color: #34d399;
    font-size: 0.95rem;
}

.conflict-date {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171 !important;
    font-weight: 700;
}

.conflict-pill {
    display: inline-block;
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid #ef4444;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    margin-top: 4px;
}

.syllabus-text {
    font-size: 0.82rem;
    line-height: 1.55;
    color: #cbd5e1;
}

/* 6. Technion FAQ & Academic Rights modal */
.faq-modal-content {
    max-width: 760px;
    width: 95%;
}

.faq-search-box input {
    width: 100%;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px 14px;
    color: #f8fafc;
    font-size: 0.92rem;
    outline: none;
    margin-bottom: 12px;
}

.faq-search-box input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.faq-category-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.faq-cat-pill {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.faq-cat-pill:hover {
    border-color: #38bdf8;
    color: #38bdf8;
}

.faq-cat-pill.active {
    background: #059669;
    border-color: #10b981;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.faq-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-card[open] {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(15, 23, 42, 0.9);
}

.faq-summary {
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #f8fafc;
    user-select: none;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-badge {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    margin-left: 8px;
}

.faq-chevron {
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.faq-card[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-content {
    padding: 12px 16px;
    color: #cbd5e1;
    font-size: 0.86rem;
    line-height: 1.6;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(2, 6, 23, 0.4);
}

/* 7. Keyboard Shortcuts Cheat Sheet modal */
.shortcuts-modal-content {
    max-width: 680px;
    width: 95%;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.shortcut-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 12px 14px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shortcut-key {
    display: flex;
    gap: 4px;
    align-items: center;
}

.shortcut-key kbd {
    background: #1e293b;
    border: 1px solid #475569;
    box-shadow: 0 2px 0 #334155;
    color: #38bdf8;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: inherit;
}

.shortcut-desc {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.4;
}


/* Clean Minimalist HUD: Hide Right Avatar Icon and Redundant Degree Subtitle */
/* Clean Minimalist HUD: Keep Redundant Degree Subtitle Hidden */
#char-title {
    display: none !important;
}


/* Selected Task Row in Notion Tasks Table */
.notion-tasks-table tbody tr.is-row-selected {
    background: rgba(147, 51, 234, 0.16) !important;
    box-shadow: inset 3px 0 0 #a855f7;
}
.notion-tasks-table tbody tr.is-row-selected:hover {
    background: rgba(147, 51, 234, 0.24) !important;
}

.notion-tasks-table .notion-row-checkbox {
    cursor: pointer;
    width: 17px;
    height: 17px;
    accent-color: #a855f7;
    border-radius: 4px;
    vertical-align: middle;
    transition: transform 0.15s ease;
}
.notion-tasks-table .notion-row-checkbox:hover {
    transform: scale(1.15);
}

/* Floating Tasks Bulk Actions Toolbar */
.tasks-bulk-actions-bar {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(140px);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.45);
    box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(168, 85, 247, 0.25);
    border-radius: 18px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-width: 95vw;
    color: #f8fafc;
    direction: rtl;
}

.tasks-bulk-actions-bar.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tasks-bulk-actions-bar .bulk-counter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tasks-bulk-actions-bar .bulk-counter-icon {
    font-size: 1.15rem;
}

.tasks-bulk-actions-bar .bulk-counter-text {
    font-weight: 700;
    font-size: 0.9rem;
    color: #e9d5ff;
}

.tasks-bulk-actions-bar .bulk-actions-divider {
    width: 1px;
    height: 26px;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.tasks-bulk-actions-bar .bulk-actions-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tasks-bulk-actions-bar .bulk-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.tasks-bulk-actions-bar .bulk-btn-duplicate {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}
.tasks-bulk-actions-bar .bulk-btn-duplicate:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.tasks-bulk-actions-bar .bulk-btn-delete {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}
.tasks-bulk-actions-bar .bulk-btn-delete:hover {
    background: rgba(239, 68, 68, 0.24);
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.tasks-bulk-actions-bar .bulk-btn-done {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
}
.tasks-bulk-actions-bar .bulk-btn-done:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.tasks-bulk-actions-bar .bulk-btn-in-progress {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}
.tasks-bulk-actions-bar .bulk-btn-in-progress:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: #f59e0b;
    transform: translateY(-1px);
}

.tasks-bulk-actions-bar .bulk-btn-cancel {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.25);
}
.tasks-bulk-actions-bar .bulk-btn-cancel:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

@media (max-width: 768px) {
    .tasks-bulk-actions-bar {
        bottom: 82px;
        width: 95vw;
        padding: 8px 12px;
        gap: 8px;
        border-radius: 14px;
        justify-content: space-between;
    }
    .tasks-bulk-actions-bar .bulk-actions-divider {
        display: none;
    }
    .tasks-bulk-actions-bar .bulk-actions-buttons {
        gap: 6px;
        width: 100%;
        justify-content: space-between;
    }
    .tasks-bulk-actions-bar .bulk-action-btn {
        padding: 6px 10px;
        font-size: 0.76rem;
        flex: 1 1 auto;
        justify-content: center;
    }
}


/* Notion-style Dark Context Menu (Directly matching user screenshot) */
.task-context-menu {
    position: fixed;
    z-index: 9999;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 5px;
    min-width: 220px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #e5e7eb;
    display: none;
    flex-direction: column;
    animation: ctxFadeIn 0.12s ease-out;
}

@keyframes ctxFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.task-context-menu-header {
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #c084fc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

.task-context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.task-context-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.task-context-menu-item.is-danger:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.task-context-menu-item .ctx-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    width: 18px;
    flex-shrink: 0;
}

.task-context-menu-item:hover .ctx-icon {
    color: #ffffff;
}

.task-context-menu-item.is-danger:hover .ctx-icon {
    color: #fca5a5;
}

.task-context-menu-item .ctx-label {
    flex: 1;
    font-weight: 500;
}

.task-context-menu-item .ctx-shortcut {
    font-size: 0.75rem;
    color: #71717a;
    letter-spacing: 0.5px;
}

.task-context-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

.task-move-course-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #f1f5f9;
    font-size: 0.86rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: right;
    width: 100%;
}
.task-move-course-btn:hover {
    background: rgba(168, 85, 247, 0.16);
    border-color: #a855f7;
    color: #ffffff;
    transform: translateY(-1px);
}
