        /* Calendar color variants for all-day chips */
        .all-day-chip.calendar-blue { border-left-color: #007AFF; }
        .all-day-chip.calendar-purple { border-left-color: #AF52DE; }
        .all-day-chip.calendar-green { border-left-color: #34C759; }
        .all-day-chip.calendar-red { border-left-color: #FF3B30; }
        .all-day-chip.calendar-orange { border-left-color: #FF9500; }
        .all-day-chip.calendar-yellow { border-left-color: #FFCC00; }
        .all-day-chip.calendar-pink { border-left-color: #FF2D55; }
        .all-day-chip.calendar-teal { border-left-color: #5AC8FA; }

        .week-day-events {
            display: flex;
            flex-direction: column;
            gap: var(--space-1-5);
            margin-bottom: 12px;
        }

        .week-event-item {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-left: 3px solid var(--accent-blue);
            border-radius: var(--radius-sm);
            padding: var(--space-2) var(--space-2-5);
            cursor: pointer;
            transition: all var(--transition-fast);
            overflow: hidden;
        }

        .week-event-item:hover {
            border-top-color: var(--border-medium);
            border-right-color: var(--border-medium);
            border-bottom-color: var(--border-medium);
            box-shadow: var(--shadow-1);
        }

        /* Calendar color variations for week list events */
        .week-event-item.calendar-blue {
            border-left-color: #007AFF;
        }

        .week-event-item.calendar-purple {
            border-left-color: #AF52DE;
        }

        .week-event-item.calendar-green {
            border-left-color: #34C759;
        }

        .week-event-item.calendar-red {
            border-left-color: #FF3B30;
        }

        .week-event-item.calendar-orange {
            border-left-color: #FF9500;
        }

        .week-event-item.calendar-yellow {
            border-left-color: #FFCC00;
        }

        /* Multi-calendar stacked color bars */
        .calendar-bars {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            display: flex;
            flex-direction: column;
            border-radius: var(--radius-sm) 0 0 var(--radius-sm);
            overflow: hidden;
        }

        .calendar-bar {
            flex: 1;
            min-height: 3px;
        }

        /* Week event item with calendar bars */
        .week-event-item {
            position: relative;
        }

        /* Week timeline event with calendar bars */
        .week-timeline-event {
            position: relative;
        }

        /* All-day chip with calendar bars */
        .all-day-chip {
            position: relative;
        }

        .all-day-chip .calendar-bars {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
        }

        /* Event card multi-calendar styling */
        .event-card.multi-calendar {
            border-left: none;
            padding-left: 13px;
        }

        .event-card .calendar-bars {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            border-radius: var(--radius-sm) 0 0 var(--radius-sm);
        }

        .week-event-title {
            font-family: var(--font-family);
            font-size: var(--font-size-sm);
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 4px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .week-event-meta {
            display: flex;
            align-items: center;
            gap: var(--space-1-5);
            font-size: var(--font-size-xs);
            color: var(--text-tertiary);
        }

        .week-day-tasks {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: var(--space-1-5);
        }

        .week-day-column.drag-over {
            background: rgba(74, 144, 217, 0.08);
            border-color: var(--accent-blue);
        }

        .week-task-item {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-sm);
            padding: var(--space-2) var(--space-2-5);
            cursor: pointer;
            transition: all var(--transition-fast);
            overflow: hidden;
        }

        .week-task-item:hover {
            border-color: var(--border-medium);
            box-shadow: var(--shadow-1);
        }

        .week-task-title {
            font-family: var(--font-family);
            font-size: var(--font-size-sm);
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 4px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .week-task-meta {
            display: flex;
            align-items: center;
            gap: var(--space-1-5);
            font-size: var(--font-size-xs);
            color: var(--text-tertiary);
        }

        /* Week Timeline View */
        .week-day-timeline {
            flex: 1;
            min-height: 0; /* Required for flex item to scroll */
            position: relative;
            overflow-y: auto;
            padding: var(--space-1);
        }

        /* Week Timeline Grid - Hour rows */
        .week-day-timeline-grid {
            display: flex;
            flex-direction: column;
            padding: 0;
            overflow-y: auto;
        }

        /* Allow scrolling to see last hours without ugly gap */
        .week-day-timeline-grid::after {
            content: '';
            display: block;
            height: 150px;
            flex-shrink: 0;
        }

        .week-hour-row {
            position: relative;
            border-top: 1px solid var(--border-light);
            box-sizing: border-box;
            flex-shrink: 0;
            pointer-events: none;
        }

        .week-hour-row:last-child {
            border-bottom: 1px solid var(--border-light);
        }

        .week-hour-label {
            position: absolute;
            top: 2px;
            left: 4px;
            font-size: var(--font-size-2xs);
            color: var(--text-tertiary);
            pointer-events: none;
            opacity: 0.7;
        }

        /* Events overlay - sits on top of grid */
        .week-events-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            pointer-events: none;
        }

        .week-events-overlay > * {
            pointer-events: auto;
        }

        .week-timeline-event,
        .week-timeline-task {
            position: absolute;
            left: 0;
            right: 0;
            background: var(--bg-card);
            border: 1px solid var(--border-medium);
            border-radius: var(--radius-sm);
            padding: var(--space-1-5) var(--space-2);
            cursor: grab;
            transition: all var(--transition-fast);
            overflow: hidden;
            box-shadow: var(--shadow-1);
            z-index: 1;
        }

        /* --calendar-color: the event's Area or calendar colour (AreaColor.eventEdge), as on Today's cards */
        .week-timeline-event {
            border-left: 3px solid var(--calendar-color, var(--accent-blue));
        }

        .week-timeline-event:active,
        .week-timeline-task:active {
            cursor: grabbing;
        }

        .week-short-chip {
            flex: 1;
            min-width: 0;
            padding: 1px 4px;
            font-size: var(--font-size-2xs);
            font-weight: 500;
            color: var(--text-primary);
            background: var(--bg-card);
            border: 1px solid var(--border-medium);
            border-left: 3px solid var(--calendar-color, var(--accent-blue));
            border-radius: var(--radius-sm);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: pointer;
            line-height: 16px;
        }

        .week-short-chip:hover {
            background: var(--bg-secondary);
        }

        /* Calendar color variations for week timeline events */
        .week-timeline-event.calendar-blue {
            border-left-color: #007AFF;
        }

        .week-timeline-event.calendar-purple {
            border-left-color: #AF52DE;
        }

        .week-timeline-event.calendar-green {
            border-left-color: #34C759;
        }

        .week-timeline-event.calendar-red {
            border-left-color: #FF3B30;
        }

        .week-timeline-event.calendar-orange {
            border-left-color: #FF9500;
        }

        .week-timeline-event.calendar-yellow {
            border-left-color: #FFCC00;
        }

        .week-timeline-event:hover,
        .week-timeline-task:hover {
            border-top-color: var(--border-medium);
            border-right-color: var(--border-medium);
            border-bottom-color: var(--border-medium);
            box-shadow: var(--shadow-1);
            z-index: 10;
        }

        /* Midnight-spanning event segments */
        .week-timeline-event.midnight-segment-start {
            border-bottom: 2px dashed var(--border-color);
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }

        .week-timeline-event.midnight-segment-end {
            border-top: 2px dashed var(--border-color);
            border-top-right-radius: 0;
            border-top-left-radius: 0;
        }

        .week-timeline-title {
            font-family: var(--font-family);
            font-size: var(--font-size-12);
            font-weight: 500;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 4px;
            overflow: hidden;
            margin-bottom: 2px;
        }

        .week-timeline-title-text {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }

        .week-timeline-time-label {
            font-family: var(--font-family);
            font-size: var(--font-size-xs);
            font-weight: 600;
            color: var(--text-secondary);
            margin-top: 2px;
        }

        /* Drop highlight - shows exact area where task will land */
        .drop-highlight {
            position: absolute;
            left: 0;
            right: 0;
            background: rgba(59, 130, 246, 0.12);
            border-radius: var(--radius-sm);
            pointer-events: none;
            opacity: 0;
            transition: opacity var(--duration-fast) var(--ease-in-out);
            z-index: 1;
        }

        .drop-highlight.visible {
            opacity: 1;
        }

        .drop-highlight.conflict {
            background: rgba(239, 68, 68, 0.15);
        }

        /* Drag preview time display */
        .timeline-drag-preview .preview-time {
            color: var(--accent-blue);
            font-weight: 600;
            margin-right: 8px;
            min-width: 60px;
        }

        .timeline-drag-preview .preview-time:empty {
            display: none;
        }

        .timeline-drag-preview .preview-title {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .timeline-drag-preview .preview-duration {
            color: var(--text-secondary);
            margin-left: 8px;
            flex-shrink: 0;
        }
