/* FleurShine OS — back office, employee app and customer pages. Brand: brand/BRAND.md.
   Colors: navy #0B1F3A (main), red #B22234 (accent on white / light), red-bright #E63946 (large text, icons, borders
   on navy only), white, gray #F2F4F7. Nothing else, except navy tints and the three status colors below.
   Accessibility (WCAG 2.1 AA): links and buttons on light surfaces use #B22234 (6.6:1 on white); text on navy is
   white; white never sits on #E63946; every status badge carries its word; one clear focus ring everywhere. */
/* Brand fonts, self-hosted (static/fonts, SIL Open Font License) — the app's Content-Security-Policy allows only its own
   origin, so Google Fonts is not used here; the same TTF files are embedded in the PDFs. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Montserrat-Medium.af37bf893061.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Montserrat-SemiBold.bef57ba1c2f4.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/Montserrat-Bold.cf3a2eaec658.ttf") format("truetype"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/PlayfairDisplay-ExtraBold.d762d0853f17.ttf") format("truetype"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/PlayfairDisplay-Black.f3f459595a7a.ttf") format("truetype"); }
:root {
  --fs-navy: #0B1F3A; --fs-red: #B22234; --fs-red-bright: #E63946; --fs-white: #FFFFFF; --fs-gray: #F2F4F7;
  --fs-navy-2: #16325C;                                   /* navy tint: second bar, hover surfaces */
  /* status colors (approved): the word is always shown next to the color */
  --fs-status-paid-ink: #146C3A; --fs-status-paid-bg: #E6F4EC;
  --fs-status-pending-ink: #8A5A00; --fs-status-pending-bg: #FFF4D6;
  --fs-status-overdue-ink: #B22234; --fs-status-overdue-bg: #FBE9EB;
  --navy: var(--fs-navy); --navy-2: var(--fs-navy-2);
  --ink: var(--fs-navy); --muted: #56617a; --line: rgba(11,31,58,.16); --bg: var(--fs-gray); --card: #fff;
  --link: var(--fs-red); --field-line: #6b7a90; --focus: var(--fs-navy);
  --ok-bg: var(--fs-status-paid-bg); --ok-ink: var(--fs-status-paid-ink);
  --warn-bg: var(--fs-status-pending-bg); --warn-ink: var(--fs-status-pending-ink);
  --bad: var(--fs-status-overdue-ink); --bad-bg: var(--fs-status-overdue-bg);
  --font-body: "Montserrat", Arial, Helvetica, sans-serif; --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --r: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 500 16px/1.55 var(--font-body); color: var(--ink); background: var(--bg); }
