/* ============================================
   RSL Gantt Chart Component
   Version: 1.0.0
   Description: A powerful, zero-dependency Gantt chart
   for project timeline visualization and management.
   ============================================ */

/* ===========================================
   CSS Custom Properties
   =========================================== */
:root {
    /* Layout */
    --rsl-gantt-row-height: 40px;
    --rsl-gantt-header-height: 60px;
    --rsl-gantt-task-list-width: 300px;
    --rsl-gantt-min-column-width: 40px;

    /* Colors - Light Mode */
    --rsl-gantt-bg: #ffffff;
    --rsl-gantt-border: #e2e8f0;
    --rsl-gantt-header-bg: #f8fafc;
    --rsl-gantt-row-odd: #ffffff;
    --rsl-gantt-row-even: #f8fafc;
    --rsl-gantt-row-hover: #f1f5f9;
    --rsl-gantt-text: #334155;
    --rsl-gantt-text-muted: #64748b;
    --rsl-gantt-weekend-bg: rgba(148, 163, 184, 0.1);
    --rsl-gantt-today-line: #ef4444;
    --rsl-gantt-grid-line: #e2e8f0;

    /* Task Bar Colors */
    --rsl-gantt-task-bg: #6E7BFF;
    --rsl-gantt-task-progress: #4f5cd9;
    --rsl-gantt-task-text: #ffffff;
    --rsl-gantt-task-border-radius: 4px;

    /* Task Types */
    --rsl-gantt-milestone-color: #f59e0b;
    --rsl-gantt-group-color: #374151;
    --rsl-gantt-critical-color: #ef4444;

    /* Dependencies */
    --rsl-gantt-dependency-color: #94a3b8;
    --rsl-gantt-dependency-width: 2px;

    /* Interactions */
    --rsl-gantt-selected-border: #6E7BFF;
    --rsl-gantt-resize-handle: #6E7BFF;
    --rsl-gantt-drag-opacity: 0.7;

    /* Toolbar */
    --rsl-gantt-toolbar-bg: #f8fafc;
    --rsl-gantt-btn-bg: #ffffff;
    --rsl-gantt-btn-hover: #f1f5f9;
    --rsl-gantt-btn-active: #6E7BFF;
    --rsl-gantt-btn-active-text: #ffffff;
}

/* ===========================================
   Main Container
   =========================================== */
.rsl-gantt {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--rsl-gantt-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--rsl-gantt-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--rsl-gantt-text);
}

.rsl-gantt * {
    box-sizing: border-box;
}

/* ===========================================
   Toolbar
   =========================================== */
.rsl-gantt-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--rsl-gantt-toolbar-bg);
    border-bottom: 1px solid var(--rsl-gantt-border);
    flex-wrap: wrap;
}

.rsl-gantt-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rsl-gantt-toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--rsl-gantt-border);
    margin: 0 0.5rem;
}

.rsl-gantt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: var(--rsl-gantt-btn-bg);
    border: 1px solid var(--rsl-gantt-border);
    border-radius: 6px;
    color: var(--rsl-gantt-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.rsl-gantt-btn:hover {
    background: var(--rsl-gantt-btn-hover);
    border-color: var(--rsl-gantt-text-muted);
}

.rsl-gantt-btn:focus {
    outline: 2px solid var(--rsl-gantt-btn-active);
    outline-offset: 2px;
}

.rsl-gantt-btn.active {
    background: var(--rsl-gantt-btn-active);
    border-color: var(--rsl-gantt-btn-active);
    color: var(--rsl-gantt-btn-active-text);
}

.rsl-gantt-btn i {
    font-size: 0.875rem;
}

.rsl-gantt-btn-icon {
    padding: 0.5rem;
    min-width: 36px;
}

/* Zoom Selector */
.rsl-gantt-zoom-selector {
    display: flex;
    border: 1px solid var(--rsl-gantt-border);
    border-radius: 6px;
    overflow: hidden;
}

.rsl-gantt-zoom-selector .rsl-gantt-btn {
    border: none;
    border-radius: 0;
    border-right: 1px solid var(--rsl-gantt-border);
}

.rsl-gantt-zoom-selector .rsl-gantt-btn:last-child {
    border-right: none;
}

/* Search Box */
.rsl-gantt-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.rsl-gantt-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--rsl-gantt-border);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--rsl-gantt-text);
    background: var(--rsl-gantt-btn-bg);
}

