/* Rolume client portal. Tokens and buttons come from ../styles.css */
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

body.portal { background: var(--white); font-size: 15px; min-height: 100vh; }
.portal h1 { font-size: 34px; }
.portal h2 { font-size: 18px; text-transform: none; font-stretch: 100%; letter-spacing: 0; line-height: 1.3; font-weight: 600; }
.portal h3 { font-size: 14px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { color: var(--muted); padding: 14px 0; }


.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); background: linear-gradient(to right, var(--paper) 235px, var(--line) 235px, var(--line) 236px, var(--white) 236px); }

/* Sidebar */
.side { background: var(--paper); border-right: 1px solid var(--line); align-self: start; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.side .logo { padding: 0 8px; }
.biz { padding: 12px; background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; line-height: 1.35; }
.biz strong { font-weight: 600; }
.biz span { color: var(--muted); font-size: 13px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .tabbar a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted); font-weight: 500; }
.side-nav a { padding: 10px 12px; }
.side-nav a svg, .tabbar a svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.side-nav a:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.side-nav a.active { color: var(--ink); background: var(--white); box-shadow: inset 3px 0 0 var(--hivis); }
.side-foot { margin-top: auto; padding: 0 12px; display: flex; flex-direction: column; font-size: 13px; }

.main { padding: 32px clamp(20px, 3vw, 44px) 60px; min-width: 0; outline: none; }
.page-head { margin-bottom: 22px; }
.page-head p { margin-top: 6px; }

/* Tags */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; line-height: 1.3; white-space: nowrap; }
.tag-booked, .tag-new { background: #FFE6DA; color: #8A2D08; }
.tag-rebooked { background: var(--ink); color: var(--white); }
.tag-canceled { background: var(--paper); color: var(--muted); text-decoration: line-through; border: 1px solid var(--line); }
.tag-no-booking { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }

/* Overview */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); margin-bottom: 28px; }
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-n { font-size: 34px; font-weight: 600; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-n small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; font-stretch: 100%; }
.stat-l { color: var(--muted); font-size: 13px; }
.meter { display: block; height: 6px; background: var(--paper); border: 1px solid var(--line); }
.meter i { display: block; height: 100%; background: var(--hivis); }

