/* ============================================================
   FIREPLACE MART — Installer Portal (page-level rules only)
   ------------------------------------------------------------
   Fonts, tokens, themes, base reset and the whole shell
   (sidebar, nav, topbar, cards, grid) come from theme.css,
   which the admin ops shell imports too. This file holds ONLY
   what is unique to the installer portal.

   Do not declare tokens or shell components here — that is what
   made the two portals look like different products. Change
   theme.css and both move together.
   ============================================================ */
@import url('theme.css?v=19');

/* Installer cards are a single padded block (.card > .card-head + content);
   the admin uses .card > .card-head + .card-body, which carry their own
   padding. That is the one structural difference between the portals. */
.card{ padding:20px; }

/* Noir — aligned to the admin CRM noir palette (styles/crm.css) so the
   installer portal and the Fireplace Mart admin read as one product. */

/* ---------- base ---------- */


h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
img { max-width: 100%; }

::selection { background: var(--brand-soft); }

.num, .tabular { font-variant-numeric: tabular-nums; }

/* ---------- shell layout ---------- */


@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .topbar { background: var(--bg); }
}

/* ---------- sidebar ---------- */

.nav-badge[hidden] { display: none; }

.verified-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12.5px;
  font-weight: 700;
}
.verified-chip svg { width: 16px; height: 16px; flex: none; }
.sidebar-foot .ver { margin-top: 10px; font-size: 10.5px; color: var(--faint); text-align: center; }

/* ---------- avatar chip (topbar) ---------- */

.avatar-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.avatar-chip:hover { border-color: var(--brand); }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; border-radius: 22px; }
.avatar.md { width: 40px; height: 40px; font-size: 14px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.grey { background: linear-gradient(135deg, #8A8A8A, #6E6E6E); }
.avatar.teal { background: linear-gradient(135deg, #14B8A6, #0F766E); }
.avatar.navy { background: linear-gradient(135deg, #475569, #1E293B); }

.avatar-chip .who { line-height: 1.15; }
.avatar-chip .who b { display: block; font-size: 12.5px; }
.avatar-chip .who span { font-size: 11px; color: var(--muted); }

/* ---------- buttons ---------- */

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 17px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1;
  transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px var(--brand-ring); }
.btn-primary:hover { background: var(--brand-hover); }

.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--faint); }

.btn-soft { background: var(--grey-soft); color: var(--text); }
.btn-soft:hover { background: var(--border); }

.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; pointer-events: none; }

.btn.success-state { background: var(--green); color: #fff; }

.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--brand); font-weight: 700; font-size: 13px; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.field .hint { font-size: 11.5px; color: var(--faint); }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.textarea { resize: vertical; min-height: 110px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%236E6E6E' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.search-wrap { position: relative; }
.search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--faint); pointer-events: none;
}
.search-wrap .input { padding-left: 34px; }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 36px; height: 21px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: var(--border);
  transition: background .18s;
  cursor: pointer;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2.5px; left: 2.5px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .18s cubic-bezier(.34,1.4,.64,1);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(15px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

/* segmented filter */
.seg {
  display: inline-flex;
  background: var(--grey-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  appearance: none; border: 0; background: transparent;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: color .15s;
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* ---------- cards / chips / pills ---------- */


.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.pill svg { width: 12px; height: 12px; }
.pill.orange { background: var(--brand-soft); color: var(--brand); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.teal { background: var(--teal-soft); color: var(--teal); }
.pill.grey { background: var(--grey-soft); color: var(--muted); }

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.meta-chip svg { width: 13px; height: 13px; color: var(--faint); }

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--amber-soft);
  color: var(--amber);
}
.countdown svg { width: 12px; height: 12px; }
.countdown.urgent { background: var(--red-soft); color: var(--red); animation: pulseSoft 2s ease-in-out infinite; }

@keyframes pulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .22); }
  50% { box-shadow: 0 0 0 5px rgba(179, 38, 30, 0); }
}

/* ---------- dashboard ---------- */

.hero { margin: 6px 0 22px; }
.hero h2 { font-size: 30px; font-weight: 400; letter-spacing: -.015em; }
.hero p { color: var(--muted); margin-top: 4px; font-size: 13.5px; }



.dash-grid {
  display: grid;
  /* messages take the middle and the extra width — a preview line needs it */
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 14px;
  align-items: start;
}
/* Row 2's three cards line up because they all show DASH_ROWS rows and the
   "see all" link is pushed to a shared baseline. */
.dash-grid { align-items: stretch; }
/* min-width:0 or a long licence name forces its own track wider than its fr */
.dash-grid .card { padding: 18px; display: flex; flex-direction: column; min-width: 0; }
.card-foot { margin-top: auto; padding-top: 12px; }
.card-foot.more {
  font-size: 12px; font-weight: 700; color: var(--brand);
  text-decoration: none;
}
.card-foot.more:hover { text-decoration: underline; }
/* row 3 — expiring leads gets the wider column */
.dash-grid.two { grid-template-columns: 1.35fr 1fr; }

/* a one-line status band at the top of a card */
.wait-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 11px; margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 700;
}
.wait-banner svg { width: 14px; height: 14px; flex: none; }
.wait-banner.amber { background: var(--amber-soft); color: var(--amber); }
.wait-banner.green { background: var(--green-soft); color: var(--green); }

.card-clear {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 4px;
  color: var(--muted); font-size: 12.5px;
}
.card-clear svg { width: 15px; height: 15px; color: var(--green); }

/* Qualifications: full-width green / amber bars, still a clickable list.
   Sized so three bars occupy the same run as three message or agenda rows —
   the card was reading much heavier than the two beside it. */