.rsl-gantt-search input:focus {
    outline: 2px solid var(--rsl-gantt-btn-active);
    outline-offset: -1px;
    border-color: var(--rsl-gantt-btn-active);
}

.rsl-gantt-search input::placeholder {
    color: var(--rsl-gantt-text-muted);
}

.rsl-gantt-search i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rsl-gantt-text-muted);
    font-size: 1rem;
    pointer-events: none;
}

/* Date Range Display */
.rsl-gantt-date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--rsl-gantt-text-muted);
    font-size: 0.875rem;
}

.rsl-gantt-date-range i {
    color: var(--rsl-gantt-btn-active);
}

/* ===========================================
   Main Body (Split View)
   =========================================== */
.rsl-gantt-body {
    display: flex;
    flex: 1;
    width: 100%;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

/* ===========================================
   Task List (Left Panel)
   =========================================== */
.rsl-gantt-task-list {
    width: var(--rsl-gantt-task-list-width);
    min-width: 200px;
    max-width: 50%;
    border-right: 2px solid var(--rsl-gantt-border);
    display: flex;
    flex-direction: column;
    background: var(--rsl-gantt-bg);
    flex-shrink: 0;
    position: relative;
}

/* Task List Header */
.rsl-gantt-task-list-header {
    display: flex;
    align-items: center;
    height: var(--rsl-gantt-header-height);
    padding: 0 1rem;
    background: var(--rsl-gantt-header-bg);
    border-bottom: 1px solid var(--rsl-gantt-border);
    font-weight: 600;
    color: var(--rsl-gantt-text);
}

.rsl-gantt-task-list-header-cell {
    flex: 1;
    padding: 0 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Task List Body */
.rsl-gantt-task-list-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Task List Row */
.rsl-gantt-task-row {
    display: flex;
    align-items: center;
    height: var(--rsl-gantt-row-height);
    padding: 0 1rem;
    border-bottom: 1px solid var(--rsl-gantt-grid-line);
    cursor: pointer;
    transition: background 0.15s ease;
}

.rsl-gantt-task-row:nth-child(odd) {
    background: var(--rsl-gantt-row-odd);
}

.rsl-gantt-task-row:nth-child(even) {
    background: var(--rsl-gantt-row-even);
}

.rsl-gantt-task-row:hover {
    background: var(--rsl-gantt-row-hover);
}

.rsl-gantt-task-row.selected {
    background: rgba(110, 123, 255, 0.1);
}

/* Task Expand Toggle */
.rsl-gantt-task-expand {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--rsl-gantt-text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.rsl-gantt-task-expand.expanded {
    transform: rotate(90deg);
}

.rsl-gantt-task-expand.hidden {
    visibility: hidden;
}

/* Task Info */
.rsl-gantt-task-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    padding-left: var(--rsl-gantt-indent, 0);
}

.rsl-gantt-task-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rsl-gantt-task-icon.task {
    color: var(--rsl-gantt-task-bg);
}

.rsl-gantt-task-icon.milestone {
    color: var(--rsl-gantt-milestone-color);
}

.rsl-gantt-task-icon.group {
    color: var(--rsl-gantt-group-color);
}

.rsl-gantt-task-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}

.rsl-gantt-task-name input {
    width: 100%;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--rsl-gantt-btn-active);
    border-radius: 4px;
    font-size: inherit;
    background: var(--rsl-gantt-bg);
    color: var(--rsl-gantt-text);
}

/* Task Dates */
.rsl-gantt-task-dates {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--rsl-gantt-text-muted);
    flex-shrink: 0;
}

/* Resize Handle */
.rsl-gantt-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.15s ease;
}

.rsl-gantt-resize-handle:hover,
.rsl-gantt-resize-handle.active {
    background: var(--rsl-gantt-resize-handle);
}

/* ===========================================
   Timeline (Right Panel)
   =========================================== */
.rsl-gantt-timeline {
    flex: 1;
    width: 0; /* Force flex-based sizing, ignore content width */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

/* Timeline Header */
.rsl-gantt-timeline-header {
    height: var(--rsl-gantt-header-height);
    background: var(--rsl-gantt-header-bg);
    border-bottom: 1px solid var(--rsl-gantt-border);
    overflow: hidden;
    flex-shrink: 0;
}

.rsl-gantt-timeline-header-scroll {
    display: flex;
    flex-direction: column;
    min-width: 100%;
}

/* Header Rows */
.rsl-gantt-header-row {
    display: flex;
    min-width: 100%;
}

.rsl-gantt-header-row.primary {
    height: 30px;
    border-bottom: 1px solid var(--rsl-gantt-grid-line);
}

.rsl-gantt-header-row.secondary {
    height: 30px;
}

.rsl-gantt-header-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--rsl-gantt-grid-line);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rsl-gantt-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}

