:root {
  --shop: #eceef1;
  --shop-2: #ffffff;
  --steel: #393a3d;
  --paper: #ffffff;
  --paper-2: #f4f5f8;
  --ink: #393a3d;
  --muted: #6b6c72;
  --line: #d4d7dc;
  --accent: #2ca01c;
  --accent-ink: #ffffff;
  --ok: #2ca01c;
  --warn: #d93900;
  --stop: #c0392b;
  --dock: 72px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ticket: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
  --side: #393a3d;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--shop);
  color: var(--ink);
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
.boot { padding: 2rem; color: var(--muted); }

body.sheet-open { overflow: hidden; }

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.stage { flex: 1; min-width: 0; }
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.65rem 0.9rem;
  padding-top: max(0.65rem, env(safe-area-inset-top));
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.act-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: -0.65rem -0.9rem 0.35rem;
  margin-top: calc(-1 * max(0.65rem, env(safe-area-inset-top)));
  padding: 0.85rem 0.9rem;
  padding-top: max(0.85rem, env(safe-area-inset-top));
  background: #1d4e89;
  color: #fff;
}
.act-bar b {
  display: block;
  font-size: 1.12rem;
  line-height: 1.35;
}
.act-bar span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
}
.act-bar .btn {
  background: #fff;
  color: #1d4e89;
  border-color: #fff;
}
.plan-bar {
  grid-column: 1 / -1;
  margin: -0.65rem -0.9rem 0.35rem;
  margin-top: calc(-1 * max(0.65rem, env(safe-area-inset-top)));
  padding: 0.85rem 0.9rem;
  padding-top: max(0.85rem, env(safe-area-inset-top));
  background: #8a4b08;
  color: #fff;
}
.plan-bar b {
  display: block;
  font-size: 1.12rem;
  line-height: 1.35;
}
.plan-bar span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
}
.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.brand-mark {
  flex: 0 0 auto;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--side);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}