.qual-list { display: flex; flex-direction: column; gap: 5px; }
.qual-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: inherit; text-decoration: none;
  background: var(--grey-soft);
  transition: filter .12s;
}
.qual-row:hover { filter: brightness(.97); }
.qual-row.ok { background: var(--green-soft); color: var(--green); }
.qual-row.pending { background: var(--amber-soft); color: var(--amber); }
.qual-row .qi { flex: none; display: inline-flex; }
.qual-row .qi svg { width: 14px; height: 14px; }
.qual-row .t { flex: 1; min-width: 0; }
.qual-row .t b { display: block; font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qual-row .t span { font-size: 10.5px; line-height: 1.3; opacity: .75; }
.qual-row.todo { color: var(--muted); }
.qual-row > svg { width: 13px; height: 13px; flex: none; opacity: .5; }

/* client messages preview — same shape as the inbox rows */
.msg-list { display: flex; flex-direction: column; }
.msg-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px 9px 2px;
  border-bottom: 1px solid var(--border-soft);
  color: inherit; text-decoration: none;
  border-radius: 8px;
  transition: background .12s;
}
.msg-item:last-child { border-bottom: 0; }
.msg-item:hover { background: var(--grey-soft); }
.msg-item .t { flex: 1; min-width: 0; }
.msg-item .t b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item .t span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item .meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg-item .time { font-size: 10.5px; color: var(--faint); }

