.progress-block {
    margin: 10px 0;
}
.progress-title {
    font-size: 14px;
    margin-bottom: 4px;
}
.progress-bar {
    background: #eee;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 4px;
}
.progress-fill.red {
    background-color: #e74c3c;
}
.progress-fill.green {
    background-color: #2ecc71;
}
.progress-fill.yellow {
    background-color: #f1c40f;
}

.statusbar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.statusbar-fill {
    height: 100%;
    float: left;
    cursor: pointer; /* Make status bar segments clickable */
}

.statusbar-fill.green {
    background-color: var(--success-color);
}

.statusbar-fill.red {
    background-color: var(--overdue-color);
}

.statusbar-container {
    margin: 15px 0;
    width: 100%;
}

.statusbar-total {
    width: 100%;
    height: 20px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
}

.statusbar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.statusbar-fill.green {
    background-color: var(--success-color);
}

.statusbar-fill.red {
    background-color: var(--overdue-color);
}

.statusbar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
}

/* Стили для тултипов статус-бара */
.statusbar-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transform: none;
    transition: none;
    will-change: transform;
}

.statusbar-fill {
    cursor: pointer;
    transition: width 0.3s ease;
    position: relative;
}

.statusbar-fill:hover {
    opacity: 0.9;
}

/* Chart styles */
.chart-container {
    display: row;
    flex-direction: row;
    align-items: center;
    margin: 1rem 0;
    width: 100%;
    position: relative; /* For tooltip positioning */
}

.chart-container-histo {
    width: 100%;
    min-height: 100px;
    max-height: 400px;
    overflow-x: auto;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-container-histo canvas {
    width: 100% !important;
    max-height: 400px;
    height: auto;
}

.chart-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.chart-wrapper:hover {
    transform: scale(1.05); /* Slight zoom on hover */
}

.chart-wrapper canvas {
    transition: transform 0.3s ease;
}

.chart-wrapper:hover canvas {
    transform: scale(1.05);
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
}

.chart-title {
    font-weight: 500;
    margin: 15px 0 10px;
    color: var(--text-color);
    font-size: 14px;
    text-align: center;
}

/* Стили для переключателя диаграммы */
.chart-toggle-container {
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-toggle-button {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    z-index: 1;
}

.chart-toggle-button:hover {
    background-color: #e6f0ff;
}

#chart-toggle {
    display: flex;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

#chart-toggle label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
}

#chart-toggle input[type="radio"] {
    accent-color: var(--primary-color);
}

input[name="chart-type"] {
    display: none;
}

input[name="chart-type"]:checked + .chart-toggle-button {
    background-color: var(--primary-color);
    color: white;
}

input#chart-overdue:checked + .chart-toggle-button {
    background-color: var(--overdue-color);
    color: white;
}

.chart-caption {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
}

.chart-caption span {
    display: none;
}

.chart-tooltip-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.chart-tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    min-width: 120px;
    text-align: center;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform: none;
    transition: none;
    will-change: transform;
}

.chart-tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.9);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.chart-tooltip .tooltip-label {
    font-size: 11px;
    font-weight: 500;
    color: #444;
    margin-bottom: 2px;
}

.chart-tooltip .tooltip-value {
    font-size: 12px;
    font-weight: 600;
    color: #222;
}