/* CourtCo Admin (design only, Nov 16, 2026). The Founders Freedom OS shell in light mode, measured from the OS itself:
   64px icon rail, 76px header, 300px side menu, 35px buttons, 7px corners, 10px panels, Inter 13px. Same grays.
   The one change: CourtCo orange (#E65323) wherever the OS uses its blue. */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url("assets/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url("assets/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-700.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --text: #2a2d34; --bright: #1a1d23; --muted: #5e636d; --muted-2: #717680; --label: #4b5059;
  --line: #d2d8e2; --line-soft: #dfe4ec; --ctl-line: #c1c9d6; --dash: #a6b0c0;
  --frame: #ffffff; --floor: #f8f9fb; --btn: #f0f2f6; --sel: #e0e5ed; --tile: #e8ebf1;
  --o: #e65323; --o-edge: #ec6a3f; --o-press: #d44a1c; --o-soft: #fdf1ec; --o-ring: rgba(230, 83, 35, 0.3);
  --green: #16a34a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px; color: var(--text); background: var(--floor); font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
/* the app fills the window exactly and only its panels scroll: the page behind it never does */
body { overflow: hidden; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(230, 83, 35, 0.2); }
:focus-visible { outline: 2px solid var(--o); outline-offset: 2px; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (min-width: 861px) { .mobile-only { display: none !important; } }

/* ---------- shell ---------- */
.app-shell { display: flex; height: 100vh; height: 100dvh; }
.icon-rail { flex: none; width: 64px; background: var(--frame); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 63px; height: 76px; flex: none; }
.brand-mark img { width: 40px; height: 40px; border-radius: 10px; display: block; }
.icon-rail nav { display: grid; gap: 6px; padding-top: 6px; }
.icon-rail nav button { position: relative; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.icon-rail nav button .ic { stroke-width: 1.6; }
.icon-rail nav button:hover { background: var(--btn); color: var(--bright); }
.icon-rail nav button.active { background: var(--sel); color: var(--bright); }
.icon-rail nav button[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 52px; top: 50%; transform: translateY(-50%); z-index: 5; white-space: nowrap;
  background: var(--bright); color: #fff; font-size: 12px; font-weight: 500; padding: 6px 9px; border-radius: 7px; pointer-events: none; }

.app-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-header { flex: none; height: 76px; display: flex; align-items: center; gap: 14px; padding-right: 24px; background: var(--frame); border-bottom: 1px solid var(--line); }
.header-title { width: 300px; height: 75px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 18px 0 24px; border-right: 1px solid var(--line); }
.header-title h1 { font-size: 22px; font-weight: 600; color: var(--bright); letter-spacing: -0.22px; }
.toolbar-spacer { flex: 1; }

.workspace { flex: 1; min-height: 0; display: flex; }
.secondary-nav { flex: none; width: 300px; background: var(--frame); border-right: 1px solid var(--line); padding: 18px 12px; overflow: auto; }
.secondary-nav nav { display: grid; gap: 4px; }
.secondary-nav nav button { height: 44px; padding: 10px 12px; border-radius: 10px; display: flex; align-items: center; gap: 12px; text-align: left; font-size: 15px; font-weight: 600; color: var(--text); }
.secondary-nav nav button:hover { background: var(--btn); }
.secondary-nav nav button.selected { background: var(--sel); color: var(--bright); }
.count { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
/* the statuses under All quotes: set in, with the icon and the words in each status's own color
   (the way the OS CRM lists its statuses under Opportunities) */
.secondary-nav nav .lenses { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px; padding-left: 16px; }
.secondary-nav nav button.lens { height: auto; min-height: 36px; padding: 7px 12px; gap: 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--lens); }
.secondary-nav nav button.lens.selected { background: var(--sel); color: var(--lens); }

/* ---------- the stat bar (the OS CRM's): a caps label with its first word in color, beside a big number ---------- */
.stats { container: stats / inline-size; background: #fff; border-bottom: 1px solid var(--line); }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; min-width: 0; padding: 18px 16px; }
.stat-chevron { position: absolute; left: -1px; top: 0; bottom: 0; width: 12px;
  background: linear-gradient(to bottom right, transparent 49%, var(--line) 50%, transparent 52%) top / 100% 50% no-repeat,
    linear-gradient(to top right, transparent 49%, var(--line) 50%, transparent 52%) bottom / 100% 50% no-repeat; }
.stat-label { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; }
.stat-label b { font-weight: 700; color: var(--c); }
.stat-value { font-size: 29px; font-weight: 600; letter-spacing: -0.6px; line-height: 1; color: var(--bright); font-variant-numeric: tabular-nums; }
/* when the bar is too tight for label and number side by side, the number drops under its label */
@container stats (max-width: 1290px) {
  .stat { flex-direction: column; gap: 10px; padding: 16px 12px; }
  .stat-value { font-size: 26px; }
}
main { flex: 1; min-width: 0; overflow: auto; background: var(--floor); }
.page-pad { padding: 24px; }
.page-pad.narrow { max-width: 860px; }

/* ---------- controls ---------- */
.button { height: 35px; padding: 8px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 7px; white-space: nowrap;
  font-size: 12px; font-weight: 500; color: var(--text); background: var(--btn); border: 1px solid var(--ctl-line); }
.button:hover { background: #e8ebf1; }
.button.primary { color: #fff; background: var(--o); border-color: var(--o-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16); font-weight: 600; }
.button.primary:hover { background: #ea5d2f; }
.button.primary:active { background: var(--o-press); }
.button.small { height: 28px; padding: 0 10px; border-radius: 6px; font-weight: 600; border-color: var(--line); }
.icon-button { width: 31px; height: 31px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-button:hover { background: var(--btn); color: var(--bright); }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search { height: 35px; width: 260px; max-width: 100%; display: flex; align-items: center; gap: 8px; padding-left: 11px; color: var(--muted); background: #fff; border: 1px solid var(--ctl-line); border-radius: 7px; }
.search:focus-within { border-color: var(--o); box-shadow: 0 0 0 3px var(--o-ring); }
.search input { flex: 1; min-width: 0; height: 33px; padding: 9px 10px 9px 0; border: 0; outline: 0; background: none; font-size: 12px; color: var(--text); }
.search input::placeholder { color: var(--muted-2); }
.helper { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* ---------- the quotes table ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); overflow: hidden; }
.q-tr { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 104px 118px 190px 68px 36px; gap: 12px; align-items: center; min-height: 58px; padding: 0 16px; border-top: 1px solid var(--line-soft); }
.q-th { min-height: 40px; border-top: 0; font-size: 12px; font-weight: 600; color: var(--muted-2); }
#rows .q-tr:hover { background: #fafbfc; }
.q-name { min-width: 0; }
.q-name b { display: block; font-size: 13px; font-weight: 600; color: var(--bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-name small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-addr { min-width: 0; font-size: 13px; color: var(--text); }
.q-addr span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-addr span + span { margin-top: 2px; font-size: 12px; color: var(--muted-2); }
.q-money { font-size: 13px; font-weight: 600; color: var(--bright); font-variant-numeric: tabular-nums; }
.q-date { font-size: 12px; color: var(--muted); }
.q-link { display: flex; gap: 6px; }
.q-muted { color: var(--muted-2); }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--pc); background: color-mix(in srgb, var(--pc) 13%, #fff); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.draft { --pc: #5e636d; } .pill.sent { --pc: #cf4514; } .pill.signed { --pc: #15803d; } .pill.void { --pc: #b42318; }
#rows .q-tr.is-void .q-name b, #rows .q-tr.is-void .q-money { color: var(--muted-2); text-decoration: line-through; }
/* the three dots at the end of a row (Roy, Nov 16: "three dots on the far right... Edit and Void") */
.q-more { display: flex; justify-content: flex-end; }
.q-dots { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.q-dots:hover, .q-dots[aria-expanded="true"] { background: var(--sel); color: var(--bright); }
.row-menu { position: fixed; z-index: 60; width: 248px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 18, 20, 0.16); }
.row-menu > button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--bright); text-align: left; cursor: pointer; }
.row-menu > button:hover:not(:disabled) { background: var(--sel); }
.row-menu > button:disabled { color: var(--muted-2); cursor: default; }
.row-menu > button small { display: block; font-size: 12px; font-weight: 400; color: var(--muted-2); }
.row-menu > button.danger { color: #b42318; }
.row-menu p { margin: 6px 8px 10px; font-size: 13.5px; line-height: 1.45; color: var(--text); }
.row-menu-btns { display: flex; justify-content: flex-end; gap: 8px; padding: 0 4px 4px; }
.row-menu-btns button { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--bright); cursor: pointer; }
.row-menu-btns button.danger { border-color: #b42318; background: #b42318; color: #fff; }
/* the Feedback page */
.fb-note { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: #fffaf5; border: 1px solid #f4d9c8; }
.fb-note.ok { background: #f3faf5; border-color: #cfe8d6; }
.fb-note b { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--bright); }
.fb-note.ok b { color: var(--green); }
.fb-note p { margin-top: 6px; font-size: 15.5px; line-height: 1.45; color: var(--bright); }
.fb-note .fb-old { font-size: 13.5px; color: var(--muted); text-decoration: line-through; }
.fb-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line-soft); }
.fb-row:first-of-type { border-top: 0; padding-top: 2px; }
.fb-row-text { min-width: 0; }
.fb-said { font-size: 14px; line-height: 1.45; color: var(--muted); }
.fb-rule { margin-top: 5px; font-size: 15.5px; font-weight: 500; line-height: 1.45; color: var(--bright); }
.fb-row small { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted-2); }
.fb-empty { font-size: 14.5px; color: var(--muted); }
.fb .up-field textarea:disabled { background: var(--floor); color: var(--muted); }
.up-soon { align-self: center; padding: 3px 9px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; color: #b23c10; background: var(--o-soft); border-radius: 6px; }
.up-soon-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); text-align: right; }
.up-email .up-field + .up-field { margin-top: 14px; }
.up-foot .button:disabled { opacity: 0.5; cursor: default; }
.up-fixwrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.up-links { display: flex; gap: 22px; justify-content: center; }
.q-empty { padding: 28px 16px; text-align: center; color: var(--muted); border-top: 1px solid var(--line-soft); }

/* ---------- new quote / upload ---------- */
.sub-top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.sub-top h2 { font-size: 17px; font-weight: 600; color: var(--bright); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); padding: 18px; margin-bottom: 14px; }
.card h3 { font-size: 11px; font-weight: 800; letter-spacing: 0.6px; color: var(--muted-2); margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field > span:first-child { font-size: 12px; font-weight: 500; color: var(--label); }
.field input, .field select { width: 100%; height: 38px; padding: 10px 12px; font-size: 13px; color: var(--text); background: #fff; border: 1px solid var(--ctl-line); border-radius: 7px; outline: 0; }
.field input::placeholder { color: #9aa1ad; }
.field input:focus, .field select:focus { border-color: var(--o); box-shadow: 0 0 0 3px var(--o-ring); }
.select-wrap { position: relative; display: block; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 32px; }
.select-wrap::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.tile { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--o); flex: none; }
.tile.small { width: 36px; height: 36px; border-radius: 9px; }

/* ---------- Upload an existing quote (Roy, Nov 16): four steps, one thing at a time, big type and big buttons.
   Adam should be in and out: drop the PDF, check what was read, watch it build, send it. ---------- */
.on-upload .secondary-nav { display: none; }
.up { max-width: 760px; margin: 0 auto; padding-bottom: 28px; font-size: 15px; }
.up-steps { list-style: none; display: flex; gap: 8px; margin: 4px 0 26px; padding: 0; }
.up-steps li { flex: 1; display: flex; align-items: center; gap: 9px; padding-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--muted-2); border-bottom: 3px solid var(--line); }
.up-steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--tile); flex: none; }
.up-steps li.on { color: var(--bright); border-color: var(--o); }
.up-steps li.on span { color: #fff; background: var(--o); }
.up-steps li.done { color: var(--text); border-color: var(--green); }
.up-steps li.done span { color: #fff; background: var(--green); }
.up-big { height: 46px; padding: 0 20px; border-radius: 10px; font-size: 15px; font-weight: 600; gap: 9px; }
.up-head { margin-bottom: 18px; }
.up-head h2, .up-progress h2, .up-done h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--bright); }
.up-head p { margin-top: 6px; font-size: 15px; color: var(--muted); }
.up-sample { margin: 0 0 14px; padding: 10px 14px; font-size: 13px; color: #8a4a12; background: #fff6e6; border: 1px solid #f3dcae; border-radius: 9px; }
.up-error { margin-top: 12px; font-size: 14px; font-weight: 600; color: #b42318; }

/* 1 Upload */
.up-drop { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 64px 24px 56px; text-align: center; cursor: pointer; background: #fff; border: 2px dashed var(--ctl-line); border-radius: 18px; transition: border-color 0.12s, background 0.12s; }
.up-drop:hover, .up-drop.over { border-color: var(--o); background: var(--o-soft); }
.up-drop-tile { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: var(--o); }
.up-drop b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--bright); }
.up-drop small { max-width: 380px; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* the reading bar and the building bar */
.up-progress { padding: 34px 32px 30px; }
.up-file { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.up-bar { height: 12px; margin: 24px 0 22px; border-radius: 99px; background: var(--tile); overflow: hidden; }
.up-bar span { display: block; width: 4%; height: 100%; border-radius: 99px; background: var(--o); transition: width 0.9s ease; }
.up-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.up-tasks li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--muted-2); }
.up-tasks li i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: transparent; border: 2px solid var(--ctl-line); flex: none; }
.up-tasks li.on { color: var(--bright); font-weight: 600; }
.up-tasks li.on i { border-color: var(--o); border-top-color: transparent; animation: up-spin 0.8s linear infinite; }
.up-tasks li.done { color: var(--text); }
.up-tasks li.done i { color: #fff; background: var(--green); border-color: var(--green); }
@keyframes up-spin { to { transform: rotate(360deg); } }

/* 2 Check */
.up-card { padding: 22px 24px; margin-bottom: 14px; }
.up-card h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; font-size: 17px; font-weight: 700; color: var(--bright); }
.up-card h3 small { font-size: 13px; font-weight: 500; color: var(--muted-2); }
.up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.up-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.up-field span small { font-weight: 400; color: var(--muted-2); margin-left: 6px; }
.up-field input::placeholder { color: var(--muted-2); }
.up-field > span { font-size: 13px; font-weight: 600; color: var(--label); }
.up-field input, .up-field textarea, .up-way input:not([type="checkbox"]) { width: 100%; height: 46px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--bright); background: #fff; border: 1px solid var(--ctl-line); border-radius: 10px; outline: 0; }
.up-field textarea { height: auto; padding: 12px 14px; line-height: 1.45; resize: vertical; }
.up-field input:focus, .up-field textarea:focus, .up-way input:not([type="checkbox"]):focus { border-color: var(--o); box-shadow: 0 0 0 3px var(--o-ring); }
/* Kind of job and Total sit side by side: labels on one line, boxes the same height, notes on one line under them (Roy, Nov 16: "fix the overall spacing") */
.up-job { display: grid; grid-template-columns: 168px minmax(0, 1fr) 220px; gap: 20px; align-items: start; }
/* our own arrow, set in from the edge like the text is (Roy, Nov 16: "This arrow should be better placed") */
.up-field select { width: 100%; height: 46px; padding: 0 44px 0 14px; font: inherit; font-size: 16px; color: var(--bright); border: 1px solid var(--ctl-line); border-radius: 10px; outline: 0; cursor: pointer; text-overflow: ellipsis;
  -webkit-appearance: none; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e636d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px 18px; }
.up-field select:focus, .up-total input:focus, .up-pay-pct input:focus, .up-opt-price input:focus { border-color: var(--o); box-shadow: 0 0 0 3px var(--o-ring); }
#upJobOther { margin-top: 12px; }
.up-total label { font-size: 13px; font-weight: 600; color: var(--label); }
.up-total input { width: 100%; height: 46px; padding: 0 14px; text-align: right; font: inherit; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--bright); font-variant-numeric: tabular-nums; background: #fff; border: 1px solid var(--ctl-line); border-radius: 10px; outline: 0; }
.up-card h3 small { font-weight: 400; }
.up-pay-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.up-pay-row:first-child { border-top: 0; padding-top: 2px; }
.up-pay-pct { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 600; color: var(--bright); }
.up-pay-pct input { width: 72px; height: 46px; padding: 0 12px; text-align: right; font: inherit; font-size: 16px; font-weight: 600; color: var(--bright); background: #fff; border: 1px solid var(--ctl-line); border-radius: 10px; outline: 0; }
.up-pay-pct i { font-style: normal; color: var(--muted); }
.up-pay-pct b { display: inline-block; min-width: 72px; padding-right: 12px; text-align: right; }
.up-pay-what b { display: block; font-size: 15.5px; font-weight: 600; color: var(--bright); }
.up-pay-what small { font-size: 13.5px; color: var(--muted); }
.up-pay-fix { margin-top: 14px; padding: 14px 16px; background: #fffaf5; border: 1px solid #f4d9c8; border-radius: 12px; }
.up-pay-fix p { font-size: 15px; line-height: 1.45; color: var(--bright); }
.up-pay-fix .up-q-answers { margin-top: 10px; }
.up-pay-ok { margin-top: 12px; display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--green); }
.up-pay-amt { font-size: 16px; font-weight: 600; color: var(--bright); font-variant-numeric: tabular-nums; }
/* each switch holds its own hidden checkbox, so it can never stretch the page */
.up-opt-on { position: relative; display: flex; align-items: center; cursor: pointer; }
.up-opt-price { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.up-opt-price input { width: 150px; height: 42px; padding: 0 12px; text-align: right; font: inherit; font-size: 16px; font-weight: 600; color: var(--bright); font-variant-numeric: tabular-nums; background: #fff; border: 1px solid var(--ctl-line); border-radius: 10px; outline: 0; }
.up-opt-price small { font-size: 12.5px; color: var(--muted); min-height: 0; }
.up-opt.off .up-opt-price input { color: var(--muted-2); text-decoration: line-through; }
.up-job.no-pic { grid-template-columns: minmax(0, 1fr) 220px; }
.up-court-img { width: 168px; height: auto; aspect-ratio: 300 / 170; border-radius: 12px; display: block; object-fit: cover; }
.up-court-line { margin-top: 9px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.up-total { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-width: 0; }
.up-total small { margin-top: 2px; text-align: right; line-height: 1.4; }
.up-total small:empty { display: none; }
.up-total span { font-size: 13px; font-weight: 600; color: var(--label); }
.up-total b { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--bright); font-variant-numeric: tabular-nums; }
.up-total small { font-size: 13px; color: var(--muted-2); }
.up-ask { background: #fffaf5; border-color: #f4d9c8; }
.up-q + .up-q { margin-top: 16px; padding-top: 16px; border-top: 1px solid #f4e3d6; }
.up-q p { font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--bright); }
.up-q-answers { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.up-q-answers button { height: 42px; padding: 0 18px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--text); background: #fff; border: 1px solid var(--ctl-line); }
.up-q-answers button.on { color: #fff; background: var(--bright); border-color: var(--bright); }
.up-opts { display: grid; }
.up-opt { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.up-opt:first-child { border-top: 0; padding-top: 0; }
.up-opt:last-child { padding-bottom: 0; }
.up-opt input[type="checkbox"], .up-way input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }   /* only the switch's own checkbox: the price box in the same row must stay visible */
.up-switch { position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--ctl-line); flex: none; transition: background 0.15s; }
.up-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25); transition: transform 0.15s; }
input:checked + .up-switch { background: var(--o); }
input:checked + .up-switch::after { transform: translateX(18px); }
input:focus-visible + .up-switch { outline: 2px solid var(--o); outline-offset: 2px; }
.up-opt-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.up-opt-name b { font-size: 16px; font-weight: 600; color: var(--bright); }
.up-opt-name em { padding: 3px 8px; font-size: 11.5px; font-weight: 700; font-style: normal; color: #b23c10; background: var(--o-soft); border-radius: 6px; }
.up-opt-name small { font-size: 13px; color: var(--muted-2); }
.up-opt-price { font-size: 16px; font-weight: 600; color: var(--bright); font-variant-numeric: tabular-nums; }
.up-opt.off .up-opt-name b, .up-opt.off .up-opt-price { color: var(--muted-2); text-decoration: line-through; }
.up-fixes { display: flex; align-items: flex-start; gap: 8px; margin: 4px 2px 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.up-fixes .ic { margin-top: 3px; color: var(--green); }
.up-same { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.up-same a { color: inherit; text-decoration: underline; }
.up-heads ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.up-foot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.up-foot.center { justify-content: center; }

/* 4 Send */
.up-done { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.up-done-mark { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--green); flex: none; }
.up-result { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: center; }
.up-result .up-court-img { width: 200px; }
.up-result-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.up-result-text > b { font-size: 19px; font-weight: 700; color: var(--bright); }
.up-result-text > span { font-size: 15px; color: var(--muted); }
.up-link { display: flex; gap: 8px; margin-top: 12px; }
.up-link input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--text); background: var(--floor); border: 1px solid var(--line); border-radius: 9px; outline: 0; }
.up-link .button, .up-result-btns .button { height: 42px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 600; }
.up-result-btns { display: flex; gap: 8px; margin-top: 8px; }
.up-way { position: relative; display: grid; grid-template-columns: 46px 96px minmax(0, 1fr); align-items: center; gap: 14px; padding: 8px 0; cursor: pointer; }
.up-way b { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--bright); }
.up-msg { margin-top: 14px; }
.up-fixlink { display: block; margin: 6px auto 0; padding: 10px 14px; font-size: 14.5px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.up-fixlink:hover { color: var(--bright); }
.up-sent { flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px 20px; text-align: center; }
.up-sent .up-done-mark { width: 64px; height: 64px; }
.up-sent p { font-size: 15px; color: var(--muted); }
.up-sent .up-sample { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .up-bar span { transition: none; } .up-tasks li.on i { animation: none; } }

/* ---------- the New quote chooser ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 500px); place-content: center; padding: 20px; background: rgba(15, 23, 42, 0.27); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal { width: 100%; padding: 24px; background: #fff; border: 1px solid var(--ctl-line); border-radius: 12px; box-shadow: 0 20px 80px rgba(15, 23, 42, 0.16); }
.modal-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title h2 { font-size: 17px; font-weight: 600; color: var(--text); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 14px 22px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; transition: border-color 0.12s, background 0.12s, box-shadow 0.12s; }
.choice b { font-size: 13px; font-weight: 600; color: var(--bright); }
.choice:hover { border-color: var(--o); background: var(--o-soft); box-shadow: 0 0 0 3px var(--o-ring); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 11px 14px; font-size: 12px; font-weight: 500; color: #fff; background: var(--bright); border-radius: 9px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22); }

/* ---------- Usage (Roy, Nov 16): the OS Studio's usage tracker in light mode and CourtCo orange ----------
   One chart for the month (spend in orange, quotes made in gray inside each day's bar), quotes by type beside where the
   money goes, the costliest quotes, then plans and balances. The quote statuses menu isn't used here, so it hides. */
.on-usage .secondary-nav { display: none; }
.u-combo { padding: 20px 22px 14px; }
.u-combo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.u-picker { position: relative; }
.u-picker-btn { display: inline-flex; align-items: center; gap: 8px; padding: 2px 6px 2px 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--bright); }
.u-picker-btn .ic { color: var(--muted-2); transition: transform 0.15s ease, color 0.15s ease; }
.u-picker-btn:hover .ic { color: var(--bright); }
.u-picker-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.u-picker-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 10; min-width: 210px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--ctl-line); border-radius: 12px; box-shadow: 0 16px 36px -12px rgba(15, 23, 42, 0.25); }
.u-picker-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text); text-align: left; }
.u-picker-menu button:hover { background: var(--btn); }
.u-picker-menu button .ic { color: var(--o); }
.u-metrics { display: flex; gap: 36px; }
.u-metrics > div { display: flex; flex-direction: column; min-width: 120px; }
.u-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.u-metrics strong { margin-top: 6px; font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; color: var(--bright); font-variant-numeric: tabular-nums; }
.u-sub { margin-top: 5px; font-size: 12.5px; color: var(--muted-2); }
.u-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.u-dot.spend { background: var(--o); }
.u-dot.made { background: #54545a; }
.u-chart { position: relative; margin-top: 22px; }
.u-chart svg { display: block; }
.u-base { stroke: var(--line); stroke-width: 1; }
.u-spend, .u-made, .u-bar { transform-box: fill-box; transform-origin: bottom; animation: u-grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.u-spend { fill: var(--o); opacity: 0.88; }
.is-today .u-spend { opacity: 1; fill: #f05a26; }
.u-made { fill: #54545a; stroke: #fff; stroke-width: 1.5; paint-order: stroke; }
.u-stub { fill: var(--line-soft); }
.is-future .u-stub { fill: #eef1f5; }
.u-daynum { fill: var(--muted-2); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.is-future .u-daynum { fill: #b9c0cc; }
.is-today .u-daynum { fill: var(--bright); font-weight: 700; }
.u-hit { fill: transparent; }
.u-hover { fill: rgba(15, 23, 42, 0.045); }
.u-note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted-2); }
@keyframes u-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes u-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes u-fade { from { opacity: 0; } to { opacity: 1; } }

/* the small dark box on hover */
.u-tip { position: absolute; transform: translate(-50%, -100%); z-index: 5; display: flex; flex-direction: column; gap: 5px; min-width: 170px; padding: 10px 12px; border-radius: 10px; background: var(--bright); box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.45); pointer-events: none; font-size: 12.5px; color: #c9ccd3; }
.u-tip[hidden] { display: none; }
.u-tip strong { font-size: 13px; color: #fff; }
.u-tip span { display: flex; align-items: center; gap: 7px; }
.u-tip b { margin-left: auto; padding-left: 14px; color: #fff; font-variant-numeric: tabular-nums; }
.u-tip .u-dot.made { background: #9a9aa3; }
.u-tip-ahead { color: #9aa1ad; }

/* where the money goes, beside plans and balances */
.u-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.u-card { display: flex; flex-direction: column; padding: 20px 22px 16px; min-width: 0; }
.u-card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.u-card-head h3 { font-size: 16px; font-weight: 700; color: var(--bright); letter-spacing: -0.01em; }
.u-card-head span { font-size: 12.5px; color: var(--muted-2); }
.u-donut-wrap { display: flex; align-items: center; gap: 28px; padding: 4px 0; flex: 1; }
.u-donut { flex: none; }
.u-donut-track { stroke: #eef1f5; }
.u-slice { animation: u-fade 0.8s ease both; }
.u-donut-total { fill: var(--bright); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.u-donut-caption { fill: var(--muted-2); font-size: 11px; }
.u-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; min-width: 0; }
.u-legend li { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 10px; font-size: 13.5px; }
.u-swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.u-legend-name { font-weight: 600; color: var(--text); }
.u-legend-pct { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.u-legend-usd { min-width: 52px; text-align: right; font-weight: 600; color: var(--bright); font-variant-numeric: tabular-nums; }

/* plans and balances: one row per plan. The company's own logo (never a stand-in icon), what it does, the number,
   and under them a bar for a balance or a line for a flat plan */
.u-tools { list-style: none; margin: 0; padding: 0; }
.u-tool { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; padding: 15px 0; border-top: 1px solid var(--line-soft); }
.u-tool:first-child { border-top: 0; padding-top: 4px; }
.u-tool-meter { grid-column: 1 / -1; }
.u-tool-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.u-tool-logo { width: 38px; height: 38px; border-radius: 10px; flex: none; object-fit: cover; }
.u-tool-logo.is-render { padding: 8px; background: #fff; border: 1px solid var(--line); object-fit: contain; }
.u-tool-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.u-tool-name strong { font-size: 14.5px; font-weight: 700; color: var(--bright); }
.u-tool-name span { font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-tool-track { height: 14px; border-radius: 2px; background: #eef1f5; overflow: hidden; }
.u-tool-track span { display: block; height: 100%; border-radius: 2px; transform-origin: left; animation: u-fill 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.u-tool-plan { font-size: 12.5px; color: var(--muted); }
.u-tool-left { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.u-tool-left strong { font-size: 16px; font-weight: 700; color: var(--bright); font-variant-numeric: tabular-nums; white-space: nowrap; }
.u-tool-left span { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.u-none { margin: 6px 2px 4px; font-size: 13px; color: var(--muted); }
.u-empty { display: flex; flex-direction: column; gap: 6px; padding: 28px; text-align: center; color: var(--muted); }
.u-empty strong { color: var(--bright); font-size: 15px; }
@media (max-width: 1100px) { .u-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .u-spend, .u-made, .u-slice, .u-tool-track span { animation: none; } }

/* phones: the bottom tab bar for Quotes and Usage (the rail is hidden there) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 10px; font-size: 11.5px; font-weight: 600; color: var(--muted-2); }
.tabbar button.active { color: var(--o); }

/* ---------- a small laptop or a tablet on its side: the side menu gives its room to the table, and the statuses become tabs ---------- */
.seg { display: none; padding: 3px; gap: 2px; background: #fff; border: 1px solid var(--ctl-line); border-radius: 9px; }
.seg button { height: 27px; padding: 0 12px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button.selected { background: var(--sel); color: var(--bright); }
@media (max-width: 1220px) {
  .secondary-nav { display: none; }
  .header-title { width: auto; border-right: 0; }
  .seg { display: flex; }
}

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .icon-rail, .secondary-nav { display: none; }
  .app-header { height: 60px; padding-right: 14px; }
  .header-title { width: auto; height: 59px; padding: 0 0 0 14px; border-right: 0; gap: 10px; }
  .header-title .brand-mark { display: grid; width: 36px; height: 36px; }
  .header-title .brand-mark img { width: 36px; height: 36px; border-radius: 9px; }
  .header-title h1 { font-size: 19px; }
  .page-pad { padding: 14px; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 13px 14px; border-top: 1px solid var(--line-soft); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line-soft); }
  .stat-chevron { display: none; }
  .stat-label { font-size: 10.5px; letter-spacing: 0.1em; }
  .stat-value { font-size: 22px; }
  .toolbar { gap: 10px; margin-bottom: 12px; }
  .search { width: 100%; height: 40px; }
  .search input { font-size: 16px; }
  .seg { width: 100%; }
  .seg button { flex: 1; height: 32px; padding: 0; }
  .q-th { display: none; }
  .q-tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name money" "addr addr" "pill date" "link more"; gap: 6px 12px; padding: 13px 14px; min-height: 0; }
  #rows .q-tr:first-child { border-top: 0; }
  .q-name { grid-area: name; } .q-addr { grid-area: addr; } .q-addr span { display: inline; } .q-addr span + span::before { content: ", "; } .q-addr span + span { margin: 0; font-size: 13px; color: var(--text); } .q-money { grid-area: money; text-align: right; } .q-status { grid-area: pill; } .q-date { grid-area: date; text-align: right; } .q-link { grid-area: link; }
  .q-link:empty, .q-link.none { display: none; }
  .q-more { grid-area: more; }
  .button.small { height: 34px; flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .field input, .field select { height: 44px; font-size: 16px; }
  .form-actions .button { flex: 1; height: 44px; font-size: 14px; }
  .button.primary#newQuote { height: 38px; font-size: 13px; }
  .choices { grid-template-columns: 1fr; }
  .choice { flex-direction: row; padding: 14px; text-align: left; }
  .file-row { flex-wrap: wrap; }
  .file-row .button { flex: 1; height: 40px; }
  /* Upload on a phone: one column, full-width buttons */
  .up-steps { gap: 6px; margin-bottom: 18px; }
  .up-steps li { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 9px; font-size: 12.5px; }
  .up-head h2, .up-progress h2, .up-done h2 { font-size: 22px; }
  .up-drop { padding: 44px 18px 40px; border-radius: 16px; }
  .up-drop b { font-size: 21px; }
  .up-progress { padding: 24px 18px 22px; }
  .up-card { padding: 18px 16px; }
  .up-grid { grid-template-columns: 1fr; gap: 14px; }
  .up-job, .up-job.no-pic { grid-template-columns: 1fr; gap: 16px; }
  .up-job .up-court-img, .up-result .up-court-img { width: 100%; }
  .up-total { align-items: flex-start; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line-soft); }
  .up-result { grid-template-columns: 1fr; gap: 16px; }
  .up-link { flex-wrap: wrap; }
  .up-link .button, .up-result-btns .button { flex: 1; }
  .up-way { grid-template-columns: 46px minmax(0, 1fr); gap: 10px 14px; }
  .up-way input:not([type="checkbox"]) { grid-column: 1 / -1; }
  .up-foot { gap: 10px; }
  .up-foot .button { flex: 1; padding: 0 10px; }
  .up-q-answers button { flex: 1; }
  /* room for the tab bar */
  main { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* Usage on a phone: the two big numbers side by side under the month, every card one column */
  .u-combo { padding: 16px 14px 12px; }
  .u-picker-btn { font-size: 24px; }
  .u-metrics { width: 100%; gap: 18px; }
  .u-metrics > div { flex: 1; min-width: 0; }
  .u-metrics strong { font-size: 26px; }
  .u-card { padding: 16px 14px; }
  .u-donut-wrap { flex-wrap: wrap; justify-content: center; gap: 18px; }
  .u-legend { flex-basis: 100%; }
}

/* ---------- Create a new quote: the quote builder (Roy, Nov 17): sport, job and size; the job sheet with the price
   and his profit always in view; options; customer. Big buttons, one thing at a time. Drawn by newquote.js. ---------- */
.nq-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nq-tile { min-height: 64px; padding: 0 16px; font-size: 17px; font-weight: 600; color: var(--bright); background: #fff; border: 1px solid var(--ctl-line); border-radius: 12px; transition: border-color 0.12s, background 0.12s; }
.nq-tile:hover { border-color: var(--o); background: var(--o-soft); }
.nq-tile.on { color: #fff; background: var(--o); border-color: var(--o-edge); }
.nq-kinds { display: grid; gap: 8px; margin-top: 14px; }
.nq-kind { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 16px; text-align: left; background: #fff; border: 1px solid var(--ctl-line); border-radius: 10px; }
.nq-kind b { font-size: 15.5px; font-weight: 600; color: var(--bright); }
.nq-kind small { font-size: 13px; color: var(--muted-2); white-space: nowrap; }
.nq-kind:hover { border-color: var(--o); background: var(--o-soft); }
.nq-kind.on { border-color: var(--o); background: var(--o-soft); box-shadow: 0 0 0 3px var(--o-ring); }
.nq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nq-chip { height: 42px; padding: 0 16px; font-size: 15px; font-weight: 600; color: var(--bright); background: var(--btn); border: 1px solid var(--line); border-radius: 99px; font-variant-numeric: tabular-nums; }
.nq-chip:hover { border-color: var(--o); background: var(--o-soft); }
.nq-chip.on { color: #fff; background: var(--o); border-color: var(--o-edge); }
.nq-chips.small .nq-chip { height: 32px; padding: 0 11px; font-size: 13px; }
.nq-size { display: grid; grid-template-columns: 120px auto 120px minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 18px; }
.nq-size > i { padding-bottom: 13px; font-style: normal; font-size: 16px; color: var(--muted); }
.nq-size > p { padding-bottom: 13px; font-size: 14px; color: var(--muted); }
.nq-count { display: flex; flex-direction: column; gap: 7px; }
.nq-count > span { font-size: 13px; font-weight: 600; color: var(--label); }
.nq-step { display: inline-flex; align-items: center; height: 46px; border: 1px solid var(--ctl-line); border-radius: 10px; background: #fff; overflow: hidden; }
.nq-step button { width: 46px; height: 100%; font-size: 22px; font-weight: 500; color: var(--bright); background: var(--btn); }
.nq-step button:hover { background: var(--sel); }
.nq-step b { min-width: 46px; text-align: center; font-size: 17px; font-weight: 700; color: var(--bright); }
.nq-step input { width: 84px; height: 100%; padding: 0 6px; text-align: center; font: inherit; font-size: 17px; font-weight: 700; color: var(--bright); border: 0; outline: 0; background: #fff; font-variant-numeric: tabular-nums; }
.nq-step:focus-within { border-color: var(--o); box-shadow: 0 0 0 3px var(--o-ring); }
/* the price and his profit: always in view while he changes numbers */
.nq-sum { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto 200px; gap: 22px; align-items: center; padding: 16px 22px; margin-bottom: 14px; overflow: visible; }
.nq-sum.busy .nq-sum-profit b, .nq-sum.busy .nq-sum-price input { opacity: 0.45; }
.nq-sum-what b { display: block; font-size: 16px; font-weight: 700; color: var(--bright); }
.nq-sum-what span { font-size: 13.5px; color: var(--muted); }
.nq-sum-profit { text-align: right; }
.nq-sum-profit span, .nq-sum-price span { display: block; font-size: 12.5px; font-weight: 600; color: var(--label); }
.nq-sum-profit b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: #15803d; font-variant-numeric: tabular-nums; }
.nq-sum-profit small, .nq-sum-price small { font-size: 12.5px; color: var(--muted-2); }
.nq-sum-price { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.nq-sum-price input { width: 100%; height: 48px; padding: 0 12px; text-align: right; font: inherit; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--bright); border: 1px solid var(--ctl-line); border-radius: 10px; outline: 0; font-variant-numeric: tabular-nums; }
.nq-sum-price input:focus { border-color: var(--o); box-shadow: 0 0 0 3px var(--o-ring); }
.nq-link { font-size: inherit; font-weight: 600; color: #c2410c; text-decoration: underline; text-underline-offset: 2px; }
.nq-rows { display: grid; }
.nq-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.nq-row:first-child { border-top: 0; padding-top: 0; }
.nq-row:last-child { padding-bottom: 0; }
.nq-row-name b { display: block; font-size: 16px; font-weight: 600; color: var(--bright); }
.nq-row-name small { font-size: 13px; color: var(--muted-2); }
.nq-row-ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.nq-row.off .nq-row-name b { color: var(--muted-2); }
.nq-row input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }   /* the switch's own checkbox, as on the Check page */
.nq-money { display: inline-flex; align-items: center; height: 46px; padding-left: 12px; border: 1px solid var(--ctl-line); border-radius: 10px; background: #fff; }
.nq-money i { font-style: normal; font-size: 16px; color: var(--muted); }
.nq-money input { width: 110px; height: 100%; padding: 0 12px 0 4px; text-align: right; font: inherit; font-size: 17px; font-weight: 700; border: 0; outline: 0; background: none; color: var(--bright); font-variant-numeric: tabular-nums; }
.nq-money:focus-within { border-color: var(--o); box-shadow: 0 0 0 3px var(--o-ring); }
.nq-mathlink { margin: 4px 0 0; font-size: 14.5px; }
.nq-none { font-size: 14.5px; color: var(--muted); }
.nq-math-wrap { overflow-x: auto; }
.nq-math table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.nq-math th { padding: 0 8px 8px; text-align: right; font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted-2); }
.nq-math th:first-child, .nq-math td:first-child { text-align: left; padding-left: 0; }
.nq-math td { padding: 5px 8px; text-align: right; border-top: 1px solid var(--line-soft); color: var(--bright); }
.nq-math td:last-child, .nq-math th:last-child { padding-right: 0; }
.nq-math td input { width: 96px; height: 36px; padding: 0 9px; text-align: right; font: inherit; color: var(--bright); border: 1px solid var(--ctl-line); border-radius: 8px; outline: 0; background: #fff; }
.nq-math td:first-child input { width: 100%; text-align: left; }
.nq-math td input:focus { border-color: var(--o); box-shadow: 0 0 0 3px var(--o-ring); }
.nq-math tr.off td { color: var(--muted-2); }
.nq-math tr.sep td { padding: 16px 0 6px; font-size: 12.5px; font-weight: 600; text-align: left; color: var(--muted-2); border-top: 0; }
.nq-math tfoot td { padding: 8px; font-weight: 600; }
.nq-math tfoot td small { font-weight: 400; color: var(--muted-2); }
.nq-math tfoot tr.sub td { font-weight: 400; color: var(--muted); }
.nq-math tfoot tr.big td { font-size: 17px; font-weight: 700; }
.nq-opt-wrap { border-top: 1px solid var(--line-soft); }
.nq-opt-wrap:first-child { border-top: 0; }
.nq-opt-wrap > .up-opt, .nq-opt-wrap > .up-opt:first-child, .nq-opt-wrap > .up-opt:last-child { border-top: 0; padding: 12px 0; }
.nq-opt .up-opt-name { align-items: baseline; }
.nq-opt.off .nq-desc { text-decoration: none; }
.nq-desc { flex-basis: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.nq-opt .nq-link { font-size: 13px; }
.nq-words { display: grid; gap: 12px; padding: 0 0 16px 60px; }
.nq-more { border-top: 1px solid var(--line-soft); }
.nq-recap { margin: 2px 0 0; font-size: 14.5px; color: var(--muted); }
.nq-waitnote { margin-top: 20px; font-size: 14px; color: var(--muted); }
@media (max-width: 720px) {
  .nq-tiles { grid-template-columns: 1fr 1fr; }
  .nq-size { grid-template-columns: 1fr auto 1fr; }
  .nq-size > p, .nq-count { grid-column: 1 / -1; }
  .nq-sum { grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 14px 16px; }
  .nq-sum-what { grid-column: 1 / -1; }
  .nq-sum-profit { text-align: left; }
  .nq-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .nq-row-ctl { justify-content: flex-start; }
  .nq-words { padding-left: 0; }
}

/* ---------- Sign in (online only): one small box over the page ---------- */
.modal-backdrop.signin { grid-template-columns: minmax(0, 380px); background: var(--floor); backdrop-filter: none; }
.signin .modal { display: grid; gap: 16px; padding: 28px; }
.signin-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.signin-brand img { width: 40px; height: 40px; border-radius: 10px; }
.signin-brand h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--bright); }
.signin .up-error { margin-top: 0; }
.signin .button { width: 100%; }

/* ---------- Filters over the quote list (filters.js; Roy, Nov 17, 2026) ----------
   Right: the time frame, the OS date picker (CallingDatePicker) in light mode with CourtCo orange.
   Left of it: Filter, one box with price, job, address or city, status and signed. */
.toolbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.flt-trigger { background: #fff; font-size: 13px; }
.flt-trigger:hover, .flt-trigger[aria-expanded="true"] { background: var(--btn); border-color: var(--dash); }
.flt-trigger.on { border-color: var(--o); color: var(--o-press); background: var(--o-soft); }
.flt-n { min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--o); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tf-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 160px; height: 35px; padding: 8px 13px; border: 1px solid var(--ctl-line); border-radius: 7px; background: #fff; color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap; }
.tf-trigger:hover, .tf-trigger[aria-expanded="true"] { background: var(--btn); border-color: var(--dash); }
.tf-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }

.tf-popup, .flt-popup { position: fixed; z-index: 70; overflow: auto; background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(16, 18, 20, 0.16); scrollbar-width: thin; }
.tf-popup { padding: 6px; border-radius: 10px; font-size: 14px; }
.tf-popup > button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 38px; padding: 10px 12px; border-radius: 7px; text-align: left; font-size: 14px; color: var(--text); }
.tf-popup button:hover:not(:disabled) { background: var(--btn); }
.tf-popup > button[aria-checked="true"] { background: var(--sel); color: var(--bright); font-weight: 500; }
.tf-popup > .tf-custom { margin-top: 5px; border-top: 1px solid var(--line-soft); border-radius: 0 0 7px 7px; }
.tf-check { width: 12px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.tf-popup button:disabled { color: var(--muted-2); opacity: 0.45; cursor: not-allowed; }
.tf-popup button:focus-visible, .tf-popup input:focus-visible { outline: 2px solid var(--o); outline-offset: -2px; }
.tf-popup.is-calendar { padding: 0; }
.tf-fields { display: flex; align-items: flex-end; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.tf-fields label { display: flex; flex: 1; flex-direction: column; gap: 7px; min-width: 0; font-size: 12px; color: var(--muted); }
.tf-fields > span { align-self: flex-end; padding-bottom: 10px; color: var(--muted-2); font-size: 12px; }
.tf-fields input { width: 100%; min-width: 0; height: 36px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--ctl-line); background: #fff; color: var(--bright); font-size: 13px; color-scheme: light; }
.tf-fields input::-webkit-calendar-picker-indicator { display: none; }
.tf-months { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 18px 20px 12px; }
.tf-month-head { display: flex; position: relative; align-items: center; justify-content: center; min-height: 32px; margin-bottom: 14px; }
.tf-month-head strong { font-size: 14px; font-weight: 500; color: var(--bright); }
.tf-month-head button { position: absolute; top: 0; width: 30px; height: 30px; border-radius: 6px; font-size: 24px; line-height: 1; color: var(--muted); }
.tf-month-head button[data-month="-1"] { left: 0; }
.tf-month-head button[data-month="1"] { right: 0; }
.tf-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 5px; text-align: center; }
.tf-grid > span, .tf-grid > button { display: flex; align-items: center; justify-content: center; min-height: 33px; font-size: 13px; }
.tf-grid .tf-weekday { color: var(--muted-2); font-size: 12px; }
.tf-grid button { border: 1px solid transparent; border-radius: 6px; font-variant-numeric: tabular-nums; color: var(--text); }
.tf-grid button.is-today { border-color: var(--dash); }
.tf-grid button.is-in-range, .tf-grid button.is-in-range:hover { background: rgba(230, 83, 35, 0.12); border-radius: 0; color: #a83a12; }
.tf-grid button.is-edge, .tf-grid button.is-edge:hover { background: var(--o); color: #fff; }
.tf-footer { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.tf-footer > span { flex: 1; font-size: 12px; line-height: 1.5; color: var(--muted); }
.tf-footer > span.is-error { color: #b42318; }
.tf-footer button { min-height: 36px; padding: 8px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; }
.tf-footer .tf-apply { background: var(--o); color: #fff; font-weight: 600; }
.tf-footer .tf-apply:hover:not(:disabled) { background: #ea5d2f; }
.tf-footer .tf-apply:disabled { background: #f3b9a4; color: #fff; opacity: 1; }

.flt-popup { border-radius: 12px; font-size: 13px; }
.flt-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.flt-head h3 { font-size: 15px; font-weight: 600; color: var(--bright); }
.flt-clear { font-size: 12.5px; font-weight: 600; color: var(--o-press); padding: 4px 2px; }
.flt-clear:disabled { color: var(--muted-2); cursor: default; }
.flt-group { padding: 12px 16px 14px; border-top: 1px solid var(--line-soft); }
.flt-group > b { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 600; color: var(--label); }
.flt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.flt-chip { height: 30px; padding: 0 11px; border: 1px solid var(--ctl-line); border-radius: 7px; background: #fff; font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; }
.flt-chip:hover { background: var(--btn); }
.flt-chip.selected, .flt-chip.selected:hover { border-color: var(--o); background: var(--o-soft); color: var(--o-press); font-weight: 600; }
.flt-range { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.flt-range > i { font-style: normal; font-size: 12px; color: var(--muted-2); }
.flt-money { flex: 1; min-width: 0; display: flex; align-items: center; height: 35px; padding-left: 10px; background: #fff; border: 1px solid var(--ctl-line); border-radius: 7px; color: var(--muted-2); }
.flt-money input { flex: 1; min-width: 0; height: 33px; padding: 0 10px 0 5px; border: 0; outline: 0; background: none; font-size: 13px; color: var(--bright); font-variant-numeric: tabular-nums; }
.flt-text { width: 100%; height: 35px; padding: 0 11px; background: #fff; border: 1px solid var(--ctl-line); border-radius: 7px; outline: 0; font-size: 13px; color: var(--bright); }
.flt-money:focus-within, .flt-text:focus { border-color: var(--o); box-shadow: 0 0 0 3px var(--o-ring); }
.flt-money input::placeholder, .flt-text::placeholder { color: var(--muted-2); }
.flt-jobs { display: flex; flex-direction: column; max-height: 172px; margin: 0 -6px; overflow: auto; scrollbar-width: thin; }
.flt-job { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px; border-radius: 7px; cursor: pointer; color: var(--text); }
.flt-job:hover { background: var(--btn); }
.flt-job input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--o); cursor: pointer; }
.flt-job span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flt-job small { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .toolbar-end { width: 100%; margin-left: 0; }
  .toolbar-end > * { flex: 1; height: 40px; }
  .tf-trigger { min-width: 0; }
  .flt-money input, .flt-text, .tf-fields input { font-size: 16px; }       /* phones zoom in on smaller type */
  .flt-chip { height: 34px; }
  .flt-job { min-height: 40px; }
}
@media (max-width: 580px) {
  .tf-months { grid-template-columns: 1fr; gap: 18px; padding: 14px 16px; }
  .tf-fields { padding: 14px 16px; }
  .tf-footer { position: sticky; bottom: 0; background: #fff; flex-wrap: wrap; }
  .tf-footer > span { min-width: 100%; }
  .tf-footer button:first-of-type { margin-left: auto; }
}

/* ---------- one quote's activity (Roy, Nov 21, 2026; detail.js) ---------- */
.q-tr[data-open] { cursor: pointer; }
.q-tr[data-open]:hover { background: var(--floor); }
.d-wrap { position: fixed; inset: 0; z-index: 60; }
.d-scrim { position: absolute; inset: 0; background: rgba(17, 20, 26, 0.32); opacity: 0; transition: opacity .18s; }
.d-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--frame); border-left: 1px solid var(--line);
  box-shadow: -18px 0 48px rgba(17, 20, 26, 0.14); transform: translateX(24px); opacity: 0; transition: transform .18s ease, opacity .18s ease; display: flex; flex-direction: column; }
.d-wrap.on .d-scrim { opacity: 1; }
.d-wrap.on .d-panel { transform: none; opacity: 1; }
.d-body { overflow-y: auto; padding: 22px 24px 32px; }
.d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.d-head h2 { font-size: 20px; font-weight: 600; color: var(--bright); margin-top: 10px; letter-spacing: -.2px; }
.d-head p { color: var(--muted); margin-top: 3px; }
.d-x { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); flex: none; }
.d-x:hover { background: var(--btn); color: var(--bright); }
.d-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.d-totals div { background: var(--floor); border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 12px; }
.d-totals span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted-2); }
.d-totals b { display: block; font-size: 17px; font-weight: 600; color: var(--bright); margin-top: 4px; }
.d-totals b.green { color: #15803d; }
.d-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.d-btns .button { display: inline-flex; align-items: center; gap: 7px; }
.d-body section { margin-top: 26px; }
.d-body h3 { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--label); margin-bottom: 12px; }
.d-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.d-tl::before { content: ''; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--line-soft); }
.d-ev { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.d-dot { position: relative; z-index: 1; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--btn); color: var(--muted); border: 2px solid var(--frame); }
.d-ev.signed .d-dot { background: #dcfce7; color: #15803d; }
.d-ev.view .d-dot { background: var(--o-soft); color: var(--o); }
.d-ev > div { padding-top: 4px; min-width: 0; flex: 1; }
.d-ev b { display: block; color: var(--bright); font-weight: 600; }
.d-ev span { display: block; color: var(--muted); margin-top: 2px; }
.d-ev time { display: block; color: var(--muted-2); font-size: 12px; margin-top: 3px; }
.d-up { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line-soft); border-radius: 8px; }
.d-up li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-top: 1px solid var(--line-soft); }
.d-up li:first-child { border-top: 0; }
.d-up li span { margin: 0; color: var(--text); }
.d-up li b { display: inline; color: #15803d; }
.d-colors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.d-colors span { display: inline-flex; align-items: center; gap: 6px; margin: 0; background: var(--floor); border: 1px solid var(--line-soft); border-radius: 20px; padding: 3px 9px 3px 4px; font-size: 12px; color: var(--text); }
.d-colors i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.d-note { color: var(--muted-2); font-size: 12px; margin-top: 2px; }
.d-dl { margin: 0; border: 1px solid var(--line-soft); border-radius: 10px; }
.d-dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; border-top: 1px solid var(--line-soft); }
.d-dl div:first-child { border-top: 0; }
.d-dl dt { color: var(--muted); }
.d-dl dd { margin: 0; text-align: right; color: var(--bright); font-weight: 500; }
.d-dl dd.muted { color: var(--muted-2); font-weight: 400; }
.d-doc { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.d-doc-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: var(--floor); border-bottom: 1px solid var(--line-soft); }
.d-tabs { display: inline-flex; background: var(--btn); border-radius: 7px; padding: 2px; }
.d-tabs button { padding: 4px 10px; border-radius: 6px; font-size: 12px; color: var(--muted); }
.d-tabs button.on { background: var(--frame); color: var(--bright); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.d-doc iframe { display: block; width: 100%; height: 520px; border: 0; background: #e9ebef; }
@media (max-width: 640px) { .d-body { padding: 16px; } .d-totals { grid-template-columns: 1fr 1fr; } .d-doc iframe { height: 420px; } }
