:root {
  --ink: #1c1914;
  --paper: #f4efe4;
  --card: #fffdf8;
  --line: #d4cbb8;
  --green: #4a151c;
  --green-2: #6b2430;
  --gold: #c4a35a;
  --red: #8a2b2b;
  --muted: #6b6254;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font: 15px/1.45 "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--green); }
.top {
  background: var(--green);
  color: #f3ead6;
  padding: 10px max(22px, env(safe-area-inset-right)) 0 max(22px, env(safe-area-inset-left));
}
.top a { color: #f3ead6; text-decoration: none; }
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.top-main { flex: 1; min-width: 0; }
.logo {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 18px 8px 12px;
}
.logo img {
  display: block;
  height: 200px;
  width: auto;
  max-width: min(692px, 55vw);
  object-fit: contain;
  object-position: right center;
}
.search { margin: 0; display: flex; gap: 8px; max-width: 560px; width: 100%; }
.search input {
  flex: 1; min-width: 0; padding: 10px; border: 0; border-radius: 4px; font-size: 16px;
}
.search button, .btn {
  background: var(--gold); color: var(--ink); border: 0; border-radius: 4px;
  padding: 10px 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-block; min-height: 44px;
}
.btn.ghost { background: #ece4d2; }
.btn.danger { background: #c46a4a; color: #fff; }
.nav-burger {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--ink);
  border: 0;
  border-radius: 4px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 15px;
  min-height: 44px;
  cursor: pointer;
}
.nav-burger-icon {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
}
.nav-open .nav-burger-icon {
  box-shadow: none;
  transform: rotate(45deg);
}
.nav-open .nav-burger-icon::before {
  content: "";
  display: block;
  height: 2px;
  background: var(--ink);
  transform: rotate(-90deg);
}
nav { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
nav a {
  padding: 10px 12px; border-radius: 6px 6px 0 0; color: #e6dcc4;
  min-height: 44px;
}
nav a.on, nav a:hover { background: var(--paper); color: var(--green); }
.wrap-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box { max-width: 420px; width: 100%; margin: 0 auto; }
.login-logo {
  display: block;
  margin: 0 auto 18px;
  height: 166px;
  width: auto;
  max-width: 364px;
}
.error { color: #8a2b2b; font-weight: 600; }
.notice { color: var(--green); font-weight: 600; }
.merge-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; align-items: start; }
#writers input[name=code] { max-width: 110px; }
.merge-preview h3 { margin: 0 0 8px; font-size: 16px; }
.merge-preview h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.compare-panel { margin-bottom: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.compare-dl { margin: 0 0 12px; }
.compare-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 4px 10px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
}
.compare-row dt { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.compare-row dd { margin: 0; overflow-wrap: anywhere; }
.compare-row.is-diff { background: #f7f0e0; }
.compare-list { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.compare-list li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.owed-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.owed-head, .owed-row {
  display: grid;
  grid-template-columns: 140px minmax(180px, 1.4fr) 140px minmax(220px, 1fr);
  gap: 16px 20px;
  align-items: start;
}
.owed-head {
  padding: 0 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.owed-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.owed-inv a, .owed-who a { font-weight: 700; }
.owed-inv, .owed-who { min-width: 0; overflow-wrap: anywhere; }
.owed-meta { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.35; }
.owed-amt { text-align: right; font-variant-numeric: tabular-nums; }
.owed-amt strong { display: block; font-size: 18px; }
.owed-send { min-width: 0; }
.owed-send-btns { display: flex; gap: 8px; margin-bottom: 8px; }
.owed-send-btns .btn { flex: 1 1 0; text-align: center; min-height: 40px; }
.owed-email { margin: 0; }
.owed-email input[type=email] { width: 100%; margin: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form select, .inline-form input[type=password], .inline-form input[type=text], .inline-form input[type=email] { width: auto; min-width: 140px; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
img { max-width: 100%; }
.wrap {
  padding: 22px max(22px, env(safe-area-inset-right)) 28px max(22px, env(safe-area-inset-left));
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.wrap-dash { max-width: 1360px; overflow: visible; }
h1 { margin: 0 0 6px; font-size: 26px; }
.sub { color: var(--muted); margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin-bottom: 22px; }
.stats-money { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat, .card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px;
  min-width: 0;
}
.stat {
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
a.stat:hover, a.stat:focus-visible {
  border-color: var(--green);
}
.stat b {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  color: var(--green);
}
.stat-label { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); vertical-align: middle; }
th.sort { white-space: nowrap; }
a.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
a.sort-link:hover, a.sort-link.on { color: var(--green); }
.sort-ind {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1;
  font-size: 14px;
  color: #c4baa6;
}
.sort-ind .on { color: var(--green); font-weight: 700; }
.right { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.nums { min-width: 0; width: 100%; table-layout: fixed; }
table.nums th, table.nums td { padding: 8px 8px; overflow-wrap: anywhere; }
table.nums th:last-child, table.nums td:last-child { width: 40%; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .sub { margin-bottom: 0; }
.toolbar > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.grid > * { min-width: 0; }
label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
input[type=text], input[type=number], input[type=email], input[type=tel], input[type=date], input[type=datetime-local], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 16px; background: #fff;
}
.card, .wrap { overflow-x: auto; }
.wrap-dash { overflow: visible; }
textarea { min-height: 70px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.open, .badge.repair_order { background: #ead9dc; }
.badge.estimate { background: #f3e3b5; }
.badge.closed, .badge.invoice { background: #d5e4f5; }
.badge.void { background: #f0d0d0; }
.veh-sold { border-color: #d4c4c4; }
.badge.work { margin-left: 4px; }
.badge.work-in_shop { background: #ead9dc; color: #4a151c; }
.badge.work-in_progress { background: #dce8f5; color: #1e3a5f; }
.badge.work-need_parts { background: #f5e6c8; color: #7a4a12; }
.badge.work-waiting { background: #eee8dc; color: #5c5346; }
.badge.work-ready { background: #d4ead9; color: #1e4a28; }
.work-status-form { margin: 0; }
.work-status-select { width: auto; min-width: 148px; margin: 0; padding: 6px 8px; font-size: 14px; }
.work-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.work-chips a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ece4d2;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  min-height: 40px;
}
.work-chips a.on, .work-chips a:hover { background: var(--gold); }
.board-section { margin-bottom: 28px; }
.board-section-head h2 { margin: 0 0 4px; }
.board-section-head .sub { margin-bottom: 12px; }
.board-group {
  margin: 18px 0 8px;
  font-size: 15px;
  color: var(--green);
}
.board-list { display: flex; flex-direction: column; gap: 8px; }
.board-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto) 110px;
  gap: 12px 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.board-ro { font-weight: 700; font-size: 18px; }
.board-who { margin-top: 2px; font-weight: 600; }
.board-meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.board-status { justify-self: end; }
.board-amt {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 18px;
  color: var(--green);
}
.declined { color: var(--red); text-decoration: line-through; }
.totals { max-width: 320px; margin-left: auto; }
.totals td { border: 0; }
.totals .grand { font-size: 18px; font-weight: 700; }
.pager { margin-top: 14px; }
.filters { margin-bottom: 16px; }
.filter-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.search-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  overflow: auto;
}
.search-modal::backdrop { background: rgba(28, 25, 20, .45); }
.search-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 0;
}
.search-modal-head h2 { margin: 0; font-size: 20px; }
.search-modal .filters {
  margin: 0;
  border: 0;
  padding: 8px 16px 16px;
}
.cust-desk { max-width: 720px; }
.cust-find-form { max-width: none; margin-bottom: 12px; }
.cust-results { display: flex; flex-direction: column; gap: 8px; }
.cust-hit {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
}
.cust-hit:hover, .cust-hit:focus {
  border-color: var(--gold);
  color: var(--ink);
}
.cust-hit span { color: var(--muted); font-size: 14px; }
.est-veh-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.est-veh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.est-veh .btn { flex: 0 0 auto; }
.cust-page { display: flex; flex-direction: column; gap: 16px; }
.cust-page .card { overflow: visible; }
.cust-card h2, .veh-card h2 { margin: 0 0 8px; font-size: 18px; }
.cust-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 12px;
}
.cust-fields .span-3 { grid-column: 1 / -1; }
.cust-fields textarea { min-height: 56px; }
.opt { color: var(--muted); font-weight: 400; }
.veh-list { display: flex; flex-direction: column; gap: 10px; }
.veh-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  flex-wrap: wrap;
}
.veh-item.veh-off { background: #f7f3ea; color: var(--muted); }
.veh-main { flex: 1 1 280px; min-width: 0; }
.veh-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.veh-name { font-size: 16px; }
.veh-name a { color: var(--ink); text-decoration: none; }
.veh-name a:hover { color: var(--green); text-decoration: underline; }
.veh-meta, .veh-notes {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.veh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.veh-actions .btn { min-height: 40px; padding: 8px 12px; }
.veh-actions form { margin: 0; }
.veh-hist {
  flex: 1 1 100%;
  margin-top: 4px;
}
.veh-job-table { min-width: 0; }
.veh-job-table th, .veh-job-table td { padding: 6px 8px; }
details.soft { margin-top: 12px; }
details.soft summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--green);
  padding: 8px 0;
}
.search-modal.hist-modal { width: min(920px, calc(100vw - 32px)); }
.hist-body { padding: 8px 16px 16px; }
.hist-modal table { min-width: 0; }
.veh-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.veh-thumb {
  margin: 0;
  width: 88px;
}
.veh-thumb img {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #eee;
}
.veh-thumb figcaption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.thumb-del {
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--red);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.veh-add-photo { margin-top: 8px; }
.photo-field input[type=file] { padding: 8px 0; }
.photo-status { margin: 4px 0 0; }
.photo-modal { width: min(960px, calc(100vw - 32px)); }
.photo-modal-body { padding: 8px 16px 16px; }
.photo-modal-body img { display: block; width: 100%; height: auto; max-height: calc(100vh - 140px); object-fit: contain; }
.period {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: -4px 0 16px;
}
.period label { margin-top: 0; }
.period select { width: auto; min-width: 140px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.admin-nav a {
  padding: 10px 14px; border-radius: 4px; background: #ece4d2; color: var(--ink);
  text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center;
}
.admin-nav a.on, .admin-nav a:hover { background: var(--gold); }
.users-table td { vertical-align: middle; }
.users-table td.user-edit { width: 1%; white-space: nowrap; }
.users-table tr.is-editing,
table tr.is-editing { background: #f7f0e0; }
.users-table .user-edit .btn { min-height: 36px; padding: 6px 12px; }
.users-table .sub { margin: 0; }
.dash {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: center;
  gap: 18px;
  padding: 6px 0 12px;
}
.dash-inline {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  justify-content: flex-start;
  margin-bottom: 16px;
  padding-top: 0;
}
.dash-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: auto;
  min-width: 0;
  min-height: 240px;
  aspect-ratio: 1 / 1;
  padding: 22px 20px;
  background: linear-gradient(180deg, #fffef9 0%, #f4eee2 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transform: translateY(0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    0 1px 0 #d4cbb8,
    0 4px 0 var(--green),
    0 8px 14px rgba(28, 25, 20, .12);
  transition: transform .12s ease, box-shadow .12s ease;
}
.dash-tile:hover,
.dash-tile:focus-visible {
  border-color: var(--gold);
  outline: none;
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 1px 0 var(--gold),
    0 6px 0 var(--green),
    0 12px 16px rgba(28, 25, 20, .14);
}
.dash-tile:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 6px rgba(31, 61, 43, .1),
    0 1px 0 var(--green),
    0 3px 6px rgba(28, 25, 20, .1);
}
.dash-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-label {
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
}
.dash-desc {
  flex: 1;
  overflow: hidden;
  color: var(--muted);
  font-size: 16px;
}
.dash-stat {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
}
@media (max-width: 1366px) {
  .dash:not(.dash-inline) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .dash-tile {
    aspect-ratio: auto;
    min-height: 0;
    padding: 16px 14px;
    gap: 6px;
  }
  .dash-label { font-size: 20px; }
  .dash-desc { font-size: 14px; }
  .dash-stat { font-size: 14px; margin-top: 4px; }
}
@media (max-width: 900px) {
  .nav-burger { display: inline-flex; }
  .top { padding-bottom: 10px; }
  nav#site-nav {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0 0 4px;
  }
  .nav-open nav#site-nav { display: flex; }
  nav#site-nav a {
    flex: none;
    width: 100%;
    border-radius: 6px;
    text-align: left;
    background: rgba(243, 234, 214, .08);
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  nav#site-nav a.on,
  nav#site-nav a:hover { background: var(--paper); color: var(--green); }
}
@media (max-width: 1099px) {
  .owed-head, .owed-row { grid-template-columns: 1fr 1fr; }
  .owed-amt { text-align: left; }
  .owed-send { grid-column: 1 / -1; }
  .dash:not(.dash-inline) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-tile {
    aspect-ratio: auto;
    min-height: 0;
    padding: 14px 12px;
  }
  .logo img { height: 132px; max-width: min(462px, 40vw); }
  .top { padding: 10px 16px 10px; }
  .cust-fields { grid-template-columns: 1fr 1fr; }
  .board-card { grid-template-columns: minmax(0, 1fr) auto; }
  .board-amt { grid-column: 2; grid-row: 1; }
  .board-status { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 767px) {
  .owed-head { display: none; }
  .owed-head, .owed-row { grid-template-columns: 1fr; }
  .owed-email input[type=email] { width: 100%; }
  .top { padding: 10px 12px 10px; }
  .top-row {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "burger logo"
      "search search";
    align-items: center;
    gap: 10px;
  }
  .nav-burger { grid-area: burger; justify-self: start; }
  .top-main { grid-area: search; }
  .logo {
    grid-area: logo;
    margin-left: 0;
    justify-content: flex-end;
    padding: 0 10px 0 0;
  }
  .logo img { height: 70px; max-width: min(242px, 70vw); }
  .search { max-width: none; }
  .wrap { padding: 14px; }
  h1 { font-size: 22px; }
  .dash-label { font-size: 22px; }
  .dash {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .dash-tile {
    aspect-ratio: auto;
    min-height: 156px;
    padding: 18px 16px;
  }
  .grid, .meta, .merge-preview, .cust-fields { grid-template-columns: minmax(0, 1fr); display: grid; }
  .toolbar { align-items: flex-start; }
  .stats, .stats-money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 16px; }
  .wrap-login { min-height: 100vh; align-items: center; }
  .login-box { margin: 0 auto; }
  .login-logo { height: 125px; max-width: 286px; margin-bottom: 12px; }
  .period { flex-direction: column; align-items: stretch; }
  .period select { width: 100%; min-width: 0; }
  .inline-form select, .inline-form input[type=password], .inline-form input[type=text], .inline-form input[type=email] { min-width: 0; width: 100%; }
  .board-card { grid-template-columns: 1fr; }
  .board-amt, .board-status { grid-column: 1; justify-self: start; text-align: left; }
  .work-status-select { width: 100%; min-width: 0; }
  table:not(.nums) { min-width: 520px; }
  table.nums { display: block; width: 100%; min-width: 0; font-size: 13px; table-layout: auto; }
  table.nums tr {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  table.nums th, table.nums td {
    border: 0;
    padding: 0;
    width: auto;
    overflow-wrap: normal;
  }
  table.nums tr:first-child { flex-wrap: nowrap; }
  table.nums th { flex: 1 1 0; }
  table.nums .right { white-space: nowrap; }
}

@page { margin: .4in; }
@media print {
  body { background: #fff; }
  .top, .toolbar, .no-print, .nav-burger { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .card, table { border: 0; }
  .print-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
}
.print-sheet { max-width: 800px; margin: 0 auto; background: #fff; padding: 16px 18px; font-size: 12px; line-height: 1.3; }
.print-sheet table { min-width: 0; }
.print-sheet th, .print-sheet td { padding: 3px 6px; font-size: 12px; }
.print-sheet .totals .grand { font-size: 13px; }
.print-sheet p { margin: 6px 0; }
.print-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 3px solid var(--green);
  padding-bottom: 8px;
  margin-bottom: 10px;
  font-size: 12px;
}
.print-head h1 { margin: 0 0 2px; color: var(--green); font-size: 18px; }
.print-head-logo { text-align: center; }
.print-head-logo img {
  display: block;
  height: 72px;
  width: auto;
  max-width: 220px;
  margin: 0 auto;
}
.print-head-right { text-align: right; white-space: nowrap; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.fine { font-size: 9px; color: #444; margin-top: 8px; }
.blank-form .blank-field {
  border-bottom: 1px solid #c8c0b0;
  min-height: 26px;
  margin: 8px 0 0;
}
.blank-form .blank-field span {
  display: inline-block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-top: 2px;
}
.blank-form .blank-rows td { height: 28px; }
.blank-form .blank-amt {
  border-bottom: 1px solid #c8c0b0;
  min-width: 90px;
  height: 22px;
}
