/* Contractor portal, version 20 (2026-11-07). Builds on calm/calm.css: one work
   column, lines between rows, Archivo throughout, crimson only for the main button
   and real gaps. These are the pieces the portal adds. Light-only. */

/* ---------- rail ---------- */
.rail { gap: 18px; }
.nav-group { padding: 0 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.nav.later a { padding: 5px 10px; font-size: 13.5px; color: var(--ink-3); }
.nav.later a:hover { color: var(--ink); }
.nav.later a.on { color: var(--crimson-deep); }
.sheet .sheet-h { padding: 16px 4px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sheet a.later { padding: 10px 4px; font-size: 14.5px; color: var(--ink-2); }
.sheet { max-height: calc(100vh - 140px); overflow-y: auto; }

/* ---------- top of every page ---------- */
.p-top { margin-bottom: -18px; }
.p-top .sync { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.p-top .sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; background: var(--ground); }
.pill:hover { border-color: var(--crimson); color: var(--crimson); }

/* ---------- rows, chips, toggles ---------- */
.mchip { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 0 8px; border-radius: 99px; background: var(--tint); color: var(--crimson-deep); font-size: 11.5px; font-weight: 600; line-height: 19px; }
.mchip.non { background: var(--panel); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.row .link-btn.more { justify-self: end; }
.row { grid-template-columns: minmax(0, 1fr) auto auto; }
.row .when { font-weight: 600; color: var(--ink); }
.item.is-done .t, .item.is-done .why { color: var(--ink-3); }
.item.is-done .when { color: var(--ink-3); }
.state { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 0 8px; border-radius: 99px; background: var(--panel); color: var(--ink-2); font-size: 11.5px; font-weight: 600; line-height: 19px; box-shadow: inset 0 0 0 1px var(--line); }
.state.on { background: #E3F1EE; color: var(--good); box-shadow: none; }
.rec { display: inline-block; vertical-align: 2px; margin-left: 6px; font-size: 11.5px; font-weight: 600; color: var(--good); }
.tog { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--bar); flex: 0 0 auto; transition: background .15s; }
.tog i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(35, 23, 15, .25); transition: left .15s; }
.tog[aria-checked="true"] { background: var(--good); }
.tog[aria-checked="true"] i { left: 19px; }
.rule-c { gap: 12px; align-items: center; }
.sms-pv { background: var(--panel); border-radius: 12px; padding: 12px 14px; max-width: 460px; }
.sms-pv span { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.sms-pv p { font-size: 14px; }
.cell-sub { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
td b { font-weight: 600; }
td.inc, .inc { color: var(--good); font-weight: 600; }
table.click-table tr.click { cursor: pointer; }
table.click-table tr.click:hover td, table.click-table tr.click:focus-visible td, table.click-table tr.sel td { background: var(--panel); }
table.click-table tr.click:focus-visible { outline: none; }
table.click-table tr.click td:first-child { padding-left: 8px; }
table.click-table th:first-child { padding-left: 8px; }
table.cmp td, table.cmp th { text-align: right; }
table.cmp td:first-child { text-align: left; }
.field.search { width: 320px; max-width: 100%; margin-bottom: 10px; }
.lk { display: inline-block; vertical-align: middle; width: 56px; height: 6px; border-radius: 3px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); margin-right: 8px; overflow: hidden; }
.lk i { display: block; height: 100%; background: var(--crimson); border-radius: 3px; }
td.lkc b { font-weight: 600; }
.ops-now { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--tint); }
.ops-now b { font-size: 17px; }
.caps { margin-bottom: 26px; }
.caps-h { font-size: 15px; font-weight: 600; margin: 4px 0 10px; }
.ops-now span { color: var(--ink-2); font-size: 14px; }

/* ---------- membership: program and preview ---------- */
.prog { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; align-items: start; }
.prog-main { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.fld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--ink-2); }
.fld .field { width: 100%; }
.fld textarea.field { resize: vertical; line-height: 1.45; font: inherit; font-size: 14px; color: var(--ink); }
.fld.inline { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 8px; }
.fld.inline > span { width: 16px; text-align: right; color: var(--ink-3); font-size: 12.5px; }
.price-row { display: flex; gap: 16px; flex-wrap: wrap; }
.money { display: inline-flex; align-items: center; gap: 6px; }
.money i { font-style: normal; color: var(--ink-2); }
.money .field.num { width: 110px; text-align: left; }
.logo-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo-row .cap { margin-top: 8px; max-width: 46ch; }
.logo-tile { width: 132px; height: 76px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; overflow: hidden; padding: 8px; }
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lm-text { font-weight: 700; letter-spacing: .02em; font-size: 15px; }
label.btn { cursor: pointer; }
.pv { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 10px; }
.pv-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pv-card { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(35, 23, 15, .1); background: #fff; }
.pv-top { background: var(--brand); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.pv-logo { min-width: 40px; max-width: 96px; height: 36px; border-radius: 8px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; padding: 0 8px; overflow: hidden; }
.pv-logo img { max-height: 30px; max-width: 80px; object-fit: contain; }
.pv-logo .lm-text { font-size: 12px; }
.pv-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.pv-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.pv-body b { font-size: 16px; line-height: 1.25; letter-spacing: -.01em; }
.pv-body p { font-size: 13px; color: var(--ink-2); }
.pv-body ul { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pv-body li { position: relative; padding-left: 20px; }
.pv-body li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 9px; height: 5px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.pv-price { font-weight: 600; font-size: 14px; margin-top: 4px; }
.pv-btn { display: block; text-align: center; background: var(--brand); color: #fff; border-radius: 10px; padding: 10px; font-weight: 600; font-size: 14px; margin-top: 4px; }
table.svc td:last-child, table.svc th:last-child { width: 1%; }
tr.edit td { background: var(--panel); padding: 14px 12px; }
.svc-edit { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; white-space: normal; text-align: left; }
.svc-edit .fld { margin: 0; }
.svc-edit .acts { grid-column: 1 / -1; }
.svc-edit select.field, .svc-edit input.field { width: 100%; }
table.pb .choice button { padding: 5px 9px; font-size: 12.5px; }
.camp { border-top: 2px solid var(--ink); padding-top: 14px; }

/* ---------- lifetime value bars ---------- */
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb { display: grid; grid-template-columns: 170px minmax(0, 1fr) 70px; gap: 14px; align-items: center; font-size: 14px; }
.hb-track { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--panel); }
.hb-track i { display: block; height: 100%; background: var(--bar); }
.hb-track i.m { background: var(--crimson); }
.hb b { text-align: right; font-weight: 600; }

/* ---------- homeowner view ---------- */
.as-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.as-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--ground); }
.as-card:hover { border-color: var(--crimson); }
.as-card b { font-size: 15.5px; }
.as-card span { font-size: 13.5px; color: var(--ink-2); flex: 1; }
.as-card em { font-style: normal; color: var(--crimson); font-weight: 600; font-size: 13.5px; }
.int-name { font-weight: 600; font-size: 15px; }
.int-name.muted { color: var(--ink-2); font-weight: 600; }

/* ---------- coming soon ---------- */
.soon-block { border: 1.5px dashed var(--line); border-radius: 14px; padding: 18px 20px; background: var(--ground); }
.soon-block h2 { font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.soon-block p { color: var(--ink-2); font-size: 14.5px; max-width: 62ch; }
.soon-block ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.tabs .soon { margin-left: 6px; }

/* ---------- drawer: one member or home ---------- */
.drawer-back { position: fixed; inset: 0; z-index: 500; background: rgba(35, 23, 15, .32); display: flex; justify-content: flex-end; }
.drawer-back[hidden] { display: none; }
.drawer { width: 460px; max-width: 100%; height: 100%; overflow-y: auto; background: var(--ground); padding: 22px 22px 40px; display: flex; flex-direction: column; gap: 22px; box-shadow: -12px 0 36px rgba(35, 23, 15, .16); }
.dr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dr-head small { color: var(--ink-3); font-size: 12.5px; }
.dr-head h2 { margin: 2px 0 2px; font-size: 23px; font-weight: 700; color: var(--ink); letter-spacing: -.015em; display: block; }
.dr-head p { color: var(--ink-2); font-size: 14px; }
.dr-x { width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--ink-2); flex: 0 0 auto; }
.dr-x:hover { background: var(--panel); }
.drawer .stats { --n: 2 !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drawer .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
.drawer .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
.drawer .stat b { font-size: 19px; }
.drawer section p { font-size: 14.5px; }
body.dr-open { overflow: hidden; }

@media (max-width: 1100px) { .prog { grid-template-columns: minmax(0, 1fr); } .pv { position: static; max-width: 360px; } }
@media (max-width: 760px) {
  .p-top { margin-bottom: -10px; }
  .p-top .sync { display: none; }
  .p-top .pill { margin-left: auto; padding: 5px 10px; font-size: 12.5px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row > .acts, .row > .go { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .row > .tog { grid-column: 2; grid-row: 1; }
  .row .link-btn.more { grid-column: 2; grid-row: 1; align-self: start; }
  .row:has(> .tog) .link-btn.more { grid-row: 2; justify-self: end; }
  .as-grid { grid-template-columns: minmax(0, 1fr); }
  .svc-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .svc-edit .fld:first-child { grid-column: 1 / -1; }
  .hb { grid-template-columns: minmax(0, 1fr) 60px; gap: 6px 10px; }
  .hb-track { grid-column: 1 / -1; grid-row: 2; }
  .drawer-back { align-items: flex-end; }
  .drawer { width: 100%; height: auto; max-height: 92vh; border-radius: 16px 16px 0 0; padding: 18px 16px 28px; }
  .field.search { width: 100%; }
  .tl-bar .field.search { width: 100% !important; }
  .ops-now b { font-size: 16px; }
}

/* v20 polish */
.hello-lede { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; max-width: 62ch; }
table.svc td:nth-child(2), table.svc td:nth-child(3), table.svc th:nth-child(2), table.svc th:nth-child(3) { text-align: left; }
select.club-sel { width: auto; min-width: 190px; padding: 6px 30px 6px 10px; font-size: 13px; }
select.club-sel.on { border-color: var(--crimson); color: var(--crimson-deep); font-weight: 600; }
[data-addvalue] { color: var(--crimson); text-decoration: none; font-weight: 600; }
[data-addvalue]:hover { text-decoration: underline; }
table.ops td:first-child .mchip, .click-table td:first-child .mchip { margin-left: 4px; }
select.club-sel { width: 200px; min-width: 0; }
table.ops td:first-child { min-width: 250px; }
table.ops th:nth-child(2) { text-align: left; }
.click-table td:first-child b { white-space: nowrap; }
table.techs td:first-child { white-space: nowrap; }
@media (max-width: 760px) {
  .kv { grid-template-columns: minmax(96px, 1fr) minmax(0, max-content); }
  .kv .v { white-space: normal; }
  /* phone: keep the columns that matter, drop the rest */
  table.ops th:nth-child(2), table.ops td:nth-child(2), table.ops th:nth-child(5), table.ops td:nth-child(5) { display: none; }
  table.mem th:nth-child(2), table.mem td:nth-child(2), table.mem th:nth-child(5), table.mem td:nth-child(5) { display: none; }
}
@media (max-width: 760px) {
  table.pb th:nth-child(2), table.pb td:nth-child(2) { display: none; }
  select.club-sel { width: 150px; font-size: 12.5px; }
  table.svc th:nth-child(2), table.svc td:nth-child(2) { display: none; }
}
@media (max-width: 760px) {
  table.ops th:nth-child(4), table.ops td:nth-child(4), table.mem th:nth-child(4), table.mem td:nth-child(4), table.svc th:nth-child(5), table.svc td:nth-child(5) { display: none; }
  select.club-sel { width: 168px; font-size: 12px; padding-right: 26px; }
}

/* ---- Nov 9: darker text and lines everywhere ---- */
:root { --ink: #120A06; --ink-2: #33261F; --ink-3: #4F4038; --line: #A08A79; }
th { color: var(--ink-2); }
/* Jolly's own mark and the business-unit picker */
.co-pick { display: flex; gap: 10px; align-items: center; padding: 0 8px; }
.co-logo { width: 38px; height: 38px; border-radius: 9px; background: #1D4E89; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; letter-spacing: -.02em; flex: 0 0 auto; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.co-txt b { display: block; font-size: 16px; font-weight: 800; color: #1D4E89; letter-spacing: -.01em; line-height: 1.1; }
.co-txt small { font-size: 12px; color: var(--ink-2); }
.bu-pick { display: flex; flex-direction: column; gap: 4px; padding: 0 8px; margin-top: -10px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.bu-pick select { font-size: 13.5px; text-transform: none; letter-spacing: 0; padding: 6px 8px; }
.bu-chip { font-size: 12.5px; font-weight: 600; background: var(--tint); border-radius: 99px; padding: 3px 10px; }
/* Coming soon sits apart from the working pages */
.soon-zone { margin-top: 6px; padding: 12px 6px 8px; border-top: 2px solid var(--ink-3); border-radius: 0; background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(160,138,121,.10) 8px 9px); }
.soon-zone .nav-group { color: #7D0322; font-weight: 700; }
.soon-zone .nav a { font-size: 13.5px; color: var(--ink-3); }
/* Reporting */
.rep-bar { flex-wrap: wrap; gap: 10px; }
table.rep td small, table.ops td small { white-space: normal; }
/* Copy into ServiceTitan */
.st-copy { border: 1.5px solid #1D4E89; border-radius: 10px; padding: 12px 14px; background: #F4F7FB; }
.st-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.st-steps { margin: 4px 0 10px; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); }
.st-f { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid #D5DEEA; font-size: 13.5px; }
.st-f span { color: var(--ink-2); }
.st-f code { font-family: inherit; font-weight: 600; white-space: normal; }
/* Lead scoring picks */
.pk { width: 28px; text-align: left; }
.pick-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--tint); }
.more-row { display: flex; gap: 12px; align-items: center; margin-top: 12px; font-size: 13.5px; }
.new-offer { background: #FFFBF3; }
@media print { .rail, .tabbar, .topbar, .tl-bar, .acts, .pick-bar, .more-row, .switch, .dw-switch { display: none !important; } }
table.ops th:nth-child(2), table.ops td:nth-child(2), table.ops th:nth-child(3), table.ops td:nth-child(3) { text-align: left; }
table.ops td.wrap-cell { white-space: normal; min-width: 180px; }
table.ops td.pk, table.ops th.pk { min-width: 0; width: 28px; padding-right: 0; }
table.ops td:nth-child(2) { min-width: 230px; }

/* v22: ZIP picker on Local targets */
.zip-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.zip-pick select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
table.ops.tg td:nth-child(2) { min-width: 200px; }
table.ops.tg td.wrap-cell { min-width: 150px; }
table.ops.tg td:last-child { min-width: 120px; white-space: normal; }

/* Jolly */
.co-logo.jl { background: #fff; border: 1px solid var(--line); padding: 3px; }
.co-logo.jl img { width: 100%; height: auto; display: block; }
.jl-src { margin: -6px 0 18px; max-width: 80ch; }
.logo-tile { background: #fff !important; border: 1px solid var(--line); }
.logo-tile img { width: auto; height: 100%; max-height: 64px; }
.calls tr.on td { background: var(--surface-2); }\n.calls td.r { text-align: right; }\ntd.nw { white-space: nowrap; }\n