.atlas-statistics .statistics-tab { font-size: 16px; min-height: 48px; font-family: Inter, sans-serif; }
.atlas-statistics[data-statistics-tab="board"] .statistics-controls,
.atlas-statistics[data-statistics-tab="setup"] .statistics-controls { display: none !important; }
.stat-board { font-family: Inter, sans-serif; font-size: 15px; color: #1c2838; display: grid; gap: 10px; }
.stat-board-note, .stat-card p, .stat-card li, .stat-card td, .stat-card th { font-size: 15px; line-height: 1.35; }
.stat-demo { background: #fff; color: #667085; border: 1px solid #e3e8ef; border-radius: 10px; padding: 8px 10px; font-weight: 600; }
.stat-filters, .stat-card-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.stat-filters label, .stat-card-tools label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #667085; }
.stat-filters select, .stat-filters input, .stat-card-tools select, .stat-card-tools input { min-height: 40px; font-size: 15px; font-family: Inter, sans-serif; color: #1c2838; background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; padding: 6px 10px; }
.stat-filters select:focus, .stat-filters input:focus, .stat-card-tools select:focus, .stat-card-tools input:focus { outline: 3px solid rgba(0, 131, 176, .28); border-color: #7eb6d6; }
.stat-card { border: 1px solid #e3e8ef; border-radius: 14px; padding: 10px 12px; background: #fff; display: grid; gap: 6px; align-content: start; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); container: statcard / inline-size; }
.stat-card-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.stat-card h3 { margin: 0; font-size: 18px; font-weight: 700; }
.stat-card-note { margin: 0; }
.stat-action { min-height: 36px; min-width: 36px; font-size: 14px; font-family: Inter, sans-serif; font-weight: 700; border-radius: 999px; border: 1px solid #b7d7c8; background: #eef6f3; color: #145239; padding: 4px 12px; }
.stat-action.secondary { background: #fff; border-color: #e3e8ef; color: #1c2838; }
.stat-totals { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-total { min-width: 88px; padding: 6px 10px; border: 1px solid #e3e8ef; border-radius: 12px; background: #fff; display: grid; gap: 0; }
.stat-total b { font-size: 26px; line-height: 1.05; font-weight: 800; color: #102033; }
.stat-total span { font-size: 13px; font-weight: 600; color: #667085; }
.stat-chart { display: grid; gap: 6px; min-width: 0; }
.stat-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.stat-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; }
.stat-legend-item i { width: 14px; height: 14px; border-radius: 3px; display: block; }
.stat-chart-frame { display: flex; gap: 8px; align-items: stretch; height: 112px; min-width: 0; }
.stat-yaxis { display: flex; flex-direction: column; justify-content: space-between; font-size: 16px; font-weight: 700; color: #1a3a52; width: 48px; flex: 0 0 auto; }
.stat-plot { flex: 1 1 auto; min-width: 0; display: flex; align-items: stretch; gap: 6px; overflow: hidden; }
.stat-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; container: statcol / inline-size; }
.stat-col-label-short { display: none; }
.stat-col-off { background: #d5d8de; border-radius: 8px; }
.stat-col-bars { flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.stat-col-bar { position: relative; flex: 1 1 0; max-width: 42px; height: calc(100% - 18px); align-self: flex-end; }
.stat-col-bar i { position: absolute; left: 0; right: 0; bottom: 0; display: block; height: 0; border-radius: 4px 4px 0 0; }
.stat-col-value { position: absolute; left: 50%; transform: translateX(-50%); font-size: 16px; font-weight: 800; line-height: 16px; white-space: nowrap; }
.stat-col-label { flex: 0 0 auto; font-size: 16px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-table { width: 100%; border-collapse: collapse; }
.stat-table th, .stat-table td { border-bottom: 1px solid #c5d0da; text-align: left; padding: 8px 6px; }
.stat-setup-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border: 1px solid #e3e8ef; border-radius: 10px; padding: 8px; background: #fff; }
@media (min-width: 761px) {
  .stat-card { max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
  .stat-totals { display: grid; grid-template-columns: 1fr 1fr; }
  .stat-total { min-width: 0; }
  .stat-chart-frame { height: 148px; }
  .stat-action { width: auto; }
  .stat-plot, .stat-chart, .stat-card { overflow-x: hidden; }
}
@container statcard (max-width: 480px) {
  .stat-col-label-long { display: none; }
  .stat-col-label-short { display: inline; }
}
@container statcol (max-width: 72px) {
  .stat-col-value {
    position: absolute;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    transform: none;
  }
}
@media print {
  .stat-card-tools, .stat-filters, .anesthesia-alarm-launch, .sidebar { display: none !important; }
  .stat-card { break-inside: avoid; max-height: none; overflow: visible; }
}
