/* Manors Bid office.css: Office (admin) screens: Today, Jobs, a job, Create, Customers, More, Schedule, Rate card, Settings, Reports. The crew and phone pages are standalone and link app.css only.
   Loaded after app.css (the field-ledger design base: tokens and shared
   components). Put ONLY this screen group's styles here and build on the
   app.css tokens (var(--band), var(--action), var(--attention), ...)
   and components (.btn, .card, .unit-tag, .list-row, .menu-row,
   .page-band, .callout-attention).
   Office screens filled in 2026-10-20 (field-ledger redesign). Classes here
   are office-only names, except .alert and .callout-gap, which office
   templates used before any style existed for them. */

/* ---------- shared office pieces ---------- */

/* old office templates say .alert and .callout-gap; give them the callout look */
.alert {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  padding: 12px 14px; margin: 0 0 14px; color: var(--ink);
}
.alert[role="alert"] { border-color: var(--attention); background: var(--attention-soft); color: var(--ink); font-weight: 600; }
.callout-gap {
  border: 1px solid var(--attention); border-radius: var(--radius-input); background: var(--attention-soft);
  padding: 12px; margin: 6px 0 10px; color: var(--ink);
}
.callout-gap > strong:first-child { color: var(--attention); }

/* the band with a back link (Job, Quote from a text, Walk boards) */
.office-band { gap: 4px; padding-top: 8px; padding-bottom: 14px; }
.office-band .band-back {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  min-height: var(--tap); font-weight: 600; color: var(--band-ink); text-decoration: none;
}
.office-band .band-back:hover { text-decoration: underline; color: var(--band-ink); }
.office-band h1 { font-size: 22px; }

/* a plain intro line under the band */
.office-lede { color: var(--ink-soft); margin: 0 0 14px; line-height: 1.45; max-width: 40em; }
.office-back { margin: 18px 0 0; }
.office-back a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }

.list-section-foot { margin: 8px 0 0; color: var(--ink-soft); font-size: 14px; }
.list-row-meta.text-attention { color: var(--attention); }

/* a section title with a quiet note on the right ("Your draft · Untick anything wrong") */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 0 8px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 20px; }
.section-head .muted { font-size: 13px; }

/* ---------- Today ---------- */
.today-quote { margin: 0 0 18px; }
.today-quote-btn { min-height: 52px; }
.today-empty {
  margin: 4px 0 18px; padding: 16px 0 8px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.today-empty strong { font-size: 17px; }
.today-empty p { margin: 0; }
.today-empty-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.today-empty-links a { min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 600; }
.today-foot { margin: 8px 0 0; }
@media (min-width: 900px) { .today-quote-btn { max-width: 360px; } }

/* ---------- Jobs (Jobs board) ---------- */
.page-band-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.page-band .band-link {
  display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700;
  color: var(--band-ink); text-decoration: none;
}
.page-band .band-link:hover { color: var(--band-ink); text-decoration: underline; }
.jobs-find { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin: 0 0 6px; }
.jobs-find label { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.jobs-find .name { font-weight: 600; }
.jobs-find-q { grid-column: 1 / -1; }
.jobs-find-status select { width: 100%; }
@media (min-width: 720px) {
  .jobs-find { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
  .jobs-find-q { grid-column: auto; }
}
.stage-tabs {
  display: flex; overflow-x: auto; gap: 0; margin: 8px -16px 4px; padding: 0 16px;
  border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.stage-tabs::-webkit-scrollbar { display: none; }
.stage-tab {
  flex: 0 0 auto; min-height: var(--tap); padding: 0 14px; display: flex; align-items: center;
  border-bottom: 3px solid transparent; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.stage-tab:hover { color: var(--action); text-decoration: none; }
.stage-tab.on { border-bottom-color: var(--action); font-weight: 700; }
.job-rows { display: flex; flex-direction: column; }
.job-row {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 0; min-height: var(--tap);
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
a.job-row:hover { color: var(--ink); text-decoration: none; background: rgba(42, 93, 176, .04); }
.job-row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.job-row-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; }
.job-row-total { white-space: nowrap; font-weight: 600; }
.job-row-meta { color: var(--ink-soft); font-size: 14px; }

/* ---------- a job (Job board) ---------- */
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 4px; }
.job-head-facts { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 260px; }
.job-head-facts p { margin: 0; }
/* the bottom line: a white card that stays in view under the header */
.priceline {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px;
  margin: 12px 0 0; padding: 14px; border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--line); border-bottom: 0;
}
.priceline > * { min-width: 0; }
.priceline .pl-label { font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); margin-right: 6px; }
.priceline .pl-total-row { display: flex; justify-content: space-between; align-items: baseline; grid-column: 1 / -1; }
.priceline .pl-total { font-size: 22px; font-weight: 700; }
.priceline .pl-price .pl-label { font-weight: 500; color: var(--ink-soft); }
.priceline .pl-evidence, .priceline .pl-warn { grid-column: 1 / -1; font-size: 14px; }
.priceline .pl-evidence { color: var(--ink-soft); }
.priceline .pl-evidence.pl-gap { color: var(--attention); }
.priceline .pl-link { margin: 0; font-size: 14px; grid-column: 1 / -1; }
.priceline .pl-price { grid-column: 1 / -1; color: var(--ink-soft); }
.next-card {
  background: var(--card); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius); padding: 0 14px 14px; margin: 0 0 4px;
}
.next-card .btn-primary { width: 100%; }
@media (min-width: 720px) { .next-card .btn-primary { width: auto; } }

/* steps strip: one top rule per step, in the contractor's order */
.jobsteps {
  display: grid; grid-template-columns: repeat(5, minmax(108px, 1fr)); gap: 4px;
  margin: 16px 0 14px; overflow-x: auto;
}
.jobstep {
  display: block; min-height: var(--tap); padding: 8px 2px 6px; border: 0; border-radius: 0;
  border-top: 3px solid var(--line); background: transparent; color: var(--ink-soft);
}
.jobstep:hover { border-color: var(--action); color: var(--ink); }
.jobstep .num { display: none; }
.jobstep strong { font-size: 14px; color: var(--ink); }
.jobstep .status { font-size: 13px; line-height: 1.3; }
.jobstep.started, .jobstep.ready { border-top-color: var(--done); }
.jobstep.blocked { border-top-color: var(--attention); }
.jobstep.here { border-top-color: var(--action); box-shadow: none; }
.jobstep.here strong { color: var(--action); }

.price-update-note { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.job-section { margin: 18px 0; }
.job-section > h2, .job-col-head { font-size: 17px; margin: 18px 0 8px; }
.crew-card { background: transparent; }
.crew-issue { background: var(--attention-soft); border: 1px solid var(--attention); border-radius: var(--radius); }
.unit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px;
}
.unit-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; }
.unit-card-work { color: var(--ink-soft); }
.job-adds { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 4px 0 8px; }
.job-adds a { min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 600; }
.job-grid { align-items: start; }
.job-grid .card h3 { font-size: 16px; }
.job-gaps { margin-top: 4px; }
.job-tools { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-bottom: 14px; }
.job-tools a {
  min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; padding: 4px 0;
}
.job-tools a:hover { color: var(--action); text-decoration: none; }
.job-tools a.job-tools-sub { padding-left: 16px; font-size: 14px; }