.rsl-gantt-header-cell.primary {
    font-size: 0.8125rem;
    font-weight: 700;
}

.rsl-gantt-header-cell.weekend {
    background: var(--rsl-gantt-weekend-bg);
}

.rsl-gantt-header-cell.today {
    background: rgba(239, 68, 68, 0.1);
    color: var(--rsl-gantt-today-line);
}

/* Timeline Body */
.rsl-gantt-timeline-body {
    flex: 1;
    overflow: auto;
    position: relative;
    min-width: 0;
}

.rsl-gantt-timeline-scroll {
    position: relative;
    min-height: 100%;
}

/* Grid Background */
.rsl-gantt-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.rsl-gantt-grid-row {
    height: var(--rsl-gantt-row-height);
    border-bottom: 1px solid var(--rsl-gantt-grid-line);
    display: flex;
}

.rsl-gantt-grid-row:nth-child(odd) {
    background: var(--rsl-gantt-row-odd);
}

.rsl-gantt-grid-row:nth-child(even) {
    background: var(--rsl-gantt-row-even);
}

.rsl-gantt-grid-cell {
    height: 100%;
    border-right: 1px solid var(--rsl-gantt-grid-line);
}

.rsl-gantt-grid-cell.weekend {
    background: var(--rsl-gantt-weekend-bg);
}

/* Today Line */
.rsl-gantt-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--rsl-gantt-today-line);
    z-index: 10;
    pointer-events: none;
}

.rsl-gantt-today-line::before {
    content: 'Today';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rsl-gantt-today-line);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

/* ===========================================
   Task Bars
   =========================================== */
.rsl-gantt-bars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
}

.rsl-gantt-bar {
    position: absolute;
    height: 24px;
    top: calc((var(--rsl-gantt-row-height) - 24px) / 2);
    background: var(--rsl-gantt-task-bg);
    border-radius: var(--rsl-gantt-task-border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.rsl-gantt-bar.selected {
    box-shadow: 0 0 0 2px var(--rsl-gantt-selected-border), 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 7;
}

.rsl-gantt-bar.dragging {
    opacity: var(--rsl-gantt-drag-opacity);
    z-index: 100;
    cursor: grabbing;
}

/* Progress Bar */
.rsl-gantt-bar-progress {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: var(--rsl-gantt-task-progress);
    border-radius: var(--rsl-gantt-task-border-radius) 0 0 var(--rsl-gantt-task-border-radius);
    transition: width 0.2s ease;
}

/* Bar Label */
.rsl-gantt-bar-label {
    position: relative;
    z-index: 1;
    padding: 0 8px;
    color: var(--rsl-gantt-task-text);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Bar Resize Handles */
.rsl-gantt-bar-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.rsl-gantt-bar:hover .rsl-gantt-bar-handle,
.rsl-gantt-bar.selected .rsl-gantt-bar-handle {
    opacity: 1;
}

.rsl-gantt-bar-handle.left {
    left: 0;
    border-radius: var(--rsl-gantt-task-border-radius) 0 0 var(--rsl-gantt-task-border-radius);
    background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent);
}

.rsl-gantt-bar-handle.right {
    right: 0;
    border-radius: 0 var(--rsl-gantt-task-border-radius) var(--rsl-gantt-task-border-radius) 0;
    background: linear-gradient(-90deg, rgba(255,255,255,0.3), transparent);
}

/* ===========================================
   Milestone
   =========================================== */
.rsl-gantt-bar.milestone {
    width: 24px !important;
    height: 24px;
    background: transparent;
    transform: rotate(45deg);
    border-radius: 3px;
    margin-left: -12px;
}

.rsl-gantt-bar.milestone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--rsl-gantt-milestone-color);
    border-radius: 3px;
}

.rsl-gantt-bar.milestone .rsl-gantt-bar-label {
    display: none;
}

.rsl-gantt-bar.milestone .rsl-gantt-bar-handle {
    display: none;
}

/* ===========================================
   Group (Summary) Bar
   =========================================== */