.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.panel-head.sub { margin-top: 26px; }
.panel-head a { font-size: 13px; color: var(--hivis-ink); font-weight: 600; text-decoration: none; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer; }
.row:hover { background: var(--paper); }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-main .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.when { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Calls */
.calls { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 0; margin: -32px calc(-1 * clamp(20px, 3vw, 44px)) -60px; min-height: 100vh; }
.call-list { border-right: 1px solid var(--line); padding: 32px 20px 40px clamp(20px, 3vw, 44px); }
.list-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.list-tools input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); background: var(--white); width: 100%; }
.list-tools input:focus { border-color: var(--ink); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.call-items { list-style: none; margin: 0; padding: 0; }
.call-item { display: flex; flex-direction: column; gap: 5px; padding: 14px 10px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.call-item:hover { background: var(--paper); }
.call-item.on { background: var(--paper); box-shadow: inset 3px 0 0 var(--hivis); }
.ci-top { display: flex; justify-content: space-between; gap: 10px; }
.ci-sum { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; }

.call-detail { padding: 32px clamp(20px, 3vw, 44px) 60px; min-width: 0; max-width: 820px; }
.back { display: inline-block; margin-bottom: 16px; color: var(--hivis-ink); font-weight: 600; text-decoration: none; }
.cd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cd-head h2 { font-size: 26px; font-stretch: 112%; text-transform: uppercase; letter-spacing: -0.01em; }
.cd-head p { margin-top: 4px; font-size: 14px; }
.cd-head a { color: inherit; }
.cd-summary { margin-top: 18px; font-size: 16px; max-width: 60ch; }
.job-card { margin-top: 18px; display: grid; gap: 2px; width: 100%; max-width: 460px; text-align: left; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--ink); padding: 14px 16px; cursor: pointer; }
.job-card:hover { background: #ECECE7; }
.jc-label { font-size: 12px; color: var(--muted); }
.jc-open { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--hivis-ink); }
.recording { margin-top: 26px; }
.recording audio { width: 100%; max-width: 460px; margin-top: 8px; }
.recording p { margin-top: 6px; }
.tr-title { margin-top: 26px; }
.tr { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tr li { max-width: 78%; padding: 9px 13px; background: var(--paper); font-size: 14px; line-height: 1.45; }
.tr li.caller { align-self: flex-end; background: var(--white); border: 1px solid var(--line); }
.tr .who { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.tr li.agent .who { color: var(--hivis-ink); }

/* Calendar */
.cal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--line); background: var(--white); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--ink); }
.wk-label { font-weight: 600; margin-left: 6px; font-variant-numeric: tabular-nums; }
.legend { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0 0 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; display: inline-block; }
.legend i.ev-new { background: #FFE6DA; border-left: 3px solid var(--hivis); }
.legend i.ev-rebooked { background: var(--ink); }
.legend i.ev-canceled { background: var(--paper); border: 1px dashed #A9ABA6; }

.week { display: grid; grid-template-columns: 76px repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.wk-corner, .wk-day, .wk-win, .wk-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wk-day { padding: 10px 10px 8px; display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--muted); }
.wk-day b { font-size: 20px; color: var(--ink); font-weight: 600; }
.wk-day.is-today { box-shadow: inset 0 3px 0 var(--hivis); }
.wk-day.is-today b { color: var(--hivis-ink); }
.wk-win { padding: 10px 8px; font-size: 12px; color: var(--muted); }
.wk-cell { min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.wk-cell.is-today { background: #FBFBF9; }

.ev { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; font: inherit; font-size: 12px; line-height: 1.3; padding: 7px 8px; border: 0; cursor: pointer; color: var(--ink); }
.ev strong { font-weight: 600; font-size: 13px; }
.ev span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev em { font-style: normal; font-size: 11px; font-weight: 600; margin-top: 3px; }
.ev-new { background: #FFE6DA; border-left: 3px solid var(--hivis); }
.ev-new:hover { background: #FFD9C7; }
.ev-rebooked { background: var(--ink); color: var(--white); }
.ev-rebooked:hover { background: #2B2F34; }
.ev-canceled { background: var(--white); border: 1px dashed #A9ABA6; color: var(--muted); }
.ev-canceled strong, .ev-canceled span { text-decoration: line-through; }
.cal-note { margin-top: 16px; max-width: 70ch; }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(22,24,27,.35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--white); border-left: 1px solid var(--ink); z-index: 41; padding: 22px 24px 32px; overflow-y: auto; }
.dr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.drawer h2 { font-size: 26px; font-stretch: 112%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.05; }
.dr-when { font-size: 17px; font-weight: 600; margin-top: 10px; }
.dr-when.struck { text-decoration: line-through; color: var(--muted); }
.dr-list { margin: 20px 0 0; }
.dr-list div { padding: 11px 0; border-top: 1px solid var(--line); }
.dr-list dt { font-size: 12px; color: var(--muted); }
.dr-list dd { margin: 2px 0 0; font-weight: 500; }
.dr-list a { color: inherit; }
.dr-call { margin-top: 22px; width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .drawer.open { animation: slidein .2s ease-out; }
  @keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* Phone tab bar */
.tabbar { display: none; }

/* Phone and small tablet */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; min-height: 0; }
  .side { display: none; }
  .main { padding: 20px 16px calc(84px + env(safe-area-inset-bottom)); }
  .portal h1 { font-size: 28px; }
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--white); border-top: 1px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex-direction: column; gap: 3px; padding: 10px 0 9px; font-size: 12px; justify-content: center; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--ink); box-shadow: inset 0 3px 0 var(--hivis); }

  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat-n { font-size: 28px; }
  .ov-grid { grid-template-columns: minmax(0, 1fr); }
  .shell { background: var(--white); }

  .calls { grid-template-columns: minmax(0, 1fr); margin: 0; min-height: 0; }
  .call-list { border-right: 0; padding: 0; }
  .call-detail { display: none; padding: 0; }
  .calls.detail-only .call-list { display: none; }
  .calls.detail-only .call-detail { display: block; }
  .tr li { max-width: 90%; }
  .cd-head h2 { font-size: 22px; }

  .cal-head { align-items: flex-start; }
  .cal-nav { width: 100%; }
  .wk-label { margin-left: auto; font-size: 13px; }
  .daystrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 18px; }
  .daystrip button { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 6px; border: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 11px; cursor: pointer; }
  .daystrip button b { font-size: 17px; color: var(--ink); font-weight: 600; }
  .daystrip button i { height: 10px; font-style: normal; color: var(--hivis); line-height: 10px; letter-spacing: 1px; }
  .daystrip button.is-today b { color: var(--hivis-ink); }
  .daystrip button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #B9BCC1; }
  .daystrip button[aria-selected="true"] b { color: var(--white); }
  .agenda-day { margin-bottom: 10px; }
  .agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .agenda li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; }
  .ag-win { font-size: 12px; color: var(--muted); padding-top: 9px; }
  .agenda .ev { font-size: 13px; padding: 10px 12px; }
  .agenda .ev strong { font-size: 15px; }

  .drawer { width: 100%; border-left: 0; top: auto; max-height: 88vh; border-top: 1px solid var(--ink); }
  @media (prefers-reduced-motion: no-preference) {
    .drawer.open { animation: slideup .22s ease-out; }
    @keyframes slideup { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
  }
}

/* ---------- real-data additions ---------- */
[hidden] { display: none !important; }
.shell { min-height: 100vh; background: linear-gradient(to right, var(--paper) 235px, var(--line) 235px, var(--line) 236px, var(--white) 236px); }
.side { height: 100vh; }
.calls { min-height: 100vh; }
.biz select { font: inherit; font-weight: 600; width: 100%; margin-top: 4px; padding: 6px 8px; border: 1px solid var(--line); background: var(--white); }
.side-foot { gap: 2px; }
.side-foot strong { font-weight: 600; }
.link-btn { font: inherit; font-size: 13px; background: none; border: 0; padding: 4px 0; color: var(--hivis-ink); font-weight: 600; cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: #A3261B; }
.side-foot .link-btn { color: var(--muted); font-weight: 500; }
.side-foot .link-btn:hover { color: var(--ink); }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--paper); }
.gate-card { width: 100%; max-width: 420px; background: var(--white); border: 1px solid var(--ink); padding: clamp(24px, 5vw, 40px); }
.gate-card .logo { margin-bottom: 28px; }
.gate-card h1 { font-size: 30px; }
.gate-card > p { margin-top: 10px; }
.gate-card .stack { margin-top: 24px; }
.gate-card .btn { width: 100%; }
.gate-card .small { margin-top: 18px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.stack input, .stack select, .stack textarea, .assign select, .crew-filter select {
  font: inherit; font-size: 15px; font-weight: 400; padding: 10px 12px; border: 1px solid #C9C9C2; background: var(--white); color: var(--ink); width: 100%; border-radius: 0; }
.stack textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; }
.stack input:focus, .stack select:focus, .stack textarea:focus, .assign select:focus { outline: 2px solid var(--hivis); outline-offset: 0; border-color: var(--ink); }
.stack input[readonly] { background: var(--paper); color: var(--muted); }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.form-error { color: #A3261B; font-size: 14px; font-weight: 500; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn[disabled] { opacity: .5; cursor: default; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 18px; }
.two-col .wide { grid-column: 1 / -1; }
.admin-form { margin-top: 32px; max-width: 900px; }
.inline-form { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.inline-form h3 { font-size: 15px; }

.notice { border: 1px solid var(--ink); border-left: 4px solid var(--hivis); background: #FFF6F1; padding: 12px 14px; margin-bottom: 20px; font-size: 14px; }
.notice a { color: var(--hivis-ink); font-weight: 600; }
.loading { color: var(--muted); padding: 40px 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.big { font-size: 22px; margin-top: 14px; }
.test-out { white-space: pre-wrap; font-size: 13px; background: var(--paper); padding: 12px; border: 1px solid var(--line); margin-top: 14px; }

.tag-done { background: #E7F2E4; color: #2D5A24; }
.tag-reschedule-request, .tag-cancel-request { background: var(--white); color: var(--ink); border: 1px solid var(--ink); }
.assignee { font-size: 12px; font-weight: 600; padding: 2px 8px; border: 1px solid var(--line); background: var(--white); }
.row.static { cursor: default; }
.row.static:hover { background: none; }
.row.static .row-side { flex-direction: row; gap: 2px 16px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex: 0 1 auto; max-width: 56%; }
.row.inactive strong { color: var(--muted); }

.cal-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-tools .legend { margin: 0; }
.crew-filter { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crew-filter select { width: auto; padding: 6px 10px; font-size: 14px; }
.who-chip { font-style: normal; font-size: 11px; font-weight: 600; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(0,0,0,.12); }
.ev-rebooked .who-chip { border-top-color: rgba(255,255,255,.25); }
.ev.is-done { opacity: .55; }
.unset { border: 1px solid var(--ink); padding: 14px 16px; margin-bottom: 18px; }
.unset h2 { margin-bottom: 2px; }
.unset-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 12px; }

.drawer > .tag { margin-top: 4px; }
.drawer h2 { margin-top: 12px; }
.assign { margin-top: 18px; padding: 14px; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.assign label { font-size: 12px; color: var(--muted); font-weight: 600; }
.assign p { font-weight: 600; }
.edit-visit { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.edit-visit summary { cursor: pointer; font-weight: 600; color: var(--hivis-ink); }
.edit-visit form { margin-top: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--white); padding: 12px 18px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .shell { background: var(--white); min-height: 0; }
  .calls { min-height: 0; }
  .two-col { grid-template-columns: 1fr; }
  .row.static { flex-direction: column; gap: 8px; }
  .row.static .row-side { align-items: flex-start; justify-content: flex-start; max-width: none; gap: 2px 18px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .main::before { content: ""; }
}

/* Demo requests */
.leads-panel { max-width: 900px; margin-bottom: 8px; }
.lead .row-main { gap: 3px; }
.lead-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.lead-contact a { color: var(--ink); }
.lead-msg { font-size: 14px; background: var(--paper); padding: 8px 10px; margin-top: 4px; max-width: 60ch; }
.lead select { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid #C9C9C2; background: var(--white); }
.lead.new { box-shadow: inset 3px 0 0 var(--hivis); padding-left: 10px; }
.lead.lost .row-main strong { color: var(--muted); }

/* ---------- client overview charts ---------- */
.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; height: 168px; padding-top: 16px; align-items: end; }
.bar-col { display: grid; grid-template-rows: 18px 1fr 18px; height: 100%; text-align: center; min-width: 0; }
.bar-col > .bar { align-self: end; justify-self: center; width: min(70%, 22px); background: var(--ink); border-radius: 4px 4px 0 0; }
.bar-col { position: relative; }
.bar-val { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; align-self: end; }
.bar.is-today { background: var(--hivis); }
.bar-day { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 3px; }
/* grid rows: value label, bar track, day label; the bar sits in the middle track */
.bar-col { grid-template-areas: "v" "b" "d"; }
.bar-col .bar-val { grid-area: v; } .bar-col .bar { grid-area: b; } .bar-col .bar-day { grid-area: d; }
.hbars { list-style: none; margin: 0; padding: 12px 0 0; display: flex; flex-direction: column; gap: 12px; }
.hbars li { display: grid; grid-template-columns: 140px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 13px; }
.hb-label { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 10px; display: block; }
.hb-track i { display: block; height: 100%; background: var(--ink); border-radius: 0 4px 4px 0; min-width: 3px; }
.hb-n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-gap { margin-top: 32px; }

/* ---------- admin ---------- */
.admin-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; margin-bottom: 22px; }
.admin-pick label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.admin-pick select { font: inherit; font-weight: 500; padding: 9px 12px; border: 1px solid var(--ink); background: var(--white); min-width: 240px; max-width: 100%; }
.table-wrap { overflow-x: auto; margin-top: 4px; }
table.spend { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.spend th, table.spend td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.spend thead th { font-size: 12px; font-weight: 600; color: var(--muted); }
table.spend tbody th { font-weight: 600; }
table.spend .num { text-align: right; }
table.spend th:first-child, table.spend td:first-child { padding-left: 0; }
table.spend tfoot th, table.spend tfoot td { font-weight: 700; border-top: 1px solid var(--ink); border-bottom: 0; }
.table-note { margin-top: 10px; }

/* ---------- bookings added by the team ---------- */
.ev-manual { background: #E9EEF6; border-left: 3px solid #3A5A8C; color: var(--ink); }
.ev-manual:hover { background: #DCE4F0; }
.legend i.ev-manual { background: #E9EEF6; border-left: 3px solid #3A5A8C; }
.tag-manual { background: #E9EEF6; color: #24406B; }
.cal-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dr-actions { margin-top: 18px; }
.two-col.tight { margin-top: 0; gap: 14px 16px; }
.dr-list.fields dd { word-break: break-word; }

@media (max-width: 860px) {
  .hbars li { grid-template-columns: 112px minmax(0, 1fr) 30px; }
  .bars { height: 140px; }
  .admin-pick select { min-width: 0; width: 100%; }
  .admin-pick label { width: 100%; }
}

/* ---------- sign-in extras, account, set-password links ---------- */
.gate-card .link-btn { padding: 0; }
.lost { font-size: 13px; }
.lost summary { cursor: pointer; color: var(--hivis-ink); font-weight: 600; }
.lost p { margin: 8px 0 12px; }
.acct { display: grid; gap: 10px; margin-top: 20px; }
.acct .btn { justify-content: flex-start; }
.copy-box { display: flex; gap: 8px; margin-top: 16px; }
.copy-box input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 9px 10px; border: 1px solid #C9C9C2; background: var(--paper); color: var(--ink); }
.steps-list { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 14px; }
.steps-list li > span { display: block; margin-top: 6px; }
.qr { width: 184px; margin: 12px 0 4px; border: 1px solid var(--line); background: var(--white); line-height: 0; }
.qr svg { width: 100%; height: auto; }
.drawer > p { margin-top: 10px; }
.drawer .stack { margin-top: 18px; }
.stack textarea.plain, .lead-notes { font-family: inherit; font-size: 14px; line-height: 1.45; }

/* Top bar on phones (the sidebar is hidden there) and the view-as-client bar */
.mtop { display: none; }
.viewbar { position: sticky; top: 0; z-index: 35; background: var(--ink); color: var(--white); padding: 9px clamp(16px, 3vw, 44px); display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; }
.viewbar .link-btn { color: var(--hivis); flex: none; }
.viewbar:not([hidden]) ~ .shell .side { top: 40px; height: calc(100vh - 40px); }

/* ---------- client overview: month summary and call-back list ---------- */
.roi { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; background: var(--ink); color: var(--white); padding: 18px 22px; margin-bottom: 28px; }
.roi-label { font-size: 12px; font-weight: 600; color: #B9BCC1; }
.roi-line { font-size: 20px; margin-top: 4px; line-height: 1.35; }
.roi-line b { color: var(--hivis); font-weight: 600; font-variant-numeric: tabular-nums; }
.roi-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: #B9BCC1; text-align: right; }
.roi-side .link-btn { color: var(--hivis); padding: 0; }
.stats { margin-bottom: 16px; }
.cb-panel { margin-bottom: 28px; }
.row.static.cb .row-side { gap: 14px; }
.cb .when { margin-top: 2px; }
.cb .btn { text-decoration: none; }

/* ---------- flagging a call ---------- */
.flag-ask { margin-top: 14px; }
.flagged { margin-top: 16px; border: 1px solid var(--ink); border-left: 4px solid var(--hivis); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; max-width: 460px; }
.cal-add { margin-top: 16px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.cal-add a { color: var(--hivis-ink); font-weight: 600; text-decoration: none; }
.cal-add a:hover { text-decoration: underline; }

/* ---------- admin: attention list, payouts, pipeline, checklist, activity ---------- */
.attention { margin-bottom: 8px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { padding: 11px 0 11px 18px; border-bottom: 1px solid var(--line); position: relative; font-size: 14px; }
.todo li::before { content: ""; position: absolute; left: 0; top: 18px; width: 8px; height: 8px; background: var(--hivis); }
.todo a { color: var(--hivis-ink); font-weight: 600; }
.payees { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; font-size: 14px; font-variant-numeric: tabular-nums; }
.payees:empty { display: none; }
.pipeline { margin-bottom: 18px; }
.lead-side { align-items: stretch !important; flex-direction: column !important; gap: 10px !important; width: 180px; }
.lead-side label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lead-side input, .lead select { font: inherit; font-size: 14px; font-weight: 400; padding: 6px 8px; border: 1px solid #C9C9C2; background: var(--white); color: var(--ink); width: 100%; border-radius: 0; }
.lead-notes { margin-top: 8px; width: 100%; max-width: 60ch; padding: 8px 10px; border: 1px solid #C9C9C2; background: var(--white); color: var(--ink); resize: vertical; border-radius: 0; }
.lead-est { font-size: 13px; font-weight: 600; }
.lead .row-main { flex: 1; }
.setup-line { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.setup-line .meter { width: 120px; flex: none; }
.checklist { list-style: none; margin: 18px 0 0; padding: 0; }
.checklist li { padding: 11px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.checklist label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checklist input { width: 18px; height: 18px; accent-color: var(--hivis); flex: none; }
.tick { width: 18px; height: 18px; flex: none; border: 1px solid #A9ABA6; display: grid; place-items: center; font-size: 13px; line-height: 1; }
.checklist .ok .tick { background: var(--ink); border-color: var(--ink); color: var(--white); }
.checklist .todo { color: var(--muted); }
table.log td { white-space: normal; vertical-align: top; }
table.log td:first-child { white-space: nowrap; color: var(--muted); }
p.hint { margin: 0; }
.row.static .row-side .link-btn { white-space: nowrap; }

@media (max-width: 860px) {
  .mtop { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .mtop .logo { font-size: 18px; }
  .roi { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .roi-line { font-size: 18px; }
  .roi-side { align-items: flex-start; text-align: left; }
  .row.static.cb .row-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .lead-side { width: 100%; }
  .copy-box { flex-direction: column; }
  .viewbar { flex-direction: column; align-items: flex-start; gap: 4px; position: static; }
}

/* ---------- sales portal ---------- */
.stats-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 22px; }
.lead-next { font-size: 13px; font-weight: 600; color: var(--hivis-ink); }
.lead-side .btn { width: 100%; }
.lead .tag { margin-left: 6px; vertical-align: 2px; }
@media (max-width: 860px) {
  .stats-3 { grid-template-columns: 1fr 1fr 1fr; }
  .stats-3 .stat:nth-child(3) { border-left: 1px solid var(--line); border-top: 0; }
  .stats-3 .stat { padding: 14px 12px; }
}

/* ---------- accounts page ---------- */
.acct-new { margin-top: 0; }
.acct-list { max-width: none; }
.acct-tools { margin: 14px 0 6px; max-width: 900px; }
table.accounts td, table.accounts th { vertical-align: middle; }
table.accounts tr.off th, table.accounts tr.off td { color: var(--muted); }
table.accounts .link-btn { padding: 0; }
.acct-actions { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.danger-btn { color: #A3261B; border-color: #A3261B; }
.danger-btn:hover { background: #A3261B; border-color: #A3261B; color: var(--white); }
@media (max-width: 860px) { .tabbar.many a { font-size: 10px; } .tabbar.many a svg { width: 20px; height: 20px; } }
@media (max-width: 860px) { .tabbar a { min-width: 0; overflow: hidden; white-space: nowrap; } }

/* ---------- sales tools: outreach log, follow-ups, handoffs ---------- */
.lead-flags { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.lead-flags:empty { display: none; }
.lead-flags .tag { margin-left: 0; }
.touches { list-style: none; margin: 10px 0 0; padding: 0; }
.touches li { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.touches .when { white-space: normal; }
.give { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--ink); }
.stack label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
.stack label.check input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--hivis); }
/* My documents: per-field errors, the W-9 certification box, and the collapsible forms. */
.field-error { display: block; color: #b42318; font-size: 13px; font-weight: 500; margin-top: 4px; }
.field-error[hidden] { display: none; }
[aria-invalid="true"] { border-color: #b42318 !important; }
fieldset.seg { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
fieldset.seg legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.small-doc { font-size: 13px; border: 1px solid var(--line); padding: 12px 14px; background: rgba(0, 0, 0, .02); }
.small-doc ol { padding-left: 20px; margin: 6px 0; }
.doc-item details { margin-top: 12px; }
.doc-item summary { cursor: pointer; font-weight: 600; color: var(--hivis); padding: 6px 0; }
.doc-item summary + form { margin-top: 10px; }
.doc-item .panel-head { gap: 10px; flex-wrap: wrap; }
.wc-why { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.wc-why input { min-width: 0; width: 180px; padding: 6px 8px; }
.drawer .lead-est, .drawer .lead-msg { display: block; margin-top: 10px; }
.lead-side .link-btn { text-align: center; }

/* ---------- help, messages, refunds, closing clients ---------- */
.badge { margin-left: auto; min-width: 20px; padding: 1px 6px; background: var(--hivis); color: var(--ink); font-size: 11px; font-weight: 700; text-align: center; line-height: 1.5; }
.kinds { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.kinds legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.stack label.kind { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); cursor: pointer; font-weight: 400; font-size: 15px; }
.stack label.kind:has(input:checked) { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--hivis); }
.stack label.kind input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--hivis); padding: 0; }
.kind > span { display: flex; flex-direction: column; gap: 2px; }
.kind strong { font-weight: 600; }
.row.unread { box-shadow: inset 3px 0 0 var(--hivis); padding-left: 12px; }
.row.unread strong { font-weight: 700; }
.thread { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.thread li { max-width: 88%; padding: 10px 13px; background: var(--paper); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.thread li.mine { align-self: flex-end; background: var(--white); border: 1px solid var(--line); }
.thread .who { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.thread li.theirs .who { color: var(--hivis-ink); }
.thread .who .msg-x .link-btn { padding: 0; font-size: 11px; }
.thread li.removed { opacity: .7; }
.tabs { margin-bottom: 18px; }
.tabs .chip { font-size: 14px; padding: 8px 14px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.checks li { padding: 8px 12px; border: 1px solid var(--ink); border-left: 4px solid var(--hivis); background: #FFF6F1; }
.checks li.fine { border-color: var(--line); border-left-color: var(--line); background: var(--paper); color: var(--muted); }
table.spend td.wrap { white-space: normal; min-width: 220px; max-width: 360px; }
td.acts .link-btn + .link-btn { margin-left: 14px; }
.side-nav a > span, .tabbar a > span { min-width: 0; }
@media (max-width: 860px) {
  .tabbar a { position: relative; }
  .tabbar .badge { position: absolute; top: 4px; left: 50%; margin-left: 6px; min-width: 16px; padding: 0 4px; font-size: 10px; }
  /* more than six tabs: let the bar scroll sideways instead of squeezing the labels */
  .tabbar.many { display: flex; overflow-x: auto; scrollbar-width: none; }
  .tabbar.many::-webkit-scrollbar { display: none; }
  .tabbar.many a { flex: 0 0 68px; }
  td.acts .link-btn { display: block; margin: 0 0 4px !important; }
}
@media (max-width: 860px) { .row[data-ticket] { flex-direction: column; gap: 6px; } .row[data-ticket] .row-side { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; } }

/* ---------- demo calendar, client sign-ups ---------- */
.demo-day { margin-bottom: 26px; max-width: 980px; }
.demos { list-style: none; margin: 0; padding: 0; }
.demo-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); align-items: start; }
.demo-time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.demo-time b { font-size: 17px; font-weight: 600; }
.demo-time .muted { font-size: 12px; }
.demo-item .row-main { gap: 4px; }
.demo-item .row-main .muted { white-space: normal; }
.demo-item .cal-add { margin-top: 4px; }
.demo-acts { align-items: flex-end; gap: 2px; }
.demo-item.canceled strong { color: var(--muted); text-decoration: line-through; }
.demo-item.canceled .tag { text-decoration: none; }
.past { margin-top: 10px; max-width: 980px; }
.past summary { cursor: pointer; font-weight: 600; color: var(--hivis-ink); padding: 10px 0; }
.lead-go { margin-top: 4px; }
.signup { margin-top: 14px; background: var(--paper); border: 1px solid var(--line); padding: 2px 14px; }
.signup div:first-child { border-top: 0; }
@media (max-width: 860px) {
  .demo-item { grid-template-columns: 72px minmax(0, 1fr); }
  .demo-acts { grid-column: 2; flex-direction: row; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
}

/* ---------- demo assignment and availability ---------- */
.assign-to { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; margin-bottom: 6px; }
.assign-to select { font: inherit; font-size: 14px; font-weight: 400; padding: 6px 8px; border: 1px solid #C9C9C2; background: var(--white); color: var(--ink); min-width: 170px; border-radius: 0; }
.days { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.days legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.day-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px auto 104px; gap: 8px; align-items: center; }
.day-row select { padding: 7px 8px; font-size: 14px; }
.day-row .check { font-size: 14px; }
.avail-list .row-main .small { white-space: normal; }
.cal-head .btn-row { flex-wrap: nowrap; }
@media (max-width: 860px) { .assign-to { flex-direction: row; align-items: center; gap: 8px; width: 100%; } .assign-to select { flex: 1; min-width: 0; } .cal-head .btn-row { flex-wrap: wrap; } }

/* ---------- month calendar for demos ---------- */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-bottom: 14px; }
.cal-bar .cal-nav { margin-left: auto; }
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--line); max-width: 1160px; }
.mcal-h { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mcal-c { min-height: 112px; padding: 6px 6px 8px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); font: inherit; color: inherit; text-align: left; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.mcal-c.blank { background: var(--paper); cursor: default; }
.mcal-c:not(.blank):hover { background: #FBFBF9; }
.mcal-c.gone .mcal-n { color: #A9ABA6; }
.mcal-c.closed { background: repeating-linear-gradient(135deg, var(--paper) 0 8px, #E8E8E3 8px 9px); }
.mcal-c.on { box-shadow: inset 0 0 0 2px var(--ink); }
.mcal-n { font-size: 14px; font-weight: 600; line-height: 1.5; width: 26px; text-align: center; }
.mcal-c.is-today .mcal-n { background: var(--hivis); color: var(--ink); }
.mcal-ev { font-size: 12px; line-height: 1.3; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcal-ev b { font-weight: 600; }
.mcal-ev.mine, .mcal-legend i.mine { background: #FFE6DA; border-left: 3px solid var(--hivis); }
.mcal-ev.taken, .mcal-legend i.taken { background: #E9EEF6; border-left: 3px solid #3A5A8C; }
.mcal-ev.open, .mcal-legend i.open { background: var(--white); border: 1px dashed var(--ink); }
.mcal-ev.past { background: var(--paper); color: var(--muted); }
.mcal-note { font-size: 11px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcal-note.out { font-weight: 500; color: var(--muted); }
.mcal-more { font-size: 11px; color: var(--muted); padding-left: 6px; }
.mcal-dots { display: none; }
.mcal-legend { margin: 12px 0 24px; }
.mcal-legend i.closed { background: repeating-linear-gradient(135deg, var(--paper) 0 4px, #C9C9C2 4px 5px); border: 1px solid var(--line); }
.demo-day .panel-head .link-btn { padding: 0; }
.demo-day .notice { margin: 14px 0 0; }
.day-out { margin-top: 12px; }
@media (max-width: 860px) {
  .cal-bar .cal-nav { margin-left: 0; width: 100%; }
  .mcal-h { padding: 6px 0; text-align: center; font-size: 11px; }
  .mcal-c { min-height: 54px; padding: 4px 2px; align-items: center; gap: 2px; }
  .mcal-ev, .mcal-more, .mcal-note { display: none; }
  .mcal-dots { display: flex; gap: 3px; margin-top: 2px; }
  .mcal-dots i { width: 6px; height: 6px; border-radius: 50%; background: #3A5A8C; }
  .mcal-dots i.mine { background: var(--hivis); } .mcal-dots i.open { background: var(--white); border: 1px solid var(--ink); } .mcal-dots i.past { background: #C9C9C2; }
}

/* ---------- availability: several windows per day ---------- */
.day { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.day-head { display: flex; align-items: baseline; gap: 10px; }
.day-head strong { font-weight: 600; font-size: 14px; min-width: 92px; }
.day-head .link-btn { margin-left: auto; padding: 0; }
.wins { display: grid; gap: 6px; }
.wins:empty { display: none; }
.win { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 34px; gap: 8px; align-items: center; }
.win select { padding: 7px 8px; font-size: 14px; }
.win-x { width: 34px; height: 34px; font-size: 18px; }
.copy-row { padding-top: 10px; border-top: 1px solid var(--line); }
.days .hint { margin: 0 0 4px; }

/* team chat */
.chat { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.chat-list { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--white); }
.chat-list h2 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; padding: 14px 14px 6px; }
.chat-list > p { padding: 0 14px 14px; margin: 0; }
.chat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 10px 14px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.chat-row:hover { background: var(--paper); }
.chat-row.on { background: var(--paper); box-shadow: inset 3px 0 0 var(--ink); }
.chat-row.unread { box-shadow: inset 3px 0 0 var(--hivis); }
.chat-row.unread .chat-name { font-weight: 700; }
.chat-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .badge { margin-left: 0; align-self: center; }
.chat-room { min-width: 0; }
.chat-room h2 { margin: 0 0 2px; }
.chat-back { display: none; font-size: 13px; margin-bottom: 10px; }
.chat-thread { max-height: calc(100vh - 380px); min-height: 160px; overflow-y: auto; padding: 4px 4px 4px 0; margin-top: 14px; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: end; margin-top: 14px; }
.chat-form textarea { width: 100%; resize: vertical; }
.chat-form .form-error { grid-column: 1 / -1; margin: 0; }
.chat-hint { grid-column: 1 / -1; margin: -2px 0 0; font-size: 12px; }
@media (hover: none) { .chat-keys { display: none; } }
/* formatted messages */
.msg-body { display: block; }
.msg-body strong { font-weight: 700; }
.msg-body a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.msg-body .md-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: rgba(0, 0, 0, .06); padding: 1px 4px; }
.msg-body .md-pre { margin: 6px 0; padding: 8px 10px; background: rgba(0, 0, 0, .06); overflow-x: auto; font-size: 12.5px; line-height: 1.45; white-space: pre; }
.msg-body .md-pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.msg-body .md-list { margin: 4px 0; padding-left: 22px; }
.msg-body .md-list li { max-width: none; padding: 0; background: none; border: 0; font-size: inherit; }
.msg-body .md-list li.md-d1 { margin-left: 18px; }
.msg-body .md-list li.md-d2 { margin-left: 36px; }
.msg-body .md-list li.md-d3 { margin-left: 54px; }
.msg-body ul.md-list li { list-style-type: disc; }
.msg-body ol.md-list li { list-style-type: decimal; }
.msg-body ul.md-list li.md-d1 { list-style-type: circle; }
.msg-body ul.md-list li.md-d2, .msg-body ul.md-list li.md-d3 { list-style-type: square; }
.msg-body .md-table-wrap { margin: 6px 0; overflow-x: auto; max-width: 100%; }
.msg-body .md-table { border-collapse: collapse; font-size: 13px; line-height: 1.4; min-width: 100%; background: var(--white); }
.msg-body .md-table th, .msg-body .md-table td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; min-width: 90px; }
.msg-body .md-table th { background: var(--paper); font-weight: 700; font-size: 12px; }
.thread li:has(.md-table) { max-width: 100%; }
.msg-body .md-quote { margin: 4px 0; padding: 2px 0 2px 10px; border-left: 3px solid var(--line); color: var(--muted); }
@media (max-width: 860px) {
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat.has-room .chat-list, .chat:not(.has-room) .chat-room { display: none; }
  .chat-back { display: inline-block; }
  .chat-thread { max-height: calc(100vh - 400px); }
}
.chat-form textarea { font: inherit; font-size: 14px; line-height: 1.45; padding: 10px 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); min-height: 46px; }
.chat-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

/* sales manager: whose work is showing */
.rep-pick { margin: 0 0 18px; }
.rep-pick label { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.rep-pick select { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); padding: 8px 12px; border: 1px solid var(--ink); background: var(--white); min-width: 200px; }
.lead-owner { font-size: 12px; font-weight: 600; color: var(--hivis-ink); }

/* org chart */
.org-wrap { overflow-x: auto; padding: 4px 0 20px; }
.org, .org ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.org { width: max-content; min-width: 100%; }
.org ul { padding-top: 24px; position: relative; }
.org li { position: relative; padding: 24px 8px 0; display: flex; flex-direction: column; align-items: center; }
.org > li { padding-top: 0; }
.org ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 24px; border-left: 1px solid var(--ink); }
.org li::before, .org li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 24px; border-top: 1px solid var(--ink); }
.org li::after { right: auto; left: 50%; border-left: 1px solid var(--ink); }
.org > li::before, .org > li::after, .org li:only-child::before { display: none; }
.org li:only-child::after { border-top: 0; }
.org li:first-child::before, .org li:last-child::after { border-top: 0; }
.org-card { display: flex; flex-direction: column; gap: 2px; width: 172px; padding: 12px 14px; text-align: left; font: inherit; font-size: 12px; color: var(--muted); background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--ink); }
button.org-card { cursor: pointer; }
button.org-card:hover, button.org-card:focus-visible { border-color: var(--ink); outline: none; box-shadow: 3px 3px 0 var(--hivis); }
.org-card strong { font-size: 14px; color: var(--ink); }
.org-card.root { background: var(--ink); border-color: var(--ink); color: #cfcfcf; text-align: center; align-items: center; }
.org-card.root strong { color: var(--white); font-size: 16px; }
.org-card.group { border-style: dashed; border-top-style: solid; }
.org-card.me { border-top-color: var(--hivis); }
.org-n { margin-top: 4px; font-weight: 600; color: var(--ink); }
.org-clients { list-style: none; margin: 0; padding: 0; }
.org-clients li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.org-total { margin: 12px 0 0; }
@media (max-width: 860px) {
  .org-wrap { overflow: visible; }
  .org, .org ul { display: block; width: auto; min-width: 0; }
  .org ul { padding: 0 0 0 18px; margin-left: 10px; border-left: 1px solid var(--ink); }
  .org li { display: block; padding: 10px 0 0; }
  .org ul::before, .org li::after { display: none; }
  .org li::before, .org li:only-child::before, .org li:first-child::before { display: block; top: 34px; left: -18px; right: auto; width: 18px; height: 0; border-top: 1px solid var(--ink); }
  .org > li::before { display: none; }
  .org-card { width: 100%; }
}
.org > li::before { display: none !important; }

/* contractor agreement */
.agr-doc { max-width: 760px; }
.agr-doc h3 { margin: 26px 0 8px; font-size: 16px; }
.agr-doc p, .agr-doc li { font-size: 14px; line-height: 1.6; }
.agr-doc ul { padding-left: 20px; }
.agr-terms { border: 1px solid var(--ink); border-left: 4px solid var(--hivis); padding: 6px 14px; background: var(--paper); }
.agr-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--ink); }
.agr-sigs > div { display: flex; flex-direction: column; gap: 4px; }
.agr-sig { font-size: 20px; font-style: italic; font-weight: 500; }
.agr-edit { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 13px !important; min-height: 380px; }
.agr-publish { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); max-width: 560px; }
.notice.agr-ok { border-left-color: #2e7d32; }
@media (max-width: 560px) { .agr-sigs { grid-template-columns: 1fr; } }
@media print {
  .side, .tabbar, .mtop, .viewbar, .no-print, .page-head, .notice, #agr-sign, .drawer-close, .toast { display: none !important; }
  body.print-drawer .main, body.print-drawer .scrim { display: none !important; }
  body.print-drawer .drawer { position: static !important; width: auto !important; max-width: none !important; box-shadow: none !important; transform: none !important; overflow: visible !important; height: auto !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .panel { border: 0 !important; }
}
.agr-doc p { margin: 0 0 10px; }

/* ---------- onboarding: Get started checklist ---------- */
.onb-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-size: 14px; }
.onb-progress .meter { flex: 1; max-width: 320px; }
.onb { list-style: none; margin: 0; padding: 0; }
.onb li { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.onb li:last-child { border-bottom: 0; }
.onb .tick { margin-top: 2px; }
.onb li.ok .tick { background: var(--ink); border-color: var(--ink); color: var(--white); }
.onb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.onb-main strong { font-weight: 600; }
.onb-main .muted { font-size: 14px; }
.onb-side { flex: none; display: flex; align-items: center; gap: 12px; }
.onb-side .link-btn { padding: 0; white-space: nowrap; }
.onb-cell { display: flex; align-items: center; gap: 10px; }
.onb-cell .meter { width: 90px; flex: none; }
.onb-note { margin: 14px 0; }
.onb-doc ol { padding-left: 20px; }
.onb-doc li { margin-bottom: 6px; }
.onb-doc .table-wrap { margin-bottom: 14px; }
@media (max-width: 640px) { .onb li { flex-wrap: wrap; } .onb-side { width: 100%; padding-left: 32px; } }

/* ---------- booking hours and how full each window is ---------- */
.wk-win small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.wk-cell.is-off { background: repeating-linear-gradient(135deg, var(--paper) 0 6px, var(--white) 6px 12px); }
.wk-full { align-self: flex-start; margin-top: auto; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--hivis-ink); }
.wk-shut { display: block; font-style: normal; font-size: 11px; color: var(--muted); white-space: normal; }
.agenda-room { margin: -6px 0 12px; }
.win.win-cap { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 68px 34px; }
.win-head { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.win input { padding: 7px 8px; font-size: 14px; min-width: 0; width: 100%; border: 1px solid #C9C9C2; background: var(--white); color: var(--ink); border-radius: 0; font-family: inherit; }
.win.closed-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 34px; }
.win.closed-row input[data-c="n"] { grid-column: 1 / 4; grid-row: 2; }
.win.closed-row .win-x { grid-row: 1; grid-column: 4; }
.day-picks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.day-picks .check { margin: 0; }
#slot-hint:empty { display: none; }
.link-h { margin: 22px 0 4px; }
.link-tool { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.link-tool p { margin: 0; }
.link-prompt { width: 100%; font-size: 13px; margin: 8px 0 10px; }

/* "New client onboarded" posts in team chat, and the confetti that plays the first time someone sees one */
.thread li.cheer { background: #FFF3EC; border: 1px solid var(--hivis); border-left-width: 4px; font-weight: 600; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 9999; }
.confetti i { position: absolute; top: -20px; opacity: 0; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { 0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate3d(var(--drift), 105vh, 0) rotate(var(--spin)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* The lead pipeline board: one column per stage, cards drag between them */
.kb-tools { align-items: end; margin-bottom: 14px; }
.kb-tools label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.kb-tools select, .kb-tools input { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid #C9C9C2; background: var(--white); color: var(--ink); }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; align-items: start; padding-bottom: 12px; }
.kb-col { background: var(--paper); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 140px; border-top: 3px solid #C9C9C2; }
.kb-col.kb-requested { border-top-color: var(--hivis); }
.kb-col.kb-won { border-top-color: #2E9E6B; }
.kb-col.kb-lost { border-top-color: #A3261B; }
.kb-col.over { outline: 2px dashed var(--hivis); outline-offset: -2px; }
.kb-col h2 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 2px; display: flex; justify-content: space-between; align-items: center; }
.kb-n { font-weight: 600; color: var(--muted); background: var(--white); padding: 1px 8px; border-radius: 10px; letter-spacing: 0; }
.kb-card { background: var(--white); border: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; line-height: 1.4; cursor: grab; overflow-wrap: anywhere; }
.kb-card:hover, .kb-card:focus-visible { border-color: var(--ink); outline: none; }
.kb-card.dragging { opacity: .45; }
.kb-card.hot { border-left: 4px solid var(--hivis); }
.kb-card strong { font-size: 14px; }
.kb-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.kb-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.kb-move { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--muted); }
.kb-move select { flex: 1; min-width: 0; font: inherit; font-size: 12px; font-weight: 400; padding: 4px 6px; border: 1px solid #C9C9C2; background: var(--white); color: var(--ink); }
.kb-empty { font-size: 12px; color: var(--muted); margin: 6px 0; }
@media (max-width: 700px) { .kanban { grid-auto-columns: 82vw; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; } .kb-col { scroll-snap-align: start; } .kb-tools label, .kb-tools select { width: 100%; } }

/* Billing: the monthly and yearly choices */
.bill-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.bill-opt { border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--white); }
.bill-opt.best { border: 2px solid var(--hivis); }
.bill-opt h3 { margin: 0; font-size: 15px; }
.bill-price { font-size: 30px; font-weight: 700; margin: 0; line-height: 1.1; }
.bill-price span { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.bill-opt .btn { margin-top: auto; }

/* Agreements: the list of agreements and the audience picker */
.rows .row.on { background: var(--paper); }
.agr-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; }
.agr-aud .check .small { margin-left: 4px; }

/* Agreement blanks still to fill in */
.agr-blanks { border: 2px solid var(--hivis); background: #FFF3EC; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.agr-blanks-h { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.agr-blank { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }
.agr-blank-tag { font-family: ui-monospace, Menlo, monospace; font-size: 13px; font-weight: 700; color: #A3261B; }
.agr-blank input { grid-column: 1 / -1; font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid #C9C9C2; background: var(--white); }
.agr-blank .btn { justify-self: start; }
.agr-blank-links { display: flex; gap: 16px; align-items: center; }
.agr-blank .link-btn { padding: 0; }
@media (min-width: 700px) { .agr-blank { grid-template-columns: auto minmax(0, 1fr) minmax(160px, 1.2fr) auto auto; } .agr-blank input { grid-column: auto; } }
mark.blank { background: #FFD9C2; color: #A3261B; font-weight: 700; padding: 0 2px; }

/* Simple bulleted list inside a panel (rate change notices on My pay). */
.plain-list { margin: 0 0 .5rem; padding-left: 1.2em; }
.plain-list li { margin: .4em 0; line-height: 1.45; }

/* Contractors: the name block in the sidebar opens My account. */
.biz.biz-has-link { padding: 0; }
.biz-link { display: flex; flex-direction: column; padding: 12px; color: inherit; text-decoration: none; line-height: 1.35; }
.biz-link:hover, .biz-link:focus-visible { background: rgba(0, 0, 0, .03); outline: none; }
.biz-link .biz-name { color: var(--muted); font-size: 13px; }
.biz-link .biz-cta { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--hivis-ink, var(--hivis)); font-weight: 600; font-size: 14px; }
.biz-link:hover .biz-cta { text-decoration: underline; }
.section-title { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; margin: 28px 0 10px; }

/* Team pay: one card per contractor. */
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.pay-card { border: 1px solid var(--ink); background: var(--white); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pay-card.off { opacity: .7; }
.pay-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pay-card h3 { margin: 0; font-size: 18px; }
.chks { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { font-size: 12px; font-weight: 600; padding: 3px 7px; border: 1px solid var(--line); }
.chk.ok { background: #e8f5e9; border-color: #b8dfbe; color: #1b5e20; }
.chk.no { background: #fdecea; border-color: #f3c2bd; color: #a12a1f; }
.chk.wait { color: var(--muted); }
.pay-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0; }
.pay-nums div { min-width: 0; }
.pay-nums dt { font-size: 12px; color: var(--muted); }
.pay-nums dd { margin: 0; font-variant-numeric: tabular-nums; }
.pay-card .warn { color: #a12a1f; margin: 0; }
.pay-bank { display: flex; flex-direction: column; gap: 6px; }
.copy-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.copy-row .muted { min-width: 120px; }
.copy-row b { font-variant-numeric: tabular-nums; letter-spacing: .02em; word-break: break-all; }
@media (max-width: 420px) { .pay-grid { grid-template-columns: 1fr; } }

/* Team chat Leaderboard: two read-only bar charts. Thin bars with a rounded data end, value at the end in ink. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat-room.lb { overflow-y: auto; }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lb-top h2 { margin: 0; }
.lb-month select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); background: var(--white); }
.lb-chart { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--ink); }
.lb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lb-head h3 { margin: 0; font-size: 17px; }
.lb-bars { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lb-bars li { display: grid; grid-template-columns: 22px minmax(90px, 32%) minmax(0, 1fr) 36px; align-items: center; gap: 10px; padding: 7px 4px; }
.lb-bars li:hover { background: rgba(0, 0, 0, .03); }
.lb-bars li.me .lb-name { font-weight: 700; }
.lb-rank { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.lb-track { height: 14px; position: relative; border-left: 1px solid var(--line); }
.lb-bar { display: block; height: 100%; background: var(--hivis); border-radius: 0 4px 4px 0; min-width: 0; }
.lb-val { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
@media (max-width: 520px) { .lb-you { display: none; } .lb-bars li { grid-template-columns: 18px minmax(70px, 34%) minmax(0, 1fr) 30px; gap: 8px; } }
/* Weekly goal: a thin ink line across each track at the goal value. */
.lb-track { position: relative; }
.lb-goal { position: absolute; top: -4px; bottom: -4px; left: var(--goal, 100%); width: 2px; margin-left: -1px; background: var(--ink); }
.lb-check { font-weight: 700; }
.lb-key { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.lb-goal-key { display: inline-block; width: 2px; height: 14px; background: var(--ink); }
.lb-goals { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 10px; }
.lb-goals summary { cursor: pointer; font-weight: 600; color: var(--hivis-ink); }
.lb-goals form { margin-top: 10px; }
.lb-bars li { grid-template-columns: 22px minmax(90px, 32%) minmax(0, 1fr) 44px; }
@media (max-width: 520px) { .lb-bars li { grid-template-columns: 18px minmax(70px, 34%) minmax(0, 1fr) 40px; } }

/* A checkbox with a sentence beside it (agreeing to terms at checkout, consent boxes). */
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; font-size: 14px; line-height: 1.45; }
.check-row input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
/* A short list of radio choices, each with its explanation (End service, End agreement). */
fieldset.choice-list { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
fieldset.choice-list legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
fieldset.choice-list .check-row { margin: 6px 0; }
.end-notice { white-space: pre-wrap; border-left: 3px solid var(--line, #ccc); padding: 6px 12px; margin: 8px 0; font-size: 14px; }

/* The admin's grouped sidebar. */
.nav-group { margin: 6px 0 0; }
.nav-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: "+"; font-size: 14px; line-height: 1; }
.nav-group[open] > summary::after { content: "−"; }
.nav-group > summary:hover { color: var(--ink); }
.nav-group > a { padding-left: 18px; }

/* Goals. */
.goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.goal { display: flex; flex-direction: column; gap: 6px; }
.goal-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.goal-nums b { font-size: 26px; }
.goal .meter { display: block; }
.rep-pick { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 8px; }
