:root {
  --bg: #f4f3f0;
  --panel: #ffffff;
  --ink: #1f2328;
  --muted: #646b73;
  --line: #dedbd5;
  --brand: #2f4858;
  --brand-ink: #ffffff;
  --accent: #b5651d;
  --ok: #2e7d4f;
  --warn: #b26a00;
  --bad: #b3261e;
  --radius: 10px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 16px; line-height: 1.45; }
a { color: var(--brand); }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* top bar */
/* the bell in the header, and its list */
.tb-bell-wrap { position: relative; }
.tb-bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--brand-ink); cursor: pointer; opacity: .85; }
.tb-bell:hover, .tb-bell[aria-expanded="true"] { opacity: 1; background: rgba(255,255,255,.12); }
.tb-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--brand); }
.bell-panel { position: absolute; right: -8px; top: calc(100% + 8px); width: 360px; max-width: calc(100vw - 24px); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); z-index: 60; overflow: hidden; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bell-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.bell-list a { display: flex; gap: 10px; padding: 11px 16px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.bell-list a:hover { background: #f6f5f2; }
.bell-list a.new { background: color-mix(in srgb, var(--brand) 8%, #fff); }
.bell-list a.new .bell-body > span:first-child { font-weight: 600; }
.bell-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #eceae6; color: #555c63; font-size: .85rem; font-weight: 700; }
.bell-ic.k-mention { background: #e8e3fb; color: #5b3fd1; }
.bell-ic.k-accepted, .bell-ic.k-newJob { background: #e5f4ea; color: #1f6b3a; }
.bell-body { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.bell-foot { display: block; padding: 10px 16px; font-size: .82rem; text-align: center; color: var(--brand); }
@media (max-width: 480px) { .bell-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }

/* @mentions in the job diary */
.mention-wrap { position: relative; }
.mention-wrap textarea { width: 100%; }
.mention-pop { position: absolute; left: 8px; top: calc(100% - 4px); z-index: 40; list-style: none; margin: 0; padding: 4px; min-width: 240px; max-width: calc(100% - 16px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.mention-pop li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.mention-pop li > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.mention-pop li.on { background: color-mix(in srgb, var(--brand) 8%, #fff); }
.mention-pop li.none { cursor: default; }
.mp-av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; }
.mention { color: #5b3fd1; font-weight: 600; }
.mention.me { background: #ece7fd; border-radius: 4px; padding: 0 3px; }

/* the app's name on the login page */
.app-name { color: var(--brand); font-weight: 700; letter-spacing: .01em; }

/* the schedule – one card: controls on top, the calendar, a colour key underneath */
.card.sc-card { padding: 0; overflow: hidden; }
.sc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; border-bottom: 1px solid #eeece7; }
.sc-nav { display: flex; align-items: center; gap: 10px; }
.sc-arrows { display: inline-flex; gap: 2px; }
.sc-arrows button, .sc-today { min-height: 0; border: 0; background: none; color: #555c63; cursor: pointer; font: inherit; transition: background .15s, color .15s; }
.sc-arrows button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 8px; }
.sc-arrows button:hover, .sc-today:hover { background: #f1f0ec; color: var(--ink); }
.sc-title { margin: 0; font-size: 1.15rem; font-weight: 600; white-space: nowrap; }
.sc-today { padding: 5px 12px; border-radius: 999px; border: 1px solid #e3e0da; font-size: .82rem; font-weight: 500; }
.sc-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.sc-select { width: auto; min-height: 0; padding: 6px 30px 6px 12px; border-radius: 999px; border-color: #e3e0da; font-size: .85rem; background-color: #fff; }
.sc-view { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: #f1f0ec; }
.sc-view button { min-height: 0; padding: 5px 14px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .85rem; font-weight: 500; color: #6b7178; cursor: pointer; transition: background .15s, color .15s; }
.sc-view button:hover { color: var(--ink); }
.sc-view button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.sc-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px solid #eeece7; font-size: .78rem; color: #8a8f96; }
.sc-lg { display: inline-flex; align-items: center; gap: 6px; }
.sc-lg::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--kc); }
.k-template { --kc: #3b82f6; --kb: #eff5ff; }
.k-production { --kc: #e08a00; --kb: #fff7ea; }
.k-fit { --kc: #16a34a; --kb: #ecf8f0; }
.sc-wrap { overflow-x: auto; }
/* week: a row per team (none when there are no teams), a column per day */
.sc-week { display: grid; grid-template-columns: 120px repeat(7, minmax(92px, 1fr)); min-width: 760px; }
.sc-week.solo { grid-template-columns: repeat(7, minmax(92px, 1fr)); min-width: 660px; }
.sc-week.solo .sc-corner, .sc-week.solo .sc-rh { display: none; }
.sc-wk-head { display: flex; align-items: baseline; gap: 8px; padding: 16px 18px 6px; min-width: 660px; }
.sc-wk-head b { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7178; }
.sc-wk-head .muted { font-size: .8rem; }
.sc-week + .sc-wk-head { padding-top: 22px; }
.sc-corner, .sc-dh { background: #fff; }
.sc-dh { display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 10px 4px 8px; font-size: .78rem; color: #8a8f96; }
.sc-dh b { font-size: .95rem; font-weight: 600; color: var(--ink); }
.sc-dh.today b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; }
.sc-dh.today span { color: var(--brand); font-weight: 600; }
.sc-rh { display: flex; align-items: flex-start; gap: 8px; padding: 12px 10px 12px 18px; font-weight: 600; font-size: .85rem; border-top: 1px solid #f0eee9; }
.sc-dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--tc); }
/* the week views fill the screen's height (less the page header, controls and day names), shared between the
   rows shown – one tall row for a week, two for 2 weeks, one per team – but never shorter than 90px */
.sc-cell { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; min-height: max(90px, calc((100vh - 330px - var(--weeks, 1) * 80px) / var(--fill, 1))); border-top: 1px solid #f0eee9; border-left: 1px solid #f5f3ef; }
.sc-dh.we, .sc-cell.we, .sc-mday.we { background-color: #fcfbf9; }
.sc-cell.today { background: #f7fafc; }
.sc-cell.busy { background: #fff6f6; }
.sc-cell.busy .sc-chip { box-shadow: 0 0 0 1px #fca5a5; }
/* a booking: tinted in its team's colour; a letter for the kind, the time, the client, and their TOWN */
.sc-chip { display: flex; flex-direction: column; gap: 1px; padding: 5px 7px; border-radius: 7px; background: color-mix(in srgb, var(--tc) 13%, #fff); border-left: 3px solid var(--tc); font-size: .76rem; line-height: 1.3; cursor: pointer; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.sc-chip:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); transform: translateY(-1px); }
.sc-chip.dragging, .sc-tobook li.dragging { opacity: .4; }
.sc-chip.other { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tc) 10%, #fff) 0 6px, color-mix(in srgb, var(--tc) 18%, #fff) 6px 12px); }
.sc-chip .sc-line { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sc-kb { flex: none; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 4px; background: var(--kc, #64748b); color: #fff; font-size: .6rem; font-weight: 700; }
.k-other { --kc: #64748b; }
.sc-chip b { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-chip .sc-t { flex: none; color: #4b5158; font-size: .72rem; font-weight: 600; }
.sc-chip .sc-c { padding-left: 20px; color: #6b7178; font-size: .7rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* a team's day: hours used (dark: on site, light: travel) against its working day; red = likely overtime */
.sc-cap { margin-top: auto; padding: 4px 2px 0; font-size: .68rem; color: #6b7178; }
.sc-cap-bar { display: flex; height: 5px; border-radius: 3px; background: #ecebe7; overflow: hidden; margin-bottom: 3px; }
.sc-cap-bar .on { background: #64748b; }
.sc-cap-bar .tr { background: #b6c0cc; }
.sc-cap.warn .sc-cap-bar .on { background: #d97706; }
.sc-cap.warn .sc-cap-bar .tr { background: #f2c58a; }
.sc-cap.over { color: #b42318; }
.sc-cap.over .sc-cap-bar { background: #fde2df; }
.sc-cap.over .sc-cap-bar .on { background: #dc2626; }
.sc-cap.over .sc-cap-bar .tr { background: #f19b93; }
.sc-cap.off { color: #a0a5ab; font-style: italic; }
.sc-cell.off { background: repeating-linear-gradient(135deg, #faf9f6 0 6px, #f3f2ee 6px 12px); }
.sc-ot { position: absolute; top: 8px; right: 8px; padding: 1px 6px; border-radius: 999px; background: #fde2df; color: #b42318; font-size: .64rem; font-weight: 700; letter-spacing: .03em; }
.sc-cell .sc-add { top: 5px; bottom: auto; }

/* the schedule's side panel: small calendar, teams on/off, jobs to book */
.sc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .sc-layout { grid-template-columns: 1fr; } .sc-side { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; } }
.sc-side .card { margin: 0 0 12px; padding: 12px; }
.sc-mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sc-mini-head b { font-size: .88rem; }
.sc-mini-head button { min-height: 0; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: #6b7178; font-size: 1rem; cursor: pointer; }
.sc-mini-head button:hover { background: #f1f0ec; }
.sc-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; text-align: center; }
.sc-mini-grid .dn { font-size: .66rem; color: #a0a5ab; padding: 2px 0; }
.sc-mini-grid button { min-height: 0; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; font: inherit; font-size: .76rem; color: var(--ink); cursor: pointer; }
.sc-mini-grid button:hover { background: #f1f0ec; }
.sc-mini-grid button.oth { color: #c4c0b8; }
.sc-mini-grid button.inv { background: color-mix(in srgb, var(--brand) 8%, #fff); border-radius: 0; }
.sc-mini-grid button.tdy { background: var(--brand); color: #fff; border-radius: 6px; font-weight: 600; }
.sc-side-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sc-side-h b { font-size: .88rem; }
.sc-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #f1f0ec; font-size: .75rem; font-weight: 600; text-align: center; }
.sc-tog { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 0 -4px 2px; border-radius: 7px; font-size: .85rem; cursor: pointer; background: color-mix(in srgb, var(--tc) 10%, #fff); border-left: 3px solid var(--tc); }
.sc-tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sc-tog-sw { flex: none; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--tc); background: var(--tc); box-shadow: inset 0 0 0 2px #fff; }
.sc-tog.off { background: #fff; color: #a0a5ab; border-left-color: #e3e0da; }
.sc-tog.off .sc-tog-sw { background: #fff; border-color: #c9c5bd; }
.sc-tog input:focus-visible + .sc-tog-sw { outline: 2px solid var(--brand); outline-offset: 2px; }
.sc-tog-n { margin-left: auto; font-size: .72rem; color: #8a8f96; }
.sc-tobook { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 460px; overflow-y: auto; }
.sc-tobook li { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border: 1px solid #ebe8e2; border-left: 3px solid var(--kc); border-radius: 8px; background: #fff; font-size: .82rem; line-height: 1.3; cursor: grab; }
.sc-tobook li:hover { border-color: #d9d5cd; border-left-color: var(--kc); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.sc-need { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--kc); }
.sc-lg .sc-kb { margin-right: 2px; }
.sc-lg::before { display: none; }
.sc-lg-note { margin-left: auto; font-style: italic; }
.sc-add { position: absolute; right: 5px; bottom: 5px; width: 22px; height: 22px; min-height: 0; padding: 0; border: 0; border-radius: 6px; background: #f1f0ec; color: #6b7178; font-size: .95rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.sc-add:hover { background: var(--brand); color: #fff; }
.sc-cell:hover .sc-add, .sc-mday:hover .sc-add, .sc-add:focus-visible { opacity: 1; }
@media (hover: none) { .sc-add { opacity: .7; } }
.drop-ok { background: #eef5ff !important; box-shadow: inset 0 0 0 2px #93c5fd; }
/* month */
.sc-month { min-width: 700px; }
.sc-mh { display: grid; grid-template-columns: repeat(7, 1fr); }
.sc-mh span { padding: 10px 8px 6px; font-size: .75rem; color: #8a8f96; text-align: center; }
.sc-mgrid { display: grid; grid-template-columns: repeat(7, 1fr); }
.sc-mday { position: relative; display: flex; flex-direction: column; gap: 3px; min-height: 104px; padding: 6px 6px 28px; border-top: 1px solid #f0eee9; border-left: 1px solid #f5f3ef; }
.sc-mday:nth-child(7n + 1) { border-left: 0; }
.sc-mday.out .sc-mnum { color: #c9c5bd; }
.sc-mday.out .sc-chip { opacity: .55; }
.sc-mnum { align-self: flex-start; display: inline-grid; place-items: center; min-width: 24px; height: 24px; font-size: .8rem; font-weight: 600; color: #555c63; }
.sc-mday.today .sc-mnum { border-radius: 999px; background: var(--brand); color: #fff; }
.sc-mday.today .sc-mnum .sc-mon { color: #fff; }
.sc-mon { font-size: .72rem; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .03em; }
.sc-mday .sc-mnum:has(.sc-mon) { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; border-radius: 999px; white-space: nowrap; }
.sc-mday.m1 { box-shadow: inset 2px 0 0 #d9d5cd; }
.sc-mday .sc-chip { padding: 3px 6px; }
.sc-mday .sc-chip .sc-c { display: none; }
.sc-more { align-self: flex-start; min-height: 0; padding: 0 4px; border: 0; background: none; color: var(--brand); font-size: .76rem; font-weight: 500; cursor: pointer; }
.sc-teams { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sc-team { display: inline-flex; align-items: center; gap: 8px; min-height: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: .88rem; cursor: pointer; }
.sc-team .sc-dot { margin-top: 0; }
.sc-team:hover { border-color: #c9c4bb; }
.sc-teamlink { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: -4px 0 16px; }
.sc-tk { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.sc-tk .sc-dot { margin-top: 0; }
/* Settings → Teams */
.team-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.team-list li { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.team-list li.open { border-color: #c9d3dc; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.team-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-sum { display: flex; align-items: center; gap: 10px; min-height: 0; width: 100%; padding: 4px 4px 2px 24px; border: 0; background: none; font: inherit; font-size: .8rem; color: #6b7178; text-align: left; cursor: pointer; }
.team-sum > span:first-child { flex: 1; }
.team-edit { flex: none; color: var(--brand); font-weight: 600; }
.team-sum:hover .team-edit { text-decoration: underline; }
.team-more { margin: 4px 0 2px 24px; padding: 12px 14px; border-radius: 8px; background: #faf9f6; }
.team-f { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.team-f .lbl { width: 100px; font-size: .82rem; font-weight: 600; color: #555c63; }
.team-does { display: flex; gap: 14px; flex-wrap: wrap; }
.team-days { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.team-days button { min-height: 0; padding: 5px 9px; border: 1px solid #e3e0da; border-radius: 7px; background: #fff; font: inherit; font-size: .8rem; color: #8a8f96; cursor: pointer; }
.team-days button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 10px; }
.team-grid .wide { grid-column: 1 / -1; }
.team-grid input { min-height: 0; padding: 7px 10px; }
@media (max-width: 640px) { .team-grid { grid-template-columns: 1fr 1fr; } .team-more, .team-sum { margin-left: 0; padding-left: 4px; } }
/* travel times: the maps service */
.route-card { padding: 12px 14px; border: 1px solid #ebe8e2; border-radius: 8px; }
.route-card select { max-width: 460px; }
.route-test { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e3e0da; }
.route-test input { width: 130px; min-height: 0; padding: 6px 10px; text-transform: uppercase; }
.route-ok { color: #1f6b3a; font-weight: 600; }
/* job times */
.rules { display: grid; gap: 8px; }
.rule { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid #ebe8e2; border-radius: 8px; font-size: .88rem; }
.rule b { width: 92px; }
.rule-in { display: inline-flex; align-items: center; gap: 5px; }
.rule-in input { width: 66px; min-height: 0; padding: 5px 8px; text-align: right; }
.rule-in i { font-style: normal; font-size: .8rem; color: #6b7178; }
.team-sw { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.team-name { flex: 1; min-width: 140px; min-height: 0; padding: 7px 10px; }
.team-cols { display: flex; gap: 5px; }
.team-col { width: 22px; height: 22px; min-height: 0; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.team-col.on { box-shadow: 0 0 0 2px var(--ink); }
.team-del { opacity: 1; }
.team-add { display: flex; gap: 10px; flex-wrap: wrap; }
.team-add input { flex: 1; min-width: 200px; }

/* bookings on the job page */
.bk-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.bk-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--kb); border: 1px solid color-mix(in srgb, var(--kc) 25%, transparent); cursor: default; }
.bk-list li[data-bk] { cursor: pointer; }
.bk-list .sc-k { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--kc); min-width: 74px; padding-top: 2px; }
.bk-list .bk-when { display: flex; flex-direction: column; font-size: .88rem; line-height: 1.35; }

/* Settings → Your business: a header (logo + name), cards for each kind of detail, and a live preview */
.biz-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #eeece7; }
.biz-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 190px; padding: 14px; border: 1px dashed #d9d5cd; border-radius: 12px; background: #fbfaf8; }
.biz-logo img { display: block; max-width: 160px; max-height: 70px; object-fit: contain; }
.biz-logo .btn { min-height: 0; padding: 4px 10px; }
.biz-logo > .btn { width: 100%; }
.biz-logo:has(#mainLogoDel) { display: grid; grid-template-columns: 1fr 1fr; }
.biz-logo:has(#mainLogoDel) img, .biz-logo:has(#mainLogoDel) > span { grid-column: 1 / -1; justify-self: center; }
.biz-id { flex: 1; min-width: 240px; }
.biz-label { display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #8a8f96; margin-bottom: 4px; }
.biz-name { width: 100%; font-size: 1.35rem; font-weight: 700; padding: 8px 12px; }
.biz-id p { margin: 8px 0 0; }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.biz-card { padding: 14px 16px 16px; border: 1px solid #ebe8e2; border-radius: 12px; background: #fff; }
.biz-card-h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.biz-card-h b { font-size: .95rem; }
.biz-card-h p { margin: 2px 0 0; font-size: .8rem; color: #6b7178; line-height: 1.4; }
.biz-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--brand) 8%, #fff); color: var(--brand); }
.biz-card textarea, .biz-card input:not([type=number]) { width: 100%; }
.biz-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .biz-2 { grid-template-columns: 1fr; } }
.biz-2 > * { min-width: 0; }
/* the address, a box per line: line 1 and 2 full width, then town, county and postcode */
.biz-addr { display: grid; grid-template-columns: 1fr 1fr 0.8fr; gap: 10px; align-items: end; }
.biz-addr .wide { grid-column: 1 / -1; }
.biz-addr > * { min-width: 0; }
@media (max-width: 520px) { .biz-addr { grid-template-columns: 1fr 1fr; } }
.biz-2 { align-items: end; }
.biz-card .unit-in { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; }
.biz-card .unit-in input { flex: 1; min-width: 0; width: 100%; background: #fff; text-align: left; }
.biz-card .unit-in i { flex: none; font-style: normal; color: #6b7178; font-size: .85rem; }
.biz-pv-wrap { margin-top: 18px; }
.biz-pv-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #8a8f96; margin-bottom: 8px; }
.biz-pv { padding: 20px 22px 14px; border: 1px solid #e3e0da; border-radius: 10px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.05); font-size: .82rem; color: #3f444a; }
.pv-top { display: flex; gap: 16px; align-items: flex-start; }
.pv-top img { max-width: 120px; max-height: 56px; object-fit: contain; }
.pv-who { flex: 1; display: flex; flex-direction: column; gap: 3px; line-height: 1.45; }
.pv-who b { font-size: 1rem; color: var(--ink); }
.pv-ref { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: #6b7178; font-size: .76rem; }
.pv-ref b { font-size: .9rem; letter-spacing: .08em; color: var(--brand); }
.pv-mid { display: grid; gap: 6px; margin: 16px 0 12px; }
.pv-mid span { height: 7px; border-radius: 4px; background: #f1efea; }
.pv-mid span:nth-child(2) { width: 80%; } .pv-mid span:nth-child(3) { width: 55%; }
.pv-foot { padding-top: 10px; border-top: 1px solid #eeece7; font-size: .74rem; color: #6b7178; text-align: center; }
.pv-empty { color: #b0b4b9; font-style: italic; }

/* Settings → Security */
.sec-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; line-height: 1.45; }
#secBox code { font-size: .82rem; background: #f3f2ee; padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

/* Settings → Email */
.mail-st { display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.mail-st.off { background: #eef0f2; color: #555c63; }
.mail-st.ok { background: #e5f4ea; color: #1f6b3a; }
.mail-st.bad { background: #fdecea; color: #a3281c; font-weight: 500; border-radius: 8px; }
.mail-test { display: flex; gap: 10px; flex-wrap: wrap; }
.mail-test input { flex: 1; min-width: 200px; }

/* My account: cards in two columns on wide screens */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; align-items: start; max-width: 1000px; }
.acct-grid > .card { margin: 0; }
.acct-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 480px) { .acct-grid { grid-template-columns: 1fr; } .acct-2 { grid-template-columns: 1fr; } }
.acct-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 4px 0 14px; }
.acct-notify { display: grid; gap: 8px; }
.acct-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #fdf6e7; color: #7a5a1c; font-size: .85rem; line-height: 1.4; }
.sess-list { list-style: none; margin: 0; padding: 0; }
.sess-list li { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sess-list li:last-child { border-bottom: 0; }
.sess-dev { font-weight: 600; font-size: .95rem; }

/* the top bar: logo | page links | welcome + log out, on one row */
/* (gaps and spacing shrink with the screen, so everything fits on one row down to small screens) */
.topbar { background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; gap: clamp(8px, 1.4vw, 20px); padding: 0 clamp(10px, 1.6vw, 20px); min-height: 64px; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.topbar .brand { font-weight: 700; font-size: 1.05rem; padding: 10px 0; flex: none; }
/* (the page links sit on the right, beside the bell and your name – pushed over by an auto margin, which
   shrinks to nothing when space is short, so the first link is never cut off) */
.tb-links { display: flex; align-items: center; gap: 2px; flex: 0 1 auto; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none;
  padding: 4px; border-radius: 12px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.tb-links::-webkit-scrollbar { display: none; }
.tb-links a { color: var(--brand-ink); text-decoration: none; padding: 6px clamp(7px, .9vw, 13px); border-radius: 8px; opacity: .8; font-size: clamp(.8rem, .55rem + .4vw, .9rem); white-space: nowrap; position: relative; transition: background .15s, opacity .15s, color .15s; }
.tb-links a:hover { opacity: 1; background: rgba(255,255,255,.08); }
/* (the page you're on: a white pill) */
.tb-links a.active { opacity: 1; font-weight: 600; background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.tb-user { display: flex; align-items: center; gap: 6px; flex: none; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.18); }
.tb-me { display: flex; align-items: center; gap: 10px; color: var(--brand-ink); text-decoration: none; padding: 5px 10px 5px 5px; border-radius: 999px; transition: background .15s; }
.tb-me:hover, .tb-me.active { background: rgba(255,255,255,.12); }
.tb-av { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: .82rem; letter-spacing: .02em; flex: none; }
.tb-hi { display: flex; flex-direction: column; line-height: 1.2; }
.tb-hi b { font-size: .92rem; font-weight: 600; white-space: nowrap; }
.tb-hi small { font-size: .74rem; opacity: .72; white-space: nowrap; }
.tb-out { display: flex; align-items: center; gap: 6px; color: var(--brand-ink); background: none; border: 0; font: inherit; font-size: .88rem; padding: 8px 10px; border-radius: 8px; cursor: pointer; opacity: .78; min-height: 0; }
.tb-out:hover { opacity: 1; background: rgba(255,255,255,.12); }
/* as the screen narrows: first your company line goes, then "Log out" becomes just its icon, then the
   welcome becomes just your initials – so the page links always have room */
@media (max-width: 1280px) { .tb-hi small { display: none; } }
@media (max-width: 1180px) { .tb-out span { display: none; } }
@media (max-width: 1080px) { .tb-hi { display: none; } .tb-me { padding-right: 5px; } .tb-user { padding-left: 10px; } }
/* too narrow for one row: the links get their own row, spread evenly across it */
@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 0 12px; }
  .tb-links { order: 3; flex-basis: 100%; margin-left: 0; margin-bottom: 8px; }
  .tb-links a { flex: 1; text-align: center; padding: 6px 6px; }
  .tb-user { margin-left: auto; border-left: 0; padding-left: 0; }
}
@media (max-width: 480px) { .tb-hi { display: none; } }
/* a phone: the links wrap onto two rows (three across), so every one is always in view */
@media (max-width: 560px) {
  .tb-links { flex-wrap: wrap; overflow: visible; row-gap: 2px; }
  .tb-links a { flex: 1 0 30%; font-size: .82rem; }
}

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 120px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

/* panels and forms */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card h2 .step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; margin-right: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .875rem; color: var(--muted); font-weight: 600; }
input, select, textarea { font: inherit; color: var(--ink); padding: 10px 12px; border: 1px solid #c9c5bd; border-radius: 8px; background: #fff; width: 100%; min-height: 44px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; cursor: pointer; padding: 6px 0; margin-right: 16px; }
.check input { width: 20px; height: 20px; min-height: 0; }

.btn { font: inherit; font-weight: 600; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 8px; cursor: pointer; min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { filter: brightness(1.1); }
.btn.secondary { background: #fff; color: var(--brand); }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: .875rem; }
.btn.big { padding: 14px 24px; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.2rem; padding: 6px 10px; border-radius: 6px; }
.icon-btn:hover { background: #f0eee9; color: var(--bad); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 400px; }
.login .card { padding: 28px; }
.login form { display: grid; gap: 14px; }
.error { color: var(--bad); font-size: .9rem; min-height: 1.2em; }
.notice { background: color-mix(in srgb, var(--brand) 8%, #fff); border: 1px solid #cddde6; padding: 12px 14px; border-radius: 8px; font-size: .9rem; margin-bottom: 14px; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #faf9f7; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #faf8f4; }
td.num, th.num { text-align: right; white-space: nowrap; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { width: auto; flex: 1 1 200px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; text-transform: capitalize; }
.badge.draft { background: #ecebe8; color: #555; }
.badge.sent { background: #e2edf6; color: #1f5a85; }
.badge.accepted { background: #e1f1e7; color: var(--ok); }
.badge.declined { background: #f8e4e2; color: var(--bad); }


.choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.choice-list.colours { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: 320px; overflow-y: auto; padding: 2px; }
.choice { border: 2px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; background: #fff; text-align: left; font: inherit; color: var(--ink); }
.choice.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); }
.choice small { display: block; color: var(--muted); }
button.link { background: none; border: 0; padding: 4px 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* wizard */
.wizard { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 18px; counter-reset: s; flex-wrap: wrap; }
.wizard li { flex: 1 1 140px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: #e9e6e1; color: var(--muted); font-weight: 600; cursor: pointer; font-size: .92rem; }
.wizard li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--muted); font-size: .85rem; flex: none; }
.wizard li.on { background: var(--brand); color: #fff; }
.wizard li.on span { color: var(--brand); }
.wizard li.done { background: #dbe7ee; color: var(--brand); }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; z-index: 20; box-shadow: 0 -4px 16px rgba(0,0,0,.06); flex-wrap: wrap; }
.bottom-bar .total { font-size: 1.4rem; font-weight: 700; }
.bottom-bar .actions { align-items: center; }
/* the estimate steps: no page title above them (the steps say where you are); any buttons it had stay */
main:has(.wizard) > .page-head:has(.actions:empty) { display: none; }
/* beside a step's heading instead of along the bottom (so no room needs keeping for it below) */
main:has(.bottom-bar.inline) { padding-bottom: 16px; }
main:has(.bottom-bar.inline) .card { margin-bottom: 0; }
.step-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.step-head h2 { margin: 0; }
/* the drawing's heading: what it is, small, over the client's name, with the job ref as a tag */
#drawTitle { display: flex; flex-direction: column; gap: 2px; }
#drawTitle .job-eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6b7280); }
#drawTitle .job-name { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 700; color: var(--brand); line-height: 1.2; }
#drawTitle .job-ref { font-size: .78rem; font-weight: 600; color: var(--brand); background: #e6edf2; border: 1px solid #cddde6; border-radius: 6px; padding: 2px 8px; }
.bottom-bar.inline { position: static; background: none; border: 0; box-shadow: none; padding: 0; gap: 20px; justify-content: flex-end; }
.bottom-bar.inline > div:first-child { text-align: right; padding-right: 18px; border-right: 1px solid var(--line); line-height: 1.15; }
.bottom-bar.inline .total { font-size: 1.15rem; }
.bottom-bar.inline .muted.small { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
/* slim, matching buttons: Back is a quiet link, Save an outline, Next the one solid button */
.bottom-bar.inline .actions { gap: 6px; }
.bottom-bar.inline .btn { height: 36px; padding: 0 14px; font-size: .88rem; border-radius: 8px; display: inline-flex; align-items: center; }
.bottom-bar.inline #backBtn { border-color: transparent; background: none; color: var(--muted, #6b7280); padding: 0 8px; }
.bottom-bar.inline #backBtn:hover { color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, #fff); }
.bottom-bar.inline #nextBtn { padding: 0 16px; }

/* drawing + slab layout */
.d-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.d-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.d-canvas > svg { width: 100%; height: 540px; display: block; background: #fbfaf8; border: 1px solid var(--line); border-radius: 8px; touch-action: none; user-select: none; -webkit-user-select: none; }
.d-canvas { position: relative; }
.d-canvas > svg { cursor: crosshair; }
#drawing .d-canvas > svg { height: min(68vh, 680px); min-height: 420px; padding-right: 0; }
#drawing .d-canvas > svg[data-tool="select"] { cursor: default; }
#drawing .d-canvas > svg[data-tool="profile"], #drawing .d-canvas > svg[data-tool="upstand"], #drawing .d-canvas > svg[data-tool="panel"],
#drawing .d-canvas > svg[data-tool="radius"], #drawing .d-canvas > svg[data-tool="cutout"] { cursor: pointer; }
#drawing .d-canvas > svg[data-tool="select"] [data-piece] { cursor: move; }
.d-corner { cursor: pointer; }

/* tool column down the right of the drawing */
.d-tools { position: absolute; top: 8px; right: 8px; max-height: calc(100% - 16px); width: 64px; display: flex; flex-direction: column; gap: 1px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 10px; padding: 4px; overflow-y: auto; scrollbar-width: none; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.d-tools::-webkit-scrollbar { display: none; }
.d-tools hr { border: 0; border-top: 1px solid var(--line); margin: 2px 4px; width: auto; }
.d-tool { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid transparent; background: none; border-radius: 8px; padding: 4px 2px; cursor: pointer; color: var(--ink); font: inherit; font-size: .7rem; font-weight: 600; line-height: 1.15; flex: none; }
.d-tool svg { width: 20px; height: 20px; }
.d-tool:hover:not(:disabled) { background: #f1efeb; }
.d-tool.on, .d-tool.on:hover:not(:disabled) { background: var(--brand); color: #fff; }
.d-tool:disabled { opacity: .3; cursor: default; }
/* options for the chosen tool, next to the tool column */
.d-flyout { position: absolute; top: 8px; right: 84px; width: 210px; max-height: calc(100% - 16px); overflow-y: auto; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 10px; padding: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 6px; }
.d-flyout:empty { display: none; }
.d-tip { margin: 0 0 2px; font-size: .8rem; color: var(--muted); line-height: 1.35; }
.d-opt { display: flex; align-items: center; gap: 8px; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 7px; padding: 7px 9px; cursor: pointer; font: inherit; font-size: .85rem; color: var(--ink); }
.d-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); font-weight: 600; }
.d-flyout .field input { min-height: 38px; }
/* name / type of the selected item, top-left of the drawing */
.d-selbar { position: absolute; top: 8px; left: 8px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.d-selbar input, .d-selbar select { min-height: 34px; padding: 4px 8px; width: 190px; }
@media (max-width: 900px) {
  .d-flyout { top: auto; bottom: 8px; right: 84px; left: 8px; width: auto; max-height: 45%; }
  #drawing .d-canvas > svg { height: 62vh; }
}
.d-canvas > svg [data-piece], .d-canvas > svg .n-part { cursor: move; }
/* measurements: drawing-office dimension lines; the number sits on the line, on a patch of paper */
.d-dimlink rect, .d-dimstatic rect { fill: #fbfaf8; stroke: none; }
.d-dimlink rect { cursor: pointer; }
.d-dimlink text { fill: var(--brand); font-weight: 600; cursor: pointer; font-family: inherit; }
.d-dimlink:hover rect { fill: #e8f1fa; stroke: #1d6fb8; stroke-width: 1.5; }   /* a bubble round it: click to change */
.d-dimlink:hover text { fill: #1d6fb8; }
.d-dimstatic text { fill: #4b5563; font-family: inherit; }
.d-dline { stroke: var(--brand); stroke-width: 1; fill: none; pointer-events: none; }
/* a strip on its own page: the way back, along the bottom */
.d-canvas:has(.d-focusbar:not(.hidden)) .d-selbar { top: 64px; }   /* on a strip's page the back button takes the top corner */
.d-focusbar { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 300px); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 140px); background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; box-shadow: 0 2px 10px rgba(0,0,0,.06); z-index: 4; }
.d-focusbar span { color: var(--muted, #6b7280); }
.d-focusbar .btn { white-space: nowrap; }
@media (max-width: 1000px) { .d-focusbar span { display: none; } }
/* the markers for strips along worktop edges: click to open */
.d-mark { cursor: pointer; }
/* Draw mode: the end of a worktop you can carry on drawing from, shown while the mouse is over it */
.d-ext { opacity: 0; transition: opacity .12s; }
.d-endzone:hover .d-ext { opacity: 1; }
.d-mark:hover { filter: brightness(0.93); }
.d-mark-lbl { fill: #1e3a5f; font-weight: 600; }
.d-msg { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: #1f2328; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: .88rem; box-shadow: 0 4px 14px rgba(0,0,0,.2); pointer-events: none; z-index: 6; }
.d-diminput { position: absolute; transform: translate(-50%, -50%); width: 100px; min-height: 36px; padding: 4px 8px; text-align: center; font-weight: 700; border: 2px solid #1d6fb8; box-shadow: 0 4px 14px rgba(0,0,0,.18); z-index: 5; }
.d-canvas > svg .edge-hit { cursor: pointer; }
.d-hint { margin-top: 6px; }
.d-lbl { font-weight: 700; fill: #2b2f33; pointer-events: none; font-family: inherit; }
.d-dim { fill: #6b7280; font-weight: 400; pointer-events: none; }
.d-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.d-legend span { display: inline-flex; align-items: center; gap: 6px; }
.d-legend i { display: inline-block; width: 22px; height: 10px; border-radius: 2px; }
.d-legend .d-legend-m { color: var(--brand); font-weight: 600; }
.d-legend .d-legend-total { padding-left: 12px; border-left: 1px solid var(--line); }
.d-legend .d-legend-total b { color: var(--brand); }
.d-panel { background: #fcfbf9; border: 1px solid var(--line); border-radius: 8px; padding: 14px; max-height: 640px; overflow-y: auto; }
.d-panel h3 { margin: 0 0 8px; }
.d-panel h4 { margin: 16px 0 8px; font-size: .95rem; }
.d-panel .field { margin-bottom: 8px; }
.d-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.d-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.d-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer; font: inherit; color: var(--ink); }
.d-row:hover, .d-row.on { border-color: var(--brand); }
.d-choices { display: grid; gap: 6px; }
.d-choices .choice { padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.swatch { display: inline-block; width: 18px; height: 6px; border-radius: 2px; flex: none; }
.d-cutbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.d-cutrow { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed var(--line); }
.d-steps { padding-left: 20px; margin: 0; font-size: .9rem; }
.d-steps li { margin-bottom: 4px; }
.n-stats { font-size: .9rem; margin-left: auto; }
.n-stats .warn { color: var(--warn); font-weight: 600; }
.n-stats .bad { color: var(--bad); font-weight: 600; }
.n-warn { background: #fdecea; border: 1px solid #f5c2bd; border-radius: 8px; padding: 10px 12px; font-size: .88rem; margin: 8px 0; }
.n-warn ul { margin: 4px 0; padding-left: 18px; }
.quote-drawing svg { width: 100%; height: auto; max-height: 520px; display: block; border: 1px solid var(--line); border-radius: 8px; background: #fbfaf8; }
.quote-drawing.slab svg { max-height: 700px; }

/* price display */
.included ul { columns: 2; column-gap: 24px; padding-left: 18px; margin: 4px 0 12px; }
.included li { break-inside: avoid; margin-bottom: 2px; }
.admin-only { background: #fff8e6; border: 1px solid #f0dca8; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.admin-only h4 { margin: 0 0 8px; }
.admin-only .table-wrap { background: #fff; }
.totals-table { max-width: 360px; margin-left: auto; }
.totals-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.totals-table .grand td { font-size: 1.2rem; font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }

/* settings */
.price-table input { min-height: 38px; padding: 6px 10px; }
.price-table td { padding: 6px 8px; }
.price-table.mats td { vertical-align: top; }
.price-table.mats select { min-height: 38px; padding: 6px 8px; }
.price-table.mats .m-type { min-width: 90px; }
.price-table.mats .m-size { white-space: nowrap; }
.price-table.mats .m-size input { width: 76px; }
.price-table.mats .m-size span { margin: 0 4px; color: var(--muted); }
.price-table.mats td .small { margin-top: 2px; font-size: .72rem; }
.mbrand { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; background: #fff; }
.mbrand.open { border-color: var(--brand); }
.brand-head { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; }
.brand-toggle { flex: 1; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 10px; font: inherit; color: var(--ink); cursor: pointer; text-align: left; flex-wrap: wrap; }
.brand-toggle .caret { width: 14px; color: var(--muted); }
.brand-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.band-colours { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: #fcfbf9; }
.band-title { margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #d6d2ca; border-radius: 99px; padding: 3px 4px 3px 12px; font-size: .88rem; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 50%; width: 22px; height: 22px; }
.chip button:hover { background: #f3e1df; color: var(--bad); }
.add-colours { display: flex; gap: 8px; align-items: flex-start; }
.add-colours textarea { min-height: 40px; }

/* ---------- the estimate: one A4 sheet (210 × 297mm, printed with 12mm margins) ---------- */
.quote { --qink: #1f2328; --qmute: #6b7178; --qline: #e6e3dd; box-sizing: border-box; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 12mm;
  background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.08); color: var(--qink); font-size: 9.5pt; line-height: 1.38; position: relative; overflow: hidden; }
.q-ruler { width: 100%; height: 0; }
.q-fit { transform-origin: top left; }
.q-measuring .no-print { display: none !important; }
.q-fitnote { position: absolute; right: 10px; bottom: 6px; font-size: 11px; color: var(--qmute); }
.quote h1 { margin: 0; font-size: 20pt; line-height: 1.1; letter-spacing: .06em; text-transform: uppercase; color: var(--qa, var(--qink)); font-weight: 700; }
.quote h3 { margin: 12px 0 6px; font-size: 8pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--qa, var(--qink)); }
.quote .muted { color: var(--qmute); }
.quote .small { font-size: 8.5pt; }
/* the letterhead */
.quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; padding-bottom: 5mm; margin-bottom: 5mm; border-bottom: 2px solid var(--qa, var(--brand)); }
.q-who { min-width: 0; }
.quote-head .biz { font-weight: 700; font-size: 13pt; color: var(--qa, var(--brand)); margin-bottom: 2px; }
.q-who .muted.small { font-size: 8.5pt; line-height: 1.45; }
.q-what { text-align: right; flex: none; }
.q-meta { margin: 6px 0 0 auto; border-collapse: collapse; font-size: 8.5pt; }
.q-meta td { padding: 1px 0 1px 10px; border: 0; text-align: right; white-space: nowrap; }
.q-meta td:first-child { color: var(--qmute); }
.q-meta .expired-note td { color: #b42318; }
.q-logo-right .quote-head { flex-direction: row; }
.q-logo-right .q-what { text-align: left; }
.q-logo-right .q-meta { margin-left: 0; }
.q-logo-right .q-meta td { text-align: left; padding: 1px 10px 1px 0; }
.q-logo-right .q-who { text-align: right; }
.q-logo-right .q-who .logos { justify-content: flex-end; }
.q-logo-centre .quote-head { flex-direction: column; align-items: center; text-align: center; gap: 3mm; }
.q-logo-centre .q-what { text-align: center; }
.q-logo-centre .q-meta { margin: 6px auto 0; }
.q-logo-centre .q-who .logos { justify-content: center; }
.quote .quote-logos { margin-bottom: 4px; }
.quote .quote-logos .logos img { height: 15mm; max-width: 55mm; }
/* header styles: a band of colour behind it, or no line at all; section headings: capitals, or a side bar */
.q-head-band .quote-head { background: var(--qa); color: #fff; border-bottom: 0; margin: -12mm -12mm 6mm; padding: 9mm 12mm 7mm; }
.q-head-band .quote-head h1, .q-head-band .quote-head .biz, .q-head-band .quote-head .muted, .q-head-band .quote-head strong, .q-head-band .q-meta td { color: #fff !important; }
.q-head-band .quote-logos img { background: #fff; padding: 4px 8px; border-radius: 4px; }
.q-head-none .quote-head { border-bottom: 0; }
.q-h-plain h3 { text-transform: none; letter-spacing: 0; font-size: 10.5pt; }
.q-h-bar h3 { border-left: 3px solid var(--qa); padding: 1px 0 1px 7px; }
.q-font-serif, .q-font-serif h1, .q-font-serif h3 { font-family: Georgia, 'Times New Roman', serif; }
/* client and job: two panels */
.q-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-bottom: 1mm; }
.q-panel { padding: 3mm 4mm; border-radius: 3px; background: #f7f6f3; border: 1px solid #efece6; }
.q-panel h3 { margin-top: 0; }
.quote dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 1px 10px; font-size: 8.5pt; }
.quote dt { color: var(--qmute); }
.quote dd { margin: 0; overflow-wrap: anywhere; }
/* the specification: key facts in a row */
.q-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(30mm, 1fr)); gap: 2mm; }
.q-fact { padding: 2mm 3mm; border: 1px solid var(--qline); border-radius: 3px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.q-fact span { font-size: 7pt; text-transform: uppercase; letter-spacing: .06em; color: var(--qmute); }
.q-fact b { font-size: 9pt; font-weight: 600; overflow-wrap: anywhere; }
/* drawings and slab layouts */
.quote .quote-drawing svg { max-height: 95mm; border: 1px solid var(--qline); border-radius: 3px; background: #fcfcfb; }
.quote .quote-drawing.slab svg { max-height: 62mm; }
/* your own PDF layout: blocks placed on the 186 × 273mm printable area of the sheet */
.q-custom { min-height: 297mm; }
.pb-page { position: relative; width: 186mm; height: 273mm; }
.pb { position: absolute; box-sizing: border-box; overflow: hidden; }
.pb-in { width: 100%; transform-origin: top left; }
.pb-border { border: 1px solid var(--qline); border-radius: 3px; padding: 2mm 3mm; }
.pb[style*="background"] { padding: 2mm 3mm; border-radius: 3px; }
.pb h3 { margin: 0 0 1.5mm; }
.pb-fill .pb-in { height: 100%; }
.pb-fill .quote-drawing, .pb-fill .pb-in > div { height: 100%; }
.pb-drawing .pb-in, .pb-slabs .pb-in { display: flex; flex-direction: column; }
.pb-drawing .quote-drawing, .pb-slabs .quote-drawing { flex: 1; min-height: 0; }
.pb .quote-drawing svg { width: 100%; height: 100%; max-height: none !important; }
.pb-drawing .d-legend { font-size: 7pt; flex: none; }
.pb-img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.pb-business .biz { font-weight: 700; font-size: 12pt; color: var(--qa); }
.pb-title .q-what { text-align: inherit; }
.pb-list { margin: 0; padding-left: 4mm; columns: 2; column-gap: 4mm; }
.pb .totals-table, .pb-pay { width: 100%; }
.pb-pay td { padding: 2px 4px; border-bottom: 1px solid var(--qline); }
.pb-terms { margin: 0; font-size: 7pt; line-height: 1.4; white-space: pre-line; color: var(--qmute); }
.pb-foot { font-size: 7.5pt; color: var(--qmute); text-align: center; }
.pb-text { line-height: 1.4; }
.pb-line { height: 0; position: relative; top: 50%; }
.pb-divider .pb-in { height: 100%; }
.pb-empty { height: 100%; min-height: 8mm; display: grid; place-items: center; border: 1px dashed #cfcac2; border-radius: 3px; color: #a0a5ab; font-size: 8pt; }
@media print { .q-custom { min-height: 0; } .q-custom .pb-empty { display: none; } }
/* the layout editor */
.pe { display: grid; grid-template-columns: 170px minmax(0, 1fr) 240px; gap: 14px; align-items: start; }
@media (max-width: 1150px) { .pe { grid-template-columns: 150px minmax(0, 1fr); } .pe-insp { grid-column: 1 / -1; } }
.pe-pal { display: grid; gap: 4px; position: sticky; top: 12px; }
.pe-pal b { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #8a8f96; margin: 6px 0 2px; }
.pe-pal button { display: flex; align-items: center; gap: 8px; min-height: 0; padding: 6px 9px; border: 1px solid #e3e0da; border-radius: 7px; background: #fff; font: inherit; font-size: .82rem; text-align: left; cursor: pointer; }
.pe-pal button:hover { border-color: var(--brand); background: #f6f9fb; }
.pe-pal button i { font-style: normal; width: 18px; text-align: center; color: var(--brand); }
.pe-canvas { position: relative; background: #e9e6e0; border-radius: 12px; padding: 14px; overflow: auto; }
.pe-sheet { position: relative; margin: 0 auto; transform-origin: top left; }
.pe-sheet .quote { box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.q-custom[data-edit] .pb { cursor: move; outline: 1px dashed transparent; outline-offset: -1px; }
.pe-canvas:hover .q-custom[data-edit] .pb { outline-color: color-mix(in srgb, var(--brand) 14%, transparent); }
.q-custom[data-edit] .pb:hover { outline-color: color-mix(in srgb, var(--brand) 60%, transparent); }
.q-custom[data-edit] .pb.sel { outline: 2px solid #2563eb; outline-offset: 0; overflow: visible; }
.pe-h { position: absolute; width: 10px; height: 10px; background: #fff; border: 2px solid #2563eb; border-radius: 2px; z-index: 1000; }
.pe-h[data-h="nw"] { left: -6px; top: -6px; cursor: nwse-resize; } .pe-h[data-h="ne"] { right: -6px; top: -6px; cursor: nesw-resize; }
.pe-h[data-h="sw"] { left: -6px; bottom: -6px; cursor: nesw-resize; } .pe-h[data-h="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }
.pe-h[data-h="n"] { left: calc(50% - 5px); top: -6px; cursor: ns-resize; } .pe-h[data-h="s"] { left: calc(50% - 5px); bottom: -6px; cursor: ns-resize; }
.pe-h[data-h="w"] { top: calc(50% - 5px); left: -6px; cursor: ew-resize; } .pe-h[data-h="e"] { top: calc(50% - 5px); right: -6px; cursor: ew-resize; }
.pe-tag { position: absolute; left: -2px; top: -18px; background: #2563eb; color: #fff; font: 600 10px/1 sans-serif; padding: 3px 6px; border-radius: 3px 3px 0 0; white-space: nowrap; z-index: 1000; }
.pe-guide { position: absolute; z-index: 1001; pointer-events: none; background: #ec4899; }
.pe-guide.v { width: 1px; top: 0; bottom: 0; } .pe-guide.h { height: 1px; left: 0; right: 0; }
.pe-insp { position: sticky; top: 12px; padding: 12px; border: 1px solid #e3e0da; border-radius: 10px; background: #fff; font-size: .85rem; }
.pe-insp h4 { margin: 0 0 8px; font-size: .95rem; }
.pe-insp .field { margin-bottom: 8px; }
.pe-insp .field input, .pe-insp .field select, .pe-insp .field textarea { min-height: 0; padding: 5px 8px; font-size: .85rem; }
.pe-pos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pe-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pe-row .btn { min-height: 0; padding: 5px 10px; }
.pe-hint { font-size: .75rem; color: #8a8f96; line-height: 1.4; }
.pe-cols { display: flex; flex-wrap: wrap; gap: 5px; }
.pe-cols button { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d9d5cd; cursor: pointer; }
.pe-cols button.on { box-shadow: 0 0 0 2px var(--ink); }
.pe-cols button.none { background: repeating-linear-gradient(45deg, #fff 0 4px, #eee 4px 8px); }
/* the list of layouts */
.pl-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pl-card { position: relative; display: flex; flex-direction: column; gap: 4px; width: 150px; min-height: 0; padding: 10px 12px; border: 1px solid #e3e0da; border-radius: 10px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.pl-card:hover { border-color: #c9c4bb; }
.pl-card.on { border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.pl-card b { font-size: .9rem; }
.pl-card span { font-size: .75rem; color: #8a8f96; }
.pl-def { position: absolute; top: 8px; right: 8px; padding: 1px 7px; border-radius: 999px; background: #e5f4ea; color: #1f6b3a; font-size: .66rem !important; font-weight: 700; }
.pl-new { display: grid; place-items: center; width: 150px; min-height: 64px; border: 1.5px dashed #c9c4bb; border-radius: 10px; background: none; font: inherit; color: var(--brand); font-weight: 600; cursor: pointer; }
.pl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: #f7f6f3; }
.pl-bar input { min-height: 0; padding: 6px 10px; width: 220px; }
.pl-bar .btn { min-height: 0; padding: 6px 12px; }
.pl-assign { margin-top: 18px; }
.pl-assign table td { padding: 6px 8px; }
.pl-assign select { min-height: 0; padding: 5px 8px; width: auto; }
/* half page: the drawing (and slab layout) on the left, the specification and price in a column on the right */
.q-side { display: grid; grid-template-columns: 1.15fr 1fr; gap: 6mm; align-items: start; }
.q-side > div { min-width: 0; }
.q-side-l .quote-drawing svg { max-height: 120mm; }
.q-side-l .quote-drawing.slab svg { max-height: 60mm; }
.q-side-l .d-legend { font-size: 7pt; }
.q-side-r { padding: 3mm 4mm 4mm; border-radius: 3px; background: #f7f6f3; border: 1px solid #efece6; }
.q-side-r h3:first-child, .q-side-r > div:first-child h3 { margin-top: 0; }
.q-side-r .q-facts { grid-template-columns: 1fr 1fr; gap: 1.5mm; }
.q-side-r .q-fact { background: #fff; }
.q-side-r .q-price .included ul { columns: 2; }
.q-side-r .totals-table { width: 100%; }
/* the drawing and slab layout side by side: the drawing gets the larger share */
.q-pair { display: grid; grid-template-columns: 3fr 2fr; gap: 5mm; align-items: start; }
.q-pair.rev { grid-template-columns: 2fr 3fr; }
.q-pair > div { min-width: 0; }
.q-pair .quote-drawing svg { max-height: 85mm; }
.q-pair .quote-drawing.slab svg { max-height: 85mm; }
.q-pair .d-legend { font-size: 7pt; }
/* the worktop list */
.quote .table-wrap { overflow: visible; border: 0; }
.quote table { width: 100%; border-collapse: collapse; font-size: 8pt; }
.quote thead th { text-align: left; font-size: 7pt; text-transform: uppercase; letter-spacing: .05em; color: var(--qmute); font-weight: 600; padding: 4px 6px; border-bottom: 1.5px solid var(--qa, var(--qink)); background: none; }
.quote tbody td { padding: 4px 6px; border-bottom: 1px solid var(--qline); vertical-align: top; }
/* the price: what's included beside the totals */
.q-price .included { margin-bottom: 2mm; }
.q-price .included h4 { margin: 0 0 2px; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .06em; color: var(--qmute); }
.q-price .included ul { columns: 3; column-gap: 6mm; margin: 0; padding-left: 4mm; font-size: 8.5pt; }
.quote .totals-table { width: 75mm; max-width: 100%; margin-left: auto; font-size: 9.5pt; }
.quote .totals-table td { padding: 3px 6px; border-bottom: 1px solid var(--qline); }
.quote .totals-table .grand td { font-size: 12pt; font-weight: 700; color: #fff; background: var(--qa, var(--qink)); border: 0; padding: 6px 8px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* notes, terms, signature, footer */
.q-terms { margin-top: 4mm; }
.q-terms p { columns: 2; column-gap: 6mm; font-size: 7pt; line-height: 1.4; margin: 0; }
.q-sign { margin-top: 4mm; padding: 3mm 4mm; border: 1px solid var(--qline); border-radius: 3px; break-inside: avoid; }
.q-sign h3 { margin-top: 0; }
.q-sign-row { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 6mm; margin-top: 9mm; }
.q-sign-row div { border-top: 1px solid var(--qink); padding-top: 3px; font-size: 7.5pt; color: var(--qmute); }
.q-footer { margin-top: 5mm; padding-top: 2.5mm; border-top: 1px solid var(--qline); text-align: center; color: var(--qmute); font-size: 7.5pt !important; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 8px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.2); }

@media (max-width: 900px) {
  .d-layout { grid-template-columns: 1fr; }
  .d-canvas > svg { height: 380px; }
  .d-panel { max-height: none; }
  .included ul { columns: 1; }
  .wizard li { flex-basis: 45%; }
  .n-stats { margin-left: 0; width: 100%; }
  main { padding-top: 16px; }
  .quote { padding: 18px; }
  .hide-sm { display: none; }
}

/* estimates print on A4 with 12mm margins (the layout preview marks where each page ends to match) */
@page { size: A4; margin: 12mm; }
@media print {
  body { background: #fff; }
  .quote { -webkit-print-color-adjust: exact; print-color-adjust: exact; }   /* (keep the colour band) */
  .topbar, .no-print, .bottom-bar { display: none !important; }
  main { padding: 0; max-width: none; margin: 0; }
  /* the page's own margins are the sheet's: just its 186mm-wide contents print */
  .quote { width: 186mm; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; zoom: 1 !important; }
  .q-head-band .quote-head { margin: 0 0 6mm; padding: 6mm 6mm 5mm; }
  .quote:not([data-multi]) { page-break-after: avoid; break-after: avoid; }
  .quote:not([data-multi]) .q-fit { break-inside: avoid; }
}

/* in-page confirm / input boxes */
.dlg-wrap { position: fixed; inset: 0; background: rgba(20, 24, 28, .45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.dlg { background: var(--panel); border-radius: 12px; padding: 22px; width: 100%; max-width: 420px; box-shadow: 0 16px 48px rgba(0,0,0,.25); display: grid; gap: 12px; }
.dlg-msg { margin: 0; font-size: 1rem; line-height: 1.45; }
.dlg-actions { justify-content: flex-end; }
/* estimate: stockist, material and thickness on one line (stacking on a narrow screen) */
.mat-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.6fr) auto; gap: 14px; align-items: start; }
.mat-col h3 { margin: 0 0 6px; }
.mat-col select { width: 100%; }
.th-seg { height: 44px; }
.th-seg { display: flex; border-color: #c9c5bd; }
.th-seg button { height: 100%; padding: 0 18px; font-size: .95rem; font-weight: 600; }
@media (max-width: 760px) { .mat-row { grid-template-columns: 1fr; } }
/* material picker on the estimate: search box with a drop-down list */
.cpick { position: relative; }
.cpick input { padding-right: 40px; font-weight: 600; color: var(--brand); }
.cpick input::placeholder { font-weight: 400; }
.cpick-arrow { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 34px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; border-radius: 6px; }
.cpick-arrow:hover { background: #f0eee9; }
.cpick-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid #c9c5bd; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 4px; }
.cpick-list[hidden] { display: none; }
.cpick-opt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 7px; cursor: pointer; }
.cpick-opt small { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.cpick-opt.act { background: #eef3f6; }
.cpick-opt.on span { font-weight: 700; color: var(--brand); }
.cpick-opt.on span::after { content: ' ✓'; }
.cpick-typed { border-top: 1px solid #efece7; margin-top: 2px; }
.cpick-typed span { font-style: italic; }
.cpick-none { margin: 8px 10px; }
.dlg-form { max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; }
.dlg-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.dlg-fields .field { display: grid; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); margin: 0; }
.dlg-fields .field.wide { grid-column: 1 / -1; }
.dlg-fields input, .dlg-fields textarea { font-weight: 400; }
@media (max-width: 520px) { .dlg-fields { grid-template-columns: 1fr; } }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.d-msg button { margin-left: 10px; background: #fff; color: var(--ink); border: 0; border-radius: 6px; padding: 4px 10px; font: inherit; font-weight: 700; cursor: pointer; }
.d-msg.has-btn { pointer-events: auto; }

/* action buttons two to a row so the whole tool column fits */
.d-tools { width: 84px; }
.d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; }
.d-actions .d-tool { padding: 3px 1px; font-size: .62rem; }
.d-actions .d-tool svg { width: 17px; height: 17px; }
.d-flyout { right: 100px; }

/* moving the view around (Space + drag, or middle mouse) */
#drawing .d-canvas > svg.panning, #drawing .d-canvas > svg.panning * { cursor: grab !important; }

/* Edge tool: Profile / Upstand / Splashback switch */
.d-seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--brand); border: 1.5px solid var(--brand); border-radius: 8px; overflow: hidden; }
.d-seg button { border: 0; background: #fff; color: var(--brand); font: inherit; font-size: .78rem; font-weight: 600; padding: 7px 2px; cursor: pointer; }
.d-seg button.on { background: var(--brand); color: #fff; }
.d-selbar input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; padding: 0; }
.d-selbar .check { white-space: nowrap; }
#drawing .d-canvas > svg[data-tool="shape"] { cursor: pointer; }

/* ---------- logos ---------- */
.logos { display: inline-flex; align-items: center; gap: 14px; max-width: 100%; }
.logos img { display: block; height: 44px; width: auto; max-width: 200px; object-fit: contain; }
.logos .logo-sep { width: 1px; align-self: stretch; background: currentColor; opacity: .25; }
.logos.on-dark { background: #fff; color: var(--ink, #1f2328); border-radius: 8px; padding: 5px 10px; }
.logos.on-dark img { height: 34px; max-width: 150px; }
.logos.on-dark .logo-name { color: var(--brand); }
.topbar .brand .logos:not(.on-dark) .logo-name { color: var(--brand-ink); }
.login-logos { display: flex; justify-content: center; margin-bottom: 18px; }
.login-logos .logos { gap: 22px; }
.login-logos .logos img { height: 72px; max-width: 180px; }
.login-logos .logo-name { font-weight: 700; font-size: 1.3rem; color: var(--brand); }
.quote-logos { margin-bottom: 8px; }
.quote-logos .logos img { height: 56px; max-width: 200px; }
.quote-logos .logo-name { display: none; }
.logo-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 40px; }
.logo-edit img { height: 36px; width: auto; max-width: 140px; object-fit: contain; background: #fff; border: 1px solid var(--line, #ddd); border-radius: 6px; padding: 2px 4px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 600px) { .login-logos .logos img { height: 52px; max-width: 130px; } .logos.on-dark img { height: 28px; max-width: 110px; } }

/* ---------- address finder ---------- */
.suggest-wrap { position: relative; }
.suggest { position: absolute; left: 0; top: 100%; margin-top: 4px; z-index: 40; width: 100%; min-width: min(380px, 90vw); max-height: 300px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line, #d6d2c9); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 4px; font-weight: 400; }
.suggest.hidden { display: none; }
.suggest-title { font-size: .78rem; font-weight: 600; color: var(--muted, #646b73); padding: 6px 10px 4px; }
.suggest-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 7px; padding: 8px 10px; font: inherit; font-size: .9rem; color: var(--ink, #1f2328); cursor: pointer; line-height: 1.35; }
.suggest-item:hover, .suggest-item.on { background: #f1ede6; }
.suggest-item .muted { font-size: .84rem; }
.suggest.right { left: auto; right: 0; }

/* slab layout: the kitchen plan with the piece being placed highlighted */
.n-plan { background: #fff; border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 6px; margin-top: 4px; }
.n-plan svg { display: block; width: 100%; height: auto; max-height: 260px; }
.n-plan-cap { margin: 6px 0 0; }

/* ---------- estimates & jobs ---------- */
.nav-badge { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: #ea580c; color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.5; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line, #ddd); margin: 4px 0 14px; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted, #646b73); cursor: pointer; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #eeebe5; font-size: .78rem; color: var(--ink, #1f2328); }
.notice { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; font-size: .92rem; }
.notice a { font-weight: 600; }
.badge.review { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge.stage-created { background: #eef2ff; color: #3730a3; }
.badge.stage-template_booked, .badge.stage-templated { background: #ecfeff; color: #0e7490; }
.badge.stage-production { background: #fef9c3; color: #854d0e; }
.badge.stage-fitting_booked { background: #f0fdf4; color: #15803d; }
.badge.stage-complete { background: #dcfce7; color: #166534; }
.btn.accept { background: #15803d; border-color: #15803d; }
.btn.accept:hover { background: #166534; }
.stage-pick { display: inline-flex; align-items: center; gap: 6px; }
.stage-pick select { width: auto; }
/* status timeline */
.timeline { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 0; padding: 0; counter-reset: st; }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: .84rem; color: var(--muted, #646b73); }
.timeline li::before { content: ''; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: #e5e1da; z-index: 0; }
.timeline li:first-child::before { display: none; }
.timeline li.done::before, .timeline li.now::before { background: var(--brand); }
.timeline .dot { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid #d6d2c9; }
.timeline li.done .dot { background: var(--brand); border-color: var(--brand); }
.timeline li.now .dot { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.timeline li.done b, .timeline li.now b { color: var(--ink, #1f2328); }
/* job page */
.job-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.job-side .card dl { margin: 0; }
.job-drawing { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 6px; background: #fff; margin-top: 8px; }
.job-drawing svg { display: block; width: 100%; height: auto; max-height: 280px; }
.revs { margin: 4px 0 0; padding-left: 18px; font-size: .9rem; }
.revs li { margin: 3px 0; }
/* job diary */
.diary-form { display: grid; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line, #ddd); }
.diary-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.diary-row select { width: auto; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.diary { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.diary li { border: 1px solid var(--line, #e5e1da); border-radius: 8px; padding: 10px 12px; background: #fff; }
.diary li.kind-system { background: #faf9f6; }
.diary li.kind-issue { border-left: 4px solid #dc2626; }
.diary-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.diary-head .link { margin-left: auto; }
.badge.kind { background: #eeebe5; color: var(--ink, #1f2328); }
.badge.lock { background: #f1f5f9; color: #475569; }
.diary-text { white-space: pre-line; margin-top: 6px; }
/* the job diary: a composer, then a timeline (newest first, by day) */
.dz { margin-bottom: 18px; }
.dz-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dz-kind { display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #555c63; font: inherit; font-size: .85rem; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.dz-kind:hover { border-color: #c9c4bb; color: var(--ink); }
.dz-kind.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.dz-kind.k-issue.on { background: #c2410c; border-color: #c2410c; }
.dz-box { border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.dz-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.dz-box textarea { display: block; width: 100%; border: 0; border-radius: 12px 12px 0 0; padding: 12px 14px 6px; resize: vertical; min-height: 76px; background: transparent; box-shadow: none; outline: none; }
.dz-box textarea:focus { box-shadow: none; outline: none; }
.dz-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-top: 1px solid #f0eee9; flex-wrap: wrap; }
.dz-attach { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; color: #555c63; font-size: .85rem; cursor: pointer; overflow: hidden; }
.dz-attach:hover { background: #f3f2ee; color: var(--ink); }
.dz-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-files { font-size: .82rem; color: var(--brand); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-private { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: .85rem; color: #555c63; cursor: pointer; user-select: none; }
.dz-private input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dz-switch { position: relative; width: 32px; height: 18px; border-radius: 9px; background: #d4d0c8; transition: background .15s; flex: none; }
.dz-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.dz-private input:checked + .dz-switch { background: #475569; }
.dz-private input:checked + .dz-switch::after { transform: translateX(14px); }
.dz-private input:focus-visible + .dz-switch { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.dz-send { min-height: 0; padding: 8px 18px; border-radius: 8px; }
.dz-bar .dz-send:only-of-type { margin-left: auto; }
.dz:not(:has(.dz-private)) .dz-send { margin-left: auto; }

.dl { list-style: none; margin: 0; padding: 0; position: relative; }
.dl::before { content: ''; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: #eeebe5; }
.dl-day { position: relative; margin: 16px 0 10px; padding-left: 46px; }
.dl-day:first-child { margin-top: 0; }
.dl-day span { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a8f96; }
.dl-item { position: relative; display: flex; gap: 10px; margin-bottom: 12px; }
.dl-av { position: relative; z-index: 1; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; box-shadow: 0 0 0 3px #fff; }
.dl-item.private .dl-av { background: #64748b; }
.dl-card { flex: 1; min-width: 0; padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.dl-item.private .dl-card { background: #f8fafc; border-color: #e2e8f0; }
.dl-item.k-issue .dl-card { border-color: #fdba74; background: #fff8f1; }
.dl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .88rem; }
.dl-co { color: #8a8f96; font-size: .8rem; }
.dl-kind { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #f1efea; color: #555c63; font-size: .75rem; font-weight: 600; }
.dl-kind.k-call { background: #e8f1fb; color: #1d5fa8; }
.dl-kind.k-visit { background: #e7f5ee; color: #1f6b3a; }
.dl-kind.k-change { background: #f3ecfb; color: #6b3fb3; }
.dl-kind.k-issue { background: #ffedd5; color: #c2410c; }
.dl-lock { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: .75rem; font-weight: 600; }
.dl-time { margin-left: auto; color: #8a8f96; font-size: .8rem; }
.dl-del { display: grid; place-items: center; width: 28px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 6px; background: none; color: #a0a5ab; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.dl-item:hover .dl-del, .dl-del:focus-visible { opacity: 1; }
.dl-del:hover { background: #fdecea; color: #a3281c; }
@media (hover: none) { .dl-del { opacity: 1; } }
.dl-text { margin-top: 6px; white-space: pre-line; line-height: 1.5; overflow-wrap: anywhere; }
.dl-sys { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding-left: 8px; font-size: .86rem; color: #555c63; flex-wrap: wrap; }
.dl-sys-dot { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid #d9d5cd; color: #8a8f96; margin-right: 8px; flex: none; }
.dl-sys-dot svg { width: 8px; height: 8px; fill: currentColor; }
.dl-meta { margin-left: auto; color: #a0a5ab; font-size: .78rem; }
.dl-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 12px; color: #8a8f96; text-align: center; }
.dl-empty svg { width: 26px; height: 26px; }
.dl-empty p { margin: 0; }
@media (max-width: 480px) { .dl-meta { margin-left: 38px; width: 100%; } .dz-private { margin-left: 0; } }
.diary-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.diary-files .thumb img { display: block; width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line, #ddd); }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line, #ddd); border-radius: 8px; font-size: .86rem; text-decoration: none; background: #faf9f6; }
.colour-pick { width: 46px; height: 34px; padding: 2px; min-height: 0; cursor: pointer; }
/* edge profiles: each with its picture, and a library to add more from */
/* materials: the brands as cards, then one brand's materials */
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mb-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; min-height: 108px; }
.mb-card b { font-size: 1rem; color: var(--brand); }
.mb-card:hover { border-color: var(--brand); background: #f7f9fa; }
.mb-types { display: flex; flex-wrap: wrap; gap: 4px; }
.mb-types i { font-style: normal; font-size: .72rem; font-weight: 600; color: var(--brand); background: #e6edf2; border-radius: 10px; padding: 2px 8px; }
.mb-contact { display: grid; gap: 1px; font-size: .8rem; color: var(--ink); margin-top: 2px; min-width: 0; max-width: 100%; }
.mb-contact span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.mb-det, .mb-go { font: inherit; font-size: .8rem; font-weight: 600; color: var(--brand); background: none; border: 0; padding: 2px 0; cursor: pointer; min-height: 0; }
.mb-det { color: var(--muted); }
.mb-det:hover { color: var(--brand); text-decoration: underline; }
.mb-go:hover { text-decoration: underline; }
.mb-head { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; }
.mb-title { margin: 0; font-size: 1.5rem; color: var(--brand); }
.mb-head .field { flex: 1; margin: 0; }
.mb-head input { font-size: 1.05rem; font-weight: 600; }
.mat-search { width: 100%; margin-bottom: 8px; }
/* one line per material, under one set of column headings */
.mm-headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 8px; }
.mm-grid { display: grid; grid-template-columns: minmax(150px, 1fr) 120px 120px 120px 24px; gap: 8px; align-items: center; }
/* each slab size the material comes in, and what one slab costs */
.mm-slabline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; padding-left: 2px; }
.mm-slabline .mm-sl { min-width: 48px; font-size: .74rem; font-weight: 600; color: var(--muted); }
.mm-slabline .mm-slab2 { width: 170px; }
.mm-cost { font-size: .86rem; }
.mm-cost b { color: var(--brand); }
.mm-cost .muted { font-size: .78rem; }
.mm-cols { padding: 8px 10px 6px; background: #fafaf8; border-bottom: 1px solid #efece7; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mm-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.mm-row { padding: 8px 10px; border-bottom: 1px solid #efece7; }
.mm-row:last-child { border-bottom: 0; }
.mm-row[hidden] { display: none; }
.mm-row:focus-within { background: #fafbfc; }
.mm-row select { width: 100%; height: 36px; font-size: .85rem; }
.mm-slab2, .mm-money { display: flex; align-items: center; height: 36px; background: #f4f2ee; border-radius: 7px; padding: 0 6px; }
.mm-slab2:focus-within, .mm-money:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--brand); }
.mm-slab2 input, .mm-money input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; padding: 0 2px; height: 34px; text-align: right; -moz-appearance: textfield; }
.mm-slab2 input { text-align: center; }
.mm-slab2 input::-webkit-inner-spin-button, .mm-money input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mm-slab2 i, .mm-money i { font-style: normal; font-size: .78rem; color: var(--muted); }
/* £/m² boxes: look like a field, the number sits next to the £, no ring inside the box */
.mm-row .mm-money { background: #fff; box-shadow: inset 0 0 0 1px #d9d5ce; cursor: text; padding: 0 10px; gap: 4px; }
.mm-row .mm-money:hover { box-shadow: inset 0 0 0 1px #9aa5ad; }
.mm-row .mm-money:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.mm-row .mm-money input, .mm-row .mm-money input:focus { height: 34px; min-height: 0; border: 0; border-radius: 0; box-shadow: none; outline: none; text-align: left; font-size: 1rem; font-weight: 600; color: #1f2328; padding: 0; }
.mm-row .mm-money i { font-size: .85rem; }
.mm-money.unset { background: #fff7ed; box-shadow: inset 0 0 0 1px #fdba74; }
.mm-money.auto { background: none; box-shadow: inset 0 0 0 1px #e5e2dc; }
.mm-money.auto output { flex: 1; text-align: right; padding: 0 4px; color: var(--muted); font-size: .95rem; }
.mm-extra { margin-top: 6px; }
.mm-extra .mm-sl { justify-self: end; font-size: .74rem; font-weight: 600; color: var(--muted); }
.mm-addsize { margin: 4px 0 0; padding: 2px 0; border: 0; background: none; font: inherit; font-size: .78rem; color: var(--brand); font-weight: 600; cursor: pointer; }
.mm-addsize:hover { text-decoration: underline; }
/* where there isn't room: the name on its own line, then type, slab and prices under it */
@container (max-width: 720px) {
  .mm-grid { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) 24px; }
  .mm-grid > .mm-name { grid-column: 1 / 4; grid-row: 1; }
  .mm-grid > [data-delmat] { grid-column: 4; grid-row: 1; }
  .mm-cols > span:first-child { display: none; }
}
#brands { container-type: inline-size; }
.mm-top { display: flex; gap: 8px; align-items: center; }
.mm-name { flex: 1; min-width: 0; height: 38px; font-weight: 600; color: var(--brand); background: #f4f2ee; border-color: transparent; border-radius: 7px; }
.mm-name:focus { background: #fff; border-color: var(--brand); }
.mm-top select { width: auto; min-width: 130px; height: 38px; }
.mm-bottom { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 8px; }
.mm-f { display: inline-flex; align-items: center; gap: 6px; }
.mm-f > span:first-child { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mm-f .unit-in input { width: 62px; height: 34px; border: 0; }
.mm-slab input { width: 70px !important; text-align: center !important; }
.mm-sizes { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.mm-size { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.mm-sl { font-size: .72rem; font-weight: 700; color: var(--brand); min-width: 44px; }
.mm-sl:empty { display: none; }
.mm-f input[type=number] { -moz-appearance: textfield; }
.mm-f input[type=number]::-webkit-inner-spin-button, .mm-f input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mm-by button { padding: 5px 10px; font-size: .76rem; }
.mm-add { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-top: 12px; }
.mm-paste summary { cursor: pointer; padding: 9px 4px; font-size: .88rem; color: var(--brand); font-weight: 600; }
.mm-paste textarea { width: 100%; min-width: 280px; margin: 6px 0; }
/* how estimates are charged: two big choices */
.charge-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.charge-pick button { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.charge-pick button b { font-size: 1rem; color: var(--brand); }
.charge-pick button span { font-size: .84rem; color: var(--muted); line-height: 1.35; }
.charge-pick button:hover { border-color: var(--brand); }
.charge-pick button.on { border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
@media (max-width: 640px) { .charge-pick { grid-template-columns: 1fr; } }
/* terms and conditions */
.terms-box { width: 100%; min-height: 380px; font-size: .9rem; line-height: 1.5; padding: 12px 14px; resize: vertical; }
/* cut-outs: the same clean rows – picture, name, price */
table[data-key="cutouts"] { border-collapse: separate; border-spacing: 0; width: 100%; }
table[data-key="cutouts"] thead th { background: none; font-size: .7rem; letter-spacing: .05em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table[data-key="cutouts"] td { padding: 7px 6px; border-bottom: 1px solid #efece7; vertical-align: middle; }
table[data-key="cutouts"] tbody tr:last-child td { border-bottom: 0; }
table[data-key="cutouts"] tbody tr:hover td { background: #faf9f6; }
table[data-key="cutouts"] [data-c="name"] { width: 100%; min-width: 0; height: 36px; font-weight: 600; color: var(--brand); border-color: transparent; background: #f4f2ee; border-radius: 7px; }
table[data-key="cutouts"] [data-c="name"]:focus { background: #fff; border-color: var(--brand); }
table[data-key="cutouts"] td:nth-child(2) { width: 100%; }
table[data-key="cutouts"] .unit-in input { height: 36px; border: 0; }
table[data-key="cutouts"] .kept-cell { display: none; }
.cut-pic { display: grid; place-items: center; width: 52px; height: 38px; border-radius: 8px; background: #f4f2ee; color: var(--brand); }
.cut-pic svg { width: 40px; height: 30px; }
/* the edge profiles list: picture, name, price… on one clean line each – or, where there isn't room,
   two lines (no sideways scrolling) */
.table-wrap:has(> table[data-key="edges"]) { container-type: inline-size; overflow: visible; }
@container (max-width: 820px) {
  table[data-key="edges"], table[data-key="edges"] tbody { display: block; width: 100%; }
  table[data-key="edges"] thead { display: none; }
  /* first line: picture, name (stretching), price; everything else wraps onto the second line */
  table[data-key="edges"] tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 8px; border-bottom: 1px solid #efece7; }
  table[data-key="edges"] tbody tr:last-child { border-bottom: 0; }
  table[data-key="edges"] tbody td { border: 0; padding: 0; background: none !important; }
  table[data-key="edges"] td:nth-child(2) { flex: 1 1 calc(100% - 240px); min-width: 0; }
  table[data-key="edges"] td:nth-child(2) input { min-width: 0; width: 100%; }
  table[data-key="edges"] td:nth-child(4) { margin-left: 70px; }
  table[data-key="edges"] td:nth-child(n+4) { display: inline-flex; align-items: center; gap: 6px; }
  table[data-key="edges"] td:nth-child(7) { margin-left: auto; }
  table[data-key="edges"] td:nth-child(4)::before { content: 'Made on'; }
  table[data-key="edges"] td:nth-child(5)::before { content: 'Colour'; }
  table[data-key="edges"] td:nth-child(6)::before { content: 'Radius'; }
  table[data-key="edges"] td:nth-child(n+4)::before { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  table[data-key="edges"] td:nth-child(7)::before, table[data-key="edges"] td:nth-child(8)::before { content: none; }
}
table[data-key="edges"] { border-collapse: separate; border-spacing: 0; }
table[data-key="edges"] thead th { background: none; font-size: .7rem; letter-spacing: .05em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table[data-key="edges"] td { padding: 7px 5px; border-bottom: 1px solid #efece7; vertical-align: middle; }
table[data-key="edges"] tbody tr:last-child td { border-bottom: 0; }
table[data-key="edges"] tbody tr:hover td { background: #faf9f6; }
table[data-key="edges"] input:not([type="checkbox"]):not([type="color"]) { height: 36px; border-color: transparent; background: #f4f2ee; border-radius: 7px; }
table[data-key="edges"] input:not([type="checkbox"]):not([type="color"]):focus { background: #fff; border-color: var(--brand); }
table[data-key="edges"] [data-c="name"] { min-width: 130px; font-weight: 600; color: var(--brand); }
.prof-cell { width: 62px; }
.prof-pick { position: relative; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; border-radius: 8px; padding: 2px; }
.prof-pick:hover { background: color-mix(in srgb, var(--brand) 7%, #fff); }
.prof-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.prof-pic svg { display: block; width: 48px; height: 37px; }
.prof-caret { font-size: .7rem; color: var(--muted); }
.unit-in { display: inline-flex; align-items: center; background: #f4f2ee; border-radius: 7px; padding: 0 8px; }
.unit-in i { font-style: normal; font-size: .8rem; color: var(--muted); }
.unit-in input { width: 50px; min-width: 0; background: none !important; padding: 0 4px; text-align: right; }
.unit-in:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--brand); }
.swatch-pick { position: relative; display: inline-block; }
.mitre-col { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch:hover { box-shadow: 0 0 0 2px var(--brand); }
.swatch-pop { position: fixed; z-index: 60; display: grid; grid-template-columns: repeat(6, 24px); gap: 6px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.swatch-pop.hidden { display: none; }
.swatch-pop button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.1); cursor: pointer; padding: 0; }
.swatch-pop button.on, .swatch-pop button:hover { box-shadow: 0 0 0 2px #1f2328; }
.tog { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: .82rem; color: var(--muted); }
.tog input { position: absolute; opacity: 0; width: 0; height: 0; }
.tog span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.tog input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.tog input:focus-visible + span { box-shadow: 0 0 0 2px #93c5e8; }
.tog span.two-line { height: auto; padding: 4px 12px; line-height: 1.15; text-align: center; font-size: .76rem; border-radius: 10px; }
.tog-pair { display: inline-flex; gap: 4px; }
/* ---------- settings: estimate layout editor ---------- */
.ql-wrap { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.ql-controls .field { margin-bottom: 10px; }
.ql-label { margin: 12px 0 6px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.ql-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ql-seg button { border: 0; background: #fff; padding: 7px 12px; font: inherit; font-size: .82rem; cursor: pointer; color: inherit; }
.ql-seg button + button { border-left: 1px solid var(--line); }
.ql-seg button.on { background: var(--brand); color: #fff; }
.ql-cols { display: grid; grid-template-columns: repeat(6, 26px); gap: 8px; }
.ql-cols button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); cursor: pointer; padding: 0; }
.ql-cols button.on { box-shadow: 0 0 0 2px #1f2328; }
.ql-tog { margin: 2px 0 4px; }
.ql-secs { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ql-sec { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid #efece7; background: #fff; }
.ql-sec:last-child { border-bottom: 0; }
.ql-sec b { flex: 1; font-size: .88rem; }
.ql-sec.off b { color: var(--muted); font-weight: 500; }
.ql-sec .tog span { height: 24px; padding: 0 10px; font-size: .74rem; }
.ql-move { display: inline-flex; gap: 2px; }
.ql-move button { width: 26px; height: 26px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: .8rem; padding: 0; }
.ql-move button:disabled { opacity: .3; cursor: default; }
.ql-preview { position: sticky; top: 12px; background: #e9e6e0; border-radius: 12px; padding: 12px; max-height: 85vh; overflow: auto; }
.ql-paper { pointer-events: none; position: relative; }   /* (scaled to fit its space by the page) */
/* where each A4 page ends */
.ql-break { position: absolute; left: -8px; right: -8px; border-top: 3px dashed #dc2626; z-index: 3; }
.ql-break span { position: absolute; right: 8px; top: -30px; background: #dc2626; color: #fff; font: 600 20px/1 sans-serif; padding: 5px 10px; border-radius: 6px; }
/* the ready-made styles */
.qs-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-bottom: 18px; }
.qs-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; color: inherit; }
.qs-card:hover { border-color: var(--brand); }
.qs-card.on { border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.qs-thumb { width: 100%; aspect-ratio: 210 / 297; max-height: 130px; background: #fff; border: 1px solid #e5e2dc; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.qs-h { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 7px 7px 5px; font-size: 9px; }
.qs-h i { width: 22px; height: 7px; border-radius: 2px; background: #b9b4ab; }
.qs-h b { color: var(--qa); font-size: 9px; }
.qs-l-right { flex-direction: row-reverse; }
.qs-l-centre { flex-direction: column; }
.qs-head-line { border-bottom: 2px solid var(--qa); }
.qs-head-band { background: var(--qa); }
.qs-head-band b { color: #fff; }
.qs-head-band i { background: #fff; }
.qs-f-serif b { font-family: Georgia, serif; }
.qs-body { padding: 6px 7px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.qs-sec { display: flex; flex-direction: column; gap: 3px; }
.qs-sec em { width: 30px; height: 4px; border-radius: 1px; background: var(--qa); }
.qs-hs-bar .qs-sec em { border-left: 3px solid var(--qa); background: color-mix(in srgb, var(--qa) 35%, #fff); }
.qs-hs-caps .qs-sec em { width: 38px; height: 3px; }
.qs-sec span { height: 3px; border-radius: 1px; background: #e5e2dc; }
.qs-sec span.short { width: 60%; }
.qs-tot { margin-top: auto; display: flex; justify-content: flex-end; gap: 4px; align-items: center; padding-top: 4px; border-top: 1px solid #e5e2dc; }
.qs-tot span { width: 20px; height: 3px; background: #e5e2dc; }
.qs-tot b { width: 16px; height: 5px; background: var(--qa); border-radius: 1px; }
.ql-paper .quote { box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.ql-paper .no-print { display: none; }
@media (max-width: 720px) { .ql-wrap { grid-template-columns: 1fr; } .ql-preview { position: static; } }
/* ---------- the homeowner's quote page ---------- */
.cq { max-width: 980px; margin: 0 auto; padding: 20px 16px 48px; }
.cq [hidden] { display: none !important; }
.cq-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.cq-head img { max-height: 56px; max-width: 220px; }
.cq-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.cq-card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.cq-hero { display: grid; grid-template-columns: minmax(240px, 1fr) 1.4fr; gap: 20px; align-items: center; }
.cq-eyebrow { margin: 0 0 4px; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cq-total { margin: 0; font-size: 2.3rem; color: var(--brand); }
.cq-total span, .cq-rprice span { font-size: .9rem; font-weight: 500; color: var(--muted); }
.cq-mat { margin: 8px 0 6px; }
.cq-look { display: inline-block; font-size: .74rem; font-weight: 600; color: var(--brand); background: #e6edf2; border-radius: 10px; padding: 2px 8px; margin-left: 4px; }
.cq-drawing svg { width: 100%; height: auto; max-height: 340px; }
.cq-warn { color: #b91c1c; font-weight: 600; }
#cqSearch { width: 100%; margin: 10px 0; }
.cq-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; padding: 2px; }
.cq-opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.cq-opt span { font-size: .78rem; color: var(--muted); }
.cq-opt em { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: .7rem; font-weight: 600; color: var(--brand); }
.cq-opt:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.cq-opt.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cq-result { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; padding: 16px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 5%, #fff); }
.cq-rname { font-size: 1.05rem; }
.cq-rprice { margin: 4px 0 0; font-size: 1.5rem; font-weight: 700; color: var(--brand); }
.cq-diff { margin: 2px 0 0; font-weight: 600; font-size: .88rem; }
.cq-diff.less { color: #15803d; }
.cq-diff.more { color: #b45309; }
.cq-saved { margin: 0; color: #15803d; }
.cq-sims { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.cq-sim { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 12px; }
.cq-sim .btn { margin-top: 8px; align-self: flex-start; }
.cq-choice { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #efece7; }
.cq-choice b { flex: 1; }
.cq-foot { text-align: center; margin-top: 24px; }
@media (max-width: 720px) { .cq-hero { grid-template-columns: 1fr; } .cq-result { flex-direction: column; align-items: flex-start; } }
/* the customer link card on an estimate */
.cl-row { display: flex; gap: 8px; align-items: center; }
.cl-row input { flex: 1; font-size: .85rem; }
.cl-choice { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #efece7; }
.cl-choice > div { flex: 1; }
.cl-price { font-weight: 700; color: var(--brand); }
/* Shaping & corners: a card per charge, with a picture */
/* (a list: one row each – picture, what it is, its price on the right) */
.sh-grid { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 6px; background: #fff; }
.sh-card { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #efece7; cursor: text; border-left: 3px solid transparent; }
.sh-card:last-child { border-bottom: 0; }
.sh-card:hover { background: #faf9f6; }
.sh-card:focus-within { border-left-color: var(--c); background: color-mix(in srgb, var(--c) 5%, #fff); }
.sh-pic { flex: none; display: grid; place-items: center; width: 72px; height: 48px; border-radius: 8px; background: color-mix(in srgb, var(--c) 9%, #fff); }
.sh-pic svg { width: 66px; height: 43px; }
.sh-body { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.sh-body b { grid-column: 1; color: #1f2328; font-size: .95rem; }
.sh-body > .muted { grid-column: 1; line-height: 1.3; }
.sh-price { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.sh-price .unit-in input { width: 64px; height: 34px; border: 0; }
.sh-free { display: inline-block; visibility: hidden; font-size: .72rem; font-weight: 600; color: #15803d; background: #dcfce7; border-radius: 10px; padding: 2px 8px; }
.sh-card.free .sh-free { visibility: visible; }
.tog-pair .tog span { padding: 0 9px; }
.choice.unavail { opacity: .45; cursor: not-allowed; }
.prof-picker { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fbfaf8; }
.prof-picker p { margin: 0 0 10px; }
.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.prof-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; font-size: .8rem; text-align: center; color: inherit; }
.prof-card svg { width: 72px; height: 56px; }
.prof-card:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.prof-card.have { opacity: .6; }
.prof-card.blank { justify-content: center; color: var(--muted); border-style: dashed; }
.prof-tick { position: absolute; top: 6px; right: 8px; color: #15803d; }
@media (max-width: 800px) {
  .job-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .timeline li:nth-child(4)::before { display: none; }
}

/* pictures on the Edge, Edit and Cutout tool options */
.d-opt { min-height: 44px; padding: 5px 9px 5px 6px; color: var(--brand); }
.d-opt span { color: var(--ink, #1f2328); line-height: 1.2; }
.d-opt .ico { flex: none; width: 40px; height: 30px; }
.d-list { display: flex; flex-direction: column; gap: 6px; }
.d-grp { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 6px 2px 0; }
.d-grp:first-child { margin-top: 0; }
/* the cut-outs: two columns of small tiles (picture over name), so the list fits without scrolling */
.d-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.d-tiles .d-grp { grid-column: 1 / -1; margin: 3px 2px 0; }
.d-tiles .d-grp:first-child { margin-top: 0; }
.d-tiles .d-opt { flex-direction: column; justify-content: center; gap: 2px; min-height: 0; padding: 5px 4px; text-align: center; }
.d-tiles .d-opt .ico { width: 34px; height: 25px; }
.d-tiles .d-opt span { font-size: .74rem; }
/* Cutout tool: picture buttons */
.d-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.d-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 6px; border: 1px solid var(--line, #dedbd5); border-radius: 8px; background: #fff; color: var(--brand); font: inherit; font-size: .72rem; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; }
.d-tile:hover { border-color: var(--brand); }
.d-tile.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); box-shadow: inset 0 0 0 1px var(--brand); }
.d-tile span { color: var(--ink, #1f2328); }

/* ---------- Estimates / Jobs dashboard ---------- */
.dash-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-head h1 { margin: 0; font-size: 1.6rem; }
.dash { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.dash-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dash-search { display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 36px; border: 1px solid var(--line); border-radius: 18px; color: var(--muted); background: #fbfaf8; min-width: 220px; flex: 0 1 300px; }
.dash-search:focus-within { border-color: var(--brand); background: #fff; }
.dash-search input { border: 0; outline: 0; background: transparent; padding: 0; min-height: 0; height: 34px; font-size: .88rem; width: 100%; }
.dash-search input:focus { outline: 0; }
.dash-chip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 4px 0 10px; border-radius: 18px; color: var(--ink); cursor: pointer; }
.dash-chip:hover { background: #f3f1ed; }
.dash-chip.set { background: color-mix(in srgb, var(--brand) 8%, #fff); color: var(--brand); }
.dash-chip select { border: 0; background: transparent; font: inherit; font-size: .88rem; font-weight: 600; color: inherit; padding: 4px 4px; min-height: 0; cursor: pointer; }
.dash-chip select:focus { outline: 0; }
.dash-sp { flex: 1; }
.dash-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--brand); color: #fff; font-weight: 600; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.dash-btn:hover { filter: brightness(1.15); }
.dash .table-wrap { border: 0; border-radius: 0; margin: 0; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.dash-table th { background: #fbfaf8; color: var(--muted); font-size: .74rem; font-weight: 600; text-transform: none; letter-spacing: 0; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.dash-table th.sortable { cursor: pointer; }
.dash-table th.sortable:hover, .dash-table th.on { color: var(--ink); }
.dash-table th.on { background: #f1eee9; }
.dash-table .sort-i { opacity: .55; font-size: .8em; margin-left: 2px; }
.dash-table th.num, .dash-table td.num { text-align: right; }
.dash-table td { padding: 9px 12px; border-bottom: 1px solid #efece7; vertical-align: middle; }
.dash-table tbody tr.clickable { cursor: pointer; }
.dash-table tbody tr.clickable:hover td { background: #f8f7f4; }
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table .empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.dash-main { display: block; }
.dash-sub { display: block; color: var(--muted); font-size: .76rem; margin-top: 1px; }
.dash-table td.st-cell { padding: 4px 8px; width: 1%; white-space: nowrap; }
.st-block { display: block; min-width: 108px; text-align: center; padding: 7px 10px; border-radius: 6px; font-size: .78rem; font-weight: 600; color: #fff; background: #9ca3af; }
.st-cell .dash-sub { text-align: center; }
.st-draft { background: #c7cbd1; color: #3f4650; }
.st-sent { background: #2f7de1; }
.st-accepted, .st-complete { background: #1f9d55; }
.st-declined { background: #d64545; }
.st-created { background: #64748b; }
.st-template_booked { background: #d97706; }
.st-templated { background: #7c3aed; }
.st-production { background: #2f7de1; }
.st-fitting_booked { background: #0f766e; }
.st-review { color: #c2410c !important; font-weight: 600; }
/* quote expiry */
.st-expired { color: #b91c1c !important; font-weight: 600; }
.expired-note { color: #b91c1c; }
.notice.warn { background: #fef2f2; border-color: #fecaca; }
/* material in stock */
.mat-card.in { border-color: #86efac; background: #f0fdf4; }
.dash-prog { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.dash-prog .bar { width: 70px; height: 6px; border-radius: 3px; background: #e7e4de; overflow: hidden; }
.dash-prog .bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.dash-foot { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; min-height: 20px; }
.dash-pager { display: inline-flex; gap: 2px; }
.dash-pager button { min-width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.dash-pager button.on { background: var(--brand); color: #fff; }
.dash-pager button:disabled { opacity: .35; cursor: default; }
@media (max-width: 700px) { .dash-search { flex: 1 1 100%; } .st-block { min-width: 0; } }

/* ---------- Prices & settings: sidebar ---------- */
.set-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.set-nav button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: .92rem; color: var(--ink); cursor: pointer; }
.set-nav button svg { flex: none; color: var(--muted); }
.set-nav button:hover { background: #f3f1ed; }
.set-nav button.on { background: color-mix(in srgb, var(--brand) 8%, #fff); color: var(--brand); font-weight: 600; }
.set-nav button.on svg { color: var(--brand); }
.set-body > .card:first-child { margin-top: 0; }
.set-body .actions { margin-top: 4px; }
@media (max-width: 760px) {
  .set-layout { grid-template-columns: 1fr; }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; }
  .set-nav button { width: auto; white-space: nowrap; padding: 8px 10px; }
}

/* new estimate: standard or off-cut pricing */
.price-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 860px) { .price-pick { grid-template-columns: 1fr 1fr; } }
/* project pricing: the kitchen types, as tabs (on the job details, drawing and slab layout pages) */
.kt-slot:empty { display: none; }
.kt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.kt-lbl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 4px; }
.kt-tab { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.kt-tab button { border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; padding: 6px 10px; display: inline-flex; align-items: baseline; gap: 6px; min-height: 0; }
.kt-tab button b { font-size: .88rem; }
.kt-tab button i { font-style: normal; font-size: .8rem; color: var(--muted); }
.kt-tab.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); }
.kt-tab.on button b { color: var(--brand); }
.kt-tab .kt-edit { border-left: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--brand); }
.kt-edit:hover, .kt-tab button:hover b { text-decoration: underline; }
.kt-add { border: 1.5px dashed #c9c5bd; background: none; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--brand); cursor: pointer; min-height: 0; }
.kt-add:hover { border-color: var(--brand); }
.step-head + .kt-slot .kt-bar { margin-top: -4px; }
/* the material choice on the slab layout page (project pricing): a light panel above the slabs */
#matCard.mat-inline { border: 1px solid var(--line); box-shadow: none; background: #fbfaf8; padding: 12px 14px; margin: 0 0 12px; }
#matCard.mat-inline > h2 { font-size: 1rem; margin: 0 0 8px; }
.price-pick button { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.price-pick button:hover { border-color: var(--brand); }
.price-pick button.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); box-shadow: inset 0 0 0 1px var(--brand); }
.price-pick button b { font-size: 1rem; color: var(--brand); }
.price-pick button span { font-size: .85rem; color: var(--muted); line-height: 1.35; }
.set-sub { font-size: .95rem; margin: 14px 0 8px; }
@media (max-width: 600px) { .price-pick { grid-template-columns: 1fr; } }

/* corner angle badges on the drawing (click to change the angle) */
.d-angle rect { fill: #fff7ed; stroke: #c2410c; stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; }
.d-angle text { fill: #c2410c; font-weight: 700; cursor: pointer; font-family: inherit; }
.d-angle:hover rect, .d-angle.on rect { fill: #ffedd5; }
.d-angle.on rect { stroke-width: 2.2; }
.d-angle-chip { display: inline-block; padding: 0 6px; border: 1px solid #c2410c; border-radius: 9px; background: #fff7ed; color: #c2410c; font-weight: 700; font-size: .75rem; line-height: 1.4; }
.ang-slider { width: 220px; accent-color: #c2410c; cursor: pointer; }

/* tips and hints: a user can hide them (My account) */
.tip-hide { align-self: flex-start; background: none; border: 0; padding: 2px 0; margin-top: 2px; font: inherit; font-size: .72rem; color: var(--muted); text-decoration: underline; cursor: pointer; }
.tip-hide:hover { color: var(--brand); }
body.no-tips .d-tip, body.no-tips .tip-hide { display: none !important; }

/* activity history: who did what */
.act-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.act-filters select { width: auto; min-height: 34px; padding: 4px 8px; font-size: .85rem; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid #efece7; font-size: .88rem; align-items: baseline; }
.activity li:last-child { border-bottom: 0; }
.activity .act-when { color: var(--muted); font-size: .8rem; }
.activity .act-who { color: var(--muted); font-size: .82rem; text-align: right; }
@media (max-width: 600px) { .activity li { grid-template-columns: 1fr; gap: 2px; } .activity .act-who { text-align: left; } }
/* an odd button out (e.g. Build-up) spans the whole row, so there is no empty gap */
.d-seg button:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* splashback shape controls: their own rows under the splashback bar */
.d-selbar .pn-shape { flex-basis: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; margin-top: 2px; border-top: 1px solid #efece7; }
.d-selbar .pn-sec { border-top: 0; padding-top: 2px; }
/* a splashback's bar with its shape rows: wraps onto rows, no wider than the drawing leaves room for */
.d-selbar:has(.pn-shape) { flex-wrap: wrap; max-width: calc(100% - 250px); row-gap: 4px; }
.d-selbar:has(.pn-shape) > .muted.small { flex-basis: 100%; order: 1; }
.d-selbar .pn-shape { order: 2; }

/* ----- pricing tool: a tab for each way of pricing, quick links, and the off-cut / project price lists ----- */
.pt-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 4px; background: #f4f2ee; border-radius: 14px; }
.pt-tabs button { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 10px 14px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; font: inherit; color: inherit; min-height: 0; }
.pt-tabs button b { font-size: 1rem; color: var(--brand); }
.pt-tabs button span { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.pt-tabs button:hover { background: rgba(255,255,255,.6); }
.pt-tabs button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1), inset 0 0 0 1.5px var(--brand); }
.pt-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pt-jump:empty { display: none; }
.pt-jump button { min-height: 0; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: .82rem; cursor: pointer; color: var(--brand); }
.pt-jump button:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.own-list { display: grid; gap: 6px; max-width: 560px; }
.own-cols { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); max-width: none; }
.own-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin: 0; font-weight: 400; }
.own-row .own-name { flex: 1; min-width: 0; font-size: .9rem; }
.own-row .unit-in input { width: 70px; }
.own-row .unit-in input::placeholder { color: #b3b0aa; }
.own-pic { display: inline-flex; width: 44px; justify-content: center; }
.own-pic svg { max-width: 44px; max-height: 30px; }
.vd-co { margin-top: 12px; max-width: 560px; }
.vd-co summary { cursor: pointer; font-size: .9rem; color: var(--brand); font-weight: 600; }
@media (max-width: 700px) { .pt-tabs { grid-template-columns: 1fr; } }

.sc-travel-note { margin: 0 0 8px; }

/* Your business: one column of rows – what it is on the left, its boxes on the right */
.biz-grid { grid-template-columns: 1fr; gap: 0; border: 1px solid #ebe8e2; border-radius: 12px; overflow: hidden; }
.biz-card { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0 28px; align-items: start; padding: 18px 20px; border: 0; border-radius: 0; border-top: 1px solid #eeece7; }
.biz-card:first-child { border-top: 0; }
.biz-card > :not(.biz-card-h) { grid-column: 2; }
.biz-card-h { grid-column: 1; grid-row: 1 / span 9; margin: 0; }
.biz-card .field { font-size: .85rem; }
.biz-card .field .opt { display: inline; margin-left: 4px; font-weight: 400; color: #9a9ea4; font-size: .75rem; }
.biz-card .field:has(.opt) { display: block; } .biz-card .field:has(.opt) input { display: block; width: 100%; margin-top: 4px; }
.biz-addr { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr); }
@media (max-width: 760px) { .biz-card { grid-template-columns: 1fr; } .biz-card > :not(.biz-card-h), .biz-card-h { grid-column: 1; grid-row: auto; } .biz-addr { grid-template-columns: 1fr 1fr; } }
.opt-tag { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #f1efea; color: #8a8f96; font-size: .72rem; font-weight: 500; vertical-align: 1px; }

/* PDF layout editor: full screen, and the zoom buttons */
.pe-zoom { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.pe-zoom button { min-height: 0; padding: 5px 10px; border: 0; background: none; font: inherit; font-size: .85rem; cursor: pointer; min-width: 34px; }
.pe-zoom button + button { border-left: 1px solid var(--line); }
.pe-zoom button:hover { background: color-mix(in srgb, var(--brand) 5%, #fff); }
body.pe-noscroll { overflow: hidden; }
#pdfEditor.pe-full { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; padding: 12px 16px; background: #f4f2ee; }
.pe-full .pl-bar { flex: none; margin-bottom: 10px; background: #fff; }
.pe-full .pe { flex: 1; min-height: 0; grid-template-columns: 170px minmax(0, 1fr) 260px; }
.pe-full .pe-insp { grid-column: auto; }
.pe-full .pe-pal, .pe-full .pe-insp { max-height: 100%; overflow: auto; position: static; }
.pe-full .pe-canvas { height: 100%; }
.pe-full > .pe-hint { display: none; }

/* PDF layout editor, calmer: a light block list, small icon buttons, a "more" menu */
.pe-bar { gap: 6px; }
.pe-bar #peName { border-color: transparent; background: transparent; font-weight: 600; font-size: 1rem; }
.pe-bar #peName:hover, .pe-bar #peName:focus { border-color: var(--line); background: #fff; }
.pe-ib { display: inline-grid; place-items: center; width: 34px; height: 32px; min-height: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 1.05rem; line-height: 1; list-style: none; }
.pe-ib::-webkit-details-marker { display: none; }
.pe-ib:hover { background: color-mix(in srgb, var(--brand) 5%, #fff); border-color: var(--brand); }
.pe-more { position: relative; }
.pe-more > div { position: absolute; right: 0; top: 38px; z-index: 950; display: grid; min-width: 170px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.pe-more > div button { min-height: 0; padding: 8px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.pe-more > div button:hover { background: color-mix(in srgb, var(--brand) 5%, #fff); }
.pe-more > div button.danger { color: #b91c1c; }
.pe-pal { gap: 1px; }
.pe-pal-h { font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
.pe-pal b { font-size: .68rem; margin: 10px 0 2px; }
.pe-pal button { border-color: transparent; background: transparent; padding: 5px 8px; }
.pe-pal button:hover { border-color: transparent; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pe-pal button i { color: #8a8f96; }
.pe-tips { margin-top: 16px; padding-top: 12px; border-top: 1px solid #eeece7; font-size: .8rem; color: #6b7178; }
.pe-tips ul { margin: 6px 0 0; padding-left: 16px; line-height: 1.45; }
.pe-tips li { margin-bottom: 4px; }

/* schedule: one professional toolbar (title, dates, views, help, New booking) instead of a big page heading */
.sc-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sc-new { min-height: 0; padding: 8px 14px; font-size: .9rem; }
.sc-help { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); color: #6b7178; font-size: .85rem; font-weight: 600; cursor: help; background: #fff; }
.sc-help-tip { display: none; position: absolute; right: 0; top: 34px; z-index: 50; width: 260px; padding: 10px 12px; border-radius: 10px; background: #1f2328; color: #fff; font-size: .8rem; font-weight: 400; line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.sc-help:hover .sc-help-tip, .sc-help:focus .sc-help-tip { display: block; }
.sc-layout { margin-top: 4px; }

/* the job pop-up on the schedule: crisp and modern */
.dlg.jc { width: min(640px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 40px); overflow: auto; padding: 0; text-align: left; border: 0; border-radius: 18px; box-shadow: 0 24px 64px rgba(15,23,42,.22), 0 2px 6px rgba(15,23,42,.08); animation: jcIn .18s ease-out; }
@keyframes jcIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.jc-head { --kc: #64748b; --kb: #f1f5f9; position: relative; padding: 22px 64px 18px 24px; background: linear-gradient(135deg, var(--kb), #fff 70%); border-bottom: 1px solid #eef0f2; }
.jc-head.jk-template { --kc: #2563eb; --kb: #e8f0fe; } .jc-head.jk-production { --kc: #d97706; --kb: #fdf3e2; } .jc-head.jk-fit { --kc: #16a34a; --kb: #e7f6ec; }
.jc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.jc-tags > span { padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .01em; }
.jc-kindtag { background: var(--kc); color: #fff; }
.jc-num { background: #fff; color: #334155; box-shadow: inset 0 0 0 1px #e2e8f0; }
.jc-stage { background: rgba(255,255,255,.7); color: var(--kc); box-shadow: inset 0 0 0 1px currentColor; white-space: nowrap; }
.jc-head h3 { margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; color: #0f172a; }
.jc-sub { margin: 2px 0 0; color: #64748b; font-size: .9rem; }
.jc-x { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.8); color: #475569; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.jc-x:hover { background: #fff; color: #0f172a; }
.jc-when { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px 4px; }
.jc-chip { display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 11px; border-radius: 12px; background: #f8fafc; box-shadow: inset 0 0 0 1px #edf0f3; font-size: .9rem; font-weight: 600; color: #0f172a; }
.jc-chip > svg { flex: none; color: #64748b; }
.jc-chip small { display: block; font-size: .7rem; font-weight: 500; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; }
.jc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.jc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px 24px 4px; }
.jc-sec { padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px #edf0f3; }
.jc-grid h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: #475569; }
.jc-grid h4 svg { color: #94a3b8; }
.jc-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f1f3f5; font-size: .88rem; }
.jc-row:last-child { border-bottom: 0; }
.jc-row span { color: #64748b; flex: none; }
.jc-row b { font-weight: 600; color: #0f172a; text-align: right; overflow-wrap: anywhere; }
.jc-row a { color: var(--brand); text-decoration: none; } .jc-row a:hover { text-decoration: underline; }
.jc-map { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #eff6ff; font-size: .75rem; }
.jc-empty { margin: 6px 0 0; color: #94a3b8; font-size: .85rem; }
.jc-notes { margin: 14px 24px 0; padding: 12px 14px; border-radius: 12px; background: #fffbeb; box-shadow: inset 0 0 0 1px #fde68a; font-size: .88rem; }
.jc-notes span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #b45309; font-weight: 700; margin-bottom: 2px; }
.jc-notes p { margin: 0 0 8px; } .jc-notes p:last-child { margin: 0; }
.jc-actions { display: flex; gap: 10px; padding: 18px 24px 22px; margin: 0; }
.jc-actions .btn { border-radius: 10px; }
@media (max-width: 560px) { .jc-grid { grid-template-columns: 1fr; } .jc-head { padding-right: 56px; } }


.sc-away { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: .68rem; font-weight: 600; line-height: 1.5; vertical-align: 1px; cursor: help; }
.sc-away.sick { background: #fee2e2; color: #b91c1c; }
.dlg-checks > span { display: block; margin-bottom: 6px; }
.dlg-chk-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dlg-chk { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .85rem; font-weight: 400; cursor: pointer; }
.dlg-chk:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); }
.dlg-chk input { margin: 0; width: auto; min-height: 0; }
.dlg-chk em { font-style: normal; color: #b45309; font-size: .75rem; }
.dlg-chk.warn { border-color: #fcd34d; }
.dlg-checks small { display: block; margin-top: 6px; }

/* ----- staff: cards, wallchart, holiday balance, profiles, my schedule ----- */
.page-head.slim { align-items: center; margin-bottom: 16px; }
.page-head.slim h1 { font-size: 1.5rem; margin: 0; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.st-card { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; align-items: center; padding: 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px #e7e4de; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.st-card:hover { box-shadow: inset 0 0 0 1px var(--brand), 0 6px 16px rgba(0,0,0,.06); transform: translateY(-1px); }
.st-card.off { opacity: .55; }
.st-av { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .95rem; grid-row: span 2; }
.st-av.big { width: 64px; height: 64px; font-size: 1.3rem; }
.st-info { display: flex; flex-direction: column; min-width: 0; }
.st-info b { font-size: .98rem; } .st-info span { font-size: .8rem; color: #6b7178; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-badge { --lc: #64748b; justify-self: start; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; color: var(--lc); background: color-mix(in srgb, var(--lc) 12%, #fff); }
.st-badge.in { --lc: #16a34a; }
.st-hol { grid-column: 1 / -1; margin-top: 6px; padding-top: 8px; border-top: 1px solid #f1efea; font-size: .8rem; color: #6b7178; }
.st-new { display: grid; place-items: center; min-height: 110px; border: 2px dashed #d9d5cd; box-shadow: none; background: transparent; font: inherit; font-weight: 600; color: var(--brand); cursor: pointer; }
.st-req { border-left: 4px solid #f59e0b; }
.st-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: .75rem; vertical-align: 2px; }
.hb-list { display: grid; gap: 6px; margin-top: 10px; }
.hb-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px #eeece7; background: #fff; }
.hb-row.past { opacity: .6; }
.hb-row > i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.hb-row .btn { min-height: 0; padding: 6px 12px; }
.hb-what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hb-st { padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.hb-st.requested { background: #fef3c7; color: #92400e; } .hb-st.approved { background: #dcfce7; color: #166534; } .hb-st.declined { background: #fee2e2; color: #991b1b; }
.hb-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.hb-tile { padding: 12px; border-radius: 12px; background: #f8f7f4; text-align: center; }
.hb-tile span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #8a8f96; font-weight: 600; }
.hb-tile b { font-size: 1.5rem; }
.hb-tile.left { background: #e7f6ec; color: #166534; } .hb-tile.neg { background: #fee2e2; color: #991b1b; } .hb-tile.wait { background: #fef3c7; color: #92400e; }
@media (max-width: 620px) { .hb-tiles { grid-template-columns: repeat(3, 1fr); } }
.wc-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.wc-bar h2 { margin: 0; }
.wc-wrap { overflow-x: auto; border-radius: 10px; box-shadow: inset 0 0 0 1px #eeece7; }
.wc { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .78rem; }
.wc th, .wc td { padding: 0; border-right: 1px solid #f1efea; border-bottom: 1px solid #f1efea; text-align: center; }
.wc thead th { padding: 6px 0; min-width: 26px; font-weight: 600; color: #475569; background: #fbfaf8; }
.wc thead th span { display: block; font-size: .65rem; color: #94a3b8; }
.wc tbody th { position: sticky; left: 0; z-index: 1; min-width: 130px; padding: 8px 12px; text-align: left; background: #fff; font-weight: 600; white-space: nowrap; }
.wc tbody th a { color: inherit; text-decoration: none; } .wc tbody th a:hover { text-decoration: underline; }
.wc td { height: 34px; cursor: pointer; }
.wc td:hover { background: color-mix(in srgb, var(--brand) 5%, #fff); }
.wc .we { background: #f6f5f2; } .wc .bh { background: repeating-linear-gradient(45deg, #f6f5f2 0 4px, #ece9e3 4px 8px); }
.wc .today { box-shadow: inset 0 0 0 2px var(--brand); }
.wc-a { display: block; height: 22px; margin: 0 1px; border-radius: 5px; background: var(--lc); }
.wc-a.req { background: repeating-linear-gradient(45deg, var(--lc) 0 4px, color-mix(in srgb, var(--lc) 45%, #fff) 4px 8px); }
.wc-a.half { width: 50%; }
.wc-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .8rem; color: #475569; }
.wc-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.wc-key i.req { background: repeating-linear-gradient(45deg, #64748b 0 3px, #cbd5e1 3px 6px); }
.wc-key i.bhk { background: repeating-linear-gradient(45deg, #f6f5f2 0 3px, #d6d2ca 3px 6px); }
.sm-head { display: flex; align-items: center; gap: 16px; }
.sm-head h1 { margin: 0; font-size: 1.5rem; }
.sm-head .st-badge { margin-left: auto; }
.sm-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .sm-cols { grid-template-columns: 1fr; } }
.sm-days { display: flex; flex-wrap: wrap; gap: 6px; }
.sm-perm { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 6px; border-radius: 10px; box-shadow: inset 0 0 0 1px #eeece7; cursor: pointer; font-weight: 400; }
.sm-perm:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.sm-perm input { margin-top: 3px; width: auto; min-height: 0; }
.sm-perm span { display: flex; flex-direction: column; } .sm-perm small { color: #6b7178; }
.ms { display: grid; }
.ms-day { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #f1efea; }
.ms-day.today { background: #f6f9fb; } .ms-day.past { opacity: .6; }
.ms-date { text-align: center; } .ms-date span, .ms-date small { display: block; font-size: .75rem; color: #8a8f96; text-transform: uppercase; } .ms-date b { font-size: 1.5rem; line-height: 1.1; }
.ms-items { display: grid; gap: 8px; align-content: start; }
.ms-job { padding: 12px 14px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e7e4de; border-left: 4px solid var(--tc); }
.ms-job-h { display: flex; align-items: center; gap: 8px; }
.ms-time { margin-left: auto; font-weight: 600; font-size: .88rem; }
.ms-client { margin-top: 6px; font-size: 1.05rem; font-weight: 600; }
.ms-line { margin-top: 3px; font-size: .88rem; }
.ms-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #fffbeb; font-size: .85rem; }
.ms-off { --lc: #64748b; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--lc); background: color-mix(in srgb, var(--lc) 10%, #fff); }

.wc tbody th { text-transform: none; letter-spacing: 0; font-size: .85rem; color: #1f2328; }
.wc .today { box-shadow: none; background: #eaf2f7; }
.wc thead th.today { background: var(--brand); color: #fff; } .wc thead th.today span { color: #cbd5e1; }

/* job pop-up: more compact */
.dlg.jc { width: min(560px, calc(100vw - 32px)); border-radius: 16px; }
.jc-head { padding: 14px 52px 12px 18px; }
.jc-tags { gap: 5px; margin-bottom: 6px; }
.jc-tags > span { padding: 2px 8px; font-size: .7rem; }
.jc-head h3 { font-size: 1.15rem; }
.jc-sub { font-size: .82rem; margin-top: 0; }
.jc-x { top: 10px; right: 10px; width: 30px; height: 30px; }
.jc-when { gap: 8px; padding: 12px 18px 0; }
.jc-chip { gap: 8px; padding: 6px 10px 6px 9px; border-radius: 10px; font-size: .84rem; }
.jc-chip small { font-size: .64rem; }
.jc-grid { gap: 10px; padding: 12px 18px 0; }
.jc-sec { padding: 10px 12px; border-radius: 12px; }
.jc-grid h4 { font-size: .72rem; margin-bottom: 2px; }
.jc-row { padding: 5px 0; font-size: .83rem; }
.jc-notes { margin: 10px 18px 0; padding: 9px 12px; font-size: .83rem; }
.jc-actions { padding: 12px 18px 14px; }
.jc-actions .btn { min-height: 0; padding: 8px 14px; font-size: .88rem; }
/* click the day or time to change it */
.jc-chip.edit { cursor: pointer; transition: box-shadow .12s, background .12s; }
.jc-chip.edit:hover, .jc-chip.edit:focus-visible { background: #fff; box-shadow: inset 0 0 0 1.5px var(--brand); outline: none; }
.jc-pen { font-style: normal; font-size: .75rem; color: #94a3b8; margin-left: 2px; }
.jc-chip.edit:hover .jc-pen { color: var(--brand); }
.jc-chip.editing { flex-basis: 100%; cursor: default; background: #fff; box-shadow: inset 0 0 0 1.5px var(--brand); }
.jc-chip.editing .jc-pen { display: none; }
.jc-chip.editing .jc-v { flex: 1; }
.jc-ed { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 4px; font-weight: 500; }
.jc-ed input { min-height: 0; padding: 5px 8px; font-size: .85rem; width: auto; }
.jc-ed input[type=number] { width: 64px; }
.jc-ed label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; font-size: .82rem; color: #475569; }
.jc-ed-b { display: inline-flex; gap: 6px; margin-left: auto; }
.jc-ed-b .btn { min-height: 0; padding: 5px 12px; }

.hb-tiles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.hb-tile.bank { background: color-mix(in srgb, var(--brand) 8%, #fff); color: var(--brand); }
@media (max-width: 720px) { .hb-tiles.six { grid-template-columns: repeat(3, 1fr); } }

/* holiday tiles: wrap onto another row rather than squash */
.hb-tiles, .hb-tiles.six { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.hb-tile { padding: 10px 6px; min-width: 0; }
.hb-tile span { font-size: .66rem; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-tile b { font-size: 1.35rem; }

/* birthdays */
.sc-bday { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #fce7f3; color: #9d174d; font-size: .68rem; font-weight: 600; line-height: 1.5; vertical-align: 1px; cursor: default; white-space: nowrap; }
.wc td { position: relative; }
.wc-bday { position: absolute; top: 1px; right: 1px; font-size: .7rem; line-height: 1; }
.st-cake { position: absolute; top: 10px; right: 12px; font-size: 1.1rem; }
.ms-bday { padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .9rem; color: #9d174d; background: #fdf2f8; }

/* =====================================================================================================
   GLASS THEME (light): a soft lavender / sky background, frosted see-through bars, menus, panels and
   pop-ups – and solid white working cards (the drawing area especially), so the app stays quick.
   Blur is only used on the few frosted parts; it's switched off for anyone who asks for less see-through.
   ===================================================================================================== */
:root { --bg: #dfe5e9; --glass: rgba(255,255,255,.55); --glass-strong: rgba(255,255,255,.74); --glass-line: rgba(255,255,255,.75);
  --glass-shadow: 0 10px 30px rgba(31,52,70,.10), inset 0 1px 0 rgba(255,255,255,.9); --line: #e3e1dc; --brand: #2f4858; }
/* warm stone and soft slate blue – the colours of the stone itself */
body { background: #dfe5e9; background-image:
  radial-gradient(900px 620px at 8% 0%, #efe6da 0, transparent 62%),
  radial-gradient(760px 560px at 96% 8%, #cddbe4 0, transparent 60%),
  radial-gradient(700px 640px at 70% 100%, #e6dbcd 0, transparent 60%),
  radial-gradient(560px 480px at 0% 100%, #c5d4dd 0, transparent 60%);
  background-attachment: fixed; }
/* with their own app colour picked, the background takes that colour too (the standard blue stays as above) */
html.accented body { background-color: color-mix(in srgb, var(--brand) 14%, #f1f1f0); background-image:
  radial-gradient(900px 620px at 8% 0%, color-mix(in srgb, var(--brand) 8%, #f3ece4) 0, transparent 62%),
  radial-gradient(760px 560px at 96% 8%, color-mix(in srgb, var(--brand) 26%, #fff) 0, transparent 60%),
  radial-gradient(700px 640px at 70% 100%, color-mix(in srgb, var(--brand) 10%, #efe7de) 0, transparent 60%),
  radial-gradient(560px 480px at 0% 100%, color-mix(in srgb, var(--brand) 30%, #fff) 0, transparent 60%); }
/* frosted: the menu bar, the step bar, the side menus and side panels, the drawing tools, pop-ups */
.topbar, .wizard, .set-nav, .sc-side > *, .d-tools, .d-flyout, .bell-panel, .dlg, .bottom-bar:not(.inline), .pl-bar {
  background: var(--glass) !important; -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-line) !important; box-shadow: var(--glass-shadow) !important; }
/* the menu bar: a floating frosted bar with dark text */
.topbar { position: sticky; top: 10px; z-index: 40; margin: 10px 16px 0; border-radius: 18px; color: var(--ink); min-height: 60px; }
.topbar .brand .logos:not(.on-dark) .logo-name { color: var(--ink); }
.logos.on-dark { background: rgba(255,255,255,.8); }
.tb-links { background: rgba(255,255,255,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.tb-links a { color: #2d3c47; opacity: 1; }
.tb-links a:hover { background: rgba(255,255,255,.6); }
.tb-links a.active { background: #fff; color: #13202b; box-shadow: 0 2px 8px rgba(31,52,70,.14); }
.tb-user { border-left-color: rgba(31,52,70,.14); }
.tb-me, .tb-out, .tb-bell { color: #2d3c47; }
.tb-me:hover, .tb-me.active, .tb-out:hover, .tb-bell:hover, .tb-bell[aria-expanded="true"] { background: rgba(255,255,255,.6); }
.tb-av { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 75%, #fff)); color: #fff; }
.tb-count { box-shadow: 0 0 0 2px #fff; }
/* solid white working cards (no blur behind them – quick to draw), softly rounded */
.card { background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 8px 24px rgba(31,52,70,.07); }
.card .card, .sc-card .card { box-shadow: none; }
.sc-side > * { border-radius: 18px !important; }
.set-nav { border-radius: 18px !important; }
.set-nav button.on { background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(31,52,70,.1); }
/* the steps of an estimate: a frosted bar with the current step as a dark pill */
.wizard { padding: 6px; border-radius: 18px; }
.wizard li { border-radius: 13px; }
/* the drawing tools and their options float, frosted, over the solid drawing */
.d-tools, .d-flyout { border-radius: 16px !important; }
.d-tools button.on, .d-tools .on { border-radius: 11px; }
/* pop-ups and the bell's list */
.dlg { border-radius: 18px; background: var(--glass-strong) !important; }
.dlg-wrap { background: rgba(20,32,42,.32); }
.bell-panel { border-radius: 16px; background: var(--glass-strong) !important; }
.dlg.jc { background: rgba(255,255,255,.86) !important; }
.bottom-bar:not(.inline) { margin: 0 12px 10px; border-radius: 18px; left: 0; right: 0; }
/* buttons: softer corners */
.btn { border-radius: 10px; }
/* (less see-through for anyone who asks for it, or browsers without the frosting: plain light panels) */
@media (prefers-reduced-transparency: reduce) {
  .topbar, .wizard, .set-nav, .sc-side > *, .d-tools, .d-flyout, .bell-panel, .dlg, .bottom-bar:not(.inline), .pl-bar { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fbfaf8 !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar, .wizard, .set-nav, .sc-side > *, .d-tools, .d-flyout, .bell-panel, .dlg, .bottom-bar:not(.inline), .pl-bar { background: rgba(251,250,248,.96) !important; }
}
@media (max-width: 820px) { .topbar { margin: 8px 8px 0; top: 8px; } }
/* printing: none of it */
@media print { body { background: #fff !important; } .card { box-shadow: none; border: 0; background: #fff; } }

/* ----- Home: the dashboard ----- */
.hd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hd-head h1 { font-size: 1.7rem; margin: 0 0 2px; letter-spacing: -.01em; }
.hd-quick { display: flex; gap: 8px; }
.hd-quick .btn { text-decoration: none; }
.hd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
@media (max-width: 960px) { .hd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hd-tile { padding: 16px 18px; border-radius: 18px; background: var(--glass, rgba(255,255,255,.6)); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 10px 28px rgba(31,52,70,.09), inset 0 1px 0 rgba(255,255,255,.9); }
.hd-tile-h { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: #52606b; font-weight: 600; }
.hd-tile > b { display: block; margin: 10px 0 2px; font-size: 1.75rem; letter-spacing: -.02em; color: #13202b; }
.hd-sub { font-size: .82rem; color: #6b7882; }
.hd-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 9%, transparent); color: var(--brand); flex: none; }
.hd-ch { display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.hd-ch.up { background: #dcfce7; color: #166534; } .hd-ch.down { background: #fee2e2; color: #991b1b; } .hd-ch.flat { background: color-mix(in srgb, var(--brand) 8%, transparent); color: #475569; }
.hd-meter { height: 6px; margin-top: 10px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 10%, transparent); overflow: hidden; }
.hd-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 75%, #fff)); }
.hd-row { display: grid; gap: 16px; margin-bottom: 16px; }
.hd-row-a { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.hd-row-b { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .hd-row-a, .hd-row-b { grid-template-columns: 1fr; } }
.hd-row .card { margin-bottom: 0; }
.hd-card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hd-card-h h2 { margin: 0; font-size: 1.05rem; }
.hd-more { margin-left: auto; font-size: .84rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.hd-more:hover { text-decoration: underline; }
.hd-key { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: #475569; font-weight: 600; }
.hd-key i { width: 10px; height: 10px; border-radius: 3px; }
.hd-chart { width: 100%; height: auto; display: block; }
.hd-ax { font-size: 11px; fill: #8a94a0; font-family: inherit; }
.hd-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: .75rem; font-weight: 700; }
.hd-list { display: grid; gap: 8px; }
.hd-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f8f7f4; color: inherit; text-decoration: none; font-size: .9rem; transition: background .15s; }
.hd-item:hover { background: #eef3f6; }
.hd-item.w-holiday .hd-ic { background: #dcfce7; color: #166534; } .hd-item.w-expiring .hd-ic { background: #fef3c7; color: #92400e; } .hd-item.w-book .hd-ic { background: #dbeafe; color: #1d4ed8; }
.hd-go { margin-left: auto; color: #94a3b8; font-size: 1.2rem; }
.hd-empty { display: grid; justify-items: center; gap: 4px; padding: 26px 10px; text-align: center; color: #16a34a; }
.hd-empty b { color: #13202b; }
.hd-bar { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 10px; padding: 7px 0; font-size: .86rem; }
.hd-bar > div { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 8%, transparent); overflow: hidden; }
.hd-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 75%, #fff), var(--brand)); min-width: 3px; }
.hd-bar b { text-align: right; }
.hd-day { padding: 6px 0; border-top: 1px solid #f1efea; }
.hd-day:first-of-type { border-top: 0; }
.hd-day > b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7882; margin-bottom: 4px; }
.hd-bk { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 4px; border-radius: 10px; background: #f8f7f4; border-left: 3px solid var(--tc); font-size: .86rem; }
.hd-bk-t { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.hd-bk-t small { font-weight: 400; color: #6b7882; font-size: .76rem; }
.hd-off { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: .88rem; }
.hd-off small { display: block; color: #6b7882; font-size: .78rem; }
.hd-acts { display: grid; }
.hd-act { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid #f1efea; color: inherit; text-decoration: none; font-size: .88rem; }
.hd-act:first-child { border-top: 0; }
.hd-act:hover { background: #faf9f6; }
.hd-act small { display: block; color: #6b7882; font-size: .78rem; }
.hd-dot { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 75%, #fff); }

/* round corners: a small dot (a big area round it to click), the curve you'd get shown on hover, R size on rounded ones */
.d-cg .d-cprev { opacity: 0; transition: opacity .12s; }
.d-cg:hover .d-cprev { opacity: 1; }
.d-cg:hover .d-cdot { stroke-width: 2.5; }
.d-clbl { fill: #c2410c; font-weight: 700; stroke: #fff; stroke-width: 4.5px; stroke-linejoin: round; paint-order: stroke; vector-effect: non-scaling-stroke; }

/* things that stay put while you scroll stop just below the floating menu bar (not under it) */
:root { --below-bar: 88px; }
@media (max-width: 820px) { :root { --below-bar: 128px; } }
.set-nav, .pe-pal, .pe-insp, .ql-preview { top: var(--below-bar) !important; }
.ql-preview { max-height: calc(100vh - var(--below-bar) - 16px); }
.set-nav { max-height: calc(100vh - var(--below-bar) - 16px); overflow-y: auto; }
/* (the PDF layout editor in full screen has no menu bar above it) */
.pe-full .pe-pal, .pe-full .pe-insp { top: 0 !important; }

/* back links (to Staff, Estimates, Jobs…): a small frosted pill with a chevron, not underlined text */
a.back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--brand); text-decoration: none;
  background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 4px 12px rgba(31,52,70,.08); transition: background .15s, transform .15s; }
a.back::before { content: ""; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 3px; }
a.back:hover { background: #fff; transform: translateX(-2px); }
.page-head a.back { margin-bottom: 8px; }

/* staff: the side bar's count of requests waiting, and the days-left figure in a profile's header */
.set-nav .sm-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #f59e0b; color: #fff; font-style: normal; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; }
.sm-mini { margin-left: auto; font-size: .85rem; color: #52606b; text-align: right; }
.sm-mini b { display: block; font-size: 1.3rem; color: #166534; }
.sm-head .st-badge { margin-left: 0; }
.st-grid[data-stsec] { margin-bottom: 0; }

/* Settings → Roles & access */
.ra-table { width: 100%; border-collapse: collapse; }
.ra-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7882; font-weight: 600; text-align: center; padding: 8px 6px; border-bottom: 1px solid #eeece7; cursor: help; }
.ra-table th:first-child { text-align: left; cursor: default; }
.ra-table td { text-align: center; padding: 8px 6px; border-bottom: 1px solid #f3f1ec; }
.ra-table td:first-child { text-align: left; }
.ra-table td small { display: block; color: #6b7882; font-size: .76rem; }
.ra-name { width: 100%; max-width: 200px; font-weight: 600; }
.ra-admin { background: #f8f7f4; }
.ra-tick { display: inline-grid; place-items: center; cursor: pointer; }
.ra-tick input { position: absolute; opacity: 0; pointer-events: none; }
.ra-tick span { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #c9cdd2; background: #fff; display: grid; place-items: center; transition: background .12s, border-color .12s; }
.ra-tick input:checked + span { background: var(--brand); border-color: var(--brand); }
.ra-tick input:checked + span::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.ra-tick input:disabled + span { opacity: .55; cursor: default; }
.ra-tick input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.ra-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.ra-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #f8f7f4; }
.ra-person.off { opacity: .55; }
.ra-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ra-who small { color: #6b7882; font-size: .76rem; }
.ra-person select { width: auto; min-width: 130px; }
.ra-tick { position: relative; }

/* the Schedule uses the whole width of the window, so the calendar is as big as it can be */
main:has(.sc-layout) { max-width: none; padding-left: 20px; padding-right: 20px; }
@media (min-width: 1600px) { main:has(.sc-layout) .sc-layout { grid-template-columns: 250px minmax(0, 1fr); } }

/* avatars: a built face, a photo, or initials – always a circle */
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; color: #fff; font-weight: 700; letter-spacing: .02em; background: #e5e7eb; }
.av img, .av svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.tb-me .av.tb-av { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.st-card > .av { grid-row: span 2; }
/* My account: make your own picture */
.acct-av { grid-column: 1 / -1; }
.avm { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
@media (max-width: 700px) { .avm { grid-template-columns: 1fr; } }
.avm-prev { display: grid; justify-items: center; gap: 12px; }
.avm-prev > .av { box-shadow: 0 8px 22px rgba(31,52,70,.16); }
.avm-modes { display: grid; gap: 4px; width: 100%; }
.avm-modes button { min-height: 0; padding: 7px 10px; border-radius: 10px; border: 1px solid #e3e0da; background: #fff; font: inherit; font-size: .85rem; cursor: pointer; }
.avm-modes button.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.avm-opts { display: grid; gap: 12px; }
.avm-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.avm-row > span { width: 92px; font-size: .84rem; color: #52606b; font-weight: 600; }
.avm-sw { display: flex; flex-wrap: wrap; gap: 6px; }
.avm-sw button { width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d6d3cc; cursor: pointer; }
.avm-sw button.on { box-shadow: 0 0 0 2.5px var(--brand); }
.avm-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.avm-seg button { min-height: 0; padding: 5px 11px; border-radius: 999px; border: 1px solid #e3e0da; background: #fff; font: inherit; font-size: .82rem; cursor: pointer; }
.avm-seg button.on { background: color-mix(in srgb, var(--brand) 8%, #fff); border-color: var(--brand); font-weight: 600; }

/* My account in the side-bar layout: sections take the full width */
.acct-layout .set-body > section { margin-bottom: 0; }
.acct-layout .acct-av { grid-column: auto; }

/* the picture maker: a switch along the top, a stage with the preview, the options in groups */
.avm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.avm-head h2 { margin: 0 0 2px; }
.avm-head p { margin: 0; }
.avm-switch { display: flex; padding: 4px; border-radius: 12px; background: #f1efea; }
.avm-switch button { min-height: 0; padding: 7px 16px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: .88rem; color: #475569; cursor: pointer; }
.avm-switch button.on { background: #fff; color: #13202b; font-weight: 600; box-shadow: 0 2px 6px rgba(31,52,70,.12); }
.avm { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .avm { grid-template-columns: 1fr; } }
.avm-stage { display: grid; justify-items: center; gap: 4px; padding: 22px 16px 16px; border-radius: 18px; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f3f1ec 70%); box-shadow: inset 0 0 0 1px #ebe8e2; position: sticky; top: var(--below-bar, 88px); }
.avm-pic { margin-bottom: 10px; }
.avm-pic .av { box-shadow: 0 14px 30px rgba(31,52,70,.22), 0 0 0 5px #fff; }
.avm-name { font-size: 1.05rem; }
.avm-shuffle, .avm-save { width: 100%; margin-top: 8px; }
.avm-shuffle { margin-top: 14px; }
.avm-empty { background: #e7e5e0; color: #6b7882; font-size: .8rem; font-weight: 600; display: inline-grid; place-items: center; text-align: center; }
.avm-opts { display: grid; gap: 12px; }
.avm-group { padding: 12px 14px; border-radius: 14px; background: #faf9f6; box-shadow: inset 0 0 0 1px #efede8; }
.avm-gh { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: #6b7882; font-weight: 700; margin-bottom: 8px; }
.avm-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 960px) { .avm-2 { grid-template-columns: 1fr; } }
.avm-hairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.avm-hairs button { display: grid; justify-items: center; gap: 4px; min-height: 0; padding: 8px 4px 6px; border-radius: 12px; border: 1.5px solid transparent; background: #fff; font: inherit; font-size: .76rem; color: #475569; cursor: pointer; box-shadow: 0 1px 3px rgba(31,52,70,.08); transition: transform .12s, border-color .12s; }
.avm-hairs button:hover { transform: translateY(-1px); }
.avm-hairs button.on { border-color: var(--brand); color: #13202b; font-weight: 600; }
.avm-sw button { width: 30px; height: 30px; }
.avm-extras { display: flex; gap: 8px; flex-wrap: wrap; }
.avm-tog { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #e3e0da; cursor: pointer; font-size: .86rem; font-weight: 500; margin: 0; }
.avm-tog input { width: auto; min-height: 0; margin: 0; accent-color: var(--brand); }
.avm-tog:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); font-weight: 600; }
.avm-drop { align-content: start; }
.avm-dropbox { display: grid; justify-items: start; gap: 8px; padding: 22px; border-radius: 16px; border: 2px dashed #d9d5cd; background: #fbfaf8; }
.perm-hidden { display: none !important; }

/* the detailed roles grid: permissions down the side, roles across the top */
.ra-wrap { overflow-x: auto; }
.ra-grid { min-width: 640px; }
.ra-grid th.ra-perm-h { text-align: left; vertical-align: bottom; min-width: 240px; }
.ra-grid th.ra-role { vertical-align: bottom; min-width: 110px; position: relative; text-transform: none; letter-spacing: 0; cursor: default; }
.ra-grid th.ra-role .ra-name { width: 100%; max-width: 130px; min-height: 0; padding: 6px 8px; font-size: .86rem; text-align: center; }
.ra-grid th.ra-role small { display: block; margin-top: 4px; font-weight: 400; color: #8a94a0; font-size: .72rem; }
.ra-grid th.ra-admin-h { color: #13202b; font-size: .9rem; }
.ra-grid .ra-del { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; min-height: 0; padding: 0; font-size: .7rem; opacity: 0; transition: opacity .12s; }
.ra-grid th.ra-role:hover .ra-del { opacity: 1; }
.ra-grid .ra-group td { padding: 14px 8px 6px; text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--brand); background: transparent; border-bottom: 1px solid #e7e5e0; }
.ra-grid td.ra-perm { text-align: left; }
.ra-grid td.ra-perm b { font-size: .88rem; font-weight: 600; }
.ra-grid td.ra-perm small { display: block; color: #6b7882; font-size: .76rem; }
.ra-grid td.ra-admin-c, .ra-grid th.ra-admin-h { background: #f8f7f4; }
.ra-grid tbody tr:not(.ra-group):hover td { background: #fbfaf7; }
.sm-pgroup { margin-bottom: 8px; }
.sm-pgroup > b { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin: 10px 0 6px; }

/* the job diary, calmer: a one-line composer until you start writing, and automatic updates folded up */
.dz.dz-closed .dz-kinds, .dz.dz-closed .dz-bar { display: none; }
.dz.dz-closed textarea { min-height: 0; height: 46px; resize: none; padding-top: 12px; }
.dz.dz-closed .dz-box { cursor: text; }
.dl-fold { list-style: none; margin: 2px 0; }
.dl-fold details > summary { display: flex; align-items: center; gap: 10px; padding: 6px 4px; list-style: none; cursor: pointer; color: #6b7882; font-size: .86rem; border-radius: 8px; }
.dl-fold details > summary::-webkit-details-marker { display: none; }
.dl-fold details > summary:hover { background: #f6f5f2; }
.dl-fold summary b { color: #475569; font-weight: 600; }
.dl-fold-last { color: #8a94a0; }
.dl-fold summary > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-fold-tog { flex: none; font-size: .78rem; font-weight: 600; color: var(--brand); padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 7%, #fff); }
.dl-fold details[open] .dl-fold-tog { font-size: 0; } .dl-fold details[open] .dl-fold-tog::after { content: "Hide"; font-size: .78rem; }
.dl-fold details[open] .dl-fold-last { display: none; }
.dl-inner { margin: 2px 0 6px 10px; padding-left: 10px; border-left: 2px solid #eeece7; }

/* the stage checklist on a job */
.sg-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.sg-head small { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #6b7882; font-weight: 700; }
.sg-head h2 { margin: 0; }
.sg-prog { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.sg-prog span { width: 140px; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 10%, transparent); overflow: hidden; }
.sg-prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #16a34a, #22c55e); }
.sg-ok { color: #166534; font-weight: 700; }
.sg-list { display: grid; gap: 8px; }
.sg-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e7e4de; cursor: pointer; margin: 0; font-weight: 400; transition: box-shadow .12s, background .12s; }
.sg-item:hover:not(.ro) { box-shadow: inset 0 0 0 1.5px var(--brand); }
.sg-item.ro { cursor: default; }
.sg-item input { position: absolute; opacity: 0; pointer-events: none; }
.sg-box { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid #c9cdd2; background: #fff; display: grid; place-items: center; }
.sg-item.done { background: #f0fdf4; box-shadow: inset 0 0 0 1px #bbf7d0; }
.sg-item.done .sg-box { background: #16a34a; border-color: #16a34a; }
.sg-item.done .sg-box::after { content: ""; width: 10px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.sg-item input:focus-visible + .sg-box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.sg-txt { display: flex; flex-direction: column; }
.sg-txt b { font-size: .92rem; font-weight: 600; }
.sg-txt small { color: #6b7882; font-size: .78rem; }
.sg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eeece7; }
.sg-foot .btn[disabled] { opacity: .45; cursor: not-allowed; }
.sg-more { display: flex; gap: 16px; margin-top: 8px; }
.linkish { min-height: 0; padding: 0; border: 0; background: none; font: inherit; font-size: .82rem; color: var(--brand); text-decoration: underline; cursor: pointer; }
.sg-earlier { margin-top: 14px; }
.sg-earlier summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: #475569; }
.sg-old { margin-top: 10px; display: grid; gap: 6px; }
.sg-old > b { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7882; }
.hd-wait { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: -2px 0 4px 120px; font-size: .74rem; color: #b45309; }

/* ----- the job window ----- */
.jw-wrap { padding: 20px; }
.jw { width: min(1180px, 100%); height: min(820px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #fbfaf8; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(15,23,42,.3); animation: jcIn .18s ease-out; }
.jw-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px 12px 22px; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 85%, #fff)); color: #fff; }
.jw-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jw-title h2 { margin: 0; font-size: 1.25rem; color: #fff; }
.jw-num { padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: .8rem; font-weight: 700; }
.jw-stage { padding: 3px 10px; border-radius: 999px; background: #fff; color: var(--brand); font-size: .78rem; font-weight: 700; }
.jw-wait { padding: 3px 10px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: .76rem; font-weight: 600; }
.jw-x { display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.jw-x:hover { background: rgba(255,255,255,.26); }
.jw-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 14px; background: #fff; border-bottom: 1px solid #eeece7; }
.jw-tools button:not(.btn) { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 0; padding: 6px 10px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: .74rem; font-weight: 600; color: #475569; cursor: pointer; }
.jw-tools button:not(.btn):hover { background: color-mix(in srgb, var(--brand) 5%, #fff); color: #13202b; }
.jw-ti { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 7%, #fff); color: var(--brand); }
.jw-ti svg { width: 17px; height: 17px; }
.jw-tools .btn { min-height: 0; padding: 8px 14px; font-size: .85rem; }
.jw-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
@media (max-width: 860px) { .jw-body { grid-template-columns: 1fr; overflow-y: auto; } .jw-left, .jw-right { overflow: visible !important; } }
.jw-left { overflow-y: auto; padding: 14px 18px 18px; border-right: 1px solid #eeece7; }
.jw-right { display: flex; flex-direction: column; min-height: 0; background: #fff; }
.jw-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 12px; background: #f1efea; }
.jw-tabs button { flex: 1; min-height: 0; padding: 7px 10px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: .85rem; color: #475569; cursor: pointer; }
.jw-tabs button.on { background: #fff; color: #13202b; font-weight: 600; box-shadow: 0 2px 6px rgba(31,52,70,.1); }
.jw-sec { padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px #eeece7; }
.jw-sec h4 { margin: 0 0 6px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.jw-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f3f1ec; font-size: .88rem; }
.jw-row:last-child { border-bottom: 0; }
.jw-row span { color: #6b7882; flex: none; }
.jw-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.jw-row a { color: var(--brand); text-decoration: none; }
.jw-notes p { margin: 0; white-space: pre-wrap; font-size: .88rem; }
.jw-left .sg { padding: 0; }
.jw-left .sg-head h2 { font-size: 1.05rem; }
.jw-bk { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #eeece7; }
.jw-bk.here { box-shadow: inset 0 0 0 1.5px var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.jw-bk > div { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .88rem; }
.jw-bk small { color: #6b7882; }
.jw-bk .btn { min-height: 0; padding: 5px 12px; }
.jw-compose { padding: 12px 14px; border-bottom: 1px solid #eeece7; background: #fbfaf8; }
.jw-kind { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.jw-kind button { min-height: 0; padding: 4px 11px; border-radius: 999px; border: 1px solid #e3e0da; background: #fff; font: inherit; font-size: .78rem; cursor: pointer; color: #475569; }
.jw-kind button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.jw-compose textarea { width: 100%; min-height: 0; resize: vertical; border-radius: 12px; }
.jw-cbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.jw-cbar .muted { margin-right: auto; }
.jw-cbar .btn { min-height: 0; padding: 7px 18px; }
.jw-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 16px 16px; }
.jw-feed .dl-del { display: none; }

/* the job window, in the glass design */
.jw-wrap { background: rgba(20,32,42,.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.jw { background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(255,255,255,.8); box-shadow: 0 30px 80px rgba(15,23,42,.25), inset 0 1px 0 rgba(255,255,255,.9); }
.jw-top { background: rgba(255,255,255,.55); color: #13202b; border-bottom: 1px solid rgba(255,255,255,.7); }
.jw-title h2 { color: #13202b; }
.jw-num { background: var(--brand); color: #fff; }
.jw-stage { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent); }
.jw-wait { background: rgba(254,243,199,.85); box-shadow: inset 0 0 0 1px rgba(245,158,11,.35); }
.jw-x { background: rgba(255,255,255,.7); color: #475569; box-shadow: 0 1px 3px rgba(31,52,70,.12); }
.jw-x:hover { background: #fff; color: #13202b; }
.jw-tools { background: rgba(255,255,255,.35); border-bottom: 1px solid rgba(255,255,255,.7); }
.jw-tools button:not(.btn):hover { background: rgba(255,255,255,.75); }
.jw-ti { background: rgba(255,255,255,.75); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 1px 3px rgba(31,52,70,.08); }
.jw-tools .btn.secondary { background: rgba(255,255,255,.75); }
.jw-left { background: transparent; border-right: 1px solid rgba(255,255,255,.7); }
.jw-tabs { background: rgba(255,255,255,.45); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.jw-sec, .jw-bk { background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 2px 8px rgba(31,52,70,.05); }
.jw-left .sg-item { background: rgba(255,255,255,.78); }
.jw-right { background: rgba(255,255,255,.82); }
.jw-compose { background: rgba(255,255,255,.4); border-bottom: 1px solid rgba(238,236,231,.8); }
.jw-kind button { background: rgba(255,255,255,.8); }

/* ----- purchase orders ----- */
.dash-po { margin-left: auto; min-height: 0; padding: 7px 14px; font-size: .86rem; text-decoration: none; }
.po-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.po-filters button { min-height: 0; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.6); font: inherit; font-size: .85rem; cursor: pointer; color: #475569; }
.po-filters button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.po-filters i { font-style: normal; opacity: .7; margin-left: 2px; }
.po-list { padding: 6px; }
.po-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 120px 110px 110px; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: inherit; text-decoration: none; }
.po-row + .po-row { border-top: 1px solid #f1efea; }
.po-row:hover { background: #f8f7f4; }
.po-no { font-weight: 700; color: var(--brand); }
.po-who { display: flex; flex-direction: column; min-width: 0; } .po-who small { color: #6b7882; }
.po-amt { text-align: right; }
@media (max-width: 720px) { .po-row { grid-template-columns: 80px 1fr auto; } .po-when, .po-amt { display: none; } }
.po-st { justify-self: end; display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; vertical-align: middle; }
h1 .po-st { font-size: .8rem; margin-left: 6px; }
.po-st.s-draft { background: #f1f5f9; color: #475569; } .po-st.s-sent { background: #dbeafe; color: #1d4ed8; } .po-st.s-confirmed { background: #ede9fe; color: #6d28d9; }
.po-st.s-received { background: #dcfce7; color: #166534; } .po-st.s-cancelled { background: #fee2e2; color: #991b1b; }
.po-steps { display: flex; align-items: center; gap: 0; margin: 4px 0 16px; }
.po-steps span { padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: #8a94a0; background: rgba(255,255,255,.55); }
.po-steps span.done { color: #166534; background: #dcfce7; } .po-steps span.now { color: #fff; background: var(--brand); }
.po-steps i { width: 26px; height: 2px; background: #d6d3cc; }
.po-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .po-grid { grid-template-columns: 1fr; } }
.po-lines { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.po-lines th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7882; text-align: left; padding: 6px; }
.po-lines td { padding: 4px; } .po-lines td:first-child { width: 48%; }
.po-lines input { width: 100%; min-height: 0; padding: 7px 9px; }
.po-lines .unit-in input { width: 80px; }
.po-lt { text-align: right; font-weight: 600; white-space: nowrap; }
.po-tot { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; justify-content: end; margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: #f8f7f4; text-align: right; }
.po-tot span { color: #6b7882; } .po-tot b.big { font-size: 1.2rem; }
.po-dest { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.po-opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px #e3e0da; background: #fff; font-size: .86rem; cursor: pointer; margin: 0; font-weight: 400; }
.po-opt:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); font-weight: 600; }
.po-opt input { width: auto; min-height: 0; margin: 0; accent-color: var(--brand); }
.po-addr { margin: 8px 0 0; font-size: .9rem; line-height: 1.5; }
.po-moves { display: flex; gap: 8px; flex-wrap: wrap; }
.po-hist { margin: 12px 0 0; padding-left: 18px; font-size: .82rem; color: #52606b; }
/* the printed order: hidden on screen, the only thing printed */
.po-print { display: none; }
@media print {
  body:has(.po-print) main > :not(.po-print) { display: none !important; }
  body:has(.po-print) .po-print { display: block !important; }
}
/* the purchase order document (printed, and previewed in Settings → PDF layouts) */
  .po-doc { font-family: Arial, sans-serif; color: #1f2328; font-size: 11pt; }
  .po-dh { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--brand); }
  .po-logo { height: 60px; } .po-biz { font-size: 16pt; } .po-dh p { margin: 6px 0 0; font-size: 9pt; color: #555; }
  .po-dt h1 { margin: 0 0 6px; font-size: 18pt; color: var(--brand); text-align: right; } .po-dt table { font-size: 9.5pt; margin-left: auto; } .po-dt td { padding: 1px 0 1px 12px; text-align: right; }
  .po-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 16px 0; } .po-two small, .po-dnotes small { display: block; font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; color: #777; } .po-two p { margin: 4px 0 0; }
  .po-dl { width: 100%; border-collapse: collapse; } .po-dl th { background: #f1f1ee; text-align: left; padding: 7px; font-size: 9pt; } .po-dl td { padding: 7px; border-bottom: 1px solid #e5e5e5; }
  .po-dl th:not(:first-child), .po-dl td:not(:first-child) { text-align: right; }
  .po-dtot { display: grid; grid-template-columns: auto 100px; gap: 3px 16px; justify-content: end; margin-top: 10px; text-align: right; }
  .po-dnotes { margin-top: 16px; } .po-dfoot { margin-top: 26px; font-size: 9pt; color: #555; }
.po-sheet { max-width: 794px; margin: 0 auto; background: #fff; border-radius: 6px; box-shadow: 0 10px 30px rgba(31,52,70,.16), 0 0 0 1px rgba(0,0,0,.04); padding: 46px 52px; min-height: 900px; }
.po-sheet .po-doc { font-size: 10.5pt; }
@media (max-width: 700px) { .po-sheet { padding: 22px 18px; min-height: 0; } .po-sheet .po-dh, .po-sheet .po-two { display: block; } .po-sheet .po-dt h1 { text-align: left; margin-top: 12px; } .po-sheet .po-dt table { margin-left: 0; } }

.po-lines td:nth-child(2) input { width: 64px; text-align: right; }
.po-lines td:nth-child(3) input { width: 74px; }
.po-lines td:nth-child(2), .po-lines td:nth-child(3) { width: 1%; }
.po-lines td:first-child { width: auto; min-width: 200px; }

/* ===== Settings: a tile for each area, and each area's side bar ===== */
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sh-tile { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.85); box-shadow: 0 4px 18px rgba(31,52,70,.07);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .15s, box-shadow .15s, background .15s; }
.sh-tile:hover { transform: translateY(-2px); background: rgba(255,255,255,.9); box-shadow: 0 10px 28px rgba(31,52,70,.12); }
.sh-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--brand);
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 8%, #fff), color-mix(in srgb, var(--brand) 15%, #fff)); box-shadow: inset 0 1px 0 #fff; }
.sh-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sh-txt b { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.sh-txt > span { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.sh-go { flex: none; color: var(--muted); font-size: 1.4rem; line-height: 1; align-self: center; transition: transform .15s; }
.sh-tile:hover .sh-go { transform: translateX(3px); color: var(--brand); }
.sh-count { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; }
.set-nav .sn-back { display: block; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--brand); text-decoration: none; font-size: .86rem; font-weight: 600; }
.set-nav .sn-back:hover { text-decoration: underline; }
.set-nav .sn-label { padding: 10px 12px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.set-nav .sn-other { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .86rem; }
.set-nav .sn-other svg { flex: none; }
.set-nav .sn-other:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.set-nav .sn-label + .sn-other { margin-top: 0; }
/* the pricing tool's tabs are in the side bar now */
.set-layout .pt-tabs { display: none; }
@media (max-width: 760px) {
  .set-nav .sn-back { border-bottom: 0; border-right: 1px solid var(--line); margin: 0 4px 0 0; white-space: nowrap; align-self: center; }
  .set-nav .sn-label, .set-nav .sn-other { display: none; }
}

/* ===== 3D preview (Review page) ===== */
.k3d-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.k3d-head h2 { margin: 0; }
.k3d { position: relative; height: 460px; border-radius: 14px; overflow: hidden; background: #f4f2ee; border: 1px solid var(--line); touch-action: none; }
.k3d canvas { display: block; cursor: grab; }
.k3d canvas:active { cursor: grabbing; }
.k3d-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .92rem; padding: 20px; text-align: center; }
.k3d-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.k3d-tools button { border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: 0 2px 8px rgba(31,52,70,.1); }
.k3d-tools button:hover { background: #fff; }
.k3d-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(31,35,40,.62); color: #fff; font-size: .78rem; padding: 6px 12px; border-radius: 999px; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.k3d-hint.gone { opacity: 0; }
.k3d.k3d-full { position: fixed; inset: 12px; height: auto; z-index: 1000; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
body.k3d-open { overflow: hidden; }
@media (max-width: 640px) { .k3d { height: 340px; } .k3d-hint { display: none; } }

/* ===== Stone photos (Settings → Stockists) ===== */
.mm-namecell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mm-namecell .mm-name { flex: 1; min-width: 0; }
.mm-photo { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1.5px dashed #c9c3b9; background: #faf9f6 center / cover no-repeat; color: #9a948a; display: grid; place-items: center; cursor: pointer; padding: 0; }
.mm-photo:hover { border-color: var(--brand); color: var(--brand); }
.mm-photo.has { border: 1px solid rgba(0,0,0,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.mm-photo-big { width: 100%; height: 220px; border-radius: 10px; background: #eee center / cover no-repeat; margin-bottom: 4px; }
@media (max-width: 760px) {
  .mm-grid > .mm-namecell { grid-column: 1 / 4; grid-row: 1; }
}

/* ===== Avatar maker: tabs, and picture cards for each choice ===== */
.avm-opts { align-content: start; min-width: 0; }
.avm-tabs { display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: #f1efea; overflow-x: auto; scrollbar-width: none; }
.avm-tabs button { flex: 1 0 auto; min-height: 0; padding: 8px 14px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: .86rem; color: #475569; cursor: pointer; white-space: nowrap; }
.avm-tabs button:hover { color: #13202b; }
.avm-tabs button.on { background: #fff; color: #13202b; font-weight: 600; box-shadow: 0 2px 6px rgba(31,52,70,.12); }
.avm-panel { display: grid; gap: 12px; }
.avm-gh { display: flex; align-items: baseline; gap: 8px; }
.avm-gh span { text-transform: none; letter-spacing: 0; font-weight: 500; color: #8a949c; }
.avm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.avm-cards button { position: relative; display: grid; justify-items: center; gap: 5px; min-height: 0; padding: 8px 4px 7px; border-radius: 12px; border: 1.5px solid transparent; background: #fff; font: inherit; font-size: .74rem; line-height: 1.2; color: #475569; cursor: pointer; box-shadow: 0 1px 3px rgba(31,52,70,.08); transition: transform .12s, border-color .12s, box-shadow .12s; text-align: center; }
.avm-cards button:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(31,52,70,.12); }
.avm-cards button.on { border-color: var(--brand); color: #13202b; font-weight: 600; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); }
.avm-thumb { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: block; background: #f1efea; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.avm-cards.face .avm-thumb, .avm-cards .avm-thumb:has(svg[viewBox^="29"]) { border-radius: 14px; }
.avm-thumb svg { display: block; }
.avm-tick { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: #e7e5e0; color: transparent; font-style: normal; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.avm-cards button.on .avm-tick { background: var(--brand); color: #fff; }
.avm-sw button { position: relative; }
.avm-sw button.on::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: rgba(255,255,255,.85); }
@media (max-width: 640px) { .avm-cards { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); } .avm-thumb { width: 48px; height: 48px; } }
/* the avatar builder fits on one screen (no scrolling): a slim preview, the option groups in a two-column grid, small tiles and colour dots */
main:has(.acct-av:not(.hidden)) { padding-bottom: 16px; }   /* (no big gap under it, which would make the page scroll on its own) */
.acct-av .avm-head { margin-bottom: 10px; }
.acct-av .avm-head > div:first-child { flex: 1 1 260px; min-width: 0; }   /* (the description wraps before the Avatar / Photo / Initials switch drops a line) */
.acct-av .avm { grid-template-columns: 172px minmax(0, 1fr); gap: 14px; }
.acct-av .avm-stage { padding: 14px 10px 10px; }
.acct-av .avm-pic { margin-bottom: 4px; }
.acct-av .avm-pic .av { width: 124px !important; height: 124px !important; }
.acct-av .avm-shuffle { margin-top: 10px; }
.acct-av .avm-opts { gap: 8px; }
.acct-av .avm-tabs button { padding: 6px 8px; font-size: .82rem; flex: 1 1 auto; }
.avm-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-content: start; }
.avm-panel > .avm-group { padding: 6px 8px 8px; border-radius: 12px; min-width: 0; }
.avm-panel > .avm-group.wide { grid-column: 1 / -1; }
.avm-panel .avm-gh { font-size: .64rem; margin-bottom: 4px; }
.avm-panel .avm-cards { display: flex; flex-wrap: wrap; gap: 4px; }
.avm-panel .avm-cards button { width: 54px; padding: 4px 1px 3px; gap: 2px; font-size: .62rem; border-radius: 9px; }
.avm-panel .avm-thumb { width: 38px; height: 38px; }
.avm-panel .avm-cards.face .avm-thumb { border-radius: 10px; }
.avm-panel .avm-tick { top: 2px; right: 2px; width: 13px; height: 13px; font-size: .5rem; }
.avm-panel .avm-sw { gap: 4px; }
.avm-panel .avm-sw button { width: 21px; height: 21px; }
.avm-panel .avm-sw button.on::after { inset: 6px; }
.avm-sub { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: #6b7882; font-weight: 700; margin: 6px 0 4px; }
.avm-hatrow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; }   /* (hat colours sit beside the hats, not under them) */
.avm-hatcol { flex: 1 1 140px; min-width: 0; }
.avm-hatcol .avm-sub { margin-top: 0; }
/* a narrower screen: the preview becomes a slim bar across the top, so the choices get the full width */
@media (max-width: 1180px) and (min-width: 761px) {
  .acct-av .avm { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .acct-av .avm-stage { display: flex; align-items: center; gap: 12px; padding: 8px 12px; text-align: left; }
  .acct-av .avm-pic { margin: 0; }
  .acct-av .avm-pic .av { width: 64px !important; height: 64px !important; box-shadow: 0 6px 14px rgba(31,52,70,.18), 0 0 0 3px #fff; }
  .acct-av .avm-stage > .muted { display: none; }
  .acct-av .avm-name { margin-right: auto; }
  .acct-av .avm-shuffle, .acct-av .avm-save { width: auto; margin: 0; }
  .acct-av .avm-head > div:first-child { flex-basis: 180px; }
  .avm-panel > .avm-group { padding: 5px 6px 6px; }
  .avm-panel .avm-cards { gap: 3px; }
  .avm-panel .avm-cards button { width: 49px; font-size: .58rem; letter-spacing: -.01em; }
  .avm-panel .avm-thumb { width: 34px; height: 34px; }
  .avm-panel .avm-sw { gap: 3px; }
  .avm-panel .avm-sw button { width: 19px; height: 19px; }
  .avm-panel .avm-sw button.on::after { inset: 5px; }
}
/* ===== Partners: a list of cards, each opening a pop-up ===== */
.pa-bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.pa-bar input { max-width: 340px; }
.pa-list { display: grid; gap: 10px; }
.pa-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid rgba(255,255,255,.85); border-radius: 16px; background: rgba(255,255,255,.75); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 3px 14px rgba(31,52,70,.07); font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; }
.pa-card:hover { transform: translateY(-1px); background: rgba(255,255,255,.92); box-shadow: 0 8px 22px rgba(31,52,70,.12); }
.pa-card.off { opacity: .7; }
.pa-logo { flex: none; width: 48px; height: 48px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e7e4de; display: grid; place-items: center; overflow: hidden; }
.pa-logo img { max-width: 86%; max-height: 86%; object-fit: contain; }
.pa-ini { background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 85%, #fff), var(--brand)); color: #fff; font-weight: 700; font-size: .95rem; box-shadow: none; }
.pa-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pa-main b { font-size: 1rem; }
.pa-main > span { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pa-chip { padding: 3px 9px; border-radius: 999px; background: #f1efea; color: #52606b; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pa-chip.disc { background: #dcfce7; color: #166534; }
.pa-chip.up { background: #fef3c7; color: #92400e; }
.pa-chip.offc { background: #fee2e2; color: #991b1b; }
.pa-go { color: var(--muted); font-size: 1.4rem; line-height: 1; }
.pa-empty { text-align: center; padding: 34px 20px; }
.pa-wrap .pa-dlg { width: min(680px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 40px); overflow-y: auto; padding: 0; text-align: left; }
.pa-dh { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid #efece7; position: sticky; top: 0; background: inherit; z-index: 1; }
.pa-dh h2 { margin: 0 0 2px; }
.pa-dh p { margin: 0; }
.pa-form { padding: 6px 22px 20px; }
.pa-sec { padding: 14px 0; border-bottom: 1px solid #f1efea; }
.pa-sec h3 { margin: 0 0 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: #6b7882; }
.pa-sec .grid { grid-template-columns: 1fr 1fr; }
.pa-adj { display: flex; gap: 14px; align-items: flex-end; }
.pa-adj .field { max-width: 180px; flex: none; }
.pa-adj p { margin: 0 0 8px; }
.pa-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pa-logobox { height: 76px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e7e4de; display: grid; place-items: center; margin-bottom: 8px; }
.pa-logobox img { max-height: 60px; max-width: 80%; object-fit: contain; }
.pa-logobtns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pa-switch { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .9rem; cursor: pointer; }
.pa-switch input { width: auto; min-height: 0; margin: 0; accent-color: var(--brand); }
.pa-staff { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #e7e4de; background: #fbfaf8; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.pa-staff > span:first-child { display: flex; flex-direction: column; }
.pa-staff:hover { background: #fff; border-color: #cfd8de; }
.pa-pw { display: flex; gap: 6px; }
.pa-pw input { flex: 1; min-width: 0; }
.pa-actions { margin-top: 14px; justify-content: flex-end; }
@media (max-width: 640px) {
  .pa-card { flex-wrap: wrap; }
  .pa-chips { width: 100%; justify-content: flex-start; padding-left: 62px; }
  .pa-go { display: none; }
  .pa-sec .grid, .pa-two { grid-template-columns: 1fr; }
  .pa-adj { flex-direction: column; align-items: stretch; }
}

/* the 3D preview's unit colours */
.k3d-units { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 8px rgba(31,52,70,.1); max-width: calc(100% - 20px); overflow-x: auto; }
.k3d-units span { font-size: .76rem; font-weight: 700; color: #475569; margin-right: 3px; }
.k3d-units button { flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cfcac2; cursor: pointer; }
.k3d-units button.on { box-shadow: 0 0 0 2px var(--brand); }
.k3d-hint { bottom: 54px; }

/* ===== Job Sheet (no prices): screen and print ===== */
.js-doc { background: #fff; border-radius: 16px; box-shadow: 0 6px 24px rgba(31,52,70,.08); padding: 28px 30px; display: grid; gap: 18px; }
.js-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--brand); }
.js-logo { height: 56px; } .js-biz { font-size: 1.4rem; }
.js-title h2 { margin: 0 0 6px; font-size: 1.6rem; color: var(--brand); text-align: right; }
.js-title table { margin-left: auto; font-size: .88rem; } .js-title td { padding: 1px 0 1px 14px; text-align: right; } .js-title td:first-child { color: #6b7882; }
.js-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.js-box { border: 1px solid #ebe8e2; border-radius: 12px; padding: 12px 14px; }
.js-box h3, .js-sec h3 { margin: 0 0 8px; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: #6b7882; }
.js-box table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.js-box td { padding: 4px 0; vertical-align: top; } .js-box td:first-child { color: #6b7882; width: 34%; padding-right: 10px; }
.js-list td:first-child { color: inherit; width: auto; } .js-list td:last-child { text-align: right; white-space: nowrap; }
.js-list tr + tr td { border-top: 1px solid #f1efea; }
.js-notes p { margin: 0; }
.js-3d { height: 440px; }
.js-3dimg { display: none; width: 100%; border-radius: 10px; }
@media (max-width: 700px) { .js-doc { padding: 18px 14px; } .js-cols { grid-template-columns: 1fr; } .js-head { flex-direction: column; } .js-title h2, .js-title table { text-align: left; margin-left: 0; } }
@media print {
  .js-doc { box-shadow: none; padding: 0; border-radius: 0; gap: 12px; font-size: 10pt; }
  .js-3d { display: none !important; }
  .js-3dimg { display: block; max-height: 120mm; object-fit: contain; }
  .js-break { break-before: page; }
  .js-box { break-inside: avoid; }
}

/* purchase order layout options (accent colour, header style, logo side, font) */
.po-doc { --pa: var(--brand); }
.po-doc .po-dh { border-bottom-color: var(--pa); }
.po-doc .po-dt h1 { color: var(--pa); }
.po-doc .po-dl th { background: color-mix(in srgb, var(--pa) 10%, #fff); }
.po-doc.po-f-serif { font-family: Georgia, 'Times New Roman', serif; }
.po-doc.po-l-right .po-dh { flex-direction: row-reverse; }
.po-doc.po-l-right .po-dt h1, .po-doc.po-l-right .po-dt td { text-align: left; }
.po-doc.po-l-right .po-dt table { margin-left: 0; }
.po-doc.po-l-right .po-who { text-align: right; }
.po-doc.po-h-none .po-dh { border-bottom: 0; }
.po-doc.po-h-band .po-dh { background: var(--pa); color: #fff; border: 0; padding: 18px 20px; border-radius: 4px; }
.po-doc.po-h-band .po-dt h1, .po-doc.po-h-band .po-dh p, .po-doc.po-h-band .po-dt td { color: #fff !important; }
.po-doc.po-h-band .po-logo { background: #fff; padding: 6px 8px; border-radius: 4px; }
.po-biz2 { display: block; margin-top: 6px; font-size: 13pt; }
.po-dterms { margin-top: 14px; font-size: 8.5pt; color: #555; } .po-dterms small { display: block; font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; color: #777; } .po-dterms p { margin: 4px 0 0; }

/* ===== the PDF "studio": settings on the left in folding groups, a live A4 preview on the right ===== */
.pd-studio { display: grid; grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); gap: 18px; align-items: start; }
.pd-panel { display: grid; gap: 8px; }
.pd-grp { border: 1px solid #ebe8e2; border-radius: 12px; background: #fbfaf8; }
.pd-grp > summary { list-style: none; cursor: pointer; padding: 11px 14px; font-weight: 600; font-size: .9rem; display: flex; align-items: center; justify-content: space-between; }
.pd-grp > summary::-webkit-details-marker { display: none; }
.pd-grp > summary::after { content: '›'; color: #8a949c; font-size: 1.2rem; transition: transform .15s; }
.pd-grp[open] > summary::after { transform: rotate(90deg); }
.pd-grp > div { padding: 0 14px 14px; display: grid; gap: 10px; }
.pd-grp .field { margin: 0; }
.pd-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pd-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #efede8; }
.pd-seg button { min-height: 0; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: .82rem; color: #475569; cursor: pointer; }
.pd-seg button.on { background: #fff; color: #13202b; font-weight: 600; box-shadow: 0 1px 4px rgba(31,52,70,.12); }
.pd-cols { display: flex; gap: 6px; flex-wrap: wrap; }
.pd-cols button { width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d6d3cc; cursor: pointer; }
.pd-cols button.on { box-shadow: 0 0 0 2.5px var(--brand); }
.pd-tog { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .88rem; margin: 0; cursor: pointer; }
.pd-tog input { width: auto; min-height: 0; margin: 0; accent-color: var(--brand); }
.pd-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #6b7882; }
.pd-preview { position: sticky; top: calc(var(--below-bar, 88px) + 8px); max-height: calc(100vh - var(--below-bar, 88px) - 24px); overflow: auto; padding: 14px; border-radius: 14px; background: #e9e6e0; }
.pd-preview .po-sheet { transform-origin: top center; }
@media (max-width: 920px) { .pd-studio { grid-template-columns: 1fr; } .pd-preview { position: static; max-height: none; } }

/* estimate PDF editor: style chips, compact sections list, smaller layout cards */
.ql-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.ql-chip { width: auto !important; flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 0; padding: 6px 11px; border-radius: 999px; border: 1px solid #e3e0da; background: #fff; font: inherit; font-size: .8rem; color: #334155; cursor: pointer; }
.ql-chip i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.ql-chip:hover { border-color: #b9c3cb; }
.ql-chip.on { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 15%, transparent); font-weight: 600; }
.pd-panel .ql-secs { display: grid; gap: 4px; }
.pd-panel .ql-sec { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #fff; border: 1px solid #efece7; }
.pd-panel .ql-sec input { width: auto; min-height: 0; margin: 0; accent-color: var(--brand); }
.pd-panel .ql-sec b { flex: 1; font-size: .86rem; font-weight: 500; }
.pd-panel .ql-sec.off b { color: #9aa3ab; }
.pd-panel .ql-move button { min-height: 0; padding: 2px 7px; border: 1px solid #e3e0da; border-radius: 6px; background: #fff; cursor: pointer; font-size: .8rem; }
.pd-panel .ql-move button:disabled { opacity: .35; cursor: default; }
.pd-panel .ql-seg { flex-wrap: wrap; }
.pd-panel .ql-cols { display: flex; flex-wrap: wrap; gap: 5px; }
.pd-preview .ql-paper { margin: 0 auto; }
.pl-list { gap: 8px !important; }
.pl-list .pl-card, .pl-list .pl-new { min-height: 0 !important; padding: 10px 14px !important; }
.pl-assign-wrap { margin-top: 16px; }
.pl-assign-wrap .pl-assign { padding: 0 14px 14px; }
.pl-assign-wrap .pl-assign h3 { display: none; }

.pd-grp > div.ql-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-grp > .pd-label { padding: 12px 14px 6px; display: block; }

/* ===== layout editor: Elements / Fields panel with tiles, drag onto the page ===== */
.pe-pal { display: flex; flex-direction: column; gap: 8px; }
.pe-tabs { display: flex; padding: 3px; border-radius: 999px; background: #efede8; }
.pe-tabs button { flex: 1; min-height: 0; padding: 7px 10px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: .84rem; color: #475569; cursor: pointer; }
.pe-tabs button.on { background: #fff; color: #13202b; font-weight: 600; box-shadow: 0 1px 4px rgba(31,52,70,.12); }
.pe-pal .pe-pal-h { margin: 8px 2px 0; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7882; }
.pe-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pe-pal .pe-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 76px; padding: 10px 6px; border: 1px solid #e7e4de; border-radius: 12px; background: #fff; font: inherit; font-size: .76rem; color: #334155; text-align: center; cursor: grab; transition: border-color .12s, box-shadow .12s, transform .12s; }
.pe-pal .pe-tile:hover { border-color: #b9c3cb; box-shadow: 0 4px 12px rgba(31,52,70,.1); transform: translateY(-1px); }
.pe-pal .pe-tile:active { cursor: grabbing; }
.pe-tic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.pe-hf { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pe-hf button { display: flex; align-items: center; gap: 7px; min-height: 0; padding: 9px 10px; border: 1px solid #e7e4de; border-radius: 10px; background: #fff; font: inherit; font-size: .8rem; color: #334155; cursor: pointer; }
.pe-hf button svg { color: #4f5fd1; }
.pe-hf button:last-child svg { color: #15803d; }
.pe-hf button:hover { border-color: #b9c3cb; }
.pe-sheet { position: relative; }
.pe-empty { position: absolute; left: 6%; right: 6%; top: 5%; bottom: 5%; border: 1.5px dashed #86c49b; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; pointer-events: none; color: #6b7882; font-size: 13px; }
.pe-empty b { color: #1f2328; font-size: 15px; }
.pe-canvas.pe-drop .pe-sheet { outline: 2px dashed #2563eb; outline-offset: 4px; }
.pb-line.pb-vline { width: 0; height: 100%; margin: 0 auto; border-top: 0 !important; }

.pe-hf { grid-template-columns: 1fr; }
.pe-pal .pe-tile span:last-child { line-height: 1.2; }

/* the layout editor's toolbar (and its ⋯ menu) sits above the page and panels below it */
.pe-bar { position: relative; z-index: 40; }
.pe-more[open] > div { z-index: 1000; }

.pe-ib.pe-opts { width: auto !important; padding: 0 12px !important; font-size: .84rem; font-weight: 600; white-space: nowrap; }

/* ===== the layout editor: the whole width of the screen while editing your own layout ===== */
main:has(#pdfEditor:not(.hidden)) { max-width: none; padding-left: 20px; padding-right: 20px; }
.set-layout:has(#pdfEditor:not(.hidden)) { grid-template-columns: minmax(0, 1fr); }
.set-layout:has(#pdfEditor:not(.hidden)) > .set-nav { display: none; }
/* the editor's three columns: elements, the page, settings (which fold away to a gear) */
.pe { grid-template-columns: 190px minmax(0, 1fr) 250px !important; }
.pe.insp-off { grid-template-columns: 190px minmax(0, 1fr) !important; }
.pe.insp-off .pe-insp { display: none; }
.pe-insp { position: sticky !important; grid-column: auto !important; }
.pe-insp .pe-hide { float: right; width: 26px; height: 26px; min-height: 0; padding: 0; border: 1px solid #e3e0da; border-radius: 8px; background: #fff; color: #6b7882; cursor: pointer; font-size: .8rem; }
.pe-insp .pe-hide:hover { color: #1f2328; border-color: #b9c3cb; }
.pe-canvas { min-width: 0; }
.pe-gear { display: none; position: sticky; float: right; top: 0; z-index: 5; width: 38px; height: 38px; min-height: 0; padding: 0; margin: -4px -4px 0 0; border-radius: 10px; border: 1px solid #e3e0da; background: #fff; color: #334155; box-shadow: 0 2px 8px rgba(31,52,70,.12); cursor: pointer; place-items: center; }
.pe.insp-off .pe-gear { display: grid; }
.pe-gear:hover { color: #13202b; border-color: #b9c3cb; }
@media (max-width: 900px) { .pe, .pe.insp-off { grid-template-columns: minmax(0, 1fr) !important; } .pe-pal, .pe-insp { position: static !important; } }

.pa-assign { display: grid; gap: 6px; }
.pa-arow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #efece7; color: var(--ink); text-decoration: none; }
.pa-arow:hover { border-color: #cfd8de; }
.pa-arow span { margin-left: auto; color: #6b7882; font-size: .86rem; }
.pa-arow i { font-style: normal; color: #9aa3ab; }
.co-pdf { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f1efea; }

/* Tips and hints switched off in My account: every tips box goes */
body.no-tips .pe-tips, body.no-tips .k3d-hint, body.no-tips .d-hint { display: none !important; }

/* the layout editor's toolbar stays in view, just under the menu bar, as you scroll */
#pdfEditor .pe-bar { position: sticky; top: var(--below-bar, 88px); z-index: 40; background: rgba(255,255,255,.94) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 6px 18px rgba(31,52,70,.08); }
#pdfEditor .pe-pal, #pdfEditor .pe-insp { top: calc(var(--below-bar, 88px) + 72px) !important; }
#pdfEditor .pe-insp { max-height: calc(100vh - var(--below-bar, 88px) - 90px); overflow-y: auto; }
#pdfEditor .pe-gear { top: calc(var(--below-bar, 88px) + 72px); }
#pdfEditor.pe-full .pe-bar { position: static; }

.pl-card { position: relative; }
.pl-card .pl-del { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #9aa3ab; background: transparent; cursor: pointer; opacity: .55; transition: opacity .12s, background .12s, color .12s; }
.pl-card:hover .pl-del, .pl-card.on .pl-del, .pl-card .pl-del:focus { opacity: 1; }
.pl-card .pl-del:hover { background: #fee2e2; color: #b91c1c; }

/* editing your own layout: it saves with the editor's own Save, so the page title, the section's intro and
   "Save settings" (for the Standard layout and purchase orders) step out of the way */
main:has(#pdfEditor:not(.hidden)) > .page-head { display: none; }
main:has(#pdfEditor:not(.hidden)) #saveSettings2 { display: none; }
main:has(#pdfEditor:not(.hidden)) .set-body .actions:has(#saveSettings2) { display: none; }
section[data-bsub="estimates"]:has(#pdfEditor:not(.hidden)) > h2,
section[data-bsub="estimates"]:has(#pdfEditor:not(.hidden)) > h2 + p { display: none; }

/* PDF layouts (Standard and Purchase orders too): the whole width of the screen, so the settings and the page both have room */
main:has(section[data-sec="quote"]:not(.hidden)) { max-width: none; padding-left: 20px; padding-right: 20px; }
section[data-sec="quote"] .pd-studio { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 22px; }
section[data-sec="quote"] .pd-preview { padding: 18px; }

/* a purchase order on your own layout: measured off-screen (to fit each block), and printed full size */
.po-print.po-measure { display: block !important; position: absolute; left: -10000px; top: 0; width: 794px; }
.po-print .q-custom .pb-page, .po-sheet .q-custom .pb-page { width: 186mm; height: 273mm; }
.pb-potitle h2 { margin: 0 0 4px; color: var(--qa); font-size: 1.6em; text-align: right; }
.pb-potitle table { margin-left: auto; font-size: .85em; border-collapse: collapse; } .pb-potitle td { padding: 1px 0 1px 10px; text-align: right; } .pb-potitle td:first-child { color: #6b7882; }
.pb-polines { width: 100%; border-collapse: collapse; font-size: .9em; } .pb-polines th { text-align: left; padding: 4px 5px; background: color-mix(in srgb, var(--qa) 10%, #fff); font-size: .85em; } .pb-polines td { padding: 4px 5px; border-bottom: 1px solid #ececec; }
.pb-polines th:not(:first-child), .pb-polines td:not(:first-child) { text-align: right; white-space: nowrap; }
.po-pricetog { margin: 0 6px 0 0; align-self: center; font-size: .88rem; }

section[data-bsub="po"]:has(#pdfEditor:not(.hidden)) > h2,
section[data-bsub="po"]:has(#pdfEditor:not(.hidden)) > h2 + p { display: none; }
#poList { margin: 4px 0 12px; }

/* Settings areas: no page title or Save button at the top – the side bar says where you are, and a bar
   slides up from the bottom when there's something to save */
main:has(> .set-layout #setTitle) > .page-head, main > .page-head:has(#setTitle) { display: none; }
main:has(#saveSettings2) #saveSettings2, .set-body .actions:has(#saveSettings2) { display: none; }
.set-savebar { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 900; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-radius: 14px;
  background: rgba(31,41,55,.94); color: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .25s ease; font-size: .92rem; }
.set-savebar.on { transform: translate(-50%, 0); }
.set-savebar .btn.secondary { background: transparent; color: #e5e7eb; border-color: rgba(255,255,255,.3); }
.set-savebar .btn.secondary:hover { background: rgba(255,255,255,.1); }
@media (max-width: 640px) { .set-savebar { left: 12px; right: 12px; transform: translateY(140%); } .set-savebar.on { transform: none; } .set-savebar span { flex: 1; } }

/* the save box at the foot of the settings side bar (replaces the floating bar) */
.set-nav .set-savebar { position: static; transform: none; display: none; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 10px; padding: 12px; border-radius: 12px;
  background: #fff7ed; color: #7c2d12; border: 1px solid #fed7aa; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; font-size: .85rem; }
.set-nav .set-savebar.on { display: flex; transform: none; animation: sbIn .2s ease; }
.set-nav .set-savebar span { color: #9a3412; font-size: .8rem; }
.set-nav .set-savebar > div { display: flex; gap: 6px; margin-top: 2px; }
.set-nav .set-savebar .btn { flex: 1; min-height: 0; padding: 8px 10px; font-size: .84rem; width: auto; justify-content: center; }
.set-nav .set-savebar .btn.secondary { flex: none; background: #fff; color: #7c2d12; border-color: #fdba74; }
@keyframes sbIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* (a narrow screen: the side bar runs across the top, so the box floats at the bottom instead) */
@media (max-width: 760px) { .set-nav .set-savebar.on { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 900; box-shadow: 0 10px 30px rgba(0,0,0,.2); } }

.set-nav .set-savebar .btn { display: inline-flex !important; align-items: center; border-radius: 9px !important; font-weight: 600; }
.set-nav .set-savebar .btn:not(.secondary) { background: var(--brand) !important; color: #fff !important; border: 1px solid var(--brand) !important; }
.set-nav .set-savebar .btn:not(.secondary):hover { background: #243a47 !important; }
.set-nav .set-savebar .btn.secondary { border: 1px solid #fdba74 !important; }

/* the logo on a purchase order keeps its own shape (never stretched to fill the space) */
.po-doc .po-logo { height: 60px; width: auto !important; max-width: 70%; object-fit: contain; object-position: left center; }
.po-doc.po-l-right .po-logo { object-position: right center; margin-left: auto; }

.po-doc .po-logo { align-self: flex-start; flex: none; }
.po-doc.po-l-right .po-logo { align-self: flex-end; }

.po-doc .po-who .po-addr-lines { margin: 10px 0 0; font-size: 9pt; line-height: 1.5; color: #4b5563; }
.po-doc.po-h-band .po-who .po-addr-lines { color: #fff; }
.po-doc .po-dh { align-items: flex-start; }

/* purchase order preview pop-up */
.po-pv-wrap .po-pv { width: min(900px, calc(100vw - 32px)); max-width: none; height: calc(100vh - 40px); padding: 0; display: flex; flex-direction: column; overflow: hidden; text-align: left; }
.po-pv-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #ebe8e2; flex-wrap: wrap; }
.po-pv-bar > span { flex: 1; }
.po-pv-bar .btn { min-height: 0; padding: 8px 14px; }
.po-pv-body { flex: 1; overflow: auto; background: #e9e6e0; padding: 20px; }
.po-pv-body .po-sheet { margin: 0 auto; }

/* an estimate's history: revisions and client views */
.qh-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .qh-grid { grid-template-columns: 1fr; } }
.qh-card { margin: 0 !important; }
.qh-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.qh-head h2 { margin: 0; }
.qh-sub { margin: 10px 0 4px; font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7882; }
.qh-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.qh-row:hover { background: #f7f6f3; border-color: #ebe8e2; }
.qh-v { font-weight: 700; color: var(--brand); }
.qh-when { display: flex; flex-direction: column; font-size: .9rem; }
.qh-when small { color: #6b7882; font-size: .78rem; }
.qh-tot { font-weight: 600; font-variant-numeric: tabular-nums; }
.qh-cur { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #dcfce7; color: #166534; }
.qh-open { font-size: .82rem; color: var(--brand); }
.qh-stat { display: flex; align-items: center; gap: 14px; padding: 6px 0 10px; }
.qh-stat b { font-size: 2.2rem; line-height: 1; color: var(--brand); }
.qh-stat span { font-size: .92rem; } .qh-stat small { color: #6b7882; }
.qh-views { max-height: 260px; overflow-y: auto; border-top: 1px solid #f1efea; }
.qh-vrow { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px solid #f6f4f0; font-size: .88rem; }
.qh-act { margin-top: 16px; }
.qh-act > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; }
.qh-act > summary::-webkit-details-marker { display: none; }
.qh-act > summary h2 { margin: 0; font-size: 1.05rem; }
.qh-act > summary::after { content: '›'; margin-left: auto; color: #8a949c; transition: transform .15s; }
.qh-act[open] > summary { margin-bottom: 12px; } .qh-act[open] > summary::after { transform: rotate(90deg); }

/* purchase order page – tidier */
.po-track { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; padding: 8px 10px 8px 8px; border-radius: 999px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.po-track .po-steps { margin: 0; }
.po-track .po-moves { align-items: center; }
.po-link-danger { background: none; border: 0; padding: 6px 8px; color: #b42318; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; border-radius: 8px; min-height: 0; }
.po-link-danger:hover { background: #fdecea; }
.po-supf { margin: 0; }
.po-supc { margin: 6px 2px 0; font-size: .8rem; color: #52606b; line-height: 1.4; }
.po-under { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 4px 0 10px; }
.po-under .po-tot { margin: 0; padding: 0; background: none; min-width: 200px; }
.po-under .po-tot b.big { padding-top: 4px; }
.po-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.po-histbox summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.po-histbox summary::-webkit-details-marker { display: none; }
.po-histbox summary h2 { margin: 0; }
.po-histbox summary::after { content: '▾'; color: #8a94a0; margin-left: 8px; }
.po-histbox[open] summary::after { content: '▴'; }
@media (max-width: 640px) { .po-track { border-radius: 16px; } }
.po-histbox summary h2 { flex: 1; }
.po-histbox summary .small { background: #eef1f4; border-radius: 999px; padding: 1px 9px; font-weight: 600; }

/* home dashboard laid out from Settings → Dashboard */
.hd-tiles { grid-template-columns: repeat(var(--hd-n, 4), minmax(0, 1fr)); }
@media (max-width: 960px) { .hd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hd-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.hd-flow .hd-cell { min-width: 0; display: flex; }
.hd-flow .hd-cell > .card { margin: 0; flex: 1; min-width: 0; }
.hd-cell.w2 { grid-column: span 2; } .hd-cell.w3 { grid-column: 1 / -1; }
@media (max-width: 1000px) { .hd-flow { grid-template-columns: 1fr; } .hd-cell.w2, .hd-cell.w3 { grid-column: auto; } }
.hd-custom { text-align: center; margin: 4px 0 0; font-size: .84rem; }
.hd-custom a { color: #6b7882; }

/* on/off switch (used instead of tick boxes) */
.sw { position: relative; width: 40px; height: 23px; flex: none; border: 0; padding: 0; min-height: 0; border-radius: 999px; background: #cfd5db; cursor: pointer; transition: background .15s; }
.sw i { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.sw.on { background: var(--brand); } .sw.on i { left: 20px; }
.sw:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* Settings → Dashboard */
.db-wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .db-wrap { grid-template-columns: 1fr; } }
.db-list { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid #e7e5e0; border-radius: 12px; overflow: hidden; background: #fff; }
.db-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid #efede8; }
.db-row:first-child { border-top: 0; }
.db-row.off .db-txt { opacity: .5; }
.db-move { display: flex; flex-direction: column; gap: 2px; }
.db-arrow { border: 0; background: #f3f2ef; color: #52606b; width: 24px; height: 17px; min-height: 0; padding: 0; font-size: .58rem; border-radius: 5px; cursor: pointer; line-height: 1; }
.db-arrow:hover:not(:disabled) { background: #e3e7eb; } .db-arrow:disabled { opacity: .3; cursor: default; }
.db-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.db-txt b { font-size: .92rem; } .db-txt span { font-size: .78rem; color: #6b7882; }
.db-w { display: inline-flex; background: #f3f2ef; border-radius: 8px; padding: 2px; }
.db-w button { border: 0; background: none; padding: 4px 9px; min-height: 0; font-size: .76rem; font-weight: 600; color: #6b7882; border-radius: 6px; cursor: pointer; }
.db-w button.on { background: #fff; color: #1f2328; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.db-w.dim { opacity: .4; pointer-events: none; }
.db-pv-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7882; font-weight: 700; margin: 2px 0 8px; }
.db-pv { background: #eef1f4; border-radius: 12px; padding: 10px; position: sticky; top: 90px; }
.db-pv i { display: flex; align-items: center; justify-content: center; text-align: center; font-style: normal; font-size: .62rem; font-weight: 600; color: #52606b; background: #fff; border-radius: 6px; padding: 6px 4px; min-height: 30px; }
.db-pv-t { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 5px; margin-bottom: 5px; }
.db-pv-c { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.db-pv-c i { min-height: 58px; } .db-pv-c i.w2 { grid-column: span 2; } .db-pv-c i.w3 { grid-column: 1 / -1; min-height: 44px; }
/* layout editor: the block settings panel, grouped and switch-based */
.pe-insp .pi-head { display: flex; align-items: center; min-height: 30px; padding-right: 34px; margin-bottom: 6px; }
.pe-insp .pi-head h4 { margin: 0; font-size: 1rem; }
.pi-grp { border-top: 1px solid #efede8; }
.pi-grp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7882; }
.pi-grp > summary::-webkit-details-marker { display: none; }
.pi-grp > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.6px solid #8a94a0; border-bottom: 1.6px solid #8a94a0; transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
.pi-grp[open] > summary::after { transform: rotate(45deg); }
.pi-body { padding: 0 0 12px; }
.pi-body .field { margin-bottom: 10px; }
.pi-lbl { font-size: .78rem; font-weight: 600; color: #52606b; margin: 10px 0 6px; }
.pi-sw { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.pi-sw > span { display: flex; flex-direction: column; font-size: .86rem; }
.pi-sw small { color: #6b7882; font-size: .74rem; }
.pi-two { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.pi-two .field { margin-bottom: 0; }
.pi-two .pi-lbl { margin-top: 0; }
.pi-bold { width: 40px; height: 38px; min-height: 0; padding: 0; border-radius: 9px; border: 1px solid #e3e0da; background: #fff; font-weight: 800; font-size: 1rem; color: #52606b; cursor: pointer; }
.pi-bold.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pi-seg { display: flex; background: #f3f2ef; border-radius: 9px; padding: 3px; gap: 2px; }
.pi-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; min-height: 0; padding: 6px 4px; border-radius: 7px; font-size: .78rem; font-weight: 600; color: #6b7882; cursor: pointer; }
.pi-seg button.on { background: #fff; color: #1f2328; box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.pe-insp .pe-cols { gap: 5px; }
.pe-insp .pe-pos { grid-template-columns: 1fr 1fr; gap: 8px; }
.pe-insp .pe-pos .field { margin-bottom: 0; }
.pi-acts { display: flex; gap: 6px; border-top: 1px solid #efede8; padding-top: 12px; }
.pi-ib { flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 36px; min-height: 0; padding: 0; border-radius: 9px; border: 1px solid #e3e0da; background: #fff; color: #52606b; cursor: pointer; }
.pi-ib:hover { background: #f3f2ef; color: #1f2328; }
.pi-ib.danger { color: #b42318; } .pi-ib.danger:hover { background: #fdecea; border-color: #f5c2bd; }
/* typing straight into a text box on the page */
.pb.pe-typing { outline: 2px solid #2563eb; outline-offset: 1px; cursor: text; z-index: 50 !important; }
.pb.pe-typing .pb-text { user-select: text; -webkit-user-select: text; cursor: text; outline: none; white-space: pre-wrap; min-height: 1em; }
.pb.pe-typing .pe-h { display: none; }

/* "Saved" confirmation */
.saved-pop { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 3000; pointer-events: none; }
.saved-pop > div { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 40px; border-radius: 18px; background: #fff; box-shadow: 0 20px 60px rgba(15,23,42,.22); animation: savedIn .22s ease-out; }
.saved-pop.out > div { animation: savedOut .25s ease-in forwards; }
.saved-pop .tick { width: 54px; height: 54px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: flex; align-items: center; justify-content: center; }
.saved-pop b { font-size: 1.1rem; } .saved-pop span { color: #6b7882; font-size: .86rem; }
@keyframes savedIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes savedOut { to { opacity: 0; transform: scale(.96); } }
/* job sheet: its own colour and font (Settings → PDF layouts → Job sheet) */
.js-doc { --js-acc: var(--brand); }
.js-head { border-bottom-color: var(--js-acc); }
.js-title h2 { color: var(--js-acc); }
.js-box h3, .js-sec h3 { color: var(--js-acc); }
.js-serif { font-family: Georgia, 'Times New Roman', serif; }
.js-foot { margin: 4px 0 0; padding-top: 10px; border-top: 1px solid #ebe8e2; font-size: .82rem; color: #6b7882; text-align: center; }
.js-sign-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 24px; padding-top: 6px; }
.js-sign-grid div { display: flex; flex-direction: column; gap: 24px; font-size: .86rem; color: #52606b; }
.js-sign-grid i { border-bottom: 1px solid #9aa4ad; }
.js-3dpv { display: flex; align-items: center; justify-content: center; text-align: center; height: 220px; border-radius: 10px; background: repeating-linear-gradient(45deg, #f4f6f8, #f4f6f8 10px, #eef1f4 10px, #eef1f4 20px); color: #6b7882; font-size: .86rem; padding: 0 30px; }
.js-sample { width: 794px; max-width: none; }
.js-sample .js-doc { border-radius: 4px; box-shadow: 0 2px 14px rgba(31,52,70,.12); }
.js-sample .js-break { margin-top: 18px; padding-top: 18px; border-top: 2px dashed #d6dbe0; position: relative; }
.js-sample .js-break::before { content: 'New page'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 8px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a94a0; }
.jsl { list-style: none; margin: 0; padding: 0; border: 1px solid #e7e5e0; border-radius: 10px; background: #fff; overflow: hidden; }
.jsl li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid #efede8; }
.jsl li:first-child { border-top: 0; }
.jsl li > b { flex: 1; font-size: .86rem; font-weight: 600; }
.jsl li.off > b { opacity: .45; }
.jsl-np { border: 1px solid #e3e0da; background: #fff; border-radius: 999px; padding: 3px 9px; min-height: 0; font-size: .7rem; font-weight: 600; color: #8a94a0; cursor: pointer; white-space: nowrap; }
.jsl-np.on { background: color-mix(in srgb, var(--brand) 8%, #fff); border-color: var(--brand); color: var(--brand); }
.jsl-np:disabled { opacity: .35; cursor: default; }
/* Who's off: the whole month in view, leave as joined-up labelled bars */
.wc { table-layout: fixed; }
.wc col.wc-namecol { width: 170px; }
.wc thead th { min-width: 0; padding: 6px 0; font-size: .74rem; }
.wc thead th span { font-size: .6rem; }
.wc .mon { border-left: 1px solid #dcd8d0; }
.wc tbody th { min-width: 0; padding: 6px 10px; }
.wc tbody th a { display: flex; align-items: center; gap: 8px; }
.wc-av { width: 26px !important; height: 26px !important; flex: none; font-size: .62rem !important; }
.wc-nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.wc-nm b { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; }
.wc-nm small { font-size: .68rem; font-weight: 500; color: #6b7882; }
.wc td { height: 40px; overflow: visible; }
.wc-a { position: relative; height: 24px; margin: 0 2px; border-radius: 6px; }
.wc-a.jl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.wc-a.jr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.wc-a b { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); z-index: 2; color: #fff; font-size: .68rem; font-weight: 700; white-space: nowrap; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.wc-a.req b { color: #1f2328; text-shadow: none; background: rgba(255,255,255,.85); padding: 1px 5px; border-radius: 4px; left: 3px; }
.wc-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.wc-spell { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; min-height: 0; border-radius: 10px; border: 1px solid #e7e5e0; background: #fff; font-size: .82rem; cursor: pointer; text-align: left; }
.wc-spell:hover { border-color: #cfd5db; background: #fafaf8; }
.wc-spell i { width: 10px; height: 10px; border-radius: 3px; background: var(--lc); flex: none; }
.wc-spell.req i { background: repeating-linear-gradient(45deg, var(--lc) 0 2px, #fff 2px 4px); box-shadow: inset 0 0 0 1px var(--lc); }
.wc-spell span { color: #6b7882; }
.wc-spell em { font-style: normal; font-size: .68rem; font-weight: 700; color: #fff; background: var(--lc); border-radius: 999px; padding: 2px 7px; }
.wc-spell.now { border-color: var(--lc); box-shadow: 0 0 0 1px var(--lc) inset; }
@media (max-width: 760px) { .wc { table-layout: auto; } .wc thead th { min-width: 24px; } }
.wc-a b { font-style: normal; }
.wc-a.jl { margin-left: -1px; }
.wc td:has(.wc-a.jr) { border-right-color: transparent; }

/* terms & conditions: always a page of their own after the estimate (the back, double-sided) */
.q-terms-page { margin-top: 14mm; padding-top: 10mm; border-top: 2px dashed #d6dbe0; position: relative; }
.q-terms-page::before { content: 'Page 2 – terms & conditions'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 10px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a94a0; }
.q-terms-page h3 { margin: 0 0 4mm; color: var(--qa, var(--brand)); }
.q-terms-text { white-space: pre-line; columns: 2; column-gap: 7mm; font-size: 8pt; line-height: 1.45; color: #374151; }
.pb-terms-note { font-style: italic; color: #8a94a0; }
@media print {
  .q-terms-page { break-before: page; page-break-before: always; margin: 0; padding: 0; border: 0; }
  .q-terms-page::before { display: none; }
  .quote:not([data-multi]) { page-break-after: auto; break-after: auto; }
}
.sn-auto { display: flex; gap: 8px; align-items: flex-start; margin: 8px 4px 4px; padding: 10px 12px; border-radius: 10px; background: #ecfdf3; color: #166534; font-size: .76rem; line-height: 1.35; }
.sn-auto svg { flex: none; margin-top: 1px; }
.sn-auto span { display: flex; flex-direction: column; color: #3f6b50; }
.sn-auto b { color: #166534; font-size: .8rem; }

/* Staff → Holiday settings */
#hsBox > .card { margin-bottom: 16px; }
.hs-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid #efede8; }
.hs-row:first-of-type { border-top: 0; padding-top: 4px; }
.hs-row > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.hs-row b { font-size: .92rem; } .hs-row span { font-size: .8rem; color: #6b7882; }
.hs-ctrl { display: flex; align-items: center; gap: 8px; flex: none; }
.hs-num { min-height: 0; padding: 7px 9px; text-align: right; }
.hs-sel { min-height: 0; padding: 7px 9px; width: 150px; }
.hs-unit { font-size: .84rem; color: #6b7882; }
.hs-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; margin-top: 4px; border-radius: 10px; background: #f6f5f2; font-size: .88rem; }
.hs-blocks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.hs-block { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e7e5e0; border-radius: 10px; background: #fff; }
.hs-block i { width: 10px; height: 10px; border-radius: 3px; background: repeating-linear-gradient(45deg, #b42318 0 2px, #fde2e1 2px 4px); flex: none; }
.hs-block b { font-size: .88rem; } .hs-block span { color: #6b7882; font-size: .82rem; flex: 1; }
.hs-block .icon-btn { margin-left: auto; }
.hb-rules ul { margin: 0; padding-left: 18px; font-size: .9rem; line-height: 1.6; }
@media (max-width: 640px) { .hs-row { flex-direction: column; align-items: flex-start; } }
.wc thead th.blk { box-shadow: inset 0 -3px 0 #b42318; color: #b42318; }
.wc-key i.blkk { background: #b42318; height: 3px; vertical-align: 3px; }

/* estimates list: a bin on each row */
.dash-table td.dash-del-col, .dash-table th.dash-del-col { width: 44px; padding-left: 0; padding-right: 10px; text-align: right; }
.dash-del { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 8px; background: none; color: #9aa4ad; cursor: pointer; }
.dash-del:hover:not(:disabled) { background: #fdecea; color: #b42318; }
.dash-del:disabled { opacity: .3; cursor: not-allowed; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* job sheet on a layout of your own */
.pb .pb-kv { width: 100%; border-collapse: collapse; font-size: inherit; }
.pb .pb-kv td { padding: .6mm 0; vertical-align: top; border-bottom: 1px solid #efede8; }
.pb .pb-kv td:first-child { color: #6b7882; width: 34%; padding-right: 2mm; }
.pb .pb-kv.pb-list td:first-child { color: inherit; width: auto; } .pb .pb-kv.pb-list td:last-child { text-align: right; white-space: nowrap; }
.pb-view3d .pb-in { width: 100%; height: 100%; }
.pb .js-3d-blk { width: 100%; height: 100% !important; border-radius: 2mm; overflow: hidden; }
.pb .js-3dimg { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.pb-signoff .js-sign-grid { gap: 3mm 6mm; }
.pb-signoff .js-sign-grid div { gap: 6mm; font-size: inherit; }
.js-wrap { display: flex; justify-content: center; }
@media print { .js-wrap { display: block; } }
.pb-view3d .pb-in { display: flex; flex-direction: column; }
.pb .js-3d-blk { flex: 1; min-height: 0; height: auto !important; }
.pb .js-3dimg { flex: 1; min-height: 0; }
@media print { .pb .js-3d-blk { display: none !important; } }

.pb .k3d-units, .pb .k3d-hint { display: none !important; }
.pb .k3d-tools { transform: scale(.8); transform-origin: top right; }

/* layout builder: undo / redo */
.pe-undo button { display: inline-flex; align-items: center; justify-content: center; }
.pe-zoom button:disabled { opacity: .35; cursor: default; }
.pe-undo { margin-right: 4px; }

/* an estimate's page: its history and customer link on the left, the estimate on the right */
.qv-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.qv-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-bottom: 4px; }
.qv-side > .card { margin: 0; }
.qv-main { min-width: 0; }
.qv-main > .quote { margin: 0; }
.qv-side .qh-row { grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 8px; padding: 8px; }
.qv-side .qh-row .qh-tot { font-size: .86rem; }
.qv-side .qh-when { font-size: .84rem; }
.qv-side .cl-row { flex-wrap: wrap; }
.qv-side .cl-row input { flex: 1 1 100%; }
@media (max-width: 1180px) { .qv-layout { grid-template-columns: 1fr; } .qv-side { order: 2; position: static; max-height: none; overflow: visible; } .qv-main > .quote { margin: 0 auto; } }
@media print { .qv-layout { display: block; } }
.qv-side .qh-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "v tot open" "when when when"; row-gap: 3px; column-gap: 10px; padding: 9px 10px; }
.qv-side .qh-row .qh-v { grid-area: v; }
.qv-side .qh-row .qh-tot { grid-area: tot; text-align: right; font-size: .9rem; }
.qv-side .qh-row .qh-open, .qv-side .qh-row .qh-cur { grid-area: open; }
.qv-side .qh-row > span:empty { display: none; }
.qv-side .qh-when { grid-area: when; display: flex; flex-wrap: wrap; gap: 0 6px; font-size: .78rem; color: #6b7882; }
.qv-side .qh-when small { display: inline; font-size: inherit; }
.qv-side .qh-when small::before { content: '· '; }
/* layout builders: the layout cards and the toolbar both stay in view below the menu while you scroll */
.set-body .pl-list { position: sticky; top: var(--below-bar, 88px); z-index: 41; background: #fff; margin: -6px -8px 6px; padding: 6px 8px 10px; border-radius: 0 0 14px 14px; box-shadow: 0 8px 14px -12px rgba(31,52,70,.35); }
#pdfEditor .pe-bar { top: calc(var(--below-bar, 88px) + var(--pl-h, 96px)); }
#pdfEditor .pe-pal, #pdfEditor .pe-insp { top: calc(var(--below-bar, 88px) + var(--pl-h, 96px) + 72px) !important; }
#pdfEditor .pe-insp { max-height: calc(100vh - var(--below-bar, 88px) - var(--pl-h, 96px) - 90px); }
.set-body .pd-preview { top: calc(var(--below-bar, 88px) + var(--pl-h, 96px) + 8px); max-height: calc(100vh - var(--below-bar, 88px) - var(--pl-h, 96px) - 24px); }
#pdfEditor.pe-full .pe-pal, #pdfEditor.pe-full .pe-insp { top: 0 !important; max-height: 100%; }
@media (max-width: 900px) { .set-body .pl-list { position: static; box-shadow: none; } #pdfEditor .pe-bar { top: var(--below-bar, 88px); } }
.set-body .pl-list { z-index: 39; }
.set-body .pl-list::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--below-bar, 88px); background: #fff; pointer-events: none; }
@media (max-width: 900px) { .set-body .pl-list::before { display: none; } }

/* login: minimal glass – the logo floats above one slim glass strip */
.lg-min .lg-box { width: min(640px, 100%); display: flex; flex-direction: column; align-items: center; }
.lg-logo { margin-bottom: 26px; }
.lg-logo .logos img { max-height: 84px; max-width: 260px; border-radius: 10px; box-shadow: 0 8px 26px rgba(31,52,70,.10); }
.lg-name { font-family: Georgia, 'Times New Roman', serif; font-size: 2rem; letter-spacing: .06em; color: #2f3a42; margin-bottom: 26px; }
.lg-strip { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border-radius: 999px;
  background: var(--glass, rgba(255,255,255,.55)); border: 1px solid var(--glass-line, rgba(255,255,255,.75));
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); box-shadow: var(--glass-shadow, 0 10px 30px rgba(31,52,70,.10)); }
.lg-f { flex: 1; margin: 0; min-width: 0; }
.lg-f input { width: 100%; height: 46px; min-height: 0; border-radius: 999px; padding: 0 18px; font-size: 1rem; border: 1px solid color-mix(in srgb, var(--brand) 12%, transparent); background: rgba(255,255,255,.72); transition: background .15s, box-shadow .15s; }
.lg-f input:focus { outline: none; background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.lg-f input::placeholder { color: #8a929a; }
.lg-go { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; min-height: 0; width: 46px; padding: 0; border: 0; border-radius: 999px; background: var(--brand); color: #fff; cursor: pointer; transition: transform .12s, background .15s; }
.lg-go:hover { background: #253a47; } .lg-go:active { transform: scale(.96); }
.lg-go-t { display: none; font-weight: 600; font-size: 1rem; }
.lg-err { min-height: 1.4em; margin: 12px 0 0; text-align: center; }
.lg-tag { margin: 6px 0 0; font-size: .86rem; color: #6b7178; }
.lg-tag b { color: var(--brand); }
@media (max-width: 600px) {
  .lg-strip { flex-direction: column; align-items: stretch; border-radius: 22px; padding: 10px; }
  .lg-go { width: 100%; }
  .lg-go-t { display: inline; }
  .lg-logo .logos img { max-height: 70px; }
}
.lg-logo .logos { display: inline-flex; }
.lg-logo .logos img { height: 92px !important; max-height: none; width: auto !important; max-width: 300px; }
@media (max-width: 600px) { .lg-logo .logos img { height: 74px !important; } }

/* login logo: no white box (it blends into the glass background), fades in, lifts on hover, tilts with the mouse */
.lg-logo .logos img { box-shadow: none !important; border-radius: 0 !important; background: transparent; mix-blend-mode: multiply;
  height: 104px !important; max-width: 340px; transform-origin: 50% 60%; will-change: transform;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s; animation: lgLogoIn .9s cubic-bezier(.2,.8,.2,1) both; cursor: default; }
.lg-logo:hover .logos img { filter: contrast(1.08); }
@keyframes lgLogoIn { from { opacity: 0; transform: translateY(14px) scale(.96); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 600px) { .lg-logo .logos img { height: 82px !important; } }
@media (prefers-reduced-motion: reduce) { .lg-logo .logos img { animation: none; transition: none; } }
/* job diary: Email button, and the email window */
.jd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.jd-head h2 { margin: 0; }
.jd-head .btn { display: inline-flex; align-items: center; gap: 6px; }
.jm-wrap .jm { max-width: 640px; width: 100%; padding: 0; gap: 0; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.jm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid color-mix(in srgb, var(--brand) 10%, transparent); }
.jm-head h2 { margin: 0 0 2px; font-size: 1.15rem; }
.jm-body { padding: 14px 20px; overflow-y: auto; }
.jm-body .field { margin-bottom: 10px; }
.jm-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid color-mix(in srgb, var(--brand) 10%, transparent); }
.jm-foot .btn { display: inline-flex; align-items: center; gap: 6px; }
.jm-warn { background: #fff4e5; color: #8a4b08; border-radius: 10px; padding: 10px 12px; font-size: .88rem; margin-bottom: 12px; }
.jm-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.jm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; min-height: 0; border-radius: 999px; border: 1px solid #e3e0da; background: rgba(255,255,255,.8); font-size: .8rem; cursor: pointer; }
.jm-chip span { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #52606b; background: #eef1f4; border-radius: 999px; padding: 2px 7px; }
.jm-chip.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); }
.jm-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--brand); font-size: .82rem; font-weight: 600; cursor: pointer; margin: -2px 0 10px; }
.jm-files-h { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 8px; font-size: .9rem; }
.jm-over { color: #b42318 !important; font-weight: 600; }
.jm-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; max-height: 220px; overflow-y: auto; padding: 2px; }
.jm-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 0; border-radius: 10px; border: 1px solid #e3e0da; background: rgba(255,255,255,.75); text-align: left; cursor: pointer; }
.jm-file:hover { border-color: #b9c2ca; }
.jm-file.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); box-shadow: inset 0 0 0 1px var(--brand); }
.jm-fi { font-size: 1.1rem; }
.jm-fn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.jm-fn b { font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jm-fn small { font-size: .72rem; color: #6b7882; }
.jm-tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; color: transparent; border: 1.5px solid #c9cfd5; flex: none; }
.jm-file.on .jm-tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.dl-sent { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: #52606b; background: #eef1f4; border-radius: 999px; padding: 4px 10px; }
.dl-kind.k-email { color: var(--brand); }

.dl-sys { position: relative; }
.dl-sys-del { opacity: 0; margin-left: 4px; transition: opacity .15s; }
.dl-sys:hover .dl-sys-del, .dl-sys-del:focus-visible { opacity: 1; }

/* job window: everything about a job (the full job page isn't needed any more) */
.jw-review { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 18px 8px; padding: 10px 14px; border-radius: 12px; background: #fff4e5; color: #6b3d07; font-size: .88rem; }
.jw-tabs { flex-wrap: wrap; row-gap: 4px; }
.jw-sec textarea { width: 100%; min-height: 0; font-size: .9rem; }
.jw-draw { margin: 6px 0 4px; border-radius: 10px; overflow: hidden; background: #fbfaf8; border: 1px solid #ece9e3; }
.jw-draw svg { width: 100%; height: auto; max-height: 300px; display: block; }
.jw-ver { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 8px; color: inherit; text-decoration: none; font-size: .86rem; }
.jw-ver:hover { background: color-mix(in srgb, var(--brand) 5%, #fff); }
.jw-ver span:nth-child(2) { color: #6b7882; }
.jw-sec .pi-sw { padding: 2px 0; }
/* an estimate in its own window over the estimates list */
.qw-wrap { align-items: flex-start; overflow-y: auto; padding: 24px 16px; }
.qw { position: relative; width: min(1240px, 100%); margin: 0 auto; border-radius: 20px; padding: 18px 20px 24px;
  background: var(--glass-strong, rgba(255,255,255,.82)); border: 1px solid var(--glass-line, rgba(255,255,255,.75));
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); box-shadow: 0 24px 60px rgba(31,52,70,.22); }
.qw-x { position: absolute; top: 14px; right: 14px; z-index: 5; }
.qw-head { margin: 0 46px 12px 0; align-items: center; }
.qw-title { margin: 0; font-size: 1.25rem; }
.qw-title .muted { font-weight: 500; }
.qw .qv-side { top: 0; max-height: calc(100vh - 80px); }
body.qw-open { overflow: hidden; }
@media (max-width: 700px) { .qw-wrap { padding: 8px; } .qw { padding: 14px 10px 18px; border-radius: 14px; } }
@media print {
  body.qw-open #app { display: none !important; }
  body.qw-open { overflow: visible; }
  .qw-wrap { position: static !important; background: none !important; padding: 0 !important; overflow: visible !important; display: block !important; }
  .qw { width: auto; padding: 0; border: 0; box-shadow: none; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* print or download: a preview of the PDF with a choice of layout */
.pv-wrap { z-index: 160; padding: 16px; align-items: stretch; }
.pv { display: flex; flex-direction: column; width: min(1100px, 100%); margin: 0 auto; max-height: calc(100vh - 32px); border-radius: 20px; overflow: hidden;
  background: var(--glass-strong, rgba(255,255,255,.85)); border: 1px solid var(--glass-line, rgba(255,255,255,.75)); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); box-shadow: 0 24px 60px rgba(31,52,70,.25); }
.pv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border-bottom: 1px solid color-mix(in srgb, var(--brand) 10%, transparent); }
.pv-t { display: flex; flex-direction: column; min-width: 180px; }
.pv-lays { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.pv-lay { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 12px; min-height: 0; border-radius: 10px; border: 1px solid #e3e0da; background: rgba(255,255,255,.75); cursor: pointer; text-align: left; }
.pv-lay b { font-size: .86rem; } .pv-lay small { font-size: .72rem; color: #6b7882; }
.pv-lay.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); box-shadow: inset 0 0 0 1px var(--brand); }
.pv-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pv-acts .btn { display: inline-flex; align-items: center; gap: 6px; }
.pv-body { flex: 1; overflow: auto; padding: 22px; background: #d9dcdf; }
.pv-sheet { width: max-content; margin: 0 auto; box-shadow: 0 6px 24px rgba(31,52,70,.18); background: #fff; }
.pv-sheet .quote { margin: 0; border: 0; border-radius: 0; }
.pv-sheet .no-print { display: none !important; }
body.pv-open { overflow: hidden; }
@media (max-width: 760px) { .pv-acts { margin-left: 0; width: 100%; } .pv-acts .btn { flex: 1; justify-content: center; } .pv-body { padding: 10px; } }
@media print {
  body.pv-printing #app, body.pv-printing .jw-wrap, body.pv-printing .qw-wrap { display: none !important; }
  body.pv-printing .pv-wrap { position: static !important; display: block !important; padding: 0 !important; background: none !important; overflow: visible !important; }
  body.pv-printing .pv { display: block; max-height: none; border: 0; box-shadow: none; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
  body.pv-printing .pv-body { overflow: visible; padding: 0; background: none; }
  body.pv-printing .pv-sheet { box-shadow: none; width: auto; }
}
/* diary: a small bin on each entry you're allowed to remove – always shown, red when you point at it */
.dl-del, .jw-feed .dl-del { display: grid !important; opacity: .75; width: 26px; height: 26px; margin-left: 2px; }
.dl-del:hover, .dl-del:focus-visible { opacity: 1; }
.dl-sys-del { opacity: .6; }
.dl-sys:hover .dl-sys-del { opacity: 1; }

.pv-pick { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1; min-width: 220px; font-size: .84rem; font-weight: 600; color: #52606b; }
.pv-pick select { flex: 1; max-width: 360px; min-height: 0; height: 40px; padding: 0 12px; border-radius: 10px; font-weight: 600; color: #1f2328; background-color: rgba(255,255,255,.85); }

/* glass drop-down (the layout picker in the PDF preview) */
.gsel { position: relative; flex: 1; max-width: 380px; }
.gsel-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 0; padding: 7px 12px 7px 14px; border-radius: 12px; text-align: left; cursor: pointer;
  background: rgba(255,255,255,.72); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); color: #1f2328; transition: border-color .15s, background .15s; }
.gsel-btn:hover { background: rgba(255,255,255,.9); border-color: color-mix(in srgb, var(--brand) 32%, transparent); }
.gsel.open .gsel-btn, .gsel-btn:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.gsel-cur { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.gsel-cur b, .gsel-txt b { font-size: .9rem; font-weight: 600; color: #1f2328; }
.gsel-cur small, .gsel-txt small { font-size: .74rem; font-weight: 500; color: #6b7882; }
.gsel-chev { flex: none; color: #52606b; transition: transform .18s; }
.gsel.open .gsel-chev { transform: rotate(180deg); }
.gsel-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; margin: 0; padding: 6px; list-style: none; max-height: 320px; overflow-y: auto; outline: none; border-radius: 14px;
  background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.9); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 18px 40px rgba(31,52,70,.18), inset 0 1px 0 rgba(255,255,255,.9); animation: gselIn .14s ease-out; }
@keyframes gselIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.gsel-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.gsel-list li.hi { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.gsel-list li.on { background: color-mix(in srgb, var(--brand) 8%, #fff); }
.gsel-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.gsel-tag { font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 999px; padding: 2px 8px; }
.gsel-tick { width: 18px; text-align: center; color: var(--brand); font-weight: 700; visibility: hidden; }
.gsel-list li.on .gsel-tick { visibility: visible; }
/* PDF preview: a tidy title – a small label, the estimate number, its job and the client */
.pv-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv-kicker { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a94a0; }
.pv-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pv-name b { font-size: 1.08rem; color: #1f2328; white-space: nowrap; }
.pv-chip { font-size: .72rem; font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.pv-client { font-size: .9rem; color: #52606b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.pv-sep { width: 1px; align-self: stretch; background: color-mix(in srgb, var(--brand) 14%, transparent); margin: 2px 4px; }
.pv-pick > span { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a94a0; }
@media (max-width: 760px) { .pv-sep { display: none; } }
/* ===== the menu down the left (screens wider than 900px); phones keep the bar along the top ===== */
.tb-ic, .tb-fold, .tb-bell-l { display: none; }
@media (min-width: 901px) {
  body.side-nav { --side-w: 236px; --below-bar: 16px; }
  body.side-nav.nav-mini { --side-w: 88px; }
  body.side-nav #app { padding-left: var(--side-w); }
  body.side-nav.nav-anim #app { transition: padding-left .22s ease; }
  body.side-nav .topbar { position: fixed; top: 12px; bottom: 12px; left: 12px; width: calc(var(--side-w) - 24px); margin: 0; z-index: 45;
    flex-direction: column; align-items: stretch; gap: 6px; padding: 16px 10px 12px; min-height: 0; border-radius: 20px; }
  body.side-nav .brand { display: flex; justify-content: center; margin: 2px 0 12px; }
  body.side-nav .brand img { max-width: 100%; max-height: 64px; height: auto; }
  body.side-nav .tb-fold { display: grid; place-items: center; position: absolute; top: 26px; right: -13px; width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent); background: #fff; color: #52606b; cursor: pointer; box-shadow: 0 2px 8px rgba(31,52,70,.14); z-index: 2; transition: transform .22s; }
  body.side-nav .tb-fold:hover { color: #1f2328; }
  body.side-nav.nav-mini .tb-fold { transform: rotate(180deg); }
  body.side-nav .tb-links { flex-direction: column; align-items: stretch; gap: 3px; margin: 0; padding: 4px; overflow: visible; flex: none; border-radius: 14px; }
  body.side-nav .tb-links a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; font-size: .94rem; text-align: left; border-radius: 10px; }
  body.side-nav .tb-ic { display: grid; place-items: center; flex: none; color: #52606b; }
  body.side-nav .tb-links a.active .tb-ic { color: var(--brand); }
  body.side-nav .tb-links .nav-badge { margin-left: auto; }
  body.side-nav .tb-user { margin-top: auto; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 0 0; border-left: 0; border-top: 1px solid rgba(31,52,70,.12); }
  body.side-nav .tb-bell-wrap { position: relative; }
  body.side-nav .tb-bell { width: 100%; height: auto; display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 9px 12px; border-radius: 10px; opacity: 1; }
  body.side-nav .tb-bell-l { display: inline; font-size: .92rem; }
  body.side-nav .tb-count { position: static; margin-left: auto; box-shadow: none; }
  body.side-nav .bell-panel { left: calc(100% + 14px); right: auto; top: auto; bottom: -6px; }
  body.side-nav .tb-me { padding: 8px; border-radius: 12px; }
  body.side-nav .tb-hi, body.side-nav .tb-hi small { display: flex !important; }
  body.side-nav .tb-hi { flex-direction: column; min-width: 0; }
  body.side-nav .tb-hi b, body.side-nav .tb-hi small { overflow: hidden; text-overflow: ellipsis; }
  body.side-nav .tb-out { justify-content: flex-start; gap: 12px; padding: 9px 12px; border-radius: 10px; }
  body.side-nav .tb-out span { display: inline !important; }
  /* folded: icons only (the names show when you point at them) */
  body.side-nav.nav-mini .tb-lbl, body.side-nav.nav-mini .tb-hi, body.side-nav.nav-mini .tb-out span { display: none !important; }
  body.side-nav.nav-mini .tb-links a, body.side-nav.nav-mini .tb-bell, body.side-nav.nav-mini .tb-out, body.side-nav.nav-mini .tb-me { justify-content: center; padding: 10px 0; }
  body.side-nav.nav-mini .tb-links .nav-badge, body.side-nav.nav-mini .tb-count { position: absolute; top: 3px; right: 6px; margin: 0; transform: scale(.85); }
  body.side-nav.nav-mini .tb-links a, body.side-nav.nav-mini .tb-bell { position: relative; }
  body.side-nav.nav-mini .brand img { max-height: 40px; }
  /* things that sat just under the old top menu */
  body.side-nav .qv-side { top: 16px; max-height: calc(100vh - 32px); }
  body.side-nav .db-pv { top: 16px; }
  body.side-nav main { max-width: 1240px; }
}
@media print { body.side-nav #app { padding-left: 0 !important; } }
@media (min-width: 901px) { body.side-nav .bell-panel { background: rgba(255,255,255,.97) !important; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 18px 44px rgba(31,52,70,.22); } body.side-nav .brand img { mix-blend-mode: multiply; } }

/* schedule: side panel on the right */
@media (min-width: 1001px) { .sc-layout { grid-template-columns: minmax(0, 1fr) 230px; } .sc-layout > .sc-side { order: 2; } }
@media (min-width: 1600px) { main:has(.sc-layout) .sc-layout { grid-template-columns: minmax(0, 1fr) 250px; } }

/* schedule fills the whole page with the side menu */
@media (min-width: 901px) { body.side-nav main:has(.sc-layout) { max-width: none; padding-bottom: 16px; }  }

/* ===== iPhone / phone layout (700px and narrower): a tab bar along the bottom, cards instead of tables, less on each page ===== */
.ph-tabs, .ph-sheet { display: none; }
@media (max-width: 700px) {
  body.side-nav #app, #app { padding-left: 0; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  /* the header: just the logo, the bell and you */
  .topbar, body.side-nav .topbar { position: sticky; top: 0; margin: 0 0 6px; border-radius: 0 0 18px 18px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; min-height: 0; flex-wrap: nowrap; gap: 8px; }
  .topbar .tb-links, .topbar .tb-out, .topbar .tb-hi, .topbar .tb-fold { display: none !important; }
  .topbar .brand img { max-height: 34px; width: auto; }
  .topbar .tb-user { margin-left: auto; border: 0; padding: 0; gap: 6px; }
  .tb-me { padding: 0; }
  main { padding: 6px 14px 14px; }
  /* the tab bar */
  .ph-tabs { display: flex; position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 60; height: 62px; padding: 0 4px; border-radius: 20px;
    background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 10px 30px rgba(31,52,70,.18); }
  .ph-tabs a, .ph-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 0; border: 0; background: none; color: #6b7882; font: inherit; font-size: .68rem; font-weight: 500; text-decoration: none; border-radius: 14px; cursor: pointer; }
  .ph-tabs .tb-ic { display: grid !important; color: inherit; }
  .ph-tabs .tb-ic svg { width: 23px; height: 23px; }
  .ph-tabs .on { color: var(--brand); font-weight: 700; }
  .ph-tabs .on .tb-ic { background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 10px; padding: 2px 12px; }
  .ph-tabs .nav-badge { display: none; }
  /* More: a sheet up from the bottom */
  .ph-sheet { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(15,23,32,.32); }
  .ph-sheet.hidden { display: none; }
  .ph-sheet-in { position: absolute; left: 8px; right: 8px; bottom: calc(80px + env(safe-area-inset-bottom)); padding: 8px 8px 10px; border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 20px 50px rgba(15,23,32,.3); display: flex; flex-direction: column; }
  .ph-grab { width: 38px; height: 4px; border-radius: 3px; background: #d0d6db; margin: 2px auto 8px; }
  .ph-sheet a, .ph-sheet button { display: flex; align-items: center; gap: 14px; padding: 14px 14px; border: 0; background: none; color: #1f2328; font: inherit; font-size: 1rem; text-decoration: none; border-radius: 12px; text-align: left; cursor: pointer; }
  .ph-sheet a:active, .ph-sheet button:active { background: color-mix(in srgb, var(--brand) 8%, transparent); }
  .ph-sheet .tb-ic { display: grid !important; color: #52606b; }
  #phOut { color: #b42318; } #phOut .tb-ic { color: #b42318; }

  /* Home: a short greeting, the figures two by two, then what's waiting and the week */
  .hd-head { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 12px; }
  .hd-head h1 { font-size: 1.45rem; margin: 4px 0 0; }
  .hd-head p { font-size: .82rem; }
  .hd-quick a[href="#/schedule"] { display: none; }
  .hd-quick .btn { width: 100%; justify-content: center; }
  .hd-tiles, .hd-tiles[style] { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .hd-tile { padding: 12px; min-height: 0; }
  .hd-tile b { font-size: 1.35rem; margin: 4px 0 0; }
  .hd-tile .hd-sub, .hd-tile .hd-ch, .hd-tile .hd-meter, .hd-tile .hd-ic { display: none; }
  .hd-tile-h { font-size: .74rem; }
  .hd-flow { gap: 10px; margin-top: 10px; }
  .hd-custom { display: none; }

  /* lists: each row a card – client and price, then the reference and status */
  .dash-head { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .dash-head h1 { font-size: 1.45rem; }
  .dash-head > .muted { display: none; }
  .dash-bar { flex-wrap: wrap; gap: 6px; padding: 0 0 8px; background: none; border: 0; box-shadow: none; }
  .dash-bar .dash-search { flex: 1 1 100%; }
  .dash-bar .dash-chip, #dsum, .dash-sp { display: none; }
  .dash-bar .btn { flex: 1 1 100%; justify-content: center; }
  #list.dash { background: none; border: 0; box-shadow: none; padding: 0; }
  #list .table-wrap { overflow: visible; border: 0; background: none; }
  #list .dash-table, #list .dash-table tbody { display: block; width: 100%; }
  #list .dash-table thead { display: none; }
  #list .dash-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "client total" "ref status"; gap: 2px 10px; align-items: center;
    padding: 12px 14px; margin-bottom: 8px; border-radius: 16px; background: rgba(255,255,255,.82); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 2px 10px rgba(31,52,70,.06); }
  #list .dash-table td { display: none; padding: 0; border: 0; background: none; min-width: 0; }
  #list .dash-table td[data-col="client"] { display: block; grid-area: client; }
  #list .dash-table td[data-col="client"] .dash-main { font-weight: 600; font-size: 1rem; }
  #list .dash-table td[data-col="client"] .dash-sub { display: none; }
  #list .dash-table td[data-col="total"] { display: block; grid-area: total; text-align: right; }
  #list .dash-table td[data-col="ref"], #list .dash-table td[data-col="job"] { display: block; grid-area: ref; font-size: .82rem; color: #6b7882; }
  #list .dash-table td[data-col="ref"] .dash-sub, #list .dash-table td[data-col="job"] .dash-sub { display: none; }
  #list .dash-table td[data-col="status"], #list .dash-table td[data-col="stage"] { display: flex; grid-area: status; justify-content: flex-end; align-items: center; gap: 6px; }
  #list .dash-table td[data-col="status"] .st-block, #list .dash-table td[data-col="stage"] .st-block { font-size: .72rem; padding: 2px 9px; }
  #list .dash-table td[data-col="status"] .dash-sub, #list .dash-table td[data-col="stage"] .dash-sub { font-size: .72rem; }
  #list .dash-table td.empty { display: block; grid-column: 1 / -1; }
  #list .dash-foot { justify-content: center; }
  #list .dash-foot #dshow { display: none; }
  .dash-po { display: none; }

  /* a job: the whole screen; quick buttons; tabs (the diary first) */
  .jw-wrap { padding: 0 !important; align-items: stretch; }
  .jw-wrap .jw { width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; border-radius: 0 !important; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
  .jw-top { padding: 12px 14px 8px; }
  .jw-title h2 { font-size: 1.15rem; }
  .jw-tools { display: none !important; }
  .jw-review { margin: 0 12px 8px; flex-wrap: wrap; }
  .jw-quick { display: flex; gap: 8px; padding: 0 12px 10px; }
  .jw-quick .btn { flex: 1; justify-content: center; gap: 6px; min-height: 42px; }
  .jw-body { display: block !important; flex: 1; overflow-y: auto !important; padding: 0 12px 20px; }
  .jw-tabs { position: sticky; top: 0; z-index: 2; display: flex; overflow-x: auto; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(238,241,244,.95); scrollbar-width: none; }
  .jw-tabs button { flex: 1 0 auto; white-space: nowrap; font-size: .8rem; padding: 8px 10px; }
  .jw-body.jw-on-diary .jw-left .jw-pane { display: none !important; }
  .jw-body:not(.jw-on-diary) .jw-right { display: none !important; }
  .jw-right { margin-top: 10px; }
  .jw-row { flex-wrap: wrap; }
  .jw-row b { overflow-wrap: anywhere; }

  /* Schedule: the week's days, then the chosen day's bookings */
  .sc-side, .sc-view, .sc-help, .sc-legend { display: none !important; }
  .sc-layout { display: block; }
  .sc-card { padding: 10px; }
  .sc-bar { flex-wrap: wrap; gap: 8px; }
  .sc-title { font-size: 1rem; }
  .sc-tools { width: 100%; }
  .sc-tools .sc-new { flex: 1; justify-content: center; }
  .sc-wrap { overflow: visible; }
  .ph-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 4px 0 10px; }
  .ph-days button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 4px; border: 0; border-radius: 12px; background: rgba(255,255,255,.6); font: inherit; color: #52606b; cursor: pointer; min-height: 0; }
  .ph-days button span { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; }
  .ph-days button b { font-size: 1.05rem; color: #1f2328; }
  .ph-days button i { font-style: normal; font-size: .6rem; line-height: 1; height: 8px; color: var(--brand); letter-spacing: 1px; }
  .ph-days button.tdy b { color: var(--brand); }
  .ph-days button.on { background: var(--brand); color: #dfe7ec; }
  .ph-days button.on b, .ph-days button.on i { color: #fff; }
  .ph-dayname { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 2px 2px 8px; }
  .ph-bk { padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: #fff; border-left: 4px solid var(--tc); box-shadow: 0 2px 8px rgba(31,52,70,.07); cursor: pointer; }
  .ph-bk-t { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: #52606b; }
  .ph-bk-t b { color: #1f2328; }
  .ph-bk-m { font-weight: 600; font-size: 1rem; margin-top: 3px; }
  .ph-bk-s { font-size: .8rem; color: #6b7882; margin-top: 1px; }
  .ph-none { padding: 18px 4px; text-align: center; }
}

/* the phone tab bar only belongs on phones */
@media (min-width: 701px) { .ph-tabs, .ph-sheet { display: none !important; } }
@media (max-width: 700px) {
  #list .dash-table td { width: auto !important; max-width: none !important; }
  .dash-bar .dash-btn { flex: 1 1 100%; text-align: center; justify-content: center; }
}
@media (max-width: 700px) {
  .jw-wrap { position: fixed; inset: 0; display: flex; }
  .jw-wrap .jw { flex: 1; height: 100vh !important; height: 100dvh !important; min-height: 100vh; }
}
@media (max-width: 700px) { .jw-wrap .jw { background: #f2f4f6 !important; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none !important; } }

/* new / edit estimate: use the full page, drawing fills the window's height */
@media (min-width: 901px) { body.side-nav main:has(#estForm) { max-width: none; } body.side-nav #drawing .d-canvas > svg { height: max(420px, calc(100vh - 275px)); } }

/* schedule: the calendar card is the window's height; week, 2 weeks and month share it out */
@media (min-width: 1001px) {
  body.side-nav .sc-card { display: flex; flex-direction: column; height: calc(100vh - 60px); min-height: 520px; }
  body.side-nav .sc-wrap { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
  body.side-nav .sc-week { flex: 1 1 0; grid-template-rows: auto; grid-auto-rows: minmax(90px, 1fr); }
  body.side-nav .sc-cell { min-height: 90px; }
  body.side-nav .sc-month { flex: 1; display: flex; flex-direction: column; }
  body.side-nav .sc-mgrid { flex: 1; grid-auto-rows: minmax(84px, 1fr); }
  body.side-nav .sc-mday { min-height: 0; }
}

/* schedule: the page is fixed to the window (no page scroll); everything sizes to fit */
@media (min-width: 1001px) {
  html:has(.sc-layout), body:has(.sc-layout) { height: 100%; overflow: hidden; }
  body.side-nav main:has(.sc-layout) { box-sizing: border-box; height: 100vh; padding-top: 16px; padding-bottom: 16px; display: flex; flex-direction: column; }
  body.side-nav main:has(.sc-layout) > .sc-layout { flex: 1; min-height: 0; margin-top: 0; align-items: stretch; }
  body.side-nav .sc-main { display: flex; flex-direction: column; min-height: 0; }
  body.side-nav .sc-card { flex: 1; height: auto; min-height: 0; margin: 0; }
  body.side-nav .sc-side { min-height: 0; overflow-y: auto; }
}
/* pricing tool: each tab's parts as sub-links under its button in the side bar */
.set-nav .sn-subs { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1.5px solid #dfe5e9; }
.set-nav .sn-subs button { padding: 6px 10px; font-size: .84rem; font-weight: 400; color: #5b6670; border-radius: 7px; box-shadow: none; }
.set-nav .sn-subs button:hover { background: rgba(255,255,255,.75); color: var(--brand); }
@media (min-width: 761px) { .set-layout .pt-jump { display: none; } }
@media (max-width: 760px) { .set-nav .sn-subs { display: none; } }
/* Home dashboard: fixed to the window (no page scroll); the cards share out the height that's left */
@media (min-width: 1001px) {
  html:has(.hd-flow), body:has(.hd-flow) { height: 100%; overflow: hidden; }
  body.side-nav main:has(.hd-flow) { max-width: none; box-sizing: border-box; height: 100vh; padding-top: 16px; padding-bottom: 10px; display: flex; flex-direction: column; }
  body.side-nav main:has(.hd-flow) > .hd-head { margin-bottom: 12px; flex: none; }
  body.side-nav main:has(.hd-flow) > .hd-tiles { margin-bottom: 14px; flex: none; }
  body.side-nav main:has(.hd-flow) > .hd-flow { flex: 1; min-height: 0; margin-bottom: 6px; grid-auto-rows: minmax(170px, 1fr); overflow-y: auto; padding: 2px 2px 8px; margin-left: -2px; margin-right: -2px; }
  body.side-nav .hd-flow .hd-cell { min-height: 0; }
  body.side-nav .hd-flow .hd-cell > .card { display: flex; flex-direction: column; min-height: 0; overflow: auto; }
  body.side-nav .hd-flow .hd-chart { flex: 1; min-height: 0; height: 100%; }
  body.side-nav main:has(.hd-flow) > .hd-custom { flex: none; margin: 0; }
}
/* Home: the greeting on a glass strip – the date small above it, the quick buttons beside it */
.hd-head { align-items: center; padding: 14px 16px 14px 22px; border-radius: 18px; background: var(--glass, rgba(255,255,255,.6)); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 10px 28px rgba(31,52,70,.07), inset 0 1px 0 rgba(255,255,255,.9); }
.hd-hello { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hd-date { font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #7a8791; }
.hd-head h1 { font-size: 1.5rem; margin: 0; }
.hd-quick { display: flex; gap: 8px; }
.hd-quick .btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 12px; }
.hd-quick .btn svg { flex: none; }
@media (max-width: 700px) { .hd-head { padding: 12px 14px; } .hd-head h1 { font-size: 1.3rem; } }
/* the schedule's ? help follows Tips & tricks too */
body.no-tips .sc-help { display: none !important; }

/* the part of the pricing tab that's open */
.set-nav .sn-subs button.on { color: var(--brand); font-weight: 600; background: rgba(255,255,255,.85); box-shadow: inset 2px 0 0 var(--brand); }
.pt-jump button.on { border-color: var(--brand); background: var(--brand); color: #fff; }

/* ---------- Pricing tool: price structures ---------- */
.ps-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ps-top h2 { margin: 0 0 4px; }
.ps-top p { margin: 0; max-width: 640px; }
.ps-top .btn { flex: none; }
.ps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 16px; }
.ps-card { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.75); text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ps-card:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(31,52,70,.1); transform: translateY(-1px); }
.ps-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #eef3f6; color: var(--brand); }
.ps-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-body b { font-size: .98rem; color: #13202b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-body span { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.ps-tag { flex: none; align-self: flex-start; font-size: .68rem; font-weight: 600; letter-spacing: .02em; padding: 3px 8px; border-radius: 999px; background: #f1efeb; color: #6b7178; white-space: nowrap; }
.ps-go { flex: none; color: #9aa3ab; font-size: 1.3rem; line-height: 1; }
/* making a new one */
.ps-make { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); }
.ps-make .field { max-width: 380px; }
.ps-mk-l { margin: 12px 0 6px; font-size: .85rem; font-weight: 600; color: #3b4650; }
.ps-mk-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ps-mk-pick button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: inherit; cursor: pointer; min-height: 0; }
.ps-mk-pick button svg { grid-row: 1 / 3; color: var(--brand); }
.ps-mk-pick button b { font-size: .92rem; }
.ps-mk-pick button span { font-size: .78rem; color: var(--muted); }
.ps-mk-pick button.on { border-color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); background: color-mix(in srgb, var(--brand) 4%, #fff); }
.ps-mk-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
/* one open */
.ps-back { border: 0; background: none; padding: 0; font: inherit; font-size: .85rem; color: #52606b; cursor: pointer; min-height: 0; }
.ps-back:hover { color: var(--brand); text-decoration: underline; }
.ps-title { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.ps-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-tt h2 { margin: 0; }
.ps-name-in { font: inherit; font-size: 1.25rem; font-weight: 700; color: #13202b; border: 1px solid transparent; border-radius: 8px; padding: 2px 6px; margin-left: -7px; background: transparent; max-width: 420px; }
.ps-name-in:hover { border-color: var(--line); }
.ps-name-in:focus { border-color: var(--brand); background: #fff; outline: none; }
.ps-acts { flex: none; display: flex; gap: 6px; }
.ps-del { color: #b42318; }
/* its parts, as tabs */
.set-layout .pt-jump.ps-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 16px; padding: 4px; background: #f1efeb; border-radius: 12px; }
.set-layout .pt-jump.ps-tabs:empty { display: none; }
.pt-jump.ps-tabs button { border: 0; background: transparent; border-radius: 9px; padding: 7px 14px; font-size: .86rem; color: #52606b; }
.pt-jump.ps-tabs button:hover { background: rgba(255,255,255,.6); border: 0; color: #13202b; }
.pt-jump.ps-tabs button.on { background: #fff; color: #13202b; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
@media (max-width: 700px) { .ps-top { flex-direction: column; } .ps-mk-pick { grid-template-columns: 1fr; } .ps-title { flex-wrap: wrap; } }
/* settings pages use the full width beside the side menu */
@media (min-width: 901px) { body.side-nav main:has(.set-layout) { max-width: none; } }

.ps-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ps-nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ps-nm b { min-width: 0; }
.ps-nm .ps-tag { align-self: center; }

/* the Standard layout: the same toolbar and side panel look as your own layouts' editor */
.pl-std-bar { flex-wrap: nowrap; }
.pl-std-name { font-weight: 600; font-size: 1rem; padding: 6px 8px; color: #13202b; }
.pl-std-tag { font-size: .7rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #f1efeb; color: #6b7178; }
.pl-std-bar .pe-ib[data-std-new] { font-weight: 600; color: var(--brand); }
#stdLayout .pd-studio, #poStd .pd-studio, #jsStd .pd-studio { grid-template-columns: 270px minmax(0, 1fr); gap: 14px; }
#stdLayout .pd-panel, #poStd .pd-panel, #jsStd .pd-panel { align-content: start; }
#stdLayout .pd-preview, #poStd .pd-preview, #jsStd .pd-preview { border-radius: 12px; }
.pl-std-bar .pe-ib, .pl-std-bar .muted { white-space: nowrap; }

.pl-std-bar .pe-ib[data-std-new] { width: auto; padding: 0 12px; }

/* stockists: a list, one row each, A–Z */
.mb-grid.mb-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.mb-list .mb-card { flex-direction: row; align-items: center; gap: 14px; min-height: 0; padding: 12px 16px; border: 0; border-radius: 0; border-top: 1px solid var(--line); }
.mb-list .mb-card:first-child { border-top: 0; }
.mb-list .mb-card > b { flex: 0 0 220px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-list .mb-card > .muted { flex: 0 0 90px; white-space: nowrap; }
.mb-list .mb-types { flex: 1; min-width: 0; }
.mb-list .mb-contact { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .8rem; color: var(--muted); }
.mb-list .mb-foot { flex: none; width: auto; margin: 0; padding: 0; gap: 18px; }
@media (max-width: 700px) { .mb-list .mb-card { flex-wrap: wrap; } .mb-list .mb-card > b { flex: 1 1 100%; } }
/* address suggestions: room for a whole address on one line */
.suggest { min-width: min(460px, 90vw); }

/* ---------- Settings home: search, then small tiles ---------- */
.sh-search { display: flex; align-items: center; gap: 10px; max-width: 640px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.85); color: #7a8791; margin-bottom: 8px; }
.sh-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.sh-search input { flex: 1; border: 0; background: transparent; padding: 13px 0; font: inherit; font-size: 1rem; outline: none; box-shadow: none; min-height: 0; }
.sh-results { max-width: 640px; margin-bottom: 14px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(31,52,70,.08); }
.sh-res { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.sh-res:hover, .sh-res[data-first] { background: color-mix(in srgb, var(--brand) 5%, #fff); }
.sh-res b { font-weight: 600; font-size: .92rem; }
.sh-res > span:last-child { margin-left: auto; font-size: .8rem; color: var(--muted); }
.sh-res .sh-ic { width: 30px; height: 30px; border-radius: 8px; }
.sh-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.sh-tile2 { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px 8px 16px; border-radius: 16px; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.85); color: #13202b; text-decoration: none; text-align: center; transition: transform .15s, box-shadow .15s, opacity .15s, border-color .15s; }
.sh-tile2:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 8px 20px rgba(31,52,70,.1); }
.sh-tile2 b { font-size: .88rem; font-weight: 600; }
.sh-tile2 .sh-ic { width: 42px; height: 42px; border-radius: 12px; }
.sh-tile2.dim { opacity: .3; }
.sh-tile2 .sh-count { position: absolute; top: 8px; right: 8px; }
@media (max-width: 700px) { .sh-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .sh-tile2 { padding: 14px 4px 12px; } }
/* ---------- new pricing: settings, estimate and quote pieces ---------- */
.pay-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.pay-cols .btn { margin-top: 8px; }
.own-row .pay-label { flex: 1; min-width: 0; }
.zone-row .own-name { min-width: 120px; }
.cx-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cx-pick button { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; min-height: 0; }
.cx-pick button b { color: var(--brand); }
.cx-pick button span { font-size: .8rem; color: var(--muted); }
.cx-pick button.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); box-shadow: inset 0 0 0 1px var(--brand); }
.opt-row { gap: 10px; }
.opt-row .tog span { font-size: .75rem; white-space: nowrap; }
.alt-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.alt-row .alt-n { flex: none; width: 70px; font-weight: 600; font-size: .88rem; }
.alt-row select:first-of-type { flex: 1; min-width: 0; }
.alt-row select:last-of-type { flex: none; width: 150px; }
.opt-list { margin-top: 12px; }
.opt-list h4 { margin: 0 0 6px; font-size: .9rem; }
.opt-list ul { list-style: none; margin: 0; padding: 0; }
.opt-list li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid #eeece7; font-size: .9rem; }
.opt-list li:first-child { border-top: 0; }
.q-lines { width: 100%; border-collapse: collapse; margin-bottom: 8px; font-size: .88rem; }
.q-lines td { padding: 4px 0; border-bottom: 1px solid #eeece7; }
.q-lines td.num { text-align: right; white-space: nowrap; }
.mm-bandline select { max-width: 260px; }
.cq-gbb { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.cq-gbb-o { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.cq-gbb-o.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cq-extras { display: grid; gap: 6px; margin-top: 8px; }
.cq-extra { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.cq-extra span { flex: 1; }
@media (max-width: 700px) { .pay-cols, .cx-pick { grid-template-columns: 1fr; } .alt-row { flex-wrap: wrap; } .alt-row select:last-of-type { width: 100%; } }
/* how long the job takes */
.hrs-strip { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 5%, #fff); font-size: .86rem; color: #52606b; }
.hrs-strip b { color: #13202b; }
.tm-table .tm-grp td { background: #f7f6f3; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7178; padding: 6px 10px; }
.tm-table td .unit-in { max-width: 130px; }
.tm-table .own-pic { display: inline-flex; vertical-align: middle; margin-right: 8px; }

/* settings tiles: even rows for the screen size (12 tiles: 6 × 2, 4 × 3 or 3 × 4) */
main:has(> .sh-tiles) { container-type: inline-size; container-name: shpage; }
.sh-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 1180px; }
@container shpage (max-width: 820px) { .sh-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container shpage (max-width: 540px) { .sh-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container shpage (max-width: 300px) { .sh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* the map pop-up */
.map-dlg { width: min(1000px, 94vw); max-width: none; height: min(720px, 88vh); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.map-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.map-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.map-k { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7a8791; }
.map-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-frame { flex: 1; width: 100%; border: 0; background: #e9e6e0; }
.map-x { flex: none; }
.dlg-wrap.map-wrap { z-index: 3000; }

.map-from { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #f7f6f3; }
.map-from.hidden { display: none; }
.map-from label { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: #52606b; }
.map-from input { flex: 1; min-width: 0; }

/* thicknesses you sell (Stockists) */
.th-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.7); }
.th-bar-l { font-size: .82rem; font-weight: 600; color: #3b4650; margin-right: 6px; }
.th-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; background: #e6edf2; color: var(--brand); font-size: .82rem; font-weight: 600; }
.th-chip button { border: 0; background: none; color: #7a8791; cursor: pointer; padding: 0 4px; min-height: 0; font-size: .75rem; }
.th-chip button:hover { color: #b42318; }
.th-add { border: 1px dashed #b8c4cc; background: none; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .82rem; color: var(--brand); cursor: pointer; min-height: 0; }
.mm-list .mm-grid { grid-template-columns: minmax(150px, 1fr) 120px repeat(var(--mmth, 2), 112px) 24px; }
@media (max-width: 700px) { .mm-list .mm-grid { grid-template-columns: 120px repeat(2, minmax(0, 1fr)) 24px; } }
/* simple pricing */
.simple-sum { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 5%, #fff); font-size: .88rem; color: #3b4650; }
.simple-sum b { color: var(--brand); padding: 0 4px; }
.ps-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff7e6; color: #8a5a00; font-size: .84rem; }
.ps-note.hidden { display: none; }

.tier-list .own-row { gap: 10px; }
.tier-n { max-width: 120px; }
.tier-arrow { color: #9aa3ab; }
.tier-on { flex: 1; }

/* ---------- pricing builder ---------- */
.ps-step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.ps-step .field { flex: 1; max-width: 420px; margin: 0; }
.ps-step-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; margin-top: 2px; }
.ps-mk-pick.ps-mk-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ps-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f1efeb; }
.ps-seg button { border: 0; background: transparent; border-radius: 9px; padding: 7px 14px; font: inherit; font-size: .86rem; color: #52606b; cursor: pointer; min-height: 0; }
.ps-seg button.on { background: #fff; color: #13202b; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.ps-mk-acts { align-items: center; }
.ps-mk-acts .muted { margin-right: auto; }
.ps-whos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ps-whos:empty { display: none; }
.ps-def, .ps-who { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.ps-def { background: #e6f0ff; color: #1d4ed8; }
.ps-who { background: #ecf8f0; color: #15803d; }
.ps-who-list { display: grid; gap: 6px; }
.ps-who-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.ps-who-row b { flex: 1; font-weight: 600; }
@media (max-width: 700px) { .ps-mk-pick.ps-mk-4 { grid-template-columns: 1fr 1fr; } }
.ps-mk-pick.ps-mk-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ps-who-row input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; padding: 0; }
.ps-who-row b { min-width: 0; }
.ps-who-row .muted { white-space: nowrap; }
#psNew .btn { white-space: nowrap; }

/* Review & save: the work on the left, the price panel on the right (kept in view) */
.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; }
.rv-main { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; min-width: 0; }
.rv-main > .card { margin: 0; }
.rv-main > .k3d-card, .rv-main > .card:has(#optBox), .rv-main > .card:has(#altBox), .rv-main > .card:has([data-path="job.notes"]), .rv-main > .actions { grid-column: 1 / -1; }
.rv-side { position: sticky; top: 16px; min-width: 0; }
.rv-price { margin: 0; max-height: calc(100vh - 150px); overflow-y: auto; }
.rv-sum { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.rv-sum b { font-size: 1.05rem; }
.rv-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rv-facts span { font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #eef1f4; color: #3b4652; }
.rv-sum:empty { display: none; }
@media (max-width: 1100px) { .rv-grid { grid-template-columns: minmax(0, 1fr); } .rv-side { position: static; } .rv-price { max-height: none; } }.rv-grid { grid-template-columns: minmax(0, 1fr) clamp(340px, 34%, 520px); }
.rv-price table { font-size: .85rem; }
.rv-main { grid-template-columns: repeat(auto-fit, minmax(max(280px, 40%), 1fr)); }

/* pricing tool: which structures are offered on an estimate */
.ps-show { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ps-show h3 { margin: 0 0 4px; font-size: 1rem; }
.ps-show-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; margin-top: 8px; }
.ps-show-list .check { display: flex; align-items: center; gap: 8px; }

/* pricing tool: the 'on estimates' switch on each structure card */
.ps-card { cursor: pointer; }
.ps-on { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-left: auto; flex: 0 0 auto; cursor: default; }
.ps-on small { font-size: .68rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ps-on .sw[disabled] { opacity: .55; cursor: not-allowed; }
.ps-show-tip { margin: 12px 0 0; }
.ps-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* pricing tool: the set figure table (slabs → amount) */
.tierx { max-width: 560px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.tierx-head, .tierx-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 40px; align-items: center; gap: 12px; padding: 8px 12px; }
.tierx-head { background: #f6f5f2; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 9px; padding-bottom: 9px; }
.tierx-row + .tierx-row { border-top: 1px solid var(--line); }
.tierx-n { display: flex; align-items: center; gap: 8px; }
.tierx-n input { width: 64px; text-align: center; font-weight: 700; }
.tierx-n small { color: var(--muted); font-size: .82rem; }
.tierx-amt { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.tierx-amt i { font-style: normal; color: var(--muted); padding: 0 4px 0 10px; font-size: .9rem; white-space: nowrap; }
.tierx-amt input { border: 0 !important; box-shadow: none !important; width: 100%; min-width: 0; padding-left: 2px; font-weight: 700; font-size: 1rem; background: transparent; }
.tierx-amt:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.tierx .icon-btn { justify-self: end; }
.tierx-extra { background: #faf9f6; color: #3b4652; font-size: .9rem; }
.tierx-extra b { font-weight: 700; }
.tierx-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; max-width: 560px; }
@media (max-width: 520px) { .tierx-head, .tierx-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 32px; gap: 8px; padding: 8px; } .tierx-n input { width: 52px; } }
/* a price structure's page: All price structures sits with Make a copy / Delete */
.ps-acts-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; justify-content: flex-end; align-items: center; }
.ps-acts-wrap .ps-acts { margin-left: 0; }
#psOpen .ps-title { margin-top: 0; }
#psOpen .ps-title { flex-wrap: wrap; row-gap: 10px; }
#psOpen .ps-tt { flex: 1 1 220px; min-width: 0; }
#psOpen .ps-acts-wrap { flex: 0 1 auto; }

/* pricing tool: services on a per-slab structure (each switched on or off, at its own price) */
.svc-master { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 640px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f6; }
.svc-master span, .svc-nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.svc-master small, .svc-nm small { color: var(--muted); font-size: .8rem; }
.svc-list { max-width: 640px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.svc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 130px 110px; align-items: center; gap: 12px; padding: 10px 14px; }
.svc-row + .svc-row { border-top: 1px solid var(--line); }
.svc-row.off .svc-nm b { color: var(--muted); }
.svc-row.off .tierx-amt, .svc-row.off select { opacity: .45; }
.svc-row select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .9rem; }
.svc-sum { margin: 12px 0 0; font-size: .9rem; color: #3b4652; }
.svc-sum b { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #e6f0ff; color: #1d4ed8; font-size: .82rem; }
@media (max-width: 560px) { .svc-row { grid-template-columns: auto minmax(0, 1fr); } .svc-row .tierx-amt { grid-column: 2; } .svc-row select { grid-column: 2; } }
.svc-list { container-type: inline-size; }
@container (max-width: 520px) { .svc-row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); row-gap: 8px; } .svc-row .svc-nm { grid-column: 2 / 4; } .svc-row .tierx-amt { grid-column: 2; } .svc-row select { grid-column: 3; } }

/* the £ boxes (set figure, services): one frame – no inner outline or number arrows; "Included" reads as a hint */
.tierx-amt { height: 44px; transition: border-color .15s, box-shadow .15s; }
.tierx-amt input, .tierx-amt input:focus, .tierx-amt input:hover { border: 0 !important; outline: none !important; box-shadow: none !important; background: transparent !important; height: 100%; padding: 0 10px 0 2px; border-radius: 0; }
.tierx-amt input::-webkit-outer-spin-button, .tierx-amt input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tierx-amt input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.tierx-amt input::placeholder { font-weight: 500; color: #9aa1a8; font-style: italic; }
.tierx-amt:hover { border-color: #c9c5bd; }
.tierx-amt:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.svc-row select { height: 44px; }
/* a service at £0 (in the per slab price): just 'Included', no £ */
.tierx-amt.inc i { display: none; }
.tierx-amt.inc input { padding-left: 12px; }

/* pricing tool: edge profiles on a per-slab structure (included, or per metre) */
.edge-row { grid-template-columns: 14px minmax(0, 1fr) 130px 44px; }
.edge-dot { width: 14px; height: 14px; border-radius: 4px; }
.edge-per { white-space: nowrap; }
@container (max-width: 520px) { .svc-row.edge-row { grid-template-columns: 14px minmax(0, 1fr) 110px 40px; } .svc-row.edge-row .svc-nm, .svc-row.edge-row .tierx-amt { grid-column: auto; } }

/* edge profiles: drag handle to reorder */
.edge-row { grid-template-columns: 16px 14px minmax(0, 1fr) 130px 44px; background: #fff; }
.edge-grip { display: flex; align-items: center; justify-content: center; width: 16px; height: 28px; cursor: grab; color: #a3a9b0; touch-action: none; border-radius: 4px; }
.edge-grip:hover { color: var(--brand); background: #f1efeb; }
.edge-grip svg { fill: currentColor; }
.edge-row.dragging { position: relative; z-index: 2; box-shadow: 0 6px 18px rgba(0,0,0,.12); background: #fbfaf8; }
.edge-row.dragging .edge-grip { cursor: grabbing; }
@container (max-width: 520px) { .svc-row.edge-row { grid-template-columns: 16px 14px minmax(0, 1fr) 100px 36px; } }

/* 'All price structures': a soft filled button, so it stands apart from Make a copy / Delete */
#psBack { background: color-mix(in srgb, var(--brand) 10%, #fff); border-color: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); }
#psBack:hover { background: color-mix(in srgb, var(--brand) 16%, #fff); border-color: color-mix(in srgb, var(--brand) 16%, #fff); }

/* pricing tool: who uses a structure – your own estimates, then partners with switches */
.who-own { margin-bottom: 18px; }
.who-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 640px; margin-bottom: 8px; }
.who-head h3 { margin: 0; font-size: 1rem; }
.who-count { font-size: .78rem; font-weight: 600; color: var(--muted); }
.who-bulk { margin-left: auto; display: flex; gap: 6px; }
.who-search { display: block; width: 100%; max-width: 640px; margin-bottom: 8px; }
.who-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
.who-row .who-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #eef1f4; color: #3b4652; font-weight: 700; font-size: .8rem; }
.who-row.on .who-av { background: var(--brand); color: #fff; }
.who-row .sw { justify-self: end; }@container (max-width: 520px) { .svc-row.who-row { grid-template-columns: 36px minmax(0, 1fr) auto; } .svc-row.who-row .svc-nm { grid-column: auto; } }

/* edge profiles: the profile's shape, outlined in its colour */
.edge-row { grid-template-columns: 16px 44px minmax(0, 1fr) 130px 44px; }
.edge-shape { display: grid; place-items: center; width: 44px; height: 34px; border-radius: 8px; background: #f7f6f3; }
.edge-shape svg { display: block; }
@container (max-width: 520px) { .svc-row.edge-row { grid-template-columns: 16px 40px minmax(0, 1fr) 96px 34px; } }

/* pricing tool: harder items and cut-outs on a per-slab structure */
.item-row { grid-template-columns: 44px minmax(0, 1fr) 130px 44px; }
.item-row .cut-pic svg { width: 36px; height: 27px; display: block; color: var(--brand); }
#itemBoxC .set-sub { margin: 0 0 8px; }
@container (max-width: 520px) { .svc-row.item-row { grid-template-columns: 40px minmax(0, 1fr) 96px 34px; } .svc-row.item-row .svc-nm, .svc-row.item-row .tierx-amt { grid-column: auto; } }

.bu-list { margin-top: 10px; }

/* partner form: their price structures, ticked */
.pa-structs { display: grid; gap: 6px; margin: 6px 0 4px; }
.pa-structs .pa-switch small { font-weight: 500; }
.field-lbl { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); }

.pa-adj.pa-adj-structs { display: block; margin-top: 14px; }
.pa-adj-structs .pa-structs { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin: 8px 0; }
.pa-adj-structs .pa-switch { display: flex; align-items: center; gap: 8px; margin: 0; }
.pa-adj-structs .pa-switch span { display: inline; }

/* dragging an edge profile: the row lifts and follows; the others slide aside; it settles into place */
.edge-list.sorting { user-select: none; overflow: visible; }
.edge-list.sorting .edge-row { transition: transform .18s ease; position: relative; }
.edge-list .edge-row.dragging { transition: none; z-index: 3; background: #fff; box-shadow: 0 10px 24px rgba(31, 35, 40, .16), 0 0 0 1px #d9d5cc; border-radius: 10px; cursor: grabbing; }
.edge-list .edge-row.settling { z-index: 3; transition: transform .2s cubic-bezier(.2, .8, .3, 1), box-shadow .2s; }

/* a price structure's tabs: pills with a small picture, the one you're on filled in dark */
#ptJump.ps-tabs { background: transparent; padding: 0; gap: 6px; flex-wrap: wrap; }
#ptJump.ps-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: #f1efeb; color: #52606b; font-weight: 500; border: 1px solid transparent; box-shadow: none; transition: background .15s, color .15s; }
#ptJump.ps-tabs button svg { flex: 0 0 auto; opacity: .85; }
#ptJump.ps-tabs button:hover { background: #e7e4de; color: var(--brand); }
#ptJump.ps-tabs button.on { background: var(--brand); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--brand) 25%, transparent); }
#ptJump.ps-tabs button.on svg { opacity: 1; }
#ptJump.ps-tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* pricing tool: margin and rounding on a per-slab structure */
.mg-row { grid-template-columns: 44px minmax(0, 1fr) 130px; }
.mg-row .tierx-amt i:last-child { padding: 0 12px 0 4px; }
.mg-row .tierx-amt.inc i { display: none; }
.mg-round { grid-template-columns: 44px minmax(0, 1fr); row-gap: 10px; }
.mg-pills { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.mg-pills button { padding: 7px 13px; border-radius: 999px; border: 1px solid transparent; background: #f1efeb; color: #52606b; font-weight: 500; font-size: .85rem; cursor: pointer; transition: background .15s, color .15s; }
.mg-pills button:hover { background: #e7e4de; color: var(--brand); }
.mg-pills button.on { background: var(--brand); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--brand) 25%, transparent); }
@container (max-width: 520px) { .svc-row.mg-row { grid-template-columns: 40px minmax(0, 1fr) 96px; } .svc-row.mg-row .svc-nm, .svc-row.mg-row .tierx-amt { grid-column: auto; } .svc-row.mg-round { grid-template-columns: 40px minmax(0, 1fr); } .mg-pills { grid-column: 1 / -1; } }
/* settings: the save status at the foot of the side bar (changes save themselves) */
.set-savebar.sv-saving { background: #f4f6f8; border-color: #dfe5ea; color: #3b4652; }
.set-savebar.sv-saved { background: #eef8f1; border-color: #c6e7d1; color: #166534; }
.set-savebar.sv-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.set-savebar.sv-saving b::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: svspin .8s linear infinite; }
@keyframes svspin { to { transform: rotate(360deg); } }.set-savebar.sv-saving span { color: #52606b; }
.set-savebar.sv-saved span { color: #15803d; }
.set-savebar.sv-error span { color: #b91c1c; }

/* the margin slider: 5% steps, filled to where it's set, the figure beside it */
.mg-row:not(.mg-round) { grid-template-columns: 44px minmax(0, 1fr) minmax(200px, 300px); }
.mg-slider { display: flex; align-items: center; gap: 12px; }
.mg-slider b { min-width: 46px; text-align: right; font-size: 1rem; color: var(--brand); }
.mg-slider input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--brand) var(--p, 0%), #e3e1dc var(--p, 0%)); outline: none; margin: 0; padding: 0; border: 0; cursor: pointer; }
.mg-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.18); cursor: grab; }
.mg-slider input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); cursor: grab; }
.mg-slider input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
@container (max-width: 520px) { .svc-row.mg-row:not(.mg-round) { grid-template-columns: 40px minmax(0, 1fr); } .mg-slider { grid-column: 1 / -1; } }
.mg-slider input[type=range] { height: 6px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; border-radius: 999px !important; background: linear-gradient(to right, var(--brand) var(--p, 0%), #e3e1dc var(--p, 0%)) !important; }

/* rounding: a dropdown on the right of its row, lined up with the margin slider */
.mg-round { grid-template-columns: 44px minmax(0, 1fr) minmax(200px, 300px); }
.mg-select { position: relative; display: block; }
.mg-select select { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; padding: 0 38px 0 14px !important; border: 1px solid var(--line) !important; border-radius: 8px !important; background: #fff !important; font-weight: 600; font-size: .95rem; color: var(--brand); cursor: pointer; box-shadow: none !important; }
.mg-select select:hover { border-color: #c9c5bd !important; }
.mg-select select:focus { border-color: var(--brand) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent) !important; outline: none; }
.mg-select::after { content: ''; position: absolute; right: 15px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); pointer-events: none; }
@container (max-width: 520px) { .svc-row.mg-round { grid-template-columns: 40px minmax(0, 1fr); } .mg-select { grid-column: 1 / -1; } }
/* the app's own dropdown (rounding): a soft box with the choice, opening to a floating card with a tick */
.tm-pick { position: relative; }
.mg-round .tm-pick { min-width: 0; }
.tm-pick-btn { width: 100%; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--brand); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.tm-pick-btn:hover { border-color: #c9c5bd; background: #fcfbf9; }
.tm-pick-btn svg { color: #8a8f95; transition: transform .18s; }
.tm-pick.open .tm-pick-btn { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.tm-pick.open .tm-pick-btn svg { transform: rotate(180deg); color: var(--brand); }
.tm-pick-btn:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.tm-pick-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; padding: 6px; background: #fff; border: 1px solid #e7e4de; border-radius: 12px; box-shadow: 0 12px 28px rgba(31, 35, 40, .14), 0 2px 6px rgba(31, 35, 40, .06); max-height: 300px; overflow-y: auto; animation: tmpop .14s ease-out; }
.tm-pick-menu[hidden] { display: none; }
@keyframes tmpop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tm-pick-menu button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: #3b4652; font: inherit; font-size: .92rem; text-align: left; cursor: pointer; }
.tm-pick-menu button svg { opacity: 0; color: var(--brand); }
.tm-pick-menu button:hover, .tm-pick-menu button:focus-visible { background: #f1efeb; outline: none; }
.tm-pick-menu button.on { color: var(--brand); font-weight: 700; background: color-mix(in srgb, var(--brand) 7%, #fff); }
.tm-pick-menu button.on svg { opacity: 1; }
@container (max-width: 520px) { .mg-round .tm-pick { grid-column: 1 / -1; } }#marginBoxC .svc-list { overflow: visible; }
.tm-pick-menu { animation: none; }
.tm-pick-menu { max-height: 360px; }

/* the dropdown shows every choice: no height limit, no scroll bar */
.tm-pick-menu { max-height: none !important; overflow: visible !important; scrollbar-width: none; }
.tm-pick-menu::-webkit-scrollbar { display: none; }
.tm-pick-menu button { padding: 8px 10px; }

/* cut-outs: how many come in the per slab price before the rest are charged */
.item-row.cut-row { grid-template-columns: 44px minmax(0, 1fr) auto 130px 44px; }
.cut-free { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: #f1efeb; }
.cut-free button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; color: var(--brand); font-size: 1rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cut-free button:hover { background: var(--brand); color: #fff; }
.cut-free b { min-width: 18px; text-align: center; font-size: .9rem; color: var(--brand); }
.cut-free small { padding: 0 8px 0 4px; font-size: .74rem; color: var(--muted); font-weight: 600; }
.cut-free.off { visibility: hidden; }
@container (max-width: 560px) { .svc-row.item-row.cut-row { grid-template-columns: 40px minmax(0, 1fr) 96px 34px; } .cut-row .cut-free { grid-column: 2 / -1; grid-row: 2; justify-self: start; } .cut-row .cut-free.off { display: none; } }
/* new estimate – Job details on one screen: two columns on wider screens, compact pricing choices */
@media (min-width: 1000px) {
  .wstep[data-step="1"]:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start;
    grid-template-areas: "price client" "mat job" "kt kt"; }
  .wstep[data-step="1"] > .card { margin: 0; padding: 16px 18px; }
  .wstep[data-step="1"] > .card h2 { font-size: 1.02rem; margin: 0 0 10px; }
  .wstep[data-step="1"] .js-price { grid-area: price; }
  .wstep[data-step="1"] .js-client { grid-area: client; }
  .wstep[data-step="1"] .js-job { grid-area: job; }
  .wstep[data-step="1"] #matCard { grid-area: mat; }
  .wstep[data-step="1"] > .kt-slot { grid-area: kt; }
  .wstep[data-step="1"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .wstep[data-step="1"] .grid[style] { margin-top: 10px !important; }
  .wstep[data-step="1"] .field input, .wstep[data-step="1"] .field select { height: 38px; padding-top: 6px; padding-bottom: 6px; }
  .wstep[data-step="1"] .field textarea { min-height: 0; }
  .wstep[data-step="1"] .grid > .field:only-child { grid-column: 1 / -1; }
  /* pricing: compact choices – the name and a one-line summary (the full description on hover) */
  .wstep[data-step="1"] #pricePick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wstep[data-step="1"] .js-job .check { margin: 0; }
}
/* new estimate – pricing choices: compact cards (picture, name, one-line summary), ticked when chosen */
#pricePick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
#pricePick button { display: grid !important; grid-template-columns: 36px minmax(0, 1fr) 20px; align-items: center; gap: 10px; padding: 10px 12px !important; min-height: 0 !important; text-align: left; border-radius: 12px; }
#pricePick .pp-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #f1efeb; color: #52606b; }
#pricePick .pp-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#pricePick .pp-tx b { font-size: .92rem; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pricePick .pp-tx small { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
#pricePick .pp-tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #d6d2ca; color: transparent; }
#pricePick button.on .pp-ic { background: var(--brand); color: #fff; }
#pricePick button.on .pp-tick { background: var(--brand); border-color: var(--brand); color: #fff; }
#pricePick button span { margin: 0 !important; }
@media (min-width: 1000px) { .wstep[data-step="1"] #pricePick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Job details: two balanced columns – left Pricing then Client, right Job & site then Material */
@media (min-width: 1000px) {
  .wstep[data-step="1"]:not(.hidden) { grid-template-areas: "price job" "client job" "client mat" "kt kt"; grid-auto-rows: min-content; }
  .wstep[data-step="1"] .mat-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: end; }
  .wstep[data-step="1"] .mat-row .mat-col { min-width: 0; margin: 0; }
  .wstep[data-step="1"] .mat-row h3 { font-size: .82rem; margin: 0 0 6px; }
  .wstep[data-step="1"] #pricePick .pp-tx b { white-space: normal; }
  .wstep[data-step="1"] #pricePick .ps-def { font-size: .62rem; padding: 1px 6px; }
}
/* Job details: two columns stacked with no gaps (the boxes flow down the left, then the right) */
@media (min-width: 1000px) {
  .wstep[data-step="1"]:not(.hidden) { display: block; columns: 2; column-gap: 14px; }
  .wstep[data-step="1"] > .card, .wstep[data-step="1"] > .kt-slot { break-inside: avoid; display: block; width: 100%; margin: 0 0 14px !important; }
  .wstep[data-step="1"] > .kt-slot:empty { display: none; }
  .wstep[data-step="1"] > .card { padding: 14px 16px; }
  .wstep[data-step="1"] > .card h2 { margin: 0 0 8px; }
  .wstep[data-step="1"] .grid { gap: 8px 12px; }
  .wstep[data-step="1"] .grid[style] { margin-top: 8px !important; }
  .wstep[data-step="1"] .field { font-size: .82rem; gap: 4px; }
  .wstep[data-step="1"] .field input, .wstep[data-step="1"] .field select { height: 36px; }
  .wstep[data-step="1"] .js-job > div[style] { margin-top: 6px !important; }
}@media (min-width: 1000px) { .wstep[data-step="1"]:not(.hidden) { margin-bottom: -14px; } .wstep[data-step="1"] .js-client textarea { height: 46px; min-height: 0; resize: vertical; } }

/* Job details: Save / Next in the page, under the material (no bar along the bottom) */
.wstep[data-step="1"] > .js-bar { break-inside: avoid; display: block; margin: 0 0 14px; }
.wstep[data-step="1"] > .js-bar .bottom-bar.inline { position: static; width: auto; margin: 0; display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.wstep[data-step="1"] > .js-bar .bottom-bar.inline > div:first-child { display: none; }
main:has(.wstep[data-step="1"]:not(.hidden) .bottom-bar.inline) { padding-bottom: 24px; }
/* partner form: their address across the full width */
.pa-form .pa-addr { grid-column: 1 / -1; }
.pa-form .pa-addr textarea { min-height: 0; }

/* new estimate: who it's for (Fentons), and searching saved clients – both search boxes with a drop-down card */
.for-pick { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.for-lbl { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.for-box, .cl-search { position: relative; flex: 1; display: flex; align-items: center; }
.for-box > svg, .cl-search > svg { position: absolute; left: 11px; color: #8a8f95; pointer-events: none; }
.for-box input, .cl-search input { width: 100%; height: 38px; padding: 0 12px 0 34px !important; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: .9rem; }
.for-box input:focus, .cl-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.for-pick.has input { font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); border-color: color-mix(in srgb, var(--brand) 24%, #fff); }
.for-menu, .cl-menu { top: calc(100% + 6px); }
.for-menu button, .cl-menu button { align-items: flex-start; }
.for-menu button span, .cl-menu button span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.for-menu small, .cl-menu small { font-size: .74rem; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.cl-head h2 { margin: 0 !important; white-space: nowrap; }
.cl-search { max-width: 280px; }
.js-client, .js-price { overflow: visible; position: relative; z-index: 2; }
.cl-menu .cl-grp { padding: 6px 10px 2px; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* client details: the address beside the optional reference */
.wstep[data-step="1"] .grid.cl-addr { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 640px) { .wstep[data-step="1"] .grid.cl-addr { grid-template-columns: minmax(0, 1fr); } }

/* job page: the site details, editable once the estimate's accepted */
.site-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.site-h h2 { margin: 0; }
.site-form .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 12px; }
.jw-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jw-sec-h h4 { margin: 0; }
.jw-sec .site-form { margin-top: 8px; }
.jw-sec .site-form .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* a partner: everything in one pop-up – a side bar down the left, one section at a time on the right */
.pa-dlg.pa-side { width: min(920px, calc(100vw - 32px)); max-width: none; height: min(680px, calc(100vh - 40px)); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.pa-side .pa-main { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 0; }
.pa-side .pa-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-right: 1px solid var(--line); background: rgba(246, 245, 242, .7); overflow-y: auto; }
.pa-side .pa-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: #52606b; font: inherit; font-size: .9rem; font-weight: 500; text-align: left; cursor: pointer; }
.pa-side .pa-nav button:hover { background: rgba(255, 255, 255, .8); color: var(--brand); }
.pa-side .pa-nav button.on { background: #fff; color: var(--brand); font-weight: 700; box-shadow: inset 2px 0 0 var(--brand), 0 1px 3px rgba(0, 0, 0, .06); }
.pa-side .pa-nav span { flex: 1; }
.pa-side .pa-cnt { font-style: normal; font-size: .7rem; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e3e7eb; color: #3b4652; display: grid; place-items: center; }
.pa-side .pa-content { overflow-y: auto; padding: 16px 20px 18px; min-height: 0; }
.pa-side .pa-form { display: block; }
.pa-side .pa-pane { min-height: 0; }
.pa-side .pa-pt { margin: 0 0 4px; font-size: 1.05rem; }
.pa-side .pa-ph { margin: 0 0 12px; }
.pa-side .pa-sub { margin: 18px 0 8px; font-size: .92rem; }
.pa-side .pa-logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pa-side .pa-logo-row .pa-logobox { width: 220px; margin: 0; }
.pa-side .pa-actions { position: sticky; bottom: -18px; margin: 16px -20px -18px; padding: 12px 20px; background: rgba(250, 249, 247, .96); border-top: 1px solid var(--line); }
.pa-staff-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.pa-srow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; }
.pa-srow + .pa-srow { border-top: 1px solid var(--line); }
.pa-sav { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #eef1f4; color: #3b4652; font-weight: 700; font-size: .8rem; }
.pa-snm { display: flex; flex-direction: column; min-width: 0; }
.pa-snm small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-sopts { display: flex; gap: 12px; }
.pa-sopts .check { margin: 0; font-size: .85rem; }
.pa-sbtn { display: flex; gap: 6px; }
@media (max-width: 720px) {
  .pa-side .pa-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pa-side .pa-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .pa-side .pa-nav button { width: auto; white-space: nowrap; }
  .pa-srow { grid-template-columns: 36px minmax(0, 1fr); } .pa-sopts, .pa-sbtn { grid-column: 2; }
}
/* a partner's details: two columns, full-width rows where they need the room */
.pa-side .pa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.pa-side .pa-grid .pa-full { grid-column: 1 / -1; }
.pa-side .pa-addr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pa-side .pa-grid .opt { font-weight: 500; color: var(--muted); font-size: .78em; }
@media (max-width: 560px) { .pa-side .pa-grid, .pa-side .pa-addr-grid { grid-template-columns: minmax(0, 1fr); } }

/* partners list: the tags on a card wrap rather than pushing the page sideways */
.pa-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
.pa-card .pa-chips { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.pa-card > * { min-width: 0; }

/* a partner's details: three tight columns so it all fits without scrolling */
.pa-side .pa-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.pa-side .pa-g3 .pa-span2 { grid-column: span 2; }
.pa-side .pa-g3 .field { font-size: .8rem; gap: 3px; margin: 0; }
.pa-side .pa-g3 .field input { height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: .88rem; }
.pa-side [data-pane="details"] .pa-pt { margin-bottom: 8px; }
.pa-side [data-pane="details"] .pa-sub { margin: 12px 0 6px; }
.pa-side .pa-logo-mini > span { display: block; }
.pa-side .pa-logo-mini .pa-logo-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.pa-side .pa-logo-mini .pa-logobox { width: 64px; height: 36px; min-height: 0; margin: 0; padding: 2px; border-radius: 8px; flex: 0 0 auto; }
.pa-side .pa-logo-mini .pa-logobox img { max-height: 30px; }
.pa-side .pa-logo-mini .pa-logobox .muted { font-size: .66rem; }
.pa-side .pa-logo-mini .pa-logobtns { display: flex; gap: 4px; margin: 0; }
.pa-side .pa-logo-mini .pa-logobtns .btn { padding: 4px 8px; font-size: .74rem; }
.pa-side .pa-actions { margin-top: 14px; }
@media (max-width: 640px) { .pa-side .pa-g3 { grid-template-columns: minmax(0, 1fr); } .pa-side .pa-g3 .pa-span2 { grid-column: auto; } }
/* My account: tips switch and app colour */
.sw-line { display: flex; align-items: center; gap: 12px; font-size: .95rem; padding: 4px 0; }
.acc-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.acc-sw { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); padding: 0; min-height: 0; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.acc-sw:hover { transform: scale(1.08); }
.acc-sw.on { box-shadow: 0 0 0 2px var(--brand); }
.acc-sw.on::after { content: ''; position: absolute; left: 50%; top: 45%; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translate(-50%, -50%) rotate(45deg); }
.acc-custom { display: inline-flex; align-items: center; justify-content: center; background: conic-gradient(#e53935, #fdd835, #43a047, #1e88e5, #8e24aa, #e53935); }
.acc-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.acc-custom span { color: #fff; font-weight: 700; font-size: 1.1rem; text-shadow: 0 1px 2px rgba(0,0,0,.4); pointer-events: none; }
/* headings: an icon tile beside each page title; card titles with a small icon and a line under them */
.ph-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ph-wrap > div { min-width: 0; }
.ph-tile { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, #fff); color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 12%, transparent); }
.ph-tile svg { width: 24px; height: 24px; }
.page-head h1, .dash-head h1 { font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
.page-head h1 { font-size: 1.65rem; margin: 0 0 2px; }
.page-head.slim h1 { margin: 0; }
.dash-head { align-items: center; }
.card > h2:first-child { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.01em;
  padding-bottom: 11px; margin-bottom: 14px; border-bottom: 1px solid color-mix(in srgb, var(--brand) 10%, #ece8e3); }
.card > h2:first-child + p.muted { margin-top: 0 !important; }
.ch-ic { flex: none; display: inline-grid; place-items: center; color: var(--brand); }
.ch-ic svg { width: 19px; height: 19px; }
@media (max-width: 700px) { .ph-tile { width: 38px; height: 38px; border-radius: 11px; } .ph-tile svg { width: 20px; height: 20px; } .ph-wrap { gap: 10px; } }
@media print { .ph-tile, .ch-ic { display: none !important; } }
table[data-key="edges"] .kept-cell { display: none; }
/* show / hide password */
.pw-wrap { position: relative; display: inline-block; max-width: 100%; }
.pw-wrap.blk { display: block; }
.pw-wrap > input { padding-right: 44px !important; }
.pw-wrap.blk > input { width: 100%; box-sizing: border-box; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #6b7882; display: grid; place-items: center; cursor: pointer; box-shadow: none; }
.pw-eye:hover { color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.pw-eye:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pw-eye svg { width: 19px; height: 19px; }
.lg-f .pw-wrap { display: block; width: 100%; } .lg-f .pw-wrap > input { width: 100%; box-sizing: border-box; }
table[data-key="cutouts"] .kept-cell { display: none; }
table[data-key="edges"] th:nth-child(8), table[data-key="edges"] td.kept-cell { display: none !important; }
/* the settings side bar: one clear way back to all settings */
.set-nav .sn-back { display: flex !important; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px !important; margin: 0 0 10px !important; border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent) !important;
  border-radius: 10px; background: color-mix(in srgb, var(--brand) 6%, #fff); color: var(--brand); font-weight: 600; text-decoration: none !important; transition: background .15s, border-color .15s; }
.set-nav .sn-back:hover { background: color-mix(in srgb, var(--brand) 12%, #fff); border-color: color-mix(in srgb, var(--brand) 40%, transparent) !important; }
/* Travel: London's Congestion Charge and ULEZ */
.zchg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 8px; }
.zchg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--brand) 3%, #fff); display: grid; gap: 8px; align-content: start; }
.zchg .pa-switch { margin: 0; }
.zchg textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .86rem; letter-spacing: .02em; resize: vertical; min-height: 64px; }
/* the settings side bar: one type scale throughout (same size items, quiet small headings, no stray bold) */
.set-nav, .set-nav button, .set-nav a, .set-nav .sn-label, .set-nav .set-savebar, .set-nav .sn-auto { font-family: inherit !important; }
.set-nav button, .set-nav a.sn-other { font-size: .9rem !important; font-weight: 500 !important; letter-spacing: 0 !important; }
.set-nav button.on { font-weight: 600 !important; }
.set-nav .sn-back { font-size: .9rem !important; font-weight: 600 !important; }
.set-nav .sn-label { font-size: .75rem !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--muted) !important; padding: 12px 12px 4px !important; }
.set-nav .set-savebar, .set-nav .set-savebar * , .set-nav .sn-auto, .set-nav .sn-auto * { font-size: .8rem !important; letter-spacing: 0 !important; }
.set-nav .set-savebar b, .set-nav .set-savebar [data-sv-t], .set-nav .sn-auto b { font-weight: 600 !important; }
.set-nav .set-savebar.sv-saved [data-sv-t]::before { content: ''; display: inline-block; width: 9px; height: 5px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-2px); margin-right: 7px; }
/* Travel: distances on the left, London charges on the right – all on one screen */
.trv-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.trv-left .grid { grid-template-columns: 1fr 1fr; }
.trv-right .set-sub { margin-top: 0; }
.trv-left .set-sub { margin-top: 12px; }
.zchg-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
.zchg { gap: 6px !important; padding: 10px 12px !important; }
.zchg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.zchg-top .unit-in { flex: none; }
.zchg-top .unit-in input { width: 74px; }
.zchg textarea { field-sizing: content; min-height: 40px !important; max-height: none; overflow: hidden; resize: none !important; }
.zchg .field > span { font-size: .8rem; }
@media (max-width: 1000px) { .trv-cols { grid-template-columns: 1fr; } }
/* settings pages have no bar along the bottom: no need for the space kept for one */
main:has(> .set-layout) { padding-bottom: 24px !important; }
/* Pricing settings → Price ranges */
.rg-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; background: #fff; display: grid; gap: 12px; }
.rg-head { display: flex; align-items: center; gap: 10px; }
.rg-name { flex: 1; min-width: 0; font-size: 1.05rem !important; font-weight: 600; color: var(--brand); border-color: transparent !important; background: color-mix(in srgb, var(--brand) 5%, #fff) !important; }
.rg-count { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.rg-prices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rg-p { display: grid; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.rg-p .unit-in input { width: 100%; min-width: 0; }
.rg-mats { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 8%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); font-size: .85rem; }
.rg-chip small { color: var(--muted); }
.rg-chip button { width: 22px; height: 22px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.rg-chip button:hover { background: color-mix(in srgb, var(--brand) 14%, #fff); color: var(--brand); }
.rg-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 12px; border-radius: 12px; background: #faf9f6; border: 1px solid var(--line); }
.rg-grp-h { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.rg-opt { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .9rem; cursor: pointer; }
.rg-opt.taken { opacity: .55; cursor: default; }
.rg-opt small { color: var(--muted); }
.rg-empty { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
@media (max-width: 760px) { .rg-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* a price structure's own note under its name: only Fentons see it */
.ps-note-in { display: block; width: 100%; max-width: 520px; margin: 0 0 2px -7px; padding: 2px 6px; border: 1px solid transparent; border-radius: 8px; background: transparent; font: inherit; font-size: .92rem; color: var(--ink); }
.ps-note-in:hover { border-color: var(--line); }
.ps-note-in:focus { border-color: var(--brand); background: #fff; outline: none; }
.ps-note-in::placeholder { color: var(--muted); font-style: italic; }
.rg-opt input[type=checkbox] { width: 16px !important; height: 16px !important; min-height: 0 !important; flex: none; margin: 0; accent-color: var(--brand); }
.rg-opt { justify-content: flex-start; text-align: left; }
/* Price ranges: cards like the price structures, and the open range */
.rg-card2 .rg-n, .rg-mh .rg-n { font-size: .78rem; color: var(--muted); font-weight: 500; }
.rg-card2 .ps-body > span:nth-child(2) { font-size: .85rem; color: var(--muted); }
.rg-open { display: grid; gap: 10px; }
.rg-top { display: flex; align-items: center; gap: 12px; }
.rg-top .rg-name { flex: 1; min-width: 0; font-size: 1.2rem !important; font-weight: 700; color: var(--ink); background: transparent !important; border: 1px solid transparent !important; padding: 4px 8px; }
.rg-top .rg-name:hover { border-color: var(--line) !important; }
.rg-top .rg-name:focus { border-color: var(--brand) !important; background: #fff !important; }
.rg-acts { display: flex; gap: 8px; flex: none; }
.rg-open .set-sub { margin: 8px 0 2px; }
.rg-mh { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rg-mh .set-sub { display: flex; align-items: baseline; gap: 10px; }
.rg-find { width: 260px; max-width: 100%; }
.rg-opt { padding: 6px 10px !important; border-radius: 8px; border: 1px solid transparent; }
.rg-opt:hover { background: #fff; }
.rg-opt.on { background: color-mix(in srgb, var(--brand) 8%, #fff); border-color: color-mix(in srgb, var(--brand) 22%, transparent); font-weight: 600; }
@media (max-width: 700px) { .rg-top { flex-wrap: wrap; } }
.rg-top { flex-wrap: wrap; } .rg-top .rg-name { flex: 1 1 240px; }
/* Price ranges: each price as a tile – small label, big £ figure, quiet unit, an outline in the app colour while typing */
.rg-open .rg-prices { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rg-open .rg-p { position: relative; display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 40, .04); transition: border-color .15s, box-shadow .15s; cursor: text; }
.rg-open .rg-p:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.rg-open .rg-p:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.rg-open .rg-p > span:first-child { font-size: .76rem; font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: none; }
.rg-open .rg-p .unit-in { display: flex !important; align-items: baseline; gap: 4px; height: auto !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
.rg-open .rg-p .unit-in i { font-style: normal; }
.rg-open .rg-p .unit-in i:first-child { font-size: 1.15rem; font-weight: 700; color: var(--brand); }
.rg-open .rg-p .unit-in i:last-child { font-size: .78rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.rg-open .rg-p input { flex: 1; width: 100% !important; min-width: 0; height: auto !important; min-height: 0 !important; padding: 0 !important; margin: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none;
  font: inherit; font-size: 1.45rem !important; font-weight: 700; color: var(--ink); text-align: left; -moz-appearance: textfield; }
.rg-open .rg-p input::-webkit-outer-spin-button, .rg-open .rg-p input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rg-open .rg-p input::placeholder { font-size: 1rem; font-weight: 500; color: color-mix(in srgb, var(--muted) 70%, transparent); }
@media (max-width: 900px) { .rg-open .rg-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Price ranges: the slab size the slab prices are for */
.rg-size { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--brand) 3%, #fff); }
.rg-size-l { font-size: .85rem; font-weight: 600; color: var(--ink); margin-right: 4px; }
.rg-size .unit-in input { width: 74px; text-align: right; }
.rg-x { color: var(--muted); }
.rg-area { margin-left: auto; font-size: .82rem; color: var(--muted); font-weight: 600; }
/* Price ranges: picking materials – a tile for each, ticked when it's in the range */
.rg-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rg-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #f1efeb; }
.rg-seg button { border: 0; background: transparent; padding: 6px 12px; min-height: 0; border-radius: 8px; font: inherit; font-size: .84rem; font-weight: 500; color: var(--muted); cursor: pointer; }
.rg-seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.rg-pick2 { display: grid; gap: 14px; }
.rg-grp2 { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fcfbf9; }
.rg-grp2-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rg-grp2-h b { font-size: .95rem; }
.rg-all { margin-left: auto; border: 0; background: none; min-height: 0; padding: 4px 8px; border-radius: 8px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--brand); cursor: pointer; }
.rg-all:hover { background: color-mix(in srgb, var(--brand) 8%, #fff); }
.rg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.rg-tile { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 36px 9px 9px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  transition: border-color .12s, box-shadow .12s, background .12s; }
.rg-tile:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.rg-tile input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.rg-tile:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.rg-sw { flex: none; width: 38px; height: 38px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--brand);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, #fff), color-mix(in srgb, var(--brand) 22%, #fff)); }
.rg-sw img { width: 100%; height: 100%; object-fit: cover; }
.rg-tx { display: grid; min-width: 0; }
.rg-tx b { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-tx small { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-tick { position: absolute; top: 50%; right: 10px; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; }
.rg-tile.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.rg-tile.on .rg-tick { border-color: var(--brand); background: var(--brand); }
.rg-tile.on .rg-tick::after { content: ''; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rg-tile.taken { opacity: .5; cursor: not-allowed; }
/* Price ranges: the slab size as the first tile in the price row */
.rg-open .rg-prices { grid-template-columns: minmax(0, 1.35fr) repeat(4, minmax(0, 1fr)) !important; }
.rg-open .rg-p-size { cursor: default; background: color-mix(in srgb, var(--brand) 4%, #fff); }
.rg-sz-in { display: flex; align-items: baseline; gap: 4px; }
.rg-open .rg-sz-in input { width: 4.2ch !important; flex: none !important; text-align: left; }
.rg-sz-in .rg-x { color: var(--muted); font-weight: 500; padding: 0 2px; }
.rg-sz-in i { font-style: normal; font-size: .78rem; font-weight: 500; color: var(--muted); margin-left: 2px; }
.rg-p-size .rg-area { font-size: .74rem; color: var(--muted); font-weight: 500; margin-left: 0 !important; }
@media (max-width: 1100px) { .rg-open .rg-prices { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 700px) { .rg-open .rg-prices { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* (a range's note under the material box: the three boxes stay in line) */
.wstep[data-step="1"] .mat-row { align-items: start !important; }
.rg-mat-note { margin: 4px 0 0; }
/* Pricing settings → Cut-outs: the same look as the edge profiles list */
table[data-key="cutouts"] { border-collapse: separate; border-spacing: 0; width: 100%; }
table[data-key="cutouts"] thead th { background: none; font-size: .7rem; letter-spacing: .05em; padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table[data-key="cutouts"] td { padding: 7px 5px; border-bottom: 1px solid #efece7; vertical-align: middle; }
table[data-key="cutouts"] tbody tr:last-child td { border-bottom: 0; }
table[data-key="cutouts"] tbody tr:hover td { background: #faf9f6; }
table[data-key="cutouts"] input:not([type="checkbox"]):not([type="color"]) { height: 36px; border-color: transparent; background: #f4f2ee; border-radius: 7px; }
table[data-key="cutouts"] input:not([type="checkbox"]):not([type="color"]):focus { background: #fff; border-color: var(--brand); }
table[data-key="cutouts"] [data-c="name"] { min-width: 160px; width: 100%; font-weight: 600; color: var(--brand); }
table[data-key="cutouts"] .unit-in input { width: 90px; text-align: right; }
table[data-key="cutouts"] th:nth-child(2) { width: 100%; }
table[data-key="cutouts"] .cut-pic { color: var(--brand); }
/* Travel: London charges & crossings – one tidy row each: switch, name and where, price */
.zchg-list { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.zchg-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #efece7; }
.zchg-row:last-child { border-bottom: 0; }
.zchg-row.off .zchg-nm, .zchg-row.off .unit-in { opacity: .45; }
.zchg-sw { position: relative; flex: none; cursor: pointer; }
.zchg-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.zchg-tg { display: block; width: 38px; height: 22px; border-radius: 999px; background: #cfd5db; position: relative; transition: background .15s; }
.zchg-tg::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.zchg-sw input:checked + .zchg-tg { background: var(--brand); }
.zchg-sw input:checked + .zchg-tg::after { left: 19px; }
.zchg-sw input:focus-visible + .zchg-tg { outline: 2px solid var(--brand); outline-offset: 2px; }
.zchg-nm { flex: 1; min-width: 0; display: grid; }
.zchg-nm b { font-size: .92rem; }
.zchg-nm small { font-size: .76rem; color: var(--muted); }
.zchg-row .unit-in { flex: none; }
.zchg-row .unit-in input { width: 70px; text-align: right; }
.zchg-row .unit-in i:last-child { min-width: 54px; }
.zchg-row:has(.zchg-sw input:not(:checked)) .zchg-nm, .zchg-row:has(.zchg-sw input:not(:checked)) .unit-in { opacity: .45; }
.zchg-row:has(.zchg-sw input:checked) .zchg-nm, .zchg-row:has(.zchg-sw input:checked) .unit-in { opacity: 1; }
/* the bin on a price structure or range card */
.ps-bin { flex: none; width: 34px; height: 34px; min-height: 0; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.ps-bin:hover { background: #fdecec; color: #c0392b; border-color: #f5c6c6; }
.ps-bin:focus-visible { outline: 2px solid #c0392b; outline-offset: 1px; }
/* a per m² price structure's set price */
.m2set { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.m2set .m2set-p { position: relative; display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; min-width: 220px; cursor: text; }
.m2set .m2set-p:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.m2set .m2set-p > span:first-child { font-size: .76rem; font-weight: 600; color: var(--muted); }
.m2set .unit-in { display: flex !important; align-items: baseline; gap: 4px; padding: 0 !important; background: none !important; height: auto !important; }
.m2set .unit-in i { font-style: normal; }
.m2set .unit-in i:first-child { font-size: 1.15rem; font-weight: 700; color: var(--brand); }
.m2set .unit-in i:last-child { font-size: .78rem; color: var(--muted); }
.m2set input { flex: 1; width: 100% !important; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; height: auto !important; font-size: 1.45rem !important; font-weight: 700; color: var(--ink); -moz-appearance: textfield; }
.m2set input::-webkit-outer-spin-button, .m2set input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.m2set input::placeholder { font-size: 1rem; font-weight: 500; color: var(--muted); }
.m2set-eg { margin: 0; flex: 1; min-width: 200px; }
.m2set input { text-align: left !important; }
/* per m²: the material's own price, plus the set price */
.m2-mat { background: color-mix(in srgb, var(--brand) 4%, #fff) !important; cursor: default !important; }
.m2-mat b { font-size: 1.05rem; color: var(--ink); }
.m2-mat small { font-size: .74rem; color: var(--muted); font-weight: 500; }
.m2-op { font-size: 1.6rem; font-weight: 300; color: var(--muted); }
.m2set-eg b { color: var(--ink); }
.m2-mode { margin-bottom: 12px; }
/* price tiles (price ranges, per m² set price): only the tile shows it's being typed in – no boxes inside it */
.m2set .unit-in, .m2set .unit-in:focus-within, .rg-open .rg-p .unit-in, .rg-open .rg-p .unit-in:focus-within, .rg-sz-in {
  border: 0 !important; box-shadow: none !important; outline: none !important; background: transparent !important; }
.m2set input, .m2set input:focus, .m2set input:hover, .rg-open .rg-p input, .rg-open .rg-p input:focus, .rg-open .rg-p input:hover {
  border: 0 !important; outline: none !important; box-shadow: none !important; background: transparent !important; border-radius: 0 !important; min-height: 0 !important; }
.m2set .m2set-p { min-height: 86px; align-content: start; }
.m2set .m2set-p .unit-in { margin-top: 2px; }
.m2set .m2set-p:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.m2set .m2set-p:focus-within { border-color: var(--brand) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.m2set .m2-mat:hover { border-color: var(--line); }
.m2set { display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 12px 14px; }
.m2set .m2-op { align-self: center; }
.m2set .m2set-p { min-width: 0 !important; }
.m2set .m2set-eg { grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) { .m2set { grid-template-columns: 1fr !important; } .m2set .m2-op { display: none; } }
/* price structures: taken off the list, and "built in" on your own */
.ps-removed { grid-column: 1 / -1; margin: 2px 0 0; font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ps-removed span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: #f1efeb; color: var(--ink); font-weight: 500; }
.link-btn { border: 0; background: none; padding: 2px 8px; min-height: 0; border-radius: 999px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--brand); cursor: pointer; }
.link-btn:hover { background: color-mix(in srgb, var(--brand) 10%, #fff); }
.ps-lock.on { background: color-mix(in srgb, var(--brand) 10%, #fff) !important; border-color: var(--brand) !important; color: var(--brand) !important; }
/* price structure cards: the switch with the bin under it, and the card's own note */
.ps-ctl { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.ps-ctl .ps-bin { width: 30px; height: 28px; }
.ps-sub { display: block; font-size: .8rem; color: var(--ink); opacity: .75; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* "are you sure?" pop-ups, app-wide: an icon, the question as a heading, the detail under it, two full buttons */
.dlg.dlg-ask { width: min(400px, calc(100vw - 32px)); padding: 26px 24px 20px; gap: 0; text-align: center; justify-items: center; border-radius: 20px; }
.dlg-ask .dlg-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, #fff); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 6%, transparent); }
.dlg-ask.dlg-danger .dlg-ic { color: #c0392b; background: #fdecea; box-shadow: 0 0 0 6px #fdf4f3; }
.dlg-ask .dlg-head { font-size: 1.08rem; font-weight: 700; line-height: 1.35; color: var(--ink); margin: 0; }
.dlg-ask .dlg-body { margin: 8px 0 0; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.dlg-ask .dlg-input { margin-top: 14px; width: 100%; box-sizing: border-box; }
.dlg-ask .dlg-err:not(:empty) { margin-top: 8px; }
.dlg-ask .dlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 20px; }
.dlg-ask .dlg-actions .btn { width: 100%; justify-content: center; min-height: 44px; border-radius: 12px; }
.dlg.dlg-ask { background: rgba(255, 255, 255, .96) !important; box-shadow: 0 24px 60px rgba(20, 30, 40, .22), 0 2px 6px rgba(20, 30, 40, .08) !important; }
/* how long a price structure's estimates stay valid: at the end of its tab row */
#ptJump .ps-valid { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 4px 6px 4px 14px; border-radius: 999px; background: #f1efeb; color: #52606b; font-size: .86rem; font-weight: 500; }
#ptJump .ps-valid input { width: 56px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 999px; background: #fff; text-align: center; font: inherit; font-weight: 600; color: #13202b; -moz-appearance: textfield; }
#ptJump .ps-valid input::-webkit-inner-spin-button, #ptJump .ps-valid input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#ptJump .ps-valid input:focus { outline: 2px solid var(--brand); outline-offset: 0; }
#ptJump .ps-valid span:last-child { padding-right: 8px; }
@media (max-width: 700px) { #ptJump .ps-valid { margin-left: 0; } }

/* ---- Material card: app-styled drop-downs, search box and thickness ---- */
.fsel { position: relative; }
.fsel-btn { width: 100%; height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px 0 16px; border: 1px solid #e3dfd8; border-radius: 12px; background: #f7f5f1; color: var(--brand); font: inherit; font-weight: 600; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.fsel-btn:hover { background: #fff; border-color: #d4cfc6; }
.fsel-btn:focus-visible, .fsel.open .fsel-btn { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.fsel-btn.empty { color: var(--muted); font-weight: 400; }
.fsel-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsel-btn[data-group]:not([data-group=""])::before { display: none; } .fsel-x { content: attr(data-group); order: -1; flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.fsel-btn[data-group]:not([data-group=""]) .fsel-val { flex: 1; }
.fsel-btn svg, .cpick-arrow svg { flex: 0 0 auto; color: var(--muted); transition: transform .18s; }
.fsel.open .fsel-btn svg { transform: rotate(180deg); color: var(--brand); }
.fsel-grp { padding: 10px 10px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fsel-grp:first-child { padding-top: 6px; }
.cpick-list { border: 1px solid #e3dfd8; border-radius: 14px; padding: 6px; box-shadow: 0 16px 40px rgba(20, 30, 40, .14), 0 2px 6px rgba(20, 30, 40, .06); }
.cpick-opt { border-radius: 9px; }
.cpick-opt.act { background: color-mix(in srgb, var(--brand) 8%, #fff); }
.cpick-opt.on span { color: var(--brand); }
.cpick-opt.on span::after { content: ''; display: inline-block; width: 6px; height: 11px; margin-left: 9px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
#matCard .cpick input { height: 46px; border: 1px solid #e3dfd8; border-radius: 12px; background: #f7f5f1; padding-left: 16px; transition: background .15s, border-color .15s, box-shadow .15s; }
#matCard .cpick input:hover { background: #fff; border-color: #d4cfc6; }
#matCard .cpick input:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
#matCard .cpick-arrow { display: flex; align-items: center; justify-content: center; top: 6px; bottom: 6px; right: 6px; border-radius: 9px; }
#matCard .cpick:focus-within .cpick-arrow svg { transform: rotate(180deg); color: var(--brand); }
#matCard .mat-col h3 { font-size: .74rem !important; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 7px !important; }
#matCard .th-seg { height: 46px; padding: 4px; gap: 4px; border: 1px solid #e3dfd8; border-radius: 12px; background: #f7f5f1; overflow: visible; }
#matCard .th-seg button { height: 100%; padding: 0 16px; border: 0 !important; border-radius: 9px; background: transparent; color: #52606b; font-size: .9rem; font-weight: 600; transition: background .15s, color .15s; }
#matCard .th-seg button:hover { color: var(--brand); background: rgba(255, 255, 255, .7); }
#matCard .th-seg button.on { background: var(--brand); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--brand) 25%, transparent); }
#matCard .rg-mat-note { margin: 7px 2px 0; }

.cpick-list.up { top: auto; bottom: calc(100% + 4px); }

.cpick-list.floating { position: fixed; right: auto; z-index: 1200; box-sizing: border-box; }

.fsel-list .cpick-opt { align-items: center; }
.fsel-list .cpick-opt.on span::after { display: none; }
.fsel-list .cpick-opt.on::after { content: ''; flex: 0 0 auto; width: 6px; height: 11px; margin: 0 4px 3px 0; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Job details (wider screens): Pricing then Material on the left, Client details on the right (as tall as the
   two together), any house types across the full width, and Save / Next under it all on the right */
@media (min-width: 1000px) {
  .wstep[data-step="1"]:not(.hidden) { display: grid !important; columns: auto !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 14px; align-items: stretch;
    grid-template-areas: "price client" "mat client" "kt kt" "bar bar"; margin-bottom: 0 !important; }
  .wstep[data-step="1"] > .card, .wstep[data-step="1"] > .kt-slot, .wstep[data-step="1"] > .js-bar { margin: 0 !important; }
  .wstep[data-step="1"] > .js-price { grid-area: price; }
  .wstep[data-step="1"] > .js-client { grid-area: client; }
  .wstep[data-step="1"] > #matCard { grid-area: mat; align-self: start; }
  .wstep[data-step="1"] > .kt-slot { grid-area: kt; }
  .wstep[data-step="1"] > .kt-slot:empty { display: none; }
  .wstep[data-step="1"] > .js-bar { grid-area: bar; }
  .wstep[data-step="1"] > .js-job { grid-column: 1 / -1; }
}

@media (min-width: 1000px) { .wstep[data-step="1"]:not(:has(> #matCard)) > .js-price { grid-row: 1 / span 2; } }

/* ---- the homeowners' pricing page (#/price) ---- */
.hp { max-width: 1040px; padding-bottom: 110px; }
.hp-head img { max-height: 54px; }
.hp-intro h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 4px 0 8px; }
.hp-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; }
.hp-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; background: #f1efeb; color: #52606b; font-size: .88rem; font-weight: 600; cursor: pointer; }
.hp-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: .78rem; }
.hp-steps li.on { background: var(--brand); color: #fff; }
.hp-steps li.on span { color: var(--brand); }
.hp-steps li.done span { background: color-mix(in srgb, var(--brand) 16%, #fff); color: var(--brand); }
.hp-mat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: end; }
.hp .mat-col h3, .hp-sub { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 7px; }
.hp-sub { margin-top: 20px; }
.hp .th-seg { height: 46px; padding: 4px; gap: 4px; border: 1px solid #e3dfd8; border-radius: 12px; background: #f7f5f1; display: flex; }
.hp .th-seg button { border: 0; border-radius: 9px; background: transparent; color: #52606b; font-weight: 600; padding: 0 16px; }
.hp .th-seg button.on { background: var(--brand); color: #fff; }
.hp #hpEdges .choice { display: inline-flex; align-items: center; gap: 8px; }
.hp-prof svg { width: 30px; height: 22px; display: block; }
.hp-post { max-width: 220px; height: 46px; border: 1px solid #e3dfd8; border-radius: 12px; background: #f7f5f1; padding: 0 16px; font: inherit; text-transform: uppercase; }
.hp-post:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.hp #drawing .d-canvas > svg { height: max(420px, calc(100vh - 330px)); }
.hp-res .cq-total { margin: 0; }
.hp-dwg { margin: 16px 0; border: 1px solid #ece9e4; border-radius: 14px; padding: 10px; background: #fff; }
.hp-dwg svg { width: 100%; height: auto; max-height: 380px; }
.hp-rem { margin: 0 0 6px; }
.hp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 12px 0; }
.hp-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(1040px, calc(100% - 24px)); z-index: 50; display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 18px; background: rgba(255, 255, 255, .96); box-shadow: 0 16px 40px rgba(20, 30, 40, .16), 0 2px 6px rgba(20, 30, 40, .06); }
.hp-price { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; }
.hp-price small { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.hp-price b { font-size: 1.5rem; color: var(--brand); }
.hp-done { text-align: center; padding: 40px 24px; }
.hp-tick { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); }
@media (max-width: 700px) { .hp-mat, .hp-form { grid-template-columns: 1fr; } .hp-bar { gap: 8px; } .hp-price b { font-size: 1.2rem; } .hp-price span { display: none; } }

.hp-inc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.hp-chip { padding: 3px 10px; border-radius: 999px; background: #f1efeb; color: #52606b; font-size: .8rem; font-weight: 600; }
.hp-post::placeholder { text-transform: none; }

/* ---- Pricing: the price structure drop-down (same look as the Material drop-downs) ---- */
.pp-row { margin-top: 2px; }
.pp-row .for-lbl { min-width: 0; }
.pp-dd { position: relative; flex: 1; min-width: 0; }
.pp-trig { width: 100%; min-height: 58px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 14px 8px 10px; border: 1px solid #e3dfd8; border-radius: 12px; background: #f7f5f1; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.pp-trig:hover { background: #fff; border-color: #d4cfc6; }
.pp-trig:focus-visible, .pp-row.open .pp-trig { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.pp-trig > svg { color: var(--muted); transition: transform .18s; }
.pp-row.open .pp-trig > svg { transform: rotate(180deg); color: var(--brand); }
.pp-trig .pp-ic, .pp-list .pp-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; flex: 0 0 auto; }
.pp-list .pp-ic { width: 34px; height: 34px; background: #f1efeb; color: #52606b; }
.pp-list .pp-opt.on .pp-ic { background: var(--brand); color: #fff; }
.pp-trig .pp-tx, .pp-list .pp-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pp-trig .pp-tx b, .pp-list .pp-tx b { display: flex; align-items: center; gap: 6px; font-size: .95rem; color: #13202b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-list .pp-tx b { font-size: .9rem; font-weight: 600; }
.pp-trig .pp-tx small, .pp-list .pp-tx small { font-size: .77rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.pp-trig .ps-def, .pp-list .ps-def { font-size: .62rem; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.pp-list { padding: 6px; }
.pp-list .pp-opt { display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; align-items: center; gap: 10px; padding: 7px 8px; }
.pp-list .pp-opt.on span::after { display: none; }
.pp-list .pp-opt::after { content: ''; }
.pp-list .pp-opt.on::after { width: 6px; height: 11px; margin: 0 0 3px 4px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pp-list .pp-opt.on .pp-tx b { color: var(--brand); }
.pp-search { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; padding: 0 12px; height: 40px; border: 1px solid #e3dfd8; border-radius: 10px; background: #f7f5f1; color: var(--muted); }
.pp-search:focus-within { background: #fff; border-color: var(--brand); }
.pp-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: .9rem; outline: none; padding: 0; height: 100%; box-shadow: none; }

/* price structure drop-down: a partner's own structures first, then the others */
.pp-list .pp-grp-them { color: var(--brand); }
.pp-list .pp-other { margin: 8px 6px 2px; padding-top: 8px; border-top: 1px solid #efece7; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pp-over { font-size: .62rem; padding: 1px 7px; border-radius: 999px; background: #fff4e5; color: #b45309; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.pp-trig.over { border-color: #f3c98b; }

.lg-bumped { margin: 10px auto 0; max-width: 420px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 244, 229, .92); color: #92400e; font-size: .86rem; line-height: 1.4; text-align: center; }

/* ---- Cut-outs and Times: neat rows in the app's style ---- */
.set-body table[data-key="cutouts"], .set-body .tm-table { border-collapse: separate !important; border-spacing: 0 6px !important; width: 100%; background: none !important; }
.set-body .table-wrap:has(> table[data-key="cutouts"]), .set-body .table-wrap:has(> .tm-table) { border: 0 !important; background: none !important; box-shadow: none !important; overflow: visible; padding: 0; }
.set-body table[data-key="cutouts"] thead th, .set-body .tm-table thead th { background: none !important; border: 0 !important; padding: 2px 12px 2px; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.set-body .tm-table thead th:not(:first-child) { text-align: center; width: 150px; }
.set-body table[data-key="cutouts"] tbody td, .set-body .tm-table tbody tr:not(.tm-grp) td { background: #fff !important; border-top: 1px solid #ece8e1 !important; border-bottom: 1px solid #ece8e1 !important; padding: 8px 10px; vertical-align: middle; transition: border-color .15s, box-shadow .15s; }
.set-body table[data-key="cutouts"] tbody td:first-child, .set-body .tm-table tbody tr:not(.tm-grp) td:first-child { border-left: 1px solid #ece8e1 !important; border-radius: 12px 0 0 12px; padding-left: 12px; }
.set-body table[data-key="cutouts"] tbody td:last-child, .set-body .tm-table tbody tr:not(.tm-grp) td:last-child { border-right: 1px solid #ece8e1 !important; border-radius: 0 12px 12px 0; }
.set-body table[data-key="cutouts"] tbody tr:hover td, .set-body .tm-table tbody tr:not(.tm-grp):hover td { border-color: #ddd8cf !important; }
/* group headings (Times) */
.set-body .tm-table tr.tm-grp td { background: none !important; border: 0 !important; padding: 14px 4px 2px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
.set-body .tm-table tbody tr:first-child.tm-grp td { padding-top: 4px; }
.set-body .tm-table tbody td:first-child { font-weight: 600; color: #13202b; }
.set-body .tm-table tbody td:first-child .muted { font-weight: 400; margin-left: 4px; }
.set-body .tm-table .own-pic, .set-body .tm-table .cut-pic { margin-right: 10px; vertical-align: middle; }
.set-body .tm-table tbody td:not(:first-child) { text-align: center; }
/* the name box (Cut-outs): plain text until it's clicked */
.set-body table[data-key="cutouts"] [data-c="name"] { height: 38px !important; padding: 0 10px; background: transparent !important; border: 1px solid transparent !important; border-radius: 9px !important; font-weight: 600; color: #13202b !important; }
.set-body table[data-key="cutouts"] [data-c="name"]:hover { background: #f7f5f1 !important; }
.set-body table[data-key="cutouts"] [data-c="name"]:focus { outline: none; background: #fff !important; border-color: var(--brand) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.set-body table[data-key="cutouts"] .cut-pic { width: 46px; height: 36px; border-radius: 9px; background: #f7f5f1; }
/* the £ / minutes boxes: one soft rounded box (no box inside a box) */
.set-body table[data-key="cutouts"] .unit-in, .set-body .tm-table .unit-in { display: inline-flex !important; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border: 1px solid #e3dfd8 !important; border-radius: 10px !important; background: #f7f5f1 !important; box-shadow: none !important; transition: background .15s, border-color .15s, box-shadow .15s; }
.set-body table[data-key="cutouts"] .unit-in:hover, .set-body .tm-table .unit-in:hover { background: #fff !important; border-color: #d4cfc6 !important; }
.set-body table[data-key="cutouts"] .unit-in:focus-within, .set-body .tm-table .unit-in:focus-within { background: #fff !important; border-color: var(--brand) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent) !important; }
.set-body table[data-key="cutouts"] .unit-in input, .set-body .tm-table .unit-in input { width: 64px !important; height: 100% !important; padding: 0 !important; border: 0 !important; outline: none !important; box-shadow: none !important; background: transparent !important; text-align: right; font: inherit; font-weight: 600; color: #13202b; -moz-appearance: textfield; }
.set-body table[data-key="cutouts"] .unit-in input::-webkit-inner-spin-button, .set-body .tm-table .unit-in input::-webkit-inner-spin-button, .set-body table[data-key="cutouts"] .unit-in input::-webkit-outer-spin-button, .set-body .tm-table .unit-in input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.set-body table[data-key="cutouts"] .unit-in i, .set-body .tm-table .unit-in i { font-style: normal; font-size: .8rem; color: var(--muted); }
.set-body table[data-key="cutouts"] td:nth-child(3) { width: 1%; white-space: nowrap; }
/* remove: a bin, like the rest of the app */
.set-body table[data-key="cutouts"] [data-del] { font-size: 0 !important; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 9px; color: #9aa0a6; }
.set-body table[data-key="cutouts"] [data-del]::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat; }
.set-body table[data-key="cutouts"] [data-del]:hover { background: #fdecea; color: #c0392b; }
.set-body table[data-key="cutouts"] td:last-child { width: 1%; }

.set-body table[data-key="cutouts"] [data-c="name"] { min-width: 0 !important; width: 100% !important; }
.set-body table[data-key="cutouts"] td:nth-child(2) { width: 100%; }
.set-body table[data-key="cutouts"] td { padding-left: 8px; padding-right: 8px; }

.set-body .tm-table thead th:not(:first-child) { width: 112px; }
.set-body .tm-table .unit-in { padding: 0 10px; }
.set-body .tm-table .unit-in input { width: 42px !important; }
.set-body .tm-table tbody td:not(:first-child) { padding-left: 6px; padding-right: 6px; width: 112px; }
.set-body .tm-table tbody td:first-child .muted { display: block; margin: 1px 0 0; font-size: .76rem; }
.set-body .tm-table tbody td:first-child:has(.own-pic, .cut-pic) .muted { margin-left: 0; }

/* ---- every £ / % / minutes box in Settings: one soft rounded box (no box inside a box), like the rest of the app ---- */
.set-body .unit-in { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border: 1px solid #e3dfd8 !important; border-radius: 10px !important; background: #f7f5f1 !important; box-shadow: none !important; transition: background .15s, border-color .15s, box-shadow .15s; }
.set-body .unit-in:hover { background: #fff !important; border-color: #d4cfc6 !important; }
.set-body .unit-in:focus-within { background: #fff !important; border-color: var(--brand) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent) !important; }
.set-body .unit-in input { min-width: 0; height: 38px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; outline: none !important; box-shadow: none !important; background: transparent !important; text-align: right; font: inherit; font-weight: 600; color: #13202b; -moz-appearance: textfield; }
.set-body .unit-in input::-webkit-inner-spin-button, .set-body .unit-in input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.set-body .unit-in i { font-style: normal; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.set-body .unit-in i:first-child { margin-right: 2px; }
.set-body .unit-in i:last-child { margin-left: 2px; }

/* every Remove (✕) button in Settings: a bin, like the rest of the app */
.set-body .icon-btn[title="Remove"] { font-size: 0 !important; width: 36px; height: 36px; min-height: 0; padding: 0; display: inline-grid; place-items: center; border-radius: 9px; color: #9aa0a6; }
.set-body .icon-btn[title="Remove"]::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat; }
.set-body .icon-btn[title="Remove"]:hover { background: #fdecea; color: #c0392b; }

/* ---- Cut-outs: a grid of cards (big picture, name, price, bin), like the price structure cards ---- */
.set-body table[data-key="cutouts"], .set-body table[data-key="cutouts"] tbody { display: block; }
.set-body table[data-key="cutouts"] thead { display: none; }
.set-body table[data-key="cutouts"] tbody { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.set-body table[data-key="cutouts"] tbody tr { display: grid !important; grid-template-columns: auto 1fr auto; grid-template-areas: "pic . del" "name name name" "price price price"; align-items: start; gap: 10px 8px; padding: 14px; background: #fff; border: 1px solid #ece8e1; border-radius: 14px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.set-body table[data-key="cutouts"] tbody tr:hover { border-color: #ddd8cf; box-shadow: 0 6px 18px rgba(20, 30, 40, .07); }
.set-body table[data-key="cutouts"] tbody tr:focus-within { border-color: color-mix(in srgb, var(--brand) 45%, #ece8e1); }
.set-body table[data-key="cutouts"] tbody td { display: block; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; width: auto !important; }
.set-body table[data-key="cutouts"] tbody td.kept-cell { display: none !important; }
.set-body table[data-key="cutouts"] tbody td:nth-child(1) { grid-area: pic; }
.set-body table[data-key="cutouts"] tbody td:nth-child(2) { grid-area: name; }
.set-body table[data-key="cutouts"] tbody td:nth-child(3) { grid-area: price; }
.set-body table[data-key="cutouts"] tbody td:last-child { grid-area: del; }
.set-body table[data-key="cutouts"] .cut-pic { width: 76px !important; height: 58px !important; border-radius: 12px !important; background: color-mix(in srgb, var(--brand) 7%, #f7f5f1) !important; }
.set-body table[data-key="cutouts"] .cut-pic svg { width: 58px !important; height: 44px !important; }
.set-body table[data-key="cutouts"] [data-c="name"] { height: 36px !important; margin-left: -8px; width: calc(100% + 8px) !important; padding: 0 8px; font-size: .98rem; }
.set-body table[data-key="cutouts"] .unit-in { display: flex !important; width: 100%; }
.set-body table[data-key="cutouts"] .unit-in input { flex: 1; width: auto !important; }
.set-body table[data-key="cutouts"] [data-del] { opacity: .55; transition: opacity .15s, background .15s, color .15s; }
.set-body table[data-key="cutouts"] tbody tr:hover [data-del], .set-body table[data-key="cutouts"] [data-del]:focus-visible { opacity: 1; }
.set-body [data-add="cutouts"] { margin-top: 14px !important; }

.set-body table[data-key="cutouts"] tbody td:first-child, .set-body table[data-key="cutouts"] tbody td:last-child { border: 0 !important; border-radius: 0 !important; padding: 0 !important; background: none !important; }

/* ---- Totals & payment ---- */
.set-body .tp-round { max-width: 340px; margin: 4px 0 18px; }
.set-body .tp-round .field { display: flex; flex-direction: column; gap: 7px; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.set-body .tp-round .fsel-btn { text-transform: none; letter-spacing: 0; font-size: 1rem; }
.set-body .tp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.set-body .tp-box { padding: 16px 18px 18px; background: #fff; border: 1px solid #ece8e1; border-radius: 16px; }
.set-body .tp-box .set-sub { margin: 0 0 2px; }
.set-body .tp-sub { margin: 0 0 12px; }
.set-body .tp-box .own-list { display: grid; gap: 8px; margin-bottom: 12px; }
.set-body .tp-box .own-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 0; border: 0; background: none; }
.set-body .tp-box .pay-label { height: 42px; padding: 0 12px; border: 1px solid #e3dfd8; border-radius: 10px; background: #f7f5f1; font: inherit; font-weight: 600; color: #13202b; transition: background .15s, border-color .15s, box-shadow .15s; }
.set-body .tp-box .pay-label:hover { background: #fff; border-color: #d4cfc6; }
.set-body .tp-box .pay-label:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.set-body .tp-box .unit-in input { width: 44px !important; }
.tp-seg { display: inline-flex; padding: 4px; gap: 4px; margin: 0 0 14px; border: 1px solid #e3dfd8; border-radius: 12px; background: #f7f5f1; height: auto !important; }
.tp-seg button { min-height: 0; height: 36px; padding: 0 16px; border: 0 !important; border-radius: 9px; background: transparent; color: #52606b; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.tp-seg button:hover { color: var(--brand); background: rgba(255, 255, 255, .7); }
.tp-seg button.on { background: var(--brand); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--brand) 25%, transparent); }
.tp-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; color: #13202b; }
.tp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tp-quick button { min-height: 0; height: 32px; padding: 0 12px; border: 1px solid #e3dfd8; border-radius: 999px; background: #fff; color: #52606b; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.tp-quick button:hover { border-color: var(--brand); color: var(--brand); }
.tp-quick button.on { background: color-mix(in srgb, var(--brand) 10%, #fff); border-color: var(--brand); color: var(--brand); }
.tp-eg { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #efece7; }

/* ---- partner form: how they pay ---- */
.pa-terms .pa-tt-seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; margin: 6px 0 10px; border: 1px solid #e3dfd8; border-radius: 12px; background: #f7f5f1; }
.pa-tt { position: relative; display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 9px; font-size: .86rem; font-weight: 600; color: #52606b; cursor: pointer; }
.pa-tt input { position: absolute; opacity: 0; pointer-events: none; }
.pa-tt:hover { color: var(--brand); background: rgba(255, 255, 255, .7); }
.pa-tt.on { background: var(--brand); color: #fff; }
.pa-tt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.pa-tt-more { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 600; }
.pa-tt-more[hidden] { display: none; }
.pa-tt-more .unit-in { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border: 1px solid #e3dfd8; border-radius: 10px; background: #f7f5f1; }
.pa-tt-more .unit-in:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.pa-tt-more .unit-in input { width: 48px; height: 38px; padding: 0; border: 0; outline: none; background: transparent; box-shadow: none; text-align: right; font: inherit; font-weight: 600; -moz-appearance: textfield; }
.pa-tt-more .unit-in input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pa-tt-more .unit-in i { font-style: normal; font-size: .8rem; color: var(--muted); }

/* price range: each stockist opens and closes */
.rg-grp2-h { gap: 10px; }
.rg-tog { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 0; padding: 4px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rg-tog b { font-size: .98rem; color: #13202b; }
.rg-tog:hover b { color: var(--brand); }
.rg-chev { flex: 0 0 auto; color: var(--muted); transition: transform .18s; }
.rg-grp2.open .rg-chev { transform: rotate(90deg); color: var(--brand); }
.rg-in-n { padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-size: .72rem; font-weight: 700; }
.rg-grp2:not(.open) { cursor: pointer; }
.rg-grp2:not(.open):hover { border-color: #ddd8cf; }
.rg-grp2 .rg-tiles { margin-top: 10px; }

.pa-adj.pa-terms { display: block !important; grid-template-columns: none !important; margin-top: 14px; }
.pa-adj.pa-terms > .field-lbl { display: block; margin-bottom: 2px; }
.pa-adj.pa-terms .pa-tt-seg { display: inline-flex !important; width: auto; }
.pa-adj.pa-terms > p { margin: 2px 0 0; }

/* ---- Become a partner (sign-in page) ---- */
.lg-apply { margin: 14px 0 0; text-align: center; font-size: .86rem; color: var(--muted); }
.lg-apply-btn { min-height: 0; margin-left: 4px; padding: 6px 14px; border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); border-radius: 999px; background: rgba(255, 255, 255, .7); color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
.lg-apply-btn:hover { background: #fff; border-color: var(--brand); }
.ap-box { max-width: 640px; width: calc(100% - 32px); }
.ap-card { margin-top: 18px; padding: 24px 26px; background: rgba(255, 255, 255, .92); border: 1px solid rgba(255, 255, 255, .9); border-radius: 20px; box-shadow: 0 20px 50px rgba(20, 30, 40, .12); text-align: left; }
.ap-card h1 { margin: 0 0 4px; font-size: 1.35rem; }
.ap-h { margin: 18px 0 8px; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.ap-grid .ap-wide { grid-column: 1 / -1; }
.ap-grid .field { display: flex; flex-direction: column; gap: 5px; margin: 0; font-size: .82rem; font-weight: 600; color: #3b4650; }
.ap-grid input, .ap-grid textarea { width: 100%; box-sizing: border-box; height: 42px; padding: 0 12px; border: 1px solid #e3dfd8; border-radius: 10px; background: #f7f5f1; font: inherit; font-size: .95rem; font-weight: 400; color: #13202b; transition: background .15s, border-color .15s, box-shadow .15s; }
.ap-grid textarea { height: auto; padding: 10px 12px; resize: vertical; }
.ap-grid input:focus, .ap-grid textarea:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.ap-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ap-acts { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
#apErr { margin-top: 10px; }
.ap-done { text-align: center; padding: 10px 0; }
.ap-done .ap-tick { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 10px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); }
.ap-done p { margin: 6px 0 18px; }
@media (max-width: 560px) { .ap-grid { grid-template-columns: 1fr; } .ap-card { padding: 20px 16px; } }
/* Become a partner: fits on one screen – a smaller logo, tighter spacing, and three columns on wide screens */
.ap-wrap { padding-top: 12px; padding-bottom: 12px; }
.ap-wrap .lg-logo { margin-bottom: 4px; }
.ap-wrap .lg-logo .logos img { height: 60px !important; }
.ap-wrap .ap-card { margin-top: 10px; padding: 20px 24px; }
.ap-wrap .ap-card > p { margin: 0; }
.ap-wrap .ap-h { margin: 14px 0 6px; }
.ap-wrap .ap-grid { gap: 8px 12px; }
.ap-wrap .ap-grid .field { gap: 4px; }
.ap-wrap .ap-grid input { height: 38px; }
.ap-wrap .ap-grid textarea { min-height: 38px; height: 52px; padding: 8px 12px; }
.ap-wrap .ap-acts { margin-top: 14px; }
.ap-wrap .error:empty { display: none; }
@media (min-width: 900px) {
  .ap-wrap .ap-box { width: min(900px, 100%); max-width: 900px; }
  .ap-wrap .ap-grid { grid-template-columns: repeat(3, 1fr); }
  .ap-wrap .ap-company { grid-column: span 2; }
  .ap-wrap .ap-site { grid-column: span 1; }
}
/* short screens: tuck the logo away so the form still fits */
@media (max-height: 760px) and (min-width: 561px) { .ap-wrap .lg-logo, .ap-wrap .lg-name { display: none; } .ap-wrap .ap-card { margin-top: 0; } }

/* ---- Partners: applications waiting for approval ---- */
.pa-apps { margin: 0 0 16px; padding: 16px 18px; background: #fff; border: 1px solid #f3c98b; border-radius: 16px; box-shadow: 0 0 0 4px rgba(243, 201, 139, .15); }
.pa-apps h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 1.02rem; }
.pa-apps-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #b45309; color: #fff; font-size: .75rem; }
.pa-apps > p { margin: 0 0 10px; }
.pa-app { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #ece8e1; border-radius: 12px; background: #fdfcfa; }
.pa-app + .pa-app { margin-top: 8px; }
.pa-app-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pa-app-tx b { font-size: .98rem; }
.pa-app-tx > span { font-size: .86rem; color: #3b4650; }
.pa-app-tx q { margin-top: 4px; font-size: .84rem; font-style: italic; color: #52606b; }
.pa-app-acts { display: flex; gap: 8px; flex: 0 0 auto; }
@media (max-width: 640px) { .pa-app { flex-wrap: wrap; } .pa-app-acts { width: 100%; justify-content: flex-end; } }

/* ---- installed app: "new version" and "offline" bars ---- */
.app-bar { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3000; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); padding: 10px 10px 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .97); border: 1px solid #ece8e1; box-shadow: 0 18px 48px rgba(20, 30, 40, .2), 0 2px 6px rgba(20, 30, 40, .08); animation: appBarIn .25s ease-out; }
@keyframes appBarIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.app-bar-ic { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); }
.app-off .app-bar-ic { background: #fff4e5; color: #b45309; }
.app-off { padding-right: 18px; }
.app-bar-tx { display: flex; flex-direction: column; min-width: 0; }
.app-bar-tx b { font-size: .92rem; color: #13202b; }
.app-bar-tx small { font-size: .78rem; color: var(--muted); }
.app-bar button { min-height: 0; height: 38px; padding: 0 14px; border-radius: 10px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.app-bar-later { border: 1px solid #e3dfd8; background: #fff; color: #52606b; }
.app-bar-later:hover { border-color: #d4cfc6; color: #13202b; }
.app-bar-go { border: 1px solid var(--brand); background: var(--brand); color: #fff; }
.app-bar-go:hover { filter: brightness(1.08); }
@media (max-width: 560px) { .app-bar { flex-wrap: wrap; } .app-bar-tx { flex: 1 1 60%; } }
@media (prefers-reduced-motion: reduce) { .app-bar { animation: none; } }

.app-offpage { text-align: center; max-width: 380px; }
.app-offpage img { border-radius: 18px; box-shadow: 0 12px 30px rgba(20, 30, 40, .18); }
.app-offpage h1 { margin: 14px 0 6px; font-size: 1.4rem; }
.app-offpage p { margin: 0; line-height: 1.5; }

/* Partners: an on/off switch beside each partner with a login, and a "Deactivated" group under the rest */
.pa-row { position: relative; min-width: 0; }
.pa-row.has-tog .pa-card { padding-right: 128px; }
.pa-tog { position: absolute; right: 44px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 6px 4px; cursor: pointer; user-select: none; }
.pa-tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pa-tog-t { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #cfd5da; transition: background .15s; flex: none; }
.pa-tog-t::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.pa-tog input:checked + .pa-tog-t { background: var(--brand); }
.pa-tog input:checked + .pa-tog-t::after { transform: translateX(18px); }
.pa-tog input:focus-visible + .pa-tog-t { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.pa-tog input:disabled + .pa-tog-t { opacity: .55; }
.pa-tog-l { width: 40px; font-size: .78rem; font-weight: 600; color: #52606b; }
.pa-tog input:checked ~ .pa-tog-l { color: var(--brand); }
.pa-off-h { display: flex; align-items: center; gap: 8px; margin: 26px 0 2px; font-size: 1.02rem; }
.pa-off-h .pa-apps-n { background: #64748b; }
.pa-off-p { margin: 0 0 10px; }
@media (max-width: 640px) {
  .pa-row.has-tog .pa-card { padding-right: 16px; padding-bottom: 46px; }
  .pa-tog { top: auto; bottom: 8px; right: 14px; transform: none; }
}

/* Slab layout: moving a seam from the side panel (one piece longer, the next shorter) */
.n-seams { margin-top: 6px; }
.n-seams > p { margin: 0 0 8px; }
.n-seam { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.n-seam-h { font-size: .86rem; margin-bottom: 8px; color: #3b4650; }
.n-seam-row { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 8px; }
.n-seam-row .btn { min-width: 48px; height: 38px; padding: 0 8px; }
.n-seam-len { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: .78rem; font-weight: 600; color: #52606b; }
.n-seam-len > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-seam-in { position: relative; display: block; }
.n-seam-in input { width: 100%; box-sizing: border-box; height: 38px; padding: 0 34px 0 10px; border: 1px solid #e3dfd8; border-radius: 10px; background: #f7f5f1; font: inherit; font-size: 1rem; font-weight: 600; color: #13202b; text-align: center; }
.n-seam-in input:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.n-seam-in i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .78rem; color: #8a949c; pointer-events: none; }
.n-seam-other { margin-top: 6px; }
.n-seam-fill { width: 100%; margin-top: 8px; }
.n-seam-msg { margin-top: 8px; padding: 6px 10px; border-radius: 8px; font-size: .82rem; background: #e8f3ec; color: #1f6b3a; }
.n-seam-msg.bad { background: #fdecea; color: #a12a1f; }
.n-seam-none { margin-top: 10px; }

/* The test site: a bright bar across the top of every page, so it's never mistaken for the real TopM8 */
.test-site-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 99999; padding: 5px 16px; background: repeating-linear-gradient(135deg, #b45309 0 14px, #c2620f 14px 28px); color: #fff; font: 700 12.5px/1.3 system-ui, Segoe UI, sans-serif; letter-spacing: .02em; text-align: center; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
body.is-test-site { padding-top: 26px; }
@media print { .test-site-bar { display: none; } body.is-test-site { padding-top: 0; } }

/* Slab layout: the "Change seams" pop-up – the real drawing, with only the Seam tool */
.seam-pop-wrap { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 18px; background: rgba(20, 30, 40, .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
body.seam-pop-open { overflow: hidden; }
.seam-pop { display: flex; flex-direction: column; width: min(1400px, 100%); height: min(900px, calc(100vh - 36px)); background: rgba(255, 255, 255, .97); border: 1px solid rgba(255, 255, 255, .9); border-radius: 20px; box-shadow: 0 24px 60px rgba(20, 30, 40, .28); overflow: hidden; }
.seam-pop-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.seam-pop-h h2 { margin: 0 0 2px; font-size: 1.15rem; }
.seam-pop-h p { margin: 0; max-width: 760px; }
.seam-pop-h .btn { flex: none; min-width: 96px; }
.seam-pop-body { flex: 1; min-height: 0; padding: 10px 14px 12px; overflow: hidden; }
.seam-pop-body #drawing { height: 100%; }
/* only the Seam tool, Undo / Redo and the zoom buttons */
#drawing.seams-only .d-tool[data-tool]:not([data-tool="seam"]),
#drawing.seams-only .d-tool[data-action="rotate"], #drawing.seams-only .d-tool[data-action="copy"] { display: none; }
.n-seams-btn { margin-left: 2px; }
.n-plan-go { cursor: pointer; border-radius: 10px; transition: box-shadow .15s; }
.n-plan-go:hover, .n-plan-go:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--brand); }
.n-warn-go { display: flex; margin-top: 8px; }
.n-seam-pop { width: 100%; margin-top: 4px; }
@media (max-width: 640px) { .seam-pop-wrap { padding: 0; } .seam-pop { height: 100vh; border-radius: 0; } }

/* iPad and other touch screens: buttons and boxes react straight away to a tap (no double-tap zoom) */
button, a, input, select, textarea, label, .btn, [role="button"] { touch-action: manipulation; }

/* the Change seams pop-up: smaller, just the drawing; Done sits in the tool column under Delete and Fit */
.seam-pop { width: min(1080px, 100%); height: min(700px, calc(100vh - 36px)); }
.seam-pop-body { padding: 10px; }
#drawing .d-tool.d-seam-done { width: 100%; margin-top: 6px; padding: 8px 4px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; }
#drawing .d-tool.d-seam-done:hover { background: color-mix(in srgb, var(--brand) 85%, #000); }
#drawing .d-tool.d-seam-done svg { stroke: currentColor; }
.seam-pop-body #drawing .d-legend { display: none; }

/* Slab layout: Rotate left / right (45° each, all the way round) */
.n-rot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 6px 0 8px; }
.n-rot .btn { justify-content: center; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.n-rot-deg { min-width: 46px; padding: 6px 4px; border-radius: 8px; background: #f2f0ec; font-weight: 700; font-size: .9rem; text-align: center; color: var(--brand); }

/* Form pop-ups (a cut-out's type and size, and the app's other small forms): in the app's own style */
.dlg.dlg-form { width: min(520px, calc(100vw - 32px)); padding: 0; gap: 0; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .97) !important; border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 24px 60px rgba(20, 30, 40, .22), 0 2px 6px rgba(20, 30, 40, .08) !important; }
.dlg-form > .dlg-msg { margin: 0; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); font-size: 1.08rem; }
.dlg-form > .dlg-msg b { font-weight: 700; color: var(--ink); }
.dlg-form > .dlg-fields { padding: 16px 22px 4px; gap: 12px 14px; }
.dlg-form .dlg-fields .field { gap: 6px; font-size: .8rem; font-weight: 600; color: #52606b; }
.dlg-form .dlg-fields input, .dlg-form .dlg-fields select, .dlg-form .dlg-fields textarea {
  width: 100%; box-sizing: border-box; min-height: 42px; padding: 0 12px; border: 1px solid #e3dfd8; border-radius: 10px; background-color: #f7f5f1;
  font: inherit; font-size: .95rem; font-weight: 500; color: #13202b; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.dlg-form .dlg-fields textarea { padding: 10px 12px; min-height: 84px; resize: vertical; }
.dlg-form .dlg-fields select { -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232f4858' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.dlg-form .dlg-fields input:hover, .dlg-form .dlg-fields select:hover, .dlg-form .dlg-fields textarea:hover { border-color: #d3cdc3; }
.dlg-form .dlg-fields input:focus, .dlg-form .dlg-fields select:focus, .dlg-form .dlg-fields textarea:focus { outline: none; background-color: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.dlg-form > .dlg-err { padding: 0 22px; }
.dlg-form > .dlg-err:not(:empty) { margin-top: 8px; }
.dlg-form > .dlg-actions { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 14px 22px 18px; border-top: 1px solid var(--line); background: #fbfaf8; }
.dlg-form > .dlg-actions .btn { min-height: 42px; padding: 0 18px; border-radius: 12px; }
.dlg-form > .dlg-actions .btn[data-yes] { min-width: 104px; justify-content: center; }
.dlg-form > .dlg-actions .btn.small[data-extra] { min-height: 38px; }
@media (max-width: 520px) { .dlg-form > .dlg-actions .btn:not([data-extra]) { flex: 1; justify-content: center; } }
