/* Реальні дані використовують ту саму візуальну мову, що й публічний приклад.
   Відсотки, часові зсуви й висоти задає чинний розрахунок; CSS їх не округлює. */
.project-charts, .project-daymap, .project-metrics {
  --plot-work: #286454;
  --plot-manual: #71568d;
  --plot-active: #355e8c;
  --plot-cancelled: #89522c;
  --plot-track: var(--surface-subtle);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
:root[data-theme="dark"] .project-charts,
:root[data-theme="dark"] .project-daymap,
:root[data-theme="dark"] .project-metrics {
  --plot-work: #397d68;
  --plot-manual: #80619e;
  --plot-active: #446e9f;
  --plot-cancelled: #8a5b39;
}
.chart-page-heading { margin: 8px 0 26px; max-width: 1000px; }
.chart-eyebrow { display: block; color: var(--muted); font-size: .73rem; font-weight: 750; letter-spacing: .09em; line-height: 1.5; margin-bottom: 8px; }
.chart-page-heading h1 { font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.17; margin: 0 0 12px; letter-spacing: -.04em; }
.chart-page-heading > p { color: var(--muted); font-size: 1rem; line-height: 1.7; margin: 0; }
.chart-heading-actions { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 18px; font-size: .9rem; }
.chart-context { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .81rem; margin: 16px 0 24px; }
.chart-context > span + span { border-left: 1px solid var(--line); padding-left: 20px; }
.chart-panel { padding: clamp(18px, 2.5vw, 30px); border-radius: 14px; background: var(--surface); box-shadow: 0 3px 18px #00000004; }
.chart-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 14px; }
.chart-section-heading h2 { font-size: 1.4rem; line-height: 1.35; letter-spacing: -.025em; margin: 0; }
.chart-section-heading > p { margin: 0; color: var(--muted); font-size: .83rem; }
.chart-section-heading .chart-eyebrow { margin-bottom: 5px; }
.chart-description { color: var(--muted); line-height: 1.75; max-width: 1000px; margin: 0 0 22px; font-size: .93rem; }
.chart-badge, .chart-source { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; color: var(--muted); background: var(--surface-subtle); font-size: .75rem; font-weight: 550; line-height: 1.4; }
.chart-badge-preliminary { color: var(--blue); }
.chart-source { margin-left: 9px; vertical-align: middle; padding: 2px 7px; }
.chart-notice { border: 1px solid var(--line); border-left: 3px solid var(--blue); padding: 14px 18px; border-radius: 8px; background: var(--surface-subtle); line-height: 1.7; font-size: .9rem; }
.chart-notice-warning { border-left-color: var(--plot-cancelled); }
.project-metrics { margin-top: 28px; margin-bottom: 26px; }
.project-charts .kpi-grid, .project-metrics .kpi-grid { gap: 16px; }
.project-charts .kpi, .project-metrics .kpi { min-width: 0; padding: 22px; border-radius: 12px; background: var(--surface); border-top: 3px solid var(--plot-work); gap: 8px; }
.project-charts .kpi > span, .project-metrics .kpi > span { font-size: .85rem; line-height: 1.5; min-height: 2.5em; font-weight: 550; }
.project-charts .kpi strong, .project-metrics .kpi strong { color: var(--heading); font-size: clamp(1.85rem, 2.6vw, 2.65rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.project-charts .kpi small, .project-metrics .kpi small { font-size: .8rem; line-height: 1.6; }
.project-charts .metric-count, .project-metrics .metric-count { border-top-color: var(--plot-active); }
.project-charts .metric-cancelled, .project-metrics .metric-cancelled { border-top-color: var(--plot-cancelled); }
.project-charts .metric-norm, .project-metrics .metric-norm { border-top-color: var(--plot-manual); }
.operation-distribution { display: grid; gap: 22px; }
.operation-share { min-width: 0; }
.operation-share-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 7px 20px; font-size: .92rem; margin-bottom: 10px; }
.operation-share-heading > span { flex: 1 1 260px; }
.operation-share-heading strong { color: var(--heading); font-size: .92rem; font-variant-numeric: tabular-nums; }
.operation-share-heading strong small { color: var(--muted); font-size: .85rem; font-weight: 450; }
.project-charts .structure, .project-daymap .structure { height: 13px; border-radius: 4px; background: var(--plot-track); overflow: hidden; }
.project-charts .structure > div, .project-daymap .structure > div { background: var(--plot-work); height: 100%; border-radius: inherit; min-width: 0; }
.project-charts .structure-manual > div, .project-daymap .structure > div { background: var(--plot-manual); }
.chart-details { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 7px; }
.chart-details > summary { font-size: .9rem; color: var(--blue); line-height: 1.7; }
.chart-details p { font-size: .9rem; line-height: 1.7; color: var(--muted); }
.project-charts .table-wrap, .project-daymap .table-wrap { overscroll-behavior-x: contain; }
.project-charts .table-wrap table, .project-daymap .table-wrap table { margin-top: 0; }
.chart-numeric { font-variant-numeric: tabular-nums; }
.chart-empty-state { text-align: center; background: var(--surface-subtle); border: 1px dashed var(--line); border-radius: 10px; padding: 32px 20px; color: var(--muted); }
.chart-empty-state h3 { font-size: 1.1rem; margin: 10px 0 7px; }
.chart-empty-state p { max-width: 600px; margin: auto; font-size: .9rem; line-height: 1.7; }
.chart-empty-mark { font-size: 28px; color: var(--blue); }
.chart-legend, .project-charts .timeline-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 18px 0 24px; font-size: .82rem; color: var(--muted); }
.chart-legend > span, .project-charts .timeline-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend i, .project-charts .timeline-legend i { display: inline-block; width: 22px; height: 12px; border-radius: 3px; border: 1px solid var(--line); flex: 0 0 22px; }
.legend-work { background: var(--plot-work); }
.legend-preliminary { background: repeating-linear-gradient(45deg, var(--plot-active), var(--plot-active) 5px, #ffffff 5px, #ffffff 7px); }
.legend-cancelled { background: var(--plot-cancelled); }
.legend-empty { background: var(--plot-track); }
.daymap-session { padding: 24px 0; }
.daymap-session:first-of-type { padding-top: 5px; }
.daymap-session:last-child { padding-bottom: 0; }
.daymap-session-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 15px; }
.daymap-session-heading h3 { font-size: 1rem; margin: 0; }
.daymap-session-heading > span { color: var(--muted); font-size: .85rem; }
.daymap-scroll { overflow-x: auto; overscroll-behavior-x: contain; max-width: 100%; padding-bottom: 5px; }
.daymap-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.daymap-canvas { min-width: 600px; }
.daymap-axis { display: flex; justify-content: space-between; gap: 20px; padding: 0 0 9px; color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.project-daymap .time-map { position: relative; min-width: 600px; height: 54px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--plot-track); }
.project-daymap .time-row { position: absolute; inset: 0; height: 100%; pointer-events: none; }
.project-daymap .time-segment { height: 100%; background: var(--plot-work); color: #ffffff; padding: 9px 8px; border-right: 2px solid var(--surface); border-radius: 4px; font-size: .76rem; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; pointer-events: auto; }
.project-daymap .time-UNALLOCATED { background: var(--plot-track); color: var(--muted); }
.project-daymap .time-CANCELLED { background: var(--plot-cancelled); }
.project-daymap .time-ACTIVE { background-color: var(--plot-active); background-image: repeating-linear-gradient(45deg, transparent, transparent 8px, #ffffff26 8px, #ffffff26 10px); }
.project-charts .timeline-wrap { margin-top: 20px; max-width: 100%; overscroll-behavior: contain; border-radius: 9px; }
.project-charts .timeline { font-size: .83rem; }
.project-charts .timeline .axis-label, .project-charts .timeline .tick { padding-block: 16px; font-size: .75rem; font-weight: 650; }
.project-charts .timeline .resource-label { border-top: 1px solid var(--line); padding: 18px 14px; }
.project-charts .timeline .resource-label small { display: inline-block; margin-top: 5px; color: var(--muted); }
.project-charts .timeline .bucket { min-height: 72px; background: var(--plot-track); }
.project-charts .bucket .load-bar { height: 27px; margin-top: 17px; border-radius: 4px; background: var(--plot-work); }
.project-charts .bucket .load-bar.preliminary { background: repeating-linear-gradient(45deg, var(--plot-active), var(--plot-active) 6px, #ffffff 6px, #ffffff 8px); }
.chart-pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-top: 15px; font-size: .86rem; color: var(--muted); }
.chart-pagination > span:last-child { display: flex; gap: 7px; }
.project-charts .peaks-filters { padding: clamp(18px, 2.5vw, 30px); border-radius: 14px; }
.project-charts .peaks-filters h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.project-charts .peaks-operations { border-color: var(--line); background: var(--surface-subtle); border-radius: 9px; }
.project-charts .peaks-operations label { padding: 9px 10px; font-size: .9rem; border-radius: 6px; }
.project-charts .peaks-operations label:has(:checked) { background: var(--surface); }
.project-charts .peaks-legend { font-size: .83rem; }
.project-charts .peaks-legend-solid, .project-charts .peaks-column { background: var(--plot-work); }
.project-charts .peaks-legend-preliminary, .project-charts .peaks-column-preliminary { background: repeating-linear-gradient(45deg, var(--plot-active), var(--plot-active) 6px, #ffffff 6px, #ffffff 8px); }
.project-charts .peaks-chart-scroll { background: var(--surface-subtle); border-radius: 9px; }
.project-charts .peaks-bars { padding-top: 30px; }
.project-charts .peaks-y-axis { padding-top: 30px; height: 250px; }
.project-charts .peaks-column { left: 19%; width: 62%; border-radius: 5px 5px 0 0; }
.project-charts .peaks-bin-value { color: var(--heading); font-variant-numeric: tabular-nums; }
.project-charts .peaks-bin-time { padding-block: 12px; }
.project-charts .peaks-preliminary-note { border-radius: 8px; line-height: 1.7; }
.project-charts .peaks-axis-heading { margin-top: 24px; color: var(--muted); }
@media (max-width: 1100px) {
  .project-charts .kpi-grid, .project-metrics .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .chart-page-heading { margin-top: 8px; }
  .chart-section-heading { align-items: flex-start; }
  .chart-section-heading h2 { font-size: 1.2rem; }
  .chart-panel, .project-charts .peaks-filters { padding: 18px; }
  .project-charts .kpi, .project-metrics .kpi { padding: 18px; }
  .chart-context { gap: 7px 12px; }
  .chart-context > span + span { padding-left: 12px; }
  .chart-pagination { align-items: flex-start; }
  .operation-share-heading > span { flex-basis: 100%; }
}
@media (max-width: 420px) {
  .project-charts .kpi-grid, .project-metrics .kpi-grid { grid-template-columns: 1fr; gap: 12px; }
  .project-charts .kpi > span, .project-metrics .kpi > span { min-height: 0; }
  .chart-section-heading h2 { font-size: 1.15rem; }
  .chart-legend, .project-charts .timeline-legend { gap: 10px 16px; }
}