.mini-list { display: flex; flex-direction: column; }
.mini-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.mini-item:last-child { border-bottom: 0; }
.mini-item .when {
  flex: none;
  width: 44px; text-align: center;
  background: var(--grey-soft);
  border-radius: 9px;
  padding: 5px 0;
  line-height: 1.15;
}
.mini-item .when b { display: block; font-size: 14px; }
.mini-item .when span { font-size: 10px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.mini-item .what { min-width: 0; }
.mini-item .what b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item .what span { font-size: 11.5px; color: var(--muted); }
.mini-item .amt { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini-item .amt.green { color: var(--green); }

.attn-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.attn-item:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.attn-item .t { min-width: 0; flex: 1; }
.attn-item .t b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attn-item .t span { font-size: 11.5px; color: var(--muted); }

/* ---------- requests (install orders + service calls) ---------- */

.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 4px 0 16px; }
.board-head h2 { font-size: 21px; font-weight: 400; letter-spacing: -.015em; }
.board-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* filter + view switcher */
.rq-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.rq-bar .spacer { flex: 1; }
.rq-filter .n {
  margin-left: 7px; padding: 0 6px;
  border-radius: 999px;
  background: var(--grey-soft); color: var(--muted);
  font-size: 10.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rq-filter button.on .n { background: var(--brand-soft); color: var(--brand); }

/* what kind of job this is — never leave it ambiguous */
.rq-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
.rq-tag svg { width: 13px; height: 13px; }
.rq-tag.install { background: var(--brand-soft); color: var(--brand); }
.rq-tag.service { background: var(--amber-soft); color: var(--amber); }

.rq-urg {
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--grey-soft); color: var(--muted);
}
.rq-urg.urgent { background: var(--red-soft); color: var(--red); }
.rq-urg.deadline { background: var(--amber-soft); color: var(--amber); }

/* ===== review mode — one request, big, three answers =====
   A photo stage you flick through, the facts that decide it laid over the
   bottom, then yes / wait / no. Everything else folds away underneath. */

.rv { animation: fadeUpSm .3s ease both; }
@keyframes fadeUpSm { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.rv-hero { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 16px; align-items: stretch; }

/* the photo: one square, flickable, on the left */
.rv-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  align-self: start;
  border-radius: var(--radius);
  overflow: hidden;
  background: #14110F;
}
.rv-stage .shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s ease;
}
.rv-stage .shot.on { opacity: 1; }
.rv-cap {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  max-width: calc(100% - 24px);
  padding: 4px 11px; border-radius: 999px;
  background: rgba(12,10,9,.6); color: #fff;
  font-size: 11px; font-weight: 600;
  backdrop-filter: blur(6px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* the facts: everything that decides it, on the right */
.rv-side {
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex; flex-direction: column;
}
.rv-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 18px; }
.rv-top .spacer { flex: 1; }
.rv-pos {
  padding: 4px 11px; border-radius: 999px;
  background: var(--grey-soft); color: var(--muted);
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rv-side h2 { font-size: 30px; font-weight: 400; letter-spacing: -.025em; line-height: 1.1; }
.rv-side > p { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 62ch; }
.rv-detail {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.rv-detail .rq-note { margin-top: 14px; }
.rv-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: auto; padding-top: 20px; }
.rv-facts > span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--grey-soft);
  font-size: 12.5px; font-weight: 600;
}
.rv-facts svg { width: 14px; height: 14px; opacity: .8; }
.rv-facts .rv-pay { background: var(--text); color: var(--surface); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rv-facts .rv-pay i { font-style: normal; font-size: 11px; font-weight: 600; opacity: .65; }

.rv-ticks {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; gap: 5px;
}
.rv-ticks button {
  width: 26px; height: 3px; padding: 0;
  border: 0; border-radius: 999px;
  background: rgba(255,255,255,.35);
  cursor: pointer; transition: background .15s;
}
.rv-ticks button.on { background: #fff; }

/* the three answers */
.rv-answer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.rv-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
}
.rv-btn:active { transform: translateY(1px); }
.rv-btn svg { width: 18px; height: 18px; }
.rv-btn.no { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.rv-btn.no:hover { border-color: var(--red); }
.rv-btn.wait { background: var(--amber-soft); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.rv-btn.wait:hover { border-color: var(--amber); }
.rv-btn.yes { background: var(--green); color: #fff; border-color: var(--green); }
.rv-btn.yes:hover { opacity: .9; }

/* price sits right under the answers — one line, no ceremony */
.rv-quick {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.rv-quick-lbl { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rv-quick .price-row { width: 150px; }
.rv-quick .sent-note { margin: 0; }

.rv-below { margin-top: 18px; }

.rv .rq-warn { margin-top: 12px; }

.rq-hero {
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px 20px;
  margin-bottom: 14px;
}
.rq-hero.service { border-left-color: var(--amber); }
.rq-hero-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 12px; }
.rq-hero-top .spacer { flex: 1; }
.rq-pos { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rq-hero h2 { font-size: 25px; font-weight: 400; letter-spacing: -.02em; }
.rq-brief { color: var(--muted); font-size: 13.5px; margin-top: 5px; max-width: 62ch; }

.rq-warn {
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 14px; padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12.5px; line-height: 1.5;
}
.rq-warn svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

.rq-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .85fr); gap: 14px; align-items: start; }
.rq-main, .rq-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rq-side { position: sticky; top: 14px; }

.rq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  min-width: 0;
}
.rq-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.rq-card-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.rq-card-title svg { width: 15px; height: 15px; color: var(--muted); }

/* 1 · map */
.map-frame {
  position: relative;
  height: 260px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.map-frame .map-embed {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity .35s ease;
}
.map-frame .map-embed.ready { opacity: 1; }
/* map tiles are always light — take the glare off them in the dark theme */
html[data-theme="dark"] .map-frame .map-embed { filter: brightness(.82) contrast(1.06) saturate(.9); }
.map-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  text-align: center; padding: 20px;
  font-size: 12.5px;
}
.map-fallback .mf-pin { color: var(--brand); }
.map-fallback .mf-pin svg { width: 26px; height: 26px; }
.map-fallback b { font-size: 13px; }
.map-fallback span { color: var(--faint); font-size: 11.5px; }

.rq-addr { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.rq-addr .t { flex: 1; min-width: 0; }
.rq-addr b { display: block; font-size: 13px; }
.rq-addr .t span { font-size: 11.5px; color: var(--muted); }

/* 2 · customer photos */
.shot-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.shot-stage .shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
}
.shot-stage .shot.on { opacity: 1; }
.shot-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  background: rgba(20,20,20,.55); color: #fff;
  cursor: pointer; backdrop-filter: blur(6px);
  transition: background .15s;
}
.shot-nav:hover { background: rgba(20,20,20,.8); }
.shot-nav svg { width: 15px; height: 15px; }
.shot-nav.prev { left: 10px; }
.shot-nav.next { right: 10px; }
.shot-cap {
  position: absolute; left: 10px; bottom: 10px;
  max-width: calc(100% - 100px);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(20,20,20,.6); color: #fff;
  font-size: 11.5px; font-weight: 600;
  backdrop-filter: blur(6px);
}
.shot-dots { display: flex; gap: 6px; justify-content: center; margin-top: 11px; }
.shot-dots button {
  width: 7px; height: 7px; padding: 0;
  border: 0; border-radius: 999px;
  background: var(--border); cursor: pointer;
  transition: background .15s, width .15s;
}
.shot-dots button.on { background: var(--brand); width: 18px; }

/* 3 · the product */
.prod-row { display: flex; gap: 16px; align-items: flex-start; }
.prod-img {
  flex: none;
  width: 150px; aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.prod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-t { min-width: 0; flex: 1; }
.prod-t > b { font-size: 15px; display: block; }
.prod-sub { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }

/* 4 · fact lists */
.fact-list { margin-top: 12px; }
.fact-list > div {
  display: grid; grid-template-columns: 118px 1fr; gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
}
.fact-list > div:last-child { border-bottom: 0; }
.fact-list dt { color: var(--muted); }
.fact-list dd { color: var(--text); }
.fact-list.wide { margin-top: 0; }

.rq-note {
  position: relative;
  margin-top: 14px;
  padding: 13px 15px 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 12.5px; line-height: 1.6;
}
.rq-note .ql { color: var(--faint); font-size: 18px; line-height: 0; vertical-align: -3px; margin-right: 2px; }
.rq-note cite { display: block; margin-top: 7px; font-style: normal; font-size: 11.5px; color: var(--muted); }

/* 5 + 6 · price, assign, respond */
.rq-act .fld { display: block; margin-bottom: 12px; }
.rq-act .fld-lbl { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.rq-act .fld-hint { font-size: 11.5px; color: var(--faint); margin: -6px 0 14px; }
.price-row { position: relative; display: block; }
.price-row .cur {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--muted); pointer-events: none;
}
.input.price { padding-left: 26px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sent-note {
  display: flex; align-items: center; gap: 6px;
  margin-top: 9px; font-size: 12px; color: var(--green);
}
.sent-note svg { width: 14px; height: 14px; }
.rq-act-split { height: 1px; background: var(--border-soft); margin: 18px 0 16px; }
/* sending a price is the everyday action, so it keeps the one blue button;
   accepting is heavier but rarer, so it reads as a solid neutral */
.btn-accept { background: var(--text); color: var(--surface); }
.btn-accept:hover { background: var(--text); opacity: .88; }
.rq-act-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.rq-act-row .btn { justify-content: center; }
.rq-act .decline-slot:not(:empty) { margin-top: 12px; }

/* ===== all-requests view — one line each, small thumbnails ===== */

.rq-lines { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.rq-line {
  display: grid;
  grid-template-columns: 76px minmax(140px, 1.1fr) minmax(150px, 1.3fr) 110px 150px 110px 92px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 16px 10px 10px;
  border: 0; border-bottom: 1px solid var(--border-soft);
  border-left: 3px solid var(--brand);
  background: transparent;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.rq-line.service { border-left-color: var(--amber); }
.rq-line:last-child { border-bottom: 0; }
.rq-line:hover { background: var(--grey-soft); }
.ln-img { width: 76px; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.ln-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ln-who { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ln-who b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ln-job { min-width: 0; }
.ln-job b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-job span, .ln-where span, .ln-pay span { display: block; font-size: 11px; color: var(--muted); }
.ln-where, .ln-when { font-size: 12.5px; min-width: 0; }
.ln-when span { display: block; margin-top: 3px; }
.ln-pay { font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.ln-pay span { font-weight: 600; text-align: right; }
.ln-go {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--brand);
}
.ln-go svg { width: 14px; height: 14px; }

.section-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 12px;
}
.section-label .count {
  background: var(--grey-soft);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
}
.section-label.orange { color: var(--brand); }
.section-label.orange .count { background: var(--brand-soft); color: var(--brand); }

.decline-reasons {
  display: flex; gap: 7px; align-items: center;
  animation: fadeSlide .25s ease both;
}
.decline-reasons .rsn {
  appearance: none; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  transition: all .15s;
}
.decline-reasons .rsn:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.decline-reasons .lbl { font-size: 11.5px; color: var(--faint); font-weight: 700; }

@keyframes fadeSlide { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.accepted-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  margin-bottom: 9px;
  box-shadow: var(--shadow);
}
.accepted-row .t { flex: 1; min-width: 0; }
.accepted-row b { font-size: 13px; display: block; }
.accepted-row .t span { font-size: 12px; color: var(--muted); }
.accepted-row .amt { font-weight: 800; font-variant-numeric: tabular-nums; }

/* check-morph on accept */
.btn .btn-check { display: none; }
.btn.checked { background: var(--green); color: #fff; pointer-events: none; }
.btn.checked .btn-label { display: none; }
.btn.checked .btn-check { display: inline-flex; animation: popIn .35s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- projects: filters, board, list ---------- */

/* One line of controls. Each select carries its own "any…" label so there
   are no headings stacked above a grid of boxes. */
.flt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.flt .spacer { flex: 1; }
.flt-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.flt-search {
  display: flex; align-items: center; gap: 7px;
  flex: 1 1 220px; max-width: 320px; min-width: 170px;
  padding: 0 11px; height: 32px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.flt-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.flt-search svg { width: 14px; height: 14px; color: var(--faint); flex: none; }
.flt-search input {
  flex: 1; min-width: 0;
  border: 0; background: none; outline: none;
  font: inherit; font-size: 12.5px; color: var(--text);
}
.flt-search input::-webkit-search-cancel-button { cursor: pointer; }

.flt-sel {
  appearance: none;
  height: 32px; padding: 0 27px 0 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%239B9A97' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>") no-repeat right 11px center;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; max-width: 190px;
  transition: border-color .15s, color .15s, background-color .15s;
}
.flt-sel:hover { border-color: var(--faint); color: var(--text); }
.flt-sel.on { background-color: var(--brand-soft); border-color: transparent; color: var(--brand); }
.flt-sel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }

.flt-clear {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 12px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
}
.flt-clear:hover { color: var(--red); background: var(--red-soft); }
.flt-clear svg { width: 12px; height: 12px; }

/* list view — a table that stays readable when a column is empty */
.pj-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.pj-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(180px, 1.6fr) 120px 130px 90px 100px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border: 0; border-bottom: 1px solid var(--border-soft);
  background: transparent;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.pj-row:last-child { border-bottom: 0; }
.pj-row:not(.head):hover { background: var(--grey-soft); }
.pj-row.head {
  cursor: default;
  background: var(--surface-2);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
  padding: 9px 16px;
}
.pj-row.head:hover { background: var(--surface-2); }
.pj-row .right { text-align: right; }
.pj-cust { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pj-cust b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-job { min-width: 0; }
.pj-job b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-job span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pj-when { font-size: 12.5px; }
.pj-when span { display: block; font-size: 11px; color: var(--muted); }
.pj-when.late { color: var(--red); }
.pj-when.late span { color: var(--red); opacity: .8; }
.pj-crew { display: flex; gap: -4px; }
.pj-crew .avatar + .avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.pj-val { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* one job, full width */
.pj-back {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  text-decoration: none; margin-bottom: 12px;
}
.pj-back:hover { color: var(--text); }
.pj-back svg { width: 14px; height: 14px; }
.meta-chip.late { color: var(--red); }
.meta-chip.late svg { color: var(--red); }

.stage-pick { display: flex; flex-direction: column; gap: 4px; }
.stage-pick button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 11px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: background .12s, color .12s;
}
.stage-pick button:hover { background: var(--grey-soft); color: var(--text); }
.stage-pick button.on { background: var(--grey-soft); color: var(--text); border-color: var(--border); }
.stage-pick .dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }

/* ---------- kanban ---------- */

.kb-wrap { overflow-x: auto; padding-bottom: 16px; margin: 0 -6px; }
.kb-wrap::-webkit-scrollbar { height: 9px; }
.kb-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.kb-wrap::-webkit-scrollbar-track { background: transparent; }

.kb-board { display: flex; gap: 13px; align-items: flex-start; min-width: max-content; padding: 0 6px; }

.kb-col {
  width: 236px;
  flex: 1 0 236px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px;
  transition: background .15s, border-color .15s;
}
.kb-col.drop-target { background: var(--brand-softer); border-color: var(--brand); border-style: dashed; }

.kb-col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 10px;
  font-size: 12px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}
.kb-col-head .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kb-col-head .cnt { margin-left: auto; background: var(--grey-soft); border-radius: 999px; padding: 1px 8px; font-size: 11px; }

.kb-body { display: flex; flex-direction: column; gap: 9px; min-height: 60px; }

.kb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 13px 14px 12px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  touch-action: none;
}
.kb-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--faint); }
.kb-card b.cust { font-size: 13.5px; display: block; }
.kb-card .prod { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kb-card .kb-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.kb-card .date-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--grey-soft);
  color: var(--muted);
}
.kb-card .date-chip.today { background: var(--brand-soft); color: var(--brand); }
.kb-card .date-chip svg { width: 11px; height: 11px; }

.kb-card.kb-placeholder-src { opacity: .35; }

.progress-dots { display: inline-flex; gap: 4px; margin-left: auto; }
.progress-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.progress-dots i.on { background: var(--brand); }

.kb-ghost {
  position: fixed;
  z-index: 300;
  pointer-events: none;
  box-shadow: var(--shadow-lift);
  transform-origin: center;
  opacity: .96;
  cursor: grabbing;
  border-color: var(--brand);
}

.kb-placeholder {
  border: 1.5px dashed var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-softer);
}

/* ---------- drawer ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 12, .34);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  transition: opacity .25s;
}
.overlay.show { opacity: 1; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 440px;
  max-width: 94vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lift);
  z-index: 95;
  transform: translateX(102%);
  transition: transform .3s cubic-bezier(.32, .72, .28, 1);
  display: flex;
  flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.drawer-head h3 { font-size: 18px; font-weight: 400; letter-spacing: -.01em; }
.drawer-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.drawer-body { padding: 18px 22px 30px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--border-soft); display: flex; gap: 10px; }

.icon-btn {
  appearance: none; border: 0; cursor: pointer;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--grey-soft);
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  flex: none;
}
.icon-btn:hover { background: var(--border); color: var(--text); }
.icon-btn svg { width: 14px; height: 14px; }

/* timeline */
.timeline { position: relative; margin: 6px 0 4px; padding-left: 20px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; border-radius: 2px; background: var(--border);
}
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-item::before {
  content: ""; position: absolute; left: -20px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--green);
}
.tl-item.future::before { border-color: var(--border); }
.tl-item.now::before { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.tl-item b { font-size: 13px; display: block; }
.tl-item span { font-size: 11.5px; color: var(--muted); }

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); flex: none; }
.kv .v { font-weight: 600; text-align: right; min-width: 0; }

.drawer-section { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin: 20px 0 8px; }
.drawer-section:first-child { margin-top: 0; }

/* ---------- modal ---------- */

.modal-wrap {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  width: 440px;
  max-width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  transform: translateY(14px) scale(.98);
  opacity: 0;
  transition: transform .25s cubic-bezier(.32,.72,.28,1), opacity .2s;
}
.modal.show { transform: none; opacity: 1; }
.modal h3 { font-size: 18px; font-weight: 400; letter-spacing: -.01em; margin-bottom: 4px; }
.modal .modal-sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- toast ---------- */

.toast-root {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 200;
  display: flex; flex-direction: column; gap: 9px;
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  background: #131313;
  color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 11px 17px;
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
  animation: toastIn .3s cubic-bezier(.3,1.3,.5,1) both;
  max-width: 380px;
}
html[data-theme="noir"] .toast { background: #F4F4F3; color: #0C0C0C; }
.toast svg { width: 15px; height: 15px; flex: none; }
.toast.ok svg { color: #5BD693; }
.toast.err svg { color: #FF8A80; }
html[data-theme="noir"] .toast.ok svg { color: var(--green); }
html[data-theme="noir"] .toast.err svg { color: var(--red); }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- overview ---------- */

/* The Overviews landing grid — one card per client, photos up front. */
.ovh-search { max-width: 380px; }
.ovh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ovh-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ovh-card:hover {
  text-decoration: none;
  border-color: var(--faint);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(12,12,12,.08);
}
.ovh-thumbs { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; aspect-ratio: 21 / 9; background: var(--grey-soft); }
.ovh-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ovh-thumbs img:first-child { grid-row: 1 / 3; }
.ovh-body { display: flex; flex-direction: column; gap: 3px; padding: 13px 15px 14px; }
.ovh-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ovh-name b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovh-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovh-counts { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

.chip-tabs { display: flex; gap: 7px; margin: 18px 0 16px; flex-wrap: wrap; }
.chip-tab {
  appearance: none; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
  font-family: inherit;
  transition: all .15s;
}
.chip-tab:hover { color: var(--text); border-color: var(--faint); }
.chip-tab.active { background: var(--text); border-color: var(--text); color: var(--surface); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; }
.photo-cell {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: var(--grey-soft);
}
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-cell .ph-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 10px 7px;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
  color: #fff; font-size: 11px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px; font-weight: 700;
  background: var(--surface-2);
  transition: all .15s;
}
.upload-tile:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-softer); }
.upload-tile svg { width: 20px; height: 20px; }

.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.file-row:last-child { border-bottom: 0; }
.file-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grey-soft); color: var(--muted);
}
.file-ico svg { width: 17px; height: 17px; }
.file-ico.pdf { background: var(--red-soft); color: var(--red); }
.file-ico.img { background: var(--teal-soft); color: var(--teal); }
.file-ico.dwg { background: var(--brand-soft); color: var(--brand); }
.file-row .t { flex: 1; min-width: 0; }
.file-row b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row .t span { font-size: 11.5px; color: var(--muted); }

