/* Attendance Overview charts: soft, rounded shapes with a gentle glow, in the app's navy and teal (tokens in theme.css).
   Soft bars (rate by month) and a donut (each department's share of the days attended). */
.chart-card {
  padding: 1rem 1.25rem 1.05rem;
  background: var(--lb-surface);
  border: 1px solid var(--lb-border-soft);
  border-radius: 24px;
  box-shadow: var(--lb-shadow);
}
.chart-kicker { font-size: 0.8125rem; font-weight: 600; color: var(--lb-muted); }
.chart-headline { margin: 0.15rem 0 0.7rem; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--lb-ink); }
.chart-headline span { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0; color: var(--lb-muted); }
.chart-note { margin: 0.6rem 0 0; font-size: 0.75rem; color: var(--lb-muted); }
.chart-subhead { margin: 0.7rem 0 0.3rem; font-size: 0.8125rem; font-weight: 600; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin-top: 0.55rem; font-size: 0.78rem; color: var(--lb-muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.chart-legend i { width: 0.7rem; height: 0.7rem; border-radius: 4px; }

/* The series colours: navy tints, then the teal and amber accents. */
.series-0 { --series: color-mix(in srgb, var(--lb-primary) 78%, #fff); }
.series-1 { --series: color-mix(in srgb, var(--lb-primary) 58%, #fff); }
.series-2 { --series: color-mix(in srgb, var(--lb-primary) 40%, #fff); }
.series-3 { --series: var(--lb-accent-strong); }
.series-4 { --series: color-mix(in srgb, var(--lb-accent-strong) 55%, #fff); }
.series-5 { --series: #E9A23B; }
.chart-legend i, .soft-block { background: var(--series); }

/* Soft bars: a column for each month with its value above and its name below. */
.soft-bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 8rem; }
.soft-bar-col { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 0.35rem; height: 100%; min-width: 0; }
.soft-bar-value { font-size: 0.75rem; font-weight: 700; color: var(--lb-ink); font-variant-numeric: tabular-nums; }
.soft-bar-label { font-size: 0.72rem; color: var(--lb-muted); }
.soft-bar-track { display: flex; flex: 1; align-items: flex-end; justify-content: center; width: 100%; min-height: 0; }
.soft-bar {
  display: block;
  width: min(100%, 2.6rem);
  min-height: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--lb-primary) 38%, #fff), color-mix(in srgb, var(--lb-primary) 62%, #fff));
  border-radius: 14px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7), 0 8px 18px rgba(var(--lb-primary-rgb), 0.16);
  transition: transform 0.15s var(--lb-ease), box-shadow 0.15s var(--lb-ease);
}
.soft-bar.is-peak { background: linear-gradient(180deg, color-mix(in srgb, var(--lb-accent-strong) 55%, #fff), var(--lb-accent-strong)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7), 0 8px 18px rgba(var(--lb-accent-rgb), 0.3); }
.soft-bar-col:hover .soft-bar { transform: translateY(-3px); }

/* By branch: plain rows, the name on the left, a bar in the middle and the percentage on the right, easy to read at a glance. */
.rate-list { display: grid; gap: 0.2rem; margin: 0.8rem 0 0.4rem; padding: 0; list-style: none; }
.rate-row { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr) 4rem; align-items: center; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--lb-border-soft); }
.rate-row:first-child { border-top: 0; }
.rate-name { font-size: 0.95rem; font-weight: 600; }
.rate-name small { display: block; font-size: 0.75rem; font-weight: 400; color: var(--lb-muted); }
.rate-track { height: 1.1rem; overflow: hidden; background: var(--lb-hover); border-radius: 999px; box-shadow: inset 0 1px 3px rgba(var(--lb-primary-rgb), 0.08); }
.rate-fill { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--lb-accent-strong) 55%, #fff), var(--lb-accent-strong)); border-radius: 999px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45); }
.rate-rate { font-size: 1.15rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) { .rate-row { grid-template-columns: 1fr 3.5rem; } .rate-track { grid-column: 1 / -1; order: 3; } }

/* Donut: each department's share of the days attended, soft segments with a gap between them; legend on the left. */
.chart-aside { font-size: 0.78rem; color: var(--lb-muted); }
.donut-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); align-items: center; gap: 1rem; margin-top: 0.6rem; }
.donut { width: 100%; height: auto; max-width: 15rem; justify-self: end; overflow: visible; filter: drop-shadow(0 8px 10px rgba(var(--lb-primary-rgb), 0.16)); }
.donut-segment { fill: none; stroke: var(--series); stroke-width: 40; transition: opacity 0.15s ease; }
.donut:hover .donut-segment { opacity: 0.55; }
.donut:hover .donut-segment:hover { opacity: 1; }
.donut-label { font-size: 11px; font-weight: 700; fill: #fff; pointer-events: none; paint-order: stroke; stroke: rgba(var(--lb-primary-rgb), 0.25); stroke-width: 2px; }
.donut-legend { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }
.donut-legend li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; }
.donut-legend i { flex: none; width: 0.8rem; height: 0.8rem; border-radius: 4px; background: var(--series); box-shadow: 0 2px 6px rgba(var(--lb-primary-rgb), 0.18); }
.donut-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-rate { font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 575.98px) {
  .donut-layout { grid-template-columns: 1fr; }
  .donut { justify-self: center; }
  .soft-bars { gap: 0.25rem; }
}

/* An employee's hours chart: a dashed line at the full day; day-off bars are lighter. */
.my-hours { position: relative; height: 10rem; }
.my-hours::after { content: ""; position: absolute; right: 0; bottom: calc(1.45rem + (100% - 3.3rem) * var(--full-day, 0)); left: 0; border-top: 1px dashed var(--lb-accent-strong); opacity: 0.55; pointer-events: none; }
.soft-bar.is-off { opacity: 0.5; }
