.sheet-stack, .sheet-fields, .sheet-panel, .sheet-row, .sheet-attendance { display: grid; gap: 12px; }
.sheet-fields { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.sheet-fields :disabled { opacity: 1; }
.sheet-fields:disabled :is(input, textarea, select) { background-color: var(--surface-subtle); color: var(--ink); }
.sheet-panel .form-panel-title { margin-bottom: 0; }
.sheet-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.sheet-hours { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 68px), 1fr)); }
.sheet-attendance { grid-template-columns: repeat(auto-fit, minmax(min(100%, 226px), 1fr)); }
.sheet-row { min-inline-size: 0; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--border); border-radius: 8px; }
.sheet-row legend { padding: 0 5px; font-weight: 680; }
.sheet-row > button, .sheet-panel > button { justify-self: start; }
.sheet-row textarea, #timesheet-review textarea { min-height: 60px; }
.sheet-week, .sheet-summary, .sheet-submit, .sheet-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.sheet-week .field { flex: 1 1 160px; max-width: 250px; }
.sheet-week .button { align-self: end; }
.sheet-summary { justify-content: space-between; }
.sheet-summary p, .sheet-submit p { margin: 0; }
.sheet-submit { justify-content: space-between; }
.sheet-status { border-radius: 20px; padding: 3px 10px; font-weight: 680; background: var(--info-bg); color: var(--info-ink); }
.sheet-status[data-status="returned"] { background: var(--caution-bg); color: var(--caution-ink); }
.sheet-status:is([data-status="authorised"], [data-status="owner-recorded"]) { background: var(--positive-bg); color: var(--positive-ink); }
.sheet-team, .sheet-history { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sheet-team .button { width: 100%; display: flex; justify-content: space-between; text-align: left; }
.sheet-team [aria-current="true"] { border-color: var(--blue, #185b9a); }
.sheet-history li { border-top: 1px solid var(--border); padding: 8px 0; overflow-wrap: anywhere; }
.sheet-history small { display: block; color: var(--muted); }
.sheet-history p { margin: 4px 0 0; white-space: pre-wrap; }
.sheet-total, .sheet-rate-totals { margin: 0; padding-top: 9px; border-top: 1px solid var(--border); }
.sheet-total { display: flex; gap: 8px; justify-content: space-between; }
.sheet-rate-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 100px), 1fr)); gap: 8px; }
.sheet-rate-totals dd { margin: 0; font-weight: 700; }
@media (max-width: 540px) {
  .sheet-week { display: grid; grid-template-columns: 1fr 1fr; }
  .sheet-week .field { grid-row: 1; grid-column: 1 / -1; max-width: none; }
  .sheet-submit .form-actions { width: 100%; justify-content: stretch; }
  .sheet-submit .form-actions > button { flex: 1; }
}