.note-item { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px; margin-bottom: 9px; }
.note-item .who { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; font-weight: 700; }
.note-item .who svg { width: 13px; height: 13px; flex: none; }
.note-item p { font-size: 13px; }

.permit-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.permit-row:last-child { border-bottom: 0; }
.permit-row b { flex: 1; font-weight: 700; }

/* ---------- media gallery (full-screen job view) ---------- */

.mg-card .chip-tabs { margin: 16px 0 14px; }
.mg-add { gap: 8px; }
.chip-tab .cnt { margin-left: 6px; opacity: .55; font-weight: 700; }

.mg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 11px; }
.mg-tile {
  position: relative;
  appearance: none; cursor: zoom-in;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--grey-soft);
  padding: 0;
  font-family: inherit;
  text-align: left;
  color: var(--text);
  transition: border-color .15s, transform .15s;
}
.mg-tile:hover { border-color: var(--faint); transform: translateY(-1px); }
.mg-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 10px 7px;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
  color: #fff; font-size: 11px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mg-tile.sheet {
  cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 8px;
  padding: 14px;
  background: var(--surface-2);
}
.mg-tile.sheet b {
  font-size: 12.5px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mg-ico {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grey-soft); color: var(--muted);
}
.mg-ico svg { width: 18px; height: 18px; }
.mg-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }

