/* ============================================================
   Anchor Point Crew - Staff PWA stylesheet
   Phone-first, big tap targets, high contrast.
   Reuses brand palette but renders as a tool, not a brochure.
   ============================================================ */

:root {
  --navy: #1B2D5C;
  --navy-soft: #2a3d70;
  --navy-deep: #131f42;
  --cream: #FBF7EC;
  --cream-card: #ffffff;
  --brass: #B08B4F;
  --brass-soft: #c9a674;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted: #666666;
  --rule: #e3ddc9;
  --rule-strong: #cabfa3;
  --good: #2d8a4b;
  --warn: #c47b2a;
  --bad: #b04a3a;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --tap-min: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: 76px;  /* room for bottom nav */
  /* clip (not hidden): stops sideways scroll WITHOUT creating a scroll
     container, which on iOS Safari un-pins position:fixed and made the
     bottom nav drift/float instead of sticking to the bottom. */
  overflow-x: clip;
}
html { overflow-x: clip; }

/* Long emails/addresses/IDs must wrap, never push the page wide. */
.address, .meta, .customer, .detail-row .value, td, th { overflow-wrap: anywhere; }
table { max-width: 100%; }

a {
  color: var(--brass);
  text-decoration: none;
}
a:hover, a:active { color: var(--navy); }

img { max-width: 100%; height: auto; display: block; }

/* ----- Top bar ----- */
.topbar {
  background: var(--navy);
  color: var(--cream);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.topbar .brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.topbar .brand .sub {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brass-soft);
}
.topbar .user-info {
  font-size: 0.85rem;
  color: var(--cream);
  opacity: 0.85;
}

/* ----- Account menu (top-right dropdown) ----- */
.account-menu { position: relative; }
.account-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--cream);
  padding: 0.3rem 0.6rem 0.3rem 0.35rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  min-height: 40px;
  transition: background 0.15s ease;
}
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: rgba(255,255,255,0.16); }
.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brass);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.account-name { font-weight: 600; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-caret { font-size: 0.7rem; opacity: 0.8; }

/* ----- Secret-superuser "View as" (centered between brand + account chip) ----- */
/* The topbar is justify-content: space-between, so this middle flex item sits
   centered in the gap between the brand and the right-hand account chip — no
   absolute positioning, so it never overlaps its neighbors. */
.viewas-menu {
  position: relative;
  min-width: 0;
  margin: 0 0.4rem;
  z-index: 60;
}
.viewas-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  color: var(--cream);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 36px;
  max-width: 44vw;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.viewas-trigger:hover, .viewas-trigger[aria-expanded="true"] { background: rgba(255,255,255,0.18); }
.viewas-label { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* When actively impersonating, make it unmistakable. */
.viewas-active .viewas-trigger {
  background: var(--brass);
  border-color: var(--brass);
  color: #fff;
}
.viewas-active .viewas-trigger:hover { background: #9c7942; }
.viewas-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--cream-card);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(19,31,66,0.18);
  z-index: 130;
  animation: account-pop 0.12s ease;
  padding: 0.3rem 0;
}
.viewas-sep { height: 1px; background: var(--rule); margin: 0.3rem 0; }
.viewas-role {
  margin-left: auto;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.viewas-current { background: rgba(176,139,79,0.12); font-weight: 700; }
.viewas-back { font-weight: 700; color: var(--brass); }

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: var(--cream-card);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(19,31,66,0.18);
  overflow: hidden;
  z-index: 120;
  animation: account-pop 0.12s ease;
}
@keyframes account-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.account-dropdown-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
}
.account-dropdown-name { font-weight: 700; font-size: 0.95rem; }
.account-dropdown-email { font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; word-break: break-all; }
.account-dropdown-role {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--brass);
  background: rgba(176,139,79,0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.account-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.8rem 1rem;
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  min-height: var(--tap-min);
}
.account-dropdown-head + .account-dropdown-item { border-top: 0; }
.account-dropdown-item:hover { background: var(--cream); color: var(--ink); }
.account-dropdown-item .ad-ico { width: 1.2rem; text-align: center; }
.account-dropdown-item:disabled { color: var(--muted); cursor: default; }
.account-dropdown-item.is-on { color: var(--good); font-weight: 600; }
.account-dropdown-signout { color: var(--bad); font-weight: 600; }
.account-dropdown-signout:hover { background: #fbeae6; color: var(--bad); }

/* ----- Notification bell ----- */
.topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.bell-menu { position: relative; }
.bell-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--cream);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bell-trigger:hover, .bell-trigger[aria-expanded="true"] { background: rgba(255,255,255,0.16); }
.bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--navy);
}
.bell-dropdown {
  /* Anchored to the viewport (not the bell button) so the panel can't spill
     off the side of a phone screen. */
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 60px);
  right: 8px;
  left: auto;
  width: min(360px, calc(100vw - 16px));
  max-height: calc(100vh - 120px);
  background: var(--cream-card);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(19,31,66,0.18);
  overflow: hidden;
  z-index: 130;
  animation: account-pop 0.12s ease;
}
.bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
  font-weight: 700;
  font-size: 0.9rem;
}
.bell-actions { display: flex; gap: 0.6rem; }
.bell-link {
  background: none; border: 0; color: var(--brass);
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 0;
}
.bell-list { max-height: 60vh; overflow-y: auto; }
.bell-item {
  display: block;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}
