/* ==========================================================================
   Project Click - Modern Enterprise PM & EVM Platform Stylesheet
   ========================================================================== */

:root,
[data-theme="light"] {
    /* Color Palette - Modern High-Contrast Light Theme (Default) */
    --bg-main: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #F1F5F9;
    --bg-surface-hover: #E2E8F0;
    --border-subtle: #E2E8F0;
    --border-medium: #CBD5E1;
    --border-highlight: #94A3B8;

    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --text-inverse: #FFFFFF;

    /* Brand & Accent Colors - Project Click Royal Blue & Electric Violet */
    --brand-primary: #2563EB;
    --brand-primary-glow: rgba(37, 99, 235, 0.25);
    --brand-accent: #7C3AED;
    --brand-gradient: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    
    --status-completed: #059669;
    --status-completed-glow: rgba(5, 150, 105, 0.25);
    --status-completed-bg: #ECFDF5;

    --status-inprogress: #2563EB;
    --status-inprogress-glow: rgba(37, 99, 235, 0.25);
    --status-inprogress-bg: #EFF6FF;

    --status-upcoming: #64748B;
    --status-upcoming-glow: rgba(100, 116, 139, 0.15);
    --status-upcoming-bg: #F8FAFC;

    --status-milestone: #D97706;
    --status-milestone-glow: rgba(217, 119, 6, 0.25);

    --status-critical: #DC2626;
    --status-critical-glow: rgba(220, 38, 38, 0.25);

    /* Grid & UI Metrics */
    --row-height: 42px;
    --header-height: 58px;
    --timeline-header-height: 54px;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    --shadow-dropdown: 0 12px 30px -5px rgba(15, 23, 42, 0.15);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

[data-theme="dark"] {
    /* Color Palette - Dark Theme */
    --bg-main: #0B0F19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1F2937;
    --bg-surface-hover: #283548;
    --border-subtle: #1F2937;
    --border-medium: #374151;
    --border-highlight: #4B5563;

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-inverse: #0F172A;

    --brand-primary: #3B82F6;
    --brand-primary-glow: rgba(59, 130, 246, 0.35);
    --brand-accent: #8B5CF6;
    --brand-gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    
    --status-completed: #10B981;
    --status-completed-glow: rgba(16, 185, 129, 0.3);
    --status-completed-bg: rgba(16, 185, 129, 0.15);

    --status-inprogress: #3B82F6;
    --status-inprogress-glow: rgba(59, 130, 246, 0.35);
    --status-inprogress-bg: rgba(59, 130, 246, 0.15);

    --status-upcoming: #64748B;
    --status-upcoming-glow: rgba(100, 116, 139, 0.2);
    --status-upcoming-bg: rgba(100, 116, 139, 0.15);

    --status-milestone: #F59E0B;
    --status-milestone-glow: rgba(245, 158, 11, 0.35);

    --status-critical: #EF4444;
    --status-critical-glow: rgba(239, 68, 68, 0.35);

    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-dropdown: 0 12px 30px -5px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   Base & Layout
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 100vw;
    overflow: hidden;
}

/* ==========================================================================
   Header & Brand Navigation (Project Click)
   ========================================================================== */
.app-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    gap: 16px;
}

.header-left, .header-right, .header-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    padding-right: 12px;
    border-right: 1px solid var(--border-medium);
}

.brand-logo {
    width: 36px;
    height: 36px;
    background: var(--brand-gradient);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #FFFFFF;
    box-shadow: 0 0 15px var(--brand-primary-glow);
}

.brand-name {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
}

.brand-title strong {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* Project Selector Dropdown */
.project-selector-wrapper {
    position: relative;
}

.project-selector-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    color: var(--text-primary);
    max-width: 320px;
    transition: all var(--transition-fast);
}

.project-selector-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--brand-primary);
}

