/* BookLean: warehouse-signage look. Asphalt nav, safety-yellow accent, condensed headings. */
[hidden] { display: none !important; } /* anything marked hidden stays hidden, whatever else styles it */
:root {
  --asphalt: #23272c;
  --asphalt-2: #2f343a;
  --line: #d9dcdf;
  --ground: #f1f2f0;
  --card: #ffffff;
  --ink: #1b1e21;
  --muted: #5d646b;
  --safety: #f2c100;
  --safety-ink: #2a2200;
  --ok-bg: #e3f3e6; --ok-ink: #1d5e2f;
  --warn-bg: #fff1d1; --warn-ink: #7a4b00;
  --off-bg: #e9eaeb; --off-ink: #4b5157;
  --err-bg: #fde7e5; --err-ink: #8e1f17;
  --link: #0b5cad;
  --accent2: #1d4a8c;
  --soft: #f6f7f8;
  --soft-2: #e6e8ea;
  --tint: #e6eefb;
  --input-line: #b9bec3;
  --bar: #6f8fc4;
  --note-bg: #fff7e0;
  --r: 6px;
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: var(--link); }
h1, h2, h3 { font-family: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif; font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; margin-top: 1.8em; }
h3 { font-size: 1.1rem; }
p { max-width: 70ch; }
:focus-visible { outline: 3px solid var(--safety); outline-offset: 2px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: stretch; gap: 8px; background: var(--asphalt); color: #fff; padding: 0 clamp(10px, 3vw, 28px); min-height: 64px; }
.brand { font-family: "Barlow Semi Condensed", sans-serif; font-weight: 700; font-size: 1.3rem; color: #fff; text-decoration: none; display: flex; align-items: center; padding-right: 18px; margin-right: 6px; border-right: 1px solid #3d434a; }
nav.primary { display: flex; align-items: stretch; flex: 1; }
nav.primary a, .menu summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 76px; padding: 8px 10px 6px; color: #c9cfd4; text-decoration: none; font-size: .78rem; border-bottom: 3px solid transparent; cursor: pointer; }
nav.primary a:hover, .menu summary:hover { color: #fff; background: var(--asphalt-2); }
nav.primary a.on, .menu summary.on { color: #fff; border-bottom-color: var(--safety); font-weight: 600; }
.ico { width: 24px; height: 24px; }
.tools { display: flex; align-items: stretch; }
.menu { position: relative; display: flex; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--asphalt-2); color: #fff; }
.panel { position: absolute; right: 0; top: 100%; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); box-shadow: 0 10px 30px rgba(20, 24, 28, .18); padding: 16px 18px; min-width: 220px; }
.panel-wide { display: grid; grid-template-columns: repeat(2, minmax(170px, 1fr)); gap: 6px 28px; }
.panel h4 { font-size: .85rem; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.panel a { display: block; padding: 6px 0; color: var(--ink); text-decoration: none; }
.panel a:hover { color: var(--link); text-decoration: underline; }
.panel a.on { font-weight: 600; box-shadow: inset 3px 0 0 var(--safety); padding-left: 10px; }
.panel .who { margin: 0 0 12px; }
main { padding: 28px clamp(16px, 4vw, 44px) 60px; max-width: 1180px; width: 100%; margin: 0 auto; }

.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { margin: 0; }
.crumb { font-size: .95rem; margin-bottom: 6px; }

/* Buttons */
.btn { display: inline-block; font: inherit; font-weight: 600; padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--asphalt); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--safety); border-color: color-mix(in srgb, var(--safety) 78%, #000); color: var(--safety-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--safety) 85%, #fff); }
.btn.danger { border-color: #b4291f; color: #b4291f; }
.btn.small { padding: 5px 10px; font-size: .9rem; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; font: inherit; }
.linkbtn.danger { color: #b4291f; }

/* Messages */
.flash { padding: 12px 16px; border-radius: var(--r); margin-bottom: 14px; background: var(--ok-bg); color: var(--ok-ink); }
.flash.error { background: var(--err-bg); color: var(--err-ink); }
.empty { background: var(--card); border: 1px dashed var(--input-line); border-radius: var(--r); padding: 28px; text-align: center; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; background: var(--soft); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--soft); display: block; } /* square, like the item photos */

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.pill.active, .pill.confirmed { background: var(--ok-bg); color: var(--ok-ink); }
.pill.maintenance, .pill.hold { background: var(--warn-bg); color: var(--warn-ink); }
.pill.retired, .pill.cancelled, .pill.hidden { background: var(--off-bg); color: var(--off-ink); }

/* Forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.wide { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .95rem; }
.hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=tel], input[type=search], select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--input-line); border-radius: var(--r); background: var(--card); width: 100%; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select { width: auto; min-width: 160px; }
.price-row { display: flex; align-items: center; gap: 6px; }
.price-row span { color: var(--muted); }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.photo { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo .bar { display: flex; justify-content: space-between; padding: 6px 8px; font-size: .85rem; }
.photo.cover { outline: 3px solid var(--safety); }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--asphalt); }
.auth .card { width: 100%; max-width: 400px; }
.auth h1 { font-size: 1.6rem; }
.auth .field { margin-bottom: 14px; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 0 6px; }
  .brand { border-right: 0; padding: 10px 6px; flex: 1; }
  .tools { order: 2; }
  nav.primary { order: 3; width: 100%; flex-basis: 100%; overflow-x: auto; border-top: 1px solid #3d434a; }
  nav.primary a, .menu summary { min-width: 64px; padding: 6px 6px 4px; }
  .panel-wide { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 1.6rem; }
}

/* Categories */
.inline-add { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-add .field { flex: 1 1 260px; }
input.narrow { width: 80px; text-align: right; }
.row-actions { display: flex; gap: 14px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.field-link { font-size: .9rem; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--asphalt); border-radius: var(--r); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.stat:hover { border-left-color: var(--safety); }
.stat b { display: block; font-family: "Barlow Semi Condensed", sans-serif; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat.warn { border-left-color: #d08a00; }
.steps { padding-left: 1.2em; }
.steps li { margin: 6px 0; }
.steps li.done { color: var(--muted); text-decoration: line-through; }

/* Unit locations */
.loc-checks { border: 0; padding: 0; margin: 0; min-width: 0; }
.loc-checks legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 4px 0; }

/* Brands */
.logo-thumb { max-width: 90px; max-height: 40px; display: block; }
.logo-preview { max-width: 200px; max-height: 80px; display: block; margin: 4px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: .8rem; background: var(--off-bg); color: var(--off-ink); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }

/* Events */
.filters input[type=search].search { flex: 1 1 260px; width: auto; }
.filters input[type=date] { width: auto; }
.filter-link { align-self: center; font-size: .95rem; }
.conflict { color: var(--err-ink); background: var(--err-bg); font-weight: 600; font-size: .85rem; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.quote { background: var(--soft-2); color: var(--ink); }
.pill.contracted { background: var(--tint); color: var(--accent2); }
.pill.confirmed { background: var(--ok-bg); color: var(--ok-ink); }
.status-form { display: inline-flex; gap: 6px; align-items: center; }
.status-form select { width: auto; }
.pill.completed { background: var(--soft-2); color: #3a3f44; }
.pill.cancelled { text-transform: uppercase; letter-spacing: .03em; }
.head h1 .pill { vertical-align: middle; margin-left: 8px; font-family: "Barlow", sans-serif; }
table.lines select { min-width: 200px; }
table.lines input.price { width: 100px; }
.totals { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 4px 28px; margin: 18px 0 0; font-variant-numeric: tabular-nums; }
.totals dt { color: var(--muted); text-align: right; }
.totals dd { margin: 0; text-align: right; min-width: 100px; }
.totals .grand { font-weight: 700; color: var(--ink); font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 6px; }

/* Status tabs, like IO's row across the top of an event */
.status-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 4px 0 22px; border-bottom: 1px solid var(--line); }
.status-tabs .tab { font: inherit; font-family: "Barlow Semi Condensed", "Barlow", sans-serif; font-weight: 600; font-size: 1.05rem; letter-spacing: .03em; text-transform: uppercase;
  background: none; border: 0; border-bottom: 4px solid transparent; padding: 10px 14px 8px; margin-bottom: -1px; cursor: pointer; color: var(--tab, var(--muted)); }
.status-tabs .tab:hover:not(:disabled) { background: var(--card); border-bottom-color: color-mix(in srgb, var(--tab) 35%, transparent); }
.status-tabs .tab.on { border-bottom-color: var(--tab); color: var(--tab); cursor: default; }
.status-tabs .tab:disabled:not(.on) { cursor: not-allowed; opacity: .5; }
.tab-cancelled { --tab: #6b7177; }
.tab-quote { --tab: var(--ink); }
.tab-contracted { --tab: var(--accent2); }
.tab-confirmed { --tab: #2e7d32; }
.tab-completed { --tab: #3a3f44; }
.inline-input { display: flex; gap: 8px; align-items: center; }
.inline-input input { flex: 1; min-width: 0; }
table.tiers select { min-width: 240px; }
table.tiers input.narrow { width: 90px; }
.examples { margin-top: 10px; }
.examples summary { cursor: pointer; color: var(--link); }
.examples ul { margin: 8px 0 0; padding-left: 1.2em; }

/* Sub-page tabs (Delivery charges: Mileage ranges | Special addresses) */
.page-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 4px 0 20px; }
.page-tabs a { font-family: "Barlow Semi Condensed", "Barlow", sans-serif; font-weight: 600; font-size: 1.02rem; letter-spacing: .03em; text-transform: uppercase;
  padding: 8px 14px; color: inherit; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.page-tabs a:hover { border-bottom-color: color-mix(in srgb, #f2c100 45%, transparent); }
.page-tabs a.on { border-bottom-color: #f2c100; }

/* Events list: status words in color (the word always says it, color is extra) */
.status { font-weight: 600; white-space: nowrap; }
.st-quote { color: var(--ink); }
.st-contracted { color: var(--accent2); }
.st-confirmed { color: #2e7d32; }
.st-completed { color: #3a3f44; }
.st-cancelled { color: #6b7177; text-transform: uppercase; letter-spacing: .04em; }
table.events tr.is-cancelled td { color: #6b7177; background: var(--soft); }
table.events tr.is-cancelled td a { color: #4b6f99; }
table.events tr.is-cancelled del { text-decoration-thickness: 2px; }
/* Bold until you've opened it (per person), like IO */
table.events tr.unread td, table.events tr.unread td a { font-weight: 700; }
table.events td.flags { white-space: nowrap; }
table.events td.flags > * + * { margin-left: 4px; }

/* Flags: red flag for problems, orange paper check for a check hold */
.flag { display: inline-flex; align-items: center; gap: 3px; color: var(--err-ink); background: var(--err-bg); font-weight: 600; font-size: .85rem; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.checkhold { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .85rem; padding: 2px 8px 2px 6px; border-radius: 4px; white-space: nowrap;
  background: #f7a928; color: var(--ink); border: 1px solid #b86e00; }
.checkhold.expired { background: #c62828; color: #fff; border-color: #8e1f17; }
.checkhold .ico { flex: none; }
.flash.warn { background: var(--warn-bg); color: var(--warn-ink); }
.hold-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hold-actions { display: inline-flex; gap: 8px; margin-left: auto; }
.viewed-log { margin: 0 auto 6px; text-align: center; max-width: none; }
fieldset.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
fieldset.checks legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 6px; width: 100%; }
fieldset.checks .hint { width: 100%; }

/* Hover an event row to see its rental items (one floating box, so the table can't clip it) */
.items-pop { display: none; }
#items-float { position: fixed; z-index: 50; min-width: 220px; max-width: 320px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--safety); border-radius: var(--r);
  padding: 8px 12px; box-shadow: 0 6px 18px rgba(0,0,0,.14); font-weight: 400; font-size: .92rem; line-height: 1.4; pointer-events: none; }
#items-float[hidden] { display: none; }
#items-float strong { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
#items-float ul { margin: 0; padding-left: 1.1em; }
#items-float p { margin: 0; color: var(--muted); }

/* ---------- Event page, laid out like IO: name on top, date bar, two columns ---------- */
.ev-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 0 0 4px; }
.ev-back { font-size: .95rem; justify-self: start; }
.ev-title { margin: 0; text-align: center; text-transform: uppercase; letter-spacing: .03em; font-size: 2rem; color: var(--accent2); }
.ev-num { justify-self: end; font-family: "Barlow Semi Condensed", "Barlow", sans-serif; font-weight: 600; font-size: 1.25rem; color: var(--accent2); display: flex; gap: 12px; align-items: baseline; }
.ev-num .linkbtn { font-size: .9rem; font-family: "Barlow", sans-serif; }
.ev-form { padding-bottom: 76px; }
.ev-form input[type=text], .ev-form input[type=email], .ev-form input[type=tel], .ev-form input[type=number], .ev-form input[type=date], .ev-form input[type=time], .ev-form select, .ev-form textarea { padding: 5px 8px; font-size: .95rem; border-color: var(--input-line); }
.ev-form textarea { min-height: 54px; }
.ev-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; align-items: center; background: var(--bar); color: #fff; border-radius: var(--r); padding: 10px 14px; margin-bottom: 18px; }
.ev-when, .ev-where { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ev-bar input[type=date] { width: 160px; } .ev-bar input[type=time] { width: 120px; }
.ev-bar select { width: auto; min-width: 170px; }
.ev-bar .check { color: #fff; font-weight: 600; }
.ev-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.ev-left { padding: 12px 16px 16px; border-right: 2px solid var(--asphalt); }
.ev-right { padding: 12px 16px 16px; }
@media (max-width: 1000px) { .ev-cols { grid-template-columns: minmax(0, 1fr); } .ev-left { border-right: 0; border-bottom: 2px solid var(--asphalt); } }

table.ev-lines th, table.ev-lines td { padding: 4px 6px; background: none; }
table.ev-lines th { color: var(--ink); font-size: .9rem; border-bottom: 1px solid var(--asphalt); }
table.ev-lines select { min-width: 0; width: 100%; }
table.ev-lines input.tiny, .ev-form input.tiny { width: 58px; text-align: right; }
table.ev-lines input.price { width: 92px; text-align: right; }
table.ev-lines td.rm { width: 1%; }
.ev-addline { display: block; width: 100%; margin: 4px 0 12px; padding: 4px; font: inherit; font-size: .9rem; color: var(--link); background: var(--soft); border: 1px dashed var(--input-line); border-radius: var(--r); cursor: pointer; }
.ev-addline:hover { background: var(--tint); }
/* "Remove" as a small trash-style toggle */
.rm-box { display: inline-flex; align-items: center; cursor: pointer; font-weight: 400; }
.rm-box input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rm-box span { font-size: .78rem; color: #b4291f; border: 1px solid #e0b4b0; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.rm-box input:checked + span { background: #b4291f; color: #fff; border-color: #b4291f; }
.rm-box input:focus-visible + span { outline: 3px solid var(--safety); outline-offset: 2px; }
.rm-space { width: 62px; }

.ledger { border-top: 2px solid var(--asphalt); }
.lg-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px; border-bottom: 1px solid var(--line); min-height: 34px; font-variant-numeric: tabular-nums; }
.lg-row > b { font-weight: 600; white-space: nowrap; }
.lg-row .check { font-weight: 400; }
.lg-strong { background: var(--soft); font-weight: 700; }
.lg-strong b { font-weight: 700; }
.lg-total { background: var(--soft); font-size: 1.1rem; font-weight: 700; border-top: 1px solid var(--input-line); }
.lg-total b { font-weight: 700; }
.lg-due, .lg-due b { color: #b4291f; font-weight: 700; }
.lg-in { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.lg-money { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.lg-money input { width: 104px !important; text-align: right; }
.lg-fee .fee-name { flex: 1; min-width: 0; }
.lg-fee .tax-box { font-size: .85rem; color: var(--muted); }
.lg-tax { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.lg-tax .pct { display: inline-flex; align-items: center; gap: 3px; }
.lg-select { width: 160px !important; }
.ok-ink { color: var(--ok-ink); }

.frm { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 10px; align-items: center; align-content: start; }
.frm label { font-size: .92rem; }
.frm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.ev-pair { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px 22px; margin-bottom: 10px; }
/* One column always: the page is capped at 1500px, so two side by side left every field too narrow for its text. */
.ev-pair { grid-template-columns: minmax(0, 1fr); }
/* When the details column is narrow (a smaller laptop), labels sit above their fields so long values fit. */
.ev-right { container-type: inline-size; container-name: evright; }
@container evright (max-width: 500px) {
  .frm { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .frm label { margin-top: 6px; }
  .frm > span:empty { display: none; }
}
.ev-sub { display: block; margin: 8px 0 4px; font-size: .92rem; }
.ev-crewinfo { background: var(--note-bg); border-left: 4px solid var(--safety); padding: 6px 10px; margin: 0 0 8px; font-size: .92rem; max-width: none; }
.ev-tabhead { margin: 18px 0 10px; padding: 0 14px 6px; display: inline-block; border-bottom: 4px solid #2e7d32; text-transform: uppercase; letter-spacing: .03em; font-family: "Barlow Semi Condensed", "Barlow", sans-serif; font-weight: 600; color: var(--muted); }
.ev-tabhead small { font-size: .85em; }

.ev-savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 24px; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
.ev-savebar-right { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-danger { display: flex; gap: 18px; justify-content: flex-end; margin: 12px 0 90px; font-size: .9rem; }
main:has(.ev-form) { max-width: 1500px; }
/* Pages that mark themselves wide use nearly the whole window (big tables, card grids). */
main:has(.wide-page) { max-width: 1600px; }

/* Item picker on quotes: categories first, or type to search */
.ipick { position: relative; min-width: 220px; }
.ipick-input { cursor: pointer; }
table.ev-lines .ipick { min-width: 150px; }
textarea.ipick-input { display: block; width: 100%; resize: none; overflow: hidden; min-height: 0; line-height: 1.35; font-family: inherit; }
.ev-form textarea.ipick-input { min-height: 0; }
.ipick-input:focus { cursor: text; }
.ipick-panel { position: fixed; z-index: 60; overflow-y: auto; background: var(--card); border: 1px solid var(--input-line); border-top: 3px solid var(--safety); border-radius: var(--r); box-shadow: 0 8px 22px rgba(0,0,0,.16); padding: 4px 0; }
.ipick-panel[hidden] { display: none; }
.ip-head { margin: 6px 12px 2px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ip-opt { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; text-align: left; font: inherit; font-size: .95rem; padding: 7px 12px; border: 0; background: none; cursor: pointer; color: var(--ink); }
.ip-opt small { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.ip-opt:hover, .ip-opt.on { background: var(--tint); }
.ip-cat { font-weight: 600; }
.ip-back { color: var(--link); font-size: .9rem; border-bottom: 1px solid var(--line); }
.ip-empty { margin: 8px 12px; color: var(--muted); font-size: .9rem; }

/* Holiday pricing */
.hol-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .hol-cols { grid-template-columns: minmax(0, 1fr); } }
.seg { display: inline-flex; border: 1px solid var(--input-line); border-radius: var(--r); overflow: hidden; }
.seg label { font-weight: 600; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 7px 14px; background: var(--card); }
.seg label + label span { border-left: 1px solid var(--input-line); }
.seg input:checked + span { background: var(--asphalt); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--safety); outline-offset: -3px; }
.hol-tree { max-height: 460px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); }
.hol-cat { border-bottom: 1px solid var(--line); }
.hol-cat:last-child { border-bottom: 0; }
.hol-cat summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.hol-cat[open] summary { background: var(--soft); }
.hol-items { display: grid; gap: 4px; padding: 8px 12px 10px 34px; }
.hol-item input:disabled + * { opacity: .6; }
.hol-amount { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 14px; }
.hol-value { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 1.1rem; }
.hol-value input { width: 100px; text-align: right; font-size: 1.1rem; font-weight: 600; }
.cal { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; max-width: 380px; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { text-align: center; font-size: .78rem; color: var(--muted); font-weight: 600; }
.cal-day { font: inherit; padding: 7px 0; border: 1px solid transparent; border-radius: 5px; background: var(--soft); cursor: pointer; }
.cal-day:hover { border-color: var(--input-line); }
.cal-day.today { border-color: var(--asphalt); }
.cal-day.on { background: var(--safety); color: var(--safety-ink); font-weight: 700; }
.hol-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 8px; }
.hol-range label { width: 100%; font-size: .92rem; }
.hol-range input[type=date] { width: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--note-bg); border: 1px solid #e5c75a; border-radius: 999px; padding: 2px 4px 2px 10px; font-size: .88rem; }
.chip button { border: 0; background: none; font-size: 1rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 999px; }
.chip button:hover { background: #f2c100; }
.hol-tag { font-weight: 600; font-size: .8rem; background: var(--note-bg); border: 1px solid #e5c75a; color: #5a4300; border-radius: 999px; padding: 1px 8px; margin-left: 6px; }

/* ---------- Today page ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.day-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.day-title { flex: 1; text-align: center; }
.day-title h1 { margin: 0; font-size: 1.5rem; }
.day-title p { margin: 2px 0 0; }
.day-arrow { font-size: 1.5rem; line-height: 1; padding: 8px 16px; }
.day-jump { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 0 0 18px; }
.day-jump input { width: auto; }
.stop { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--accent2); border-radius: var(--r); padding: 16px; margin: 0 auto 16px; max-width: 760px; scroll-margin-top: 80px; }
.stop-pickup { border-left-color: #7a4b00; }
.stop-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.stop-kind { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--accent2); }
.stop-pickup .stop-kind { background: var(--warn-bg); color: var(--warn-ink); }
.stop-time { font-size: 1.35rem; font-family: "Barlow Semi Condensed", sans-serif; }
.stop-brand { font-size: .85rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.stop-head .status-tag { margin-left: auto; font-weight: 600; font-size: .9rem; }
.stop-name { margin: 8px 0 0; font-size: 1.3rem; }
.stop-name a { color: inherit; }
.stop-sub, .stop-when { margin: 2px 0 0; color: var(--muted); }
.stop-addr { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--soft); font-weight: 600; min-height: 48px; }
.stop-addr svg { flex: none; margin-top: 2px; color: #b3261e; }
.stop-addr small { display: block; font-weight: 400; color: var(--accent2); }
.stop-surface { margin: 6px 0 0; }
.stop-note { margin: 6px 0 0; padding: 8px 10px; background: var(--warn-bg); border-radius: var(--r); }
.stop-items { margin: 10px 0 0; padding-left: 1.1em; }
.stop-items li { margin: 2px 0; }
.stop-contact { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.stop-btns { display: flex; gap: 8px; }
.btn.big { min-height: 46px; padding: 11px 18px; display: inline-flex; align-items: center; gap: 7px; font-size: 1rem; }
details.txt { position: relative; }
details.txt > summary { list-style: none; }
details.txt > summary::-webkit-details-marker { display: none; }
.txt-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0,0,0,.15); min-width: 220px; overflow: hidden; }
.txt-menu a { display: block; padding: 13px 16px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 600; }
.txt-menu a:last-child { border-bottom: 0; color: var(--muted); font-weight: 400; }
.txt-menu a:hover, .txt-menu a:focus { background: var(--soft); }
.stop-money { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); }
.stop-money.owed { background: var(--err-bg); color: var(--err-ink); }
.stop-money.paid { background: var(--ok-bg); color: var(--ok-ink); }
.stop-money .hint { color: inherit; opacity: .85; }
.money-big { font-size: 1.3rem; font-weight: 700; }
.stop-pay { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: flex-start; }
.stop-pay details.rec { flex: 1 1 100%; }
.stop-pay details.rec[open] > summary { margin-bottom: 10px; }
details.rec > summary { list-style: none; display: inline-flex; }
details.rec > summary::-webkit-details-marker { display: none; }
.rec-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); margin-top: 8px; }
.rec-form label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
.rec-form .rec-wide, .rec-form button { grid-column: 1 / -1; }
.rec-form p { margin: 0; }
.rec-form [hidden] { display: none; }
.pl-result { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pl-result p { margin: 0; flex: 1 1 100%; }
.pl-ok { color: var(--ok-ink); font-weight: 600; }
.pl-err { color: var(--err-ink); font-weight: 600; }
details.cl { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.cl > summary { cursor: pointer; font-weight: 700; padding: 6px 0; font-size: 1.05rem; }
.cl-sum { font-weight: 400; color: var(--muted); font-size: .9rem; }
.cl-warn { background: var(--warn-bg); color: var(--warn-ink); padding: 8px 10px; border-radius: var(--r); }
.cl-wrap { overflow-x: auto; }
.cl-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.cl-table th, .cl-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cl-table thead th { font-size: .85rem; color: var(--muted); text-align: center; }
.cl-table thead th:first-child { text-align: left; }
.cl-table tbody th { font-weight: 600; }
.cl-table tbody th small { display: block; font-weight: 400; color: var(--warn-ink); font-style: italic; }
.cl-part th { font-weight: 400 !important; }
.cl-n { color: var(--muted); font-weight: 400; }
.cl-cell { text-align: center !important; width: 34%; }
.cl-cell.full { background: var(--ok-bg); }
.cl-cell.part { background: var(--warn-bg); }
.cl-tick { display: inline-flex; padding: 6px; cursor: pointer; }
.cl-box { width: 26px; height: 26px; accent-color: #2e7d32; cursor: pointer; }
.cl-tick { display: flex; justify-content: center; }
.cl-qty { display: block; width: 64px !important; text-align: center; padding: 5px 4px !important; margin: 2px auto 0; }
.cl-by { display: block; font-size: .72rem; color: var(--muted); min-height: 1em; }
.cl-finishes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 560px) { .cl-finishes { grid-template-columns: minmax(0, 1fr); } .rec-form { grid-template-columns: minmax(0, 1fr); } }
.cl-finish .btn { width: 100%; min-height: 46px; }
.cl-done { margin: 0 0 6px; color: var(--ok-ink); font-weight: 600; font-size: .92rem; }
.cl-short { margin: 0 0 6px; color: var(--err-ink); font-size: .9rem; }
.cl-note { margin-bottom: 8px; }
.cl-missing { margin: 0 0 6px; color: var(--err-ink); font-weight: 600; }
.cl-note label { display: grid; gap: 4px; font-weight: 600; }
/* Item packing list */
.pack-row { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; margin-bottom: 8px; }
.pack-top { display: flex; gap: 8px; align-items: center; }
.pack-top input[type=text] { flex: 1; }
.pack-top input[type=number] { width: 80px; }
.pack-surf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.chipcheck { cursor: pointer; }
.chipcheck input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chipcheck span { display: inline-block; padding: 3px 10px; border: 1px solid var(--input-line); border-radius: 999px; font-size: .85rem; background: var(--card); }
.chipcheck input:checked + span { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.chipcheck input:focus-visible + span { outline: 3px solid var(--safety); outline-offset: 1px; }
/* Event page payments */
.ev-pay { margin-top: 20px; }
.ev-pay-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.ev-pay-head h3 { margin: 0; }
.ev-pay-links { display: flex; gap: 8px; align-items: center; }
.pay-table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.pay-table td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); }
.ev-cl-done { margin: 12px 0 0; }
.sup-used details summary { cursor: pointer; } .sup-used a { font-size: .92rem; } .day-short { max-width: 760px; margin: 0 auto 16px; }

/* Event items on a phone: item name on its own line, numbers underneath, all inside the box */
@media (max-width: 640px) {
  table.ev-lines, table.ev-lines tbody { display: block; width: 100%; }
  table.ev-lines thead { display: none; }
  table.ev-lines tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 6px 10px; align-items: end; padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
  table.ev-lines td { display: block; padding: 0; border: 0; text-align: left; }
  table.ev-lines td:first-child { grid-column: 1 / -1; }
  table.ev-lines td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); }
  table.ev-lines td[data-label="Total"] { text-align: right; font-weight: 600; }
  table.ev-lines td.rm { grid-column: 1 / -1; width: auto; text-align: right; }
  table.ev-lines td.rm:empty { display: none; }
  .ev-left, .ev-right { padding: 10px; }
  .ev-top { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .ev-back, .ev-num { justify-self: center; }
  .ev-title { font-size: 1.5rem; }
  .frm { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .frm label { margin-top: 6px; }
  .lg-row { flex-wrap: wrap; }
  .lg-money input { width: 90px !important; }
  .ev-savebar { padding: 6px 8px; gap: 6px; flex-wrap: nowrap; }
  .ev-savebar .btn { padding: 7px 10px; font-size: .85rem; white-space: nowrap; }
  .ev-savebar-right { flex-wrap: nowrap; overflow-x: auto; gap: 6px; }
  .ev-savebar-right .btn.primary { order: -1; }
  .lg-fee .fee-name { flex: 1 1 100%; }
}

/* ---------- Color themes (each person picks one under My settings → User interface) ---------- */
[data-theme="fairway"] {
  --asphalt: #1f3d2b; --asphalt-2: #2b5039; --ground: #f4efe2; --card: #fffdf7; --line: #e0d9c6;
  --ink: #1d2a21; --muted: #5f6a5f; --safety: #c9a227; --safety-ink: #251c00;
  --link: #1f6b3f; --accent2: #1f4d32; --soft: #f8f4e9; --soft-2: #ebe5d4; --tint: #e5eee3;
  --input-line: #c8c0aa; --bar: #3f6e52; --note-bg: #fbf1d2;
}
[data-theme="harbor"] {
  --asphalt: #1b2a44; --asphalt-2: #27395b; --ground: #f5f0e6; --card: #fffdf8; --line: #e2dbcc;
  --ink: #1b2233; --muted: #5d6474; --safety: #c4581c; --safety-ink: #ffffff;
  --link: #1d4f91; --accent2: #1b2a44; --soft: #f9f5ed; --soft-2: #ebe5d8; --tint: #e6ebf3;
  --input-line: #c9c1b1; --bar: #4c6a92; --note-bg: #fbeadb;
}
[data-theme="slate"] {
  --asphalt: #2b3136; --asphalt-2: #373e44; --ground: #f7f8f8; --card: #ffffff; --line: #dde1e3;
  --ink: #1e2326; --muted: #5c656b; --safety: #138a8a; --safety-ink: #ffffff;
  --link: #0f6f7a; --accent2: #1f5f66; --soft: #f4f6f6; --soft-2: #e5e9ea; --tint: #e2f1f1;
  --input-line: #bcc4c7; --bar: #4f8b90; --note-bg: #e6f4f3;
}
[data-theme="night"] {
  color-scheme: dark;
  --asphalt: #0c0e11; --asphalt-2: #1a1e23; --ground: #121418; --card: #1b1f24; --line: #2d333a;
  --ink: #e5e8eb; --muted: #9aa3ab; --safety: #f0a83a; --safety-ink: #1d1300;
  --link: #8dbbff; --accent2: #a9c7ff; --soft: #21262c; --soft-2: #2a3038; --tint: #1f2b3c;
  --input-line: #3c444c; --bar: #2c3d58; --note-bg: #2e2614;
  --ok-bg: #173322; --ok-ink: #8fd6a3; --warn-bg: #3a2c10; --warn-ink: #f3c56b;
  --off-bg: #2a2f35; --off-ink: #b7bec5; --err-bg: #3d1a18; --err-ink: #ff9d94;
}
[data-theme="night"] img { filter: brightness(.92); }
[data-theme="night"] .flash, [data-theme="night"] .pill { border: 1px solid var(--line); }
html[data-theme] body { background: var(--ground); color: var(--ink); }

/* Theme picker cards */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.theme-card { position: relative; cursor: pointer; font-weight: 400; }
.theme-card input { position: absolute; opacity: 0; }
.theme-card .sw { display: block; border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.theme-card input:checked + .sw { border-color: var(--safety); box-shadow: 0 0 0 3px color-mix(in srgb, var(--safety) 35%, transparent); }
.theme-card input:focus-visible + .sw { outline: 3px solid var(--safety); outline-offset: 2px; }
.sw-top { display: block; height: 26px; }
.sw-body { display: flex; align-items: center; gap: 8px; padding: 12px 10px; }
.sw-btn { display: inline-block; width: 46px; height: 18px; border-radius: 4px; }
.sw-line { flex: 1; height: 6px; border-radius: 3px; opacity: .35; }
.sw-name { display: block; padding: 6px 10px 8px; font-weight: 600; color: var(--ink); background: var(--card); }
.sw-name small { display: block; font-weight: 400; color: var(--muted); }
[data-theme="night"] .btn { border-color: var(--input-line); } [data-theme="night"] .btn:hover { background: var(--soft); }

/* Quick date buttons on the events list */
.quick-dates { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.quick-dates a { padding: 4px 12px; border: 1px solid var(--input-line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--card); font-size: .9rem; }
.quick-dates a:hover { border-color: var(--asphalt); }
.quick-dates a.on { background: var(--asphalt); border-color: var(--asphalt); color: #fff; font-weight: 600; }

/* ---------- Calendar ---------- */
.mc-nav { display: flex; gap: 6px; }
.mc-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.mc-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; }
.st-bg-confirmed { --c: #2e7d32; }
.st-bg-contracted { --c: #d9822b; }
.st-bg-completed { --c: #7a5cc0; }
.mc-dot { background: var(--c); }
.mc-grid { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mc-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mc-dow div { padding: 6px 8px; font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line); }
.mc-cell { min-height: 110px; padding: 4px 5px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc-cell:nth-child(7) { border-right: 0; }
.mc-row:last-child .mc-cell { border-bottom: 0; }
.mc-cell.out { background: var(--soft); }
.mc-cell.out .mc-num { color: var(--muted); }
.mc-num { align-self: flex-start; font-weight: 600; font-size: .85rem; color: var(--ink); text-decoration: none; padding: 0 6px; border-radius: 999px; }
.mc-num:hover { background: var(--soft-2); }
.mc-cell.is-today .mc-num { background: var(--safety); color: var(--safety-ink); }
.mc-ev { display: block; font-size: .78rem; line-height: 1.25; padding: 2px 5px; border-radius: 4px; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--c) 16%, var(--card)); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-ev:hover { background: color-mix(in srgb, var(--c) 28%, var(--card)); }
.mc-ev.st-bg-completed { opacity: .75; }
.mc-flag { color: #b4291f; margin-right: 3px; font-weight: 700; }
.mc-ev .wx { margin-right: 4px; font-size: .7rem; padding: 0 4px 0 2px; }
.mc-list { display: none; }
@media (max-width: 700px) {
  .mc-grid { display: none; }
  .mc-list { display: block; }
  .mc-lday { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .mc-ldate { text-align: center; color: var(--muted); text-decoration: none; font-size: .8rem; }
  .mc-ldate b { display: block; font-size: 1.5rem; color: var(--ink); line-height: 1.1; }
  .mc-lday.is-today .mc-ldate b { color: var(--safety-ink); background: var(--safety); border-radius: var(--r); }
  .mc-lday .mc-ev { font-size: .95rem; padding: 6px 8px; margin-bottom: 4px; white-space: normal; }
}

/* ---------- Company statistics ---------- */
.subtabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: -6px 0 14px; }
.subtabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.subtabs a.on { color: var(--ink); border-bottom-color: var(--safety); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; min-height: 300px; display: flex; flex-direction: column; } /* grows to fit its list; tiles in a row still line up */
.tile h3 { margin: 0 0 8px; font-size: 1rem; color: var(--muted); }
.tile-big { font-family: "Barlow Semi Condensed", sans-serif; font-size: 2rem; font-weight: 700; margin: 0; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-big small { font-family: "Barlow", sans-serif; font-size: .9rem; font-weight: 400; color: var(--muted); }
.tile-sub { margin: 2px 0 10px; }
.bars { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; min-height: 0; padding-top: 6px; }
.bar-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; padding-bottom: 18px; }
.bar-col small { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; color: var(--muted); font-size: .72rem; }
.bar { display: block; width: 45%; border-radius: 3px 3px 0 0; min-height: 1px; }
.bar-this { background: var(--safety); }
.bar-last { background: var(--soft-2); }
.tile-key { margin: 6px 0 0; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile-key span { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.k-this { background: var(--safety); } .k-last { background: var(--soft-2); margin-left: 8px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .9rem; padding: 4px 0; }
.hbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { display: block; height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.hbar-track > span { display: block; height: 100%; background: var(--accent2); border-radius: 999px; }
.hbar-track.big { height: 16px; }
.hbar b { font-weight: 600; font-variant-numeric: tabular-nums; }
.paybar { position: relative; display: inline-block; width: 120px; height: 20px; border-radius: 999px; background: var(--soft-2); overflow: hidden; vertical-align: middle; }
.paybar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.paybar-txt { position: relative; display: block; text-align: center; font-size: .78rem; font-weight: 700; line-height: 20px; color: #1b1e21; }
.pb-red .paybar-fill { background: #e57368; }
.pb-yellow .paybar-fill { background: #f2c94c; }
.pb-green .paybar-fill { background: #5cb874; }
.pb-blue .paybar-fill { background: #5b9bea; }
.tile .paybar { width: 100%; height: 26px; } .tile .paybar-txt { line-height: 26px; font-size: .9rem; }
.stats-table th[data-sort], .inv-table th[data-sort] { cursor: pointer; white-space: nowrap; user-select: none; }
.stats-table th[data-sort]::after, .inv-table th[data-sort]::after { content: " ↕"; color: var(--input-line); }
.inv-table th[aria-sort=ascending]::after { content: " ↑"; color: var(--ink); }
.inv-table th[aria-sort=descending]::after { content: " ↓"; color: var(--ink); }
.stats-table th[aria-sort="ascending"]::after { content: " ↑"; color: var(--ink); }
.stats-table th[aria-sort="descending"]::after { content: " ↓"; color: var(--ink); }
.stats-table tr.st-cat th { background: var(--soft); color: var(--ink); font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; cursor: default; }
.stats-table td { padding: 6px 10px; }
.stats-table td.calc { background: var(--soft); color: var(--muted); }
.stats-table input { padding: 5px 7px; font-size: .92rem; }
.stats-table input.st-code { width: 110px; text-transform: uppercase; }
.stats-table input.st-price { width: 96px; text-align: right; }
.stats-table input[type=date] { width: 150px; }
@media (max-width: 700px) { .tiles { grid-template-columns: minmax(0, 1fr); } .tile { height: auto; min-height: 260px; } }

/* Resources */
.tool-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 76px; padding: 8px 10px 6px; color: #c9cfd4; text-decoration: none; font-size: .78rem; border-bottom: 3px solid transparent; }
.tool-link:hover { color: #fff; background: var(--asphalt-2); }
.tool-link.on { color: #fff; border-bottom-color: var(--safety); font-weight: 600; }
@media (max-width: 760px) { .tool-link { min-width: 64px; padding: 6px 6px 4px; } }
.res-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.res-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--safety); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.res-card:hover { border-color: var(--asphalt); }
.res-article { max-width: 820px; }
.res-article h1 { font-size: 1.7rem; }
.res-key { width: 100%; margin: 8px 0 16px; }
.res-key td { vertical-align: top; padding: 10px 8px; }
.res-key td:first-child { width: 1%; white-space: nowrap; }
.res-article code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.res-next { display: flex; justify-content: space-between; gap: 12px; max-width: 820px; flex-wrap: wrap; }

/* Load-out sheet */
.day-tools { text-align: center; margin: 0 0 14px; max-width: none; }
.lo-section { max-width: 760px; }
.lo-section h2 { margin-top: 0; }
.lo-event { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; font-size: 1.02rem; }
.lo-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--asphalt); color: #fff; font-size: .8rem; }
.lo-list { list-style: none; margin: 0; padding: 0; }
.lo-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-weight: 400; cursor: pointer; }
.lo-row input { width: 22px; height: 22px; flex: none; }
.lo-qty { min-width: 36px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lo-row input:checked ~ span { text-decoration: line-through; color: var(--muted); }
.lo-total { border-top: 4px solid var(--safety); }
@media print {
  .topbar, .no-print, .flash { display: none !important; }
  main { padding: 0; }
  .card { border: 0; padding: 0; margin-bottom: 14px; }
  .lo-row { padding: 3px 0; }
}

/* Weather */
.wx { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 4px; border-radius: 4px; font-size: .78rem; font-weight: 700; white-space: nowrap; position: relative; vertical-align: middle; }
.wx svg { flex: none; }
.wx-warn { background: #f7a928; color: #1b1e21; border: 1px solid #b86e00; }
.wx-danger { background: #c62828; color: #fff; border: 1px solid #8e1f17; }
.wx-more::after { content: ""; position: absolute; top: -3px; right: -3px; width: 7px; height: 7px; border-radius: 999px; background: var(--ink); border: 1px solid var(--card); }
.flags .wx { margin: 2px 0; }
.wx-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin: 10px 0; border-radius: var(--r); background: var(--soft); border-left: 4px solid var(--input-line); font-size: .95rem; max-width: none; }
.wx-line-warn { background: var(--warn-bg); color: var(--warn-ink); border-left-color: #f7a928; }
.wx-line-danger { background: var(--err-bg); color: var(--err-ink); border-left-color: #c62828; }

/* Customer emails settings */
.em-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.em-head h3 { margin: 0; }
.em-card textarea { font-size: .95rem; line-height: 1.45; }
.em-codes summary { cursor: pointer; }

/* Phone quote */
.quick { max-width: 640px; }
.quick h3 { margin: 20px 0 8px; }
.quick .field { margin-bottom: 10px; }
.q-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }
.q-row .q-small { max-width: 120px; }
.q-line { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; margin-bottom: 8px; }
.q-go { width: 100%; margin-top: 10px; font-size: 1.05rem; padding: 12px; }
.quick-total { max-width: 640px; }
.qt-big { font-family: "Barlow Semi Condensed", sans-serif; font-size: 2.6rem; font-weight: 700; margin: 6px 0; font-variant-numeric: tabular-nums; }

/* Photo crops */
.ph-versions { display: grid; grid-template-columns: 16fr 9fr; gap: 4px; padding: 4px; background: var(--soft); }
.ph-versions img { width: 100%; display: block; border-radius: 3px; }
.photo .ph-versions .pv-wide { aspect-ratio: 16 / 9; object-fit: cover; }
.photo .ph-versions .pv-square { aspect-ratio: 1 / 1; object-fit: cover; }
.crop-dlg { width: min(860px, 96vw); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--card); color: var(--ink); }
.crop-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.crop-dlg h3 { margin-top: 0; }
.crop-stage { position: relative; display: inline-block; max-width: 100%; margin: 8px 0; user-select: none; line-height: 0; }
.crop-stage img { max-width: 100%; max-height: 60vh; display: block; }
.crop-box { position: absolute; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); outline: 2px solid #fff; cursor: move; touch-action: none; }
.crop-stage { overflow: hidden; }
.crop-zoom { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.crop-zoom input { flex: 1; max-width: 320px; }

/* "More options": rarely used fields tucked away */
details.more { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
details.more > summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: .92rem; margin-bottom: 10px; }

.chip.unit-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; letter-spacing: .02em; }

/* Quick price entry on the Inventory list */
.qp { display: inline-flex; align-items: center; gap: 3px; justify-content: flex-end; }
.qp-cur { color: var(--muted); }
.qp input.qp-in { width: 6.2em; min-width: 6.2em; flex: 0 0 auto; text-align: right; padding: 5px 7px; font: inherit; font-variant-numeric: tabular-nums; }
/* Inventory list: compact so every column fits */
.inv-table th, .inv-table td { padding: 8px 9px; }
.inv-table td.num, .inv-table th.num { white-space: nowrap; }
.inv-table .chip { font-size: .8rem; padding: 1px 8px; }
.qp-auto { color: var(--muted); }

/* Floating Save that follows you when a form's own Save button is off screen */
.float-save { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 8px; }
.float-save[hidden] { display: none; }
.float-save .btn { box-shadow: 0 6px 18px rgba(0,0,0,.22); padding: 11px 20px; }
.float-save-dot { display: none; width: 10px; height: 10px; border-radius: 50%; background: #e8a33d; box-shadow: 0 0 0 3px var(--card); }
.float-save.is-dirty .float-save-dot { display: block; }
@media (max-width: 640px) { .float-save { right: 12px; bottom: 12px; } }
@media print { .float-save { display: none !important; } }

/* Unit IDs on the Inventory list: shown as a chip, click to edit */
button.uc-chip { font: inherit; font-family: ui-monospace, Menlo, monospace; cursor: pointer; padding: 2px 10px; }
button.uc-chip:hover { border-color: var(--ink); }
.uc-add { font: inherit; font-size: .82rem; color: var(--muted); background: none; border: 1px dashed var(--input-line); border-radius: 999px; padding: 2px 10px; cursor: pointer; white-space: nowrap; }
.uc-add:hover { color: var(--ink); border-color: var(--ink); }
.uc-cell input.uc-in { width: 8.5em; padding: 4px 7px; font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; }
.uc-cell input.uc-in.is-bad { border-color: #c62828; }
.qty-btn { font: inherit; font-variant-numeric: tabular-nums; background: none; border: 1px solid transparent; border-radius: 6px; padding: 2px 8px; cursor: pointer; color: inherit; }
.qty-btn:hover { border-color: var(--input-line); background: var(--card); }
.qty-cell input.qty-in { width: 4.5em; padding: 4px 6px; text-align: right; font: inherit; }
.act-btn { font: inherit; font-size: .82rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; cursor: pointer; white-space: nowrap; background: #e3f1e5; color: #1f6b30; border: 1px solid #b9dcc0; }
.act-btn.is-off { background: var(--soft); color: #8a2b1d; border-color: #e0b4ab; }
.act-dlg { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; max-width: 420px; background: var(--card); color: var(--ink); }
.act-dlg::backdrop { background: rgba(0,0,0,.35); }
.act-dlg h3 { margin-top: 0; }
.unit-details { margin: 6px 0 14px; }
.unit-details > summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }

/* Inventory: tick items for bulk actions */
.pick-col { width: 1%; padding-right: 0 !important; }
.pick-col input { width: 18px; height: 18px; cursor: pointer; }
.bulk-bar { position: sticky; top: 0; z-index: 35; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.bulk-bar[hidden] { display: none; }
.bulk-bar select { width: auto; min-width: 240px; }
.inv-table tr.is-picked td { background: var(--note-bg); }

/* Address suggestions while typing */
.addr-wrap { position: relative; display: block; }
.addr-list { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 60; margin: 0; padding: 4px 0; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 22px rgba(0,0,0,.16); max-height: 280px; overflow-y: auto; }
.addr-list[hidden] { display: none; }
.addr-list li { padding: 8px 12px; cursor: pointer; line-height: 1.3; }
.addr-list li span { color: var(--muted); font-size: .9em; }
.addr-list li:hover, .addr-list li.on { background: var(--soft); }
.addr-wrap:has(> input.search) { flex: 1 1 260px; }
.dir-btn { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 6px 12px; font-size: .9rem; }
.seg-links { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-left: auto; }
.seg-links a { padding: 6px 14px; text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 600; }
.seg-links a + a { border-left: 1px solid var(--line); }
.seg-links a.on { background: var(--asphalt); color: #fff; }


/* ===== Fit every page to the screen (no sideways scrolling on phones) ===== */
html, body { max-width: 100%; }
html, body { overflow-x: clip; } /* last safety net; the rules below keep content from needing it */
img, svg, video, canvas, iframe { max-width: 100%; }
img { height: auto; }
input, select, textarea, button { max-width: 100%; }
/* Long words, emails and links wrap instead of pushing the page wider */
h1, h2, h3, h4, p, li, dd, dt, label, legend, .hint, .flash, code, blockquote, figcaption, summary { overflow-wrap: anywhere; }
.btn { white-space: normal; text-align: center; }
/* Grid and flex children may shrink below their content */
.grid > *, .ev-cols > *, .ev-pair > *, .hol-cols > *, .frm > *, .field { min-width: 0; }
/* Any table that isn't already in a scroll box gets one (added by the page script) */
.table-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
/* Table cells that hold buttons stay real table cells so row lines line up */
td.row-actions { display: table-cell; text-align: right; white-space: nowrap; }
td.row-actions > form, td.row-actions > a, td.row-actions > button { display: inline-block; vertical-align: middle; margin-left: 12px; }
td.row-actions > :first-child { margin-left: 0; }
.stop-btns { flex-wrap: wrap; }
.seg { flex-wrap: wrap; max-width: 100%; }

@media (max-width: 760px) {
  main { padding-left: 12px; padding-right: 12px; }
  h1 { font-size: 1.6rem; }
  .head { gap: 10px; }
  .head h1 { flex: 1 1 100%; }
  .head .btn { flex: 0 1 auto; }
  /* Fixed widths become "up to" widths */
  .filters select, table.lines select, table.tiers select, .ev-bar select, .bulk-bar select, .ipick { min-width: 0; }
  .ev-bar input[type=date], .ev-bar input[type=time], .hol-range input[type=date], .stats-table input[type=date] { width: 100%; max-width: 170px; }
  #items-float { min-width: 0; max-width: calc(100vw - 24px); }
  .status-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .status-tabs .tab { flex: 0 0 auto; }
  .seg-links { margin-left: 0; }
  .stop-btns .btn.big { flex: 1 1 auto; justify-content: center; }
  .bulk-bar select { flex: 1 1 100%; }
  .addr-list { max-width: calc(100vw - 24px); }
  .cal { max-width: 100%; }
  .paybar { width: 90px; }
  .totals dd { min-width: 0; }
  .lg-select { width: 100% !important; }
  td.row-actions { white-space: normal; }
}
/* Let boxes shrink to the screen instead of growing to fit their longest word */
main :where(div, form, span, label, section, fieldset, article, aside, header, footer, nav, details, summary, li) { min-width: 0; }
main :where(a, span, strong, b, em, small) { overflow-wrap: anywhere; }
.auth .card { overflow-wrap: anywhere; }
.ev-num { flex-wrap: wrap; }
.brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools { min-width: 0; }
.ev-top > * { min-width: 0; max-width: 100%; }
.ev-tabhead { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 760px) { .conflict { white-space: normal; } .lg-row b { white-space: normal; overflow-wrap: anywhere; } }
.ev-contact-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-self: start; }
.ev-contact-btns .txt { position: relative; }
.ev-contact-btns summary { list-style: none; }
.ev-contact-btns summary::-webkit-details-marker { display: none; }
.ev-contact-btns .txt-menu { left: 0; right: auto; min-width: 220px; }

/* Status colors: a colored pill for each status, the same in every theme */
.status, .status-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.st-quote      { color: #3d4650; background: #eceff2; border-color: #d5dbe0; }
.st-contracted { color: #a24e0c; background: #fdeedd; border-color: #f2cfa6; }
.st-confirmed  { color: #1e6b2e; background: #e2f3e5; border-color: #b6dcbd; }
.st-completed  { color: #5a3d99; background: #eee8f8; border-color: #d4c7ee; }
.st-cancelled  { color: #9b3524; background: #fbe9e6; border-color: #f0c6be; text-transform: none; letter-spacing: 0; }
[data-theme="night"] .st-quote      { color: #d5dbe0; background: rgba(213,219,224,.12); border-color: rgba(213,219,224,.3); }
[data-theme="night"] .st-contracted { color: #f5b77a; background: rgba(240,150,70,.15); border-color: rgba(240,150,70,.35); }
[data-theme="night"] .st-confirmed  { color: #8fdc9c; background: rgba(90,200,110,.14); border-color: rgba(90,200,110,.35); }
[data-theme="night"] .st-completed  { color: #c6b2f2; background: rgba(170,140,240,.15); border-color: rgba(170,140,240,.35); }
[data-theme="night"] .st-cancelled  { color: #f2a99c; background: rgba(240,120,100,.14); border-color: rgba(240,120,100,.35); }
/* Event page tabs use the same colors */
.tab-quote { --tab: #3d4650; } .tab-contracted { --tab: #a24e0c; } .tab-confirmed { --tab: #1e6b2e; } .tab-completed { --tab: #5a3d99; } .tab-cancelled { --tab: #9b3524; }
[data-theme="night"] .tab-quote { --tab: #d5dbe0; } [data-theme="night"] .tab-contracted { --tab: #f5b77a; } [data-theme="night"] .tab-confirmed { --tab: #8fdc9c; } [data-theme="night"] .tab-completed { --tab: #c6b2f2; } [data-theme="night"] .tab-cancelled { --tab: #f2a99c; }
.ev-bar select.time-select { min-width: 0; width: 124px; } select.time-select { width: auto; }
table.events tr.is-picked td { background: var(--note-bg); }

/* ===== Event / quote page: clear sections instead of one white block ===== */
.ev-cols { background: transparent; border: 0; gap: 16px; }
.ev-left, .ev-right { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 16px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); border-right: 1px solid var(--line); }
@media (max-width: 1000px) { .ev-left { border-bottom: 1px solid var(--line); } }
.ev-sec-h { margin: 0 -16px 14px; padding: 10px 16px; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; color: #fff; border-radius: 9px 9px 0 0; }
.ev-right .ev-sec-h + * { margin-top: 0; }
.ev-sec-items { background: #2c4a73; }
.ev-sec-event { background: #3d6b4f; }
.ev-sec-cust  { background: #6a4c8c; margin-top: 18px; border-radius: 0; }
.ev-box { border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.ev-box-event { background: #eef5f0; border: 1px solid #d3e5d9; }
.ev-box-cust  { background: #f3eff8; border: 1px solid #ded4ec; }
.ev-right > label.ev-sub { margin-top: 4px; }
#crew_notes { background: var(--note-bg); }
#customer_notes { background: #eef4fc; }
/* Items table */
table.ev-lines thead th { background: #e3ebf6; color: #1f3a5f; border-bottom: 2px solid #2c4a73; padding-top: 7px; padding-bottom: 7px; }
table.ev-lines tbody tr:nth-child(even) td { background: #f6f8fb; }
.ev-addline { background: #eef3fa; border-color: #a9bcd8; }
/* Pricing ledger */
.ledger { border-top: 2px solid #2c4a73; border-radius: 0 0 8px 8px; overflow: hidden; }
.lg-strong { background: #eef2f7; }
.lg-total { background: #2c4a73; color: #fff; border-top: 0; }
.lg-total b, .lg-total .hint { color: #fff; }
.lg-due { background: #fdeceb; }
/* Payments and contract cards get the same treatment */
.ev-pay { border-radius: 10px; padding-top: 0; overflow: hidden; }
.ev-pay .ev-pay-head { margin: 0 -18px 12px; padding: 10px 18px; background: #34495e; color: #fff; }
.ev-pay .ev-pay-head h3 { color: #fff; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.ev-pay .ev-pay-head .btn { background: #fff; }

[data-theme="night"] .ev-box-event { background: rgba(90,170,120,.10); border-color: rgba(90,170,120,.25); }
[data-theme="night"] .ev-box-cust  { background: rgba(160,120,220,.10); border-color: rgba(160,120,220,.25); }
[data-theme="night"] table.ev-lines thead th { background: rgba(110,150,210,.16); color: var(--ink); }
[data-theme="night"] table.ev-lines tbody tr:nth-child(even) td, [data-theme="night"] .lg-strong { background: rgba(255,255,255,.04); }
[data-theme="night"] #customer_notes { background: rgba(110,150,210,.12); }
[data-theme="night"] .lg-due { background: rgba(240,100,90,.14); }

/* ===== Click to edit: saved details read like text until you click them ===== */
.ev-form .is-locked { background-color: transparent !important; border-color: transparent !important; box-shadow: none !important; cursor: pointer; padding-left: 4px; }
.ev-form .is-locked:hover { background-color: rgba(0,0,0,.04) !important; border-color: var(--line) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7177' stroke-width='2'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; padding-right: 24px; }
.ev-form textarea.is-locked { resize: none; }
.ev-form .is-editing { background-color: #fff !important; border-color: #2c4a73 !important; box-shadow: 0 0 0 3px rgba(44,74,115,.18) !important; }
[data-theme="night"] .ev-form .is-editing { background-color: var(--card) !important; }
.ev-form .is-changed { box-shadow: inset 3px 0 0 #e8a33d !important; }
.ev-lock-hint { font-size: .85rem; color: var(--muted); margin: -4px 0 12px; }
.ev-form #crew_notes.is-locked { background-color: var(--note-bg) !important; }
.ev-form #customer_notes.is-locked { background-color: #eef4fc !important; }
[data-theme="night"] .ev-form #customer_notes.is-locked { background-color: rgba(110,150,210,.12) !important; }
.ev-form textarea.is-locked { padding: 6px 8px; border-radius: 6px; }

/* ===== Locked sections: read like text until Edit is tapped ===== */
.ev-edit-btn { float: right; margin: -3px 0 -3px 10px; font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.ev-edit-btn:hover { background: rgba(255,255,255,.28); }
.ev-edit-btn.is-on { background: #f2c100; color: #231c00; border-color: #f2c100; }
.ev-bar .ev-edit-btn { float: none; margin: 0 0 0 auto; }
/* Locked: dropdowns, checkboxes, date pickers and buttons ignore the mouse. Text boxes are read-only instead, so you can
   still hover for the full text and copy it (like a long email), but not type. */
.is-locked-zone :is(select, input[type=checkbox], input[type=date], input[type=number], .ipick, .ev-addline, table.ev-lines .rm-box, .lg-fee .linkbtn, button:not(.ev-edit-btn)):not(.dir-btn *):not(.ev-contact-btns *) { pointer-events: none; }
.is-locked-zone :is(input[readonly], textarea[readonly]) { caret-color: transparent; }
/* Locked fields keep their box ("bubble"), softly tinted in their section's color, so you can still see what's a field. */
.is-locked-zone :is(input[type=text], input[type=email], input[type=tel], input[type=number], input:not([type]), input[type=date], textarea, select) {
  --bub-bg: rgba(44,74,115,.07); --bub-line: rgba(44,74,115,.28);
  background-color: var(--bub-bg) !important; border: 1px solid var(--bub-line) !important; box-shadow: none !important;
  border-radius: 8px; color: inherit; cursor: default; text-overflow: ellipsis; }
.ev-left.is-locked-zone :is(input, select, textarea) { --bub-bg: rgba(44,74,115,.07); --bub-line: rgba(44,74,115,.30); }
.ev-right .ev-zone:first-child.is-locked-zone :is(input, select, textarea) { --bub-bg: rgba(61,107,79,.09); --bub-line: rgba(61,107,79,.32); }
.ev-right .ev-zone:last-child.is-locked-zone :is(input, select, textarea) { --bub-bg: rgba(106,76,140,.08); --bub-line: rgba(106,76,140,.30); }
.ev-bar.is-locked-zone :is(input, select) { --bub-bg: rgba(255,255,255,.10); --bub-line: rgba(255,255,255,.30); }
[data-theme="night"] .is-locked-zone :is(input, select, textarea) { --bub-bg: rgba(255,255,255,.06); --bub-line: rgba(255,255,255,.22); }
.is-locked-zone input[type=checkbox] { pointer-events: none; }
/* Long values on locked fields: shrunk to fit, with the full text on hover (and wrapped underneath if still too long) */
.bub-full { grid-column: 2; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; margin-top: -2px; user-select: all; }
@media (max-width: 760px) { .bub-full { grid-column: 1; } }
.is-locked-zone .bub-fit { font-size: var(--bub-fs, 1em) !important; }
.is-locked-zone select { appearance: none; -webkit-appearance: none; background-image: none !important; }
.is-locked-zone textarea { resize: none; }
.is-locked-zone .ev-addline, .is-locked-zone .rm-box, .is-locked-zone .lg-fee .linkbtn { display: none; }
.is-locked-zone input[type=checkbox] { opacity: .75; }
.ev-bar.is-locked-zone :is(input, select) { color: #fff; }
.ev-bar.is-locked-zone select option { color: #1b1e21; }
.ev-form #crew_notes, .ev-form #customer_notes { border-radius: 6px; }
.is-locked-zone #crew_notes { background-color: var(--note-bg) !important; padding: 6px 8px; }
.is-locked-zone #customer_notes { background-color: #eef4fc !important; padding: 6px 8px; }
[data-theme="night"] .is-locked-zone #customer_notes { background-color: rgba(110,150,210,.12) !important; }
.ev-zone:not(.is-locked-zone) .ev-sec-h, .ev-bar:not(.is-locked-zone) { box-shadow: inset 0 -3px 0 #f2c100; }
/* Live price updates on the quote page */
@keyframes lgFlash { from { background: #fff3c4; } to { background: transparent; } }
.lg-flash { animation: lgFlash 1.2s ease-out; border-radius: 4px; }
.lg-total .lg-flash { animation: none; text-decoration: underline 2px #f2c100; text-underline-offset: 4px; }
.ev-form.is-repricing [data-live="total"] { opacity: .6; }
.lg-autofee .fee-name { display: inline-flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.lg-autofee.is-off .sf-name, .lg-autofee.is-off .sf-amt { text-decoration: line-through; opacity: .55; }
.sf-table input[type=text]:not(.narrow) { min-width: 150px; } .sf-table tr.sf-new td { background: var(--soft); }

/* Surfaces page: one card per surface, so every box has room */
.sf-list { display: grid; gap: 10px; }
.sf-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card); }
.sf-row.sf-new { background: var(--soft); border-style: dashed; }
.sf-top, .sf-fee { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.sf-fee { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sf-f { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.sf-f input, .sf-f select { font-size: 1rem; font-weight: 400; color: var(--ink); }
.sf-order input { width: 70px; }
.sf-name { flex: 1 1 260px; }
.sf-name input { width: 100%; font-weight: 600; }
.sf-show { padding-bottom: 8px; }
.sf-mode select { width: auto; min-width: 170px; }
.sf-money input { width: 96px; text-align: right; }
.sf-line { flex: 1 1 300px; }
.sf-line input { width: 100%; }
.setup-yes { color: #1e6b2e; } .setup-no { color: #a24e0c; }

/* ---------- v22: companies ---------- */
.co-switch { display: flex; align-items: center; padding: 0 8px; }
.co-switch select { background: var(--asphalt-2, #33383e); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: var(--r); padding: 6px 8px; font: inherit; font-size: .85rem; max-width: 150px; }
.co-switch select.away { border-color: var(--safety); box-shadow: 0 0 0 2px var(--safety); }
@media (max-width: 760px) { .co-switch { padding: 0 4px; } .co-switch select { max-width: 96px; font-size: .78rem; padding: 5px 4px; } }
tr.group-row th { background: var(--soft); color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding-top: 10px; }
.co-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.co-card { display: block; color: inherit; text-decoration: none; }
.co-card:hover { border-color: var(--link); }
.co-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.co-top strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.co-docs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; font-size: .85rem; }
.doc-ok { color: var(--ok-ink); font-weight: 600; }
.doc-miss { color: var(--muted); }
.doc-rows { display: grid; gap: 12px; }
.doc-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.doc-row:first-child { border-top: 0; }
.doc-name { flex: 1 1 260px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-up { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-up input[type=file] { max-width: 100%; }
.plain-list { list-style: none; padding: 0; margin: 0 0 14px; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
details.brand-names { margin-top: 6px; font-size: .85rem; }
details.brand-names summary { color: var(--link); cursor: pointer; }
.bn-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.bn-row span { flex: 0 0 150px; color: var(--muted); overflow-wrap: anywhere; }
.bn-row input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 560px) { .bn-row { flex-direction: column; align-items: stretch; gap: 2px; } .bn-row span { flex: none; } }
.brand-ov td { vertical-align: middle; }
.brand-ov input[type=text] { min-width: 160px; width: 100%; }
.brand-ov input.narrow { width: 96px; }
/* v23: a company's own holiday switches */
.hc-list { display: grid; gap: 12px; }
.hc { border-left: 4px solid var(--line); }
.hc.is-on { border-left-color: var(--ok-ink); }
.hc-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.hc-top strong { overflow-wrap: anywhere; }
.hc-body { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 10px; }
.hc-dates { flex: 1 1 280px; border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hc-dates legend { width: 100%; margin-bottom: 4px; font-weight: 600; }
.hc-inc { flex: 0 1 240px; display: flex; flex-direction: column; gap: 4px; }
.hc-inc label { font-weight: 600; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; flex: none; }
.switch input { width: 20px; height: 20px; }
.co-banner { margin-bottom: 14px; }
.hc-top > div { min-width: 0; }
/* v24: do not book */
.flag-row { padding: 12px 0; border-top: 1px solid var(--line); }
.flag-row:first-of-type { border-top: 0; }
.flag-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flag-pill { background: var(--err-bg); color: var(--err-ink); font-weight: 700; }
.flag-why { margin: 6px 0; overflow-wrap: anywhere; }
.flag-form { display: grid; gap: 6px; margin-top: 8px; max-width: 560px; }
.flag-form .btn { justify-self: start; }
.flag-mark { color: var(--err-ink); font-weight: 700; }
/* v25: delivery handoffs */
.stop-cover { background: var(--tint); color: var(--ink); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 600; }
.money-big.bal-zero { color: var(--ok-ink); }
.money-big.bal-due { color: var(--err-ink); }
.handoff-card .ho-status { font-weight: 600; }
.ho-list { list-style: none; padding: 0; margin: 0; }
.ho-list li { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.ho-list li:first-child { border-top: 0; }
.ho-list .ho-what { min-width: 0; overflow-wrap: anywhere; }
.ho-view dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.ho-view dt { color: var(--muted); }
.ho-view dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .ho-view dl { grid-template-columns: 1fr; } .ho-view dd { margin-bottom: 6px; } }
/* v26: COIs and Send paperwork */
.coi-rows, .coi-new { display: grid; gap: 10px; }
.coi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.coi-row:first-child { border-top: 0; }
.coi-row label { display: flex; flex-direction: column; gap: 3px; font-size: .9rem; min-width: 0; }
.coi-row input[type=file] { max-width: 100%; }
.coi-n { grid-column: 1 / -1; font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.coi-row label.coi-x { flex-direction: row; align-items: center; align-self: end; }
@media (max-width: 560px) { .coi-row { grid-template-columns: 1fr; } }
.coi-copy { margin-top: 14px; display: grid; gap: 6px; }
.coi-copy textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; width: 100%; }
.coi-copy .btn { justify-self: start; }
.paper-list { display: grid; gap: 8px; margin-bottom: 12px; }
.paper-list .is-off { color: var(--muted); }
/* v26: availability by date */
.day-av-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.day-av-top label { font-weight: 700; }
.day-av-q { width: 100%; font-size: 1.05rem; padding: 10px 12px; }
.day-av-hit { min-height: 1.2em; margin: 6px 0 8px; font-weight: 600; }
.day-av-list { border-top: 1px solid var(--line); padding: 10px 0; }
.day-av-list summary { cursor: pointer; display: flex; gap: 8px; align-items: center; font-size: 1.05rem; }
.day-av-list ul { list-style: none; padding: 0; margin: 8px 0 0; }
.day-av-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.day-av-list li span { min-width: 0; overflow-wrap: anywhere; }
.day-av-list li.dav-match { background: var(--note-bg); }
.dav-n { white-space: nowrap; }
.dav-b { color: var(--err-ink); }
.dav-a { color: var(--ok-ink); }
.av-h2 { margin-top: 26px; }
/* v27: kits on the checklist */
.cl-table tr.cl-kit th { font-weight: 700; color: var(--ink); }
.cl-table tr.cl-kit { background: var(--tint); }
.cl-table tr.cl-kitpart th { padding-left: 22px; font-weight: 400; }
.cl-table tr.cl-kitpart th::before { content: "↳ "; color: var(--muted); }
.kit-tog { font-size: .8rem; margin-left: 4px; }
.kit-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.kit-row { display: grid; grid-template-columns: 1fr 80px auto; gap: 8px; align-items: center; }
.kit-row input { min-width: 0; }
.kit-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; }
.kit-cat { grid-column: 1 / -1; margin: 10px 0 2px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
/* v28: item stocking maps */
.shop-map-wrap { margin: 10px 0 16px; }
.shop-map { width: 100%; max-height: 70vh; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); touch-action: none; }
.shop-map .sm-floor { fill: var(--soft); }
.shop-map .sm-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .55; }
.shop-map .sm-grid.five { opacity: 1; stroke: var(--input-line); }
.shop-map .sm-wall { fill: none; stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.shop-map .sm-ruler { font-size: .7px; fill: var(--muted); text-anchor: middle; }
.shop-map .sm-r { fill: #dce6f5; stroke: #3d5a8a; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.shop-map .sm-zone .sm-r { fill: #e6f1e3; stroke: #4a7a42; stroke-dasharray: 4 3; }
.shop-map .sm-label { font-size: .9px; font-weight: 700; fill: #1b1e21; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.shop-map a .sm-box { cursor: pointer; }
.shop-map a:hover .sm-r, .shop-map .is-sel .sm-r { stroke-width: 3; }
.shop-map .is-hl .sm-r { fill: #ffe36b; stroke: #b88a00; stroke-width: 3; }
.shop-map.is-edit .sm-box { cursor: move; }
.shop-map .sm-handle { fill: #3d5a8a; cursor: nwse-resize; }
.shop-map .sm-ghost { fill: rgba(242,193,0,.35); stroke: #b88a00; stroke-width: 2; vector-effect: non-scaling-stroke; }
.sp-rows { display: grid; gap: 8px; }
.sp-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.sp-row:first-child { border-top: 0; }
.sp-row input[type=text] { flex: 1 1 160px; min-width: 0; }
.sp-sh input { width: 64px; }
.st-table td { vertical-align: top; }
.stock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .stock-grid { grid-template-columns: 1fr; } }
/* v29: trucks */
.trucks { display: grid; gap: 14px; }
.truck { border-top: 1px solid var(--line); padding-top: 12px; }
.truck:first-child { border-top: 0; padding-top: 0; }
.truck-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.truck-head .btn { margin-left: auto; }
.truck-stops { margin: 8px 0; padding-left: 22px; }
.truck-stops li { margin: 3px 0; overflow-wrap: anywhere; }
.truck-odo { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.truck-odo label { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 600; }
.truck-odo input { width: 120px; }
.truck-mi { font-weight: 700; color: var(--ok-ink); }
.stop-truck { margin: 6px 0; }
.stop-truck label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.svc-bar { height: 10px; border-radius: 5px; background: var(--off-bg); overflow: hidden; }
.svc-bar span { display: block; height: 100%; }
.svc-ok .svc-bar span { background: #2e7d32; }
.svc-soon .svc-bar span { background: #e08a00; }
.svc-due .svc-bar span { background: #c62828; }
.svc-line { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; margin: 6px 0; }
.svc-line b { white-space: nowrap; }
@media (max-width: 560px) { .svc-line { grid-template-columns: 1fr auto; } .svc-line .svc-bar { grid-column: 1 / -1; grid-row: 2; } }
.cost-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.cost-dl dt { color: var(--muted); }
.cost-dl dd { margin: 0; }
/* v29: today's briefing */
.brief { margin-bottom: 22px; }
.brief-h { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 0 0 12px; }
.brief-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; align-items: start; }
@media (max-width: 860px) { .brief-grid { grid-template-columns: 1fr; } }
.brief-ev { padding: 10px 0; border-top: 1px solid var(--line); }
.brief-ev:first-of-type { border-top: 0; padding-top: 0; }
.brief-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.brief-top strong { overflow-wrap: anywhere; }
.brief-bal { margin-left: auto; font-size: 1rem; white-space: nowrap; }
.brief-meta { margin: 4px 0; color: var(--muted); font-size: .9rem; }
.brief-wx { display: flex; gap: 6px; align-items: center; font-size: .9rem; margin: 4px 0; }
.brief-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.brief-sub { margin: 16px 0 6px; }
.brief-truck { padding: 8px 0; border-top: 1px solid var(--line); }
.brief-truck:first-of-type { border-top: 0; padding-top: 0; }
/* v30: card on file */
.cof { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); margin-bottom: 12px; }
.cof-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.cof-form label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.btn.danger-soft { border-color: var(--err-ink); color: var(--err-ink); }
/* covering for another company */
.cover-sec { border-left: 4px solid var(--link); }
.cover-h { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 1.15rem; }
.cover-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mc-ev.mc-cover { background: var(--tint); color: var(--ink); border-left: 3px dashed var(--link); }
.mc-cover-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--link); }
.bo-msg { flex: 1 1 100%; display: flex; gap: 8px; align-items: center; }
.bo-msg input { flex: 1 1 auto; min-width: 0; }
/* v33: brand photos and watermarks */
.ph-set-h { margin: 14px 0 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ph-set-h:first-of-type { margin-top: 0; }
.wm-box { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.wm-box legend { font-weight: 700; padding: 0 6px; }
.wm-prev { background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.wm-sample { display: block; max-width: 100%; width: 520px; border-radius: var(--r); border: 1px solid var(--line); }
/* v34: client relationship */
.cr-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; align-items: start; }
@media (max-width: 860px) { .cr-grid { grid-template-columns: 1fr; } }
#relationship .check { display: flex; gap: 8px; margin: 6px 0; }
.note-form { display: grid; gap: 8px; margin-bottom: 12px; }
.note-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
details.note { border-top: 1px solid var(--line); padding: 8px 0; }
details.note summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.note-peek { color: var(--muted); font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 200px; }
details.note[open] .note-peek { display: none; }
.note-body { margin: 8px 0 2px; padding: 10px 12px; background: var(--soft); border-radius: var(--r); overflow-wrap: anywhere; }
/* v36: logo size slider */
.ls-row { display: flex; gap: 12px; align-items: center; }
.ls-range { flex: 1 1 auto; min-width: 0; }
.ls-out { font-weight: 700; min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.ls-ticks { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin: 0 calc(3.2em + 12px) 6px 0; }
.ls-ticks span:first-child { margin-left: -4px; } .ls-ticks span:last-child { margin-right: -10px; }
.ls-preview { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-bottom: 4px solid #1f2328; border-radius: var(--r); max-width: 560px; overflow: hidden; }
.ls-preview img { display: block; max-width: 100%; object-fit: contain; }
.ls-fake { display: grid; gap: 5px; justify-items: end; color: #1f2328; }
.ls-fake b { letter-spacing: .16em; font-size: .85rem; }
.ls-fake i { display: block; width: 90px; height: 6px; border-radius: 3px; background: #e3e5e8; }
.ls-fake i + i { width: 60px; }
/* v36: phone calendar */
.cal-link { display: flex; gap: 8px; align-items: center; }
.cal-link input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.cal-opts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; margin-top: 8px; }
.cal-btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* Note boxes that grow to fit */
textarea.autogrow { overflow-y: hidden; resize: vertical; min-height: 6.2em; }
/* Monthly snapshot */
.snap-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.snap-bar input[type=month] { width: auto; }
.snap-bar select { width: auto; max-width: 100%; }
.snap-spacer { flex: 1 1 auto; }
.snap-title { margin: 6px 0 2px; }
.snap-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.snap-tile { background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.snap-tile span { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.snap-tile b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.snap-tile small { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 860px) { .snap-grid { grid-template-columns: 1fr; } }
.snap-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.snap-tbl td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.snap-tbl td.num, .snap-year .num { text-align: right; white-space: nowrap; padding-left: 12px; }
.snap-total td { font-weight: 800; border-top: 2px solid var(--ink, #1b1e21); border-bottom: 0; }
.snap-year { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.snap-year th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 2px solid var(--line); }
.snap-year td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); }
.snap-year tr.on td { background: var(--soft); font-weight: 700; }
.snap-warn { color: #b3261e; font-weight: 600; }
.snap-owed { color: #b3261e; }
.snap-events summary { cursor: pointer; list-style: none; }
.snap-events summary h3 { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
@media print {
  .snap-bar, .subtabs, nav, header.top, .topbar { display: none !important; }
  .snap-events { display: block; }
  .snap-events > *:not(summary) { display: block; }
}
/* v37: imported from IO */
.flash.io-note { background: var(--soft); border-left: 4px solid #6a4c8c; }
.io-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.io-tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 2px solid var(--line); }
.io-tbl td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.io-tbl .num { text-align: right; white-space: nowrap; }
.io-tbl select { max-width: 100%; }
.io-ok { color: #2e7d32; font-weight: 700; }
.io-warn { color: #b3261e; font-weight: 700; }
.io-steps { display: grid; gap: 14px; }
.io-files li { margin: 4px 0; }
/* v38: shared payoff groups */
.pg-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pg-head h3 { margin: 0; }
.pg-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; margin-top: 6px; }
.pg-opt { display: flex; gap: 8px; padding: 4px 0; }
.pg-chip { display: inline-block; font-size: .82rem; padding: 2px 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); text-decoration: none; }
.ev-sort { margin: 4px 0 8px; font-size: .9rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ev-sort a { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: inherit; }
.ev-sort a.on { background: var(--ink, #1b1e21); color: #fff; border-color: var(--ink, #1b1e21); }
.events td.ev-qid { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
/* Events list: fit the page. Short things never wrap; the name column takes the rest. */
main:has(table.events) { max-width: 1400px; }
table.events th, table.events td { padding-left: 8px; padding-right: 8px; }
table.events th { white-space: nowrap; }
table.events td.ev-qid, table.events td.ev-date, table.events td.ev-time, table.events td.ev-total { white-space: nowrap; }
table.events td.ev-date .hint { font-size: .78rem; }
table.events td.flags { white-space: normal; width: 1%; }
table.events td.flags > * { display: inline-block; margin: 2px 4px 2px 0; }
table.events td.flags > * + * { margin-left: 0; }
table.events td.ev-brand { min-width: 7em; }
table.events td.ev-city { min-width: 6em; }
table.events td .ev-name { display: inline-block; min-width: 10em; }
table.events td.ev-city { white-space: nowrap; }
table.events .ev-time-in { display: none; }
/* Smaller laptops: the time moves under the date so the list doesn't scroll sideways. */
@media (max-width: 1240px) {
  table.events .col-time { display: none; }
  table.events .ev-time-in { display: inline; font-size: .85rem; color: var(--muted); }
}
@media (max-width: 1240px) {
  table.events th, table.events td { padding-left: 6px; padding-right: 6px; }
  table.events td .ev-name { min-width: 8em; }
  table.events td.ev-brand { min-width: 5em; }
}
@media (max-width: 1080px) { table.events td.ev-city { white-space: normal; min-width: 0; } }
/* Events filters: pick several statuses or brands */
.multi-pick { position: relative; }
.multi-pick > summary { list-style: none; cursor: pointer; padding: 9px 30px 9px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card, #fff); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; position: relative; }
.multi-pick > summary::-webkit-details-marker { display: none; }
.multi-pick > summary::after { content: "▾"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.multi-pick[open] > summary { border-color: var(--ink, #1b1e21); }
.multi-panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 220px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 24px rgba(0,0,0,.12); padding: 8px 12px 12px; display: grid; gap: 2px; }
.multi-panel .check { display: flex; gap: 8px; padding: 5px 0; white-space: nowrap; }
.multi-panel .btn { margin-top: 6px; }
/* Keep the filter menus inside the window */
.multi-panel { max-width: calc(100vw - 24px); max-height: 70vh; overflow-y: auto; box-sizing: border-box; }
.multi-panel.flip { left: auto; right: 0; }
.multi-panel .check input[type=checkbox] { width: 18px; height: 18px; min-width: 18px; flex: 0 0 18px; margin: 0; }
.multi-panel .check { align-items: center; }
/* Flags column: badges keep their own shape, and the check icon never shrinks away. */
table.events td.flags > .flag, table.events td.flags > .checkhold { display: inline-flex; }
table.events td.flags { min-width: 7.5em; }
.checkhold .ico { width: 20px; height: 14px; min-width: 20px; max-width: none; }
/* The date stays on one line; the smaller "entered …" line under it may wrap. */
table.events td.ev-date { white-space: normal; min-width: 8.5em; }
table.events td.ev-date > a { white-space: nowrap; }
@media (max-width: 1320px) {
  table.events .col-time { display: none; }
  table.events .ev-time-in { display: inline; font-size: .85rem; color: var(--muted); }
}
/* Venue types list */
.vt-list { list-style: decimal; padding-left: 1.6em; margin: 8px 0; display: grid; gap: 6px; max-width: 560px; }
.vt-row { display: flex; gap: 6px; align-items: center; }
.vt-row input { flex: 1 1 auto; min-width: 0; }
/* Venue types: one tidy row each — name, fee, tax, then the buttons, all on the same line */
.vt-list { list-style: none; padding-left: 0; max-width: 820px; }
.vt-head, .vt-row { display: grid; grid-template-columns: minmax(0, 1fr) 8.5em 8.5em auto; gap: 8px; align-items: center; }
.vt-head { max-width: 820px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 6px; }
.vt-row input, .vt-row select { width: 100%; min-width: 0; margin: 0; }
.vt-fee { display: flex; align-items: center; gap: 4px; }
.vt-btns { display: flex; gap: 6px; align-items: center; }
.vt-btns .btn { margin: 0; }
@media (max-width: 640px) {
  .vt-head { display: none; }
  .vt-row { grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  .vt-row > input[name="venue[]"] { grid-column: 1 / -1; }
  .vt-btns { grid-column: 1 / -1; }
}
.vt-head, .vt-row { grid-template-columns: minmax(0, 1fr) 8.5em 8.5em 11.5em; }
.vt-head, .vt-row { grid-template-columns: minmax(0, 1fr) 8.5rem 8.5rem 11.5rem; }
@media (max-width: 640px) { .vt-row { grid-template-columns: 1fr 1fr; } }

/* Inventory table and shared payoff on phones: each row becomes a small card with labels */
@media (max-width: 760px) {
  .stats-table thead { display: none; }
  .stats-table, .stats-table tbody, .stats-table tr, .stats-table td { display: block; width: 100%; }
  .stats-table tr { border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 10px; padding: 8px 10px; background: var(--card, #fff); }
  .stats-table tr.st-cat { border: 0; padding: 0; background: none; margin-top: 14px; }
  .stats-table tr.st-cat th { display: block; border-radius: var(--r); }
  .stats-table td { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border: 0; background: none !important; text-align: right; }
  .stats-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .85rem; text-align: left; flex: 0 0 auto; }
  .stats-table td.st-name, .stats-table td.pg-name { display: block; text-align: left; font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .stats-table td.pg-name .hint { display: block; font-weight: 400; margin-top: 2px; }
  .stats-table td.pg-edit-cell { justify-content: flex-end; }
  .stats-table td input, .stats-table td input[type=date] { max-width: 60%; width: auto; }
  .stats-table .paybar { min-width: 120px; }
  .table-wrap:has(.stats-table) { overflow: visible; }
}

/* Inventory table on computers: the column names stay at the top while you scroll the list */
@media (min-width: 761px) {
  .table-wrap:has(.st-sticky) { max-height: 78vh; overflow: auto; }
  .st-sticky thead th { position: sticky; top: 0; z-index: 2; background: var(--card, #fff); box-shadow: 0 1px 0 var(--line); }
}

/* Stats bars: long names wrap instead of being cut off */
.hbar-name { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }

/* Combination inventory */
.ci-jump { display: flex; gap: 14px; margin: 4px 0 14px; }
.ci-recipe { margin: 0 0 4px; line-height: 1.6; }
.ci-plus { color: var(--muted); margin: 0 4px; }
.cl-table tr.cl-combopart th { padding-left: 22px; font-weight: 400; }
.cl-table tr.cl-combopart th::before { content: "↳ "; color: var(--muted); }

/* Item rows switch to compact cards whenever their column is too narrow for the table (a phone, or the
   two-column layout on a smaller laptop) */
.ev-left { container-type: inline-size; container-name: evleft; }
@container evleft (max-width: 600px) {
  /* Item rows: name with how many are free beside it, then Qty, Each, Total and a small remove button */
  table.ev-lines, table.ev-lines tbody { display: block; width: 100%; }
  table.ev-lines thead { display: none; }
  table.ev-lines tr { display: grid; grid-template-columns: auto minmax(4rem, 1fr) auto auto; gap: 4px 8px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.ev-lines tbody tr:nth-child(even) td { background: none; }
  table.ev-lines td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; }
  table.ev-lines td:first-child { grid-column: 1 / 4; grid-row: 1; }
  table.ev-lines td[data-label="Avail"] { grid-column: 4; grid-row: 1; align-self: center; text-align: center; font-size: .8rem; min-width: 1.9rem; }
  table.ev-lines td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); line-height: 1.2; }
  table.ev-lines td[data-label="Avail"]:not(:has(span))::before { content: none; }
  table.ev-lines td[data-label="Qty"] { grid-column: 1; grid-row: 2; }
  table.ev-lines td[data-label="Each"] { grid-column: 2; grid-row: 2; }
  table.ev-lines td[data-label="Total"] { grid-column: 3; grid-row: 2; text-align: right; font-weight: 600; white-space: nowrap; }
  table.ev-lines td.rm { grid-column: 4; grid-row: 2; width: auto; text-align: right; }
  table.ev-lines td.rm:empty { display: block; }
  table.ev-lines input.tiny { width: 3.1rem; }
  table.ev-lines input.price { width: 100%; max-width: 6rem; }
  table.ev-lines input { font-size: .92rem; }
  /* Remove is a small ✕ (still says Remove to screen readers) */
  .ev-form .rm-box span { font-size: 0; width: 1.9rem; height: 1.9rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
  .ev-form .rm-box span::before { content: "✕"; font-size: .95rem; line-height: 1; }
  .ev-form .rm-space { width: 1.9rem; }
}
@media (max-width: 760px) {
  /* Remove is a small ✕ (still says Remove to screen readers) */
  .ev-form .rm-box span { font-size: 0; width: 1.9rem; height: 1.9rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
  .ev-form .rm-box span::before { content: "✕"; font-size: .95rem; line-height: 1; }
  .ev-form .rm-space { width: 1.9rem; }
}
@media (max-width: 360px) {
  table.ev-lines td[data-label="Total"] { font-size: .92rem; }
  table.ev-lines input.price, table.ev-lines input.tiny { font-size: .84rem; padding-left: 5px !important; padding-right: 5px !important; }
  table.ev-lines tr { gap: 4px 6px; }
}

/* ---------- Quote page on a phone, laid out like IO's: name big on top, date bar, compact item rows,
   fees right under the items, then the totals, and a bar of buttons stuck to the bottom. Nothing is cut off. ---------- */
.sb-short { display: none; }
.ev-form textarea.fee-wrap { resize: none; overflow: hidden; min-height: 0; line-height: 1.35; }
@media (max-width: 760px) {
  /* Name and number, big, on the left */
  .ev-top { grid-template-columns: minmax(0, 1fr); text-align: left; gap: 2px; margin: 0 0 10px; }
  .ev-back, .ev-num { justify-self: start; }
  .ev-back { font-size: .9rem; }
  .ev-title { text-align: left; font-size: 1.65rem; line-height: 1.12; overflow-wrap: anywhere; }
  .ev-num { font-size: 1.2rem; gap: 10px; }
  /* All five statuses on screen, wrapping instead of scrolling off the side */
  .status-tabs { flex-wrap: wrap; overflow: visible; justify-content: flex-start; gap: 6px; border-bottom: 0; margin: 0 0 12px; }
  .status-tabs .tab { flex: 1 1 auto; font-size: .8rem; letter-spacing: .02em; padding: 6px 8px; margin: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
  .status-tabs .tab.on { border-color: var(--tab); background: color-mix(in srgb, var(--tab) 12%, var(--card)); }
  /* Date bar: date on one line, start to end on the next, then overnight and brand */
  .ev-bar { padding: 10px; gap: 8px; margin-bottom: 12px; }
  .ev-when { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px 8px; width: 100%; }
  .ev-when > input[type=date] { grid-column: 1 / -1; max-width: none; width: 100%; }
  .ev-when > .check { grid-column: 1 / -1; }
  .ev-bar select.time-select { width: 100%; }
  .ev-where { width: 100%; }
  .ev-where select { width: 100%; }
  .ev-left, .ev-right { padding: 10px; }
  .ev-sec-h { margin: -10px -10px 10px; padding: 9px 12px; }
  /* Fees: the name wraps across the full width, then tax, amount and remove on one line */
  .ledger .lg-row { flex-wrap: wrap; gap: 6px 8px; padding: 6px 4px; }
  .lg-fee { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .lg-fee > .fee-name { grid-column: 1 / -1; width: 100%; }
  .lg-fee.lg-autofee { grid-template-columns: minmax(0, 1fr) auto auto; }
  .lg-fee.lg-autofee > .fee-name { grid-column: 1; }
  .lg-fee .tax-box { justify-self: start; }
  .lg-money { white-space: nowrap; }
  .lg-money input { width: 6.2rem !important; }
  /* Delivery: label on top, miles and the fee side by side */
  .lg-in { margin-left: 0; }
  .ledger .lg-row:has(> .lg-in) > span:first-child { flex: 1 1 100%; }
  .ledger .lg-row:has(> .lg-in) > .lg-money { margin-left: auto; }
  .ledger .lg-row > span:first-child:not(.lg-money):not(.lg-in):not(.lg-tax):not(.fee-name) { flex: 1 1 auto; }
  /* Tax: rate and Exempt on the left, the amount stays on the right */
  .lg-tax { flex: 1 1 0; gap: 4px 10px; }
  .lg-row > b, .lg-row > .lg-money { margin-left: auto; text-align: right; }
  .lg-row .lg-select { width: auto !important; max-width: 60%; margin-left: auto; }
  .lg-total { font-size: 1.05rem; }
  .ev-form { padding-bottom: 84px; }
  /* Buttons stuck to the bottom: Close, Contract, Confirm, Save, all visible, no scrolling sideways */
  .ev-savebar { padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); gap: 6px; display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .ev-savebar-right { display: flex; flex-wrap: nowrap; overflow: visible; gap: 6px; justify-content: flex-end; }
  .ev-savebar-right .btn.primary { order: 0; }
  .ev-savebar .btn { padding: 9px 12px; font-size: .9rem; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
  .sb-long { display: none; }
  .sb-short { display: inline; }
}
@media (max-width: 360px) {
  .ev-savebar .btn { padding: 8px 8px; font-size: .84rem; }
  .ev-form .frm input { font-size: .88rem; }
}

/* Stats → Reports */
.rp-jump { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 14px; font-size: .9rem; }
.rp-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.rp-h h3 { margin: 0; }
.rp-sort { font-size: .85rem; color: var(--muted); }
.rp-sort a { margin-left: 8px; }
.rp-sort a.on { color: var(--ink); font-weight: 700; text-decoration: none; }
.rp-card h3 { margin-top: 0; }
.rp-pop td:nth-child(2) { min-width: 9rem; }
.rp-heat { --h: 0; background: color-mix(in srgb, var(--bar) calc(var(--h) * 45%), transparent); }
.rp-busy, .rp-pop th:nth-child(9) { white-space: nowrap; padding-left: 14px !important; }
.rp-disc td, .rp-blank td { color: var(--muted); }
.rp-barcol { width: 28%; min-width: 5rem; }
.rp-barcol .hbar-track { display: block; }
.rp-no-m { display: none; }
/* Phones: each row becomes a small card (name on top, numbers in a 4-across grid underneath). */
@media (max-width: 600px) {
  .rp-tbl thead, .rp-tbl td.rp-units, .rp-tbl td.rp-barcol, .rp-tbl td.rp-no, .rp-tbl td.rp-hide-m { display: none; }
  .rp-no-m { display: inline; }
  .rp-tbl, .rp-tbl tbody { display: block; }
  .rp-tbl tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .rp-tbl td { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; min-width: 0; white-space: normal; }
  .rp-tbl td[data-l]::before { content: attr(data-l); display: block; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .rp-tbl td.rp-name { grid-column: 1 / -1; font-weight: 600; min-width: 0; }
  .rp-tbl td.rp-wide { grid-column: span 2; }
  .rp-tbl td.rp-heat { padding: 2px 6px !important; border-radius: 4px; }
  .rp-pop td.rp-q { order: 1; }
  .rp-pop td.rp-times { order: 2; }
  .rp-pop td.rp-busy { order: 2; padding-left: 0 !important; }
  .rp-pop td.rp-wide { order: 2; }
  .rp-tbl tr.snap-total { border-top: 2px solid var(--ink); }
  /* Money needs more room: fees and answers go two across. */
  .rp-fees tr, .rp-heard tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-fees td.rp-wide { grid-column: auto; }
  .rp-card .tbl-wrap { overflow: visible; }
}
@media print { .rp-card { break-inside: avoid; } }

/* Weather tab */
.wx-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.wx-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.wx-col-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.wx-col-h h2 { margin: 0 0 6px; font-size: 1.25rem; }
.wx-toggle { font-size: .85rem; }
.wx-day-h { margin: 16px 0 6px; font-size: 1rem; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.wx-state { margin: 16px 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wx-state:first-of-type { margin-top: 6px; }
.wxe { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin: 8px 0; }
.wxe-warn { border-color: #f7a928; box-shadow: inset 4px 0 0 #f7a928; }
.wxe-danger { border-color: #c62828; box-shadow: inset 4px 0 0 #c62828; }
.wxe-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wxe-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.wxe-sub { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.wxe .wx-line { margin: 8px 0 0; }
.wxe-none { margin: 6px 0 0; }
.wxc { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin: 8px 0; }
.wxc h4 { margin: 0 0 8px; font-size: 1rem; }
.wxc-none { margin: 0; }
.wxd { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wxd-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 6px; background: var(--soft); border: 2px solid transparent; text-align: center; font-variant-numeric: tabular-nums; min-width: 0; }
.wxd-warn { border-color: #f7a928; background: var(--warn-bg); }
.wxd-danger { border-color: #c62828; background: var(--err-bg); }
.wxd-abbr { display: none; }
.wxd-lo { color: var(--muted); }
.wxd-name { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wxd-ico { color: var(--ink); margin: 2px 0; }
.wxd-t { font-size: .85rem; white-space: nowrap; }
.wxd-t b { font-weight: 700; }
.wxd-p { font-size: .75rem; color: var(--link); }
.wxd-g { font-size: .68rem; font-weight: 700; color: var(--warn-ink); white-space: nowrap; }
.wxd-danger .wxd-g { color: var(--err-ink); }
.wx-key { padding: 0 5px; border-radius: 4px; border: 2px solid; }
.wx-key-warn { border-color: #f7a928; background: var(--warn-bg); }
.wx-key-danger { border-color: #c62828; background: var(--err-bg); }
.wx-edit { margin-top: 18px; }
.wx-edit summary { cursor: pointer; font-weight: 600; }
.wx-edit textarea { width: 100%; margin: 6px 0 10px; font-family: inherit; }
/* Desktop: your cities on the left, events on the right. Phones stack with events first. */
@media (min-width: 1001px) {
  .wx-col-cities { order: -1; }
}
@media (max-width: 1000px) {
  .wx-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .wx-col { padding: 12px; }
  .wxc { padding: 8px; }
  .wxd { gap: 2px; }
  .wxd-day { padding: 5px 0; border-width: 2px; }
  .wxd-ico { width: 20px; height: 20px; }
  .wxd-t { display: flex; flex-direction: column; line-height: 1.15; font-size: .82rem; }
  .wxd-lo { font-size: .72rem; color: var(--muted); }
  .wxd-p { font-size: .7rem; }
  .wxd-name { font-size: .66rem; letter-spacing: 0; }
  .wxd-full, .wxd-mph { display: none; }
  .wxd-abbr { display: inline; }
}

/* Settings → Tabs */
.tabs-set > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.tabs-set > summary h3 { margin: 0; display: inline; }
.tabs-list { list-style: none; padding: 0; margin: 10px 0 14px; max-width: 32rem; }
.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 6px; background: var(--card); }
.tabs-on { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.tabs-move { display: flex; gap: 4px; flex: none; }

/* Events → Quick send */
table.events td.qs-col { white-space: nowrap; }
.qs-form { margin: 0; }
.qs-btn { white-space: nowrap; }
.qs-sent { font-size: .82rem; color: var(--ok-ink); white-space: nowrap; }
.qs-dlg { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; max-width: min(26rem, calc(100vw - 32px)); background: var(--card); color: var(--ink); }
.qs-dlg::backdrop { background: rgba(0, 0, 0, .45); }
.qs-q { font-size: 1.1rem; font-weight: 600; margin: 0 0 12px; }
.qs-never { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
.qs-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 1240px) { table.events td.qs-col, .qs-btn, .qs-sent { white-space: normal; } table.events td.qs-col { min-width: 6.5em; } }

/* Search panel: a tab on the left edge; open, it pushes the page over (desktop) or fills the screen (phone). */
:root { --sp-w: 300px; }
.sp-phone-btn { display: none; background: none; border: 0; border-bottom: 3px solid transparent; font: inherit; font-size: .78rem; cursor: pointer; }
.sp-tab { position: fixed; z-index: 16; left: 0; top: calc(var(--sp-top, 64px) + 18px); display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; background: var(--card); color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,.1); cursor: pointer; font: inherit; font-size: .78rem; font-weight: 600; transition: left .18s ease; }
.sp-tab span { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .06em; }
.sp-tab .ico { width: 20px; height: 20px; }
.sp-tab:hover { background: var(--soft); }
.sp { position: fixed; z-index: 15; left: 0; top: var(--sp-top, 64px); bottom: 0; width: var(--sp-w); display: flex; flex-direction: column;
  background: var(--card); border-right: 1px solid var(--line); box-shadow: 2px 0 12px rgba(0,0,0,.06); transform: translateX(-100%); visibility: hidden;
  transition: transform .18s ease, visibility 0s linear .18s; }
.sp-head { display: flex; gap: 6px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.sp-head input { flex: 1 1 auto; min-width: 0; }
.sp-close { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); cursor: pointer; font-size: 1rem; }
.sp-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 12px 24px; overscroll-behavior: contain; }
.sp-body.sp-busy { opacity: .6; }
.sp-tip { margin-top: 12px; }
.sp-tip kbd, kbd { font: inherit; font-size: .85em; padding: 0 5px; border: 1px solid var(--input-line); border-bottom-width: 2px; border-radius: 4px; background: var(--soft); }
.sp-g { margin: 16px 0 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sp-list { list-style: none; margin: 0; padding: 0; }
.sp-hit { display: block; padding: 8px 8px; margin: 0 -8px; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.sp-hit:hover, .sp-hit:focus-visible { background: var(--tint); }
.sp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sp-l { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.sp-top .status { font-size: .75rem; flex: none; }
.sp-s { display: block; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.sp-page-form { display: flex; gap: 8px; max-width: 34rem; margin-bottom: 10px; }
.sp-page-form input { flex: 1 1 auto; min-width: 0; }
html.sp-open .sp { transform: none; visibility: visible; transition: transform .18s ease; }
@media (min-width: 761px) {
  html.sp-open body { padding-left: var(--sp-w); }
  html.sp-open .topbar { margin-left: calc(-1 * var(--sp-w)); }
  html.sp-open .sp-tab { left: var(--sp-w); }
}
@media (max-width: 760px) {
  .sp-tab { display: none; }
  .sp-phone-btn { display: flex; }
  .sp { top: 0; width: 100%; z-index: 100; border-right: 0; padding-top: env(safe-area-inset-top, 0px); }
  html.sp-open body { overflow: hidden; }
  .sp-head input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .sp, .sp-tab, html.sp-open .sp { transition: none; } }
@media print { .sp, .sp-tab, .sp-phone-btn { display: none !important; } }

/* Tax exempt certificate */
.tc-jump { font-size: .85rem; margin-left: 6px; white-space: nowrap; }
.tc-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; }
.tc-file { display: flex; flex-direction: column; gap: 4px; font-weight: 600; min-width: 0; max-width: 100%; }
.tc-file input { max-width: 100%; }
.ev-tax { width: auto; max-width: 100%; }
.ev-tax.on { border-color: var(--ink); font-weight: 600; }

/* Customer ratings */
.rate { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.6; vertical-align: middle; white-space: nowrap; border: 1px solid transparent; }
td .rate { margin-left: 6px; }
h1 .rate { font-size: .95rem; font-family: "Barlow", system-ui, sans-serif; }
.rate-gold { background: #fff3c4; border-color: #e0b100; color: #5a4300; }
.rate-green { background: var(--ok-bg); border-color: #7cc28e; color: var(--ok-ink); }
.rate-yellow { background: #fff8d6; border-color: #e8cf5a; color: #6b5600; }
.rate-red { background: var(--err-bg); border-color: #e29b94; color: var(--err-ink); }
.rate-none { background: var(--off-bg); color: var(--off-ink); }
.rate-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.rate-opt { position: relative; cursor: pointer; }
.rate-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-opt span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 600; font-size: .9rem; }
.rate-opt input:checked + span { border-color: var(--ink); }
.rate-opt.ro-gold input:checked + span { background: #fff3c4; border-color: #c99a00; }
.rate-opt.ro-green input:checked + span { background: var(--ok-bg); border-color: #3d9a57; }
.rate-opt.ro-yellow input:checked + span { background: #fff8d6; border-color: #c9a700; }
.rate-opt.ro-red input:checked + span { background: var(--err-bg); border-color: #c62828; }
.rate-opt.ro-none input:checked + span { background: var(--off-bg); border-color: var(--off-ink); }
.rate-opt input:focus-visible + span { outline: 3px solid var(--safety); outline-offset: 2px; }
.rate-why { display: block; font-weight: 600; margin: 4px 0 4px; }
#rating input[type=text] { width: 100%; }

/* Inventory list: names and categories get room, brands stay compact, nothing wraps letter by letter */
main:has(.inv-table) { max-width: 1400px; }
.inv-table td.inv-name { min-width: 11rem; }
.inv-table th, .inv-table td { padding-left: 7px; padding-right: 7px; }
.inv-table .qp input.qp-in { width: 5.4em; min-width: 5.4em; }
.inv-table td.inv-web .pill { font-size: .78rem; padding: 2px 8px; }
.inv-table td.inv-name strong { font-weight: 600; }
.inv-table td.inv-cat { min-width: 8rem; max-width: 11rem; color: var(--muted); font-size: .92rem; }
.inv-table td.inv-brands { min-width: 8rem; max-width: 15rem; }
.inv-table .inv-bn { display: block; margin-top: 3px; font-size: .75rem; line-height: 1.35; color: var(--muted); }
.inv-table td.inv-web .pill { white-space: nowrap; }
.inv-table td { vertical-align: middle; }
@media (max-width: 1240px) {
  .inv-table td.inv-name { min-width: 9.5rem; }
  .inv-table td.inv-cat { min-width: 7rem; }
  .inv-table .inv-bn { display: none; }
  .inv-table th, .inv-table td { padding-left: 5px; padding-right: 5px; }
}
@media (max-width: 1120px) {
  .inv-table .inv-thumb { display: none; }
  .inv-table td.inv-name { min-width: 8.5rem; }
  .inv-table td.inv-cat { min-width: 6rem; font-size: .85rem; }
  .inv-table td.inv-brands { min-width: 6rem; }
}
/* Phones: each item becomes a small card */
@media (max-width: 700px) {
  .inv-cards thead { display: none; }
  .inv-cards, .inv-cards tbody { display: block; }
  .inv-cards tr { display: grid; grid-template-columns: 28px repeat(4, minmax(0, 1fr)); gap: 6px 8px; padding: 12px 10px; border-bottom: 1px solid var(--line); align-items: end; }
  .inv-cards td { display: block; padding: 0 !important; border: 0 !important; text-align: left !important; min-width: 0 !important; max-width: none !important; }
  .inv-cards td[data-l]::before { content: attr(data-l); display: block; font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .inv-cards td.pick-col { grid-column: 1; grid-row: 1; align-self: start; width: auto; }
  .inv-cards td.inv-name { grid-column: 2 / -1; grid-row: 1; font-size: 1.05rem; }
  .inv-cards td.uc-cell { grid-column: 2 / 4; }
  .inv-cards td.inv-cat { grid-column: 4 / -1; font-size: .85rem; }
  .inv-cards td.inv-brands { grid-column: 2 / -1; }
  .inv-cards td.inv-brands .inv-bn { display: inline; margin-left: 6px; }
  .inv-cards td.inv-p1 { grid-column: 2 / 4; }
  .inv-cards td.inv-p2 { grid-column: 4; }
  .inv-cards td.inv-p3 { grid-column: 5; }
  .inv-cards td.qty-cell { grid-column: 2 / 4; }
  .inv-cards td.inv-web { grid-column: 4 / -1; align-self: center; }
  .inv-cards .qp { justify-content: flex-start; }
  .inv-cards .qty-btn { padding-left: 0; }
  .inv-cards td.inv-p2, .inv-cards td.inv-p3 { font-size: .88rem; white-space: nowrap; }
  .inv-cards tr { padding-right: 12px; }
}
.contact-req { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; }

/* Year-end thank you list */
.ye-bar { position: sticky; top: var(--sp-top, 64px); z-index: 5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 10px 14px; margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.ye-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ye-table td { vertical-align: top; }
.ye-table .pick-col input { width: 18px; height: 18px; margin-top: 3px; }
.ye-who { min-width: 11rem; }
.ye-evs { min-width: 14rem; font-size: .9rem; }
.ye-evs > div + div { margin-top: 4px; }
.ye-note { min-width: 10rem; max-width: 18rem; font-size: .88rem; }
.ye-mail { font-size: .88rem; overflow-wrap: anywhere; min-width: 9rem; }
.ye-table tr.ye-sent td { background: var(--soft); }

/* Venue history */
.vn-items { font-size: .9rem; min-width: 12rem; }
.vn-events tr.is-cancelled td { color: var(--muted); }
.resign-box form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.old-contracts { list-style: none; padding: 0; margin: 0 0 12px; }
.old-contracts li { padding: 4px 0; font-size: .92rem; }
input.uc-field { font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .03em; }
.bulk-price { display: inline-flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.bulk-price[hidden] { display: none; }
.bulk-amt { width: 6.5em !important; text-align: right; }
.bulk-unit { color: var(--muted); font-weight: 600; }
.bulk-price-hint { flex-basis: 100%; margin: 0; }

/* Item page: add-ons */
.ao-switch { font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.ao-switch .hint { font-weight: 400; }
.ao-body { margin-top: 12px; }
.ao-none { max-width: 26rem; }
.ao-head, .ao-row { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem 7.5rem auto; gap: 8px; align-items: center; }
.ao-head { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 4px; }
.ao-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.ao-row input[type=text] { width: 100%; }
.ao-row .price-row input { width: 100%; }
.ao-whole { margin: 0; white-space: nowrap; }
.ao-move { display: flex; gap: 4px; }
@media (max-width: 640px) {
  .ao-head { display: none; }
  .ao-row { grid-template-columns: minmax(0, 1fr) 7rem; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .ao-row > input[type=text] { grid-column: 1 / -1; }
  .ao-move { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Quote page: add-ons for each machine */
.ev-addons { margin: 12px 0 6px; display: grid; gap: 10px; }
.evao { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px 10px; margin: 0; min-width: 0; }
.evao legend { font-weight: 600; padding: 0 4px; }
.evao legend .hint { font-weight: 400; font-size: .82rem; }
.evao-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 6px 0; border-top: 1px dashed var(--line); }
.evao-m:first-of-type { border-top: 0; }
.evao-n { font-weight: 700; min-width: 1.8rem; color: var(--muted); }
.evao-n:empty { display: none; }
.evao .check { margin: 0; }
.evao-none { color: var(--muted); }
.evao-hint { margin: 0; }
.ao-single { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 0 0 10px; }
.ev-multi { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.ev-multi input { width: auto; }
.ev-days { align-self: center; }
.ev-when > .ev-multi, .ev-when > .ev-days { grid-column: 1 / -1; }
.approve-box form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

/* Events list, laid out like IO's Leads/Events: filters down the left, a results bar, a dense striped table */
main:has(.evl table.events), main:has(.evl) { max-width: 2200px; }
.evl table.events td a { text-decoration: none; }
.evl table.events td a:hover { text-decoration: underline; }
.evl table.events td .ev-name { font-weight: 600; }
.evl table.events td:nth-child(5) { min-width: 11rem; }
.evl table.events .ev-date a { color: var(--ink); white-space: nowrap; }
.evl { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: start; }
html.evl-hidden .evl { grid-template-columns: minmax(0, 1fr); }
html.evl-hidden .evl-side { display: none; }
.evl-side { position: sticky; top: calc(var(--sp-top, 64px) + 12px); max-height: calc(100vh - var(--sp-top, 64px) - 24px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.evl-filters { display: grid; gap: 14px; }
.evl-top { display: flex; justify-content: space-between; align-items: baseline; }
.evl-search { width: 100%; }
.evl-group { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; min-width: 0; }
.evl-group legend { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; padding: 0; }
.evl-group .check { margin: 0; font-size: .92rem; }
.evl-group .status { font-size: .78rem; }
.evl-custom { margin-top: 2px; }
.evl-custom summary { cursor: pointer; font-size: .82rem; color: var(--muted); font-weight: 600; list-style-position: inside; }
.evl-custom summary:hover { color: var(--ink); }
.evl-custom-on { color: var(--safety, #f5b700); font-size: 1.1em; }
.evl-custom .evl-dates { margin-top: 8px; }
.evl-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.evl-dates label { display: grid; gap: 2px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.evl-dates input { width: 100%; min-width: 0; font-size: .85rem; padding: 7px 8px; box-sizing: border-box; }
.evl-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.evl-quick a { padding: 3px 9px; border: 1px solid var(--input-line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--card); font-size: .8rem; }
.evl-quick a.on { background: var(--asphalt); border-color: var(--asphalt); color: #fff; font-weight: 600; }
.evl-past { font-size: .85rem; margin-top: 6px; }
.evl-group select { width: 100%; }
.evl-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.evl-main { min-width: 0; }
.evl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 10px; }
.evl-h { margin: 0; font-size: 1.6rem; }
.evl-count { color: var(--muted); }
.evl-count strong { color: var(--ink); }
.evl-sort { font-size: .88rem; color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.evl-sort a { text-decoration: none; }
.evl-sort a.on { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--safety); }
.evl-btns { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.evl-show-btn { display: none; }
html.evl-hidden .evl-show-btn { display: inline-flex; }
/* The table: compact, striped, sticky header */
.evl table.events { font-size: .92rem; }
.evl table.events thead th { position: sticky; top: 0; z-index: 2; background: var(--soft); font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 9px; padding-bottom: 9px; }
.evl table.events td { padding-top: 7px; padding-bottom: 7px; }
.evl table.events tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--soft) 55%, var(--card)); }
.evl table.events tbody tr:hover td { background: var(--tint); }
.evl table.events td.ev-qid a { color: var(--muted); font-variant-numeric: tabular-nums; text-decoration: none; }
.evl table.events td.ev-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.evl table.events tr.unread td { font-weight: 700; }
.evl .table-wrap { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
@media (max-width: 900px) {
  .evl { grid-template-columns: minmax(0, 1fr); }
  .evl-side { display: none; position: static; max-height: none; }
  html.evl-open .evl-side { display: block; }
  html.evl-hidden .evl-side { display: none; }
  html.evl-hidden.evl-open .evl-side { display: block; }
  .evl-show-btn { display: inline-flex; }
  .evl-btns { margin-left: 0; width: 100%; }
}
@media print { .evl-side, .evl-bar .evl-btns, .evl-show-btn { display: none !important; } .evl { display: block; } }
/* Narrower screens: the time goes under the date so the whole row fits without scrolling sideways */
@media (max-width: 1700px) {
  .evl table.events .col-time { display: none; }
  .evl table.events .ev-time-in { display: inline; font-size: .82rem; color: var(--muted); font-weight: 400; }
}
.evl table.events td.flags:empty { padding: 0; }
.evl table.events td.flags { max-width: 9rem; min-width: 4.5rem; }
/* A long badge ("🚚 Partner helping") wraps inside its cell instead of running over the customer name. */
.evl table.events td.flags > .flag { white-space: normal; max-width: 100%; line-height: 1.2; text-align: left; border-radius: 10px; }
.evl table.events td.flags { overflow: hidden; }
.evl table.events td.qs-col, .evl table.events th.qs-col { white-space: normal; min-width: 0; width: 1%; }
.evl table.events .qs-btn { white-space: normal; text-align: center; line-height: 1.2; padding: 6px 9px; }
.evl table.events td.ev-city { white-space: normal; min-width: 6rem; }
.evl table.events th:nth-child(4) { width: 1%; }
/* Smaller laptops: the filters fold away behind the ☰ Filters button, so the list gets the whole width. */
@media (max-width: 1400px) {
  .evl { grid-template-columns: minmax(0, 1fr); }
  .evl-side { display: none; position: static; max-height: none; }
  html.evl-open .evl-side { display: block; }
  .evl-show-btn { display: inline-flex; }
}

@media (max-width: 1150px) { .evl table.events .ev-qid { display: none; } }
/* Phones: each event becomes a small card */
@media (max-width: 700px) {
  .evl table.events thead { display: none; }
  .evl table.events, .evl table.events tbody { display: block; }
  .evl table.events tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .evl table.events tbody tr:nth-child(even) td { background: transparent; }
  .evl table.events tbody tr:nth-child(even) { background: color-mix(in srgb, var(--soft) 55%, var(--card)); }
  .evl table.events td { display: block; padding: 0 !important; border: 0 !important; min-width: 0 !important; text-align: left; }
  .evl table.events td.pick-col, .evl table.events td.ev-qid, .evl table.events td.col-time { display: none; }
  .evl table.events td.ev-who { grid-column: 1; grid-row: 1; font-size: 1rem; }
  .evl table.events td.ev-st { grid-column: 2; grid-row: 1; justify-self: end; }
  .evl table.events td.ev-date { grid-column: 1; grid-row: 2; font-size: .88rem; }
  .evl table.events td.ev-date .ev-time-in br { display: none; }
  .evl table.events td.ev-date .ev-time-in::before { content: " · "; }
  .evl table.events td.ev-total { grid-column: 2; grid-row: 2; justify-self: end; text-align: right; }
  .evl table.events td.ev-city, .evl table.events td.ev-brand { grid-column: 1; font-size: .82rem; color: var(--muted); display: inline; }
  .evl table.events td.ev-brand::before { content: ""; }
  .evl table.events td.flags { grid-column: 1 / -1; max-width: none; }
  .evl table.events td.flags:empty { display: none; }
  .evl table.events td.qs-col { grid-column: 1 / -1; width: auto; }
  .evl table.events td.qs-col:empty { display: none; }
  .evl .table-wrap { overflow: visible; }
}

/* Event page: the Email button's pop-up */
.em-dlg { border: 1px solid var(--line); border-radius: var(--r); padding: 0; width: min(40rem, calc(100vw - 24px)); background: var(--card); color: var(--ink); }
.em-dlg::backdrop { background: rgba(0, 0, 0, .45); }
.em-form { display: grid; gap: 6px; padding: 18px 20px 20px; }
.em-form label:not(.check) { font-weight: 600; margin-top: 6px; }
.em-form input[type=text], .em-form textarea, .em-form select { width: 100%; }
.em-form textarea { resize: vertical; min-height: 12rem; font: inherit; }
.em-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.em-head h3 { margin: 0; }
.em-x { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--r); width: 36px; height: 36px; cursor: pointer; }
.em-to { margin: 0; }
.em-opts { display: grid; gap: 4px; margin-top: 6px; }
.em-opts .check { margin: 0; }
.em-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* Events list: clearer rows. Stronger stripes, a line between rows, and a colored edge for each row's status. */
.evl table.events tbody tr td { border-bottom: 1px solid var(--line); }
.evl table.events tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--asphalt) 7%, var(--card)); }
.evl table.events tbody tr:nth-child(odd) td { background: var(--card); }
.evl table.events tbody tr:hover td { background: color-mix(in srgb, var(--safety) 16%, var(--card)); }
.evl table.events tbody tr td:first-child { box-shadow: inset 5px 0 0 var(--evr, transparent); }
.evl tr.evr-quote      { --evr: #1b1e21; }
.evl tr.evr-contracted { --evr: #e08a2c; }
.evl tr.evr-confirmed  { --evr: #2e9b4a; }
.evl tr.evr-completed  { --evr: #7a5cc4; }
.evl tr.evr-cancelled  { --evr: #d0473e; }
.evl table.events tr.is-cancelled td { opacity: .72; }
@media (max-width: 700px) {
  .evl table.events tbody tr { box-shadow: inset 5px 0 0 var(--evr, transparent); border-bottom: 1px solid var(--line); }
  .evl table.events tbody tr:nth-child(even) { background: color-mix(in srgb, var(--asphalt) 7%, var(--card)); }
  .evl table.events tbody tr td:first-child { box-shadow: none; }
  .evl table.events tbody tr td { border-bottom: 0; background: transparent !important; }
  .evl table.events tbody tr:hover { background: color-mix(in srgb, var(--safety) 16%, var(--card)); }
}

/* Blackout dates page */
.bo-form .seg { align-self: flex-start; width: max-content; max-width: 100%; }
.bo-form .grid { align-items: start; }
.bo-form .field.wide .seg + .hint { display: block; }
.bo-list { padding: 4px 18px; }
.bo-list li { padding: 14px 0; gap: 8px 14px; }
.bo-list .ho-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.bo-when { font-size: 1.02rem; }
.bo-why { color: var(--muted); }
.bo-co { font-size: .78rem; }
.bo-msg { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.bo-msg input { flex: 1 1 18rem; min-width: 0; }
.bo-msg .btn { white-space: nowrap; flex: none; }
@media (max-width: 600px) {
  .bo-list { padding: 2px 12px; }
  .bo-msg .btn { width: 100%; }
}
.bo-acts { display: inline-flex; align-items: center; gap: 12px; }
.bo-editing { border-color: var(--safety); box-shadow: 0 0 0 2px var(--safety); }
/* Sortable column headings */
th .th-sort { color: inherit; text-decoration: none; white-space: nowrap; }
th .th-sort:hover { text-decoration: underline; }
th.sort-on .th-sort { color: var(--ink); font-weight: 700; }
th .th-arrow { font-size: .75em; }
.cu-then { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.cu-then select { width: auto; min-width: 0; }
/* Any list: click a column heading to sort (the one before becomes the second sort) */
th.th-click { cursor: pointer; user-select: none; }
th.th-click:hover { color: var(--ink); }
th.th-click:focus-visible { outline: 3px solid var(--safety); outline-offset: -3px; }
th .th-mark { margin-left: 4px; font-size: .72em; color: var(--ink); white-space: nowrap; }
th .th-mark2 { opacity: .55; }

/* Stats → Inventory table: use the full page width, give names room, and let the page scroll (not a box inside it) */
main:has(#stats-table) { max-width: 1800px; }
.stats-table td.st-name, .stats-table td.pg-name { min-width: 13rem; }
.stats-table td.st-name a { white-space: normal; }
.stats-table td.pg-edit-cell { white-space: nowrap; width: 1%; }
.stats-table td.pg-edit-cell .linkbtn { white-space: nowrap; }
.stats-table.pg-table td.pg-name .hint { display: block; max-width: 46rem; }
@media (min-width: 1200px) {
  .table-wrap:has(.st-sticky) { max-height: none; overflow: visible; }
  .st-sticky thead th { top: var(--sp-top, 64px); }
}
@media (min-width: 1200px) and (max-width: 1400px) {
  #stats-table td.st-name { min-width: 10rem; }
  #stats-table input[type=date] { width: 128px; }
  #stats-table input.st-price { width: 84px; }
  #stats-table td { padding-left: 6px; padding-right: 6px; }
  #stats-table th { padding-left: 6px; padding-right: 6px; }
}
@media (min-width: 1200px) {
  #stats-table td.calc { white-space: nowrap; }
  #stats-table input[type=date] { width: 138px; }
  #stats-table td { padding-left: 8px; padding-right: 8px; }
}

/* Events list: booked statuses get a light tint across the whole row (quotes keep the white/gray stripes) */
.evl tr.evr-contracted { --evr-bg: #fdf0e1; --evr-bg2: #fae6cf; }
.evl tr.evr-confirmed  { --evr-bg: #e6f4e8; --evr-bg2: #d9eedc; }
.evl tr.evr-completed  { --evr-bg: #efeaf9; --evr-bg2: #e6def5; }
.evl tr.evr-cancelled  { --evr-bg: #fbe6e3; --evr-bg2: #f7dad5; }
.evl table.events tbody tr:is(.evr-contracted, .evr-confirmed, .evr-completed, .evr-cancelled):nth-child(odd) td { background: var(--evr-bg); }
.evl table.events tbody tr:is(.evr-contracted, .evr-confirmed, .evr-completed, .evr-cancelled):nth-child(even) td { background: var(--evr-bg2); }
.evl table.events tbody tr:hover td { background: color-mix(in srgb, var(--safety) 16%, var(--card)) !important; }
.evl table.events tr.is-cancelled td { opacity: 1; color: color-mix(in srgb, var(--ink) 70%, transparent); }
[data-theme="night"] .evl tr.evr-contracted { --evr-bg: rgba(224,138,44,.12); --evr-bg2: rgba(224,138,44,.17); }
[data-theme="night"] .evl tr.evr-confirmed  { --evr-bg: rgba(46,155,74,.13); --evr-bg2: rgba(46,155,74,.18); }
[data-theme="night"] .evl tr.evr-completed  { --evr-bg: rgba(122,92,196,.14); --evr-bg2: rgba(122,92,196,.19); }
[data-theme="night"] .evl tr.evr-cancelled  { --evr-bg: rgba(208,71,62,.14); --evr-bg2: rgba(208,71,62,.19); }
@media (max-width: 700px) {
  .evl table.events tbody tr:is(.evr-contracted, .evr-confirmed, .evr-completed, .evr-cancelled):nth-child(odd) { background: var(--evr-bg); }
  .evl table.events tbody tr:is(.evr-contracted, .evr-confirmed, .evr-completed, .evr-cancelled):nth-child(even) { background: var(--evr-bg2); }
}
.rs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.rs-grid label, .em-form > label { display: grid; gap: 4px; font-weight: 600; }
.rs-grid input { width: 100%; }
.rs-rule { margin: 0; }
.rs-open { white-space: nowrap; }
@media (max-width: 480px) { .rs-grid { grid-template-columns: minmax(0, 1fr); } }
.ev-when > .rs-open { grid-column: 1 / -1; justify-self: start; }
.em-opts .check { display: block; }
.em-opts .check .hint { display: inline; }
.em-form .price-row { max-width: 11rem; }
.rs-grid label .hint, .em-form > label .hint { font-weight: 400; }

/* ---------- Five calmer themes (My settings → User interface). The quote page uses plain white boxes,
   white inputs, and thin accent lines under the section headings instead of colored bars. ---------- */
[data-theme="navygold"] {
  --asphalt: #1f2d4d; --asphalt-2: #2b3b60; --ground: #f4f6f9; --card: #ffffff; --line: #dde2ea;
  --ink: #1f2d4d; --muted: #5a6478; --safety: #f5b700; --safety-ink: #2a2200;
  --link: #1d4f91; --accent2: #1f2d4d; --soft: #f7f8fb; --soft-2: #e7ebf1; --tint: #fff4cc;
  --input-line: #c3cad6; --bar: #1f2d4d; --note-bg: #fff7dc; --sec-line: #f5b700;
}
[data-theme="charcoal"] {
  --asphalt: #2a2d31; --asphalt-2: #373b40; --ground: #f3f2f0; --card: #ffffff; --line: #e0ddd8;
  --ink: #2a2d31; --muted: #62666b; --safety: #e2702b; --safety-ink: #ffffff;
  --link: #b3521a; --accent2: #2a2d31; --soft: #f8f7f5; --soft-2: #eae7e2; --tint: #fde5d6;
  --input-line: #c6c2bb; --bar: #2a2d31; --note-bg: #fdeee2; --sec-line: #e2702b;
}
[data-theme="forest"] {
  --asphalt: #1f4d3a; --asphalt-2: #2a5e48; --ground: #f7f4ec; --card: #fffdf8; --line: #e3dccb;
  --ink: #24302a; --muted: #5e6a62; --safety: #b8893b; --safety-ink: #ffffff;
  --link: #1f6b46; --accent2: #1f4d3a; --soft: #faf8f2; --soft-2: #ece6d6; --tint: #e3efe7;
  --input-line: #cbc3ae; --bar: #1f4d3a; --note-bg: #f8efd8; --sec-line: #b8893b;
}
[data-theme="slateblue"] {
  --asphalt: #2c3e50; --asphalt-2: #3a5068; --ground: #f2f4f7; --card: #ffffff; --line: #dbe1ea;
  --ink: #2c3e50; --muted: #5d6b7a; --safety: #4a74b3; --safety-ink: #ffffff;
  --link: #2f62a8; --accent2: #2c3e50; --soft: #f6f8fa; --soft-2: #e8edf3; --tint: #e6eef8;
  --input-line: #c2ccd8; --bar: #4a74b3; --note-bg: #eef3fa; --sec-line: #4a74b3; --sec-bg: #e8edf3;
}
[data-theme="mono"] {
  --asphalt: #111111; --asphalt-2: #2a2a2a; --ground: #f5f5f5; --card: #ffffff; --line: #e2e2e2;
  --ink: #111111; --muted: #5f5f5f; --safety: #111111; --safety-ink: #ffffff;
  --link: #111111; --accent2: #111111; --soft: #f8f8f8; --soft-2: #ececec; --tint: #ececec;
  --input-line: #c4c4c4; --bar: #111111; --note-bg: #f3f3f3; --sec-line: #111111;
}
:is([data-theme="navygold"], [data-theme="charcoal"], [data-theme="forest"], [data-theme="slateblue"], [data-theme="mono"]) :is(.ev-sec-items, .ev-sec-event, .ev-sec-cust) {
  background: var(--sec-bg, transparent); color: var(--ink); box-shadow: inset 0 -2px 0 var(--sec-line) !important; letter-spacing: .05em;
}
:is([data-theme="navygold"], [data-theme="charcoal"], [data-theme="forest"], [data-theme="slateblue"], [data-theme="mono"]) .ev-sec-h .ev-edit-btn { color: var(--ink); border-color: var(--input-line); background: var(--card); }
:is([data-theme="navygold"], [data-theme="charcoal"], [data-theme="forest"], [data-theme="slateblue"], [data-theme="mono"]) .ev-pay .ev-pay-head {
  background: var(--sec-bg, transparent); color: var(--ink); box-shadow: inset 0 -2px 0 var(--sec-line);
}
:is([data-theme="navygold"], [data-theme="charcoal"], [data-theme="forest"], [data-theme="slateblue"], [data-theme="mono"]) .ev-pay .ev-pay-head h3 { color: var(--ink); }
html:is([data-theme="navygold"], [data-theme="charcoal"], [data-theme="forest"], [data-theme="slateblue"], [data-theme="mono"]) .ev-right .ev-zone.is-locked-zone :is(input, select, textarea),
html:is([data-theme="navygold"], [data-theme="charcoal"], [data-theme="forest"], [data-theme="slateblue"], [data-theme="mono"]) .ev-cols .ev-left.is-locked-zone :is(input, select, textarea) { --bub-bg: var(--card); --bub-line: var(--input-line); }
html:is([data-theme="navygold"], [data-theme="charcoal"], [data-theme="forest"], [data-theme="slateblue"], [data-theme="mono"]) .ev-bar.is-locked-zone :is(input, select) { --bub-bg: rgba(255,255,255,.12); --bub-line: rgba(255,255,255,.35); }
:is([data-theme="navygold"], [data-theme="charcoal"], [data-theme="forest"], [data-theme="slateblue"], [data-theme="mono"]) .ev-box { background: var(--card); border: 1px solid var(--line); }
[data-theme="mono"] a { text-decoration-color: #999; }
[data-theme="mono"] .btn.primary { background: #111; color: #fff; border-color: #111; }
.cal-cos { display: grid; gap: 8px; margin-bottom: 12px; }
.cal-co { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cal-co-name { font-weight: 600; }
@media (max-width: 600px) { .cal-co { grid-template-columns: minmax(0, 1fr) auto; } .cal-co-name { grid-column: 1 / -1; } }

/* Dashboard: IO-style boxes (two columns on computers) */
main:has(.db-grid) { max-width: 2200px; }
.db-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 22px; }
.db-col { display: grid; gap: 18px; min-width: 0; }
.db-card { margin: 0; min-width: 0; }
.db-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 10px; }
.db-h h3 { margin: 0; font-size: 1.25rem; }
.db-h form { margin: 0; }
.db-h select { width: auto; }
.db-table { width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
.db-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.db-table td, .db-table th { padding: 6px 8px; }
.db-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--asphalt) 6%, var(--card)); }
.db-table td a { text-decoration: none; }
.db-table td a:hover { text-decoration: underline; }
.db-tot td { font-weight: 700; border-bottom: 2px solid var(--asphalt); color: var(--ok-ink); }
.db-scroll { max-height: 26rem; overflow-y: auto; }
.db-due { color: var(--err-ink); font-weight: 600; }
.db-ok { color: var(--ok-ink); }
.db-gr-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 4px 4px; }
.db-gr-pct { font-size: 4.2rem; font-weight: 700; line-height: 1; color: var(--ok-ink); display: flex; align-items: flex-start; gap: 6px; }
.db-gr-pct small { font-size: .5em; margin-top: .1em; }
.db-gr-pct.down { color: var(--err-ink); }
.db-arrow { font-size: .7em; align-self: center; }
.db-gr-side { display: grid; gap: 6px; text-align: right; }
.db-gr-side strong { font-size: 1.6rem; display: block; }
.db-lbl { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.db-donut { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.db-donut svg { flex: none; width: 200px; height: 200px; }
.db-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; flex: 1 1 14rem; font-size: .88rem; }
.db-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.db-dot { width: 12px; height: 12px; border-radius: 50%; }
.db-lv { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .db-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .db-gr-pct { font-size: 3.2rem; } .db-gr-side { text-align: left; } }
/* Donut: hover a slice or legend row */
.db-slice { cursor: pointer; transition: opacity .15s, stroke-width .15s; outline: none; }
.db-slice.dim { opacity: .35; }
.db-slice.on { stroke-width: 40; }
.db-mid-l { font-size: 11px; fill: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.db-mid-v { font-size: 14px; font-weight: 700; fill: var(--ink); }
.db-legend li { cursor: default; padding: 2px 4px; border-radius: 4px; }
.db-legend li.on { background: var(--soft-2); }
/* Sales: a clear line between the totals and January */
.db-tot td { background: color-mix(in srgb, var(--ok-ink) 7%, var(--card)); border-bottom: 3px solid var(--link) !important; }
.db-table thead tr:first-child th { border-bottom: 1px solid var(--line); }
/* Coming events: confirmed rows green, contracted rows blue, with a Status column */
.db-table tbody tr.db-st-confirmed td  { background: #e4f3e7 !important; }
.db-table tbody tr.db-st-confirmed:nth-child(even) td { background: #d8eedc !important; }
.db-table tbody tr.db-st-contracted td { background: #e5eefa !important; }
.db-table tbody tr.db-st-contracted:nth-child(even) td { background: #d9e6f7 !important; }
.db-table tbody tr.db-st-confirmed td:first-child  { box-shadow: inset 4px 0 0 #2e9b4a; }
.db-table tbody tr.db-st-contracted td:first-child { box-shadow: inset 4px 0 0 #3a6fc4; }
.db-pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.db-pill-confirmed  { background: #c9ead1; color: #1d5e2f; }
.db-pill-contracted { background: #cddcf5; color: #1f4a8a; }
.db-pill-completed  { background: #e0d5c3; color: #6b4e1f; }
.db-table tbody tr.db-st-completed td:first-child { box-shadow: inset 4px 0 0 #8a6d3b; }
[data-theme="night"] .db-table tbody tr.db-st-confirmed td  { background: rgba(46,155,74,.15) !important; }
[data-theme="night"] .db-table tbody tr.db-st-contracted td { background: rgba(58,111,196,.18) !important; }
.db-quotes th.db-yr { text-align: center; border-bottom: 1px solid var(--line); color: var(--ink); }
.db-quotes td.db-rate { color: var(--muted); }
.db-quotes tr.db-now td { font-weight: 700; }
.db-quotes td:nth-child(4), .db-quotes th:nth-child(4) { border-right: 1px solid var(--line); }
/* Website Tools: shortcode list */
.sc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sc-acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.sc-table input.sc-code { width: 100%; min-width: 16rem; font-family: ui-monospace, Menlo, monospace; font-size: .88rem; }
.sc-more { margin-top: 14px; }
.sc-other { margin: 8px 0 0; padding-left: 1.2em; }
.sc-other li { margin: 4px 0; }
/* Item page: photo details (alt text etc.) under each photo */
.photo .ph-meta { margin-top: 6px; font-size: .85rem; }
.photo .ph-meta summary { cursor: pointer; font-weight: 600; }
.photo .ph-meta label { display: grid; gap: 3px; margin-top: 6px; font-weight: 600; }
.photo .ph-meta label .hint { font-weight: 400; }
.photo .ph-meta textarea, .photo .ph-meta input { width: 100%; font: inherit; font-size: .85rem; }
/* Inventory: sections and retired items */
.inv-sec-h { margin: 28px 0 8px; font-size: 1.2rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.inv-sec-h .hint { font-size: .85rem; font-weight: 400; }
.inv-views { margin-bottom: 12px; }
.ret-table td.ret-up { color: var(--ok-ink); font-weight: 700; }
.ret-table td.ret-down { color: var(--err-ink); font-weight: 700; }
.ret-card { border-color: var(--line); }
.ret-card.is-retired { border-left: 5px solid #9aa4ad; }
.ret-form .actions { margin-top: 6px; }
.danger-btn { border-color: #d0473e; color: #b3261e; }
/* Add several items at once (Combination inventory) */
.ms-list { max-height: 55vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; }
.ms-cat { border: 0; padding: 4px 0 8px; margin: 0; }
.ms-cat legend { font-weight: 700; padding: 0; }
.ms-it { display: flex; margin: 3px 0 3px 22px; }
.ms-it[hidden], .ms-it.ms-off { display: none; }
.ms-n { margin-right: auto; align-self: center; }
.xcat-field summary { cursor: pointer; }
.xcat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 4px 14px; margin: 8px 0; }
.xcat-list .check { margin: 0; }
/* Dashboard: Outstanding balance (past due on top, upcoming under it) */
.db-owed-tot { margin-left: auto; font-weight: 800; color: var(--err-ink); font-size: 1.1rem; }
.db-ow-h { margin: 10px 0 6px; font-size: 1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.db-ow-h br { flex-basis: 100%; content: ""; }
.db-ow-h .hint { font-weight: 400; font-size: .82rem; }
.db-ow-sum { margin-left: auto; font-weight: 800; }
.db-ow-past { color: var(--err-ink); }
.db-table tbody tr.db-st-pastdue td { background: #fbe6e3 !important; }
.db-table tbody tr.db-st-pastdue:nth-child(even) td { background: #f7dad5 !important; }
.db-table tbody tr.db-st-pastdue td:first-child { box-shadow: inset 4px 0 0 #d0473e; }
[data-theme="night"] .db-table tbody tr.db-st-pastdue td { background: rgba(208,71,62,.16) !important; }
.db-cover { margin-bottom: 22px; }
.db-od-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; font-size: .85rem; }
.db-od-filter label { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.db-od-filter input[type=date] { width: auto; font-size: .85rem; padding: 4px 6px; }
/* Dashboard boxes in your own order: they fill the left column top to bottom, then the right */
.db-head-acts { display: flex; justify-content: flex-end; margin: -6px 0 8px; }
.db-grid.db-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
/* Side-by-side boxes match heights, so each row lines up evenly. */
.db-flow .db-slot { display: flex; flex-direction: column; min-width: 0; }
.db-flow .db-slot > .card { margin: 0; flex: 1 1 auto; }
/* Inside a stretched box, the chart or main number grows into the extra room instead of leaving a gap underneath. */
.db-flow .db-slot > .db-card { display: flex; flex-direction: column; }
.db-flow .db-card > .db-h { flex: none; }
.db-flow .db-card > .db-gr-body, .db-flow .db-card > .db-donut { flex: 1 1 auto; align-content: center; }
.db-flow .db-card > .db-gr-body { align-items: center; }
.db-flow .db-card > .db-donut { justify-content: center; }
.db-flow .db-donut svg { width: clamp(200px, 38%, 300px); height: auto; aspect-ratio: 1 / 1; }
.db-flow .db-card > .db-scroll { flex: 1 1 auto; max-height: none; min-height: 0; }
@media (min-width: 1101px) { .db-flow .db-card > .db-scroll { max-height: 34rem; } }
@media (max-width: 1100px) { .db-grid.db-flow { grid-template-columns: minmax(0, 1fr); } }
.dbc-list { max-width: none; }
.dbc-pos { width: auto; min-width: 4.2em; font-weight: 700; flex: none; }
.dbc-list .tabs-row { gap: 10px; }
.dbc-list .tabs-on { margin-right: auto; }

/* Dashboard on phones */
@media (max-width: 700px) {
  .db-h { gap: 6px 10px; }
  .db-h h3 { font-size: 1.1rem; }
  .db-h select, .db-od-filter input[type=date] { max-width: 100%; }
  .db-head-acts { margin-top: 0; }
  .db-scroll { max-height: none; overflow: visible; }
  /* List boxes (Coming events, Outstanding balance, Covering, Contracts): each row is a small card */
  .db-table.db-list thead tr:first-child { display: none; }
  .db-table.db-list, .db-table.db-list tbody, .db-table.db-list thead { display: block; }
  .db-table.db-list tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .db-table.db-list td { display: block; padding: 0 !important; border: 0 !important; text-align: left !important; min-width: 0; overflow-wrap: anywhere; }
  .db-table.db-list td[data-l]::before { content: attr(data-l); display: block; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .db-table.db-list td:first-child, .db-table.db-list td:nth-child(2) { grid-column: 1 / -1; }
  .db-table.db-list td:empty { display: none; }
  .db-table.db-list .db-tot { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .db-table.db-list .db-tot td { grid-column: auto !important; font-weight: 700; }
  .db-table.db-list .btn.small { width: 100%; justify-content: center; }
  .db-table tbody tr td:first-child { box-shadow: none; }
  .db-table.db-list tbody tr.db-st-confirmed, .db-table.db-list tbody tr.db-st-contracted, .db-table.db-list tbody tr.db-st-pastdue { box-shadow: inset 4px 0 0 var(--db-edge, transparent); }
  .db-table.db-list tbody tr.db-st-confirmed { --db-edge: #2e9b4a; background: #e4f3e7; }
  .db-table.db-list tbody tr.db-st-contracted { --db-edge: #3a6fc4; background: #e5eefa; }
  .db-table.db-list tbody tr.db-st-pastdue { --db-edge: #d0473e; background: #fbe6e3; }
  .db-table.db-list tbody tr td { background: transparent !important; }
  /* Month-by-year boxes (Sales, Quotes): scroll sideways, with the month column pinned */
  .db-card .table-wrap:has(.db-matrix) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .db-table.db-matrix { font-size: .82rem; min-width: 34rem; }
  .db-table.db-matrix th:first-child, .db-table.db-matrix td:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
  .db-gr-body { flex-direction: column; align-items: flex-start; }
  .db-donut { flex-direction: column; align-items: center; }
  .db-legend { width: 100%; }
  .db-ow-sum { margin-left: 0; }
}

/* Quote page on phones: Payments and email history fit the screen */
.ev-pay-links { flex-wrap: wrap; }
.cof, .cof-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
@media (max-width: 700px) {
  .ev-pay .ev-pay-head { flex-direction: column; align-items: stretch; }
  .ev-pay-links { width: 100%; }
  .ev-pay-links .btn, .ev-pay-links .post-btn, .ev-pay-links .post-btn .btn { flex: 1 1 auto; }
  .pay-table, .pay-table tbody { display: block; }
  .pay-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .pay-table td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; overflow-wrap: anywhere; }
  .pay-table td:first-child { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
  .pay-table td:nth-child(2) { grid-column: 1; }
  .pay-table td.num { grid-column: 2; grid-row: 2; text-align: right; }
  .pay-table td.hint { grid-column: 1; font-size: .82rem; }
  .pay-table td:last-child:not(.num):not(.hint) { grid-column: 2; justify-self: end; }
  .pay-table td:empty { display: none; }
  .cof-form label { display: flex; align-items: center; gap: 6px; }
  .cof-form .btn { width: 100%; }
}
/* Send paperwork: long labels and their notes wrap on phones instead of running off the screen */
.paper-list .check { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.paper-list .check > input { flex: none; align-self: center; }
.paper-list .check .hint { flex: 1 1 12rem; min-width: 0; }
@media (max-width: 700px) {
  .paper-card .actions .btn { width: 100%; }
  .paper-card textarea { width: 100%; }
}

/* ---------- Quote page polish: calmer boxes, clearer hierarchy, consistent spacing ---------- */
/* Inputs: compact and light; the accent shows only when you're typing in one */
.ev-cols :is(input[type=text], input[type=number], input[type=email], input[type=tel], select, textarea):not([type=checkbox]) {
  border-color: color-mix(in srgb, var(--input-line) 70%, transparent); border-radius: 7px; box-shadow: none; }
.ev-cols :is(input, select, textarea):focus-visible { border-color: var(--safety); box-shadow: 0 0 0 3px color-mix(in srgb, var(--safety) 22%, transparent); outline: none; }
.ev-cols .lg-money input, .ev-cols table.ev-lines input { height: 34px; padding-top: 4px; padding-bottom: 4px; }
/* Item table header: small caps labels like the rest of BookLean */
table.ev-lines th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); padding-top: 8px; padding-bottom: 8px; }
table.ev-lines td { border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
/* Pricing rows: a touch more room, quieter dividers, labels and amounts aligned */
.lg-row { padding: 6px 10px; min-height: 40px; border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }
.lg-row .hint, .lg-row small { font-size: .8rem; }
.lg-strong { background: color-mix(in srgb, var(--soft) 80%, var(--card)); }
.lg-fee .fee-name input { font-size: .95rem; }
.lg-fee .tax-box { gap: 4px; }
/* Event details: muted labels so the answers stand out */
.ev-right .ev-box label, .ev-right .ev-zone .ev-box th, .ev-right .ev-box .lbl { color: var(--muted); font-weight: 600; font-size: .9rem; }
/* Crew notes: a soft note, not a bright highlighter */
.ev-right textarea#crew_notes, .ev-right #crew_notes { background: color-mix(in srgb, var(--note-bg, #fff7dc) 70%, var(--card)); border-color: color-mix(in srgb, #e2c46a 55%, transparent); line-height: 1.55; }
/* Date bar: even spacing, clear labels */
.ev-bar { padding: 10px 16px; gap: 10px 14px; }
.ev-bar .ev-when { gap: 8px 10px; }
.ev-bar .ev-multi { font-weight: 600; color: #fff; }
.ev-bar :is(input, select) { border-radius: 7px; }
/* Section headings: a little more air */
.ev-sec-h { padding-top: 10px; padding-bottom: 10px; }
.sf-del { color: var(--err-ink); margin-left: auto; }
.sf-row.sf-deleting { opacity: .45; }
.sf-row.sf-deleting .sf-del { opacity: 1; }
.stop-truck label { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; max-width: 100%; }
.stop-truck .stop-truck-l { white-space: nowrap; flex: none; }
.stop-truck select { flex: 1 1 auto; min-width: 0; width: auto; max-width: 18rem; }
/* Payments: buttons, then the explanation box, then the payments, each in its own block */
.ev-pay-info { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin: 10px 0; display: grid; gap: 8px; }
.pay-hist-h { margin: 4px 0 2px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
/* Paperwork: short notes stay on one line with the name */
.paper-list .check .paper-why { flex: 0 1 auto; }
/* Customize dashboard pop-up: one line per box */
.dbc-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.dbc-list .tabs-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.dbc-list .tabs-on { display: flex; align-items: center; gap: 6px; margin: 0 auto 0 0; min-width: 0; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.dbc-list .tabs-move { display: flex; gap: 4px; flex: none; }
.dbc-list .tabs-move .btn { padding: 2px 8px; min-width: 0; }
.dbc-list .dbc-pos { flex: none; width: 4.5em; padding: 2px 4px; }
#db-custom { width: min(560px, 96vw); }
#db-custom { max-width: 96vw; box-sizing: border-box; }
#db-custom .em-form { width: auto; max-width: 100%; min-width: 0; box-sizing: border-box; }
#db-custom .dbc-list .tabs-on { white-space: normal; overflow: visible; line-height: 1.25; }
#db-custom .em-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 480px) { #db-custom .dbc-pos { width: 3.8em; } #db-custom .dbc-list .tabs-row { gap: 6px; padding: 6px; } }
/* Customers list on phones: compact cards (name + org, then phone · email, then events · last event) */
.cust-list .cl-m { display: none; }
@media (max-width: 700px) {
  .cust-list thead { display: none; }
  .cust-list, .cust-list tbody { display: block; }
  .cust-list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
  .cust-list td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; text-align: left !important; font-size: .9rem; }
  .cust-list td:first-child { grid-column: 1; font-size: 1rem; line-height: 1.25; }
  .cust-list td:first-child .hint { font-size: .82rem; }
  .cust-list .cl-rate { grid-column: 2; grid-row: 1; justify-self: end; }
  .cust-list .cl-phone { grid-column: 1; }
  .cust-list .cl-email { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cust-list .cl-count { grid-column: 2; grid-row: 2; justify-self: end; color: var(--muted); font-size: .82rem; }
  .cust-list .cl-last { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
  .cust-list .cl-m { display: inline; }
  .cust-list td:empty { display: none; }
}
@media (max-width: 700px) {
  .cust-list tr { padding: 8px 10px; row-gap: 1px; }
  .cust-list .cl-email { grid-column: 1; }
  .cust-list .cl-last { grid-column: 2; grid-row: 3; justify-self: end; white-space: nowrap; }
  .cust-list td a { text-decoration: none; }
}
.dav-sub { margin: 12px 0 4px; font-size: .95rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.dav-sub .hint { font-weight: 400; font-size: .8rem; flex-basis: 100%; }
.day-av-list .dav-sub:first-of-type { margin-top: 6px; }
.dav-ask { display: inline; margin-left: 8px; }
.dav-ask .linkbtn { font-size: .8rem; }
/* Google reviews */
.gr-find { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.gr-find input[type=search] { flex: 1 1 16rem; min-width: 0; }
.gr-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.gr-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.db-rv-list { list-style: none; padding: 0; margin: 0; }
.db-rv-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.db-rv-list li:last-child { border-bottom: 0; }
.db-rv-n b { color: #b7791f; }

/* ---------- Items and pricing: reads like a finished quote until you tap it ---------- */
.ev-left.is-locked-zone { cursor: pointer; }
.ev-left.is-locked-zone :is(input[type=text], input[type=number], input:not([type]), textarea, select) {
  border-color: transparent !important; background: transparent !important; box-shadow: none !important;
  padding-left: 0; padding-right: 0; color: var(--ink); -moz-appearance: textfield; }
.ev-left.is-locked-zone input::placeholder { color: var(--ink); opacity: 1; }
.ev-left.is-locked-zone input[type=number]::-webkit-inner-spin-button, .ev-left.is-locked-zone input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ev-left.is-locked-zone .ipick-input { font-weight: 600; resize: none; }
/* Nothing empty while it's a finished quote: no blank item row, no "+ Add a fee" row, no Remove boxes */
.ev-left.is-locked-zone tr.ev-li-blank, .ev-left.is-locked-zone .lg-fee-new, .ev-left.is-locked-zone td.rm > * { display: none; }
.ev-left.is-locked-zone .ev-addline { pointer-events: auto; }
.ev-left.is-locked-zone table.ev-lines td { padding-top: 7px; padding-bottom: 7px; }
.ev-left.is-locked-zone .lg-money input { text-align: right; }
.ev-left.is-locked-zone .tax-box { opacity: .7; }
.ev-left:not(.is-locked-zone) tr.ev-li-blank .ipick-input { border-style: dashed; }

/* Phones: each item is one line: name · qty × price · total */
@media (max-width: 760px) {
  .ev-left.is-locked-zone table.ev-lines tr { grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 2px 8px; padding: 9px 0; }
  .ev-left.is-locked-zone table.ev-lines td:first-child { grid-column: 1; }
  .ev-left.is-locked-zone table.ev-lines td[data-label]::before { display: none; }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Avail"], .ev-left.is-locked-zone table.ev-lines td.rm { display: none; }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Qty"] { grid-column: 2; grid-row: 1; display: flex; align-items: baseline; color: var(--muted); }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Qty"] input { width: 2.2ch; text-align: right; color: var(--muted); }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Qty"]::after { content: "×"; margin-left: 2px; }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Each"] { display: none; }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Total"] { grid-column: 3; grid-row: 1; white-space: nowrap; }
  .ev-left.is-locked-zone .ipick-input { min-height: 0; height: auto; padding-top: 0; padding-bottom: 0; }
}
@media (max-width: 760px) {
  .ev-left.is-locked-zone table.ev-lines tr { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Each"] { display: block; grid-column: 3; grid-row: 1; color: var(--muted); }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Each"] input { width: 7ch; color: var(--muted); font-size: .9rem; }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Each"] input::placeholder { color: var(--muted); }
  .ev-left.is-locked-zone table.ev-lines td[data-label="Total"] { grid-column: 4; font-weight: 700; }
}
/* Finished view: a small "+ Add item" link instead of the big dashed bar; clean dividers only between items */
.ev-left.is-locked-zone .ev-addline { display: inline-block; width: auto; background: none !important; border: 0; padding: 4px 0; margin: 2px 0 10px; font-weight: 600; }
.ev-left.is-locked-zone table.ev-lines td { border-bottom: 0 !important; }
.ev-left.is-locked-zone table.ev-lines tbody tr { border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.ev-left.is-locked-zone table.ev-lines tbody tr:nth-child(even) td { background: none; }
.ev-left.is-locked-zone .ipick { min-width: 0; }
.ev-left.is-locked-zone .ipick-input { white-space: normal; overflow: hidden; }

/* ---------- Event details and Customer: same finished look until you tap ---------- */
.ev-right .ev-zone.is-locked-zone { cursor: pointer; }
.ev-right .is-locked-zone .frm :is(input[type=text], input[type=email], input[type=tel], input:not([type]), select) {
  border-color: transparent !important; background: transparent !important; box-shadow: none !important; padding-left: 0; padding-right: 0; color: var(--ink); font-weight: 600; }
.ev-right .is-locked-zone .frm label { color: var(--muted); font-weight: 500; font-size: .85rem; }
.ev-right .is-locked-zone .frm-empty { display: none !important; }
.ev-right .is-locked-zone .frm input::placeholder { color: transparent; }
.ev-right .is-locked-zone .ev-box { background: color-mix(in srgb, var(--soft) 55%, var(--card)); border-color: color-mix(in srgb, var(--line) 70%, transparent); }
.ev-right .is-locked-zone .frm { row-gap: 2px; }
.ev-right .is-locked-zone .frm > :is(input, select, .frm-two) { min-height: 0; height: auto; padding-top: 5px; padding-bottom: 5px; }
.ev-right .is-locked-zone .frm-two { gap: 6px; }
.ev-right .is-locked-zone .frm-two input { width: auto; flex: 0 1 auto; }
.ev-right .is-locked-zone textarea { border-color: transparent !important; }
.ev-right .is-locked-zone .frm-two { display: flex !important; justify-content: flex-start; flex-wrap: wrap; gap: 0 .35em; }
.ev-right .is-locked-zone .frm-two input { field-sizing: content; min-width: 2ch; max-width: 100%; width: auto; flex: 0 0 auto; }
@supports not (field-sizing: content) { .ev-right .is-locked-zone .frm-two input { width: 46%; } }
@media (max-width: 760px) { .ev-right .is-locked-zone .frm > label { margin-top: 6px; } .ev-right .is-locked-zone .frm > :is(input, select, .frm-two) { padding-top: 0; padding-bottom: 2px; } }
.ev-right .is-locked-zone .frm { align-items: baseline; }
/* Photo tiles: the Crop / Cover / Delete row is full width (a chart's .bar style was squeezing it) */
.photo .bar { width: auto; min-height: 0; border-radius: 0; background: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; white-space: nowrap; }
.photo .bar > * { flex: 0 0 auto; }
.photo .ph-meta { padding: 0 8px 8px; } .photo .ph-meta summary { cursor: pointer; font-size: .85rem; }
/* Retire this item: the "still on upcoming events" note wraps as a box with a list of links */
.ret-card { margin-top: 18px; }
.ret-uses { display: block; white-space: normal; margin: 8px 0 12px; }
.ret-uses ul { margin: 6px 0 0; padding-left: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 2px 16px; }
.ret-card p, .ret-card .hint { max-width: none; }
.eod-test { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.eod-status { margin: 10px 0 0; line-height: 1.6; }
.err-text { color: #b3261e; }
/* Categories page: each category's own photo for its website tile */
.cat-photo-cell { width: 9.5rem; }
.cat-thumb { width: 8.5rem; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #eef1f5; display: grid; place-items: center; }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-thumb span { font-size: .75rem; color: #6b7280; text-align: center; padding: 4px; }
.cat-photo-acts { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font-size: .85rem; }
.cat-photo-acts form { display: inline; margin: 0; }
.cat-photo-acts label.linkbtn { cursor: pointer; }
/* Dashboard list boxes on phones: one colored edge per card (none left on the date cell),
   and a gap between cards so back-to-back events of the same color don't run together. */
@media (max-width: 700px) {
  .db-table.db-list tbody tr td, .db-table.db-list tbody tr td:first-child,
  .db-table tbody tr.db-st-confirmed td:first-child, .db-table tbody tr.db-st-contracted td:first-child, .db-table tbody tr.db-st-pastdue td:first-child { box-shadow: none !important; }
  .db-table.db-list tbody { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
  .db-table.db-list tbody tr { border: 1px solid var(--line); border-left: 5px solid var(--db-edge, var(--line)); border-radius: 10px; box-shadow: none !important; background: var(--card); }
  .db-table.db-list tbody tr:last-child { border-bottom: 1px solid var(--line); }
}
/* Date bar, finished look: one plain line instead of boxes; tap it (or Edit) to change */
.ev-when-sum { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 1.02rem; line-height: 1.35; color: #fff; }
.ev-when-sum .linkbtn { color: #fff; opacity: .85; font-weight: 600; font-size: .88rem; margin-left: 6px; text-decoration: underline; pointer-events: auto !important; }
.ev-bar.is-locked-zone { cursor: pointer; }
.ev-bar.is-locked-zone > .ev-when, .ev-bar.is-locked-zone > .ev-where { display: none !important; }
@media (max-width: 700px) {
  .ev-bar.is-locked-zone { flex-wrap: nowrap; align-items: flex-start; }
  .ev-when-sum { font-size: .98rem; }
}
/* Date range picker in the date bar */
.ev-when { position: relative; }
.ev-when.ev-has-cal > input[name=date], .ev-when.ev-has-cal > .ev-multi { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0 0 0 0); }
.ev-range-btn { font: inherit; font-weight: 700; color: #1b1e21; background: #fff; border: 1px solid var(--input-line); border-radius: 8px; padding: 7px 12px; min-height: 38px; cursor: pointer; white-space: nowrap; }
.ev-range-btn::before { content: "📅"; margin-right: 6px; }
.ev-cal { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 18.5rem; max-width: calc(100vw - 24px); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 10px; }
.ev-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ev-cal-nav { font-size: 1.3rem; line-height: 1; width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--soft); color: var(--ink); cursor: pointer; }
.ev-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ev-cal-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
.ev-cal-day { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; }
.ev-cal-day:hover { background: var(--soft); }
.ev-cal-day.is-out { color: var(--muted); opacity: .55; }
.ev-cal-day.is-today { box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; }
.ev-cal-day.is-in { background: color-mix(in srgb, var(--link) 18%, transparent); border-radius: 0; }
.ev-cal-day.is-start, .ev-cal-day.is-end { background: var(--link); color: #fff; font-weight: 700; }
.ev-cal-day.is-start { border-radius: 8px 0 0 8px; } .ev-cal-day.is-end { border-radius: 0 8px 8px 0; } .ev-cal-day.is-start.is-end { border-radius: 8px; }
.ev-cal-hint { font-size: .8rem; color: var(--muted); margin: 8px 0 6px; max-width: none; }
.ev-cal-acts { display: flex; justify-content: flex-end; }
@media (max-width: 700px) { .ev-range-btn { grid-column: 1 / -1; width: 100%; text-align: left; } }
/* Event street with the Directions button on the right, same line */
.frm-street { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.frm-street > input { flex: 1 1 auto; min-width: 0; }
.frm-street > .bub-full { order: 3; flex-basis: 100%; }
.frm-street { flex-wrap: wrap; }
.frm-street > .dir-inline { order: 2; flex: 0 0 auto; padding: 4px 10px; font-size: .85rem; margin-left: auto; }
@media (max-width: 380px) { .dir-inline .dir-word { display: none; } .frm-street > .dir-inline { padding: 6px 8px; } }

/* v66: rating ribbons (blue 1, green 2, yellow 3, red 4), gold names for returning customers */
.rate-rib-only { padding: 0; background: none !important; border: 0 !important; }
.rib { display: inline-block; vertical-align: -5px; flex: none; }
.rib text { font: 700 9.5px/1 system-ui, sans-serif; fill: #fff; }
.rib-ring { stroke: rgba(255,255,255,.55); stroke-width: 1; }
.rib-gold .rib-disc { fill: #1d5fd1; } .rib-gold .rib-tail { fill: #3b7be6; }
.rib-green .rib-disc { fill: #1f8a46; } .rib-green .rib-tail { fill: #34a55d; }
.rib-yellow .rib-disc { fill: #e0b100; } .rib-yellow .rib-tail { fill: #edc93a; }
.rib-yellow text { fill: #3d2f00; }
.rib-red .rib-disc { fill: #c62828; } .rib-red .rib-tail { fill: #df4a4a; }
.rate-gold { background: #e8f0ff; border-color: #9dbbf2; color: #163f8a; }
.is-returning, a.is-returning, .is-returning a { color: #8a6300 !important; font-weight: 700; }
.ret-star { color: #b8860b; font-weight: 700; margin-left: 4px; white-space: nowrap; font-size: .9em; }
[data-theme="night"] .is-returning, [data-theme="night"] a.is-returning { color: #f2c94c !important; }
[data-theme="night"] .ret-star { color: #f2c94c; }
.waive-form { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 10px 0 0; }
.waive-form .check { font-weight: 600; }

/* v66 phone sweep: status pills never break mid-word; stats tabs wrap whole words; shared payoff cards fit;
   Website Tools turns its tables into simple cards and never slides sideways. */
.pill { white-space: nowrap; }
.subtabs { flex-wrap: wrap; }
.subtabs a { white-space: nowrap; }
@media (max-width: 700px) {
  .subtabs { gap: 0 2px; }
  .subtabs a { padding: 7px 10px; font-size: .92rem; }
}
@media (max-width: 760px) {
  .table-wrap .stats-table { min-width: 0 !important; }
  .stats-table td.st-name, .stats-table td.pg-name { min-width: 0; }
  .stats-table td.pg-edit-cell { width: 100%; white-space: normal; }
  .stats-table td.pg-edit-cell .linkbtn { padding: 4px 0; }
}
@media (max-width: 700px) {
  .wt-keys thead, .sc-table thead { display: none; }
  .wt-keys, .wt-keys tbody, .sc-table, .sc-table tbody { display: block; width: 100%; min-width: 0 !important; }
  .wt-keys tr, .sc-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center;
    border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin: 0 0 8px; background: var(--card, #fff); }
  .wt-keys td, .sc-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .wt-keys td:first-child, .sc-table td:first-child { grid-column: 1 / -1; font-weight: 700; overflow-wrap: anywhere; }
  .wt-keys td input, .sc-table td input { width: 100%; min-width: 0; font-size: .85rem; }
  .sc-table td:nth-child(2) { grid-column: 1; font-size: .82rem; }
  .sc-table td:nth-child(3) { grid-column: 2; font-size: .82rem; text-align: right; }
  .sc-table td:nth-child(4) { grid-column: 1; }
  .sc-table td:nth-child(5) { grid-column: 2; }
  .wt-keys td:nth-child(2) { grid-column: 1; }
  .wt-keys td:nth-child(3) { grid-column: 2; }
  .sc-more code, .card code { overflow-wrap: anywhere; }
  .card table:not(.wt-keys):not(.sc-table) td { overflow-wrap: anywhere; }
}
@media (max-width: 700px) { main { overflow-x: clip; } }

/* v66: helpers */
.hlp-reqs, .hlp-pick { list-style: none; margin: 0; padding: 0; }
.hlp-reqs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hlp-reqs li:first-child { border-top: 0; }
.hlp-ans { display: flex; align-items: center; gap: 10px; }
.hlp-pick li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.hlp-pick li:first-child { border-top: 0; }
.hlp-ev { flex: 1 1 260px; align-items: flex-start; }
.hlp-ev input { margin-top: 4px; }
.hlp-part { display: inline-flex; gap: 10px; flex-wrap: wrap; font-size: .92rem; }
.hlp-part label { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; white-space: nowrap; }
.hlp-send textarea { font-size: .9rem; }
.ev-helpers { margin-top: 16px; }
.hlp-grp { margin: 14px 0 4px; font-size: 1rem; }
.hlp-quotes { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.hlp-quotes summary { cursor: pointer; padding: 4px 0; }
.hlp-grp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; }
.hlp-tick { width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: -4px; }
.hlp-st { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.6; white-space: nowrap; vertical-align: 1px; border: 1px solid transparent; }
.hlp-st-confirmed { background: #e3f4e8; color: #17672f; border-color: #8fd0a3; }
.hlp-st-contracted { background: #e6efff; color: #1a4fa8; border-color: #9dbbf2; }
[data-theme="night"] .hlp-st-confirmed { background: #173523; color: #8fe0a8; border-color: #2f6b45; }
[data-theme="night"] .hlp-st-contracted { background: #16284a; color: #a9c6ff; border-color: #34508a; }
.stats-ro { margin: 0 0 14px; }
.ho-form { flex-wrap: wrap; }
.ho-kind { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ho-kind .lbl { font-weight: 600; flex: 1 1 100%; }
.ho-parts { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.ho-parts label { display: inline-flex; gap: 4px; align-items: center; font-weight: 400; white-space: nowrap; }
.ho-form:has(input[value="deliver"]:checked) .ho-parts { opacity: .45; pointer-events: none; }

/* v69: Setup Details */
.ev-setup { margin-top: 16px; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 4px 0 12px; }
.sp-ph { margin: 0; }
.sp-ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); display: block; border: 1px solid var(--line); }
.sp-ph figcaption { font-size: .85rem; margin-top: 4px; }
.sp-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.sp-add input[type=text] { flex: 1 1 180px; }
.sp-file { font-weight: 600; font-size: .92rem; }
.sp-file input { display: block; font-weight: 400; margin-top: 4px; max-width: 100%; }
.stop-sp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; font-size: .92rem; }
.stop-sp img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
.promo-edit summary { list-style: none; cursor: pointer; }
.promo-edit[open] { position: relative; }
.promo-edit .promo-form { margin-top: 8px; min-width: min(560px, 80vw); }

/* v71: go-live checklist */
.gl-prog { height: 12px; border-radius: 999px; background: var(--soft, #eef0f2); border: 1px solid var(--line); overflow: hidden; max-width: 520px; }
.gl-prog span { display: block; height: 100%; background: #1f8a46; }
.gl-list { list-style: none; margin: 0; padding: 0; }
.gl-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.gl-list li:first-child { border-top: 0; }
.gl-list li.is-done strong { text-decoration: line-through; text-decoration-color: rgba(31,138,70,.6); }
.gl-tick input { width: 22px; height: 22px; margin: 2px 0 0; }
.gl-box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; margin-top: 2px; }
.gl-box.on { background: #1f8a46; border-color: #1f8a46; color: #fff; }
.gl-auto-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 0 7px; border-radius: 999px; background: #e6efff; color: #1a4fa8; vertical-align: 1px; white-space: nowrap; }

/* v71: Ask BookLean */
.ask-fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--ink, #1f2328); color: var(--ground, #fff); box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ask-panel { position: fixed; right: 18px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 61; width: min(400px, calc(100vw - 36px)); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--card, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.25); overflow: hidden; }
.ask-panel[hidden] { display: none; }
.ask-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ask-head .hint { margin-right: auto; }
.ask-x { border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: inherit; padding: 4px 8px; }
.ask-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ask-hi { color: var(--muted); margin: 0; font-size: .92rem; }
.ask-msg { max-width: 88%; padding: 8px 12px; border-radius: 14px; white-space: pre-wrap; line-height: 1.45; font-size: .95rem; }
.ask-msg.me { align-self: flex-end; background: var(--ink, #1f2328); color: var(--ground, #fff); border-bottom-right-radius: 4px; }
.ask-msg.bot { align-self: flex-start; background: var(--soft, #f1f3f5); border-bottom-left-radius: 4px; }
.ask-msg.wait { opacity: .7; font-style: italic; }
.ask-msg.err { background: var(--err-bg); color: var(--err-ink); }
.ask-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.ask-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; }
@media (max-width: 600px) {
  .ask-panel { inset: 0; width: auto; height: auto; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  body.ask-open .ask-fab { display: none; }
  body.ask-open { overflow: hidden; }
}

/* v72 phone sweep: every plain table becomes stacked cards on phones (labels come from the column names). */
@media (max-width: 700px) {
  .stk-wrap { overflow: visible; border: 0; background: none; border-radius: 0; }
  table.stk, table.stk tbody { display: block; width: 100%; min-width: 0 !important; }
  table.stk thead { display: none; }
  table.stk tr { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; padding: 12px 14px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
  table.stk td, table.stk tbody th { display: block; border: 0 !important; padding: 0 !important; min-width: 0; width: auto !important; max-width: 100%; flex: 1 1 auto; text-align: left !important; white-space: normal; }
  table.stk td:first-child { flex: 1 1 100%; font-weight: 600; }
  table.stk .stk-full { flex: 1 1 100%; }
  table.stk tbody th.stk-full { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  table.stk tr:has(> .stk-full:only-child) { background: none; border: 0; padding: 14px 2px 2px; margin: 0; }
  table.stk td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 3px; }
  table.stk td :where(a, span, strong, b, em, small, label) { overflow-wrap: normal; word-break: normal; }
  table.stk td :where(input[type=text], input[type=number], input[type=email], input[type=tel], input:not([type]), select, textarea) { width: 100%; min-width: 0; max-width: 100%; }
  table.stk td:has(> input[type=checkbox]), table.stk td:has(> label > input[type=checkbox]) { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
  table.stk td:has(> input[type=checkbox])::before { display: none; }
  table.stk td img { max-width: 120px; height: auto; }
  table.stk .price-row, table.stk .money-in { display: flex; align-items: center; gap: 4px; }

  /* Unit text next to a box ("% more than 1–5 hours") goes underneath instead of squeezing into a column. */
  .field .price-row { flex-wrap: wrap; }
  .field .price-row > input { flex: 1 1 8rem; min-width: 0; }
  .field .price-row > span:last-child { flex: 1 1 100%; font-size: .9rem; }
  .field .price-row > span:first-child:not(:last-child) { flex: none; }

  /* Floating Save buttons: a full-width bar at the bottom, with room kept so it never covers the last rows. */
  .float-save { left: 0; right: 0; bottom: 0; justify-content: flex-end; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
  .float-save .btn { flex: 1; }
  body:has(.float-save) main { padding-bottom: 120px; }

  /* Dropdown menus scroll inside themselves on phones. */
  .panel.panel-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 28px; }
  .panel-wide { grid-template-columns: 1fr 1fr; gap: 4px 18px; }
}
@media (max-width: 700px) {
  /* Categories: small photo on the left, the name box filling the rest, order and count below. */
  table.stk td.cat-photo-cell { flex: 0 0 104px; font-weight: 400; }
  table.stk td.cat-photo-cell::before { display: none; }
  table.stk .cat-thumb { width: 100px; }
  table.stk td.cat-photo-cell + td { flex: 1 1 calc(100% - 124px); align-self: center; }
  table.stk td.cat-photo-cell + td::before { content: "Name"; }
  table.stk td.cat-photo-cell + td details summary { white-space: normal; font-size: .88rem; }
  table.stk td.num input.narrow { width: 5.5rem; }
  /* Row buttons sit on their own line at the end of the card. */
  table.stk td.row-actions { flex: 1 1 100%; display: flex !important; justify-content: flex-start; gap: 16px; margin-top: 2px; }
  table.stk td.row-actions > * { margin-left: 0 !important; }
  table.stk td.row-actions::before { display: none !important; }
}
@media (max-width: 700px) {
  table.stk td:has(> label > input[type=checkbox])::before, table.stk td:has(> label.check)::before { display: none; }
  table.stk td:has(> label > input[type=checkbox]) { align-self: center; }
}

/* Ask BookLean bubble moves up above any Save button or Save bar so they never overlap. */
body:has(.float-save) .ask-fab, body:has(.ev-savebar) .ask-fab { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
body:has(.float-save) .ask-panel, body:has(.ev-savebar) .ask-panel { bottom: calc(156px + env(safe-area-inset-bottom, 0px)); height: min(520px, calc(100vh - 190px)); }
@media (max-width: 700px) {
  body:has(.float-save) .ask-fab, body:has(.ev-savebar) .ask-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); width: 50px; height: 50px; }
  body:has(.float-save) .ask-panel, body:has(.ev-savebar) .ask-panel { bottom: 0; height: auto; }
}

/* Delivery → Mileage ranges on phones: each range is a light two-line row, not a stack of big boxes.
   Line 1: From / To miles side by side. Line 2: how to charge + amount. Remove sits small at the end. */
@media (max-width: 700px) {
  .table-wrap:has(> table.tiers) { overflow: visible; border: 0; background: none; }
  table.tiers, table.tiers tbody { display: block; width: 100%; }
  table.tiers thead { display: none; }
  table.tiers tr { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "from to" "type amt" "rm rm"; gap: 8px 10px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
  table.tiers tr:first-child { padding-top: 4px; }
  table.tiers td { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; min-width: 0; }
  table.tiers td.t-from { grid-area: from; } table.tiers td.t-to { grid-area: to; }
  table.tiers td.t-type { grid-area: type; } table.tiers td.t-amt { grid-area: amt; }
  table.tiers td.t-rm { grid-area: rm; justify-self: end; }
  table.tiers td.t-rm:empty { display: none; }
  table.tiers td.t-from::before, table.tiers td.t-to::before, table.tiers td.t-type::before, table.tiers td.t-amt::before { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 3px; }
  table.tiers td.t-from::before { content: "From mile"; } table.tiers td.t-to::before { content: "To mile"; }
  table.tiers td.t-type::before { content: "How to charge"; } table.tiers td.t-amt::before { content: "Amount"; }
  table.tiers input.narrow, table.tiers select, table.tiers .price-row input { width: 100%; min-width: 0; }
  table.tiers .price-row { display: flex; align-items: center; gap: 4px; }
  table.tiers .t-rm label { font-size: .85rem; }
}
@media (max-width: 700px) { table.tiers input { text-align: left; } }

/* Mileage ranges, phones: plain lines with Edit, boxes only for the range being edited. */
table.tiers td.t-sum, table.tiers .t-done { display: none; }
@media (max-width: 700px) {
  table.tiers.t-ready tr { grid-template-areas: "sum sum" "from to" "type amt" "rm rm"; }
  table.tiers.t-ready tr:not(.t-open) > td:not(.t-sum) { display: none; }
  table.tiers.t-ready tr:not(.t-open) { padding: 13px 0; gap: 0; }
  table.tiers.t-ready tr.t-blank:not(.t-open) { display: none; }
  table.tiers.t-ready tr:not(.t-open) td.t-sum { grid-area: sum; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; }
  table.tiers.t-ready tr.t-open td.t-sum { display: none; }
  table.tiers .t-rng { font-weight: 700; font-size: 1.02rem; }
  table.tiers .t-how { color: var(--muted); font-size: .88rem; margin-top: 2px; }
  table.tiers .t-big { font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
  table.tiers .t-ed, table.tiers .t-done { color: var(--link); font-size: .92rem; background: none; border: 0; padding: 4px 0; cursor: pointer; }
  table.tiers.t-ready tr.t-open td.t-rm { justify-self: stretch; display: flex !important; justify-content: space-between; align-items: center; }
  table.tiers.t-ready tr.t-open .t-done { display: inline-block; }
  table.tiers tr.t-removing .t-rng, table.tiers tr.t-removing .t-big { text-decoration: line-through; color: var(--muted); }
}

/* Setup → Sent emails */
.se-filters { flex-wrap: wrap; align-items: center; }
.se-table td { vertical-align: top; }
.se-who a { font-weight: 600; }
.se-who .hint { display: block; font-size: .82rem; }
.se-when { white-space: nowrap; }
.se-to { overflow-wrap: anywhere; }
.se-table tr.se-bad td { background: #fff4f2; }
@media (max-width: 700px) {
  table.se-table.stk tr { gap: 4px 14px; }
  table.se-table.stk td.se-who { order: -1; flex: 1 1 100%; font-weight: 400; }
  table.se-table.stk td.se-who::before { display: none; }
  table.se-table.stk td.se-when { font-weight: 400; flex: 0 0 auto; }
  table.se-table.stk td.se-kind { flex: 1 1 100%; }
  table.se-table.stk td.se-to { flex: 1 1 100%; }
  table.se-table.stk tr.se-bad { border-color: #f2b8ae; background: #fff4f2; }
  table.se-table.stk tr.se-bad td { background: none; }
  .se-filters > * { flex: 1 1 100%; }
  .se-filters .btn { flex: 0 0 auto; }
}
/* Sent emails: the type dropdown fits its longest name, and "Automatic" stays on one line. */
.se-filters select { width: auto; min-width: 15rem; max-width: 100%; }
.se-filters .search { min-width: 14rem; }
.se-table td.se-by, .se-table td.se-when { white-space: nowrap; }
.se-table td.se-kind { min-width: 12rem; }
@media (max-width: 700px) {
  .se-filters select, .se-filters .search { width: 100%; min-width: 0; }
  table.se-table.stk td.se-by { white-space: nowrap; }
}

/* Prep tab: confirmed setups by day, in load order */
.pr-day { max-width: 860px; }
.pr-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.pr-head h2 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-links { display: flex; align-items: center; gap: 12px; }
.pr-order { list-style: none; margin: 0; padding: 0; }
.pr-ev { padding: 12px 0; border-top: 1px solid var(--line); }
.pr-ev-top { display: flex; align-items: flex-start; gap: 10px; }
.pr-num { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--asphalt); color: #fff; font-size: .82rem; font-weight: 700; margin-top: 1px; }
.pr-ev-name { flex: 1; min-width: 0; }
.pr-ev-name a { font-weight: 700; }
.pr-ev-name .hint { display: block; font-size: .85rem; }
.pr-place { flex: none; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 4px; }
.pr-ev:first-child .pr-place { color: var(--ink); }
.pr-items { list-style: none; margin: 8px 0 0 36px; padding: 0; columns: 2 220px; column-gap: 24px; }
.pr-items li { padding: 2px 0; break-inside: avoid; }
.pr-items li.pr-sub { padding-left: 16px; color: var(--muted); font-size: .92rem; }
.pr-parts { margin: 6px 0 0 36px; font-size: .92rem; }
.pr-total { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.pr-total summary { font-weight: 700; cursor: pointer; }
.pr-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 28px; margin-top: 8px; }
.pr-cols h4 { margin: 0 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pr-cols ul { list-style: none; margin: 0; padding: 0; }
.pr-cols li { padding: 2px 0; }
.pr-unpaid { margin: 10px 0 0; }
@media (max-width: 700px) {
  .pr-items, .pr-parts { margin-left: 0; columns: 1; }
  .pr-head .btn { white-space: nowrap; }
}

/* Events list: covered events sit in the list with a Covering status and a truck tag. */
.st-covering { color: #3b4fb8; background: #e7ebfb; border-color: #c3cdf3; }
[data-theme="night"] .st-covering { color: #a9b8ff; background: rgba(110,130,255,.15); border-color: rgba(110,130,255,.35); }
.flag.cover-flag { color: #3b4fb8; background: #eef1fd; border-color: #c3cdf3; }
/* Dashboard Coming events: covering rows and "BHI delivering" tags */
.db-pill-covering { color: #3b4fb8; background: #e7ebfb; }
.db-cover { font-size: .78rem; font-weight: 600; color: #3b4fb8; }

/* One color per status on every page:
   Quote black · Contracted blue · Confirmed green · Completed slate · Cancelled red · Covering orange. */
.st-contracted { color: #1f4a8a !important; background: #e3ecfa !important; border-color: #b9cdef !important; }
[data-theme="night"] .st-contracted { color: #a9c6ff !important; background: rgba(58,111,196,.18) !important; border-color: rgba(58,111,196,.4) !important; }
.evl tr.evr-contracted { --evr: #3a6fc4; --evr-bg: #e8effb; --evr-bg2: #dce7f8; }
[data-theme="night"] .evl tr.evr-contracted { --evr-bg: rgba(58,111,196,.14); --evr-bg2: rgba(58,111,196,.19); }

/* Completed: coffee-brown bar, light tan tint, brown pill. */
.st-completed { color: #5b3a1e !important; background: #efe3d6 !important; border-color: #d6bfa6 !important; }
[data-theme="night"] .st-completed { color: #e0c4a6 !important; background: rgba(140,95,55,.2) !important; border-color: rgba(160,110,65,.45) !important; }
.evl tr.evr-completed { --evr: #7a4f2a; --evr-bg: #f5eee6; --evr-bg2: #eee3d7; }
[data-theme="night"] .evl tr.evr-completed { --evr-bg: rgba(140,95,55,.13); --evr-bg2: rgba(140,95,55,.18); }

.db-table tbody tr.db-st-covering td { background: #fdeedd !important; }
.db-table tbody tr.db-st-covering:nth-child(even) td { background: #fae3c8 !important; }
.db-table tbody tr.db-st-covering td:first-child { box-shadow: inset 4px 0 0 #e07b1f; }
.db-pill-covering { background: #f9d6ad !important; color: #8a440a !important; }
.db-cover { color: #a5520c !important; }
[data-theme="night"] .db-table tbody tr.db-st-covering td { background: rgba(224,123,31,.16) !important; }
@media (max-width: 760px) {
  .db-table.db-list tbody tr.db-st-covering { box-shadow: inset 4px 0 0 #e07b1f; background: #fdeedd; }
}
.evl tr.evr-covering { --evr: #e07b1f; --evr-bg: #fdf0e1; --evr-bg2: #fae6cf; }
[data-theme="night"] .evl tr.evr-covering { --evr-bg: rgba(224,123,31,.13); --evr-bg2: rgba(224,123,31,.18); }
.evl table.events tbody tr.evr-covering:nth-child(odd) td { background: var(--evr-bg); }
.evl table.events tbody tr.evr-covering:nth-child(even) td { background: var(--evr-bg2); }
@media (max-width: 700px) {
  .evl table.events tbody tr.evr-covering:nth-child(odd) { background: var(--evr-bg); }
  .evl table.events tbody tr.evr-covering:nth-child(even) { background: var(--evr-bg2); }
}
.st-covering { color: #8a440a !important; background: #fde6cc !important; border-color: #f4c48f !important; }
[data-theme="night"] .st-covering { color: #f7b877 !important; background: rgba(224,123,31,.18) !important; border-color: rgba(224,123,31,.42) !important; }
.flag.cover-flag { color: #8a440a !important; background: #fdeedd !important; border-color: #f4c48f !important; }
/* Customers: the ★ Completed count column, and the Returning only switch */
.cust-list .cl-done { color: #8a6300; font-weight: 600; }
.cu-ret { white-space: nowrap; }
@media (max-width: 700px) {
  .cust-list .cl-done { grid-column: 2; grid-row: 3; justify-self: end; font-size: .82rem; }
}
/* Item page: Events with this item */
.iu-sum { margin: 0 0 8px; }
.iu-tabs { margin-bottom: 8px; }
.iu-table .hint { font-size: .82rem; }

/* Demo copy */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r); background: #fff7d6; border: 1px solid #f0d77a; color: #5a4300; font-size: .92rem; }
.demo-bar strong { background: #5a4300; color: #fff7d6; padding: 1px 8px; border-radius: 999px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.demo-bar a { margin-left: auto; font-weight: 600; }
.demo-bar .demo-reset { margin: 0 0 0 auto; }
.demo-bar .demo-reset .linkbtn { font-weight: 600; }
.demo-logins { margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r); }
.demo-logins ul { margin: 8px 0 0; padding-left: 18px; }
.demo-logins li { margin: 4px 0; }
.demo-card { border-color: #f0d77a; }
.cat-thumb span small { display: block; margin-top: 3px; font-size: .68rem; opacity: .85; }
/* Income by category: legend names link to that category's items */
.db-legend a.db-ll { color: inherit; text-decoration: none; }
.db-legend a.db-ll:hover, .db-legend a.db-ll:focus-visible { text-decoration: underline; color: var(--link, #1f5fbf); }
.db-cat-hint { margin: 0 0 6px; font-size: .8rem; }

/* Categories → Showing for a brand */
.cat-brand-tabs { flex-wrap: wrap; align-items: center; margin: 4px 0 12px; }
.cat-brand-tabs .hint { margin-right: 6px; }
.cat-brand-note { margin: 0 0 12px; }
.cb-src { font-size: .72rem; margin-top: 3px; }
.cat-brand-table tr.cb-hidden td { opacity: .55; }
.cat-brand-table tr.cb-hidden td.row-actions, .cat-brand-table tr.cb-hidden td:nth-child(4) { opacity: 1; }
.cat-brand-table input.narrow::placeholder { color: #9aa1ab; }
.cat-brand-table .cb-defname { display: block; font-size: .74rem; margin-top: 3px; }
/* Categories (default view): which brands' websites show the category */
.show-on { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; font-size: .86rem; }
.show-on .hint { font-size: .78rem; }
.show-on label.check { margin: 0; }

/* Categories: drag to reorder */
.sort-ctl { display: inline-flex; align-items: center; gap: 2px; }
.sort-ctl button { border: 1px solid var(--line); background: var(--card, #fff); color: inherit; border-radius: 6px; min-width: 30px; height: 30px; padding: 0 6px; cursor: pointer; font-size: .8rem; line-height: 1; }
.sort-ctl .drag-h { cursor: grab; font-size: 1.1rem; touch-action: none; }
.sort-ctl button:hover { border-color: var(--ink, #111); }
table.cat-sortable tr.is-dragging td { background: #fff7d6 !important; }
table.cat-sortable tr.is-dragging { box-shadow: 0 6px 18px rgba(0,0,0,.15); }
table.cat-sortable tbody tr:first-child .mv-up, table.cat-sortable tbody tr:last-child .mv-dn { opacity: .35; }
.sort-bar { position: sticky; bottom: 12px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; padding: 10px 14px; border-radius: var(--r); background: #111; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.sort-bar form { margin: 0; }
.sort-bar .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
@media (max-width: 700px) { .sort-ctl .drag-h { display: none; } .sort-bar { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); } }

/* Events list: a handed-off event shows just a truck in the flags column and the words under the customer name. */
.cover-line { display: inline-block; margin-top: 3px; font-size: .82rem; font-weight: 600; color: #8a440a; background: #fdeedd; border: 1px solid #f4c48f; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.flag.cover-ico { padding: 2px 6px; }

/* Profile menu: a long email wraps instead of running out of the box. */
.who .who-mail { overflow-wrap: anywhere; }

/* Reorder photos on the item page */
.photo { position: relative; }
.ph-order { position: absolute; top: 6px; left: 6px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(255,255,255,.85); border-radius: 8px; padding: 2px; }
[data-theme="night"] .ph-order { background: rgba(20,20,20,.8); }
.ph-grip { cursor: grab; font-size: .9rem; line-height: 1; color: var(--muted); }
.ph-move { border: 0; background: none; cursor: pointer; font-size: .7rem; line-height: 1; color: var(--ink); padding: 1px 3px; }
.ph-move:hover { color: var(--link); }
.ph-cover-tag { position: absolute; top: 6px; right: 6px; z-index: 2; background: var(--safety, #f5b700); color: #1f2328; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.photo.is-drag { opacity: .4; }
.ph-sortable .photo { transition: transform .08s; }

/* Write with AI description helper */
.ai-desc { margin: 2px 0 8px; }
.ai-desc-panel { margin-top: 8px; padding: 12px; border: 1.5px solid var(--safety, #f5b700); border-radius: 10px; background: color-mix(in srgb, var(--safety, #f5b700) 7%, var(--card, #fff)); }
.ai-desc-panel textarea { width: 100%; margin: 6px 0; }
.ai-desc-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-desc-status { min-height: 1em; }

/* Write descriptions with AI (bulk) */
.bd-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 4px; }
.bd-list { display: grid; gap: 14px; margin-top: 14px; }
.bd-row { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.bd-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.bd-row .bd-text { width: 100%; }
.bd-note-wrap { margin: 6px 0; }
.bd-note-wrap summary { cursor: pointer; font-size: .9rem; color: var(--muted); }
.bd-note-wrap .bd-note { width: 100%; margin-top: 6px; }
.bd-row-acts { display: flex; align-items: center; gap: 12px; }
.bd-ok { color: #1e8449; } .bd-bad { color: #c0392b; }

/* Demo sign-ups as cards */
.lead-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.lead-card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 14px 16px; }
.lead-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.lead-name { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-back { background: #d7ecd9; color: #1d5e2f; }
.lead-co { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.lead-x { white-space: nowrap; }
.lead-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0; }
.lead-contact a { font-size: .92rem; word-break: break-all; }
.lead-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0 0 10px; }
.lead-facts div { min-width: 0; }
.lead-facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.lead-facts dd { margin: 1px 0 0; font-size: .92rem; }
.lead-when { font-size: .82rem; border-top: 1px solid var(--line); padding-top: 8px; }

/* Full catalog tile editor on the Categories page */
.cat-full { margin: 12px 0 18px; }
.cat-full > summary { cursor: pointer; }
.cat-full-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.cat-full-thumb { width: 160px; height: 120px; flex: none; display: flex; align-items: center; justify-content: center; }
.cat-full-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.cat-full-star { font-size: 2.6rem; color: var(--safety, #f5b700); }
.cat-full-fields { display: grid; gap: 14px; min-width: 15rem; }
.cat-full-name { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.cat-full-name label, .cat-full-pic label.btn { display: block; }
.cat-full-name input { min-width: 12rem; }
.cat-full-pic { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Pricing tiers editor */
.tier-table td { vertical-align: middle; }
.tier-table input[type="text"] { width: 100%; }
.tier-table input[type="number"] { width: 7rem; }
.tier-table .tier-pct[readonly] { background: var(--soft); color: var(--muted); }

/* Rental period warning on the dark date bar: readable */
.ev-bar .ev-period-msg { color: #ffd166; font-weight: 700; font-size: .85rem; }
.ev-cal-day.is-off, .ev-cal-day:disabled { opacity: .28; cursor: not-allowed; }

/* Settings page: one card per area, a jump menu at the top, and a Save bar that stays in reach */
.set-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.set-jump a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--ink); }
.set-jump a:hover { border-color: var(--link); color: var(--link); }
.set-form { display: grid; gap: 18px; margin-bottom: 18px; }
.set-card { margin: 0 0 18px; scroll-margin-top: calc(var(--sp-top, 64px) + 12px); }
.set-form .set-card { margin: 0; }
.set-h { margin: 0 0 4px; font-size: 1.25rem; }
.set-lede { margin: 0 0 14px; }
.set-card h3 { margin: 22px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 1rem; }
.set-card h3:first-of-type { margin-top: 6px; padding-top: 0; border-top: 0; }
.set-save { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }

/* Events list flags: each badge stays on one line ("Tax form", "Conflict"), stacked one per row, and the
   column is wide enough for the longest one, so words never split in the middle. */
.evl table.events td.flags { min-width: 7.5rem; max-width: 11rem; overflow: visible; }
.evl table.events td.flags > .flag, .evl table.events td.flags > .checkhold, .evl table.events td.flags > * { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.evl table.events td.flags > .flag { border-radius: 999px; line-height: 1.3; }

/* Categories: tick several, show or hide them on several brands' websites */
.cat-bulk { flex-direction: column; align-items: stretch; }
.cat-bulk .cbb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cbb-brands { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cbb-brands legend { font-size: .8rem; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 4px; }
.cbb-co { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.cbb-co label.check { margin: 0; }
.cbb-co-all { padding-right: 10px; border-right: 1px solid var(--line); }
.cat-bulk .cbb-add[hidden], .cat-bulk .cbb-hint[hidden] { display: none; }
.cat-bulk .cbb-hint { margin: 0; }
table.cat-sortable tr.is-picked td { background: var(--note-bg); }
.cbk-brand h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.1rem; margin-top: 0; }
.cbk-list { columns: 3 14rem; column-gap: 24px; margin: 8px 0 4px; padding-left: 18px; }
.cbk-list li { break-inside: avoid; margin-bottom: 3px; }
.cbk-brand details + details { margin-top: 10px; }
.cbk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 30px; }
.cat-only-note { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: .88rem; }
@media (max-width: 700px) {
  .cbb-co-all { border-right: 0; padding-right: 0; flex-basis: 100%; }
  .cbk-actions .btn { flex: 1 1 100%; text-align: center; }
}
.bulk-qty { display: inline-flex; align-items: center; gap: 6px; }
.bulk-qty[hidden], .bulk-qty-hint[hidden] { display: none; }
.bulk-qty .bulk-amt { width: 4.5em !important; }
.bulk-qty-hint { flex-basis: 100%; margin: 0; }

/* Demo: tier and Owner / Staff switch across the top */
.demo-bar { background: #1f2328; color: #fff; border-bottom: 2px solid var(--safety, #f5b700); }
.demo-bar-form { max-width: 1400px; margin: 0 auto; padding: 7px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .88rem; }
.demo-bar-l { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .74rem; color: var(--safety, #f5b700); }
.demo-seg { display: inline-flex; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; }
.demo-seg button { appearance: none; border: 0; background: transparent; color: #fff; font: inherit; font-weight: 600; padding: 5px 13px; cursor: pointer; min-height: 32px; }
.demo-seg button + button { border-left: 1px solid rgba(255,255,255,.18); }
.demo-seg button:hover { background: rgba(255,255,255,.1); }
.demo-seg button.on { background: var(--safety, #f5b700); color: #1f2328; }
.demo-bar-note { color: rgba(255,255,255,.72); font-size: .82rem; }
@media (max-width: 640px) { .demo-bar-note { flex-basis: 100%; } .demo-seg button { padding: 5px 10px; } }
/* Staff permissions on a user's page */
.perm-box { border: 1px solid var(--line); border-radius: var(--r, 10px); padding: 12px 16px 8px; margin: 6px 0 4px; }
.perm-box legend { font-weight: 700; padding: 0 6px; }
.perm-box .perm-row, .perm-box .perm-all { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; }
.perm-box .perm-row .hint { display: block; margin-top: 1px; }
.perm-box .perm-all { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
input.price-locked { background: var(--soft, #f3f3f3) !important; color: var(--muted) !important; cursor: not-allowed; }
.price-lock-note { margin: 0 0 8px; }
/* Settings: Your BookLean (tier, version, upgrade) */
.your-bl .ybl-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.your-bl .ybl-tier { margin: 6px 0 4px; }
.your-bl .ybl-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--safety, #f5b700); color: #1f2328; font-weight: 800; font-size: .85rem; letter-spacing: .02em; }
.your-bl .ybl-up { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin: 0; }
.your-bl .ybl-more { margin-top: 12px; }
.your-bl .ybl-more summary { cursor: pointer; font-weight: 600; }
.your-bl .ybl-more ul { margin: 8px 0 4px 1.1rem; columns: 2 16rem; }
@media (max-width: 640px) { .your-bl .ybl-up { align-items: flex-start; } }
.your-bl .ybl-founder { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #1f2328; color: var(--safety, #f5b700); border: 1.5px solid var(--safety, #f5b700); font-weight: 800; font-size: .85rem; letter-spacing: .02em; }
.your-bl .ybl-creator { background: linear-gradient(135deg, #1f2328, #3a2f0b); box-shadow: 0 0 0 2px rgba(245,183,0,.25); }
/* License */
.lic-bar { background: #b3261e; color: #fff; padding: 9px 16px; text-align: center; font-weight: 600; }
.lic-bar a { color: #fff; text-decoration: underline; }
.lic-act { max-width: 640px; margin: 40px auto; }
.lic-act textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; word-break: break-all; }
/* Booth survey (phone first) */
.sv-wrap { max-width: 640px; margin: 0 auto; }
.sv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sv-head h1 { margin: 6px 0; }
.sv-event, .sv-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 14px; }
.sv-event input, .sv-filter select { flex: 1 1 10rem; width: auto; }
.sv-event label, .sv-filter label { font-weight: 700; }
.sv-form .sv-q { margin: 0 0 16px; border: 0; padding: 0; }
.sv-form legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.sv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-chip { position: relative; }
.sv-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; pointer-events: none; }
.sv-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card, #fff); font-weight: 600; cursor: pointer; user-select: none; }
.sv-chip input:checked + span { background: var(--safety, #f5b700); border-color: var(--safety, #f5b700); color: #1f2328; }
.sv-chip input:focus-visible + span { outline: 3px solid var(--focus, #2563eb); outline-offset: 2px; }
.sv-form input[type=text], .sv-form input[type=tel], .sv-form input[type=email] { font-size: 16px; min-height: 44px; }
.sv-save { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg, #f4f4f2) 30%); display: flex; gap: 8px; }
.sv-save .btn.primary { flex: 1; min-height: 52px; font-size: 1.05rem; }
.sv-del { margin: 10px 0 30px; }
.sv-tally { margin: 0 0 12px; } .sv-hot { color: #b3261e; font-weight: 700; }
.sv-card { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; padding: 12px 14px; margin: 0 0 10px; }
.sv-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.sv-int-hot { background: color-mix(in srgb, #b3261e 20%, transparent); } .sv-int-warm { background: color-mix(in srgb, #f5b700 30%, transparent); }
.sv-other { margin-top: 10px; font-size: 16px; min-height: 44px; }
.sv-money { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.sv-money label { font-weight: 600; }
.sv-dollar { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 1.1rem; }
.sv-dollar input, .sv-count { width: 7.5rem; font-size: 16px; min-height: 44px; }
.sv-yearly { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--safety, #f5b700) 22%, transparent); font-size: 1.02rem; }
.sv-sub { font-size: 1.05rem; margin: 24px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
/* Returning-customer gold on the dark colored section bars (like the purple Customer bar): a light gold that reads clearly. */
.ev-sec-h .is-returning, .ev-sec-h a.is-returning, .ev-sec-h .ret-star { color: #ffe08a !important; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
/* Themes that draw these bars light keep the darker gold. */
:is([data-theme="navygold"], [data-theme="charcoal"], [data-theme="forest"], [data-theme="slateblue"], [data-theme="mono"]) .ev-sec-h :is(.is-returning, a.is-returning, .ret-star) { color: #8a6300 !important; text-shadow: none; }
/* Revenue by month: the amounts box when you hover or tap a month */
.tile { position: relative; }
.bar-col { cursor: pointer; border-radius: 4px; }
.bar-col:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.bar-col.on { background: var(--soft); }
.bar-tip { position: absolute; z-index: 5; min-width: 150px; padding: 8px 11px; border-radius: 9px; background: var(--asphalt, #1f2328); color: #fff; font-size: .85rem; line-height: 1.35; box-shadow: 0 6px 18px rgba(0,0,0,.22); pointer-events: none; display: flex; flex-direction: column; gap: 1px; }
.bar-tip strong { font-size: .9rem; }
.bar-tip .tip-this { font-weight: 700; color: var(--safety, #f5b700); }
.bar-tip .tip-last { opacity: .85; }
.bar-tip .tip-chg { opacity: .85; font-size: .8rem; }
.bars-hint { font-size: .78rem; margin: 2px 0 0; }
.lic-bar.lic-soon { background: #8a5a00; }
.lic-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 14px; }
/* Settings → Your BookLean → Billing */
.ybl-billing { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ybl-billing h3 { margin: 0 0 10px; }
.bill-box { border: 1px solid var(--line); border-radius: var(--r, 10px); padding: 12px 14px; margin: 0 0 10px; background: var(--soft, #f7f7f5); }
.bill-box h4 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.bill-box p { margin: 4px 0; }
.bill-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px !important; }
/* Two-factor sign-in */
.tfa-input { font-size: 1.4rem; letter-spacing: .25em; max-width: 12rem; font-variant-numeric: tabular-nums; }
.tfa-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0; }
.tfa-row label { font-weight: 600; }
.tfa-qr { width: 200px; height: 200px; margin: 10px 0; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--line); }
.tfa-qr svg { width: 100%; height: 100%; display: block; }
.tfa-key { font-size: 1rem; letter-spacing: .08em; user-select: all; }
.tfa-steps li { margin: 0 0 10px; }
.tfa-codes { columns: 2; list-style: none; padding: 0; margin: 10px 0; } .tfa-codes li { margin: 0 0 6px; } .tfa-codes code { font-size: 1.05rem; }
.tfa-help { margin-top: 14px; } .tfa-help summary { cursor: pointer; }
/* Growth card: the numbers grow with the card, so a wide or tall card isn't mostly empty space. */
.db-growth { container-type: inline-size; }
@container (min-width: 520px) {
  .db-growth .db-gr-pct { font-size: clamp(4.2rem, 15cqw, 9.5rem); }
  .db-growth .db-gr-side { gap: clamp(6px, 1.4cqw, 16px); font-size: clamp(1rem, 2.4cqw, 1.5rem); }
  .db-growth .db-gr-side strong { font-size: clamp(1.6rem, 4.6cqw, 3rem); }
  .db-growth .db-lbl { font-size: clamp(.72rem, 1.25cqw, .92rem); }
}
/* Event page: the customer's mailing address */
.cust-addr { display: flex; flex-direction: column; gap: 6px; }
.frm-three { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px; }
.cust-same { align-self: flex-start; font-size: .85rem; }
.dp-savings { text-align: center; margin: 14px auto 0; font-weight: 700; }
.demo-bar-save { color: var(--safety, #f5b700); font-weight: 700; white-space: nowrap; margin-left: auto; padding: 0 6px; }
/* Customers list on phones: one thing per spot, so "completed" and "last event" never sit on top of each other.
   Left: name, phone, email.  Right: rating, events, completed.  Bottom: last event. */
@media (max-width: 700px) {
  .cust-list .cl-email { grid-column: 1; grid-row: 3; }
  .cust-list .cl-done { grid-column: 2; grid-row: 3; justify-self: end; align-self: center; white-space: nowrap; }
  .cust-list .cl-last { grid-column: 1 / -1; grid-row: 4; justify-self: start; white-space: nowrap; margin-top: 2px; }
  .cust-list .cl-count { white-space: nowrap; }
}
/* Phones: a section header that follows other content (like Customer after the crew notes) gets space above it,
   instead of being pulled up over that content like the first header in a card. */
@media (max-width: 700px) {
  .ev-sec-h:not(:first-child),
  .ev-zone + .ev-zone > .ev-sec-h:first-child { margin-top: 18px; }
}
/* Money still owed: one brighter red everywhere a balance is due (dashboard, events, event page, Today, handoffs). */
:root { --owe-ink: #d32f2f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --owe-ink: #ff6b6b; } }
[data-theme="night"], :root[data-theme="dark"] { --owe-ink: #ff6b6b; }
.db-due, .db-owed-tot, .money-big.bal-due, .bal-due, .lg-due, .lg-due b, .stop-money.owed { color: var(--owe-ink) !important; }
.db-ow-past, .db-ow-past .db-ow-sum, .db-ow-past strong { color: var(--owe-ink) !important; }
/* Demo bar: make "What would you save?" impossible to miss */
.demo-bar .demo-bar-save {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 7px 14px 7px 7px; border-radius: 999px; text-decoration: none;
  background: linear-gradient(135deg, #ffd34d, #f5b700 55%, #e09a00); color: #1f2328 !important;
  font-weight: 800; font-size: 1rem; letter-spacing: .01em;
  box-shadow: 0 0 0 2px rgba(255, 211, 77, .35), 0 4px 14px rgba(245, 183, 0, .35);
  transition: transform .15s ease, box-shadow .15s ease;
  animation: dbs-glow 2.6s ease-in-out infinite;
}
.demo-bar .demo-bar-save:hover, .demo-bar .demo-bar-save:focus-visible { transform: translateY(-1px) scale(1.03); box-shadow: 0 0 0 3px rgba(255, 211, 77, .55), 0 6px 18px rgba(245, 183, 0, .5); }
.demo-bar .demo-bar-save:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.dbs-coin { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #1e7a3c; color: #fff; font-weight: 900; font-size: 1.05rem; box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.dbs-arrow { font-weight: 900; transition: transform .15s ease; }
.demo-bar .demo-bar-save:hover .dbs-arrow { transform: translateX(3px); }
@keyframes dbs-glow { 0%, 100% { box-shadow: 0 0 0 2px rgba(255, 211, 77, .35), 0 4px 14px rgba(245, 183, 0, .35); } 50% { box-shadow: 0 0 0 5px rgba(255, 211, 77, .18), 0 4px 22px rgba(245, 183, 0, .6); } }
@media (prefers-reduced-motion: reduce) { .demo-bar .demo-bar-save { animation: none; } }
@media (max-width: 700px) { .demo-bar .demo-bar-save { margin: 6px 0 0; font-size: .95rem; } }
/* Demo bar: the savings calculator as a bold gold button, so nobody misses it. */
.demo-bar .demo-bar-save { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; padding: 7px 14px 7px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #ffd54a, #f5b700); color: #1f2328 !important; text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(245, 183, 0, .45), inset 0 0 0 1px rgba(255,255,255,.35); transition: transform .15s ease, box-shadow .15s ease; }
.demo-bar .demo-bar-save:hover, .demo-bar .demo-bar-save:focus-visible { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245, 183, 0, .6), inset 0 0 0 1px rgba(255,255,255,.45); }
.demo-bar .demo-bar-save:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.demo-bar-save .dbs-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1e7a3c; color: #fff; font-weight: 900; font-size: 1.05rem; flex: none; }
.demo-bar-save .dbs-t { display: flex; flex-direction: column; line-height: 1.15; }
.demo-bar-save .dbs-t strong { font-size: .98rem; font-weight: 800; }
.demo-bar-save .dbs-t small { font-size: .74rem; font-weight: 600; opacity: .8; }
.demo-bar-save .dbs-go { font-size: 1.4rem; font-weight: 800; line-height: 1; }
@media (prefers-reduced-motion: no-preference) {
  .demo-bar-save .dbs-ic { animation: dbs-pulse 2.4s ease-in-out infinite; }
  @keyframes dbs-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(30, 122, 60, .55); } 50% { box-shadow: 0 0 0 6px rgba(30, 122, 60, 0); } }
}
@media (max-width: 700px) { .demo-bar .demo-bar-save { margin: 6px 0 0; width: 100%; justify-content: flex-start; white-space: normal; } .demo-bar-save .dbs-go { margin-left: auto; } }
.demo-bar .demo-bar-save .dbs-t strong { background: none; color: inherit; text-transform: none; letter-spacing: normal; padding: 0; border-radius: 0; box-shadow: none; }
.dp-buy { display: block; text-align: center; margin: 12px 0 0; }
/* Demo pricing: the "price of one inflatable" hook */
.dp-hook { display: inline-flex; align-items: center; gap: 10px; margin: 10px auto 4px; padding: 10px 18px; border-radius: 14px; max-width: 46rem;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,213,74,.45); color: #fff; font-weight: 700; font-size: 1.05rem; line-height: 1.35; text-align: left; }
.dp-hook-ic { font-size: 1.4rem; flex: none; }
@media (max-width: 600px) { .dp-hook { font-size: .95rem; padding: 9px 12px; } }
.dp-head .dp-hook { color: #fff; font-size: 1.12rem; }
.db-update { margin: 0 0 14px; }

/* ===== Mobile review (build 371) ===== */
/* Calendar key: each colored square stays with its label. */
.mc-k { white-space: nowrap; }

@media (max-width: 760px) {
  /* Menu labels never break mid-word ("Inventor / y"); the rows share the width evenly instead. */
  nav.primary a span, .menu summary span, .tools .tool-link span { white-space: nowrap; }
  /* Tools row (Search, Inventory, Setup…): shares the width evenly. */
  .tools .menu summary, .tools .tool-link { min-width: 0; flex: 1 1 0; padding: 6px 2px 4px; font-size: .7rem; }
  /* Main tabs: each its natural width, and the row scrolls sideways when there are more than fit. */
  nav.primary { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav.primary::-webkit-scrollbar { display: none; }
  nav.primary a { flex: 0 0 auto; min-width: 58px; padding: 6px 8px 4px; font-size: .72rem; }
  nav.primary a svg, .tools .menu summary svg, .tools .tool-link svg { width: 18px; height: 18px; }
  .tools { display: flex; flex: 1 1 100%; order: 2; align-items: stretch; }
  .tools .menu { flex: 1 1 0; display: flex; }
  .tools .menu summary { width: 100%; }
  /* The company switcher gets its own spot at the right of the BookLean row, wide enough to read. */
  .co-switch { order: 1; padding: 0 0 0 4px; }
  .co-switch select { max-width: 9.5rem; font-size: .78rem; padding: 5px 6px; }
}
@media (max-width: 380px) {
  .tools .menu summary, .tools .tool-link { font-size: .64rem; }
}

/* Website Tools: the key lock is a tidy row (box + label, then the website, then Save) on phones. */
.wt-lock-form { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.wt-lock-form .check { margin: 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.wt-lock-form input[type=text] { flex: 1 1 10rem; min-width: 0; }
@media (max-width: 700px) {
  .wt-lock-form .check input { width: auto; margin: 0; }
}

/* Demo: the "everything here is made up" note is one compact line on phones. */
@media (max-width: 700px) {
  .demo-bar { padding: 8px 12px; font-size: .82rem; margin-bottom: 10px; }
  .demo-bar-note { display: none; }
}
@media (max-width: 760px) {
  nav.primary { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 22px; }
}
/* Small buttons never split a word ("Edi / t"). */
.btn.small { white-space: nowrap; }
/* Go-live checklist: boxes you tick yourself are the same size as the automatic ones. */
.gl-list .gl-tick { flex: none; margin: 0; }
.gl-list .gl-tick input[type=checkbox] { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; accent-color: #1f8a46; }
/* Demo note: short on phones, full on bigger screens. */
.demo-note .dn-short { display: none; }
@media (max-width: 700px) {
  .demo-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .demo-note .dn-long { display: none; }
  .demo-note .dn-short { display: inline; }
  .demo-note .demo-reset { margin: 0 0 0 auto; }
}
/* Phone cards (tables shown as cards): the details always line up two to a row, so every card looks alike. */
@media (max-width: 700px) {
  table.stk td:not(:first-child):not(.stk-full) { flex: 1 1 calc(50% - 7px); max-width: calc(50% - 7px); }
  table.stk td:last-child:has(> a, > button, > form):not(:first-child) { flex-basis: 100%; max-width: 100%; } /* an Edit link or button gets its own row */
  /* A box that already names itself ("☑ Taxable") doesn't repeat the column heading above it. */
  table.stk td:has(> label.check)::before { display: none !important; }
}
@media (max-width: 700px) {
  /* In half-width card cells, long emails and words wrap instead of running into the next column. */
  table.stk td:not(:first-child):not(.stk-full), table.stk td:not(:first-child):not(.stk-full) :where(a, span, strong, b, em, small) { overflow-wrap: anywhere; word-break: normal; }
  table.stk td[data-label]:not(:first-child)::before { white-space: normal; overflow-wrap: break-word; line-height: 1.25; }
}
.db-card.db-loading { opacity: .6; transition: opacity .15s; }
/* Badges that mean something (your plan, Founding Member, Customer #0) look the same in every color theme:
   BookLean gold, never the theme's accent color. */
.your-bl .ybl-badge { background: #f5b700; color: #1f2328; }
.your-bl .ybl-founder { color: #f5b700; border-color: #f5b700; }
/* Phones: dropdown menus (Inventory, Setup, Resources, your name) open full width under the menu row,
   so they never hang off either side of the screen. */
@media (max-width: 760px) {
  .tools { position: relative; }
  .tools .menu { position: static; }
  .tools .menu .panel { left: 6px; right: 6px; width: auto; min-width: 0; max-width: none; top: 100%; border-radius: 0 0 var(--r) var(--r); max-height: 70vh; overflow-y: auto; }
}
@media (max-width: 760px) {
  .tools { z-index: 40; }
  .tools .menu .panel { z-index: 50; background: var(--card); }
}
/* Demo page: the button to the free demo, under the heading */
.dp-head .dp-try { margin: 16px auto 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dp-head .dp-try .btn { font-size: 1.05rem; padding: 11px 28px; border-radius: 10px; }
.dp-head .dp-try span { color: rgba(255,255,255,.65); font-size: .85rem; }
html { scroll-behavior: smooth; }
#try { scroll-margin-top: 12px; }


/* ---------- Setup and Settings pages: colored banners across the top of each box (build 421) ---------- */
.band-look .card.banded { padding-top: 0; }
.band-look .banded > .band-h {
  margin: 0 calc(-1 * var(--cp-r, 22px)) 16px calc(-1 * var(--cp-l, 22px));
  padding: 12px var(--cp-r, 22px) 12px var(--cp-l, 22px);
  border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0;
  font-size: 1.2rem; line-height: 1.25;
}
.band-look .band-a { background: var(--asphalt); color: #fff; }
.band-look .band-b { background: var(--safety); color: var(--safety-ink); }
.band-look .band-h a, .band-look .band-sub a { color: inherit; }
.setup-look summary.band-h { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.setup-look summary.band-h h3, .setup-look summary.band-h h2 { margin: 0; color: inherit; font-size: 1.2rem; padding: 0; border: 0; }
.band-look .band-h .hint, .band-look .band-sub .hint { color: inherit; opacity: .85; }
.setup-look details.banded:not([open]) { padding-bottom: 0; }
.setup-look details.banded:not([open]) > .band-h { margin-bottom: 0; border-radius: calc(var(--r) - 1px); }
.band-look .card .band-sub, .band-look .set-card h3.band-sub, .band-look .set-card h3.band-sub:first-of-type {
  margin: 22px calc(-1 * var(--cp-r, 22px)) 12px calc(-1 * var(--cp-l, 22px));
  padding: 8px var(--cp-r, 22px) 8px var(--cp-l, 22px); border-top: 0; font-size: 1rem;
}
.band-look .grid > h3.band-sub { grid-column: 1 / -1; }
[data-theme="mono"] .band-look .band-b, html[data-theme="mono"] .band-b { background: var(--soft-2); color: var(--ink); } /* one-color theme: gray instead of a second black */

/* Settings: a side menu, one area at a time (build 421) */
.set-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.set-side { flex: 1 1 220px; max-width: 250px; position: sticky; top: calc(var(--sp-top, 64px) + 12px); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; max-height: calc(100vh - var(--sp-top, 64px) - 24px); overflow-y: auto; }
.set-side h2 { margin: 12px 10px 4px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.set-side h2:first-child { margin-top: 6px; }
.set-side a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r); text-decoration: none; color: var(--ink); font-weight: 500; }
.set-side a:hover { background: var(--soft); }
.set-side a.on { background: var(--asphalt); color: #fff; font-weight: 600; }
.set-panes { flex: 999 1 560px; min-width: 0; }
.set-panes > .set-form { margin-bottom: 0; }
.set-panes .set-save { margin-top: 18px; }
.set-panes .set-card, .set-panes > .card { margin-bottom: 0; }
@media (max-width: 820px) {
  .set-side { position: static; max-width: none; max-height: none; flex-basis: 100%; display: flex; gap: 6px; overflow-x: auto; padding: 6px; }
  .set-side h2 { display: none; }
  .set-side a { flex: 0 0 auto; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; }
}

.band-look .band-h.band-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.band-look .band-h.band-row > h2, .band-look .band-h.band-row > h3 { margin: 0; color: inherit; font-size: 1.2rem; }
.band-look .band-h.band-row .btn { background: var(--card); color: var(--ink); }

/* Keep room for the scroll bar on every page, so switching between a short page and a long one (like
   Settings sections) never makes the page jump wider or narrower (build 422). */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }

/* Setup and Settings pages use more of a wide screen (build 424). Text paragraphs stay a comfortable
   reading width; boxes, tables and fields spread out. */
.setup-look main { max-width: 1800px; }
.setup-look main .card p, .setup-look main .hint { max-width: 90ch; }

/* A % sign inside a percent box (Card Processing Fee %) (build 425) */
.pct-in { position: relative; display: block; max-width: 12rem; }
.pct-in input { width: 100%; padding-right: 32px; box-sizing: border-box; }
.pct-in > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }

/* Settings side menu: each area's heading is a colored banner, alternating like the boxes (build 427) */
.set-side h2.band-a, .set-side h2.band-b { margin: 10px 0 4px; padding: 8px 12px; border-radius: var(--r); font-size: .78rem; }
.set-side h2.band-a { background: var(--asphalt); color: #fff; }
.set-side h2.band-b { background: var(--safety); color: var(--safety-ink); }
.set-side h2:first-child { margin-top: 0; }

/* Banners on dashboard tiles and stats tiles too (build 431) */
.band-look .tile.banded { padding-top: 0; }
.band-look .db-h.band-h { margin-bottom: 14px; }
.band-look .db-h.band-h select, .band-look .band-h.band-row select { background: var(--card); color: var(--ink); }
.band-look .band-h.band-row form { margin: 0; }
.band-look .band-h :not(.btn):not(select):not(input):not(option):not(.pill):not(.db-owed-tot) { color: inherit; } /* totals and notes in a banner stay readable */

/* Dashboard: the total owed sits in its own bubble in the banner, so it pops (build 432) */
.db-h .db-owed-tot { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; background: var(--err-bg); color: var(--err-ink); border: 1px solid currentColor; white-space: nowrap; }
.band-look .db-h.band-h .db-owed-tot { background: #fff; color: #b42318; border-color: #fff; }
[data-theme="night"] .band-look .db-h.band-h .db-owed-tot { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-ink); }

/* Resources: guides grouped by topic, each topic a box with a colored banner, and a search box (build 434) */
.res-search { margin: 0 0 18px; max-width: 560px; }
.res-search input { width: 100%; }
.res-topic { margin-bottom: 18px; }
.res-topic h2 { display: flex; align-items: center; gap: 10px; }
.res-n { font-size: .8rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.2); }
.band-b .res-n { background: rgba(0,0,0,.12); }
.res-topic .res-card { border-left-width: 1px; }

/* Resources: each guide with its cheat sheets beside it as "Quick steps" (build 435) */
.res-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); }
.res-guide .res-card { border-left: 4px solid var(--asphalt); height: 100%; box-sizing: border-box; }
.res-quick { display: grid; gap: 8px; }
.res-quick-h { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.res-quick .res-card { border-left: 4px solid var(--safety); padding: 12px 14px; }
.res-pair + .res-list { margin-top: 4px; }
@media (max-width: 700px) { .res-pair { grid-template-columns: 1fr; } }

/* Phone quote (and its "sent" screen): one centered column instead of hugging the left (build 437) */
main:has(form.quick) > *, main:has(.quick-total) > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.quick, .quick-total { max-width: none; }

/* Dashboard box pickers (date ranges, categories): normal-size text, so the box and the list it opens aren't oversized.
   Phones keep 16px so iPhones don't zoom in when it's tapped (build 459). */
.db-h select, .band-h.band-row select { font-size: .9rem; padding: 6px 30px 6px 10px; min-height: 0; height: auto; line-height: 1.3; }
@media (max-width: 700px) { .db-h select, .band-h.band-row select { font-size: 16px; } }

/* Growth box (460): running-total chart and quarter tiles under the big number */
.db-gr-main { display: grid; gap: 6px; }
.db-gr-diff { font-size: 1.35rem; font-weight: 700; color: var(--ok-ink); font-variant-numeric: tabular-nums; }
.db-gr-diff.down { color: var(--err-ink); }
.db-gr-diff span { font-size: .8rem; font-weight: 500; color: var(--muted); }
.db-gr-plot { margin-top: 14px; }
.db-gr-chart { display: block; width: 100%; height: auto; overflow: visible; font-variant-numeric: tabular-nums; }
.db-gr-chart .gr-band { fill: color-mix(in srgb, var(--asphalt) 5%, transparent); }
.db-gr-chart .gr-grid { stroke: var(--line); stroke-dasharray: 2 4; }
.db-gr-chart .gr-base { stroke: var(--line); }
.db-gr-chart .gr-ax { fill: var(--muted); font-size: 12px; }
.db-gr-chart .gr-hit { fill: transparent; }
.db-gr-chart .gr-hit:hover { fill: color-mix(in srgb, var(--asphalt) 6%, transparent); }
.db-gr-chart .gr-last { fill: none; stroke: #a9adb2; stroke-width: 2.5; stroke-dasharray: 6 5; pointer-events: none; }
.db-gr-chart .gr-now { fill: none; stroke: #1fb04e; stroke-width: 3.5; stroke-linejoin: round; pointer-events: none; }
.db-gr-chart .gr-now.down, .db-gr-chart .gr-dot.down, .db-gr-chart .gr-gap.down { stroke: #ef4444; fill: none; }
.db-gr-chart .gr-dot { fill: #1fb04e; stroke: none; }
.db-gr-chart .gr-dot.down { fill: #ef4444; stroke: none; }
.db-gr-chart .gr-dot-last { fill: #a9adb2; }
.db-gr-chart .gr-gap { stroke: #1fb04e; stroke-width: 2; }
.db-gr-chart .gr-proj { fill: none; stroke: #1fb04e; stroke-width: 2.5; stroke-dasharray: 2 5; stroke-linecap: round; opacity: .75; }
.db-gr-chart .gr-proj.down { stroke: #ef4444; }
.db-gr-chart .gr-lbl-now { fill: var(--ok-ink); font-size: 15px; font-weight: 700; }
.db-gr-chart .gr-lbl-now.down { fill: var(--err-ink); }
.db-gr-chart .gr-lbl-last { fill: var(--muted); font-size: 13px; }
.db-gr-chart .gr-lbl-now, .db-gr-chart .gr-lbl-last { paint-order: stroke; stroke: var(--card); stroke-width: 5px; stroke-linejoin: round; }
.db-gr-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 4px 0 0; }
.db-gr-key .ki { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.db-gr-key i { display: inline-block; width: 18px; height: 0; border-top: 3px solid #1fb04e; }
.db-gr-key .k-now.down, .db-gr-key .k-proj.down { border-top-color: #ef4444; }
.db-gr-key .k-last { border-top: 3px dashed #a9adb2; }
.db-gr-key .k-proj { border-top-style: dotted; }
@container (max-width: 560px) {
  .db-gr-chart .gr-ax { font-size: 20px; }
  .db-gr-chart .gr-lbl-now { font-size: 25px; }
  .db-gr-chart .gr-lbl-last { font-size: 21px; }
  .db-gr-chart .gr-now { stroke-width: 5; }
  .db-gr-chart .gr-last { stroke-width: 3.5; }
}
.db-gr-qs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.db-gr-q { background: color-mix(in srgb, var(--asphalt) 5%, var(--card)); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.db-gr-q.later { opacity: .7; }
.db-gr-qv { font-size: 1.35rem; font-weight: 700; }
.db-gr-qv.up, .db-gr-qd.up { color: var(--ok-ink); }
.db-gr-qv.down, .db-gr-qd.down { color: var(--err-ink); }
.db-gr-qd { font-weight: 600; }
.db-gr-q .hint { font-size: .78rem; }
@media (max-width: 700px) { .db-gr-qs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* With the chart below it, the big number no longer has to fill the whole box. */
@container (min-width: 0px) { .db-growth .db-gr-pct { font-size: clamp(3.2rem, 9cqw, 6rem); } .db-growth .db-gr-side strong { font-size: clamp(1.4rem, 3.2cqw, 2.2rem); } }
/* Growth chart hover (461): a line and both totals follow the pointer */
.db-gr-plot { position: relative; }
.db-gr-chart { touch-action: pan-y; cursor: crosshair; }
.db-gr-chart .gr-vline { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.db-gr-chart .gr-hn { fill: #1fb04e; stroke: var(--card); stroke-width: 2; }
.db-gr-chart .gr-hn.down { fill: #ef4444; }
.db-gr-chart .gr-hl { fill: #a9adb2; stroke: var(--card); stroke-width: 2; }
.db-gr-tip { position: absolute; z-index: 3; pointer-events: none; display: grid; gap: 1px; padding: 7px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.12); font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-gr-tip[hidden] { display: none; }
.db-gr-tip .tn { font-weight: 700; }
.db-gr-tip .tl { color: var(--muted); }
.db-gr-tip .up { color: var(--ok-ink); font-weight: 600; }
.db-gr-tip .down { color: var(--err-ink); font-weight: 600; }
/* Growth box (463): brighter green for the numbers too (large text bright, small text a touch deeper so it stays readable) */
.db-growth { --gr-up: #17a34a; --gr-up-sm: #15873e; }
.db-growth .db-gr-pct:not(.down), .db-growth .db-gr-diff:not(.down), .db-growth .db-gr-qv.up { color: var(--gr-up); }
.db-growth .db-gr-qd.up, .db-gr-tip .up { color: var(--gr-up-sm); }
.db-gr-chart .gr-lbl-now:not(.down) { fill: var(--gr-up); }
.db-growth { --gr-down: #e5262f; --gr-down-sm: #cc1f27; }
.db-growth .db-gr-pct.down, .db-growth .db-gr-diff.down, .db-growth .db-gr-qv.down { color: var(--gr-down); }
.db-growth .db-gr-qd.down, .db-gr-tip .down { color: var(--gr-down-sm); }
.db-gr-chart .gr-lbl-now.down { fill: var(--gr-down); }

/* Item pricing (465): pick hour tiers or by the hour; the one not in use is greyed out */
.pm-choose { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.pm-choose legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.pm-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--card); }
.pm-opt input { margin-top: 3px; }
.pm-opt > span { display: grid; gap: 2px; }
.pm-opt:has(input:checked) { border-color: var(--asphalt); box-shadow: 0 0 0 2px color-mix(in srgb, var(--asphalt) 25%, transparent); }
.pm-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 4px; margin-bottom: 12px; transition: opacity .15s; }
.pm-sec h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.pm-sec.pm-off { opacity: .45; background: color-mix(in srgb, var(--asphalt) 4%, transparent); }
.pm-sec.pm-off input { pointer-events: none; }
.pm-sec:not(.pm-off) .pm-tag { background: #e3f4e8; color: #17703a; }

/* Arrange items inside a category (467) */
.io-arrange{font-size:.85em;white-space:nowrap}
.io-own{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:12px 0}
.io-own p{margin:0;flex:1 1 320px}
.io-own form{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.io-thumb{width:64px;height:48px;border-radius:6px;overflow:hidden;background:var(--line,#e5e7eb)}
.io-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.io-table td{vertical-align:middle}
.io-table .io-n{color:var(--muted,#6b7280);width:2.5em}
.io-inactive td{opacity:.6}

/* Pause all customer emails (468) */
.em-pause{margin:14px 0}
.em-pause .check{font-size:1.05em}
.em-pause .field{max-width:520px;margin:10px 0}
.em-pause.is-paused{border-color:#d08a00;background:#fff8e6}

/* Switch customer on the event page (485) */
.cs-switch{margin:-4px 0 10px}
.cs-switch>summary{cursor:pointer;font-size:.9rem;color:var(--accent,#2f5bea);display:inline-block}
.cs-panel{border:1px solid var(--line,#e5e7eb);border-radius:10px;padding:12px;margin-top:8px;background:var(--soft,#f7f7f8)}
.cs-panel input[type=search]{width:100%;max-width:420px}
.cs-res{list-style:none;margin:8px 0;padding:0;max-height:320px;overflow:auto}
.cs-res li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 6px;border-bottom:1px solid var(--line,#e5e7eb)}

/* This event only: organization / email (486) */
.ev-only{grid-column:1/-1;margin:2px 0 6px}
.ev-only>summary{cursor:pointer;font-size:.88rem;color:var(--accent,#2f5bea)}
.ev-only label{display:block;font-size:.85rem;margin:8px 0 2px}
.ev-only input{width:100%;max-width:420px}

/* Resources: every card in one even grid; guides keep the dark edge, cheat sheets the yellow edge and a Quick steps tag (488) */
.res-topic .res-card.res-guide { border-left: 4px solid var(--asphalt); }
.res-topic .res-card.res-qs { border-left: 4px solid var(--safety); }
.res-qs-tag { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }

/* Customer page: other organizations / emails they booked under (490) */
.cu-also{display:flex;flex-direction:column;gap:4px}
.cu-also .lbl{font-weight:600;font-size:.9rem}
.cu-also .tag{display:inline-block;margin:0 6px 4px 0}

/* Customer suggestions while typing on a new quote (492) */
.cf-list{list-style:none;margin:2px 0 8px;padding:4px;border:1px solid var(--line,#e5e7eb);border-radius:10px;background:var(--card,#fff);box-shadow:0 8px 24px rgba(0,0,0,.12);max-height:300px;overflow:auto;grid-column:1/-1;position:relative;z-index:20}
.cf-list li{padding:8px 10px;border-radius:8px;cursor:pointer;display:block}
.cf-list li .hint{display:block}
.cf-list li:hover,.cf-list li.on{background:var(--soft,#f3f4f6)}
.cf-note{grid-column:1/-1;margin:0 0 6px}