.bell-item:hover { background: var(--cream); color: var(--ink); }
.bell-unread { background: #f4f8ff; }
.bell-unread:hover { background: #eaf1fd; }
.bell-item-title { font-weight: 600; font-size: 0.9rem; }
.bell-item-body { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.1rem; }
.bell-item-time { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; }
.bell-empty { padding: 1.5rem 0.9rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* ----- Toast (foreground push banner) ----- */
.toast-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(420px, 94vw);
  pointer-events: none;
}
.toast {
  display: block;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  box-shadow: 0 8px 24px rgba(19,31,66,0.28);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
  border-left: 4px solid var(--brass);
}
.toast.toast-in { opacity: 1; transform: none; }
.toast strong { display: block; font-size: 0.92rem; }
.toast span { display: block; font-size: 0.82rem; color: #cfd6e6; margin-top: 0.1rem; }
.toast.toast-ok { border-left-color: var(--good, #2c7); }
.toast.toast-err { border-left-color: var(--bad, #b54); }

/* ----- Main content ----- */
main.staff-main {
  flex: 1;
  padding: 1rem 1rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 720px) {
  main.staff-main {
    padding: 1.5rem 2rem;
  }
}

/* ----- Headings ----- */
.staff-h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.staff-h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 1.75rem 0 0.75rem;
  color: var(--ink);
}
.staff-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--brass);
}

/* ----- Cards ----- */
.card {
  background: var(--cream-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 2px rgba(19, 31, 66, 0.04), 0 2px 8px rgba(19, 31, 66, 0.04);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.card-link:hover {
  transform: translateY(-1px);
  border-color: var(--rule-strong);
  box-shadow: 0 2px 4px rgba(19, 31, 66, 0.06), 0 6px 16px rgba(19, 31, 66, 0.08);
}
.card-link:active {
  transform: scale(0.99);
  background: var(--cream);
}

/* ----- Job card on Today / Jobs list ----- */
.job-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
}
.job-card .time {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.1;
}
.job-card .customer {
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.2rem;
}
.job-card .address {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 0.1rem;
}
.job-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.job-card .badge-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

/* ----- Status badges ----- */
.badge {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
  background: #ececec;  /* default so an unmapped status is never invisible */
  color: #5a5a5a;
}
/* Job statuses */
.badge-accepted { background: #fbe7c0; color: #6d5414; }
.badge-scheduled { background: #e0eaf8; color: var(--navy); }
.badge-in_progress { background: var(--brass); color: white; }
.badge-pending_review { background: #fff0c4; color: #6d5414; }
.badge-pending { background: #fff0c4; color: #6d5414; }
.badge-approved { background: #d5ead7; color: var(--good); }
.badge-rejected { background: #fadcd0; color: var(--bad); }
.badge-rework_requested { background: #fadcd0; color: var(--bad); }
.badge-canceled { background: #ececec; color: #5a5a5a; }
.badge-invoiced { background: #ddd0f0; color: #4a2a82; }
.badge-paid { background: #c9e5d0; color: var(--good); }
/* Quote / invoice statuses (were unstyled → transparent pills) */
.badge-draft { background: #ececec; color: #5a5a5a; }
.badge-sent { background: #e0eaf8; color: var(--navy); }
.badge-declined { background: #fadcd0; color: var(--bad); }
.badge-expired { background: #efe2c6; color: #7a5b16; }
.badge-changes_requested { background: #fff0c4; color: #6d5414; }
.badge-issued { background: #fff0c4; color: #6d5414; }
.badge-overdue { background: #fadcd0; color: var(--bad); }
.badge-refunded { background: #ddd0f0; color: #4a2a82; }
.badge-voided { background: #ececec; color: #5a5a5a; }
/* Lead statuses */
.badge-new { background: var(--brass); color: #fff; }
.badge-contacted { background: #e0eaf8; color: var(--navy); }
.badge-quoted { background: #ddd0f0; color: #4a2a82; }
.badge-won { background: #c9e5d0; color: var(--good); }
.badge-lost { background: #ececec; color: #5a5a5a; }

/* ----- Operations chips (dashboard hub) ----- */
.ops-chips {
  display: flex; flex-wrap: nowrap; gap: 0.4rem; margin: 0 0 1.25rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding-bottom: 2px;
}
.ops-chips::-webkit-scrollbar { display: none; }
.ops-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  background: var(--cream-card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--navy);
}
.ops-chip:hover { border-color: var(--rule-strong); background: var(--cream); color: var(--navy); }
.ops-chip-n {
  background: var(--brass); color: #fff;
  border-radius: 999px; padding: 0 0.4rem; font-size: 0.72rem; min-width: 18px; text-align: center;
}

/* ----- Filter tabs (one consistent control for every list page) ----- */
.filter-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  overflow-x: auto;            /* long status sets scroll instead of wrapping to 3 rows */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-pill {
  flex: 0 0 auto;             /* never stretch; consistent sizing */
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--cream-card);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.filter-pill:hover { background: var(--cream); color: var(--navy); }
.filter-pill.is-active { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.filter-row .filter-spacer { flex: 1 0 auto; }  /* pushes a trailing link right without margin-auto glitches */

/* ----- Job checklist ----- */
.checklist-row { display: flex; align-items: center; gap: 0.4rem; border-bottom: 1px solid var(--rule); }
.checklist-row:last-of-type { border-bottom: 0; }
.checklist-toggle {
  display: flex; align-items: center; gap: 0.6rem;
  width: 100%; background: none; border: 0; cursor: pointer;
  padding: 0.7rem 0.2rem; text-align: left;
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
  min-height: var(--tap-min);
}
.checklist-box {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px;
  border: 2px solid var(--rule-strong); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.checklist-toggle.is-done .checklist-box { background: var(--good); border-color: var(--good); }
.checklist-toggle.is-done .checklist-text { color: var(--muted); text-decoration: line-through; }
.checklist-del {
  background: none; border: 0; color: var(--muted); font-size: 1.3rem; cursor: pointer;
  padding: 0.3rem 0.5rem; line-height: 1;
}
.checklist-del:hover { color: var(--bad); }

/* ----- Search bar + pager ----- */
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-bar .staff-input { flex: 1; min-width: 160px; }
.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin: 1.25rem 0 0.5rem;
}
.pager .btn { min-height: 40px; padding: 0.5rem 0.9rem; }
.pager-info { font-size: 0.82rem; color: var(--muted); text-align: center; flex: 1; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap-min);
  padding: 0.85rem 1.3rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
  box-shadow: 0 1px 2px rgba(19, 31, 66, 0.18);
}
.btn-primary:hover, .btn-primary:active {
  background: var(--navy-deep);
}
.btn-brass {
  background: var(--brass);
  color: white;
  border-color: var(--brass);
}
.btn-brass:hover, .btn-brass:active { background: #97743b; }
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--cream-card); }
.btn-danger {
  background: var(--bad);
  color: white;
  border-color: var(--bad);
}
.btn-block { width: 100%; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-lg {
  font-size: 1.1rem;
  min-height: 56px;
  padding: 1rem 1.5rem;
}
.btn-danger-ghost {
  background: transparent;
  color: var(--bad);
  border-color: var(--bad);
}
.btn-danger-ghost:hover { background: #fbeae6; color: var(--bad); }

/* ----- Action bar (edit/delete row on detail pages) ----- */
.action-bar {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
}
.action-bar .btn { flex: 1; min-height: 42px; }
/* Delete is deliberately lighter than Edit: grey outline, red only on hover */
.action-bar .action-delete {
  border-color: var(--rule);
  color: #8a4a3f;
  font-weight: 400;
}
.action-bar .action-delete:hover { border-color: var(--bad); }
/* Narrow screens: the primary action gets its own full-width row,
   Edit and Delete sit side by side beneath it. */
@media (max-width: 640px) {
  .action-bar { flex-wrap: wrap; }
  .action-bar .action-primary { flex: 1 1 100%; white-space: normal; }
  .action-bar .btn:not(.action-primary) { flex: 1 1 calc(50% - 0.25rem); }
}

/* ----- Danger zone / confirm-delete ----- */
.danger-card { border: 1px solid #e7c3bb; border-left: 4px solid var(--bad); }
.confirm-object {
  padding: 0.5rem 0 0.85rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0.85rem;
}
.confirm-name { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }
.confirm-sub { font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; }
.confirm-warning { font-size: 0.92rem; color: var(--ink-soft); }
.confirm-blocked {
  background: #fdeee5;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  color: var(--bad);
}
.confirm-blocked p { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }
.confirm-impact {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.confirm-impact-head { font-weight: 600; margin-bottom: 0.35rem; }
.confirm-impact ul { margin: 0; padding-left: 1.15rem; color: var(--ink-soft); }
.confirm-label { display: block; font-size: 0.9rem; margin-bottom: 0.35rem; }
.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.85rem 0 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.confirm-check input { margin-top: 0.15rem; width: 18px; height: 18px; flex-shrink: 0; }

/* ----- Forms ----- */
.staff-input,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"],
input[type="date"], input[type="time"], textarea, select {
  width: 100%;
  min-height: var(--tap-min);
  padding: 0.75rem 0.95rem;
  font-family: inherit;
  font-size: 1rem;
  background: white;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.staff-input:focus,
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(176, 139, 79, 0.18);
}

.field-group { margin-bottom: 1.25rem; }
/* Two-up form fields that stack on narrow phones. */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
@media (max-width: 430px) { .field-row { grid-template-columns: 1fr; } }
.field-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.field-error {
  color: var(--bad);
  font-size: 0.85rem;
  margin-top: 0.4rem;
}
.form-error-box {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bad);
  border-left-width: 4px;
  border-radius: 6px;
  background: #fbeae6;
  color: var(--bad);
  font-weight: 600;
}
.staff-input.input-error {
  border-color: var(--bad);
  background: #fdf3f1;
}
.field-help {
  color: var(--muted);
  font-size: 0.825rem;
  margin-top: 0.35rem;
}

/* ----- Login ----- */
.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--navy);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.login-card {
  background: white;
  color: var(--ink);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}
.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-logo img {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
}
.login-logo .name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: white;
}
.login-logo .sub {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-soft);
}

/* ----- Bottom nav ----- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-top: 1px solid var(--rule);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 12px rgba(19, 31, 66, 0.06);
}
.bottom-nav a {
  flex: 1;
  min-width: 0;  /* allow even shrink so 6 admin tabs fit without overflow */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 2px;
  text-decoration: none;
  color: var(--muted);
  font-size: clamp(0.56rem, 2.4vw, 0.7rem);  /* 7 admin tabs (Snow added) still show whole labels at 360px */
  font-weight: 600;
  letter-spacing: 0;
  min-height: 64px;
  transition: color 0.15s ease;
}
.bottom-nav a span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bottom-nav a.active {
  color: var(--navy);
}
/* Active tab indicator bar */
.bottom-nav a.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--brass);
}
.bottom-nav a .icon {
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.bottom-nav a.active .icon {
  transform: translateY(-1px) scale(1.05);
}
/* Unread-mail count on the Mail tab (bottom bar and desktop sidebar) */
.bottom-nav a .icon,
.side-nav a .icon { position: relative; }
.nav-badge {
  position: absolute;
  top: -5px;
  right: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* ----- Photos ----- */
.photos-section {
  margin-bottom: 1.5rem;
  padding: 0.85rem 0.9rem 0.9rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--rule-strong);
  background: rgba(255, 255, 255, 0.5);
}
.photos-section.batch-before {
  border-left-color: var(--brass);
  background: #fbf3e3;
}
.photos-section.batch-after {
  border-left-color: var(--good, #2d6a4f);
  background: #e9f3ec;
}
.photos-section.batch-issue {
  border-left-color: var(--warn, #c9881f);
  background: #fdf4e0;
}
.photos-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}
.photos-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
}
.photos-header .batch-count {
  color: var(--muted);
  font-size: 0.825rem;
  font-weight: 500;
}
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}
.photo-tile {
  background: var(--cream-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}
.photo-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.photo-tile .caption {
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
}
.photo-tile .tile-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 14px;
  line-height: 22px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0;
}
.photo-tile:hover .tile-remove,
.photo-tile:focus-within .tile-remove {
  opacity: 1;
}
/* Touch devices have no hover — keep the delete button visible + tappable. */
@media (hover: none) {
  .photo-tile .tile-remove { opacity: 1; width: 32px; height: 32px; line-height: 30px; font-size: 16px; }
}

/* Live upload placeholder tile (shown while a photo is uploading) */
.photo-tile.uploading {
  background: var(--cream);
  position: relative;
}
.photo-tile.uploading::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.photo-tile.uploading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid var(--rule-strong);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: tile-spin 0.8s linear infinite;
}
.photo-tile.uploading .progress-text {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  font-size: 0.72rem;
  text-align: center;
  color: var(--muted);
}
@keyframes tile-spin {
  to { transform: rotate(360deg); }
}

.photo-upload-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: var(--cream-card);
  border: 2px dashed var(--rule-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  transition: border-color 0.15s, background 0.15s;
}
.photo-upload-btn:hover {
  background: white;
  border-color: var(--brass);
}
.photo-upload-btn .camera-icon {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}
.photo-upload-btn .upload-hint {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.25rem;
  font-weight: 400;
}
.photo-upload-btn input[type="file"] {
  display: none;
}

.batch-empty-hint {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin: 0.25rem 0 0.5rem;
}

/* ----- Action panel (clock in/out, mark complete) ----- */
.action-panel {
  background: var(--cream-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}
.action-panel h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.action-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.action-status .label { color: var(--muted); }
.action-status .value { font-weight: 600; color: var(--ink); }

.blockers {
  background: #fdeee5;
  border-left: 3px solid var(--warn);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
}
.blockers ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* ----- Messages (Django) ----- */
.messages {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.messages li {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--brass);
  background: var(--cream-card);
}
.messages li.error { border-left-color: var(--bad); }
.messages li.success { border-left-color: var(--good); }

/* ----- Empty states ----- */
.empty {
  text-align: center;
  padding: 2.75rem 1.25rem;
  color: var(--muted);
  background: var(--cream-card);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
}
.empty h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
}
.empty p { margin: 0 auto; max-width: 32ch; font-size: 0.9rem; }

/* ----- Detail layout ----- */
.detail-section {
  margin-bottom: 1.25rem;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.detail-row:last-child { border-bottom: none; }
.detail-row .label {
  color: var(--muted);
  font-size: 0.825rem;
}
.detail-row .value {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  max-width: 60%;
}


/* ----- Geofence status indicator ----- */
.geofence-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}
.geofence-status .geofence-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}
.geofence-status .geofence-text {
  flex: 1;
  font-weight: 500;
}
.geofence-status .geofence-distance {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  margin-left: 0.5rem;
}

.geofence-checking {
  background: var(--cream);
  border: 1px solid var(--rule);
  color: var(--muted);
}
.geofence-inside {
  background: #d5ead7;
  color: var(--good);
  border: 1px solid #b4d6b7;
}
.geofence-outside {
  background: #fadcd0;
  color: var(--bad);
  border: 1px solid #f0bba8;
}
.geofence-warning {
  background: #fff0c4;
  color: #6d5414;
  border: 1px solid #f0d878;
}
.geofence-error {
  background: #fadcd0;
  color: var(--bad);
  border: 1px solid #f0bba8;
}

/* -- Share / QR tab --------------------------------------------- */
.qr-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.qr-share-frame {
  background: #fff;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -24px rgba(14, 26, 58, 0.35);
  line-height: 0;
}
.qr-share-frame img {
  display: block;
  width: min(72vw, 300px);
  height: auto;
}
.qr-share-url {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
}

/* Bottom-right "up one level" back link (base.html {% block back_nav %}). */
.page-back-nav { text-align: right; margin: 1.5rem 0 0.5rem; }
.page-back-nav a { font-size: 0.9rem; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.page-back-nav a:active, .page-back-nav a:hover { color: var(--ink); }

/* Editable note under each job photo (crew adds descriptions on site). */
.tile-note { display: flex; gap: 4px; padding: 4px; border-top: 1px solid var(--rule); }
.tile-note input { flex: 1; min-width: 0; font-size: 0.74rem; padding: 5px 6px; border: 1px solid var(--rule); border-radius: 4px; background: #fff; }
.tile-note button { flex: 0 0 auto; background: var(--good, #2c7); color: #fff; border: 0; border-radius: 4px; width: 30px; font-size: 0.85rem; cursor: pointer; }

/* Tip split rows: whole row is the tap target */
.tip-row {
  display: flex; align-items: center; gap: .6rem; min-height: 44px;
  padding: .35rem 0; border-bottom: 1px solid var(--rule); cursor: pointer;
}
.tip-row:last-child { border-bottom: none; }
.tip-row .tip-name { flex: 1; }
.tip-row .tip-worker { width: 1.25rem; height: 1.25rem; flex: none; }
.tip-row .tip-amount-wrap { transition: opacity .15s; }
.tip-row.is-off .tip-amount-wrap { opacity: .35; }
.tip-remaining-ok { color: var(--good); }
.tip-remaining-off { color: var(--bad); }

/* === audit:pii === */
.tin-onfile { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; min-height: 44px; }
.tin-masked, .tin-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.tin-value { font-size: 1.3rem; word-break: break-all; }
.tin-warn { color: var(--bad, #b3261e); font-weight: 600; }
.tin-reveal-btn { min-height: 44px; padding: .5rem 1rem; }
.linklike-form { display: inline; margin: 0; }
.linklike-btn { background: none; border: 0; padding: 0; min-height: 44px; display: inline-flex; align-items: center; color: var(--brass); font: inherit; font-weight: 600; cursor: pointer; }
form.dd-form { margin: 0; }
/* === end audit:pii === */

/* === audit:money === */
.pc-card.pc-attention { border-left: 3px solid var(--bad, #b04a3a); }
.pc-card.pc-held { border-left: 3px solid var(--warn, #c47b2a); }
.pc-reason { color: var(--bad, #b04a3a); margin-top: 0.2rem; }
.pc-history { margin-top: 0.6rem; font-size: 0.85rem; }
.pc-history summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--brass); }
.pc-history ul { list-style: none; margin: 0; padding: 0; }
.pc-history li { display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; padding: 0.35rem 0; border-top: 1px solid var(--rule); }
.pc-status-failed { color: var(--bad, #b04a3a); font-weight: 600; }
.pc-status-succeeded { color: var(--good, #2d8a4b); font-weight: 600; }
.pc-status-pending { color: var(--warn, #c47b2a); font-weight: 600; }
.pc-why { color: var(--muted); flex-basis: 100%; }
.pc-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.pc-actions form { margin: 0; }
.pc-actions .btn { min-height: 44px; padding: 0.35rem 0.9rem; }
.ml-row { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ml-row.ml-failed { border-left: 3px solid var(--bad, #b04a3a); }
.ml-main { flex: 1 1 14rem; min-width: 0; }
.ml-subject { font-weight: 600; overflow-wrap: anywhere; }
.ml-error { color: var(--bad, #b04a3a); }
.ml-side { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ml-resend { min-height: 44px; padding: 0.35rem 0.9rem; }
.badge-partly_refunded { background: #ddd0f0; color: #4a2a82; }
.tip-chip { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; background: #fdf0c4; color: #6d5414; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.fin-totals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin: 0.75rem 0 1.25rem; }
.fin-totals .card { margin: 0; text-align: center; }
.fin-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.fin-num { font-family: 'Fraunces', serif; font-size: 1.4rem; }
.fin-sub { font-size: 0.7rem; color: var(--muted); margin-top: 0.1rem; }
@media (min-width: 720px) { .fin-totals { grid-template-columns: repeat(4, 1fr); } }
.fin-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.fin-tabs .ops-chip { min-height: 44px; display: inline-flex; align-items: center; }
.fin-tabs .ops-chip.is-on { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.inv-row-link { display: block; color: inherit; text-decoration: none; }
.inv-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 1rem; }
.inv-amt { font-family: 'Fraunces', serif; font-size: 1.1rem; }
.inv-due { color: var(--brass); font-weight: 700; }
.inv-late { color: var(--bad, #b04a3a); font-weight: 700; }
.inv-error { margin: 0 0 1rem; padding: 0.75rem 1rem; border: 1px solid var(--bad, #b04a3a); border-left-width: 4px; border-radius: 6px; background: #fbeae6; color: var(--bad, #b04a3a); font-weight: 600; }
.inv-panel { background: var(--cream-card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0 1.1rem; margin: 1rem 0; }
.inv-panel[open] { padding-bottom: 1rem; }
.inv-panel summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--brass); }
.inv-panel-danger summary { color: var(--bad, #b04a3a); }
.inv-check { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; margin-bottom: 0.75rem; cursor: pointer; }
.inv-check input { width: 1.25rem; height: 1.25rem; flex: none; }
.pc-more { margin-top: 0.4rem; font-size: 0.85rem; }
.pc-more a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brass); }
/* === end audit:money === */

/* === audit:quotes === */
.quote-line .quote-line-remove {
  min-height: 44px; min-width: 44px; padding: 0.25rem 0.6rem; font-size: 0.95rem;
}
.quote-line-edit { margin-top: 0.6rem; }
.quote-line-edit > summary {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; cursor: pointer; list-style: none; width: 100%;
}
.quote-line-edit > summary::-webkit-details-marker { display: none; }
.quote-line-edit[open] > summary { margin-bottom: 0.75rem; }
.quote-form-msg { min-height: 0; margin-bottom: 0.6rem; font-size: 0.9rem; }
.quote-form-msg:empty { display: none; }
.quote-form-msg.is-error { color: var(--bad); font-weight: 600; }
.quote-form-msg.is-ok { color: var(--good); font-weight: 600; }
.quote-expired-panel { margin-bottom: 1rem; }
#quote-lines-block.is-busy, #quote-actions-block.is-busy { opacity: .6; pointer-events: none; }
/* === end audit:quotes === */

/* === audit:customers === */
/* One-tap call links. The padding/negative margin gives a 44px tap target
   without changing how the line of text sits. */
.phone-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-underline-offset: 3px;
  display: inline-block;
  padding: 0.7rem 0.15rem;
  margin: -0.7rem 0;
}
.phone-link:hover, .phone-link:active { color: var(--navy); }

/* A list card whose whole surface opens the record, with a phone link on top. */
.card-has-phone { position: relative; }
.card-has-phone .card-main { color: inherit; text-decoration: none; }
.card-has-phone .card-main::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-has-phone .phone-link { position: relative; z-index: 2; }

/* Text in Quo: the Quo app link on phones; Quo's web app plus a Copy button on a desktop. */
.quo-text { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.quo-text a.quo-btn, .quo-copy {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 0.9rem; border-radius: 8px;
  font-family: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.quo-text a.quo-btn { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.quo-copy { background: #fff; color: var(--navy); border: 1px solid var(--rule-strong); }
.quo-copy:active { background: var(--cream); }
.quo-text .quo-text-desktop { display: none; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
@media (hover: hover) and (pointer: fine) {
  .quo-text a.quo-text-phone { display: none; }
  .quo-text .quo-text-desktop { display: inline-flex; }
}

/* Lead card actions */
.lead-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem; margin-top: 0.85rem; }
.lead-actions form { margin: 0; }
.lead-actions .btn, .lead-actions summary.btn { min-height: 44px; padding: 0.5rem 0.95rem; }
.lead-lost summary { list-style: none; cursor: pointer; }
.lead-lost summary::-webkit-details-marker { display: none; }
.lead-lost[open] { flex-basis: 100%; }
.lead-lost-form { display: grid; gap: 0.5rem; margin-top: 0.5rem; padding: 0.75rem; background: var(--cream); border-radius: var(--radius-sm); }
.lead-lost-form label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }

/* Dashboard: customer requests */
.customer-request-main { display: block; color: inherit; text-decoration: none; min-height: 44px; }
/* === end audit:customers === */

/* === audit:jobs === */
/* Late / missed badges (shared by dashboard, schedule and jobs list). */
.aj-badge-late { background: #fadcd0; color: var(--bad); }
.aj-badge-missed { background: var(--bad); color: #fff; }
.aj-badge-loc { background: #fff0c4; color: #6d5414; }

/* Tap targets: every audit:jobs button is at least 44px tall. */
.aj-btn { min-height: 44px; padding: 0.6rem 1rem; font-size: 0.95rem; }

/* Banners at the top of the job page. */
.aj-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  padding: 0.75rem 0.9rem; margin: 0 0 1rem;
  border-radius: var(--radius-sm); border-left: 4px solid var(--rule-strong);
  background: var(--cream-card); font-size: 0.92rem;
}
.aj-banner > strong { flex: 1 1 100%; }
.aj-banner > div { flex: 1 1 100%; }
.aj-banner-canceled { border-left-color: #5a5a5a; background: #f3f1ec; }
.aj-banner-late, .aj-banner-missed { border-left-color: var(--bad); background: #fdeee5; }
.aj-banner-help { border-left-color: var(--brass); background: #fff8eb; }
.aj-banner-locked { border-left-color: var(--navy); background: #eef2fa; color: var(--ink-soft); }
.aj-banner .aj-actions { margin-top: 0.25rem; }

/* Rows of action buttons (Allow / Dismiss / Open job). */
.aj-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.aj-actions form { margin: 0; }
.aj-actions .aj-btn { min-width: 96px; }

/* Dashboard "Needs attention" list. */
.aj-attention { margin: 0.5rem 0 1.25rem; }
.aj-attn-title { margin-top: 0; color: var(--bad); }
.aj-count {
  display: inline-block; min-width: 1.5rem; padding: 0 0.45rem; margin-left: 0.25rem;
  border-radius: 999px; background: var(--bad); color: #fff;
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; text-align: center;
}
.aj-card { margin-bottom: 0.6rem; }
.aj-card-late, .aj-card-missed, .aj-card-time { border-color: var(--bad); }
.aj-card-help { border-color: var(--brass); background: #fff8eb; }
.aj-soft { color: var(--muted); font-weight: 400; }

/* Set-end-time form (forgotten clock-outs). */
.aj-endform { margin-top: 0.6rem; }
.aj-endform label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.aj-endrow { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.aj-endrow .staff-input { flex: 1 1 200px; min-width: 0; min-height: 44px; }

/* Crew "can't get my location" box. */
.aj-help {
  margin-top: 0.85rem; padding: 0.75rem 0.85rem;
  border: 1px dashed var(--rule-strong); border-radius: var(--radius-sm); background: #fffdf6;
}
.aj-help-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.aj-help .staff-input { margin-bottom: 0.5rem; min-height: 44px; }
.aj-help-sent { border-style: solid; border-color: var(--brass); background: #fff8eb; font-size: 0.9rem; }
.aj-help-sent .link { display: inline-block; min-height: 44px; line-height: 44px; margin-left: 0.4rem; }

/* Locked (submitted) checklist rows: look like the live ones, but not tappable. */
.aj-readonly { cursor: default; pointer-events: none; }

/* People checkboxes (job assignment): whole row is the tap target. */
.aj-people { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.aj-people legend { padding: 0; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; }
.aj-person {
  display: flex; align-items: center; gap: 0.6rem; min-height: 44px;
  padding: 0.3rem 0.1rem; border-bottom: 1px solid var(--rule); cursor: pointer; margin: 0;
}
.aj-people .aj-person:last-of-type { border-bottom: 0; }
.aj-person input[type="checkbox"] { width: 1.3rem; height: 1.3rem; flex: none; }

/* Admin job tools. */
.aj-tool summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.aj-tool p.meta { margin: 0.4rem 0 0.75rem; }
.aj-cancel summary { color: var(--bad); }

/* ---- Crew app step 2: offline copies, photo upload, error pages ---- */

/* Banner on a saved job page (shown by the service worker when offline). */
.ap-offline-banner {
  margin: 0 0 0.9rem; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--brass); background: #fff8eb; color: var(--ink); font-size: 0.95rem;
}
.ap-offline-banner[hidden] { display: none; }
.ap-offline-note { margin: 1rem 0 0.75rem; }
.ap-plain-list { list-style: none; margin: 0; padding: 0; }
.ap-plain-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.ap-plain-list li:last-child { border-bottom: 0; }
.ap-gate { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.05em; }
.ap-tel { display: inline-block; min-height: 44px; line-height: 44px; color: var(--navy); font-weight: 600; }

/* Offline page: jobs saved on this phone. */
.ap-saved { margin: 1.5rem auto 0; max-width: 420px; text-align: left; }
.ap-saved[hidden] { display: none; }
.ap-saved-title { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; margin: 0 0 0.25rem; }
.ap-saved-sub { margin: 0 0 0.6rem; color: rgba(251, 247, 236, 0.7); font-size: 0.85rem; }
.ap-saved-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ap-saved-link {
  display: block; min-height: 44px; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12); color: #fff; text-decoration: none;
}
.ap-saved-link strong { display: block; }
.ap-saved-link span { display: block; color: var(--brass-soft); font-size: 0.9rem; }
.ap-saved-link small { display: block; color: rgba(251, 247, 236, 0.75); overflow-wrap: anywhere; }

/* Photo tiles that are on their way up (progress) or failed (retry). */
.photo-tile.ap-up { position: relative; }
.photo-tile.ap-up.uploading::before,
.photo-tile.ap-up.uploading::after { display: none; }
.photo-tile.ap-up .ap-up-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.photo-tile.ap-up.uploading .ap-up-thumb { opacity: 0.5; }
.photo-tile.ap-up.ap-failed .ap-up-thumb { opacity: 0.35; }
.photo-tile.ap-up.uploading .ap-up-bar {
  position: absolute; left: 6px; right: 6px; bottom: 26px; height: 6px;
  background: rgba(255, 255, 255, 0.85); border-radius: 3px; overflow: hidden;
}
.photo-tile.ap-up .ap-up-bar span { display: block; height: 100%; width: 0; background: var(--navy); transition: width 0.2s; }
.photo-tile.ap-up.uploading .ap-up-label {
  position: absolute; left: 6px; right: 6px; bottom: 6px; text-align: center;
  font-size: 0.75rem; font-weight: 600; color: var(--ink);
}
.photo-tile.ap-failed { border-color: var(--bad); }
.ap-fail-msg { padding: 0.45rem 0.5rem 0.2rem; font-size: 0.78rem; line-height: 1.3; color: var(--bad); }
.ap-fail-actions { display: flex; gap: 0.35rem; padding: 0.35rem; }
.ap-fail-btn {
  flex: 1 1 0; min-height: 44px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--navy); font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.ap-fail-retry { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Friendly 403 / 404 / 500 pages. */
.ap-error { text-align: center; padding: 2rem 0.5rem 1rem; max-width: 460px; margin: 0 auto; }
.ap-error-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.ap-error-msg { color: var(--ink-soft); margin: 0 0 1.5rem; overflow-wrap: anywhere; }
.ap-error-actions { display: grid; gap: 0.6rem; }
.ap-error-actions .btn { min-height: 48px; justify-content: center; }
/* === end audit:jobs === */

/* === audit:forms === */
/* Sign-in helper links ("Forgot your password?", "Back to sign in"): a full-width, 44px tap target. */
.auth-alt { text-align: center; margin: 1.25rem 0 0; font-size: 0.9rem; }
.auth-alt a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 0.75rem;
  color: var(--navy); font-weight: 600; text-decoration: underline;
}
/* === end audit:forms === */

/* === audit:staffui === */

/* ----- Messages: inline under the header (errors/warnings stay until dismissed) ----- */
.flash-stack {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  box-sizing: border-box;
}
.flash {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.75rem 1rem 0;
  padding: 0.35rem 0.25rem 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--brass);
  background: var(--cream-card);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.4;
  transition: opacity 0.3s ease;
}
.flash-text { flex: 1; min-width: 0; padding: 0.55rem 0; overflow-wrap: anywhere; }
.flash-error { border-left-color: var(--bad); background: #fdeee5; }
.flash-warning { border-left-color: var(--warn); background: #fff3dc; }
.flash-success { border-left-color: var(--good); background: #e6f3ea; }
.flash-out { opacity: 0; }
.flash-close {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  margin: -0.35rem 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.flash-close:hover { color: var(--ink); }
@media (min-width: 720px) {
  .flash { margin-left: 2rem; margin-right: 2rem; }
}

/* ----- Job review: Approve and Send Back are separate, clearly different ----- */
.review-approve { margin-bottom: 0.4rem; }
.review-approve-note { text-align: center; margin: 0.45rem 0 0; }
.review-sendback {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--rule-strong);
}
.review-sendback .btn { min-height: 48px; }

/* ----- Long status pills wrap instead of squeezing or overflowing a row ----- */
.job-card { grid-template-columns: minmax(0, 1fr) auto; }
.job-card > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.badge { max-width: 100%; }
@media (max-width: 480px) {
  .job-card:has(> .badge-col .badge) { grid-template-columns: minmax(0, 1fr); }
  .job-card:has(> .badge-col .badge) > .badge-col {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }
  .badge-col .badge { white-space: normal; text-align: left; }
  .sched-row { grid-template-columns: 62px minmax(0, 1fr) !important; }
  .sched-row > .badge { grid-column: 2; justify-self: start; white-space: normal; }
}

/* ----- Reports tables: scroll inside their own box, with a visible cue ----- */
.report-scroll {
  max-width: 100%;
  background:
    linear-gradient(to right, var(--cream, #fff) 30%, rgba(255, 255, 255, 0)) left center / 24px 100% no-repeat local,
    linear-gradient(to left, var(--cream, #fff) 30%, rgba(255, 255, 255, 0)) right center / 24px 100% no-repeat local,
    linear-gradient(to right, rgba(19, 31, 66, 0.18), rgba(19, 31, 66, 0)) left center / 10px 100% no-repeat scroll,
    linear-gradient(to left, rgba(19, 31, 66, 0.18), rgba(19, 31, 66, 0)) right center / 10px 100% no-repeat scroll;
}
.report-scroll table td:first-child { overflow-wrap: anywhere; }
/* Column headers never break mid-word ("Jo / bs"); the table scrolls instead. */
.report-scroll table th { white-space: nowrap; overflow-wrap: normal; }
.report-scroll table th:last-child, .report-scroll table td:last-child { white-space: nowrap; padding-left: 0.5rem; }

/* ----- Destructive and money controls: at least 44 px to tap ----- */
.checklist-del { min-width: 44px; min-height: 44px; }
.quo-text-link, .tap-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.tap-summary {
  display: flex;
  align-items: center;
  min-height: 44px;
}
@media (max-width: 640px), (pointer: coarse) {
  .btn[style*="min-height"] {
    min-height: 44px !important;
    min-width: 44px;
  }
  .photo-tile .tile-remove {
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    top: 0;
    right: 0;
    padding: 0;
    line-height: 44px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.55) 16px, rgba(0, 0, 0, 0) 16.5px);
  }
  .flash-close, .quo-text-link, .tap-link { min-height: 44px; }
}

/* ----- Desktop shell for the admin app (1024px and wider) -----
   A left sidebar with the same destinations as the phone's bottom bar, and a
   wider content area. Phones and crew members keep their current layout. */
.side-nav { display: none; }
.desk-cols { display: block; }
.view-toggle {
  display: flex;
  margin-top: 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  max-width: 360px;
}
.view-toggle a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-left: 1px solid var(--rule);
}
.view-toggle a:first-child { border-left: 0; }
.view-toggle a:hover { background: var(--cream); color: var(--navy); }
.view-toggle a.on { background: var(--navy); color: #fff; }
.sched-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.sched-nav { display: flex; gap: 0.4rem; }

/* Calendar: a day-by-day list on phones, a grid from 1024px */
.cal-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.cal-job {
  position: relative;
  display: block;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.4rem 0.55rem 0.4rem 0.75rem;
  margin-top: 0.4rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--crew, var(--navy));
  background: var(--chip-bg, #e0eaf8);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.cal-job:hover { color: var(--ink); box-shadow: 0 1px 6px rgba(19, 31, 66, 0.18); }
.cal-job-time { display: block; font-weight: 700; color: var(--navy); }
.cal-job-name { display: block; font-weight: 600; }
.cal-job-crew { display: block; color: var(--ink-soft); font-size: 0.78rem; }
.cal-job-status { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--status-ink, var(--navy)); }
.cal-job-accepted { --chip-bg: #fbe7c0; --status-ink: #6d5414; }
.cal-job-scheduled { --chip-bg: #e0eaf8; --status-ink: var(--navy); }
.cal-job-in_progress { --chip-bg: #f1dfba; --status-ink: #7a5a1c; }
.cal-job-pending_review { --chip-bg: #fff0c4; --status-ink: #6d5414; }
.cal-job-approved, .cal-job-invoiced { --chip-bg: #ddd0f0; --status-ink: #4a2a82; }
.cal-job-paid { --chip-bg: #c9e5d0; --status-ink: var(--good); }
.cal-job-rework_requested { --chip-bg: #fadcd0; --status-ink: var(--bad); }
.cal-req { --chip-bg: #fff; border: 1px dashed var(--rule-strong); border-left: 4px dashed var(--rule-strong); opacity: 0.95; }
.cal-req .cal-job-time { color: var(--muted); font-style: italic; font-weight: 600; }
.cal-none { color: var(--muted); font-size: 0.875rem; margin: 0.4rem 0 0; }
.cal-today-tag { font-size: 0.7rem; color: var(--brass); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-left: 0.4rem; }
.cal-more { display: flex; align-items: center; min-height: 44px; font-size: 0.78rem; font-weight: 600; }

/* phone: week = stacked days */
.cal-week { margin-top: 0.9rem; }
.cal-col {
  background: var(--cream-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem 0.8rem;
  margin-bottom: 0.7rem;
}
.cal-col.is-today { border-color: var(--brass); background: #fffaef; }
.cal-col-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; color: var(--ink); }
.cal-col-head .cal-d-long { flex: 1; }
.cal-col-head .cal-d-short { display: none; }
.cal-count { font-family: var(--font-body); font-size: 0.82rem; color: var(--muted); font-weight: 400; }

/* phone: month = the days that have something, one under another */
.cal-month { margin-top: 0.9rem; }
.cal-dow-row { display: none; }
.cal-cell { background: var(--cream-card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.6rem 0.85rem 0.7rem; margin-bottom: 0.6rem; }
.cal-cell.is-empty:not(.is-today), .cal-cell.is-outside { display: none; }
.cal-cell.is-today { border-color: var(--brass); background: #fffaef; }
.cal-cell-num { display: flex; align-items: center; min-height: 44px; font-family: var(--font-display); font-size: 1.02rem; color: var(--ink); }
.cal-cell-num .cal-n-short { display: none; }
.cal-cell.is-empty .cal-cell-num { min-height: 0; }
.cal-month-none { display: block; }

@media (min-width: 1024px) {
  body.app-admin { padding-left: 232px; padding-bottom: 0; }
  body.app-admin .bottom-nav { display: none; }
  body.app-admin .topbar .brand { display: none; }
  body.app-admin .topbar-right { margin-left: auto; }
  body.app-admin #push-optin { left: 232px !important; bottom: 0 !important; }
  body.app-admin .side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 232px;
    padding: 1rem 0.75rem;
    background: var(--navy);
    overflow-y: auto;
    z-index: 60;
  }
  .side-nav .side-brand {
    padding: 0.4rem 0.75rem 1.1rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 1.2;
    color: var(--cream);
  }
  .side-nav .side-brand span {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brass-soft);
  }
  .side-nav a:not(.side-brand) {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: #cfd6e6;
    font-size: 0.95rem;
    font-weight: 600;
  }
  .side-nav a:not(.side-brand):hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
  .side-nav a.active { background: var(--navy-soft); color: #fff; }
  .side-nav a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brass);
  }
  .side-nav a .icon { width: 1.5rem; text-align: center; font-size: 1.15rem; line-height: 1; }

  body.app-admin main.staff-main { max-width: 1200px; padding: 1.75rem 2.25rem 2.5rem; }
  body.app-admin main.staff-main > form { max-width: 820px; }
  body.app-admin .flash-stack { max-width: 1200px; }
  body.app-admin .flash { margin-left: 2.25rem; margin-right: 2.25rem; }

  /* two-column pages */
  .desk-cols { display: grid; gap: 0 1.75rem; align-items: start; }
  .desk-cols-dash { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .desk-cols-customer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .desk-cols-dash > .desk-col:last-child > .staff-h2:first-child { margin-top: 0; }
  .desk-col-first { margin-top: 1rem; }
  .dash-quick { max-width: 720px; }
  .dash-newquote { max-width: 260px; }

  /* schedule: week and month grids */
  .view-toggle { margin-top: 0.9rem; }
  .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.5rem; align-items: stretch; }
  .cal-col { margin-bottom: 0; padding: 0.6rem 0.5rem 0.7rem; min-height: 340px; }
  .cal-col-head { display: block; text-align: center; padding-bottom: 0.45rem; border-bottom: 1px solid var(--rule); }
  .cal-col-head .cal-d-long { display: none; }
  .cal-col-head .cal-d-short { display: block; }
  .cal-d-dow { font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .cal-d-num { display: inline-block; min-width: 2rem; line-height: 2rem; border-radius: 999px; font-size: 1.15rem; }
  .cal-col.is-today .cal-d-num, .cal-cell.is-today .cal-n-short { background: var(--navy); color: #fff; }
  .cal-col-head .cal-today-tag { display: block; margin: 0; }
  .cal-count { display: block; font-size: 0.72rem; }
  .cal-job { padding: 0.35rem 0.45rem 0.35rem 0.55rem; font-size: 0.78rem; }
  .cal-job-status { font-size: 0.66rem; }

  .cal-month {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .cal-dow-row { display: contents; }
  .cal-dow-row span {
    padding: 0.5rem 0.4rem;
    background: var(--cream);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .cal-cell, .cal-cell.is-empty:not(.is-today), .cal-cell.is-outside {
    display: block;
    min-height: 118px;
    margin: 0;
    padding: 0.3rem 0.35rem 0.4rem;
    border: 0;
    border-radius: 0;
    background: var(--cream-card);
  }
  .cal-cell.is-outside, .cal-cell.is-outside.is-empty:not(.is-today) { background: var(--cream); }
  .cal-cell.is-outside .cal-job { opacity: 0.7; }
  .cal-cell.is-today { background: #fffaef; box-shadow: inset 0 0 0 2px var(--brass); }
  .cal-cell-num { display: inline-flex; justify-content: flex-start; min-height: 0; font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
  .cal-cell-num .cal-n-long { display: none; }
  .cal-cell-num .cal-n-short { display: inline-block; min-width: 1.7rem; line-height: 1.7rem; text-align: center; border-radius: 999px; }
  .cal-cell-num:hover { color: var(--navy); }
  .cal-cell .cal-today-tag { display: none; }
  .cal-cell .cal-job { min-height: 0; margin-top: 0.2rem; padding: 0.2rem 0.4rem 0.2rem 0.45rem; border-left-width: 3px; font-size: 0.74rem; }
  .cal-cell .cal-job-time, .cal-cell .cal-job-name { display: inline; }
  .cal-cell .cal-job-crew { display: none; }
  .cal-cell .cal-job-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cal-cell .cal-job-time { margin-right: 0.3rem; }
  .cal-more { min-height: 0; padding: 0.2rem 0.1rem; }
  .cal-month-none { display: none; }
}
/* === end audit:staffui === */

/* A small text link made a comfortable tap target without moving the text:
   the padding grows the hit area and the negative margin gives it back. */
.tap-pad { display: inline-block; padding: 0.7rem 0.4rem; margin: -0.7rem -0.4rem; }