.project-avatar {
    width: 26px;
    height: 26px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--brand-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.project-meta-top {
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 0;
}

.project-active-label {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.project-active-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.caret-icon {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-left: 4px;
}

.project-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-dropdown);
    width: 340px;
    display: none;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.project-selector-wrapper.open .project-dropdown-menu {
    display: flex;
    animation: fadeInSlide 0.15s ease;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.btn-text-primary {
    background: transparent;
    border: none;
    color: var(--brand-primary);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-text-primary:hover {
    text-decoration: underline;
}

.project-list-items {
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.project-menu-item:hover {
    background: var(--bg-surface-elevated);
}

.project-menu-item.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
}

.project-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.project-item-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-item-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.dropdown-actions {
    padding: 8px 10px;
    background: var(--bg-surface-elevated);
    border-top: 1px solid var(--border-subtle);
}

/* Action Toolbar */
.project-action-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-action-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-action-icon:hover {
    background: var(--bg-surface-hover);
    border-color: var(--brand-primary);
}

.save-status-text {
    font-size: 0.7rem;
    color: #10B981;
}

/* User Session Widget */
.user-session-widget {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    padding: 4px 10px 4px 6px;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.user-profile-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--brand-primary);
}

.user-avatar-circle {
    width: 28px;
    height: 28px;
    background: var(--brand-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #FFFFFF;
}

.user-info-short {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-name {
    font-size: 0.74rem;
    font-weight: 700;
}

.user-role-badge {
    font-size: 0.58rem;
    color: var(--brand-primary);
    font-weight: 600;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-dropdown);
    width: 230px;
    display: none;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.user-session-widget.open .user-dropdown-menu {
    display: flex;
    animation: fadeInSlide 0.15s ease;
}

.user-dropdown-header {
    padding: 12px;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-dropdown-header strong {
    font-size: 0.82rem;
}

.user-dropdown-header span {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.user-badge-pill {
    background: rgba(59, 130, 246, 0.15);
    color: var(--brand-primary);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.62rem !important;
    font-weight: 700;
    display: inline-block;
    width: fit-content;
    margin-top: 4px;
}

.user-dropdown-body {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-dropdown-body button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.user-dropdown-body button:hover {
    background: var(--bg-surface-elevated);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

/* ==========================================================================
   Buttons & Controls
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-family);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-primary);
    color: #FFFFFF;
    box-shadow: 0 2px 8px var(--brand-primary-glow);
}

.btn-primary:hover {
    background: #2563EB;
    box-shadow: 0 4px 12px var(--brand-primary-glow);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-outline:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-highlight);
}

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

.btn-icon-only {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--border-radius-sm);
}

.btn-group {
    display: inline-flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    padding: 2px;
    gap: 2px;
}

.btn-group .btn {
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
}

.btn-group .btn.active, .btn-group .btn:hover {
    background: var(--brand-primary);
    color: #FFFFFF;
}

.w-100 { width: 100% !important; }
.mt-2 { margin-top: 8px !important; }

/* Theme Toggle */
.light-icon { display: none; }
.dark-icon { display: inline-block; color: #475569; }

[data-theme="dark"] .light-icon { display: inline-block; color: #F59E0B; }
[data-theme="dark"] .dark-icon { display: none; }
[data-theme="light"] .light-icon { display: none; }
[data-theme="light"] .dark-icon { display: inline-block; color: #334155; }

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

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-dropdown);
    padding: 6px;
    min-width: 210px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
}

.dropdown.open .dropdown-menu {
    display: flex;
    animation: fadeInSlide 0.15s ease;
}

.dropdown-menu a, .dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    border-radius: 4px;
    cursor: pointer;
}

.dropdown-menu a:hover, .dropdown-menu button:hover {
    background: var(--bg-surface-elevated);
}

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

/* ==========================================================================
   KPI Ribbon Cards
   ========================================================================== */
.kpi-ribbon {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.1fr 1.1fr;
    gap: 14px;
    padding: 10px 20px;
    background: var(--bg-main);
    flex-shrink: 0;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-highlight);
}

.kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #A855F7; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }

.kpi-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kpi-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.kpi-info h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 1px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-total {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.kpi-subtext {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Circular Progress Chart */
.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 44px;
    max-height: 44px;
}

.circle-bg {
    fill: none;
    stroke: var(--bg-surface-elevated);
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 3.8;
    stroke-linecap: round;
    stroke: var(--status-completed);
    transition: stroke-dasharray 0.8s ease;
}

.percentage {
    fill: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.55rem;
    font-weight: 800;
    text-anchor: middle;
}

.badge-success {
    font-size: 0.68rem;
    font-weight: 600;
    color: #10B981;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   Analytics / S-Curve Drawer
   ========================================================================== */
.analytics-drawer {
    display: none;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-medium);
    padding: 16px 24px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
    z-index: 15;
    animation: fadeInSlide 0.2s ease;
}

.analytics-drawer.open {
    display: block;
}

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

.drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-title h2 {
    font-size: 1.05rem;
    font-weight: 700;
}

.drawer-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.chart-container {
    height: 220px;
    position: relative;
    background: var(--bg-surface-elevated);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
}

.analytics-summary-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.analytics-subcard {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
}

.analytics-subcard h4 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.analytics-subcard .val {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.analytics-subcard p {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Views & Tab Switching System
   ========================================================================== */
.views-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.view-panel {
    display: none;
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.view-panel.active {
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Gantt Controls Bar
   ========================================================================== */
.gantt-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-medium);
    flex-shrink: 0;
    gap: 16px;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.search-box input {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 5px 12px 5px 30px;
    border-radius: var(--border-radius-sm);
    font-size: 0.78rem;
    width: 220px;
    outline: none;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary-glow);
    width: 260px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.select-control {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 5px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 0.76rem;
    outline: none;
    cursor: pointer;
}

/* ==========================================================================
   Gantt Main Pane (Dual Split View)
   ========================================================================== */
.gantt-main-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    background: var(--bg-main);
}

/* Left Pane: Table */
.gantt-task-table-pane {
    width: 530px;
    min-width: 320px;
    max-width: 800px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-medium);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    user-select: none;
}

.table-header-row {
    height: var(--timeline-header-height);
    background: var(--bg-surface-elevated);
    border-bottom: 2px solid var(--border-medium);
    display: flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0 10px;
    flex-shrink: 0;
}

.col-wbs { width: 48px; flex-shrink: 0; text-align: center; }
.col-task-name { flex: 1; min-width: 140px; padding: 0 4px; }
.col-dates { width: 92px; flex-shrink: 0; text-align: center; font-size: 0.68rem; }
.col-dur { width: 36px; flex-shrink: 0; text-align: center; }
.col-progress { width: 62px; flex-shrink: 0; text-align: center; }
.col-status { width: 78px; flex-shrink: 0; text-align: center; }
.col-actions { width: 30px; flex-shrink: 0; text-align: center; }

.table-body {
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.task-row {
    height: var(--row-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 10px;
    font-size: 0.78rem;
    transition: background var(--transition-fast);
    cursor: pointer;
}

.task-row:hover {
    background: var(--bg-surface-hover);
}

.task-row.selected {
    background: rgba(59, 130, 246, 0.12);
    border-left: 3px solid var(--brand-primary);
}

.task-row.level-1 {
    background: var(--bg-surface-elevated);
    font-weight: 700;
    color: var(--text-primary);
}

.task-row.level-2 {
    font-weight: 600;
    color: var(--text-primary);
}

.task-row.level-3 {
    color: var(--text-secondary);
}

.task-title-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-toggle-btn {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 3px;
    flex-shrink: 0;
}

.tree-toggle-btn:hover {
    background: var(--border-medium);
    color: var(--text-primary);
}

.tree-indent-1 { padding-left: 4px; }
.tree-indent-2 { padding-left: 18px; }
.tree-indent-3 { padding-left: 34px; }

.status-pill {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    display: inline-block;
    text-align: center;
}

.status-pill.status-completed {
    background: var(--status-completed-bg);
    color: var(--status-completed);
}

.status-pill.status-in-progress {
    background: var(--status-inprogress-bg);
    color: var(--brand-primary);
}

.status-pill.status-upcoming {
    background: var(--status-upcoming-bg);
    color: var(--text-muted);
}

.mini-prog-container {
    width: 100%;
    background: var(--bg-surface-elevated);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-top: 3px;
}

.mini-prog-fill {
    height: 100%;
    background: var(--brand-primary);
    border-radius: 3px;
}

.mini-prog-fill.done {
    background: var(--status-completed);
}

.gantt-resizer {
    width: 5px;
    background: var(--border-medium);
    cursor: col-resize;
    transition: background 0.15s;
    z-index: 10;
}

.gantt-resizer:hover, .gantt-resizer.resizing {
    background: var(--brand-primary);
}

/* Right Pane: Timeline */
.gantt-timeline-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: var(--bg-main);
}

.timeline-header-container {
    height: var(--timeline-header-height);
    background: var(--bg-surface-elevated);
    border-bottom: 2px solid var(--border-medium);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.timeline-header-tier-1, .timeline-header-tier-2 {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    height: 27px;
    white-space: nowrap;
}

.timeline-header-tier-2 {
    top: 27px;
    border-top: 1px solid var(--border-subtle);
}

.timeline-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-subtle);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-sizing: border-box;
    text-align: center;
}

.timeline-header-tier-1 .timeline-cell {
    background: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.74rem;
}

.timeline-cell.weekend {
    background: rgba(0, 0, 0, 0.15);
}

.timeline-body-container {
    flex: 1;
    overflow: auto;
    position: relative;
    scrollbar-width: thin;
}

.timeline-grid-background {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    pointer-events: none;
    display: flex;
}

.grid-col {
    border-right: 1px solid var(--border-subtle);
    height: 100%;
    box-sizing: border-box;
}

.grid-col.weekend {
    background: rgba(255, 255, 255, 0.01);
}

.today-marker-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #EF4444;
    z-index: 8;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.today-badge {
    position: absolute;
    top: 4px;
    left: -48px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 0.64rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.gantt-bars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.gantt-bar-row {
    height: var(--row-height);
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.gantt-bar {
    position: absolute;
    top: 8px;
    height: 24px;
    border-radius: 4px;
    cursor: grab;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: box-shadow var(--transition-fast);
    display: flex;
    align-items: center;
    padding: 0 8px;
    user-select: none;
}

.gantt-bar:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 5;
}

.gantt-bar.is-dragging {
    cursor: grabbing !important;
    z-index: 100 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(59, 130, 246, 0.6) !important;
    opacity: 0.92;
    border-color: #60A5FA !important;
}

.gantt-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.gantt-bar:hover .gantt-resize-handle {
    opacity: 0.5;
}

.gantt-resize-handle:hover,
.gantt-resize-handle.is-active {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.45);
}

.gantt-resize-handle.handle-left {
    left: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.gantt-resize-handle.handle-right {
    right: 0;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.gantt-bar.completed {
    background: #064E3B;
    border: 1px solid var(--status-completed);
}

.gantt-bar.completed .gantt-bar-fill {
    background: var(--status-completed);
}

.gantt-bar.in-progress {
    background: #1E3A8A;
    border: 1px solid var(--brand-primary);
}

.gantt-bar.in-progress .gantt-bar-fill {
    background: linear-gradient(90deg, #2563EB, #3B82F6);
}

.gantt-bar.upcoming {
    background: #1E293B;
    border: 1px solid #475569;
}

.gantt-bar.upcoming .gantt-bar-fill {
    background: #475569;
}

.gantt-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: 3px;
    opacity: 0.9;
    pointer-events: none;
}

.gantt-bar-label {
    position: relative;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.gantt-milestone {
    position: absolute;
    top: 11px;
    width: 20px;
    height: 20px;
    background: var(--status-milestone);
    transform: rotate(45deg);
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 10px var(--status-milestone-glow);
    cursor: grab;
    z-index: 6;
    transition: box-shadow var(--transition-fast);
}

.gantt-milestone:hover {
    transform: rotate(45deg) scale(1.15);
}

.gantt-milestone.is-dragging {
    cursor: grabbing !important;
    z-index: 100 !important;
    transform: rotate(45deg) scale(1.25) !important;
    border-color: #60A5FA !important;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.8) !important;
}

/* Floating Gantt Drag HUD Tooltip */
.gantt-drag-tooltip {
    position: fixed;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.6);
    border-radius: 8px;
    padding: 8px 14px;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-family: inherit;
    pointer-events: none;
    z-index: 999999;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(59, 130, 246, 0.35);
    transform: translate(-50%, -130%);
    display: none;
    white-space: nowrap;
}

.gantt-drag-tooltip .drag-task-name {
    font-weight: 700;
    color: #60A5FA;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gantt-drag-tooltip .drag-dates-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: #E2E8F0;
}

.gantt-drag-tooltip .drag-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.gantt-drag-tooltip .drag-badge.delta {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.gantt-svg-links {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    overflow: visible;
}

.gantt-svg-links > path,
svg path.normal-dep-link,
svg path.critical-dep-link {
    fill: none !important;
}

svg path.normal-dep-link {
    stroke: #3B82F6 !important;
    stroke-width: 1.5px !important;
    opacity: 0.75;
}

svg path.critical-dep-link {
    stroke: #EF4444 !important;
    stroke-width: 2.2px !important;
    opacity: 0.95;
    filter: drop-shadow(0px 0px 3px rgba(239, 68, 68, 0.4));
}

svg path.dimmed-link {
    opacity: 0.15 !important;
}

/* Ensure SVG arrow markers have solid fill colors */
.gantt-svg-links marker polygon,
.gantt-svg-links marker path {
    stroke: none !important;
}

#arrow-blue polygon,
#arrow-blue path {
    fill: #3B82F6 !important;
}

#arrow-red polygon,
#arrow-red path {
    fill: #EF4444 !important;
}

#arrow-gray polygon,
#arrow-gray path {
    fill: #94A3B8 !important;
}

/* ==========================================================================
   EVM Executive Command Center Styles
   ========================================================================== */
.evm-dashboard-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-main);
}

.evm-gauges-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.evm-gauge-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 16px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.gauge-header h3 {
    font-size: 0.92rem;
    font-weight: 700;
}

.gauge-formula {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    background: var(--bg-surface-elevated);
    padding: 2px 6px;
    border-radius: 4px;
}

.gauge-display {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.gauge-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    line-height: 1;
}

.gauge-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.gauge-bar-track {
    height: 8px;
    background: var(--bg-surface-elevated);
    border-radius: 4px;
    position: relative;
    overflow: visible;
}

.gauge-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.fill-emerald { background: linear-gradient(90deg, #10B981, #059669); }
.fill-blue { background: linear-gradient(90deg, #3B82F6, #2563EB); }
.fill-amber { background: linear-gradient(90deg, #F59E0B, #D97706); }
.fill-red { background: linear-gradient(90deg, #EF4444, #DC2626); }

.gauge-benchmark-line {
    position: absolute;
    top: -2px;
    bottom: -2px;
    left: 70%;
    width: 2px;
    background: #FFFFFF;
    border-radius: 1px;
    box-shadow: 0 0 5px rgba(255,255,255,0.8);
}

.gauge-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.gauge-desc {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.evm-details-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 16px;
}

.evm-panel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.panel-card-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.panel-card-header h3 {
    font-size: 0.92rem;
    font-weight: 700;
}

.es-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.es-item {
    background: var(--bg-surface-elevated);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.es-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
}

.es-val {
    font-size: 0.98rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.simulator-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sim-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sim-row label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.sim-row input[type="range"] {
    accent-color: var(--brand-primary);
}

.sim-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.sim-result-box {
    background: var(--bg-surface-elevated);
    padding: 8px;
    border-radius: var(--border-radius-sm);
    text-align: center;
}

.sim-lbl {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.sim-val {
    font-size: 1.05rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.narrative-card .narrative-content {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    background: var(--bg-surface-elevated);
    padding: 14px;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--brand-primary);
}

.narrative-content p {
    margin-bottom: 6px;
}

.narrative-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   EVM Work Breakdown Matrix Table
   ========================================================================== */
.matrix-table-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 20px;
    background: var(--bg-main);
    overflow: hidden;
}

.matrix-controls-ribbon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.matrix-controls-ribbon h3 {
    font-size: 1rem;
    font-weight: 700;
}

.matrix-legend {
    display: flex;
    gap: 10px;
    font-size: 0.7rem;
}

.matrix-table-scroll {
    flex: 1;
    overflow: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-card);
}

.evm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    text-align: left;
}

.evm-table th {
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 9px 12px;
    border-bottom: 2px solid var(--border-medium);
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.evm-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    white-space: nowrap;
}

.evm-table tr:hover {
    background: var(--bg-surface-hover);
}

.evm-table tr.evm-group-row {
    background: var(--bg-surface-elevated);
    font-weight: 700;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
}

/* ==========================================================================
   Footer & Legend
   ========================================================================== */
.app-footer {
    height: 36px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

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

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.color-completed { background: var(--status-completed); }
.color-inprogress { background: var(--brand-primary); }
.color-upcoming { background: #475569; }
.color-milestone { background: var(--status-milestone); transform: rotate(45deg); width: 7px; height: 7px; }
.color-today { background: #EF4444; width: 2px; height: 12px; }

/* ==========================================================================
   Modals, Forms & Dialogs
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 580px;
    box-shadow: var(--shadow-dropdown);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-card.modal-large {
    max-width: 820px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-title i {
    font-size: 1.2rem;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

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

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 18px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-form {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.form-group.col-3 { flex: 0 0 calc(25% - 9px); }
.form-group.col-4 { flex: 0 0 33.33%; }
.form-group.col-6 { flex: 0 0 calc(50% - 6px); }
.form-group.col-8 { flex: 0 0 calc(66.66% - 12px); }

.form-section-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
    margin-top: 6px;
}

.template-select-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.flex-1 { flex: 1; }

.pred-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    max-height: 75px;
    overflow-y: auto;
    padding: 4px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    border: 1px dashed var(--border-subtle);
}

.pred-chip {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pred-chip:hover {
    border-color: var(--brand-primary);
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-primary);
}

.pred-chip.selected {
    background: #3B82F6 !important;
    color: #FFFFFF !important;
    border-color: #3B82F6 !important;
    font-weight: 600;
}

/* ==========================================================================
   Leaflet Geo-Map Picker Styles
   ========================================================================== */
.map-picker-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    padding: 10px;
}

.map-picker-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.map-hint {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.map-quick-presets {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.btn-preset-loc {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 2px 7px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-preset-loc:hover {
    background: var(--brand-primary);
    color: #FFFFFF;
    border-color: var(--brand-primary);
}

.leaflet-map-element {
    height: 180px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid var(--border-medium);
    z-index: 5;
}

/* Template Preview Modal Styles */
.template-summary-ribbon {
    display: flex;
    justify-content: space-between;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 0.74rem;
}

.template-wbs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.prev-wbs-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-surface-elevated);
    border-radius: 6px;
    font-size: 0.76rem;
}

.prev-wbs-item.prev-is-group {
    background: var(--bg-surface-hover);
    font-weight: 700;
}

.prev-wbs-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prev-wbs-code {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--brand-primary);
    background: var(--bg-surface);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Hierarchy Badges */
.badge-hierarchy-parent {
    background: rgba(168, 85, 247, 0.15);
    color: #A855F7;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.62rem;
    font-weight: 700;
}

.badge-hierarchy-child {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.62rem;
    font-weight: 700;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 0.78rem;
    outline: none;
    font-family: var(--font-family);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary-glow);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-surface-elevated);
    border-top: 1px solid var(--border-subtle);
}

.modal-footer.justify-center {
    justify-content: center;
}

.modal-actions-right {
    display: flex;
    gap: 10px;
}

/* ==========================================================================
   Project Hub Portfolio Grid
   ========================================================================== */
.hub-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.project-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-height: 460px;
    overflow-y: auto;
}

.hub-project-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.hub-project-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-card);
}

.hub-project-card.active-card {
    border-color: var(--brand-primary);
    background: rgba(59, 130, 246, 0.08);
}

.hub-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hub-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hub-card-code {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 2px 6px;
    border-radius: 4px;
}

.hub-card-desc {
    font-size: 0.74rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hub-card-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    background: var(--bg-surface);
    padding: 8px 10px;
    border-radius: 6px;
}

.hub-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Share Modal Styles
   ========================================================================== */
.invite-box {
    display: flex;
    gap: 8px;
}

.invite-inputs {
    display: flex;
    gap: 6px;
    flex: 1;
}

.invite-inputs input {
    flex: 1;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 7px 10px;
    font-size: 0.78rem;
}

.share-link-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg-surface-elevated);
    padding: 12px;
    border-radius: var(--border-radius-sm);
}

.share-link-section label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.copy-link-bar {
    display: flex;
    gap: 6px;
}

.copy-link-bar input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 6px 10px;
    font-size: 0.74rem;
    border-radius: var(--border-radius-sm);
}

.collaborators-section h4 {
    font-size: 0.78rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.collaborators-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.collaborator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--bg-surface-elevated);
    border-radius: 6px;
}

.collab-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.collab-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #FFFFFF;
}

.collab-details {
    display: flex;
    flex-direction: column;
}

.collab-name {
    font-size: 0.76rem;
    font-weight: 700;
}

.collab-email {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.collab-role-tag {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

/* ==========================================================================
   User Auth Modal (Sign in / Sign Up / Demo)
   ========================================================================== */
.auth-modal-card {
    max-width: 440px;
}

.auth-brand-header {
    text-align: center;
    padding: 24px 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.auth-brand-header .brand-logo {
    width: 48px;
    height: 48px;
    font-size: 20px;
    border-radius: 12px;
}

.auth-brand-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
}

.auth-brand-header h2 strong {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-brand-header p {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-medium);
    background: var(--bg-surface-elevated);
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
    background: var(--bg-surface);
}

.auth-form {
    display: none;
    padding: 20px;
    flex-direction: column;
    gap: 12px;
}

.auth-form.active {
    display: flex;
}

.auth-alert-error {
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #EF4444;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-alert-success {
    padding: 10px 12px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10B981;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 36px;
}

.btn-toggle-pwd {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.btn-toggle-pwd:hover {
    color: var(--brand-primary);
}

.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    margin-top: -2px;
}

.auth-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--transition-fast);
}

.auth-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.auth-switch-text {
    text-align: center;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.demo-intro {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.demo-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.demo-user-card:hover {
    border-color: var(--brand-primary);
    background: var(--bg-surface-hover);
    transform: translateX(3px);
}

.demo-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563EB;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
}

.demo-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.demo-info strong {
    font-size: 0.78rem;
}

.demo-info span {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
    pointer-events: none;
}

.toast-msg {
    pointer-events: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-left: 4px solid var(--brand-primary);
    box-shadow: var(--shadow-dropdown);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.25s ease;
}

.toast-msg.toast-success { border-left-color: #10B981; }
.toast-msg.toast-error { border-left-color: #EF4444; }
.toast-msg.toast-info { border-left-color: #3B82F6; }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Helpers */
.text-emerald { color: #10B981 !important; }
.text-blue { color: #3B82F6 !important; }
.text-purple { color: #A855F7 !important; }
.text-amber { color: #F59E0B !important; }
.text-red { color: #EF4444 !important; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Print / Export PDF Mode Styles
   ========================================================================== */
@media print {
    body, .app-container {
        height: auto !important;
        overflow: visible !important;
        background: #FFFFFF !important;
        color: #000000 !important;
    }
    
    .app-header,
    .gantt-controls-bar,
    .app-footer,
    .modal-overlay,
    .toast-container,
    .btn-close {
        display: none !important;
    }
    
    .gantt-main-wrapper {
        display: block !important;
        overflow: visible !important;
    }
    
    .gantt-task-table-pane {
        width: 100% !important;
        max-width: 100% !important;
        border: 1px solid #CCC !important;
        page-break-after: avoid;
    }

    .kpi-ribbon {
        grid-template-columns: repeat(5, 1fr) !important;
        background: #FFF !important;
    }
}

/* ==========================================================================
   Project Click - Landing Page Stylesheet
   ========================================================================== */
.landing-page-wrapper {
    min-height: 100vh;
    background: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

.landing-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Landing Navbar */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-normal);
}

[data-theme="dark"] .landing-header {
    background: rgba(17, 24, 39, 0.85);
}

.landing-nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.landing-nav-links .nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.landing-nav-links .nav-link:hover {
    color: var(--brand-primary);
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hero Section */
.landing-hero {
    position: relative;
    padding: 70px 0 60px 0;
    overflow: hidden;
    text-align: center;
}

.hero-glow-blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    top: -100px;
    left: 10%;
    background: radial-gradient(circle, #3B82F6 0%, rgba(59, 130, 246, 0) 70%);
}

.blob-2 {
    top: 50px;
    right: 10%;
    background: radial-gradient(circle, #8B5CF6 0%, rgba(139, 92, 246, 0) 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
}

.badge-pill-new {
    background: var(--brand-gradient);
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    max-width: 950px;
}

.hero-gradient-text {
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 50%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 780px;
    line-height: 1.6;
    margin-bottom: 34px;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
}

.btn-hero-primary {
    background: var(--brand-gradient);
    color: #FFFFFF;
    border: none;
    padding: 14px 28px;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-fast);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5);
}

.btn-hero-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
    padding: 14px 26px;
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-fast);
}

.btn-hero-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

.btn-hero-outline {
    background: transparent;
    color: var(--brand-primary);
    border: 1px dashed var(--brand-primary);
    padding: 14px 22px;
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-hero-outline:hover {
    background: rgba(37, 99, 235, 0.08);
}

.hero-trust-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

/* Showcase Window Deck */
.hero-showcase-deck {
    width: 100%;
    max-width: 1100px;
    margin-top: 10px;
}

.showcase-window {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    text-align: left;
}

.showcase-window-bar {
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot-red { background: #EF4444; }
.dot-yellow { background: #F59E0B; }
.dot-green { background: #10B981; }

.window-address {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 4px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-live-pulse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #10B981;
    background: rgba(16, 185, 129, 0.12);
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10B981;
    animation: pulseGlow 1.5s infinite;
}

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

.showcase-preview-body {
    padding: 20px;
    background: var(--bg-main);
}

.showcase-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.preview-kpi-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 12px 14px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-card);
}

.preview-kpi-box .kpi-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.preview-kpi-box .kpi-num {
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-kpi-box .kpi-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.showcase-visual-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.showcase-gantt-preview {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 14px;
    box-shadow: var(--shadow-card);
}

.mini-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.mini-gantt-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    padding: 7px 0;
    font-size: 0.74rem;
    border-bottom: 1px solid var(--border-subtle);
}

.mini-gantt-row:last-child {
    border-bottom: none;
}

.mini-gantt-row.indent {
    padding-left: 14px;
    color: var(--text-secondary);
}

.mini-bar-track {
    height: 7px;
    background: var(--border-subtle);
    border-radius: 999px;
    overflow: hidden;
    width: 90%;
}

.mini-bar-fill {
    height: 100%;
    border-radius: 999px;
}

.mini-bar-fill.fill-blue { background: #3B82F6; }
.mini-bar-fill.fill-emerald { background: #10B981; }
.mini-bar-fill.fill-amber { background: #F59E0B; }

.showcase-sidebar-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-widget-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 14px;
    box-shadow: var(--shadow-card);
}

.mini-widget-card .widget-title {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mini-widget-card .widget-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.mini-map-preview-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Standards Strip */
.standards-strip {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 24px 0;
    text-align: center;
}

.standards-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.standards-logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.standard-pill {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Section Common */
.section-header {
    margin-bottom: 48px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--brand-primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
}

/* Features Grid */
.features-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-primary);
    box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.15);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 18px;
}

.bg-blue-subtle { background: rgba(37, 99, 235, 0.12); }
.bg-emerald-subtle { background: rgba(16, 185, 129, 0.12); }
.bg-purple-subtle { background: rgba(139, 92, 246, 0.12); }
.bg-amber-subtle { background: rgba(245, 158, 11, 0.12); }
.bg-cyan-subtle { background: rgba(6, 182, 212, 0.12); }
.bg-red-subtle { background: rgba(239, 68, 68, 0.12); }

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 16px;
    flex: 1;
}

.feature-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
}

.feature-checklist li {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Calculator Section */
.calculator-section {
    padding: 70px 0;
    background: var(--bg-surface-elevated);
}

.calculator-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15);
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 20px;
}

.calc-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: inline-block;
}

.calc-interactive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.calc-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calc-input-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.calc-input-group label strong {
    color: var(--brand-primary);
    font-family: var(--font-mono);
}

.calc-metric-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.calc-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
}

.calc-box.highlight {
    border-color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.04);
}

.calc-box-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
    display: block;
}

.calc-box-val {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-mono);
    display: block;
}

.calc-box-sub {
    font-size: 0.68rem;
    font-weight: 700;
    color: #10B981;
}

.calc-eac-summary {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

/* Template Showcase */
.templates-showcase-section {
    padding: 80px 0;
}

.template-category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.template-tab-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.template-tab-btn.active, .template-tab-btn:hover {
    background: var(--brand-primary);
    color: #FFFFFF;
    border-color: var(--brand-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.template-cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.landing-template-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-md);
    padding: 22px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.landing-template-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.landing-template-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.45;
}

.landing-template-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
}

/* Comparison Table */
.comparison-section {
    padding: 70px 0;
    background: var(--bg-surface-elevated);
}

.comparison-table-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.comparison-table th, .comparison-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
}

.comparison-table th {
    background: var(--bg-surface-elevated);
    font-weight: 700;
    color: var(--text-secondary);
}

.comparison-table th.highlight-col,
.comparison-table td.highlight-col {
    background: rgba(37, 99, 235, 0.05);
    border-left: 2px solid var(--brand-primary);
    border-right: 2px solid var(--brand-primary);
    font-weight: 700;
}

.comparison-table th.highlight-col {
    color: var(--brand-primary);
    font-size: 0.95rem;
}

.comparison-table td.feature-title {
    font-weight: 600;
    color: var(--text-primary);
}

/* CTA Banner */
.landing-cta-banner {
    padding: 70px 0;
    background: var(--brand-gradient);
    color: #FFFFFF;
}

.cta-banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.cta-text h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.cta-text p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 580px;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    flex-shrink: 0;
}

.landing-cta-banner .btn-hero-primary {
    background: #FFFFFF;
    color: var(--brand-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.landing-cta-banner .btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Landing Footer */
.landing-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-medium);
    padding: 50px 0 20px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-tagline {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 14px 0;
    max-width: 320px;
}

.footer-theme-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-links-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links-col a, .footer-links-col .btn-footer-link {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    padding: 5px 0;
    cursor: pointer;
    text-align: left;
    transition: color var(--transition-fast);
}

.footer-links-col a:hover, .footer-links-col .btn-footer-link:hover {
    color: var(--brand-primary);
}

.footer-bottom-bar {
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-return-landing {
    margin-right: 12px;
}

/* Responsive queries */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .showcase-visual-split { grid-template-columns: 1fr; }
    .showcase-kpi-row { grid-template-columns: repeat(2, 1fr); }
    .calc-interactive-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
    .cta-banner-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    .landing-nav-links { display: none; }
    .hero-title { font-size: 2.2rem; }
    .features-grid { grid-template-columns: 1fr; }
    .template-cards-container { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Critical Path Method (CPM) & PERT Network Analysis Styles
   ========================================================================== */
.btn-cpm-toggle {
    border-color: rgba(239, 68, 68, 0.4);
    color: #EF4444;
}

.btn-cpm-toggle:hover,
.btn-cpm-toggle.active {
    background: #EF4444 !important;
    color: #FFFFFF !important;
    border-color: #EF4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* Critical bar styles on Gantt chart */
.gantt-bar-item.critical-task .gantt-bar-inner {
    border: 2px solid #EF4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5) !important;
}

.gantt-bar-item.critical-task .gantt-bar-progress {
    background: linear-gradient(90deg, #EF4444 0%, #DC2626 100%) !important;
}

.gantt-row.critical-row {
    background: rgba(239, 68, 68, 0.04);
}

.critical-wbs-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    margin-left: 6px;
    text-transform: uppercase;
}

/* Dim non-critical tasks when filter active */
.critical-highlight-active .gantt-row:not(.critical-row) {
    opacity: 0.35;
}
.critical-highlight-active .gantt-bar-item:not(.critical-task) {
    opacity: 0.25;
}

/* SVG critical dependency arrows */
svg path.critical-dep-link {
    stroke: #EF4444 !important;
    stroke-width: 2.2 !important;
    filter: drop-shadow(0px 0px 3px rgba(239, 68, 68, 0.6));
}

/* CPM Dashboard & KPI Ribbon */
.cpm-dashboard-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    overflow-y: auto;
}

.cpm-kpi-ribbon {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.cpm-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
}

.cpm-kpi-card.highlight-critical {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.03);
}

.cpm-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cpm-lbl {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.cpm-kpi-val {
    font-size: 1.45rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.cpm-kpi-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.cpm-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
}

/* AON Network Diagram Canvas */
.cpm-aon-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aon-legend-strip {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.aon-sample-node {
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    background: var(--bg-surface-elevated);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    width: 140px;
    text-align: center;
}

.aon-sample-node .aon-row {
    display: grid;
    padding: 2px 4px;
}

.aon-sample-node .top-row,
.aon-sample-node .bot-row {
    grid-template-columns: 1fr 1fr 1fr;
    background: rgba(0,0,0,0.04);
}

.aon-sample-node .mid-row {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 700;
}

.cpm-aon-canvas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    max-height: 520px;
    overflow-y: auto;
    padding: 10px 4px;
}

.aon-node-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--transition-fast);
}

.aon-node-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.15);
}

.aon-node-card.critical-node {
    border: 2px solid #EF4444;
    background: rgba(239, 68, 68, 0.03);
}

.aon-node-card .node-top-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 6px 8px;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    text-align: center;
}

.aon-node-card .node-mid-body {
    padding: 10px 12px;
}

.aon-node-card .node-wbs {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 2px;
}

.aon-node-card .node-name {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.aon-node-card .node-progress-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.aon-node-card .node-bot-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 6px 8px;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    text-align: center;
}

.cpm-table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

/* ==========================================================================
   Project Management & Risk Tools Suite
   ========================================================================== */
.pm-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.pm-tool-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.tool-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface-elevated);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.tool-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* PERT Estimator */
.pert-inputs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.pert-input-col label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 6px;
}

.pert-results-deck {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 14px;
}

.pert-res-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pert-res-item.highlight {
    border-left: 3px solid #10B981;
    padding-left: 8px;
}

.pert-res-item .lbl {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.pert-res-item .val {
    font-size: 0.98rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

/* Resource Histogram */
.resource-histogram-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.res-hist-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.res-hist-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
}

.res-bar-track {
    height: 14px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.res-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.res-bar-fill.normal { background: #3B82F6; }
.res-bar-fill.overload { background: #EF4444; }

/* Baseline Comparison */
.baseline-comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.baseline-col {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.baseline-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-block;
}

.baseline-contract { background: rgba(100, 116, 139, 0.15); color: var(--text-secondary); }
.baseline-current { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.baseline-evm { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }

.baseline-date-val {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.baseline-note {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Schedule Crashing Table */
.crashing-options-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.crash-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 1fr;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.76rem;
    border-bottom: 1px solid var(--border-subtle);
}

.crash-row.header {
    background: var(--bg-surface-elevated);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.crash-row:last-child {
    border-bottom: none;
}

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

@media (max-width: 1024px) {
    .cpm-kpi-ribbon { grid-template-columns: repeat(2, 1fr); }
    .pm-tools-grid { grid-template-columns: 1fr; }
    .pert-inputs-grid { grid-template-columns: 1fr; }
    .baseline-comparison-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PM Glossary & Context Help Modal Styles
   ========================================================================== */
.modal-help-card {
    max-width: 880px !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.help-modal-search-bar {
    padding: 12px 24px 8px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.help-tabs-bar {
    display: flex;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.help-tab {
    padding: 6px 14px;
    font-size: 0.74rem;
    font-weight: 700;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-tab:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.help-tab.active {
    background: var(--primary-color);
    color: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.help-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.help-term-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
}

.help-term-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.help-term-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.help-term-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-term-title h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

.help-formula-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.help-definition {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
}

.help-example-box {
    background: var(--bg-surface-elevated);
    border-left: 3px solid #F59E0B;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.help-example-box .ex-lbl {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-example-box p {
    margin: 0;
}

.help-rule-tag {
    font-size: 0.74rem;
    font-weight: 700;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    display: inline-block;
}