a { color: var(--link); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-display); font-weight: 800; font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }   /* Playfair Display: H1/H2 only; lining figures so INV-000001 reads as digits */
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; margin-top: 1.8em; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
code { font: .95em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--fs-gray); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.wrap { width: min(100% - 32px, 1180px); margin-inline: auto; }
.narrow { max-width: 520px; margin-inline: auto; }
.muted { color: var(--muted); font-size: .9rem; }
.lead { color: var(--muted); max-width: 70ch; }
.empty { color: var(--muted); background: var(--card); border: 1px dashed var(--field-line); border-radius: var(--r); padding: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; color: var(--navy); font-weight: 700; padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
main { padding: 24px 0 48px; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.topbar :focus-visible { outline-color: #fff; }

/* top bar and navigation */
.topbar { background: var(--navy); color: #fff; --topbar-h: 60px; }
.topbar-settings { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; padding: 4px 2px; }
.topbar-settings:hover { text-decoration: underline; }
.topbar-settings .gear { font-size: 1.15em; }
.topbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; text-decoration: none; color: #fff; margin-right: auto; }
.brand-logo { height: 40px; width: auto; display: block; }   /* brand/logo/fleurshine-horizontal-dark.svg, as supplied */
.brand-shine { color: var(--fs-red-bright); } .brand-os { font-weight: 600; color: #fff; }
.search { display: flex; gap: 6px; flex: 1 1 260px; max-width: 460px; }
.search input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid #fff; font: inherit; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; min-width: 0; }
.who-name { color: rgba(255,255,255,.85); font-size: .9rem; }
.topbar .link-button { color: #fff; }
/* The main menu (templates/base.html): six sections — Today · Sales · Work · Money · Marketing · Settings.
   Phone: a Menu button under the top bar opens the list (static/js/nav.js closes it on load; without JS it stays open).
   Desktop (60em and up): the same list is a sidebar on the left, always open. */
.mainnav { background: var(--navy-2); color: #fff; }
.mainnav summary::-webkit-details-marker { display: none; }
.menu-toggle { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 16px; font-weight: 700; color: #fff; user-select: none; }
.menu-toggle:focus-visible { outline-color: #fff; outline-offset: -3px; }
.menu-icon { display: inline-block; width: 20px; height: 2px; background: #fff; position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: #fff; }
.menu-icon::before { top: -6px; } .menu-icon::after { top: 6px; }
.mainnav nav { padding: 4px 8px 12px; }
.navgroup { margin: 0; padding: 3px 0; }
.navgroup h2 { font: 700 .72rem/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.62); margin: 6px 8px 1px; }
.navgroup ul { list-style: none; margin: 0; padding: 0; }
.navgroup a { display: block; padding: 6px 10px; border-radius: 8px; color: #fff; text-decoration: none; font-weight: 600; border-left: 3px solid transparent; }
.navgroup a:hover { background: rgba(255,255,255,.08); }
.navgroup a[aria-current="page"] { background: rgba(255,255,255,.1); border-left-color: var(--fs-red-bright); }
.navgroup a.nav-call::before { content: "\260E\FE0E  "; }   /* ☎ telephone, text style */
.navgroup:has(a[aria-current="page"]) h2 { color: #fff; }
.shell { display: block; }
@media (min-width: 60em) {
  .topbar { position: sticky; top: 0; z-index: 5; }
  .topbar-row { flex-wrap: nowrap; height: var(--topbar-h); padding: 0; }
  .who { flex-wrap: nowrap; }
  .shell-nav { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 60px); }
  .mainnav { position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px); overflow-y: auto; overscroll-behavior: contain; }   /* its own scrollbar: every section, Settings included, without scrolling the page */
  .menu-toggle { display: none; }
  .mainnav nav { padding: 8px 10px 20px; }
  .shell-nav > main { width: auto; max-width: 1180px; margin-inline: 0; padding-inline: 28px; }
}
.pagefoot { color: var(--muted); font-size: .85rem; padding: 24px 0 8px; }
.btn-big { min-height: 54px; padding: 12px 24px; font-size: 1.12rem; border-radius: 10px; }
.actions-top { margin: 0; }
.page-head .actions-top { flex: 0 1 auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; border-radius: 8px; border: 2px solid var(--fs-red); background: var(--fs-red); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
@media (hover: hover) { .btn:hover { box-shadow: inset 0 0 0 100px rgba(11,31,58,.18); } }   /* darker red via a navy tint; mouse pointers only, so a tap never leaves a button looking pressed */
.btn-ghost { background: #fff; border-color: var(--navy); color: var(--navy); }
@media (hover: hover) { .btn-ghost:hover { background: var(--fs-gray); border-color: var(--navy); } }
.btn-small { min-height: 34px; padding: 5px 12px; font-size: .92rem; }
.link-button { background: none; border: 0; padding: 4px 2px; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.page-head h1, .page-head h2 { margin-bottom: .3em; }
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 6px; }

/* cards, layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(11,31,58,.06); }
.card > h2:first-child, .card > .page-head:first-child h2 { margin-top: 0; }
.columns, .cards { display: grid; gap: 16px; }
@media (min-width: 52em) { .columns { grid-template-columns: 1.2fr 1fr; align-items: start; } .cards { grid-template-columns: repeat(2, 1fr); } }
.plain { list-style: none; padding: 0; margin: 0; } .plain li { padding: 8px 0; border-bottom: 1px solid var(--line); } .plain li:last-child { border-bottom: 0; }
.facts { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 12px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.stats dt { color: var(--muted); font-size: .9rem; } .stats dd { margin: 0; font-size: 1.7rem; font-weight: 800; color: var(--navy); }
.note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--fs-red); border-radius: var(--r); padding: 12px 16px; margin-bottom: 10px; }
.note p { margin: 0 0 4px; }
.steps { padding-left: 1.3em; } .steps li { margin-bottom: 10px; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 6px; }
.secret { font-size: 1.05rem; letter-spacing: .08em; overflow-wrap: anywhere; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .codes code { font-size: 1.1rem; }

/* tables */
.table-wrap { position: relative; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--fs-gray); color: var(--navy); font-size: .9rem; white-space: nowrap; }
tbody th { font-weight: 600; } tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* tabs, tags, notices */
.tabs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; }
.tabs a { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--field-line); background: #fff; color: var(--navy); text-decoration: none; font-weight: 600; font-size: .93rem; }
.tabs a[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.count { font-weight: 400; opacity: .85; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--fs-gray); color: var(--navy); border: 1px solid var(--line); }
/* money status badges (brand): the kind comes only from apps/billing/status.py ({% status_badge %}), never from a status
   name in a template. paid / pending (awaiting payment) / overdue; the word is always in the badge, overdue adds ⚠. */
.tag-status-paid, .tag-ok { background: var(--fs-status-paid-bg); color: var(--fs-status-paid-ink); border-color: transparent; }
.tag-status-pending, .tag-warn { background: var(--fs-status-pending-bg); color: var(--fs-status-pending-ink); border-color: transparent; }
.tag-status-overdue { background: var(--fs-status-overdue-bg); color: var(--fs-status-overdue-ink); border-color: transparent; }
.tag-status-overdue::before { content: "\26A0\FE0E "; }   /* ⚠ alert icon, text style */
.tag-converted { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.tag-new { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.tag-muted, .tag-lost, .tag-no_response { background: var(--fs-gray); color: var(--muted); }
.notice { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--fs-navy); border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; }
.notice p:last-child { margin-bottom: 0; }
.notice-warn { background: var(--warn-bg); border-color: rgba(138,90,0,.45); border-left-color: var(--warn-ink); color: var(--warn-ink); } .notice-warn a { color: var(--warn-ink); }
.messages { margin-bottom: 16px; }
.message { padding: 10px 14px; border-radius: 8px; background: var(--ok-bg); color: var(--ok-ink); border: 1px solid rgba(20,108,58,.4); font-weight: 600; }
.message-error { background: var(--bad-bg); color: var(--bad); border-color: rgba(178,34,52,.4); }

/* forms */
.form-grid { display: grid; gap: 14px; }
@media (min-width: 44em) { .form-grid { grid-template-columns: 1fr 1fr; } .field-wide, .field-check { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-weight: 700; color: var(--navy); }
.field input, .field select, .field textarea { font: inherit; padding: 10px; border: 1px solid var(--field-line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; min-height: 44px; }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: var(--fs-gray); color: var(--muted); }
.field-check { flex-direction: row; align-items: center; gap: 10px; } .field-check input { width: 22px; height: 22px; min-height: 0; }
.field-bad input, .field-bad select, .field-bad textarea, [aria-invalid="true"] { border: 2px solid var(--bad); }
.field-error { color: var(--bad); font-weight: 700; font-size: .92rem; margin: 0; }
.field-error::before { content: "⚠ "; }
.form-errors { background: var(--bad-bg); border: 1px solid rgba(178,34,52,.4); color: var(--bad); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-weight: 700; }
.form-errors p { margin: 0; }
.hint { color: var(--muted); font-size: .88rem; margin: 0; }
.req { color: var(--fs-red); }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; } .filters .actions { margin-top: 0; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--line); }
.timeline li { padding: 6px 0 10px 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 12px; width: 13px; height: 13px; border-radius: 50%; background: var(--fs-navy); border: 2px solid #fff; }
.timeline time { display: block; color: var(--muted); font-size: .85rem; }
.changes { margin: 6px 0 0; } .changes dt { font-weight: 700; } .changes dd { margin: 0 0 6px; overflow-wrap: anywhere; }
.old { color: var(--bad); text-decoration: line-through; } .new { color: var(--ok-ink); }
.pagination { display: flex; gap: 16px; align-items: center; margin: 12px 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------------- Phase 2: quotes, price book, policies, customer pages ---------------- */
h4 { font-size: .95rem; color: var(--navy); margin: .8em 0 .3em; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.group { border: 1px solid var(--line); padding: 16px 18px 18px; }
fieldset.group > legend { font-weight: 800; color: var(--navy); font-size: 1.1rem; padding: 0 6px; }
fieldset.checks { grid-column: 1 / -1; }   /* rows: see "Option rows" below */
@media (min-width: 60em) { .form-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.result { border-left: 5px solid var(--fs-red); }
.result:focus { outline: none; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); margin-top: 0; }
.agreement { white-space: normal; overflow-wrap: anywhere; background: #fff; border: 1px solid var(--field-line); border-radius: 8px; padding: 14px 16px; max-height: 26rem; overflow-y: auto; font-size: .95rem; }
.price-table { margin: 0 0 12px; } .price-table th { font-weight: 400; } .price-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-table tr.total th, .price-table tr.total td { font-weight: 800; font-size: 1.15rem; border-top: 2px solid var(--navy); color: var(--navy); }
.disclaimer { color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); padding-top: 10px; }
.progress { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 0; margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
.progress li:not(:last-child)::after { content: "›"; margin-left: 8px; }
.progress li[aria-current] { color: var(--navy); }
.photos { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.photos img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.photos span { font-size: .88rem; color: var(--muted); }
.edit-table td.field { display: table-cell; } .edit-table input, .edit-table select { min-width: 90px; }
.edit-table input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; min-width: 0; }
details { margin: 10px 0; } summary { cursor: pointer; font-weight: 700; color: var(--link); padding: 4px 0; }
.tag-needs_review, .tag-changes_requested, .tag-deposit_pending, .tag-sent, .tag-viewed { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.tag-approved, .tag-deposit_paid { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.tag-declined, .tag-expired, .tag-void, .tag-draft, .tag-ready { background: var(--fs-gray); color: var(--muted); }
.narrow-page { max-width: 780px; }
.public .brand { font-size: 1.1rem; } .public .brand-os { font-size: .95rem; }
.public .brand-logo { height: 34px; }
.phone { color: #fff; font-weight: 700; }

/* ---------------- Phase 3: invoices, payments, ledger ---------------- */
.mode { display: inline-block; padding: 6px 12px; border-radius: 8px; font-size: .9rem; margin: 0 0 14px; border: 1px solid var(--field-line); background: #fff; }
.mode-fake, .mode-test { background: var(--warn-bg); color: var(--warn-ink); border-color: rgba(138,90,0,.45); }
.mode-off { background: var(--fs-gray); color: var(--muted); }
.mode-live { background: var(--ok-bg); color: var(--ok-ink); border-color: rgba(20,108,58,.4); }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total th, tr.total td { font-weight: 800; border-top: 2px solid var(--navy); }
.consent-box { background: var(--fs-gray); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.consent-text { margin: 6px 0 12px; }

/* Phase 4 — employee app (phones first): big touch targets, one column */
body.field .wrap { width: min(100% - 24px, 640px); }
body.field .btn { min-height: 48px; padding-inline: 18px; font-size: 1.05rem; }
.jobcard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; color: var(--ink); text-decoration: none; }
.jobcard:hover { border-color: var(--field-line); }
.jobcard strong { color: var(--navy); font-size: 1.1rem; }
.jobcard, .field-links li, body.field .lead { overflow-wrap: anywhere; }
.bigactions { display: grid; gap: 10px; margin: 14px 0; }
.bigactions form, .bigactions .btn { width: 100%; }
.bigactions .btn { width: 100%; text-align: center; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .done { color: var(--muted); text-decoration: line-through; }
.code-reveal { font: 700 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: var(--navy); background: var(--warn-bg); border-radius: var(--r); padding: 12px 16px; display: inline-block; }
.cal-day { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 12px; }
.cal-day h3 { margin: 0 0 6px; }
.cal-item { padding: 6px 0; border-top: 1px dashed var(--line); }
.cal-item:first-of-type { border-top: 0; }
.problems { margin: 0 0 12px; padding-left: 1.2em; }

/* Time screen (Phase 4) */
.waiting-item { border-top: 1px solid var(--line); padding: 12px 0; }
.waiting-item:first-of-type { border-top: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input { flex: 1 1 12rem; min-width: 0; }

/* Messages (Phase 4) */
.message-body { white-space: pre-wrap; font: inherit; background: var(--bg); border-radius: var(--r); padding: 10px 12px; margin: 8px 0; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Customer portal (Phase 5) */
.portal-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.portal-nav .tabs { margin: 0; }
.policy-text { max-height: 18rem; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 12px 0; background: var(--bg); }

.copyable { overflow-wrap: anywhere; user-select: all; }

.row-head { background: var(--bg); text-align: left; }

.h3 { font-size: 1.05rem; margin-top: 0; }

select { max-width: 100%; }
.filters { flex-wrap: wrap; }

.restock-row { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.restock-row legend { font-weight: 600; width: 100%; }
.restock-row input { width: 5rem; }

.offline-banner { background: var(--warn-bg); padding: 10px 14px; border-radius: var(--r); margin-top: 12px; }
.offline-banner[hidden] { display: none; }

.field-links { display: flex; flex-wrap: wrap; gap: 6px 16px; } .field-links li { border: 0; padding: 4px 0; }

/* "Please read before you approve": the customer's quote page and signing page (apps/legal/services.py KEY_TERMS) */
.key-terms { background: #fff; border: 1px solid var(--navy); border-left: 6px solid var(--fs-red); border-radius: var(--r); padding: 14px 18px; margin: 0 0 18px; }
.key-terms h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--fs-red); }
.key-terms ul { margin: 0; padding-left: 1.2em; } .key-terms li { margin: 4px 0; font-weight: 600; }

/* Option rows: a radio or checkbox group (Django's RadioSelect / CheckboxSelectMultiple) renders one row per choice, the
   control on the same line as its words, the whole row clickable, the chosen row highlighted. */
fieldset.choices { grid-column: 1 / -1; }
fieldset.choices > legend, fieldset.checks > legend { font-weight: 700; color: var(--navy); padding: 0; margin-bottom: 8px; }
fieldset.choices > div, fieldset.checks > div { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 44em) { fieldset.checks > div { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
fieldset.choices label, fieldset.checks label { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 12px; min-height: 48px; border: 1px solid var(--field-line); border-radius: 8px; background: #fff; font-weight: 500; color: var(--ink); cursor: pointer; }
fieldset.choices input, fieldset.checks input { width: 22px; height: 22px; min-height: 0; min-width: 0; margin: 0; flex: none; accent-color: var(--fs-red); }
fieldset.choices label:has(input:checked), fieldset.checks label:has(input:checked) { border-color: var(--navy); background: var(--fs-gray); box-shadow: inset 0 0 0 1px var(--navy); font-weight: 700; }
fieldset.choices label:has(input:focus-visible), fieldset.checks label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.field input[type="radio"], .field input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; }
.photo-reminder { margin: 10px 0 0; }
.photo-reminder[hidden] { display: none; }

/* Settings › All settings (templates/settings/hub.html) */
.hub-links li, .hub-status li { display: grid; gap: 2px; }
.hub-links a { font-weight: 700; }
.hub-status li { grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; }
.hub-status li .muted { grid-column: 2; }
.tag-state-on { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.tag-state-test { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.tag-state-off { background: var(--fs-gray); color: var(--muted); }

/* Phone call mode (templates/crm/phone_call.html + static/js/phone-call.js): the question is the first thing on the
   screen, so the menu and the search are tucked away for the length of the call */
body.call-mode .mainnav, body.call-mode .search { display: none; }
body.call-mode .shell-nav { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60em) { body.call-mode .shell-nav > main { margin-inline: auto; } }
.call .call-step > legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; font-variant-numeric: lining-nums; }
.call .call-step .form-grid { clear: both; }
.call .form-grid { grid-template-columns: 1fr; }
.call .call-nav .btn { min-height: 48px; font-size: 1.05rem; }
.call-js .call-step[hidden] { display: none; }
@media (min-width: 44em) { .call .form-grid { grid-template-columns: 1fr 1fr; } }


/* Cleaner rating page (templates/ratings/rate.html): big tappable stars, mobile first */
.stars-group { border: 0; padding: 0; margin: 0 0 14px; }
.stars-group > legend { font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.stars label { font-size: 2.6rem; line-height: 1; color: #C9D0DC; cursor: pointer; padding: 4px; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--fs-red); }
.stars input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.rate .field textarea { width: 100%; }

/* ---- Calculator (templates/crm/_calculator.html): chips, steppers, tiles, price box and the fixed price bar ---- */
.calc-block { margin: 0 0 18px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.calc-block:last-of-type { border-bottom: 0; }
.calc-block > h3 { margin: 0 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 2px solid var(--field-line); border-radius: 999px; background: #fff; font-weight: 600; color: var(--navy); cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip.on, .chip:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.chips-tall .chip { border-radius: 12px; flex: 1 1 100%; }
@media (min-width: 44em) { .chips-tall .chip { flex: 1 1 45%; } }
.steppers { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 8px; }
.stepper label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.stepper-row { display: flex; align-items: center; gap: 6px; }
.stepper-row input { width: 4.5rem; min-height: 44px; text-align: center; font: inherit; font-weight: 700; padding: 6px; border: 1px solid var(--field-line); border-radius: 8px; -moz-appearance: textfield; }
.stepper-row input::-webkit-outer-spin-button, .stepper-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-row .btn { min-width: 44px; min-height: 44px; padding: 0; font-size: 1.3rem; line-height: 1; }
.stepper-small .btn { min-width: 38px; min-height: 38px; } .stepper-small input { width: 3.2rem; min-height: 38px; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 8px 0; }
.tile { border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.tile.on { border-color: var(--navy); background: #f4f6fa; }
.tile-face { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; border: 0; background: none; padding: 4px; font: inherit; color: var(--navy); text-align: left; cursor: pointer; min-height: 44px; }
.tile-name { font-weight: 700; } .tile-price { color: var(--muted); font-size: .95rem; } .tile-price small { font-size: .75rem; }
.tile .stepper-row { justify-content: center; }
.tile:not(.on) .stepper-row { display: none; }
.call-js .tile input { font-weight: 800; }
.custom-lines { display: grid; gap: 10px; }
.custom-line { display: grid; grid-template-columns: 1fr 7rem; gap: 10px; }
.pricebox .lines { width: 100%; border-collapse: collapse; margin: 6px 0; }
.pricebox .lines th { font-weight: 500; text-align: left; padding: 6px 0; } .pricebox .lines td { text-align: right; padding: 4px 0; white-space: nowrap; }
.pricebox .lines input, .total-edit input { width: 6.5rem; min-height: 40px; text-align: right; font: inherit; font-weight: 700; padding: 6px 8px; border: 1px solid var(--field-line); border-radius: 8px; }
.pricebox .lines input.edited, .total-edit input.edited { border: 2px solid var(--warn-ink); background: var(--warn-bg); }
.calc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0; }
.calc-total { font-weight: 800; font-size: 1.15rem; border-top: 2px solid var(--navy); padding-top: 8px; color: var(--navy); }
.total-edit { display: inline-flex; align-items: center; gap: 8px; } .total-edit .muted { text-decoration: line-through; font-weight: 500; font-size: .95rem; }
.recurring-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.recurring-list li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.recurring-list li.on { border-color: var(--navy); background: #f4f6fa; }
.recurring-list .rl-price { display: block; font-weight: 800; font-size: 1.15rem; color: var(--navy); }
.recurring-list .rl-disc { color: var(--ok-ink); font-size: .85rem; }
.owner-panel { border: 1px dashed var(--warn-ink); border-radius: 10px; padding: 8px 12px; background: var(--warn-bg); margin-top: 10px; }
.owner-panel summary { font-weight: 700; color: var(--warn-ink); cursor: pointer; }
.pricebar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px -18px -18px; padding: 10px 18px; background: var(--navy); color: #fff; border-radius: 0 0 var(--r) var(--r); z-index: 3; }
.pricebar-label { font-size: .9rem; opacity: .85; } .pricebar [data-bar-total] { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.pricebar .muted { color: rgba(255,255,255,.8); font-size: .88rem; }
.call-js .call-calc { padding-bottom: 0; }
.call-saved { font-size: .85rem; text-align: right; min-height: 1.2em; }
.call-js [data-flat][hidden], .call-js [data-hourly][hidden], .call-js [data-custom][hidden], .call-js [data-reason][hidden] { display: none; }
.owner-panel .facts { grid-template-columns: 1fr; gap: 2px 0; }           /* a phone: label above its figure */
.owner-panel .facts dd { margin-bottom: 8px; font-weight: 700; overflow-wrap: normal; }
@media (min-width: 44em) { .owner-panel .facts { grid-template-columns: minmax(180px, auto) 1fr; gap: 6px 16px; } .owner-panel .facts dd { margin-bottom: 0; } }
