:root {
  --ink: #173d34;
  --forest: #143c32;
  --green: #285e49;
  --sage: #e9f0e5;
  --ivory: #f6f4ed;
  --paper: #fffef9;
  --line: #dfe5d9;
  --muted: #67766d;
  --amber: #956015;
  --red: #a03c35;
  --shadow: 0 6px 28px #15392c06;
  --radius: 16px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 15px;
  font-weight: 600;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
button:hover {
  background: #eff3e9;
  border-color: #a9bca9;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: var(--forest);
  color: white;
  border-color: var(--forest);
}
.primary:hover {
  background: #285c48;
  color: white;
}
.link {
  border: 0;
  background: none;
  padding: 6px;
  color: var(--green);
  min-height: 36px;
}
.small-button {
  font-size: 12px;
  padding: 7px 10px;
  min-height: 35px;
  white-space: nowrap;
}
.icon-button {
  font-size: 27px;
  padding: 0;
  min-width: 40px;
}
.danger {
  color: var(--red);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.table-scroll:focus-visible {
  outline: 3px solid #a9caba;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.16;
  margin: 8px 0 10px;
}
h2 {
  font-size: 27px;
  line-height: 1.25;
}
h3 {
  font-size: 16px;
  line-height: 1.4;
}
p {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.17em;
  font-weight: 700;
  color: #71866b;
}
.shell {
  display: flex;
  min-height: 100dvh;
}
aside {
  width: 224px;
  flex: none;
  padding: 34px 20px;
  background:
    radial-gradient(ellipse at 0 0, #32664f55, transparent 65%), var(--forest);
  color: #edf3e8;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  font-family: Georgia, serif;
  font-size: 31px;
  line-height: 1;
}
.brand small {
  display: block;
  margin-top: 8px;
  font:
    9px/1.2 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0.18em;
}
.mark {
  display: grid;
  place-items: center;
  background: #c5d5b4;
  color: var(--forest);
  height: 43px;
  width: 43px;
  border-radius: 13px;
  font-size: 35px;
  padding-bottom: 4px;
  flex: none;
}
.workspace {
  font-size: 11px;
  color: #b5cbbf;
  border: 1px solid #ffffff1a;
  border-radius: 9px;
  padding: 12px;
  margin-top: 32px;
}
nav {
  display: grid;
  gap: 5px;
  margin-top: 27px;
}
nav button {
  display: flex;
  gap: 11px;
  align-items: center;
  text-align: left;
  color: #c3d4cb;
  background: transparent;
  border: 0;
  font-size: 12px;
  padding: 13px 12px;
  white-space: normal;
}
nav button:hover {
  background: #ffffff0f;
  color: white;
}
nav button.selected {
  color: white;
  background: #ffffff17;
  box-shadow: inset 3px 0 #c5d5b4;
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex: none;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 11px;
  color: #bdcfbf;
}
.sidebar-bottom small {
  display: block;
  font-size: 10px;
  color: #8fad9e;
  margin: 6px 0;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #b9d4a5;
  border-radius: 50%;
  margin-right: 5px;
}
.main {
  min-width: 0;
  flex: 1;
}
header {
  height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: #fffdf780;
  gap: 10px;
}
.crumb {
  font-size: 12px;
  color: var(--muted);
}
.crumb span {
  color: #a8b3a7;
  margin: 0 10px;
}
.crumb b {
  color: var(--ink);
  font-weight: 500;
}
header .buttons button {
  font-size: 11px;
  min-height: 34px;
  padding: 6px 11px;
}
.buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.notice {
  padding: 9px 34px;
  font-size: 11px;
  background: #efe9d2;
  color: #766328;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 27px;
}
.heading p {
  font-size: 13px;
  max-width: 650px;
}
.heading .buttons {
  flex-shrink: 0;
}
main {
  padding: 32px;
  max-width: 1900px;
  margin: auto;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #8b968b;
  font-size: 11px;
  padding: 24px 34px;
  gap: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 23px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat small {
  color: var(--muted);
  font-size: 11px;
}
.stat strong {
  display: block;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.045em;
  margin: 8px 0;
  font-variant-numeric: tabular-nums;
}
.stat p {
  font-size: 10px;
  line-height: 1.5;
}
.stat:last-child strong {
  color: var(--amber);
}
.welcome-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background:
    radial-gradient(ellipse at 90% 10%, #38664d70, transparent 65%),
    var(--forest);
  padding: 26px 30px;
  color: #f9fbf4;
  border-radius: var(--radius);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.welcome-strip h2 {
  font-size: 29px;
  margin: 7px 0;
}
.welcome-strip .eyebrow {
  color: #aec2a0;
}
.welcome-strip p {
  font-size: 12px;
  color: #c5d4c8;
}
.welcome-strip button {
  background: #d9e4ca;
  color: var(--forest);
  border-color: #d9e4ca;
  font-size: 12px;
  white-space: nowrap;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 23px;
}
.panel > p {
  margin: 12px 0 20px;
}
.table-panel {
  padding: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 24px;
  gap: 18px;
  flex-wrap: wrap;
}
.panel-head h2 {
  font-size: 23px;
}
.panel-head p {
  font-size: 12px;
  margin-top: 6px;
}
.panel-head .sub {
  font-size: 12px;
  color: var(--muted);
}
.table-tools {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 20px 23px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 600;
  font-size: 12px;
  color: #41564a;
}
label small {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
.table-tools label {
  font-size: 10px;
  font-weight: 500;
  gap: 5px;
  min-width: 145px;
}
.search-wrap {
  flex: 1;
  max-width: 440px;
  min-width: 200px !important;
}
input,
select,
textarea {
  border: 1px solid #dce2d6;
  border-radius: 8px;
  color: var(--ink);
  background: #fffefb;
  padding: 10px 12px;
  min-width: 0;
  width: 100%;
  min-height: 43px;
  outline: 0;
  font-weight: 400;
}
input:hover,
select:hover,
textarea:hover {
  border-color: #b8c8b3;
}
input::placeholder,
textarea::placeholder {
  color: #9ba699;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--forest);
}
textarea {
  resize: vertical;
  min-height: 76px;
}
select {
  padding-right: 25px;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #bdcbb7 #f2f4ec;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  color: #6b7e69;
  background: #f2f5ed;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
}
th,
td {
  padding: 15px 16px;
  vertical-align: middle;
}
td {
  border-bottom: 1px solid #e7ecdf;
  background: var(--paper);
}
tr:last-child td {
  border-bottom: 0;
}
td b {
  font-weight: 600;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 5px;
}
td.numeric,
th.numeric {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.total-cell {
  font-weight: 700;
}
.records {
  min-width: 1050px;
}
.records .pin {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 7px 0 12px -12px #233a28;
}
.records th.pin {
  z-index: 3;
}
.records td.pin {
  min-width: 195px;
}
.tone-overdue td {
  background: #fff8f3;
}
.tone-completed td {
  background: #f2f7ee;
}
.tone-short td {
  background: #fffbed;
}
tbody tr:hover td {
  background: #edf2e6;
}
.record-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  min-height: 32px;
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
}
.record-link:hover {
  background: none;
  color: #36815b;
}
.avatar {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid #dce4d1;
  border-radius: 11px;
  background: #edf1e6;
  font-size: 10px;
  font-weight: 600;
  flex: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 4px 7px;
  background: #eaf1e4;
  color: #3e6d49;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
  font-weight: 600;
}
.status-overdue,
.status-missed {
  background: #f9e8df;
  color: #9c4b31;
}
.status-paid-short,
.status-unrecorded {
  background: #f9efce;
  color: #8d6716;
}
.status-reversed,
.status-not-available,
.status-not-started {
  background: #edf0ea;
  color: #72816c;
}
.status-paid-extra {
  background: #e5edf8;
  color: #386388;
}
.sort {
  padding: 0;
  border: 0;
  background: none;
  min-height: 0;
  display: inline-flex;
  gap: 9px;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  align-items: center;
}
.sort:hover {
  background: none;
}
.sort span {
  color: #a4b4a0;
}
.table-foot {
  display: flex;
  justify-content: space-between;
  padding: 13px 23px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #7a8a74;
  gap: 12px;
}
.empty {
  text-align: center;
  padding: 55px 25px;
}
.empty-symbol {
  display: block;
  color: #719064;
  font: 40px Georgia;
  margin-bottom: 15px;
}
.empty h2 {
  font-size: 25px;
}
.empty p {
  font-size: 13px;
  margin: 12px 0 22px;
}
.no-results {
  text-align: center;
  color: var(--muted);
  padding: 32px;
}
.note-cell {
  min-width: 190px;
  max-width: 330px;
  overflow-wrap: anywhere;
}
.reversed-row td {
  color: #87907f;
}
.row-actions {
  display: flex;
  gap: 5px;
}
.row-actions button {
  font-size: 11px;
}
.week-caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px 5px;
  font-size: 13px;
}
.week-caption span {
  font-size: 11px;
  color: var(--muted);
}
.weekly-table input:not([type="checkbox"]) {
  min-width: 125px;
  max-width: 150px;
  padding: 8px;
  font-size: 13px;
}
.weekly-table select {
  min-width: 145px;
  font-size: 12px;
}
.batch-bar {
  display: flex;
  gap: 14px;
  padding: 20px 23px;
  align-items: end;
  background: #f5f7f0;
}
.batch-note {
  flex: 1;
}
.batch-bar label {
  font-size: 10px;
}
.batch-bar button {
  white-space: nowrap;
}
.report-date {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}
.report-date p,
.report-note {
  font-size: 11px;
}
.report-date label {
  max-width: 190px;
}
.callout {
  background: var(--sage);
  padding: 16px;
  border-radius: 10px;
  font-size: 12px;
  color: #59704e;
  line-height: 1.6;
  margin-top: 22px;
}
.hint {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 12px 0;
}
.error {
  font-size: 12px;
  line-height: 1.5;
  color: var(--red);
  margin-top: 12px;
}
.error:empty {
  display: none;
}
#weekly-error {
  padding: 0 23px 15px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 100px #0e281c40;
  padding: 28px;
  width: min(760px, calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: #132d2455;
  backdrop-filter: blur(3px);
}
.dialog-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 23px;
}
.dialog-top h2 {
  font-size: 32px;
  margin-top: 8px;
}
.dialog-top .eyebrow {
  font-size: 9px;
}
.dialog-top button {
  flex: none;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.formgrid > * {
  min-width: 0;
}
input[type="date"] {
  max-width: 100%;
  min-inline-size: 0;
  appearance: none;
}
input[type="date"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}
#print-document {
  display: none;
}
.full {
  grid-column: 1/-1;
}
.form-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-top: 19px;
}
.form-section summary {
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.form-section[open] summary {
  margin-bottom: 14px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 23px;
  flex-wrap: wrap;
}
.review {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 17px;
  margin: 18px 0;
  overflow: hidden;
}
.review > div {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #e7ecdf;
  font-size: 12px;
}
.review > div:last-child {
  border: 0;
}
.review dt {
  color: var(--muted);
  flex: 1;
}
.review dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  max-width: 65%;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.payment-context,
.payment-preview {
  border: 1px solid #dce6d2;
  background: #f0f5e9;
  border-radius: 12px;
  padding: 16px;
  margin-top: 18px;
  font-size: 12px;
}
.payment-context .context-grid,
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.payment-context small,
.preview-grid small {
  display: block;
  color: #6b7d63;
  font-size: 10px;
  margin-bottom: 5px;
}
.payment-context strong,
.preview-grid strong {
  font-size: 17px;
  letter-spacing: -0.02em;
  display: block;
  font-variant-numeric: tabular-nums;
}
.payment-preview .shortfall {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #d8e1ce;
  color: #966b18;
}
.detail-banner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: var(--forest);
  color: white;
  border-radius: 13px;
  padding: 22px;
}
.detail-banner span {
  font-size: 10px;
  color: #bfd0b9;
}
.detail-banner h3 {
  font-size: 22px;
  margin-top: 6px;
}
.detail-banner strong {
  display: block;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  margin-top: 5px;
}
.detail-banner > div:last-child {
  text-align: right;
}
.detail-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.detail-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}
.detail-section .panel-head {
  padding: 0;
}
.detail-section h3 {
  margin-bottom: 8px;
}
.detail-section table {
  min-width: 500px;
}
.auth-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--ivory);
}
.auth-story {
  padding: 54px 9%;
  background: radial-gradient(ellipse at 30% 20%, #28594b, #113b31 70%);
  color: #f6f3ea;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
}
.auth-story .eyebrow {
  color: #b4d0bd;
}
.auth-story h1 {
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.1;
  margin: 20px 0;
}
.auth-story p {
  font-size: 18px;
  max-width: 340px;
  line-height: 1.7;
  color: #cbd9d0;
}
.auth-side {
  display: grid;
  place-items: center;
  padding: 36px;
}
.auth-card {
  max-width: 420px;
  width: 100%;
}
.auth-card h2 {
  font-size: 44px;
  margin: 15px 0;
}
.auth-card > p {
  line-height: 1.7;
}
.auth-card form {
  margin-top: 28px;
}
.auth-card input {
  margin-bottom: 18px;
  min-height: 48px;
  font-size: 16px;
}
.auth-card button {
  width: 100%;
  min-height: 48px;
}
.auth-card #auth-message {
  color: var(--green);
  font-size: 13px;
  margin-top: 16px;
}
.auth-modes {
  display: flex;
  gap: 5px;
  margin: 22px 0 0;
  border-bottom: 1px solid var(--line);
}
.auth-modes button {
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 12px;
}
.auth-modes button.selected {
  box-shadow: inset 0 -2px var(--forest);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--forest);
  color: white;
  max-width: min(90vw, 650px);
  padding: 14px 20px;
  border-radius: 11px;
  box-shadow: 0 9px 40px #0002;
  display: none;
  z-index: 50;
  font-size: 13px;
}
.sync-label {
  font-size: 10px;
  color: #789170;
  margin-right: 10px;
}
.sync-label:empty {
  display: none;
}
.loading-content {
  padding: 60px;
  text-align: center;
}
.statement-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 15px 0;
}
.statement-header p {
  font-size: 12px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
@media (min-width: 1600px) {
  aside {
    width: 250px;
  }
  main {
    padding: 42px;
  }
  .records td,
  .records th {
    padding: 17px 20px;
  }
}
@media (max-width: 1150px) {
  .heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  aside {
    width: 205px;
    padding: 28px 15px;
  }
  main {
    padding: 26px;
  }
  .welcome-strip {
    align-items: start;
    flex-direction: column;
  }
  .stat strong {
    font-size: 27px;
  }
  header {
    padding: 0 26px;
  }
  .batch-bar {
    flex-wrap: wrap;
  }
  .batch-note {
    min-width: 230px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  aside {
    position: relative;
    width: 100%;
    height: auto;
    padding: 18px 18px 12px;
  }
  .brand {
    font-size: 26px;
  }
  .brand small {
    font-size: 8px;
    margin-top: 5px;
  }
  .mark {
    width: 36px;
    height: 36px;
    font-size: 29px;
    border-radius: 10px;
  }
  .workspace,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow-x: auto;
    margin-top: 19px;
    gap: 4px;
    scrollbar-width: none;
  }
  nav button {
    white-space: nowrap;
    padding: 10px;
    font-size: 11px;
    min-height: 42px;
    gap: 6px;
  }
  .nav-icon {
    width: 16px;
    height: 16px;
  }
  nav button.selected {
    box-shadow: inset 0 -2px #c5d5b4;
  }
  header {
    height: 58px;
    padding: 0 18px;
  }
  .crumb {
    font-size: 10px;
  }
  .crumb span {
    margin: 0 5px;
  }
  header .buttons {
    gap: 5px;
  }
  header .buttons button {
    font-size: 10px;
    padding: 5px 8px;
  }
  .sync-label {
    display: none;
  }
  .notice {
    padding: 10px 18px;
    font-size: 10px;
  }
  main {
    padding: 24px 16px;
  }
  h1 {
    font-size: 34px;
  }
  .heading {
    margin-bottom: 21px;
    gap: 17px;
  }
  .heading p {
    font-size: 12px;
  }
  .heading .buttons {
    width: 100%;
  }
  .heading .buttons button {
    font-size: 11px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 15px;
    border-radius: 12px;
  }
  .stat strong {
    font-size: 23px;
  }
  .stat small {
    font-size: 10px;
  }
  .stat p {
    font-size: 9px;
  }
  .welcome-strip {
    padding: 23px;
    border-radius: 13px;
  }
  .welcome-strip h2 {
    font-size: 26px;
  }
  .panel {
    border-radius: 13px;
    padding: 20px;
  }
  .table-panel {
    padding: 0;
  }
  .panel-head {
    padding: 20px 16px;
  }
  .panel-head h2 {
    font-size: 22px;
  }
  .table-tools {
    padding: 16px;
    gap: 10px;
  }
  .table-tools label {
    flex: 1;
    min-width: 110px;
  }
  .search-wrap {
    max-width: none;
    flex-basis: 100% !important;
  }
  .table-tools input,
  .table-tools select {
    font-size: 16px;
  }
  .table-scroll:after {
    content: "";
  }
  .records td.pin {
    min-width: 160px;
    max-width: 180px;
  }
  .record-link {
    white-space: normal;
    font-size: 12px;
  }
  .avatar {
    display: none;
  }
  th,
  td {
    padding: 13px;
  }
  .records {
    min-width: 980px;
  }
  td.small {
    font-size: 10px;
  }
  .table-foot {
    padding: 13px 16px;
    font-size: 9px;
  }
  .batch-bar {
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr;
  }
  .batch-note {
    min-width: 0;
  }
  .batch-bar input,
  .weekly-table input,
  .weekly-table select {
    font-size: 16px !important;
  }
  .report-date {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }
  .report-date label {
    width: 100%;
    max-width: none;
  }
  .formgrid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .formgrid input,
  .formgrid select,
  .formgrid textarea,
  dialog input,
  dialog select,
  dialog textarea {
    font-size: 16px;
  }
  .full {
    grid-column: auto;
  }
  dialog {
    width: calc(100% - 18px);
    padding: 20px;
    border-radius: 15px;
    max-height: 94dvh;
  }
  .dialog-top h2 {
    font-size: 28px;
  }
  .dialog-top .eyebrow {
    font-size: 8px;
  }
  .payment-context .context-grid,
  .preview-grid {
    gap: 8px;
  }
  .payment-context strong,
  .preview-grid strong {
    font-size: 15px;
  }
  .payment-context small,
  .preview-grid small {
    font-size: 9px;
  }
  .detail-banner {
    padding: 18px;
  }
  .detail-banner strong {
    font-size: 23px;
  }
  .review > div {
    font-size: 11px;
    gap: 12px;
  }
  .detail-actions button {
    font-size: 11px;
  }
  .auth-screen {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 28px;
    gap: 26px;
  }
  .auth-story h1 {
    font-size: 36px;
  }
  .auth-story h1 br {
    display: none;
  }
  .auth-story p,
  .auth-story > small {
    display: none;
  }
  .auth-side {
    padding: 32px 24px;
  }
  .auth-card h2 {
    font-size: 36px;
  }
  footer {
    padding: 20px 18px;
    font-size: 9px;
  }
  footer span {
    max-width: 150px;
    text-align: right;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (max-width: 600px) {
  .activity-history {
    table-layout: fixed;
    font-size: 11px;
  }
  .activity-history th,
  .activity-history td {
    padding: 10px 5px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .activity-history th:nth-child(1) {
    width: 19%;
  }
  .activity-history th:nth-child(2) {
    width: 22%;
  }
  .activity-history th:nth-child(3) {
    width: 21%;
  }
  .activity-history th:nth-child(4) {
    width: 38%;
  }
}
@media print {
  body.printing-dialog > :not(#print-document) {
    display: none !important;
  }
  body.printing-dialog #print-document {
    display: block;
  }
  body.printing-dialog,
  #print-document {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  #print-document .review > div,
  #print-document tr {
    break-inside: avoid;
  }
  #print-document thead {
    display: table-header-group;
  }

  body {
    background: white;
    color: #142f26;
  }
  aside,
  header,
  .notice,
  footer,
  .buttons,
  button,
  .table-tools,
  .search-wrap,
  #toast,
  .dialog-actions,
  .detail-actions,
  .auth-screen,
  .batch-bar {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .main,
  main {
    padding: 0;
    width: 100%;
    max-width: none;
  }
  .panel {
    box-shadow: none;
    border: 0;
    padding: 0;
  }
  .table-scroll {
    overflow: visible;
  }
  table.records,
  table {
    min-width: 0;
    width: 100%;
    font-size: 9px;
  }
  th,
  td {
    padding: 6px !important;
    position: static !important;
    box-shadow: none !important;
  }
  .records td.pin {
    min-width: 0 !important;
    max-width: none !important;
  }
  h1 {
    font-size: 24px;
  }
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .stat {
    padding: 10px;
  }
  .stat strong {
    font-size: 18px;
  }
  .stat p {
    font-size: 8px;
  }
  .record-link {
    display: block !important;
    min-height: 0;
    font-size: 9px;
  }
  .record-link .avatar {
    display: none;
  }
  .detail-banner {
    color: #143c32;
    background: #eef3e7;
  }
  .detail-banner span {
    color: #56734f;
  }
  dialog {
    position: static;
    max-height: none;
    width: 100%;
    box-shadow: none;
    border: 0;
    overflow: visible;
    padding: 0;
  }
  body:has(dialog[open]) .shell {
    display: none;
  }
  dialog:not([open]) {
    display: none;
  }
  body:has(dialog[open]) {
    overflow: visible;
  }
  .detail-section {
    break-inside: avoid;
  }
  .table-foot {
    border: 0;
  }
  .heading {
    margin-bottom: 15px;
  }
  .report-date {
    display: block;
  }
  .report-date input {
    border: 0;
  }
  .form-section {
    break-inside: avoid;
  }
}

/* Maintenance workspace: report navigation and compact business totals. */
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.report-card {
  text-align: left;
  color: var(--ink);
  white-space: normal;
}
.report-card h2 {
  margin: 0 0 12px;
}
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px 0;
  color: #55685d;
}
.table-tools {
  flex-wrap: wrap;
}
.table-tools label {
  min-width: 160px;
}
.records td {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .report-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .table-tools label {
    min-width: 0;
    width: 100%;
  }
  .heading .buttons {
    flex-wrap: wrap;
  }
  .table-foot {
    flex-wrap: wrap;
    gap: 12px;
  }
  .welcome-strip {
    flex-wrap: wrap;
    gap: 18px;
  }
}

.synthetic-notice {
  background: #f6dc86;
  color: #203e31;
  padding: 14px 24px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid #c9ac4b;
}

.journal-line {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 12px 0;
}
.journal-line button {
  margin-bottom: 4px;
}
.accounting-tabs {
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.accounting-tabs .selected {
  background: #173e35;
  color: white;
}
.registration-grid {
  display: grid;
  gap: 12px;
}
.detail-actions {
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .journal-line {
    grid-template-columns: 1fr 1fr;
  }
  .journal-line label:first-child {
    grid-column: 1/-1;
  }
  .accounting-tabs {
    gap: 6px;
  }
  .accounting-tabs button {
    font-size: 12px;
  }
  .report-date {
    flex-wrap: wrap;
  }
}

.onboarding {
  max-width: 720px;
  margin: 24px auto;
}
.onboarding h1 {
  margin: 12px 0;
}
.onboarding form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}
.onboarding input {
  width: 100%;
}
.onboarding form p {
  margin: 0;
}