.rsl-gantt-bar.group {
    height: 8px;
    top: calc((var(--rsl-gantt-row-height) - 8px) / 2);
    background: var(--rsl-gantt-group-color);
    border-radius: 0;
}

.rsl-gantt-bar.group::before,
.rsl-gantt-bar.group::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 8px;
    height: 16px;
    background: var(--rsl-gantt-group-color);
}

.rsl-gantt-bar.group::before {
    left: 0;
    border-radius: 0 0 0 4px;
}

.rsl-gantt-bar.group::after {
    right: 0;
    border-radius: 0 0 4px 0;
}

.rsl-gantt-bar.group .rsl-gantt-bar-label {
    display: none;
}

/* ===========================================
   Critical Path
   =========================================== */
.rsl-gantt-bar.critical {
    background: var(--rsl-gantt-critical-color);
}

.rsl-gantt-bar.critical .rsl-gantt-bar-progress {
    background: #dc2626;
}

/* ===========================================
   Custom Colors
   =========================================== */
.rsl-gantt-bar[data-color="blue"] {
    background: #3b82f6;
}
.rsl-gantt-bar[data-color="blue"] .rsl-gantt-bar-progress {
    background: #2563eb;
}

.rsl-gantt-bar[data-color="green"] {
    background: #22c55e;
}
.rsl-gantt-bar[data-color="green"] .rsl-gantt-bar-progress {
    background: #16a34a;
}

.rsl-gantt-bar[data-color="red"] {
    background: #ef4444;
}
.rsl-gantt-bar[data-color="red"] .rsl-gantt-bar-progress {
    background: #dc2626;
}

.rsl-gantt-bar[data-color="purple"] {
    background: #a855f7;
}
.rsl-gantt-bar[data-color="purple"] .rsl-gantt-bar-progress {
    background: #9333ea;
}

.rsl-gantt-bar[data-color="orange"] {
    background: #f97316;
}
.rsl-gantt-bar[data-color="orange"] .rsl-gantt-bar-progress {
    background: #ea580c;
}

.rsl-gantt-bar[data-color="teal"] {
    background: #14b8a6;
}
.rsl-gantt-bar[data-color="teal"] .rsl-gantt-bar-progress {
    background: #0d9488;
}

.rsl-gantt-bar[data-color="pink"] {
    background: #ec4899;
}
.rsl-gantt-bar[data-color="pink"] .rsl-gantt-bar-progress {
    background: #db2777;
}

/* ===========================================
   Dependencies (SVG Arrows)
   =========================================== */
.rsl-gantt-dependencies {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.rsl-gantt-dependency-path {
    fill: none;
    stroke: var(--rsl-gantt-dependency-color);
    stroke-width: var(--rsl-gantt-dependency-width);
}

.rsl-gantt-dependency-arrow {
    fill: var(--rsl-gantt-dependency-color);
}

/* ===========================================
   Tooltip
   =========================================== */
.rsl-gantt-tooltip {
    position: absolute;
    z-index: 10600;
    background: var(--rsl-gantt-text);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.5;
    max-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.rsl-gantt-tooltip.visible {
    opacity: 1;
}

.rsl-gantt-tooltip-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.rsl-gantt-tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.rsl-gantt-tooltip-label {
    opacity: 0.7;
}

.rsl-gantt-tooltip-value {
    font-weight: 500;
}

/* ===========================================
   Context Menu
   =========================================== */
.rsl-gantt-context-menu {
    position: absolute;
    z-index: 1000;
    background: var(--rsl-gantt-bg);
    border: 1px solid var(--rsl-gantt-border);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 180px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.rsl-gantt-context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    color: var(--rsl-gantt-text);
    font-size: 0.875rem;
    transition: background 0.1s ease;
}

.rsl-gantt-context-menu-item:hover {
    background: var(--rsl-gantt-row-hover);
}

.rsl-gantt-context-menu-item i {
    width: 16px;
    text-align: center;
    color: var(--rsl-gantt-text-muted);
}

.rsl-gantt-context-menu-item.danger {
    color: var(--rsl-gantt-critical-color);
}

.rsl-gantt-context-menu-item.danger i {
    color: var(--rsl-gantt-critical-color);
}

.rsl-gantt-context-menu-divider {
    height: 1px;
    background: var(--rsl-gantt-border);
    margin: 0.5rem 0;
}

/* ===========================================
   Empty State
   =========================================== */
.rsl-gantt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--rsl-gantt-text-muted);
}

