.stats-period, .stats-trip-status, .stats-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.stats-heading {
  margin: 5px 0 12px;
  font-size: 14px;
  font-weight: 750;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}
.stats-grid > div { min-width: 0; }
.stats-grid span { display: block; font-size: 24px; font-weight: 850; }
.stats-grid small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.stats-trip-status { margin-top: 14px; }
.stats-scheduled { margin: 14px 0 0; font-size: 13px; line-height: 1.6; }
.stats-scheduled strong { font-weight: 650; }
.stats-note { margin: 12px 0 0; }
.employee-statistics { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.employee-card.is-open .employee-statistics { display: block; }

.stats-detail-button {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.stats-detail-button:hover { background: var(--surface-muted); }
.stats-detail-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stats-grid .stats-detail-arrow { display: inline; color: var(--accent); font-size: 16px; font-weight: 650; }
.stats-detail-dialog {
  box-sizing: border-box;
  width: min(100%, 760px);
  max-width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  margin: auto auto 0;
  padding: 0 18px max(20px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  color: var(--text);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.stats-detail-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.stats-detail-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; position: sticky; top: 0; padding: 14px 0 8px; background: var(--surface); z-index: 1; }
.stats-detail-header h2 { min-width: 0; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.stats-detail-close { flex: 0 0 44px; min-height: 44px; border: 0; border-radius: 8px; background: var(--surface-muted); color: var(--text); font: inherit; font-size: 24px; cursor: pointer; }
.stats-detail-period, .stats-detail-person, .stats-detail-meta, .stats-detail-current, .stats-detail-excluded { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.stats-detail-person { margin-bottom: 4px; }
.stats-detail-total { font-size: 28px; font-weight: 800; margin-top: 16px; font-variant-numeric: tabular-nums; }
.stats-detail-list { list-style: none; padding: 0; margin: 12px 0; }
.stats-detail-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.stats-detail-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.stats-detail-row strong { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.stats-detail-amount { font-size: 15px; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats-detail-current { margin-top: 7px; }
.stats-detail-empty { font-size: 14px; color: var(--muted); padding: 16px 0; }
.stats-detail-excluded { margin-top: 18px; }
.stats-detail-excluded strong { display: block; color: var(--text); font-weight: 650; margin-bottom: 4px; }
.stats-detail-open { overflow: hidden; }
