.progress-view-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-premium);
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 1rem;
    position: relative;
}

.progress-view-hint {
    margin: 0;
    padding: 0.55rem 0.85rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface);
}

.progress-view-hint strong {
    color: var(--text-primary);
    font-weight: 600;
}

.progress-container {
    display: flex;
    flex-direction: column;
    min-width: min(100%, 880px);
    max-width: 100%;
    background: transparent;
}

.progress-header {
    display: flex;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 25;
}

.day-label-column {
    width: 104px;
    flex-shrink: 0;
    background: transparent;
}

.progress-time-header {
    flex: 1;
    display: flex;
}

.time-slot-header {
    flex: 1;
    min-width: 1.75rem;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.45rem 0.1rem;
    border-left: 1px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.day-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
    min-height: 56px;
}

/* Empty day: single slim strip instead of a tall blank timeline */
.day-row--compact {
    min-height: 0;
}

.day-row--compact .day-label {
    width: 104px;
    padding: 0.35rem 0.55rem;
}

.day-row--compact .day-timeline-wrap {
    flex: 0 0 auto;
}

.day-row--compact .day-grid {
    min-height: 30px;
    flex: 0 0 auto;
}

.day-row--compact.today .day-grid {
    min-height: 40px;
}

.day-row--compact .day-grid-empty {
    position: static;
    inset: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 30px;
    padding: 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 500;
}

.day-row:hover {
    background: var(--border-light);
}

.day-row.today {
    background: var(--bg-slate);
}

.day-label {
    width: 104px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    position: sticky;
    left: 0;
    z-index: 10;
}

.day-name {
    font-weight: 700;
    font-family: inherit;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.day-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.day-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

.day-timeline-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.all-day-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 8px;
    min-height: 36px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-sidebar);
}

.all-day-container:empty {
    display: none;
    min-height: 0;
    padding: 0;
    border-bottom: none;
}

.day-grid {
    flex: 1;
    display: flex;
    position: relative;
    min-height: 52px;
}

.day-grid-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 500;
    pointer-events: none;
    z-index: 4;
}

.progress-overflow-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem 0.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-main);
}

.progress-overflow-chips:empty {
    display: none;
    padding: 0;
    border-top: none;
}

.progress-overflow-chip {
    appearance: none;
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    max-width: 100%;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.progress-overflow-chip:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: var(--bg-card);
}

.grid-cell {
    flex: 1;
    border-left: 1px solid var(--border-light);
}

.tasks-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    padding: 4px 0;
}

.task-block {
    position: absolute;
    top: 10px;
    bottom: 10px;
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
}

.task-block.spans-prev {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
}

.task-block.spans-next {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.task-block:hover {
    transform: translateY(-2px) scale(1.01);
    z-index: 20;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--border-accent);
}

.task-title {
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-project-name {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.85;
    margin-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-time {
    font-size: 0.6rem;
    opacity: 0.7;
    font-weight: 400;
    margin-top: 2px;
}

/* Now Marker Style */
.now-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-primary);
    z-index: 15;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(var(--accent-primary-rgb, 56, 189, 248), 0.35);
}

.now-marker::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb, 56, 189, 248), 0.25);
}

.all-day-task {
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 0 1 auto;
}

.all-day-task:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Priority Colors - More vibrant modern gradients with smoother tones */
.task-block.priority-low,
.all-day-task.priority-low {
    background: linear-gradient(135deg, #0d9488 0%, #065f46 100%);
}

.task-block.priority-medium,
.all-day-task.priority-medium {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.task-block.priority-high,
.all-day-task.priority-high {
    background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
}

.task-block.priority-urgent,
.all-day-task.priority-urgent {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.task-block.overdue {
    background: linear-gradient(135deg, #ef4444 0%, #7f1d1d 100%) !important;
    border-color: rgba(255, 100, 100, 0.3) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.task-block.overdue .task-title::after {
    content: ' ⚠️';
    font-size: 0.6rem;
}

/* Scrollbar Styling */
.progress-view-card::-webkit-scrollbar {
    height: 8px;
    width: 0;
}

.progress-view-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.progress-view-card::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.progress-view-card::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Navigation Controls Styling */
.datepicker-input {
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 180px;
    text-align: center;
}

.datepicker-input:hover {
    background: var(--bg-surface);
    border-color: var(--border-accent);
}

/* Progress Filters Styling */
.filter-group {
    background: var(--bg-dark);
    padding: 2px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
}

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

.search-icon {
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.filter-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.45rem 0.75rem 0.45rem 2rem;
    font-size: 0.8rem;
    width: 180px;
    transition: width 0.3s var(--transition);
}

.filter-input:focus {
    width: 240px;
    outline: none;
}

.filter-select {
    background: var(--bg-dark);
    border: none;
    border-left: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 0 10px 10px 0;
    transition: all 0.2s;
    outline: none;
}

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

.filter-select option {
    background: transparent;
    color: var(--text-primary);
}

/* Navigation Controls removed (centralized in styles.css) */

.loading-overlay,
.error-msg {
    padding: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}