/* full-screen viewer */
.mv {
  position: fixed; inset: 0; z-index: 150;
  display: flex; flex-direction: column;
  background: rgba(10, 9, 8, .9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: mvIn .18s ease both;
}
@keyframes mvIn { from { opacity: 0; } }
.mv-top { display: flex; align-items: center; gap: 14px; padding: 16px 20px; color: #fff; }
.mv-count { font-size: 12px; font-weight: 700; opacity: .6; flex: none; letter-spacing: .02em; }
.mv-title { font-size: 13.5px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-x {
  appearance: none; cursor: pointer; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.mv-x:hover { background: rgba(255,255,255,.18); }
.mv-x svg { width: 16px; height: 16px; }
.mv-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  padding: 0 16px;
}
.mv-img {
  max-width: min(1100px, calc(100% - 120px));
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.mv-sheet {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  padding: 44px 48px;
  max-width: min(460px, calc(100% - 120px));
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.mv-sheet .mg-ico,
.mv-sheet-ico {
  width: 58px; height: 58px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grey-soft); color: var(--muted);
}
.mv-sheet-ico svg { width: 26px; height: 26px; }
.mv-sheet b { font-size: 15.5px; line-height: 1.4; overflow-wrap: anywhere; }
.mv-sheet-meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.mv-nav {
  appearance: none; cursor: pointer; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.mv-nav:hover { background: rgba(255,255,255,.2); }
.mv-nav svg { width: 18px; height: 18px; }
.mv-cap { padding: 14px 20px 20px; text-align: center; color: rgba(255,255,255,.66); font-size: 12.5px; }

@media (max-width: 700px) {
  .mv-img, .mv-sheet { max-width: calc(100% - 8px); }
  .mv-nav { position: absolute; bottom: 54px; }
  .mv-nav.prev { left: 18px; }
  .mv-nav.next { right: 18px; }
}

/* ---------- chat ---------- */

.chat-layout {
  display: grid;
  grid-template-columns: 296px 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: calc(100vh - var(--topbar-h) - 92px);
  min-height: 460px;
}

.chat-list { border-right: 1px solid var(--border-soft); overflow-y: auto; padding: 10px; }
.chat-thread-btn {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  appearance: none; border: 0; background: transparent;
  padding: 11px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background .15s;
}
.chat-thread-btn:hover { background: var(--grey-soft); }
.chat-thread-btn.active { background: var(--brand-softer); }
.chat-thread-btn .t { flex: 1; min-width: 0; }
.chat-thread-btn b { display: block; font-size: 13px; }
.chat-thread-btn .t span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread-btn .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.chat-thread-btn .time { font-size: 10.5px; color: var(--faint); }
.unread-dot {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--brand); color: #fff;
  font-size: 10.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}

.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-pane-head {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.chat-pane-head b { font-size: 14px; display: block; }
.chat-pane-head .grow span { font-size: 11.5px; color: var(--muted); }

.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }

.msg-row { display: flex; margin-bottom: 6px; }
.msg-row.me { justify-content: flex-end; }
.bubble {
  max-width: 68%;
  padding: 9px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.4;
  animation: bubbleIn .25s ease both;
  overflow-wrap: break-word;
}
.msg-row.them .bubble { background: var(--grey-soft); color: var(--text); border-bottom-left-radius: 6px; }
.msg-row.me .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.msg-row.sys { justify-content: center; }
.msg-row.sys .bubble { background: transparent; color: var(--faint); font-size: 11.5px; font-weight: 600; max-width: 90%; text-align: center; padding: 4px; animation: none; }
.msg-time { font-size: 10px; opacity: .65; margin-top: 3px; text-align: right; }
.msg-row.them .msg-time { text-align: left; color: var(--faint); }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.typing .bubble { display: inline-flex; gap: 4px; padding: 12px 15px; }
.typing .bubble i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--faint);
  animation: typingDot 1.1s ease-in-out infinite;
}
.typing .bubble i:nth-child(2) { animation-delay: .15s; }
.typing .bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-input-row {
  display: flex; gap: 9px; align-items: center;
  padding: 13px 15px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}
.chat-input-row .input { border-radius: 999px; padding: 11px 17px; }
.send-btn {
  appearance: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 8px var(--brand-ring);
}
.send-btn:hover { background: var(--brand-hover); }
.send-btn:active { transform: scale(.94); }
.send-btn svg { width: 17px; height: 17px; }

/* ---------- calendar ---------- */

/* The calendar owns the full width now — the old right-hand "Upcoming" rail
   was squeezing the grid and clipping the view switcher. */
.cal-page { display: block; }

.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-head h3 { font-size: 18px; font-weight: 400; letter-spacing: -.01em; margin-right: 4px; }
.cal-head .spacer { flex: 1; }
.cal-nav { display: flex; gap: 6px; }

.cal-grid-wrap { position: relative; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; }
.cal-dow span { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--faint); text-transform: uppercase; text-align: center; padding: 4px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-day {
  min-height: 96px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 7px 7px 6px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 3px;
  overflow: hidden;
}
.cal-day:hover { border-color: var(--faint); box-shadow: var(--shadow); }
.cal-day.other { opacity: .42; background: transparent; }
.cal-day .dnum {
  font-size: 12px; font-weight: 700;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex: none;
}
.cal-day.today .dnum { background: var(--brand); color: #fff; box-shadow: 0 0 0 3px var(--brand-ring); }
.cal-evt {
  font-size: 10.5px; font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* month cells use the same key as the week grid's .calw-ev (theme.css) */
.cal-evt { background: var(--s-gray-bg); color: var(--s-gray); cursor: pointer; }
.cal-evt.install { background: var(--s-teal-bg); color: var(--s-teal); }
.cal-evt.service { background: var(--s-amber-bg); color: var(--s-amber); }
.cal-evt.sitecheck { background: var(--s-blue-bg); color: var(--s-blue); }
.cal-evt.other { background: var(--s-pur-bg); color: var(--s-pur); }
.cal-evt:hover { filter: brightness(.95); }
.cal-more { font-size: 10px; color: var(--faint); font-weight: 700; padding-left: 4px; }

.cal-pop {
  position: absolute;
  z-index: 60;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  padding: 14px;
  animation: fadeSlide .18s ease both;
}
.cal-pop h4 { font-size: 14.5px; font-weight: 400; margin-bottom: 6px; }
.cal-pop .evt-line {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 6px; border: 0; border-radius: 8px;
  background: transparent; font: inherit; color: inherit; text-align: left;
  font-size: 12.5px; cursor: pointer;
  transition: background .12s;
}
.cal-pop .evt-line:hover { background: var(--grey-soft); }
.cal-pop .evt-line .t { min-width: 0; }
.cal-pop .evt-line b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-pop .evt-line span { font-size: 11px; color: var(--muted); }
.cal-pop .none { font-size: 12.5px; color: var(--muted); }
.cal-pop .pop-add {
  display: flex; align-items: center; gap: 6px; width: 100%;
  margin-top: 6px; padding: 8px 6px;
  border: 0; border-top: 1px solid var(--border-soft); border-radius: 0;
  background: none; font: inherit; font-size: 12px; font-weight: 700;
  color: var(--brand); cursor: pointer; text-align: left;
}
.cal-pop .pop-add svg { width: 13px; height: 13px; }

/* the colour key, used in the popover and the event preview */
.sw { width: 9px; height: 9px; border-radius: 3px; flex: none; background: var(--s-gray); }
.sw.install { background: var(--s-teal); }
.sw.service { background: var(--s-amber); }
.sw.sitecheck { background: var(--s-blue); }
.sw.other { background: var(--s-pur); }

.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cal-legend i { width: 9px; height: 9px; border-radius: 3px; }

/* the "add something" form */
.modal-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 18px; }
.modal-head .sw { margin-top: 6px; }
.modal-head h3 { font-size: 17px; font-weight: 400; letter-spacing: -.01em; }
.modal-head .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.add-row { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 10px; }
.add-row.two { grid-template-columns: 1fr 1fr; }
.modal-foot { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.modal-foot .spacer { flex: 1; }

/* ---------- team ---------- */

.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.team-card { display: flex; flex-direction: column; gap: 14px; }
.team-top { display: flex; align-items: center; gap: 13px; }
.team-top .t { flex: 1; min-width: 0; }
.team-top b { font-size: 14.5px; display: block; }
.team-top .t span { font-size: 12px; color: var(--muted); }
.team-top .select { width: auto; padding: 7px 30px 7px 11px; font-size: 12.5px; font-weight: 700; }

.access-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.access-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }

.team-card .rm { align-self: flex-end; }

/* ---------- payments ---------- */

.pay-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }

.pay-filters { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; flex-wrap: wrap; }
.pay-filters .search-wrap { flex: 1; min-width: 200px; max-width: 320px; }
.pay-filters .select { width: auto; }

.table-card { padding: 6px 0 2px; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  font-size: 11px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.tbl .inv { font-weight: 700; }
.tbl .mut { color: var(--muted); }

.bank-card { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.bank-ico {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: var(--grey-soft);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.bank-ico svg { width: 20px; height: 20px; }
.bank-card .t { flex: 1; }
.bank-card b { display: block; font-size: 13.5px; }
.bank-card .t span { font-size: 12px; color: var(--muted); }

/* ---------- profile ---------- */

.profile-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }

.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.avatar-edit .t b { display: block; font-size: 14px; }
.avatar-edit .t span { font-size: 12px; color: var(--muted); }

.session-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.session-row:last-child { border-bottom: 0; }
.session-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--grey-soft); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.session-ico svg { width: 16px; height: 16px; }
.session-row .t { flex: 1; min-width: 0; }
.session-row b { display: block; font-size: 12.5px; }
.session-row .t span { font-size: 11.5px; color: var(--muted); }
.session-row .when { font-size: 11.5px; color: var(--faint); flex: none; }

/* ---------- settings ---------- */

.theme-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); gap: 14px; }
.theme-card {
  border: 2px solid var(--border);
  border-radius: 15px;
  padding: 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  background: var(--surface);
}
.theme-card:hover { box-shadow: var(--shadow-md); }
.theme-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.theme-preview {
  border-radius: 10px;
  height: 92px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  position: relative;
}
.theme-preview.light { background: #FAFAFA; }
.theme-preview.light::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 26%; background: #fff; border-right: 1px solid #EAEAEA; }
.theme-preview.light::after { content: ""; position: absolute; left: 34%; top: 18px; width: 46%; height: 9px; border-radius: 6px; background: #E8590C; }
.theme-preview.noir { background: #0E0E10; }
.theme-preview.noir::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 26%; background: #17171A; border-right: 1px solid #29292E; }
.theme-preview.noir::after { content: ""; position: absolute; left: 34%; top: 18px; width: 46%; height: 9px; border-radius: 6px; background: #F1660F; }
.theme-card .t { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px 3px; }
.theme-card b { font-size: 13px; }
.theme-card .pill { font-size: 10px; }

.notif-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 10px 26px; align-items: center; }
.notif-grid .nh { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.notif-grid .nl b { font-size: 13px; display: block; }
.notif-grid .nl span { font-size: 11.5px; color: var(--muted); }

.danger-zone { border-color: color-mix(in srgb, var(--red) 28%, var(--border)); }
.danger-zone .card-title svg { color: var(--red); }

/* ---------- support ---------- */

.support-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }

.contact-row { display: flex; align-items: center; gap: 13px; padding: 12px 2px; border-bottom: 1px solid var(--border-soft); }
.contact-row:last-child { border-bottom: 0; }
.contact-row .t b { display: block; font-size: 13.5px; }
.contact-row .t span { font-size: 12px; color: var(--muted); }

.ticket-row { display: flex; align-items: center; gap: 11px; padding: 11px 2px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row .id { font-weight: 800; color: var(--muted); font-size: 12px; flex: none; }
.ticket-row .t { flex: 1; min-width: 0; }
.ticket-row .t b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-row .t span { font-size: 11.5px; color: var(--muted); }

.success-panel { text-align: center; padding: 34px 20px; }
.success-panel .big-check {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  animation: popIn .45s cubic-bezier(.3,1.6,.5,1) both;
}
.success-panel .big-check svg { width: 28px; height: 28px; }
.success-panel h3 { font-size: 17px; margin-bottom: 6px; }
.success-panel p { color: var(--muted); font-size: 13px; }
.success-panel .tkt { font-weight: 800; color: var(--text); }

/* ---------- empty states ---------- */

.empty-state {
  text-align: center;
  padding: 58px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.empty-state .es-ico {
  width: 58px; height: 58px;
  border-radius: 18px;
  background: var(--brand-softer);
  color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.empty-state .es-ico svg { width: 26px; height: 26px; }
.empty-state h3 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 13px; max-width: 420px; margin: 0 auto; }
.empty-state .btn { margin-top: 18px; }
.empty-state.slim { padding: 34px 20px; box-shadow: none; border-style: dashed; background: var(--surface-2); }

/* ---------- view transitions / stagger ---------- */

.view-anim { animation: viewIn .3s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.stagger > * { animation: cardIn .5s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- utilities ---------- */

.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.w-100 { width: 100%; }
.divider { height: 1px; background: var(--border-soft); margin: 16px 0; border: 0; }

/* ---------- responsive ---------- */

/* three columns need real room — below this the third one starves */
@media (max-width: 1380px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid > .card:first-child { grid-column: 1 / -1; }
  .dash-grid.two { grid-template-columns: 1fr 1fr; }
  .dash-grid.two > .card:first-child { grid-column: auto; }
}

/* NOTE: the icon-rail collapse that used to live here (--sidebar-w:74px plus
   label hiding at 1100px) is gone. The rail was unique to this portal and was
   the reason the two shells diverged on any laptop-width screen. Both portals
   now keep the full sidebar down to 900px and then slide it in as a drawer —
   see the responsive block in theme.css. */
@media (max-width: 1100px) {
  .team-grid { grid-template-columns: 1fr; }
  .support-layout, .profile-layout, .cal-layout { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 240px 1fr; }
  /* the review rail stops being a rail and becomes the last block */
  .rq-body { grid-template-columns: 1fr; }
  .rq-side { position: static; }
  .prod-img { width: 118px; }
  /* the list drops the columns that repeat what the first two already say */
  .pj-row { grid-template-columns: minmax(130px, 1fr) minmax(150px, 1.4fr) 110px 110px; }
  .pj-row > :nth-child(5), .pj-row > :nth-child(6) { display: none; }
  .rq-line { grid-template-columns: 68px minmax(120px, 1fr) minmax(130px, 1.2fr) 140px 100px; }
  .rq-line > .ln-where, .rq-line > .ln-go { display: none; }
  .rv-side h2 { font-size: 24px; }
  .rv-hero { grid-template-columns: 1fr; }
  .rv-answer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Installer-only frosted surfaces. The ambient wash, sidebar, topbar and
   card/modal frosting all come from theme.css now — this portal must NOT
   define its own or the two portals drift apart again. */
html[data-theme="noir"] .drawer,
html[data-theme="noir"] .popover,
html[data-theme="glass"] .drawer,
html[data-theme="glass"] .popover {
  -webkit-backdrop-filter: var(--panel-blur);
  backdrop-filter: var(--panel-blur);
}

/* ===== Admin ⇄ Installer view switcher (both portals share this look) ===== */
.view-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 0;
}
.view-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: 0;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
/* Which portal you are in is a toggle, not a call to action — matches
   .view-seg in crm.css, deliberately. */
.view-seg button.on { background: var(--surface); color: var(--text);
  box-shadow: 0 0 0 1px rgba(15,15,15,.06), 0 1px 2px rgba(15,15,15,.1); }
.view-seg button:not(.on):hover { color: var(--text); }
.view-seg svg { width: 14px; height: 14px; }