.rsl-gantt-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.rsl-gantt-empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--rsl-gantt-text);
    margin-bottom: 0.5rem;
}

.rsl-gantt-empty-text {
    max-width: 300px;
}

/* ===========================================
   Loading State
   =========================================== */
.rsl-gantt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.rsl-gantt-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--rsl-gantt-border);
    border-top-color: var(--rsl-gantt-btn-active);
    border-radius: 50%;
    animation: rsl-gantt-spin 0.8s linear infinite;
}

@keyframes rsl-gantt-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================================
   Export Modal
   =========================================== */
.rsl-gantt-export-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.rsl-gantt-export-modal.visible {
    opacity: 1;
    visibility: visible;
}

.rsl-gantt-export-modal-content {
    background: var(--rsl-gantt-bg);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.rsl-gantt-export-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--rsl-gantt-text);
}

.rsl-gantt-export-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.rsl-gantt-export-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--rsl-gantt-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rsl-gantt-export-option:hover {
    border-color: var(--rsl-gantt-btn-active);
    background: rgba(110, 123, 255, 0.05);
}

.rsl-gantt-export-option.selected {
    border-color: var(--rsl-gantt-btn-active);
    background: rgba(110, 123, 255, 0.1);
}

.rsl-gantt-export-option i {
    font-size: 1.5rem;
    color: var(--rsl-gantt-btn-active);
    width: 32px;
    text-align: center;
}

.rsl-gantt-export-option-label {
    font-weight: 600;
    color: var(--rsl-gantt-text);
}

.rsl-gantt-export-option-desc {
    font-size: 0.8125rem;
    color: var(--rsl-gantt-text-muted);
}

.rsl-gantt-export-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ===========================================
   Dark Mode
   =========================================== */
[data-theme="dark"] {
    --rsl-gantt-bg: #1a1a2e;
    --rsl-gantt-border: #2d2d44;
    --rsl-gantt-header-bg: #16162a;
    --rsl-gantt-row-odd: #1a1a2e;
    --rsl-gantt-row-even: #1e1e36;
    --rsl-gantt-row-hover: #252542;
    --rsl-gantt-text: #e2e8f0;
    --rsl-gantt-text-muted: #94a3b8;
    --rsl-gantt-weekend-bg: rgba(148, 163, 184, 0.05);
    --rsl-gantt-grid-line: #2d2d44;
    --rsl-gantt-toolbar-bg: #16162a;
    --rsl-gantt-btn-bg: #252542;
    --rsl-gantt-btn-hover: #2d2d50;
}

[data-theme="dark"] .rsl-gantt-search input {
    background: #252542;
    border-color: #2d2d44;
    color: #e2e8f0;
}

[data-theme="dark"] .rsl-gantt-tooltip {
    background: #252542;
}

[data-theme="dark"] .rsl-gantt-context-menu {
    background: #1e1e36;
    border-color: #2d2d44;
}

[data-theme="dark"] .rsl-gantt-export-modal-content {
    background: #1e1e36;
}

/* ===========================================
   Accessibility - Reduced Motion
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    .rsl-gantt-bar,
    .rsl-gantt-tooltip,
    .rsl-gantt-btn,
    .rsl-gantt-task-expand,
    .rsl-gantt-spinner {
        transition: none;
        animation: none;
    }
}

/* ===========================================
   Responsive - Tablet (768px)
   =========================================== */
