/* operator screens: page-specific styles on top of ui.css (see docs/DESIGN.md). Everything here is prefixed op- or scoped to
   an operator-only class, because every stylesheet loads on every page. */

/* ---------- shared bits */
.op-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.op-eyebrow.brand { color: var(--brand); }
.op-status { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 9px; border-radius: 99px; font-size: 12.5px; font-weight: 550;
  background: var(--ok-soft); color: var(--ok); letter-spacing: 0; vertical-align: middle; }
.op-status.paused { background: var(--warn-soft); color: var(--warn); }
.op-status.sim { background: #f0f0ed; color: var(--ink-2); }
.op-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.op-status.live .op-dot { animation: op-pulse 2s ease-in-out infinite; }
@keyframes op-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 45%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 0%, transparent); } }
.op-sep { color: var(--faint); margin: 0 6px; }
.op-muted { color: var(--muted); }
.op-up { color: var(--ok); font-weight: 600; } .op-down { color: var(--bad); font-weight: 600; }
.op-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.op-kv:last-child { border-bottom: 0; }
.op-kv span { color: var(--ink-2); }
.op-kv b { font-weight: 600; font-variant-numeric: tabular-nums; }
.op-sub { font-size: 12.5px; color: var(--muted); padding: 2px 0 2px 12px; }
.op-ic-ok { color: var(--ok); } .op-ic-warn { color: var(--warn); } .op-ic-bad { color: var(--bad); } .op-ic-muted { color: var(--faint); }
.op-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.op-flag .op-dot { width: 6px; height: 6px; }
.op-flag.bad .op-dot { background: var(--bad); } .op-flag.warn .op-dot { background: #d38a17; } .op-flag.ok { color: var(--ok); }
.op-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.op-card-h h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.op-card-h h3 .ico { color: var(--muted); }
.op-card-h .op-link, .op-link { font-size: 13px; font-weight: 550; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; }
.op-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.op-row:last-child { border-bottom: 0; }
a.op-row:hover .op-row-t { color: var(--brand); }
.op-row-t { font-weight: 600; font-size: 14px; }
.op-row-s { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.op-row .grow { min-width: 0; }
.op-num-badge { width: 26px; height: 26px; border-radius: 8px; background: var(--subtle); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); flex: none; }
.op-seg { display: inline-flex; gap: 2px; padding: 3px; background: #efefec; border-radius: 10px; flex-wrap: wrap; }
.op-seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 550; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.op-seg button:hover { color: var(--ink); }
.op-seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(21,23,28,.08); }
.op-seg button small { color: var(--faint); font-size: 11.5px; font-weight: 600; }
.op-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.op-empty .tile { margin: 0 auto 12px; }
.op-empty h3 { color: var(--ink); margin: 0 0 4px; }
.op-empty p { margin: 0 auto 14px; max-width: 420px; font-size: 14px; }
.op-allclear { display: flex; align-items: center; gap: 12px; padding: 18px 0 6px; color: var(--ink-2); font-size: 14px; }
.op-allclear .tile { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px #cdebdc; }
.tile.op-warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px #f3e1bd; }
.tile.op-bad { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px #f4cfcb; }
.tile.op-ok { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px #cdebdc; }
.tile.op-plain { background: var(--subtle); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.op-grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.op-stack { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1100px) { .op-grid-side { grid-template-columns: minmax(0, 1fr); } }

/* ---------- metric strip: one card, hairline-divided cells, quiet numbers */
.op-metrics { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.op-metric { padding: 18px 20px; border-left: 1px solid var(--line); min-width: 0; position: relative; }
.op-metric:first-child { border-left: 0; }
.op-metric .l { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.op-metric .l .ico { color: var(--faint); }
.op-metric .v { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.2; margin-top: 6px; color: var(--ink); font-variant-numeric: tabular-nums; }
.op-metric .v.brand { color: var(--brand); }
.op-metric .d { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.op-metric .d b { color: var(--ink-2); font-weight: 600; }
.op-funnel .op-metric:not(:first-child)::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: var(--panel); border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: rotate(45deg); }
@media (max-width: 1000px) { .op-metrics { grid-template-columns: repeat(min(var(--n, 4), 3), minmax(0, 1fr)); } .op-metric:nth-child(3n + 1) { border-left: 0; } .op-metric:nth-child(n + 4) { border-top: 1px solid var(--line); } .op-funnel .op-metric::before { display: none; } }
@media (max-width: 640px) { .op-metrics { grid-template-columns: 1fr 1fr; } .op-metric { padding: 14px 16px; border-left: 1px solid var(--line) !important; border-top: 0 !important; } .op-metric:nth-child(odd) { border-left: 0 !important; } .op-metric:nth-child(n + 3) { border-top: 1px solid var(--line) !important; } .op-metric .v { font-size: 22px; } }

/* ---------- hero number (revenue, cockpit) */
.op-hero { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-md); padding: 28px 30px 26px; margin-bottom: 16px; }
.op-hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: end; }
.op-hero-big { font-size: 48px; font-weight: 650; letter-spacing: -.045em; line-height: 1.05; margin: 8px 0 8px; color: var(--ink); font-variant-numeric: tabular-nums; }
.op-hero-sub { color: var(--muted); font-size: 14px; margin: 0; }
.op-hero-sub b { color: var(--ink-2); font-weight: 600; }
.op-hero .op-metrics { box-shadow: none; margin: 24px 0 0; background: var(--subtle); border-radius: 14px; }
@media (max-width: 900px) { .op-hero-top { grid-template-columns: minmax(0, 1fr); gap: 18px; } .op-hero { padding: 22px 18px; } .op-hero-big { font-size: 38px; } }
.op-meter { height: 8px; border-radius: 99px; background: #ecece8; overflow: hidden; }
.op-meter > div { height: 100%; border-radius: 99px; background: var(--brand); min-width: 4px; }
.op-meter-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }

/* ---------- column chart (single series, brand) with hover tooltips */
.op-chart { position: relative; padding-top: 8px; }
.op-chart-plot { padding-right: 48px; position: relative; height: var(--h, 150px); display: flex; align-items: flex-end; gap: var(--gap, 6px); }
.op-chart-grid { position: absolute; inset: 0 0 0 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.op-chart-grid div { border-top: 1px dashed #e6e6e2; position: relative; }
.op-chart-grid div:last-child { border-top: 1px solid var(--line-2); }
.op-chart-grid span { position: absolute; right: 0; top: -8px; background: transparent; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.op-col { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; cursor: default; min-width: 0; }
.op-col i { display: block; width: 100%; max-width: 44px; margin: 0 auto; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--brand) 78%, white); min-height: 2px; transition: background .12s; }
.op-col.last i { background: var(--brand); }
.op-col:hover i { background: var(--brand-deep); }
.op-col .tip { display: none; position: absolute; bottom: calc(var(--y) + 8px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; padding: 5px 9px; border-radius: 8px; white-space: nowrap; z-index: 3; pointer-events: none; box-shadow: var(--shadow-md); }
.op-col .tip b { font-weight: 600; }
.op-col:hover .tip { display: block; }
.op-chart-x { padding-right: 48px; display: flex; gap: var(--gap, 6px); margin-top: 7px; font-size: 11px; color: var(--muted); }
.op-chart-x span { flex: 1; text-align: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.op-chart-cap { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.op-chart-cap b { color: var(--ink); font-weight: 600; }

/* ---------- Autopilot: launch (empty) state */
.op-launch { max-width: 820px; margin: 4vh auto 0; text-align: center; padding: 0 4px; }
.op-launch .tile.lg { margin: 0 auto 18px; }
.op-launch h1 { font-size: 40px; font-weight: 650; letter-spacing: -.035em; line-height: 1.12; margin: 8px 0 12px; }
.op-launch .lead { color: var(--muted); font-size: 16px; max-width: 600px; margin: 0 auto; }
.op-launch-form { display: flex; align-items: center; gap: 8px; margin: 30px auto 0; max-width: 640px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 8px 8px 8px 18px; box-shadow: var(--shadow-md); transition: border-color .12s, box-shadow .12s; }
.op-launch-form:focus-within { border-color: var(--brand); box-shadow: var(--ring), var(--shadow-md); }
.op-launch-form > .ico { color: var(--faint); }
.op-launch-form input[type=text] { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; font-size: 17px; padding: 10px 4px; min-height: 48px; }
.op-launch-form .btn { flex: none; }
.op-launch-ex { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.op-launch-ex button { border: 1px solid var(--line-2); background: var(--panel); border-radius: 99px; height: 30px; padding: 0 12px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.op-launch-ex button:hover { border-color: var(--brand-line); color: var(--brand); }
.op-launch-note { max-width: 660px; text-align: left; margin: 22px auto 0; display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); background: var(--subtle); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; }
.op-launch-note a { font-weight: 600; }
.op-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 56px auto 0; max-width: 1000px; text-align: left; }
.op-how > div { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow); }
.op-how .n { font-size: 12px; color: var(--faint); font-weight: 600; letter-spacing: .06em; margin: 14px 0 4px; }
.op-how h3 { margin: 0 0 6px; font-size: 15.5px; }
.op-how p { margin: 0; color: var(--muted); font-size: 13.5px; }
@media (max-width: 800px) { .op-how { grid-template-columns: minmax(0, 1fr); margin-top: 32px; } .op-launch h1 { font-size: 30px; } .op-launch-form { flex-wrap: wrap; padding: 8px; } .op-launch-form > .ico { display: none; } .op-launch-form input[type=text] { padding: 8px 10px; } .op-launch-form .btn { width: 100%; } .op-launch-note { border-radius: 14px; text-align: left; } }

/* ---------- Autopilot: home */
.ap-regions .chip { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); }
.ap-regions .chip small { color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.ap-regions .chip.on small { color: var(--brand); opacity: .75; }
.ap-regions .chip .ico { color: var(--faint); }
.ap-regions .chip.on .ico { color: var(--brand); }
.op-sim { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 14px; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; margin: 0 0 16px; font-size: 13.5px; color: var(--ink-2); box-shadow: var(--shadow); }
.op-sim > .ico { color: var(--muted); }
.op-sim .grow { min-width: 200px; }
.op-sim a { font-weight: 600; }
.op-brief { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.op-today h2 { font-size: 21px; font-weight: 500; color: var(--ink-2); letter-spacing: -.02em; line-height: 1.35; margin: 8px 0 18px; max-width: 620px; }
.op-today h2 em { font-style: normal; color: var(--ink); font-weight: 650; }
.op-today-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); padding-top: 16px; }
.op-today-stats > div { padding: 0 14px; border-left: 1px solid var(--line); }
.op-today-stats > div:first-child { padding-left: 0; border-left: 0; }
.op-today-stats .v { font-size: 24px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.op-today-stats .l { font-size: 12.5px; color: var(--muted); }
.op-needs { display: flex; flex-direction: column; }
.op-needs.has { border-color: #f0dcb6; box-shadow: inset 0 3px 0 #e9b45a, var(--shadow); }
.op-needs-list { max-height: 260px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.op-need { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.op-need:last-child { border-bottom: 0; }
.op-need .tile { margin-top: 1px; }
.op-need .t { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.op-need .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-need .acts { display: flex; gap: 6px; flex: none; }
@media (max-width: 1000px) { .op-brief { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .op-today-stats { grid-template-columns: 1fr 1fr; row-gap: 14px; } .op-today-stats > div:nth-child(3) { padding-left: 0; border-left: 0; } .op-today h2 { font-size: 18px; } .op-need { flex-wrap: wrap; } .op-need .acts { width: 100%; padding-left: 44px; } }

.op-section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.op-section h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.op-section h2 small { font-size: 13px; color: var(--muted); font-weight: 500; }
.op-section .meta { font-size: 12.5px; color: var(--muted); }

/* the pipeline board */
.op-board { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(176px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.op-board .ap-col { background: #f1f1ee; border: 1px solid #ebebe7; border-radius: 16px; padding: 8px; min-height: 160px; scroll-snap-align: start; }
.op-board .ap-col-h { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--ink); margin: 4px 6px 10px; }
.op-board .ap-col-h .op-dot { color: var(--faint); }
.op-board .ap-col-h .n { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; line-height: 20px; font-variant-numeric: tabular-nums; }
.op-board .ap-col[data-stage=won] .ap-col-h .op-dot { color: var(--ok); }
.op-board .ap-col[data-stage=proposal] .ap-col-h .op-dot, .op-board .ap-col[data-stage=engaged] .ap-col-h .op-dot, .op-board .ap-col[data-stage=trial] .ap-col-h .op-dot { color: var(--brand); }
.op-board .ap-col[data-stage=lost] .ap-col-h .op-dot, .op-board .ap-col[data-stage=opted_out] .ap-col-h .op-dot { color: var(--bad); }
.op-board .ap-col[data-stage=replied] .ap-col-h .op-dot { color: #d38a17; }
.op-board .ap-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; margin-bottom: 6px; cursor: pointer; box-shadow: 0 1px 1px rgba(21,23,28,.03); transition: border-color .12s, box-shadow .12s, transform .12s; }
.op-board .ap-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.op-board .ap-card:focus-visible { outline: none; box-shadow: var(--ring); }
.op-board .ap-card b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.op-card-ind { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.op-card-ind .ico { color: var(--faint); }
.op-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.op-fit { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.op-fit i { display: block; height: 4px; flex: 1; max-width: 56px; border-radius: 99px; background: #ecece8; overflow: hidden; position: relative; }
.op-fit i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--brand); border-radius: 99px; opacity: .7; }
.op-touch { display: inline-flex; gap: 3px; align-items: center; }
.op-touch span { width: 6px; height: 6px; border-radius: 50%; background: #dcdcd7; }
.op-touch span.on { background: var(--brand); }
.op-board .ap-empty { color: var(--faint); font-size: 12.5px; padding: 18px 6px; text-align: center; border: 1px dashed #dcdcd7; border-radius: 12px; }
.op-board .ap-more { font-size: 12.5px; color: var(--muted); padding: 6px 0 2px; text-align: center; }

/* the live timeline */
.op-tl { position: relative; max-height: 560px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.op-tl-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; padding: 0 6px; margin: 0 -6px; border-radius: 10px; position: relative; }
.op-tl-row[data-p] { cursor: pointer; }
.op-tl-row[data-p]:hover { background: var(--subtle); }
.op-tl-node { position: relative; display: flex; justify-content: center; padding-top: 10px; }
.op-tl-node::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line); }
.op-tl-row:first-child .op-tl-node::before { top: 18px; }
.op-tl-row:last-child .op-tl-node::before { bottom: calc(100% - 18px); }
.op-tl-node span { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.op-tl-node span.won { background: var(--ok-soft); border-color: #cdebdc; color: var(--ok); }
.op-tl-node span.error { background: var(--bad-soft); border-color: #f4cfcb; color: var(--bad); }
.op-tl-node span.reply, .op-tl-node span.proposal { background: var(--brand-soft); border-color: var(--brand-tint); color: var(--brand); }
.op-tl-body { padding: 12px 0; font-size: 13.5px; color: var(--ink); line-height: 1.45; border-bottom: 1px solid var(--line); min-width: 0; }
.op-tl-row:last-child .op-tl-body { border-bottom: 0; }
.op-tl-body small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.op-tl-time { padding-top: 13px; font-size: 12px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .op-tl-row { grid-template-columns: 30px minmax(0, 1fr); } .op-tl-time { display: none; } }

/* ---------- prospect drawer */
.modal-bg.op-drawer { place-items: stretch end; padding: 0; }
.op-drawer .modal { max-width: 620px !important; height: 100vh; max-height: 100vh; border-radius: 20px 0 0 20px; animation: op-slide .2s ease-out; padding: 28px 28px 24px; }
@keyframes op-slide { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { .op-drawer .modal { border-radius: 0; padding: 22px 18px; } }
.op-dr-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 36px; }
.op-dr-head h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.op-dr-head p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.op-dr-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 18px 0; }
.op-dr-facts > div { background: var(--panel); padding: 11px 14px; min-width: 0; }
.op-dr-facts .l { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.op-dr-facts .v { font-size: 13.5px; font-weight: 550; margin-top: 2px; overflow-wrap: anywhere; }
.op-dr h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 22px 0 8px; }
.op-gap { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 4px 0; color: var(--ink-2); }
.op-gap .ico { color: var(--brand); margin-top: 2px; }
.op-dr .ap-thread { max-height: none; gap: 10px; }
.op-dr .ap-msg { border-radius: 14px; padding: 12px 14px; background: var(--panel); }
.op-dr .ap-msg.in { background: var(--brand-soft); border-color: var(--brand-tint); margin-left: 28px; }
.op-dr .ap-msg.out { margin-right: 28px; }
.op-msg-h { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.op-msg-h b { color: var(--ink); font-weight: 600; }
.op-dr .ap-body { font-size: 13.5px; line-height: 1.55; margin-top: 6px; }

/* ---------- Autopilot setup */
.op-setup-sec { position: relative; }
.op-setup-sec .op-card-h { align-items: flex-start; justify-content: flex-start; gap: 14px; margin-bottom: 14px; }
.op-step { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-tint); display: grid; place-items: center; font-weight: 650; font-size: 13px; flex: none; }
.op-setup-sec .op-card-h h3 { font-size: 15.5px; }
.op-setup-sec .op-card-h p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.op-setup-sec .op-opt { font-size: 11.5px; font-weight: 550; color: var(--muted); background: #f0f0ed; padding: 1px 8px; border-radius: 99px; margin-left: 6px; }
.op-copy { display: flex; gap: 8px; align-items: center; }
.op-copy input { flex: 1; min-width: 0; font: 12.5px ui-monospace, Menlo, monospace !important; background: var(--subtle) !important; color: var(--ink-2); }
.op-ready { position: sticky; top: 16px; }
.op-ready-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.op-ready-row:last-of-type { border-bottom: 0; }
.op-ready-row .ico { margin-top: 1px; }
.op-ready-row b { font-size: 13.5px; font-weight: 600; display: block; }
.op-ready-row small { color: var(--muted); font-size: 12.5px; line-height: 1.4; display: block; }
.op-save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-top: 4px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md); font-size: 13px; color: var(--muted); }
@media (max-width: 880px) { .op-save-bar { bottom: 70px; } }
.chips label.chip { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.chips label.chip input { accent-color: var(--brand); margin: 0; }

/* ---------- clients list */
.op-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.op-search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.op-search .ico { position: absolute; left: 12px; top: 50%; margin-top: -8px; color: var(--faint); pointer-events: none; }
.op-search input { width: 100%; padding-left: 36px !important; }
.op-table-card { padding: 0; overflow: hidden; }
.op-table-card .table-wrap { padding: 0 6px 6px; }
.op-table-card table.t th { padding-top: 12px; }
.op-table-card table.t th:first-child, .op-table-card table.t td:first-child { padding-left: 14px; }
.op-table-card table.t td { vertical-align: middle; }
.op-biz { display: flex; align-items: center; gap: 12px; min-width: 0; }
.op-avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--subtle); border: 1px solid var(--line); color: var(--ink-2); display: grid; place-items: center; font-size: 12.5px; font-weight: 650; flex: none; letter-spacing: -.02em; }
.op-biz b { font-weight: 600; display: block; line-height: 1.3; }
.op-biz small { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; margin-top: 1px; }
.op-health { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.op-health i { width: 44px; height: 5px; border-radius: 99px; background: #ecece8; position: relative; overflow: hidden; display: block; }
.op-health i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--c); border-radius: 99px; }
#ct td.num b { font-weight: 600; }
.op-tfoot { display: flex; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) {
  #ct .op-hide-sm { display: none; }
  .op-toolbar { padding: 12px; }
  .op-search { max-width: none; }
}

/* ---------- client detail */
.op-client-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.op-client-head .op-avatar { width: 52px; height: 52px; border-radius: 15px; font-size: 18px; }
.op-client-head h1 { margin: 0; font-size: 26px; }
.op-client-head .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; font-size: 13px; color: var(--muted); }
.op-client-head .acts { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.op-client-tabs { margin-bottom: 20px; }
.op-client-tabs a { display: inline-flex; align-items: center; gap: 7px; }
.op-client-tabs a .ico { color: var(--faint); }
.op-client-tabs a.on .ico { color: var(--brand); }
.op-status-btns { display: inline-flex; padding: 3px; background: #efefec; border-radius: 11px; gap: 2px; }
.op-status-btns .btn { border: 0; background: transparent; box-shadow: none; height: 32px; color: var(--muted); }
.op-status-btns .btn.primary { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(21,23,28,.1); }
.op-status-btns .btn.primary:hover { background: var(--panel); }

/* ---------- settings */
.op-settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.op-settings-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.op-settings-nav button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2); padding: 8px 10px; border-radius: 9px; cursor: pointer; text-align: left; }
.op-settings-nav button:hover { background: rgba(21,23,28,.045); color: var(--ink); }
.op-settings-nav button .ico { color: var(--muted); }
.op-settings-nav button .op-dot { margin-left: auto; width: 7px; height: 7px; }
.op-settings-nav .ok .op-dot { color: var(--ok); } .op-settings-nav .warn .op-dot { color: #d38a17; } .op-settings-nav .none .op-dot { color: transparent; }
.op-settings-sum { font-size: 12.5px; color: var(--muted); padding: 12px 10px 0; border-top: 1px solid var(--line); margin-top: 8px; line-height: 1.5; }
.op-set { scroll-margin-top: 16px; padding: 0; overflow: hidden; }
.op-set-h { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.op-set-h h3 { margin: 0; font-size: 15.5px; }
.op-set-h p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.op-set-h .grow { min-width: 0; }
.op-set-b { padding: 20px 22px 22px; }
.op-set-b .field:last-child { margin-bottom: 0; }
.op-set-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--subtle); }
.op-set-f .grow { min-width: 0; }
.op-set-group { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
.op-set-group:first-child { margin-top: 0; }
.op-switch-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-weight: 500; font-size: 13.5px; color: var(--ink-2); }
.op-switch-row .switch { flex: none; }
@media (max-width: 960px) { .op-settings { grid-template-columns: minmax(0, 1fr); } .op-settings-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; } .op-settings-nav button { white-space: nowrap; flex: none; } .op-settings-sum { display: none; } }

/* ---------- new sale */
.op-stepper { display: flex; align-items: center; gap: 0; margin: 0 0 24px; counter-reset: s; overflow-x: auto; }
.op-stepper .s { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 550; color: var(--muted); white-space: nowrap; flex: none; }
.op-stepper .s .n { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); display: grid; place-items: center; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.op-stepper .s.on { color: var(--ink); }
.op-stepper .s.on .n { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--ring); }
.op-stepper .s.done { color: var(--ink-2); }
.op-stepper .s.done .n { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.op-stepper .bar { flex: 1; min-width: 24px; height: 1px; background: var(--line-2); margin: 0 14px; }
.op-stepper .bar.done { background: var(--brand-line); }
@media (max-width: 760px) { .op-stepper .s:not(.on) .lbl { display: none; } .op-stepper .bar { margin: 0 8px; min-width: 14px; } }
.op-sale-h { margin: 0 0 4px; font-size: 20px; letter-spacing: -.02em; }
.op-sale-p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.op-sale .choice-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.op-sale .choice { padding: 11px 12px; font-weight: 550; font-size: 13.5px; border-width: 1px; }
.op-sale .choice .ico { color: var(--muted); }
.op-sale .choice.on .ico { color: var(--brand); }
.op-sale-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.op-sale-foot .hint { font-size: 13px; color: var(--muted); }
.op-sale .sol-card { border-top: 1px solid var(--line); gap: 10px; }
.op-sale .sol-card.picked { box-shadow: 0 0 0 2px var(--brand), var(--shadow-md); border-color: transparent; }
.op-sale .sol-card .promise { font-size: 13.5px; color: var(--ink-2); }
.op-reason { display: flex; gap: 7px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.op-reason .ico { color: var(--ok); margin-top: 2px; }
.op-rec { background: var(--panel); border: 1px solid var(--brand-line); border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 16px; box-shadow: inset 0 3px 0 var(--brand), var(--shadow); }
.op-rec h2 { font-size: 20px; margin: 6px 0 4px; letter-spacing: -.02em; line-height: 1.35; }
.op-rec h2 span { color: var(--brand); }
.op-rec p { margin: 0; color: var(--muted); font-size: 13.5px; }
.op-done { text-align: center; padding: 36px 20px 30px; }
.op-done .tile.lg { margin: 0 auto 14px; }
.op-done h1 { margin: 0 0 6px; }
.op-done p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.op-chart-plot.op-chart-none { align-items: center; justify-content: center; border-bottom: 1px solid var(--line-2); background: repeating-linear-gradient(180deg, transparent 0 calc(var(--h) / 2 - 1px), #ecece8 calc(var(--h) / 2 - 1px) calc(var(--h) / 2)); padding-right: 0; }
.op-chart-plot.op-chart-none span { font-size: 12.5px; color: var(--muted); background: var(--panel); padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); }
.op-chart-none + .op-chart-x { padding-right: 0; }
.op-issue { max-width: 360px; }
.op-issue .op-flag { display: flex; max-width: 100%; }
.op-issue .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.op-issue .more { flex: none; font-size: 11.5px; font-weight: 600; color: var(--muted); background: #f0f0ed; border-radius: 99px; padding: 0 7px; line-height: 18px; }
#cd .grid, .op-set-b .grid, #sf .grid, .op-sale .card .grid.c2, #econ .grid, #nf .grid, #au .grid { row-gap: 0; }
.op-reason.plain .ico { color: var(--muted); }
@media (max-width: 640px) { .op-metric:last-child:nth-child(odd) { grid-column: span 2; } .op-board { grid-template-columns: repeat(var(--cols, 6), minmax(168px, 72vw)); align-items: start; } .op-board .ap-col { max-height: 460px; overflow-y: auto; } }
@media (max-width: 760px) {
  .op-toolbar .op-seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .op-toolbar .op-seg button { flex: none; }
  .op-toolbar > .grow { display: none; }
  .op-tfoot span + span { display: none; }
  .op-search { flex-basis: 100%; }
}
@media (max-width: 760px) {
  #ct .op-avatar { display: none; }
  #ct td, #ct th { padding-left: 8px; padding-right: 8px; }
  #ct .op-health i { width: 28px; }
  .op-table-card .table-wrap { padding: 0 4px 4px; }
}
@media (max-width: 640px) { .ap-regions { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: -16px; padding-right: 16px; } .ap-regions .chip { flex: none; } }
table.t td .btn { vertical-align: middle; }

/* ---------------------------------------------------------------- v4 "warm colleagues" consistency pass (headers, buttons) */
.op-seg, .op-status-btns { border-radius: 999px; }
.op-seg button, .op-status-btns button { border-radius: 999px; }
.op-launch h1, .op-client-head h1 { font-weight: 800; letter-spacing: -.035em; }
.op-hero { border-radius: var(--radius-xl); }
.op-hero .op-metrics, .op-sim, .op-save-bar, .op-dr-facts { border-radius: var(--radius); }
.op-launch-form { border-radius: 999px; }
.op-board .ap-col { border-radius: var(--radius-lg); }
.op-board .ap-card { border-radius: 14px; }
.op-avatar { border-radius: 50%; }
.op-client-head .op-avatar { border-radius: 50%; }
@media (max-width: 800px) { .op-launch-form { border-radius: var(--radius-lg); } }

/* client overview: a lead opens its read-only detail (leadDetailHtml in workspace.js) */
.op-lead-row { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 6px 0; font: inherit; font-size: 14px; color: inherit; cursor: pointer; }
.op-lead-row:hover b { color: var(--brand); }
.modal .ld { grid-template-columns: minmax(0, 1fr); }

/* ---------- Settings: Email look (emaillook.js): el- ---------- */
.el-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.el-meta { border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; padding: 10px 14px; font-size: 13px; display: grid; gap: 3px; background: var(--subtle); }
.el-meta span { display: inline-block; width: 62px; color: var(--muted); }
.el-frame { display: block; width: 100%; height: 620px; border: 1px solid var(--line); border-radius: 0 0 12px 12px; background: #F7F9FC; }
.el-text { margin: 0; border: 1px solid var(--line); border-radius: 0 0 12px 12px; padding: 16px; max-height: 620px; overflow: auto; white-space: pre-wrap; font-size: 13px; line-height: 1.55; background: #fff; }
.el-send { padding: 14px 0 0 !important; border: 0 !important; }
.el-send input { max-width: 280px; }
