/* Today's tests (reports/today.html) - uses the base.css tokens; classes are prefixed td-. */
.td-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.td-toolbar[hidden], .td-toolbar [hidden] { display: none !important; }
.td-toolbar .grow { flex: 1; }
.td-field { display: flex; flex-direction: column; gap: 3px; }
.td-field label { font-size: 12px; color: var(--ink-3); }
.td-field input { font: inherit; font-size: 15px; border: 1.5px solid var(--line-2); border-radius: 10px; padding: 6px 10px; background: #fff; min-height: 38px; }
.td-field input:focus { outline: none; border-color: var(--accent); }
.td-days { display: flex; gap: 6px; flex-wrap: wrap; }
.td-toolbar .btn.small { min-height: 38px; }

.td-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.td-head h2 { font-size: 26px; margin: 0; }
.td-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; }
.td-sum { display: flex; gap: 10px; flex-wrap: wrap; }
.td-sum div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; min-width: 96px; }
.td-sum b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.td-sum span { font-size: 12px; color: var(--ink-3); }

.td-patient { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 6px; margin-bottom: 14px; break-inside: avoid; }
.td-patient-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 6px; }
.td-patient-head h3 { font-size: 19px; margin: 0; }
.td-patient-head .meta { font-size: 13px; color: var(--ink-3); }
.td-patient-head a { font-size: 13px; }
.td-table-wrap { overflow-x: auto; }
.td-table-wrap table.t { font-size: 14px; min-width: 620px; }
.td-table-wrap table.t td { vertical-align: top; }
.td-table-wrap td.time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.td-table-wrap td.num { font-variant-numeric: tabular-nums; }
.td-table-wrap td.num div + div { margin-top: 2px; }
.td-table-wrap .fl { color: var(--ink-3); font-size: 12px; margin-right: 4px; }
.td-table-wrap .unit { color: var(--ink-3); font-size: 12px; }
.td-table-wrap .when { color: var(--ink-3); font-size: 12px; margin-left: 4px; }
.td-chg { font-weight: 700; white-space: nowrap; }
.td-chg.none { font-weight: 400; color: var(--ink-3); }
.td-side { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.td-side.l { background: #fdf0e4; color: #8a4708; }
.td-side.r { background: var(--accent-soft); color: #2233b0; }
.td-note { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
.td-error { margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: 14px; }
.td-print-only { display: none; }

@media (max-width: 640px) {
  .td-toolbar { padding: 10px; }
  .td-toolbar .grow { display: none; }
  .td-head h2 { font-size: 22px; }
}
@media print {
  .emnav, #patient, .td-toolbar, .noprint { display: none !important; }
  .rk-wrap { max-width: none; padding: 0 !important; }
  .td-patient { box-shadow: none; border: 0; border-top: 1.5px solid #000; border-radius: 0; padding: 10px 0 4px; }
  .td-table-wrap { overflow: visible; }
  .td-table-wrap table.t { min-width: 0; font-size: 11pt; }
  .td-sum div { border-color: #999; }
  .td-print-only { display: block; }
  @page { margin: 14mm; }
}
