/* Landscape Office prototype. Calm paper surfaces, one eucalyptus-green accent.
   Phase colours (map pins, badges) are validated: blue / orange / aqua / neutral, always with a letter. */

:root {
  color-scheme: light;
  --bg: #f4f3ee;
  --surface: #fcfcfb;
  --surface-2: #f0efe9;
  --line: #e1dfd6;
  --line-2: #cfccc0;
  --ink: #171a16;
  --ink-2: #4a4f47;
  --ink-3: #6f746b;
  --accent: #2f6b4f;
  --accent-2: #3d8462;
  --accent-soft: #e3efe7;
  --accent-ink: #ffffff;
  --ph-design: #2a78d6;
  --ph-approval: #eb6834;
  --ph-delivery: #1baf7a;
  --ph-establish: #52514e;
  --good: #0ca30c;
  --good-ink: #12701a;
  --warn: #fab219;
  --warn-ink: #8a5a00;
  --serious: #ec835a;
  --bad: #d03b3b;
  --bad-ink: #a42727;
  --track: #e7e5dd;
  --shadow: 0 1px 2px rgba(20, 24, 18, .05), 0 6px 20px rgba(20, 24, 18, .05);
  --shadow-pop: 0 18px 50px rgba(20, 24, 18, .18);
  --r: 14px;
  --r-sm: 9px;
  --side: 232px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121411; --surface: #1a1c19; --surface-2: #222521; --line: #2d302b; --line-2: #3b3f38;
    --ink: #eeefe9; --ink-2: #c3c6bb; --ink-3: #969a8f;
    --accent: #6fbf94; --accent-2: #84cfa6; --accent-soft: #20352a; --accent-ink: #0d1a12;
    --ph-design: #3987e5; --ph-approval: #d95926; --ph-delivery: #199e70; --ph-establish: #a3a29b;
    --good-ink: #5fd06a; --warn-ink: #f4c35a; --bad-ink: #f08080; --track: #2d302b;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-pop: 0 18px 50px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121411; --surface: #1a1c19; --surface-2: #222521; --line: #2d302b; --line-2: #3b3f38;
  --ink: #eeefe9; --ink-2: #c3c6bb; --ink-3: #969a8f;
  --accent: #6fbf94; --accent-2: #84cfa6; --accent-soft: #20352a; --accent-ink: #0d1a12;
  --ph-design: #3987e5; --ph-approval: #d95926; --ph-delivery: #199e70; --ph-establish: #a3a29b;
  --good-ink: #5fd06a; --warn-ink: #f4c35a; --bad-ink: #f08080; --track: #2d302b;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-pop: 0 18px 50px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.svg-ic { width: 18px; height: 18px; flex: none; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.brand b { display: block; font-size: 14.5px; }
.brand span { font-size: 11.5px; color: var(--ink-3); }
.nav-btn {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--ink-2); cursor: pointer; text-align: left; font-weight: 520;
}
.nav-btn:hover { background: var(--surface-2); color: var(--ink); }
.nav-btn[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav-btn .count { margin-left: auto; font-size: 11.5px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); padding: 1px 7px; border-radius: 99px; }
.nav-btn[aria-current="page"] .count { background: var(--surface); }
.side-foot { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.side-foot button { justify-content: flex-start; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search .svg-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 16px; height: 16px; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; max-height: 60vh; overflow: auto; }
.search-results button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; }
.search-results button:hover, .search-results button.on { background: var(--surface-2); }
.search-results .kind { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.topbar .spacer { flex: 1; }
.sync-status .btn { color: var(--ink-3); }
.sync-status.st-offline .btn, .sync-status.st-signin .btn, .sync-status.st-problem .btn { color: #b45309; }
.view { padding: 26px 28px 60px; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 560; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn .svg-ic { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { min-height: 80px; resize: vertical; }
.row { display: flex; gap: 12px; } .row > * { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; background: var(--surface); }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 560; }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

/* ---------- cards, grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head .end { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 16px; align-content: start; grid-template-columns: minmax(0, 1fr); }
.grid > *, .stack > * { min-width: 0; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.tile { padding: 16px 18px; }
.tile .k { font-size: 12.5px; color: var(--ink-3); font-weight: 560; }
.tile .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .d { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; } .li.click:hover { background: var(--surface-2); }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 560; }
.li .s { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 26px 18px; color: var(--ink-3); text-align: center; }
.check { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; color: transparent; }
.check.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check .svg-ic { width: 12px; height: 12px; }
.li.done .t { text-decoration: line-through; color: var(--ink-3); }

/* status pills: always icon + label, colour never alone */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill .svg-ic { width: 13px; height: 13px; }
.pill.good { color: var(--good-ink); background: color-mix(in srgb, var(--good) 14%, transparent); }
.pill.warn { color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 22%, transparent); }
.pill.bad  { color: var(--bad-ink);  background: color-mix(in srgb, var(--bad) 13%, transparent); }
.pill.accent { color: var(--accent); background: var(--accent-soft); }
.phase { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.phase i { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 750; color: #fff; }
.ph-design i { background: var(--ph-design); } .ph-approval i { background: var(--ph-approval); }
.ph-delivery i { background: var(--ph-delivery); } .ph-establish i { background: var(--ph-establish); }
:root[data-theme="dark"] .ph-establish i { color: #121411; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph-establish i { color: #121411; } }

.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); flex: none; }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.kind-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.kind-ic .svg-ic { width: 15px; height: 15px; }

/* meters (budget used) */
.meter { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; position: relative; }
.meter > b { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); }
.meter.warn > b { background: var(--warn); }
.meter.bad > b { background: var(--bad); }
.meter-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.meter-row .meter { grid-column: 1 / -1; }

/* tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--surface-2); }
.tbl .r { text-align: right; }

/* ---------- pipeline ---------- */
.board { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--surface-2); border-radius: var(--r); padding: 10px; min-height: 360px; display: flex; flex-direction: column; gap: 8px; border: 1px solid transparent; }
.col.over { border-color: var(--accent); background: var(--accent-soft); }
.col-head { display: flex; align-items: baseline; gap: 8px; padding: 4px 4px 6px; }
.col-head b { font-size: 13px; }
.col-head span { font-size: 12px; color: var(--ink-3); margin-left: auto; font-variant-numeric: tabular-nums; }
.deal { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; cursor: grab; box-shadow: var(--shadow); }
.deal:hover { border-color: var(--line-2); }
.deal.dragging { opacity: .45; }
.deal .t { font-weight: 600; line-height: 1.3; }
.deal .c { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.deal .m { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 12.5px; }
.deal .next { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; }
.deal .next .svg-ic { width: 14px; height: 14px; margin-top: 2px; }
.deal .next.late { color: var(--bad-ink); }

/* ---------- project page ---------- */
.proj-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.proj-head .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.crumb button { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; }
.stagebar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 6px 0 18px; }
.stagebar .s { padding: 8px 8px 7px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; min-width: 0; }
.stagebar .s b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.stagebar .s span { color: var(--ink-3); font-size: 11.5px; }
.stagebar .s.done { background: var(--accent-soft); border-color: transparent; }
.stagebar .s.done b { color: var(--accent); }
.stagebar .s.now { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 10px 13px; cursor: pointer; color: var(--ink-3); font-weight: 580; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-top: 10px; }
.photo { aspect-ratio: 4/3; border-radius: 8px; background: linear-gradient(135deg, #8fae8b, #496f52); display: grid; place-items: center; color: rgba(255,255,255,.85); }
.photo:nth-child(3n+2) { background: linear-gradient(135deg, #b9a77d, #6f6243); }
.photo:nth-child(3n) { background: linear-gradient(135deg, #8eb0bf, #4b6d7c); }
.photo .svg-ic { width: 18px; height: 18px; }
.countdown { display: flex; align-items: baseline; gap: 8px; }
.countdown .big { font-size: 34px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.timeline { position: relative; padding-left: 4px; }
.tl-item { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 14.5px; top: 32px; bottom: 2px; width: 1px; background: var(--line); }
.capture-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; }
.capture-vis { min-height: 220px; background: radial-gradient(ellipse at 30% 40%, #6c8f5f 0, #3e5b3a 45%, #253824 100%); position: relative; display: grid; place-items: center; color: #fff; }
.capture-vis .dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1.4px); background-size: 9px 9px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.capture-vis .lbl { position: relative; text-align: center; font-weight: 650; }

/* map */
.map-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; height: calc(100vh - 180px); min-height: 520px; }
.map-list { overflow: auto; }
#map { width: 100%; height: 100%; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); cursor: pointer; }
.pin i { transform: rotate(45deg); font-style: normal; color: #fff; font-weight: 750; font-size: 11px; }
.pin.lead { background: #fff; border-color: var(--ink-2); border-style: dashed; }
.pin.lead i { color: var(--ink); }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.maplibregl-popup-content { border-radius: 12px !important; padding: 12px 14px !important; font: 13px/1.4 Inter, system-ui, sans-serif; color: #171a16; }

/* plants */
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; min-width: 180px; }
.months span { height: 14px; border-radius: 3px; background: var(--track); font-size: 8.5px; color: var(--ink-3); display: grid; place-items: center; }
.months span.on { background: var(--accent); color: var(--accent-ink); }
.months span.mark { outline: 2px solid var(--ink); outline-offset: 0; }

/* tenders */
.score-row { display: grid; grid-template-columns: 130px 1fr 26px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.score-row input[type=range] { accent-color: var(--accent); width: 100%; }
.score-big { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; }

/* modal + toast */
.modal-back { position: fixed; inset: 0; background: rgba(15, 18, 14, .4); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .15s var(--ease); }
.modal { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-pop); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: rise .2s var(--ease); }
.modal.wide { width: min(780px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 11px; box-shadow: var(--shadow-pop); font-weight: 560; animation: rise .2s var(--ease); display: flex; gap: 8px; align-items: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.proposal-doc { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--surface-2); }
.proposal-doc .tbl td, .proposal-doc .tbl th { padding: 7px 8px; }
.sign-box { margin-top: 14px; border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.notice { display: flex; gap: 10px; padding: 11px 14px; border-radius: 11px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); align-items: flex-start; }
.notice .svg-ic { margin-top: 1px; }
.proto-tag { font-size: 11px; font-weight: 650; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }

/* ---------- phone ---------- */
.tabbar { display: none; }
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 10px 16px; }
  .view { padding: 18px 16px 96px; }
  .g-2 { grid-template-columns: 1fr; }
  .map-layout { grid-template-columns: 1fr; height: auto; }
  .map-layout #map { height: 56vh; }
  .stagebar { grid-template-columns: repeat(4, 1fr); }
  .capture-card { grid-template-columns: 1fr; }
  h1 { font-size: 21px; }
  .tabbar {
    display: flex; position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 40; justify-content: space-around;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
    border: 1px solid var(--line); border-radius: 16px; padding: 5px; box-shadow: var(--shadow-pop);
  }
  .tabbar button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; font-size: 10.5px; color: var(--ink-3); padding: 5px 4px; border-radius: 10px; flex: 1; cursor: pointer; }
  .tabbar button[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
  .hide-phone { display: none !important; }
  .tile .v { font-size: 22px; }
}
@media (max-width: 480px) {
  .tiles { gap: 10px; }
  .tile { padding: 12px 14px; }
  .row { flex-direction: column; gap: 0; }
}

/* ---------- reports charts ---------- */
.vchart { position: relative; height: 230px; padding-left: 44px; }
.vchart-grid { position: absolute; inset: 0 0 22px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.vchart-grid div { border-top: 1px solid var(--line); position: relative; height: 0; }
.vchart-grid span { position: absolute; left: 0; top: -8px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vchart-bars { position: absolute; inset: 0 0 0 44px; display: grid; grid-template-columns: repeat(12, 1fr); }
.vcol { display: flex; flex-direction: column; align-items: center; outline: none; cursor: default; border-radius: 6px; }
.vcol:hover, .vcol:focus-visible { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.vbar-wrap { position: relative; flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.vbar { width: min(24px, 60%); background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; }
.vlabel { position: absolute; font-size: 11.5px; font-weight: 650; color: var(--ink); white-space: nowrap; }
.vx { height: 22px; line-height: 22px; font-size: 11px; color: var(--ink-3); }
.hchart { display: grid; gap: 4px; }
.hrow { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 92px; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 8px; outline: none; }
.hrow:not(.hlegend):hover, .hrow:focus-visible { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.hname { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htrack { position: relative; height: 14px; }
.hbar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 0 4px 4px 0; }
.hbar.over { background: var(--bad); }
.hbar.watch { background: var(--warn); }
.href { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1.5px dashed var(--ink-2); }
.href-label { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.hval { font-size: 12.5px; display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.tview { margin-top: 12px; }
.tview summary { cursor: pointer; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.tview .tbl td, .tview .tbl th { padding: 6px 8px; font-size: 13px; }
.chart-tip { position: fixed; z-index: 95; display: none; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-pop); padding: 8px 11px; border-radius: 10px; font-size: 12.5px; line-height: 1.4; max-width: 260px; }

/* ---------- client view ---------- */
.client-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); margin-bottom: 18px; flex-wrap: wrap; }
.client-bar .btn { margin-left: auto; }
.client-hero { padding: 26px; background: linear-gradient(140deg, var(--accent-soft), var(--surface)); }
.client-hero h1 { font-size: 28px; }
.client-steps { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 18px; }
.client-steps div { font-size: 11.5px; color: var(--ink-3); }
.client-steps div i { display: block; height: 6px; border-radius: 99px; background: var(--track); margin-bottom: 6px; }
.client-steps div.done i { background: var(--accent); }
.client-steps div.now i { background: linear-gradient(90deg, var(--accent) var(--p), var(--track) var(--p)); }
.client-steps div.now { color: var(--ink); font-weight: 650; }

@media (max-width: 820px) {
  .topbar .spacer { display: none; }
  .search { max-width: none; }
  .hrow { grid-template-columns: 1fr 70px; }
  .hrow .htrack { grid-column: 1 / -1; grid-row: 2; }
  .hrow.hlegend { display: none; }
  .client-steps { grid-template-columns: repeat(4, 1fr); }
  .client-hero { padding: 18px; }
}

/* ---------- priority + outreach ---------- */
.prio { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 750; border: 1.5px solid var(--line-2); color: var(--ink-2); background: var(--surface); flex: none; }
.prio-Aplus { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.prio-A { border-color: var(--accent); color: var(--accent); }
.prio-D { color: var(--ink-3); border-style: dashed; }
.tpl-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.tpl-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.tpl-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.deal .m.muted { color: var(--ink-3); font-size: 12px; margin-top: 6px; }
.deal .m .svg-ic { width: 13px; height: 13px; }
code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }

/* ---------- multi-series charts (validated categorical slots 1-6; text never wears these) ---------- */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; } }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; }
.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); }
.s4 { background: var(--s4); } .s5 { background: var(--s5); } .s6 { background: var(--s6); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.vstack { width: min(24px, 60%); display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; }
.vstack i { display: block; min-height: 2px; }
.vpair { gap: 2px; }
.vpair .vbar { width: min(16px, 30%); }
.vbar.s1 { background: var(--s1); } .vbar.s2 { background: var(--s2); }

/* ---------- plant tags and month picker ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 560; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip.toggle { cursor: pointer; padding: 4px 10px; font-size: 12.5px; }
.chip.toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip.toggle[aria-pressed="true"]::before { content: "✓"; margin-right: 4px; font-weight: 700; }
.month-pick { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.month-pick button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 6px 0; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.month-pick button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.sup-tbl td, .sup-tbl th { padding: 6px 6px; vertical-align: top; }
.sup-tbl .input { padding: 6px 8px; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) { .month-pick { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- plant schedule layout (Candice's column groups) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.filters .input { width: auto; }
.filters #pq { flex: 1 1 200px; max-width: 320px; }
.seg-scroll { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll button { white-space: nowrap; }
.tbl.sheet th, .tbl.sheet td { white-space: nowrap; }
.tbl.sheet td.cell { white-space: normal; min-width: 120px; max-width: 260px; font-size: 13px; }
.tbl.sheet .sheet-group th { background: var(--surface-2); color: var(--ink); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); border-left: 2px solid var(--surface); padding: 6px 14px; }
.tbl.sheet .stick { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); min-width: 210px; white-space: normal; }
.tbl.sheet thead .stick { z-index: 2; }
.tbl.sheet .sheet-group .stick { background: var(--surface-2); }
.tbl.sheet tr.click:hover .stick { background: var(--surface-2); }
.tbl.sheet tr.band td { background: var(--accent-soft); color: var(--accent); padding-top: 7px; padding-bottom: 7px; }
.tbl.sheet tr.band .stick { background: var(--accent-soft); }
.tbl.sheet tr.band .muted { color: var(--accent); opacity: .75; font-variant-numeric: tabular-nums; }
.tbl.sheet .calc { color: var(--accent); font-weight: 650; }
/* column widths: drag the right edge of a plant library heading */
#plib thead tr:not(.sheet-group) th:not(.stick) { position: relative; }
#plib thead th { overflow: hidden; text-overflow: ellipsis; }
.col-grip { position: absolute; top: 0; right: 0; bottom: 0; width: 9px; cursor: col-resize; touch-action: none; z-index: 3; }
.col-grip::after { content: ''; position: absolute; top: 25%; bottom: 25%; right: 3px; width: 2px; border-radius: 2px; background: var(--line); }
.col-grip:hover::after, .col-resizing .col-grip::after { background: var(--accent); }
.col-resizing, .col-resizing * { cursor: col-resize !important; user-select: none; }
/* flower colours */
.swatch-chip { display: inline-flex; align-items: center; gap: 5px; margin: 0 6px 2px 0; white-space: nowrap; }
.swatch-chip i, .colour-pick i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.colour-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.colour-pick button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.colour-pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 600; }
/* colour wheel */
.cwheel { display: grid; gap: 10px; }
.cw-chosen { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.cw-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.cw-chip .swatch-chip { margin: 0; }
.cw-chip .svg-ic { width: 14px; height: 14px; color: var(--ink-3); }
.cw-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cw-wheel { position: relative; width: 170px; height: 170px; border-radius: 50%; cursor: crosshair; touch-action: none; flex: none;
  background: radial-gradient(closest-side, hsl(0 0% 50%), hsl(0 0% 50% / 0)), conic-gradient(hsl(0 85% 50%), hsl(60 85% 50%), hsl(120 85% 50%), hsl(180 85% 50%), hsl(240 85% 50%), hsl(300 85% 50%), hsl(360 85% 50%));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.cw-wheel:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cw-shade { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.cw-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 1px 4px rgba(0,0,0,.35); pointer-events: none; }
.cw-side { display: grid; gap: 10px; flex: 1; min-width: 150px; }
.cw-side label { display: grid; gap: 4px; }
.cw-now { display: flex; align-items: center; gap: 8px; }
.cw-prev { width: 34px; height: 34px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }
/* code on the left, scientific and common name stacked and lined up beside it */
.namecell { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 6px; align-items: baseline; }
.namecell .code { grid-row: span 2; margin: 0; min-width: 0; }
.namecell > b, .namecell > a, .namecell > div { grid-column: 2; }
.code { display: inline-block; min-width: 38px; margin-right: 6px; font: 600 11.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-3); }
.fsec { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--surface); }
.fsec > summary { cursor: pointer; padding: 11px 14px; font-weight: 650; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.fsec > summary::-webkit-details-marker { display: none; }
.fsec > summary::before { content: "▸"; color: var(--ink-3); transition: transform .15s; }
.fsec[open] > summary::before { transform: rotate(90deg); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; padding: 0 14px 6px; }
.fgrid .field.wide { grid-column: 1 / -1; }
.psec { margin-bottom: 16px; }
.psec h3 { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.psec dl { display: grid; grid-template-columns: minmax(140px, 34%) 1fr; gap: 6px 14px; margin: 0; }
.psec dt { color: var(--ink-3); font-size: 13px; }
.psec dd { margin: 0; min-width: 0; }
@media (max-width: 600px) { .psec dl { grid-template-columns: 1fr; gap: 0; } .psec dd { margin-bottom: 8px; } .tbl.sheet .stick { min-width: 160px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* a window with unsaved changes shakes instead of closing on an outside click */
.modal.nudge { animation: nudge .32s var(--ease); }
@keyframes nudge { 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }

/* fee proposal: hours and rate inputs */
.pp-tbl .pp-in { width: 84px; padding: 4px 6px; text-align: right; display: inline-block; }
.pp-tbl tr.off td { color: var(--ink-3); }
.pp-tbl tr.tot td { border-top: 1.5px solid var(--line-2); }

.toast.warn { background: var(--bad); color: #fff; }

/* bin (delete) buttons on cards and rows: quiet until hovered; always visible on touch screens */
.bin { border: 0; background: none; color: var(--ink-3); width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; flex: none; opacity: .55; }
.bin .svg-ic { width: 16px; height: 16px; }
.bin:hover, .bin:focus-visible { opacity: 1; color: var(--bad-ink); background: color-mix(in srgb, var(--bad) 12%, transparent); }
@media (hover: hover) { .deal .bin, tr .bin { opacity: 0; } .deal:hover .bin, tr:hover .bin, .bin:focus-visible { opacity: 1; } }

/* getting-started card on an empty Today page */
.start-card { margin-bottom: 18px; border-color: var(--accent); }
.start-card ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* tag filter with tick boxes */
.tag-filter { position: relative; }
.tag-btn { position: relative; width: auto; min-width: 140px; text-align: left; cursor: pointer; padding-right: 30px; }
.tag-btn::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); }
.tag-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(320px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 10px; }
.tag-list { max-height: 300px; overflow: auto; display: grid; gap: 2px; }
.tag-list label { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 8px; cursor: pointer; }
.tag-list label:hover { background: var(--surface-2); }
.tag-list label span:first-of-type { flex: 1; }
.tag-list input { width: 16px; height: 16px; accent-color: var(--accent); }
/* Edit tags window */
.te-list { border-top: 1px solid var(--line); }
.te-row { display: flex; align-items: center; gap: 4px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.te-row .input { flex: 1; min-width: 0; }
.te-row .te-n { white-space: nowrap; min-width: 62px; text-align: right; margin: 0 4px; }
.te-row.gone .input { text-decoration: line-through; opacity: .55; }
.te-row .icon-btn:disabled { opacity: .3; cursor: default; background: none; }
/* Edit headings window */
.he-sec { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px 8px; margin-top: 10px; }
.he-sec.gone { opacity: .75; }
.he-head { border-bottom: 0; }
.he-head .input { font-weight: 600; }
.he-fields { margin-left: 14px; border-top: 1px solid var(--line); }
.he-fields .te-row:last-child { border-bottom: 0; }
.he-note { margin: 4px 0 2px 14px; }
.he-addf { margin: 4px 0 0 10px; }
.ce-move { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0 8px 10px; border-bottom: 1px solid var(--line); }
.ce-move select { width: auto; min-width: 160px; flex: 1; }
.cust-menu .nav-btn { align-items: flex-start; padding: 10px 12px; height: auto; text-align: left; }
.cust-menu .nav-btn .svg-ic { margin-top: 3px; }
/* ticking plants to add to a project together */
.pickcell { display: flex; align-items: flex-start; gap: 8px; }
.pickcell .pick { margin-top: 3px; width: 16px; height: 16px; flex: none; cursor: pointer; accent-color: var(--accent); }
/* the name column widens to fit the longest word, so names never break mid-word */
.pickcell .namecell { flex: 1; min-width: min-content; }
.namecell { grid-template-columns: 46px minmax(min-content, 1fr); }
@media (max-width: 600px) { .namecell { grid-template-columns: 36px minmax(min-content, 1fr); } }
/* floats at the bottom of the screen, so ticking never moves the page */
.pick-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 40; display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px 10px;
  padding: 10px 14px; width: max-content; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r); box-shadow: var(--shadow-pop); }
@media (max-width: 900px) { .pick-bar { bottom: 84px; } }
.pick-bar[hidden] { display: none; }
/* More filters */
.fl-cond .fl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fl-cond .fl-head .icon-btn { margin-left: auto; }
.fl-cond .check-pick { max-height: 180px; overflow-y: auto; padding: 2px; }
.fl-sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.fl-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 10px; }
.fl-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; white-space: normal; }
.fl-x { border: 0; background: none; padding: 0 0 0 2px; cursor: pointer; color: inherit; display: inline-grid; place-items: center; }
.fl-x .svg-ic { width: 13px; height: 13px; }
.fl-count { margin: -4px 0 8px; }
/* tick-box fields in the plant form, and the field type buttons in Edit headings */
.check-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.check-pick label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; }
.ftype-seg { flex-wrap: wrap; }
/* choices for a field, opened under it in Edit headings */
.he-opts { margin: 2px 0 8px 18px; padding: 8px 10px; border-left: 3px solid var(--accent-soft); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.he-opts .te-row:last-of-type { border-bottom: 0; }
.opt-btn.has { color: var(--accent); }
.opt-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 520px) { .he-opts { margin-left: 4px; padding: 6px; } }
.he-backrow { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.he-backrow select { flex: 1; min-width: 150px; }
@media (max-width: 520px) {
  .he-fields { margin-left: 4px; } .he-sec { padding: 4px 6px 6px; }
  .te-row { gap: 0; } .te-row .te-n { min-width: 0; font-size: 11px; } .te-row .icon-btn { width: 30px; }
}
.te-add { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.te-add .input { flex: 1; min-width: 150px; }
.tag-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* Plants & Projects: keep narrow screens from scrolling sideways. */
.card-head { flex-wrap: wrap; }
.card-head .end { flex-wrap: wrap; }
.page-head .actions .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.page-head .actions .seg::-webkit-scrollbar { display: none; }
.page-head .actions .seg button { white-space: nowrap; }.page-head .actions { min-width: 0; max-width: 100%; }

/* Cost estimate tab (js/estimates.js) */
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 820px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.est-card .card-head { flex-wrap: wrap; }
.est-card .card-head .end { flex-wrap: wrap; }
.est-tbl .est-in { width: 92px; padding: 5px 8px; text-align: right; }
.est-tbl tr.tot td { border-top: 1px solid var(--line); }