.brand-logo {
  flex: 0 0 auto;
  width: auto;
  max-width: 7.5rem;
  height: 2.55rem;
  object-fit: contain;
  border-radius: 0.35rem;
  background: #fff;
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand b {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.brand span { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.log-detail {
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.65rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 10rem;
  overflow: auto;
}
.app-foot {
  margin: 2rem 0 0.5rem;
  padding: 1rem 0 0.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.app-foot p { margin: 0.15rem 0; }
.doc-foot {
  margin-top: 1.5rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
}
.doc-foot p { margin: 0; }
.who { font-size: 0.8rem; color: var(--muted); text-align: right; }
.switch-pair {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}
.loc-wrap {
  display: grid;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.loc-fixed {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.loc-select {
  min-height: 44px;
  width: 100%;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
}
.co-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
}
.desktop-only { display: none !important; }
.menu-btn { display: inline-flex; }
.icon-btn, .btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--paper-2);
  color: var(--ink);
  flex: 0 0 auto;
}
.icon-btn svg { width: 22px; height: 22px; }
.btn {
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ok { background: var(--ok); color: #f3fff8; }
.btn-stop { background: var(--stop); color: #fff5f3; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-steel { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; }
.btn svg { width: 18px; height: 18px; }

.stage {
  padding: 1rem 0.9rem;
  padding-bottom: calc(var(--dock) + env(safe-area-inset-bottom) + 1rem);
  min-width: 0;
}
.stage h2, .stage h3 { margin: 0; }
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.7rem;
}
.page-head h2 { flex: 1 1 8rem; }
.page-head .btn { flex: 1 1 10rem; }
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(3.6rem, 1fr);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--side);
  border-top: 1px solid #2c2d30;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}
.dock::-webkit-scrollbar { display: none; }
.dock a, .dock button {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: var(--dock);
  min-width: 0;
  padding: 0.35rem 0.2rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  text-decoration: none;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.1;
  color: #d4d5d8;
  cursor: pointer;
}
.dock a span, .dock button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dock a.active, .dock button.active {
  color: var(--accent-ink);
  background: rgba(44, 160, 28, 0.22);
}
.dock svg { width: 22px; height: 22px; flex: 0 0 auto; }
.dock .nav-sub { display: none !important; }
.dock .desk-only { display: none; }
.dock .nav-desk { display: none; }
.nav-cat { min-width: 0; }
.nav-caret {
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.75;
  flex: 0 0 auto;
}
.nav-cat.open .nav-caret,
.sheet-cat.open .nav-caret { transform: rotate(180deg); }

.sheet-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
}
.sheet-root.open { display: block; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 60;
  border: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 8, 6, 0.62);
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  background: #1c211c;
  border-top: 1px solid #3d433d;
  border-radius: 18px 18px 0 0;
  padding: 0.55rem 0.9rem calc(1rem + env(safe-area-inset-bottom));
  max-height: min(78dvh, 560px);
  overflow: auto;
  display: grid;
  gap: 0.45rem;
}
.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0.15rem auto 0.35rem;
  border-radius: 99px;
  background: #5c6570;
}
.sheet-who {
  display: grid;
  gap: 0.1rem;
  padding: 0.35rem 0.7rem 0.7rem;
  border-bottom: 1px solid #2f362f;
  margin-bottom: 0.2rem;
}
.sheet-who b { font-size: 1.05rem; }
.sheet-who span { color: #b7b2a4; font-size: 0.82rem; }
.sheet a, .sheet button.danger, .sheet button.sheet-cat-head {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  text-decoration: none;
  background: var(--steel);
  border: 0;
  color: var(--paper);
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.sheet a.on { outline: 2px solid var(--accent); }
.sheet a svg, .sheet button svg { width: 22px; height: 22px; }
.sheet button.danger { background: #3a2220; color: #ffd8d2; }
.sheet-cat { display: grid; gap: 0.35rem; }
.sheet-cat-items {
  display: none;
  gap: 0.3rem;
  padding-left: 0.6rem;
}
.sheet-cat.open .sheet-cat-items { display: grid; }
.sheet-cat-items a {
  min-height: 44px;
  background: #161b16;
  font-weight: 500;
}
.sheet button.sheet-cat-head {
  width: 100%;
}

.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}
.cat-tile {
  display: grid;
  gap: 0.25rem;
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  text-decoration: none;
  padding: 1rem;
  border-left: 6px solid var(--accent);
  min-height: 88px;
}
.cat-tile svg { width: 26px; height: 26px; color: var(--accent); }
.cat-tile b { font-size: 1.1rem; }

.menu-cat-edit {
  border: 1px solid var(--line);
  padding: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.paper {
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  border-radius: 4px;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
}
.paper h2, .paper h3 { margin: 0 0 0.4rem; font-family: var(--font); }
.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 0.25rem;
  min-height: 88px;
}
.stat-card span { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card b { font-size: 1.8rem; line-height: 1.1; }
.stat-card .stat-name { font-size: 1.15rem; }
.qb-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
}
.portal-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.portal-home h2 { margin: 0; }
.muted { color: var(--muted); }
.row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}
.row .btn { flex: 1 1 9rem; }
.stack { display: grid; gap: 0.85rem; }
.grid-2 { display: grid; gap: 0.85rem; }

.ticket {
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  padding: 0.9rem 1rem;
  border-left: 6px solid var(--accent);
  display: grid;
  gap: 0.25rem;
  text-decoration: none;
  overflow: visible;
}
.bank-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
}
.bank-tile {
  flex: 0 1 11.5rem;
  min-width: 9.5rem;
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  text-decoration: none;
  border: 2px solid var(--line);
  border-top: 4px solid var(--accent);
  padding: 0.5rem 0.65rem;
  display: grid;
  gap: 0.12rem;
  font-size: 0.88rem;
}
.bank-tile b { font-size: 0.98rem; }
.bank-tile.on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.bank-tile-count { font-weight: 700; }
.home-money .bank-tile { flex: 1 1 14rem; max-width: 20rem; }
.meter-light {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
  vertical-align: -0.05rem;
  background: #1e4630;
}
.meter-down .meter-light { background: #b42318; }
.ticket .num {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid currentColor;
  padding: 0.12rem 0.4rem;
  margin: 0;
  flex: 0 0 auto;
}
.stamp.new, .stamp.open { color: var(--stop); }
.stamp.scheduled, .stamp.doing { color: #9a5b12; }
.stamp.onsite { color: #1f5f8b; }
.stamp.complete, .stamp.done { color: var(--ok); }
.stamp.invoiced { color: #5b4d8a; }
.stamp.draft { color: #5c6570; }
.stamp.pending, .stamp.awaiting_customer { color: #9a5b12; }
.stamp.approved { color: var(--ok); }
.stamp.accepted { color: var(--ok); }
.stamp.declined, .stamp.customer_declined { color: var(--stop); }
.stamp.removed { color: #5c6570; }
.stamp.sent { color: #1f5f8b; }
.stamp.paid { color: var(--ok); }
.stamp.refunded { color: #9a5b12; }
.stamp.void { color: #5c6570; }
.stamp.leave { color: #9a5b12; }
.stamp.terminated { color: var(--stop); }
.stamp.final { color: var(--ok); }
.stamp.preview { color: #1f5f8b; }
.stamp.onboarded { color: var(--ok); }
.stamp.pass, .stamp.active, .stamp.occupied { color: var(--ok); }
.stamp.vacant { color: #5c6570; }
.stamp.fail, .stamp.overdue { color: var(--stop); }
.stamp.needs_work, .stamp.needs_service, .stamp.inspection, .stamp.meter { color: #9a5b12; }
.stamp.off { color: #5c6570; }
.stamp.invited { color: #1f5f8b; }
.stamp.inactive { color: var(--stop); }
.check-list { gap: 0.55rem; }
.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
}
.check-row .muted { margin: 0.15rem 0 0; }
.install-steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink);
}
.install-steps li { margin: 0.35rem 0; }
.sheet-who a { display: inline-block; margin-top: 0.35rem; }
.help-topic { margin: 0.35rem 0 0.75rem; }
.help-topic .muted { margin: 0.2rem 0 0; }
.tour-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 1rem calc(var(--dock) + 1.25rem);
  background: rgba(28, 31, 28, 0.45);
  pointer-events: auto;
}
.tour-card {
  width: min(28rem, 100%);
  max-height: 70vh;
  overflow: auto;
  margin: 0;
}
.tour-head { justify-content: space-between; align-items: center; gap: 0.75rem; }
.tour-voice { font-size: 0.85rem; color: var(--muted); }
.tour-actions { justify-content: flex-end; flex-wrap: wrap; }
.tour-spotlight {
  position: relative;
  z-index: 81;
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(28, 31, 28, 0.28);
}
body.tour-open .sheet-root.open { z-index: 82; }
@media (min-width: 900px) {
  .tour-root { align-items: center; padding-bottom: 1rem; }
}
.pay-table input.pay-tax {
  width: 5.2rem;
  min-height: 2rem;
  padding: 0.2rem 0.35rem;
}
.follow-head {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.pipeline-grid { grid-template-columns: repeat(auto-fill, minmax(7.4rem, 1fr)); }
.pipeline-grid .stat-card { padding: 0.65rem 0.7rem; }
.pipeline-grid .stat-card b { font-size: 1.35rem; }

.est-table-wrap { overflow-x: auto; }
.est-wrap { display: grid; gap: 0.85rem; }
.est-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.est-toolbar .btn { flex: 0 0 auto; }
.est-doc {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 1.35rem 1.25rem 1.6rem;
  max-width: 840px;
}
.est-doc-head {
  display: grid;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.1rem;
  border-bottom: 3px solid var(--accent);
}
.est-co { display: grid; gap: 0.12rem; }
.est-co b { font-size: 1.45rem; color: var(--accent); line-height: 1.15; }
.est-co span { font-size: 0.88rem; color: var(--muted); }
.co-logo {
  display: block;
  max-width: 12rem;
  max-height: 3.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 0 0.35rem;
}
.co-logo-preview img {
  max-width: 12rem;
  max-height: 3.5rem;
  object-fit: contain;
}
.est-doc-title { display: grid; gap: 0.2rem; }
.est-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.est-doc-title strong { font-size: 1.4rem; }
.est-num-input {
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  width: 9.5rem;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  background: #fff;
  color: inherit;
}
.est-doc-title span { font-size: 0.86rem; color: var(--muted); }
.est-doc-grid { display: grid; gap: 1rem; margin-bottom: 1.15rem; }
.est-bill, .est-meta { display: grid; gap: 0.5rem; align-content: start; }
.est-lines {
  width: 100%;
  border-collapse: collapse;
}
.est-lines th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  font-weight: 650;
  padding: 0.55rem 0.5rem;
}
.est-lines td { padding: 0.35rem 0.35rem; vertical-align: top; border-bottom: 1px solid var(--line); }
.est-lines td:nth-child(2),
.est-lines td:nth-child(3),
.est-lines td:nth-child(4) { width: 6.2rem; text-align: right; }
.est-lines input { min-height: 42px; }
.est-lines textarea,
.est-doc textarea {
  overflow: hidden;
  resize: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.est-lines textarea { min-height: 42px; }
.est-amt {
  font-family: var(--mono);
  text-align: right;
  white-space: nowrap;
  font-weight: 650;
}
.est-totals {
  margin-left: auto;
  min-width: 16rem;
  display: grid;
  gap: 0.45rem;
  margin-top: 0.8rem;
}
.est-totals .row { justify-content: space-between; }
.est-grand { border-top: 2px solid var(--accent); padding-top: 0.45rem; font-size: 1.12rem; }
.est-tax { max-width: 8rem; margin-left: auto; }
.est-job { margin-top: 1.1rem; display: grid; gap: 0.5rem; }
.est-files { max-width: 840px; }
.assist-panel { max-width: 840px; }
.assist-questions, .assist-lines { margin: 0.2rem 0 0; padding-left: 1.15rem; display: grid; gap: 0.35rem; }
.assist-compare {
  display: grid;
  gap: 0.25rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}
.assist-compare p { margin: 0.15rem 0 0; white-space: pre-wrap; }
.est-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.est-file {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  padding: 0.4rem 0.55rem;
  background: #fff;
}
.est-file a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.est-file a span { min-width: 0; }
.est-file small { color: var(--muted); font-weight: 500; }
.est-file img, .est-file-icon {
  width: 2.4rem;
  height: 2.4rem;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #f4f5f8;
}
.est-file-icon {
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
}
.est-file-pick {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  cursor: pointer;
  width: fit-content;
}
.est-file-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
@media (min-width: 720px) {
  .est-doc-head { grid-template-columns: 1fr auto; }
  .est-doc-title { justify-items: end; text-align: right; }
  .est-doc-grid { grid-template-columns: 1.15fr 0.95fr; }
}

@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stamp.disabled, .stamp.inactive { color: #5c6570; }

label { display: grid; gap: 0.28rem; font-size: 0.86rem; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
}
textarea { min-height: 110px; resize: vertical; }
.choice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
}
.choice input { width: auto; min-height: 0; }
input[type="checkbox"],
input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  max-width: 1.15rem;
  max-height: 1.15rem;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  accent-color: #1f8a12;
}
.bill-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}
.bill-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0.45rem 0.75rem 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-weight: 650;
}
.bill-toggle.on {
  background: #e7f6e4;
  border-color: #1f8a12;
  color: #14520f;
}
.bill-toggle.off {
  background: #f3f4f6;
  border-color: #8b95a1;
  color: #3d4450;
}
.ticket.punch-bill {
  border-left-color: #1f8a12;
  background: #f4fbf3;
}
.ticket.punch-nobill {
  border-left-color: #8b95a1;
  background: #f4f5f7;
}
.stamp.billable { color: #1f8a12; }
.stamp.notbill { color: #5c6570; }
.hours-bill { color: #14610c; font-weight: 800; }
.hours-nobill { color: #4a5560; font-weight: 700; }
.hours-legend { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.hours-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.28rem;
  border-radius: 2px;
  vertical-align: -0.05rem;
}
.hours-swatch.bill { background: #1f8a12; }
.hours-swatch.nobill { background: #8b95a1; }
.pay-who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.1rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.pay-who-main {
  display: flex;
  flex: 1;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;
}
.pay-who-main b { min-width: 0; }
.hrs-ok { color: #14610c; font-weight: 700; white-space: nowrap; }
.hrs-zero { color: #9a5b12; font-weight: 700; white-space: nowrap; }
.cal-actions { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.cal-actions input[type="date"] { width: 11.5rem; min-height: 40px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.cal-key { font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.cal-grid-head { text-align: center; font-size: 0.75rem; color: var(--muted); }
.cal-cell { background: #fff; border: 1px solid var(--line); border-radius: 6px; min-height: 5.4rem; padding: 0.3rem; cursor: pointer; }
.cal-box {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 10, 8, 0.55);
}
.cal-box .paper { width: min(32rem, 100%); max-height: min(90vh, 40rem); overflow: auto; margin: 0; }
.password-gate { z-index: 90; }
.password-gate .paper { width: min(26rem, 100%); margin: 0; }
.cal-remind { display: grid; }
.cal-remind-board {
  border: 2px solid #9a4d12;
  background: #fff6ea;
}
.cal-remind-board h3,
.cal-remind-note {
  color: #9a4d12;
  font-weight: 700;
}
.cal-repeat-note,
.cal-repeat-mark {
  color: #1d4e89;
  font-weight: 800;
}
.cal-pill.cal-repeat {
  box-shadow: inset 3px 0 0 #1d4e89;
}
@media (pointer: coarse), (max-width: 900px) {
  .cal-box {
    align-items: start;
    justify-items: stretch;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .cal-box .paper {
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: visible;
    border-radius: 0;
    padding-bottom: max(1.4rem, env(safe-area-inset-bottom));
  }
}
.cal-pill.cal-clash { outline: 2px solid #b45309; }
.ticket.cal-clash { outline: 2px solid #b45309; }
.cal-clash-note { color: #9a4d12; font-weight: 700; margin: 0.2rem 0; }
.cal-attendees { max-height: 14rem; overflow: auto; }
.cal-cell.is-today { outline: 2px solid var(--accent); }
.cal-cell.is-on { background: #f4f8f2; }
.cal-cell.is-out { opacity: 0.45; }
.cal-daynum { background: none; border: 0; padding: 0; min-height: 0; width: auto; font-weight: 700; color: inherit; }
.cal-pill { display: block; width: 100%; margin-top: 0.25rem; border: 0; border-radius: 4px; min-height: 0; padding: 0.2rem 0.35rem; text-align: left; font-size: 0.78rem; font-weight: 650; }
.cal-pill-hour { display: none; }
.cal-owner-0 { --cal: #1f7a3a; }
.cal-owner-1 { --cal: #1d4e89; }
.cal-owner-2 { --cal: #9a4d12; }
.cal-owner-3 { --cal: #5c3d8f; }
.cal-owner-4 { --cal: #0f6e6e; }
.cal-owner-5 { --cal: #8d2f4a; }
.cal-owner-6 { --cal: #7a4e00; }
.ticket.cal-owner-0, .ticket.cal-owner-1, .ticket.cal-owner-2, .ticket.cal-owner-3, .ticket.cal-owner-4, .ticket.cal-owner-5, .ticket.cal-owner-6 { border-left: 5px solid var(--cal); }
.ticket.cal-owner-0 b, .ticket.cal-owner-1 b, .ticket.cal-owner-2 b, .ticket.cal-owner-3 b, .ticket.cal-owner-4 b, .ticket.cal-owner-5 b, .ticket.cal-owner-6 b,
.cal-key.cal-owner-0, .cal-key.cal-owner-1, .cal-key.cal-owner-2, .cal-key.cal-owner-3, .cal-key.cal-owner-4, .cal-key.cal-owner-5, .cal-key.cal-owner-6 { color: var(--cal); }
.cal-pill.cal-owner-0 { background: #e7f5ec; color: #1f7a3a; }
.cal-pill.cal-owner-1 { background: #e7eef8; color: #1d4e89; }
.cal-pill.cal-owner-2 { background: #f8efe6; color: #9a4d12; }
.cal-pill.cal-owner-3 { background: #f1ebf8; color: #5c3d8f; }
.cal-pill.cal-owner-4 { background: #e6f4f4; color: #0f6e6e; }
.cal-pill.cal-owner-5 { background: #f8e8ee; color: #8d2f4a; }
.cal-pill.cal-owner-6 { background: #f8f1e0; color: #7a4e00; }
.cal-display h2 { font-size: 1.8rem; }
.cal-display .ticket b { font-size: 1.15rem; }
body.cal-zoom {
  --dock: 0px;
  height: 100dvh;
  overflow: hidden;
}
body.cal-zoom .top,
body.cal-zoom .dock,
body.cal-zoom .app-foot,
body.cal-zoom .sheet-root,
body.cal-zoom .cal-zoom-hide { display: none !important; }
body.cal-zoom .shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 100dvh;
}
body.cal-zoom .stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding:
    max(0.4rem, env(safe-area-inset-top))
    max(0.45rem, env(safe-area-inset-right))
    max(0.4rem, env(safe-area-inset-bottom))
    max(0.45rem, env(safe-area-inset-left));
}
body.cal-zoom .stage > .stack {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
body.cal-zoom .cal-grid.cal-month,
body.cal-zoom .cal-grid.cal-week {
  flex: 1;
  min-height: 0;
  height: 100%;
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
}
body.cal-zoom .cal-grid.cal-week .cal-cell,
body.cal-zoom .cal-grid.cal-month .cal-cell {
  min-height: 0;
  max-height: none;
  height: auto;
  overflow: hidden;
}
body.cal-zoom .cal-dayboard.is-day {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
body.cal-zoom #cal-zoom {
  background: var(--steel);
  color: #fff;
  border-color: var(--steel);
}
body.cal-zoom .stack > .row h3 { font-size: 1.45rem; }
@media (max-width: 800px) {
  .cal-grid.cal-week { grid-template-columns: 1fr; }
  .cal-grid.cal-week .cal-cell { min-height: 0; }
  .cal-week-heads { display: none; }
  .cal-grid.cal-month .cal-cell { min-height: 2.4rem; overflow: hidden; }
  .cal-grid.cal-month .cal-pill { text-align: center; padding: 0.05rem 0.1rem; margin-top: 0.12rem; font-size: 0.68rem; white-space: nowrap; }
  .cal-grid.cal-month .cal-pill-full { display: none; }
  .cal-grid.cal-month .cal-pill-hour { display: inline; }
}
@media (pointer: coarse) {
  .cal-grid.cal-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal-week-heads { display: grid; }
  .cal-grid.cal-week .cal-cell,
  .cal-grid.cal-month .cal-cell {
    min-height: 2.8rem;
    max-height: 4.8rem;
    overflow: hidden;
  }
  .cal-grid .cal-pill {
    text-align: center;
    padding: 0.05rem 0.1rem;
    margin-top: 0.12rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }
  .cal-grid .cal-pill-full { display: none; }
  .cal-grid .cal-pill-hour { display: inline; }
  .cal-dayboard:not(.is-day) { display: none; }
}
.checks {
  display: grid;
  gap: 0.4rem;
  border: 1px solid #b9ae94;
  background: #fffdf6;
  padding: 0.7rem 0.8rem;
  border-radius: 6px;
}
.checks legend { font-weight: 650; padding: 0 0.2rem; }
.checks .muted { margin: 0; font-weight: 500; }
.filters {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0 0.45rem;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-height: 42px;
  white-space: nowrap;
  flex: 0 0 auto;
  text-decoration: none;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.chip { cursor: pointer; font: inherit; }

.punch {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  padding: 1.2rem 0;
}
.clock-who {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
  text-align: center;
}
.clock-confirm {
  margin: 0;
  width: min(24rem, 100%);
  text-align: center;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-ink, #14210f);
  border-radius: 0.45rem;
  padding: 0.7rem 0.9rem;
}
.punch-btn {
  width: min(56vw, 180px);
  height: min(56vw, 180px);
  border-radius: 50%;
  border: 8px solid #0e100e;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.timer {
  font-family: var(--mono);
  font-size: 1.75rem;
  letter-spacing: 0.08em;
}
.clock-quick { justify-content: center; width: 100%; }
.clock-totals { text-align: center; max-width: 22rem; }
.clock-job summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.2rem 0;
}
.clock-job summary::-webkit-details-marker { display: none; }
.clock-job[open] summary { margin-bottom: 0.6rem; }
.checkline { display: flex; align-items: center; gap: 0.45rem; }
.pay-stub-net { margin: 0.55rem 0; }
.pickup-mine { max-width: 8.5in; margin: 0.75rem auto 1.25rem; }
.pickup-mine p, .pickup-office p { margin: 0; }
.pickup-office { display: grid; gap: 0.45rem; margin-top: 0.75rem; }
.totp-key { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.06em; font-size: 1.15rem; white-space: pre-wrap; }
.totp-qr { width: 220px; height: 220px; background: #fff; padding: 8px; border: 1px solid #d5d8de; }
.totp-qr svg { display: block; width: 100%; height: 100%; }
.pay-net { font-size: 1.45rem; }
.pay-stub-grid { gap: 0.55rem 0.8rem; font-size: 0.95rem; }
.paystub {
  max-width: 8.5in;
  margin: 0 auto 1.25rem;
  padding: 0.42in 0.5in 0.4in;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #d0d0d0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  font-size: 12px;
  line-height: 1.35;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}
.paystub-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid #1a1a1a;
}
.paystub-top span, .paystub-bottom span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #555;
}
.paystub-top strong { display: block; margin-top: 0.1rem; font-size: 1.05rem; }
.paystub-top-net { text-align: right; }
.paystub-top-net strong { font-size: 1.7rem; letter-spacing: -0.03em; }
.paystub-title {
  margin: 0.7rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.paystub-run { margin: 0.1rem 0 0; color: #666; font-size: 11px; }
.paystub-who {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 0.8rem 1rem;
  margin: 0.75rem 0 0.9rem;
}
.paystub-who h3 {
  margin: 0 0 0.28rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid #1a1a1a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.paystub-who p { margin: 0; }
.paystub-who span {
  display: inline-block;
  min-width: 7.2rem;
  color: #555;
}
.paystub-name { font-weight: 700; }
.paystub-table { width: 100%; border-collapse: collapse; margin: 0 0 0.7rem; }
.paystub-table th, .paystub-table td { padding: 0.22rem 0.3rem; vertical-align: top; }
.paystub-table thead th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid #1a1a1a;
  background: transparent;
  color: #1a1a1a;
}
.paystub-table tbody td { border-bottom: 1px solid #ececec; }
.paystub-table tfoot td {
  font-weight: 700;
  border-top: 1px solid #1a1a1a;
  border-bottom: none;
  padding-top: 0.28rem;
}
.paystub-num { text-align: right; font-variant-numeric: tabular-nums; }
.paystub-table thead th:not(:first-child) { text-align: right; }
.paystub-netline td { font-weight: 700; }
.paystub-benefits { margin-bottom: 0.35rem; }
.paystub-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 2px solid #1a1a1a;
}
.paystub-bottom strong { font-size: 1.35rem; letter-spacing: -0.02em; }
@media screen and (max-width: 720px) {
  .paystub { padding: 1rem; }
  .paystub-top, .paystub-who { display: block; }
  .paystub-top-net { text-align: left; margin-top: 0.55rem; }
  .paystub-who section { margin-bottom: 0.7rem; }
}

.tree { display: grid; gap: 0.45rem; }
.folder, .leaf {
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  padding: 0.75rem 0.85rem;
}
.folder { border-left: 5px solid #7a4e24; }
.leaf { margin-left: 0.9rem; border-left: 5px solid #c9b48a; }
.kids { display: grid; gap: 0.45rem; margin-top: 0.45rem; }

.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #ddd2b8;
}
.photo-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.photo-pick {
  display: grid;
  gap: 0.2rem;
  width: 4.6rem;
  font-size: 0.75rem;
}
.photo-pick img {
  width: 4.6rem;
  height: 4.6rem;
  object-fit: cover;
  background: #ddd2b8;
  border-radius: 0.35rem;
}
.photo-pick span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.store-qty { max-width: 7rem; }
.store-item .catalog-thumb { margin: 0; }
.catalog-thumb {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  background: #ddd2b8;
  border-radius: 0.35rem;
}
#clock-expense-box .ticket { margin-top: 0.4rem; }
#clock-expense-box .ticket { margin-top: 0.4rem; }
.catalog-preview img {
  width: 6rem;
  height: 6rem;
  object-fit: cover;
  background: #ddd2b8;
  border-radius: 0.35rem;
}
.note {
  border-top: 1px dashed var(--line);
  padding-top: 0.6rem;
}
.hidden, [hidden] { display: none !important; }
.geo-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 1rem 1rem calc(var(--dock) + env(safe-area-inset-bottom) + 1rem);
  background: rgba(8, 10, 8, 0.55);
}
.geo-card {
  width: min(28rem, 100%);
  margin: 0;
}
.geo-card h3 { margin-top: 0; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock) + env(safe-area-inset-bottom) + 1rem);
  transform: translateX(-50%);
  background: #393a3d;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  z-index: 100;
  border: 1px solid var(--accent);
  max-width: calc(100vw - 2rem);
}

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: #393a3d;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  color: var(--ink);
  color-scheme: light;
  padding: 1.6rem 1.5rem;
  display: grid;
  gap: 0.85rem;
  border-radius: 4px;
}
.login-card h1 { margin: 0; font-size: 1.7rem; font-weight: 650; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; }
.tabs button { min-height: 42px; background: var(--paper-2); color: var(--ink); border: 0; }
.tabs button.on { background: var(--ink); color: #fff; }

.install-body { display: grid; place-items: start center; padding: 1.2rem; }
.install-card {
  width: min(640px, 100%);
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  padding: 1.4rem;
  display: grid;
  gap: 0.9rem;
}
.eyebrow { letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.72rem; margin: 0; color: var(--accent); }
.lede { margin: 0; color: var(--muted); }
.notice { padding: 0.7rem 0.8rem; border-radius: 6px; }
.notice.ok { background: #dcebde; color: #1e4630; }
.notice.bad { background: #f6d4ce; color: #6f241c; }
.hint, .checks { color: var(--muted); font-size: 0.86rem; }
.checks { list-style: none; padding: 0; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.checks .ok { color: var(--ok); }
.checks .bad { color: var(--stop); }
.mysql-fields { display: none; }
form:has([name="driver"][value="mysql"]:checked) .mysql-fields { display: grid; gap: 0.7rem; }
legend { font-weight: 700; }

form fieldset.checks {
  border: 1px solid var(--line, #3a3f3a);
  border-radius: 10px;
  padding: 0.55rem 0.75rem 0.7rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
form fieldset.checks legend {
  padding: 0 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.people-folder h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.person {
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  padding: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.person.inactive { opacity: 0.78; }
.person-main {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  flex: 1;
  min-width: 12rem;
  padding: 0;
  text-decoration: none;
}
.eq-tree {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255,255,255,0.35);
  max-height: 16rem;
  overflow: auto;
}
.eq-node { margin: 0.2rem 0; padding-left: calc(var(--eq-depth, 0) * 0.85rem); }
.eq-node-head {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.eq-kids { margin-top: 0.15rem; }
.prod-hub {
  display: grid;
  gap: 0.85rem;
}
.prod-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: linear-gradient(145deg, rgba(255,255,255,0.72), rgba(240,244,248,0.55));
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.prod-card:hover {
  border-color: var(--accent, #3a6d8c);
  transform: translateY(-1px);
}
.prod-card h3 { margin: 0; font-size: 1.15rem; }
.prod-card p { margin: 0; color: var(--ink); opacity: 0.88; }
.prod-subnav { flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
@media (min-width: 720px) {
  .prod-hub { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .prod-hub.prod-hub-3,
  .inspect-sheet-grid { grid-template-columns: repeat(3, 1fr); }
}
.home-inspect-notice { border-color: var(--accent, #3a6d8c); }
.exit-count { margin: 0; font-weight: 700; font-size: 1.15rem; text-align: center; }
.exit-current { display: grid; gap: 0.45rem; }
.exit-current h3 { margin: 0; font-size: 1.45rem; text-align: center; }
.exit-result { flex: 1; min-height: 3rem; }
.exit-roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; max-height: 38vh; overflow: auto; }
.exit-row { width: 100%; text-align: left; border-radius: 0.4rem; padding: 0.55rem 0.7rem; border: 1px solid transparent; background: #fde8ea; color: #8d1020; }
.exit-row.pass { background: #e5f4ea; color: #145c32; }
.exit-row.fail { background: #fff; color: #8d1020; border-color: #8d1020; font-weight: 700; }
.exit-row.on { outline: 2px solid #1c3d5a; }
.inspect-points {
  display: grid;
  gap: 0.65rem;
}
.inspect-point {
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255,255,255,0.45);
  display: grid;
  gap: 0.4rem;
}
.inspect-manage { margin: 0.35rem 0 0.75rem; }
.inspect-manage summary { cursor: pointer; font-weight: 600; }
.inspect-item-list {
  list-style: none;
  margin: 0.35rem 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}
.inspect-item-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
  font-size: 0.9rem;
}
.inspect-item-line .st-fail { color: #b00020; }
.inspect-item-line .st-not_tested { color: #8a6d00; }
.inspect-item-line .st-pass { color: #1a7a3c; }
.file-chip { cursor: pointer; }
.file-chip input { display: none; }
.inspect-sheet-grid { margin-top: 0.75rem; }
.inspect-sheet-card.on { border-color: var(--accent, #3a6d8c); box-shadow: 0 0 0 1px var(--accent, #3a6d8c); }
.chip-accent {
  background: var(--accent, #3a6d8c);
  border-color: var(--accent, #3a6d8c);
  color: var(--accent-ink, #fff);
}
.eq-browser {
  display: grid;
  gap: 0.45rem;
}
.eq-main {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.4);
  padding: 0.15rem 0.65rem 0.45rem;
}
.eq-main-sum {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  flex-wrap: wrap;
  cursor: pointer;
  list-style: none;
  padding: 0.45rem 0;
}
.eq-main-sum::-webkit-details-marker { display: none; }
.eq-main-link {
  font-weight: 650;
  color: inherit;
  text-decoration: none;
}
.eq-main-link:hover { text-decoration: underline; }
.eq-subs-scroll {
  max-height: 12rem;
  overflow: auto;
  padding: 0.15rem 0 0.35rem 0.35rem;
  border-top: 1px solid var(--line);
}
.eq-sub-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0 0 0 calc(var(--eq-depth, 1) * 0.75rem);
  display: grid;
  gap: 0.2rem;
}
.eq-sub-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  padding: 0.2rem 0;
}
.eq-sub-link:hover { text-decoration: underline; }
.eq-sub-empty { margin: 0.35rem 0 0; }
.eq-file-list {
  list-style: none;
  margin: 0.35rem 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}
.eq-file {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.eq-file a { color: inherit; }

.hours-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  text-align: center;
}
.hours-summary b {
  display: block;
  font-size: 1.25rem;
  font-family: var(--mono);
}
button.books-stat {
  background: none;
  border: 0;
  padding: 0.15rem;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  min-height: 0;
}
button.books-stat.on b { text-decoration: underline; }
.hours-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hours-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.82rem;
  background: var(--paper);
}
.hours-table th, .hours-table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
.hours-table tr.hours-total td {
  font-weight: 700;
  border-top: 2px solid var(--ink);
}
.hours-print-head h3 { margin: 0.2rem 0 0; }

@media (min-width: 820px) {
  .shell {
    display: grid;
    grid-template-areas:
      "top top"
      "dock stage";
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto 1fr;
  }
  .shell.meter-quiet {
    grid-template-areas: "top" "stage";
    grid-template-columns: 1fr;
  }
  .top { grid-area: top; }
  .stage { grid-area: stage; flex: unset; }
  .top {
    grid-template-columns: minmax(0, 1.4fr) minmax(14rem, 28rem) 1fr auto auto;
    align-items: center;
  }
  .brand { grid-column: 1; }
  .brand-mark {
    width: 3rem;
    height: 3rem;
    font-size: 1.05rem;
  }
  .brand-logo {
    max-width: 9rem;
    height: 3rem;
  }
  .brand b { font-size: 1.45rem; }
  .switch-pair {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    min-width: 0;
  }
  .loc-wrap, .loc-fixed {
    grid-column: auto;
    grid-row: auto;
  }
  .who { grid-column: 3; }
  .top.acting .switch-pair { grid-row: 2; }
  .top.acting .who { grid-row: 2; }
  .top.acting .brand { grid-row: 2; }
  .menu-btn { display: none !important; }
  .desktop-only { display: inline-flex !important; }
  .dock {
    position: static;
    grid-area: dock;
    grid-auto-flow: row;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
    align-content: start;
    align-self: stretch;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.8rem 0.6rem;
    border-top: 0;
    border-right: 1px solid #2c2d30;
    box-shadow: none;
  }
  .dock a, .dock button {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.7rem;
    padding: 0 0.7rem;
    font-size: 0.95rem;
    min-height: 2.75rem;
    height: auto;
    max-height: none;
  }
  .dock a span, .dock button span { overflow: visible; white-space: nowrap; }
  .dock .desk-only { display: flex; flex-direction: column; }
  .dock .nav-phone { display: none !important; }
  .dock .nav-desk { display: flex !important; }
  .nav-cat {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    min-width: 0;
    min-height: max-content;
    flex: 0 0 auto;
  }
  .dock .nav-cat > .nav-sub {
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.15rem 0 0.4rem 1.35rem;
    margin: 0;
    overflow: visible;
    height: auto;
    max-height: none;
    min-height: 0;
  }
  .dock .nav-cat.open > .nav-sub {
    display: flex !important;
  }
  .dock .nav-sub a {
    display: flex !important;
    flex: 0 0 auto;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    min-height: 2.5rem;
    height: auto;
    max-height: none;
    padding: 0.4rem 0.75rem;
    line-height: 1.35;
    font-size: 0.86rem;
    font-weight: 500;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stage {
    padding: 1.4rem 1.6rem 2rem;
    max-width: 980px;
  }
  .page-head { align-items: center; }
  .page-head .btn { flex: 0 0 auto; }
  .row .btn { flex: 0 0 auto; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .photos { grid-template-columns: repeat(4, 1fr); }
  .hours-summary { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 819px) {
  .hours-summary {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hours-summary > div,
  .hours-summary > button.books-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    width: 100%;
  }
  .hours-summary b { font-size: 1.1rem; }
}

.wo-letterhead {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.9rem 1rem 1rem;
  margin-bottom: 0.35rem;
  border-bottom: 2px solid var(--line);
  font-family: var(--ticket);
}
.wo-letterhead .wo-letter-text { display: grid; gap: 0.12rem; }
.wo-letterhead b { font-size: 1.3rem; line-height: 1.2; }
.wo-letterhead:empty { display: none; }

@media (min-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.hr-desk {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
}
.hr-desk a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 7rem;
  text-decoration: none;
  color: inherit;
}
.w2-sheet { max-width: 8.6in; background: #fff; color: #111; }
.w2-form, .w2-form table { width: 100%; border-collapse: collapse; background: #fff; color: #111; font-family: Arial, Helvetica, sans-serif; }
.w2-form td { border: 1px solid #111; padding: 0.22rem 0.35rem; vertical-align: top; min-height: 2.1rem; }
.w2-form .lbl, .w2-form .line { display: block; font-size: 0.68rem; font-weight: 400; line-height: 1.2; }
.w2-form .val { display: block; font-size: 0.92rem; margin-top: 0.12rem; }
.w2-form .w2-num .val { text-align: right; }
.w2-title td { font-size: 0.85rem; }
.w2-year, .w2-sample { margin-left: 0.6rem; letter-spacing: 0.04em; }
.w2-check, .w2-13 i { display: inline-block; width: 0.7rem; height: 0.7rem; border: 1px solid #111; margin-right: 0.25rem; vertical-align: -0.05rem; }
.w2-12 .lbl { margin: 0.12rem 0; }
.w2-13 span { display: block; font-size: 0.72rem; margin-top: 0.2rem; }
.w2-state table td { width: 14%; }
.w2-state table td:first-child { width: 8%; }
.w2-copy td { font-size: 0.72rem; line-height: 1.35; }
.w2-addr { width: 42%; }

.only-print { display: none; }

.check-print { overflow-x: auto; }
.check-sheet {
  width: 8.5in;
  height: 11in;
  min-width: 8.5in;
  position: relative;
  background: #fff;
  color: #111;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 0 1px #ccc;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}
.check-date, .check-payee, .check-amount, .check-words, .check-addr, .check-memo, .check-sign, .check-stub, .check-window-guide {
  position: absolute;
  color: #111;
}
.check-date { top: 0.84in; right: 0.42in; width: 1.7in; text-align: right; font-size: 12pt; }
.check-payee { top: 1.32in; left: 1.85in; width: 4.55in; font-size: 12pt; white-space: nowrap; overflow: hidden; }
.check-amount { top: 1.32in; left: 7.02in; width: 1.15in; font-size: 12pt; text-align: left; }
.check-words { top: 1.64in; left: 0.48in; width: 6.85in; font-size: 10pt; white-space: nowrap; overflow: hidden; }
.check-addr { top: 2.06in; left: 0.95in; width: 3.2in; font-size: 11pt; line-height: 1.25; }
.check-window-guide { top: 2in; left: 0.83in; width: 3.49in; height: 0.9in; border: 1px dashed #b5b5b5; }
.check-memo { top: 2.76in; left: 1.15in; width: 3.6in; font-size: 11pt; white-space: nowrap; overflow: hidden; }
.check-sign { top: 2.18in; left: 5.55in; width: 2.35in; height: 0.48in; object-fit: contain; object-position: left bottom; }
.check-sign-preview img { max-width: 16rem; max-height: 4.2rem; background: #fff; }
.notice-bank { padding: 0.7rem 0.8rem; border-radius: 6px; background: #f6e7c1; color: #5c4310; }
.notice-bank p { margin: 0.15rem 0 0; }
.check-reprint { display: grid; gap: 0.45rem; margin: 0.2rem 0 0.85rem; }
.check-reprint-form { padding-top: 0.15rem; }
.check-stub { left: 0.4in; width: 7.7in; font-size: 8pt; line-height: 1.25; }
.check-stub-a { top: 3.95in; }
.check-stub-b { top: 7.45in; }
.check-stub-head { display: flex; justify-content: space-between; gap: 0.15in; margin-bottom: 0.06in; font-size: 8pt; }
.check-stub-cols { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 0.16in; }
.check-stub table { width: 100%; border-collapse: collapse; font-size: 8pt; }
.check-stub th { text-align: left; font-weight: 700; border-bottom: 1px solid #222; }
.check-stub td { padding-top: 1px; vertical-align: top; }
.check-num { text-align: right; font-variant-numeric: tabular-nums; }
.check-stub p { margin: 0.04in 0 0; }
.check-net { font-weight: 700; font-size: 10pt; }

@page check-stock { size: letter; margin: 0; }

@media print {
  .only-print { display: block !important; }
  body { background: white; color: black; }
  .top, .dock, .no-print, .sheet-root, .menu-btn { display: none !important; }
  .stage { padding: 0; }
  .paper, .ticket { box-shadow: none; }
  .wo-letterhead {
    color: #111;
    border-bottom: 2px solid #111;
    margin-bottom: 1rem;
    padding: 0 0 0.75rem;
  }
  .wo-letterhead span { color: #333; }
  .hours-table th:first-child, .hours-table td:first-child { position: static; }
  .est-lines th, .est-lines td { border-bottom: 1px solid #ddd; }
  .est-totals { margin-top: 1rem; }
  .est-doc {
    border: none;
    max-width: none;
    padding: 0 0 0.85in;
  }
  form.stack.paper:has(.doc-foot) { padding-bottom: 0.85in; }
  .stage:has(.doc-foot) > .app-foot { display: none !important; }
  .doc-foot {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0.3in;
    margin: 0;
    padding: 0.35rem 0 0;
    border-top: 1px solid #ccc;
    background: #fff;
    color: #444;
  }
  .est-doc input, .est-doc select, .est-doc textarea {
    border: 0;
    padding: 0;
    background: transparent;
  }
  .est-doc textarea { overflow: hidden; }
  .paystub {
    max-width: none;
    margin: 0;
    border: none;
    box-shadow: none;
    padding: 0;
    page-break-after: always;
    break-after: page;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .paystub:last-child { page-break-after: auto; break-after: auto; }
  .pay-stub { break-inside: avoid; page-break-inside: avoid; }
  .paystub-top, .paystub-bottom, .paystub-table thead th, .paystub-table tfoot td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .stage:has(.paystub) > .app-foot { display: none !important; }
  .stage:has(.check-sheet) { padding: 0 !important; }
  .stage:has(.check-sheet) > .app-foot { display: none !important; }
  .check-print { display: block !important; overflow: visible; }
  .check-sheet {
    page: check-stock;
    margin: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
  .check-sheet:last-child { break-after: auto; page-break-after: auto; }
  .check-print.check-open-only .check-sheet.is-done { display: none !important; }
  .check-print.check-open-only .check-sheet.is-last-open { break-after: auto; page-break-after: auto; }
  .check-print.check-reprinting .check-sheet { display: none !important; }
  .check-print.check-reprinting .check-sheet.is-reprint {
    display: block !important;
    break-after: auto;
    page-break-after: auto;
  }
  .clock-page:has(.yearend-copy) > *:not(#my-w2) { display: none !important; }
  .yearend-copy { break-after: page; page-break-after: always; }
  .yearend-copy:last-child { break-after: auto; page-break-after: auto; }
}

.meter-alert { padding: 0.7rem 0.8rem; border-radius: 6px; }
.meter-alert.ok { background: #dcebde; color: #1e4630; }
.meter-alert.warn { background: #f6e7c1; color: #5c4310; }
.meter-scan { width: 100%; max-height: 16rem; background: #111; border-radius: 6px; }
.meter-photo { width: 4.5rem; height: 3.2rem; object-fit: cover; border-radius: 4px; background: #ececec; }
.meter-sheet-energy { color: #1e4630; }
.meter-sheet-water { color: #2a6fdb; }
.meter-sheet th, .meter-sheet td { min-width: 7rem; }
.meter-sheet .meter-sheet-month { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 8rem; }
.meter-table { width: 100%; border-collapse: collapse; }
.meter-table th, .meter-table td { padding: 0.35rem 0.45rem; text-align: left; vertical-align: top; border-bottom: 1px solid #ececec; }
.meter-flag { font-weight: 700; color: #5c4310; }
.meter-miss { color: #8a1f16; font-weight: 700; }
.meter-count { border: 0; border-radius: 999px; padding: 0.35rem 0.75rem; font-weight: 700; }
.meter-count.read { background: #dcebde; color: #1e4630; }
.meter-count.left { background: #f8d6d2; color: #8a1f16; cursor: pointer; }
.meter-walk button.on { background: #1e4630; color: #fff; }
.meter-open { border-left: 4px solid #c0392b; }
.store-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.store-icon { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 7.4rem; padding: 0.45rem; border: 0; background: transparent; color: inherit; text-align: center; text-decoration: none; cursor: pointer; }
.store-icon b { font-size: 0.82rem; line-height: 1.2; }
.store-mark { width: 3.4rem; height: 3.4rem; border-radius: 0.85rem; display: grid; place-items: center; background: #1e4630; color: #fff; font-weight: 700; font-size: 1.25rem; }
.store-pop { max-width: 36rem; }
.meter-app { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.meter-app.meter-collect { grid-template-columns: minmax(0, 1fr); }
.meter-app.meter-collect .meter-side { display: none; }
.meter-app.meter-collect.menu-open { grid-template-columns: 9.5rem minmax(0, 1fr); }
.meter-app.meter-collect.menu-open .meter-side { display: flex; }
.meter-left-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.meter-left-row b { display: block; }
.meter-left-row.pending b { color: #b42318; }
.meter-left-row.done b { color: #1e4630; }
.meter-pending-btn { color: #8a1f16; }
.meter-done-btn { color: #1e4630; }
.meter-more { margin-top: 0.5rem; }
.meter-more summary { cursor: pointer; font-weight: 700; }
.meter-side { display: flex; flex-direction: column; gap: 0.3rem; }
.meter-side-title { margin: 0 0 0.2rem; font-weight: 700; }
.meter-side a, .meter-side button.meter-parent { padding: 0.45rem 0.6rem; border-radius: 6px; text-decoration: none; color: inherit; }
.meter-side button.meter-parent { border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.meter-side a:hover, .meter-side button.meter-parent:hover { background: #dcebde; }
.meter-side a.on, .meter-side a.on:hover { background: #1e4630; color: #fff; }
.meter-group { display: flex; flex-direction: column; gap: 0.15rem; }
.meter-sub { display: none; flex-direction: column; gap: 0.1rem; margin-left: 0.65rem; }
.meter-group.open .meter-sub { display: flex; }
.meter-sub a { padding: 0.3rem 0.5rem; }
.shell.meter-quiet .stage { padding-bottom: 1rem; }
.meter-switch.on { background: #1e4630; color: #fff; }
.meter-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.meter-line:hover { background: #eef3f8; }
.meter-mark {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  flex: 0 0 auto;
}
.meter-mark.energy { background: #1e4630; }
.meter-mark.water { background: #2a6fdb; }
.meter-counts { display: inline-flex; align-items: center; gap: 0.55rem; margin-left: auto; }
.meter-count-bit { display: inline-flex; align-items: center; gap: 0.3rem; }
.meter-bucket-body { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.35rem 0 0.2rem 0.85rem; }
.meter-bucket-body[hidden] { display: none; }
@media (max-width: 720px) {
  .meter-app { grid-template-columns: 1fr; }
  .meter-side { flex-direction: row; flex-wrap: wrap; }
  .meter-group { flex-basis: 100%; }
  .meter-app.meter-collect.menu-open { grid-template-columns: 1fr; }
  .meter-app.meter-collect.menu-open .meter-side { flex-direction: column; }
}