/* ---------- Quote from a text, Walk, What I heard (Main, WalkRecord, WalkHeard boards) ---------- */
.draft-ask label.field, .walk-form label.field, .heard-form label.field { margin-bottom: 6px; }
.draft-ask textarea, .heard-form textarea { margin-bottom: 10px; }
.draft-photos { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 0 0 10px; padding: 10px 12px; }
.draft-photos legend { font-weight: 600; padding: 0 4px; }
.draft-photo { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.draft-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.draft-photo span { display: flex; gap: 6px; align-items: center; min-height: var(--tap); }
.draft-privacy { margin: 0 0 12px; }
.draft-alt { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.draft-unit {
  background: var(--card); border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; margin: 0 0 12px;
}
.draft-unit-head {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft); font-weight: 600;
}
.draft-line { border-top: 1px solid var(--line-soft); }
.draft-unit-head + .draft-line { border-top: 0; }
.draft-take { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; min-height: var(--tap); cursor: pointer; }
.draft-take input { margin-top: 1px; flex: 0 0 auto; }
.draft-evidence { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.draft-size { margin: 0 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.draft-size > label { font-weight: 600; }
.draft-size select { max-width: 240px; }
.draft-size.callout-gap { margin: 4px 14px 14px; }
.draft-check { margin: 0; }
.draft-size-ok { display: flex; gap: 8px; align-items: center; min-height: var(--tap); font-weight: 600; }
.draft-note { margin: 0 0 12px; }
.draft-note ul { margin: 6px 0 0; padding-left: 20px; }
/* the add bar stays at the bottom of the screen while the draft is long */
.draft-bar {
  position: sticky; bottom: 56px; z-index: 10; margin: 12px -16px 0; padding: 12px 16px 14px;
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.draft-bar-note { margin: 0; font-size: 14px; }
@media (min-width: 900px) { .draft-bar { bottom: 0; margin: 12px 0 0; border: 1px solid var(--line); border-radius: var(--radius); } }

.walk-form [hidden] { display: none !important; }
.walk-form > input[type="text"] { max-width: 220px; margin-bottom: 14px; }
.walk-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 16px; margin: 0 0 14px;
}
.walk-recorder, .walk-fallback { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.walk-status { margin: 0; text-align: center; font-weight: 700; font-size: 18px; }
.walk-big { min-height: 56px; font-size: 18px; width: 100%; }
.walk-kept {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.walk-kept p { margin: 0; line-height: 1.45; }
.walk-foot { text-align: center; margin: 14px 0 0; }
.walk-checks ul { margin: 6px 0 0; padding-left: 20px; }
.walk-checks p { margin: 6px 0 0; }
.heard-note { margin: 6px 0 10px; }

/* ---------- Add work (AddWork board) ---------- */
.work-search { margin: 0 0 14px; }
.work-search-label { display: block; font-weight: 600; margin-bottom: 6px; }
.work-search-row { display: flex; gap: 8px; align-items: center; }
.work-search-row input { flex: 1; min-width: 0; }
.work-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.work-chip {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px;
  border: 1px solid var(--input-line); border-radius: var(--radius); background: var(--card);
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.work-chip:hover { border-color: var(--action); color: var(--ink); text-decoration: none; }
.work-trade-name { text-transform: capitalize; }
.work-card .muted { display: block; }
.row-chevron { flex: 0 0 auto; color: var(--ink-soft); }
.work-form { max-width: 620px; }

/* ---------- Schedule (Schedule board) ---------- */
.week-nav { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.week-days { display: grid; gap: 4px 20px; }
@media (min-width: 900px) { .week-days { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.week-day { display: flex; flex-direction: column; margin: 0 0 14px; }
.week-day-head { font-size: 15px; margin: 0; padding: 0 0 6px; border-bottom: 2px solid var(--ink); }
.week-slot {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 0; min-height: var(--tap);
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
a.week-slot:hover { color: var(--ink); text-decoration: none; background: rgba(42, 93, 176, .04); }
.week-slot-who { font-weight: 700; }
.week-slot-meta { color: var(--ink-soft); font-size: 14px; }
.week-empty { margin: 8px 0 0; }
.sched-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
.sched-when .sched-date { grid-column: 1 / -1; }
.sched-crew { border: 0; padding: 0; margin: 4px 0 10px; }
.sched-crew legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.sched-crew-pick { display: flex; gap: 8px; align-items: center; min-height: var(--tap); }
.sched-block { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sched-block:last-child { border-bottom: 0; }

/* ---------- Bill a unit, Change order (Invoice, ChangeOrder boards) ---------- */
.bill-form, .co-card { max-width: 640px; }
.bill-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.bill-work { border: 0; padding: 0; margin: 0 0 14px; }
.bill-work legend { font-weight: 700; font-size: 17px; padding: 0; margin-bottom: 6px; }
.bill-line {
  display: flex; gap: 10px; align-items: center; min-height: var(--tap); padding: 8px 0;
  border-bottom: 1px solid var(--line-soft); cursor: pointer;
}
.bill-line:last-child { border-bottom: 0; }
.bill-note, .co-note { margin: 8px 0 0; }
.co-total {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700;
  padding: 10px 0; margin: 0 0 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.co-card ul { padding-left: 20px; }

/* ---------- Price book, Settings (RateCard, Settings boards) ---------- */
.book-links { margin: 0 0 12px; }
.book-find { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin: 14px 0; }
.book-find label { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.book-find .name { font-weight: 600; }
.book-find-q { grid-column: 1 / -1; }
@media (min-width: 720px) { .book-find { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; } .book-find-q { grid-column: auto; } }
.book-actions { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.book-panel > summary { list-style: none; cursor: pointer; }
.book-panel > summary::-webkit-details-marker { display: none; }
.book-panel[open] > summary { margin-bottom: 10px; border-color: var(--action); }
.settings-head { font-size: 17px; margin: 20px 0 8px; }
.settings-pay { border: 1px solid var(--line); border-radius: var(--radius-input); padding: 8px 12px; margin: 8px 0 14px; }
.settings-pay legend { font-weight: 600; padding: 0 4px; }
.settings-check { display: flex; gap: 8px; align-items: center; min-height: var(--tap); }

/* ---------- More, Customers, Crew (More, Customers, Crew boards) ---------- */
.admin-section > h2 { font-size: 17px; margin: 18px 0 8px; }
.menu-row > span:first-child { min-width: 0; }
.cust-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 4px;
}
.cust-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cust-name { font-weight: 700; color: var(--ink); word-break: break-word; }
.cust-job {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: var(--tap);
  border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none;
}
.cust-job:hover { color: var(--action); text-decoration: none; }
.cust-none { margin: 4px 0 0; }
.cust-manage { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; align-self: flex-start; }
.cust-plain { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
#invite { margin-top: 18px; max-width: 560px; }
.crew-link-card { display: flex; flex-direction: column; gap: 10px; }
.crew-link-card [hidden] { display: none !important; }
.crew-link-card h2 { margin: 0; }
.crew-link-note { margin: 0; }
.crew-link-share { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.crew-link-url { margin: 0; }
.crew-link-url .phone-url { max-width: none; }
.crew-link-status { margin: 0; min-height: 1em; }
.crew-link-qr > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 600; color: var(--action); }
.crew-link-qr .phone-qr-row { margin-top: 8px; align-items: center; }
.crew-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line-soft); }
.crew-row:first-child { border-top: 0; }
.crew-row-main { display: flex; flex-direction: column; min-width: 0; }
.crew-row-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.crew-row-actions form { margin: 0; }
.crew-add { margin-top: 18px; max-width: 560px; }