@media (max-width: 768px) {
    .rsl-gantt-toolbar {
        padding: 0.5rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .rsl-gantt-toolbar-group {
        gap: 0.25rem;
    }

    .rsl-gantt-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }

    .rsl-gantt-btn span {
        display: none;
    }

    .rsl-gantt-btn i {
        margin-right: 0;
    }

    .rsl-gantt-task-list {
        width: 160px;
        min-width: 120px;
    }

    .rsl-gantt-task-dates {
        display: none;
    }

    .rsl-gantt-search {
        min-width: 150px;
        max-width: 200px;
    }

    .rsl-gantt-date-range {
        display: none;
    }

    .rsl-gantt-zoom-selector {
        flex-wrap: nowrap;
    }

    .rsl-gantt-zoom-selector .rsl-gantt-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ===========================================
   Responsive - Small Tablet / Large Phone (576px)
   =========================================== */
@media (max-width: 576px) {
    .rsl-gantt {
        border-radius: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .rsl-gantt-toolbar {
        padding: 0.5rem;
        gap: 0.375rem;
    }

    /* Show mobile toggle button */
    .rsl-gantt-mobile-toggle {
        display: flex !important;
    }

    /* Hide task list by default on mobile */
    .rsl-gantt-task-list {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 220px !important;
        z-index: 100;
        background: var(--rsl-gantt-bg);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .rsl-gantt-task-list.mobile-visible {
        transform: translateX(0);
    }

    .rsl-gantt-body {
        position: relative;
        max-width: 100%;
    }

    .rsl-gantt-timeline {
        width: 0 !important;
        flex: 1;
        max-width: 100%;
    }

    .rsl-gantt-search {
        order: 10;
        width: 100%;
        max-width: none;
        min-width: auto;
        margin-top: 0.25rem;
    }

    .rsl-gantt-toolbar-divider {
        display: none;
    }

    /* Stack zoom selector */
    .rsl-gantt-zoom-selector {
        order: 11;
        width: 100%;
        justify-content: center;
        margin-top: 0.25rem;
    }

    .rsl-gantt-header-title {
        font-size: 0.75rem;
    }

    .rsl-gantt-task-name {
        font-size: 0.8125rem;
    }
}

/* ===========================================
   Responsive - Phone (480px)
   =========================================== */
@media (max-width: 480px) {
    .rsl-gantt-toolbar-group {
        gap: 0.125rem;
    }

    .rsl-gantt-btn {
        padding: 0.3rem 0.4rem;
        font-size: 0.75rem;
    }

    .rsl-gantt-zoom-selector .rsl-gantt-btn {
        padding: 0.3rem 0.4rem;
        font-size: 0.6875rem;
    }

    .rsl-gantt-search input {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.875rem;
    }

    .rsl-gantt-search i {
        left: 0.625rem;
        font-size: 0.875rem;
    }

    .rsl-gantt-task-list {
        width: 180px !important;
    }

    .rsl-gantt-bar-label {
        font-size: 0.6875rem;
    }

    .rsl-gantt-tooltip {
        max-width: 250px;
        font-size: 0.75rem;
    }
}

/* Mobile toggle button - hidden by default */
.rsl-gantt-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.5rem;
    background: var(--rsl-gantt-btn-bg);
    border: 1px solid var(--rsl-gantt-border);
    border-radius: 6px;
    color: var(--rsl-gantt-text);
    cursor: pointer;
    transition: all 0.15s ease;
}

.rsl-gantt-mobile-toggle:hover {
    background: var(--rsl-gantt-btn-hover);
}

.rsl-gantt-mobile-toggle.active {
    background: var(--rsl-gantt-btn-active);
    color: white;
}

/* Mobile overlay when task list is open */
.rsl-gantt-mobile-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
}

.rsl-gantt-mobile-overlay.visible {
    display: block;
}

[data-theme="dark"] .rsl-gantt-mobile-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* ===========================================
   Print Styles
   =========================================== */
@media print {
    .rsl-gantt {
        border: none;
        box-shadow: none;
    }

    .rsl-gantt-toolbar {
        display: none;
    }

    .rsl-gantt-bar-handle {
        display: none;
    }

    .rsl-gantt-context-menu,
    .rsl-gantt-tooltip {
        display: none !important;
    }
}

/* ===========================================
   Keyboard Focus Styles
   =========================================== */
.rsl-gantt-bar:focus {
    outline: 2px solid var(--rsl-gantt-selected-border);
    outline-offset: 2px;
}

.rsl-gantt-task-row:focus {
    outline: 2px solid var(--rsl-gantt-selected-border);
    outline-offset: -2px;
}

/* ===========================================
   Scrollbar Styling
   =========================================== */
.rsl-gantt-timeline-body::-webkit-scrollbar,
.rsl-gantt-task-list-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.rsl-gantt-timeline-body::-webkit-scrollbar-track,
.rsl-gantt-task-list-body::-webkit-scrollbar-track {
    background: var(--rsl-gantt-row-even);
}

.rsl-gantt-timeline-body::-webkit-scrollbar-thumb,
.rsl-gantt-task-list-body::-webkit-scrollbar-thumb {
    background: var(--rsl-gantt-border);
    border-radius: 4px;
}

.rsl-gantt-timeline-body::-webkit-scrollbar-thumb:hover,
.rsl-gantt-task-list-body::-webkit-scrollbar-thumb:hover {
    background: var(--rsl-gantt-text-muted);
}
