/* Role Replacer admin area (/admin3000). Plain and functional, laptop-first.
   Builds on the tokens and components in /css/base.css. */

.page-admin { font-size: 16px; }

/* ---------- Header ---------- */

.admin-header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.admin-brand { display: flex; align-items: center; gap: 12px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; font-weight: 600; flex: 1 1 auto; }
.admin-nav a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.admin-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.admin-header-actions { display: flex; gap: 10px; margin-left: auto; }

/* ---------- Page ---------- */

.admin-main { padding-top: 24px; padding-bottom: 80px; outline: none; }
.admin-h1 { font-size: clamp(30px, 3.4vw, 42px); margin: 8px 0 8px; }
.admin-h2 { font-stretch: 112%; font-weight: 800; font-size: 24px; letter-spacing: -0.01em; line-height: 1.2; }
.admin-h3 { font-weight: 700; font-size: 17px; line-height: 1.3; }
.admin-loading { color: var(--muted); padding: 40px 0; }

.admin-open-notice { margin-bottom: 16px; max-width: 760px; }
.admin-open-notice::before {
  content: ''; flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--accent);
}
#page-error { margin-bottom: 16px; }

.admin-section { padding-top: 36px; scroll-margin-top: 16px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-intro { margin: -6px 0 14px; max-width: 760px; }
.section-intro-wide { max-width: none; }
/* Build S96 (Matt, 6 Nov: "make things neater"): neat.js. Long help text shows one line with More; a click opens it.
   The More button sits on the line's right end, so the line is never taller than one. */
.neat-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; position: relative; padding-right: 4.2em; max-width: min(100%, 1200px); cursor: pointer; }
.neat-clamp.is-open { display: block; -webkit-line-clamp: unset; line-clamp: none; cursor: auto; }
.neat-more { position: absolute; right: 0; top: 0; padding: 0 2px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.neat-clamp.is-open .neat-more { top: auto; bottom: 0; }
.neat-more:focus-visible, .neat-fold:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; border-radius: 4px; }
/* A folded section shows its heading only; the heading is the button that opens it. */
.neat-fold { all: unset; cursor: pointer; }
.neat-fold::after { content: ''; display: inline-block; width: 0.5em; height: 0.5em; margin-left: 0.5em; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-0.18em) rotate(45deg); transition: transform .15s; }
.neat-folded .neat-fold::after { transform: translateY(0) rotate(-45deg); }
.admin-section.neat-folded { padding-top: 14px; }
.admin-section.neat-folded > :not(.section-head) { display: none !important; }
.admin-section.neat-folded > .section-head { margin-bottom: 0; }
.admin-section.neat-folded > .section-head > :not(h2) { display: none !important; }
/* Build S94 (Matt, 6 Nov: "this takes up more space"): no extra gap above a page's first section, only the page's own. */
.admin-page > .admin-section:first-child, .admin-page > :first-child > .admin-section:first-child { padding-top: 4px; }
.section-intro code, .mode-note code { font-family: var(--font-mono); font-size: 0.9em; }
/* Shown only in one intro mode ([data-intro-mode], toggled by admin.js). */
.mode-note { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ground-2); font-size: 15px; color: var(--text-2); max-width: 820px; }

/* A face's real portrait photo (public/assets/faces), small and round. */
.face-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.face-thumb {
  width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--ink); background: var(--ground-2);
}
.section-error { margin-bottom: 14px; }

.card-tight { padding: 20px 22px; }
.card-flush { padding: 0; overflow: hidden; }
.card-tight .admin-h3 { margin-bottom: 10px; }

/* ---------- Login ---------- */

.admin-login { max-width: 460px; margin: 40px 0; }
.admin-login .admin-h1 { font-size: 28px; margin: 0 0 20px; }
.admin-login-form { display: grid; gap: 14px; }
.admin-login-form .btn { justify-self: start; }

/* ---------- Overview tiles ---------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tile { background: var(--paper); border: var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.tile-value { font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.tile-value small { font-size: 16px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.tile-note { font-size: 13px; color: var(--muted); }
/* Tiles whose value is words (the intro mode and the voice), not a number. */
.tile-text .tile-value { font-size: 23px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.tile.is-warning { border-color: var(--danger); }
.tile.is-warning .tile-value { color: var(--danger); }

/* ---------- Tables ---------- */

/* position: relative keeps absolutely positioned children (.visually-hidden
   header text) inside the scroll box, so a wide table never widens the page. */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.admin-table thead th {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); background: var(--ground-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table tbody tr:last-child > * { border-bottom: none; }
.admin-table .cell-strong { font-weight: 700; }
.admin-table .cell-sub { display: block; color: var(--text-3); font-size: 13px; overflow-wrap: anywhere; }
.admin-table .cell-mono { font-family: var(--font-mono); font-size: 12px; }
.admin-table a { overflow-wrap: anywhere; }
.admin-table .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
.admin-table .cell-actions { white-space: nowrap; text-align: right; }
.admin-table .cell-actions .btn + .btn { margin-left: 6px; }
.admin-table tr.is-open > td { background: var(--ground-2); }
.table-empty { padding: 18px 20px; color: var(--text-3); }
.table-more { margin-top: 12px; }
.table-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-bottom: 12px; }
.field-inline { flex-direction: row; align-items: center; gap: 10px; }
.field-inline .select { width: auto; min-height: 40px; }

.events-table td { padding-top: 7px; padding-bottom: 7px; }
.events-table .event-key { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-left: 8px; }
.events-table .bar-cell { width: 40%; vertical-align: middle; }
.mini-bar { height: 8px; border-radius: 0 4px 4px 0; background: var(--accent); min-width: 0; }

/* ---------- Status pills ---------- */

.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line);
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.status-booked { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.status-booked::before { background: var(--accent); }
.status-replied { border-color: var(--accent-dark); color: var(--accent-dark); }
.status-replied::before { background: var(--accent-dark); }
.status-in-sequence::before { background: var(--accent); }
.status-unsubscribed, .status-sequence-finished { color: var(--text-3); }

/* ---------- Lead detail (expanded row) ---------- */

.lead-detail td { padding: 0; }
.lead-detail-inner { padding: 18px 20px 22px; display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 24px; background: var(--ground-2); border-bottom: 1px solid var(--line); }
.lead-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; align-content: start; }
.lead-facts dt { color: var(--text-3); }
/* The call the AI employee joins as a notetaker (amendment of 14 Oct 2026). */
.lead-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
/* Billing (Phase 2 step 1) reuses the call block's look. */
.billing-start-form { display: flex; flex-direction: column; gap: 10px; flex: 1 1 100%; }
.billing-start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.billing-start-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-3); }
.billing-outside { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.billing-hint { font-size: 13px; color: var(--text-3); max-width: 640px; }
.billing-start-form .btn { align-self: flex-start; }
.call-block { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); display: flex; flex-direction: column; gap: 12px; }
.call-block-h { font-size: 16px; font-weight: 700; }
/* The whole call (Show the transcript), Matt 18 Oct 2026 */
.transcript-block { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.transcript-box { width: 100%; }
.transcript { display: flex; flex-direction: column; gap: 8px; }
.transcript-note, .transcript-meta { font-size: 13px; color: var(--muted, #4B5A72); }
.transcript-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.transcript-line { display: grid; grid-template-columns: 6.5em minmax(6em, 11em) 1fr; gap: 10px; font-size: 14px; line-height: 1.45; }
.transcript-time { color: var(--muted, #4B5A72); font-variant-numeric: tabular-nums; white-space: nowrap; }
.transcript-who { font-weight: 700; overflow-wrap: anywhere; }
.transcript-text { overflow-wrap: anywhere; }
.transcript-line.is-ai .transcript-who { color: var(--accent, #1D4ED8); }
.transcript-line.is-chat .transcript-text { font-style: italic; }
@media (max-width: 640px) { .transcript-line { grid-template-columns: 1fr; gap: 2px; } }
.call-notes { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.call-notes-h { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.call-notes-list { margin: 0; padding-left: 20px; }
.call-notes-flag { font-weight: 600; color: var(--accent-dark); }
.call-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.call-url-form { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; }
.call-url-form label { font-size: 13px; color: var(--text-3); }
.call-url-row { display: flex; gap: 8px; }
.call-url-row .input { flex: 1 1 auto; min-width: 0; }
.lead-facts dd { margin: 0; overflow-wrap: anywhere; }
/* The shadow judge (BOBAI-TALKING.md revision, step 1) reuses the call block's look. */
.judge-summary { font-size: 14px; color: var(--text-3); }
.judge-filter { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 44px; }
.judge-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.judge-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.judge-row:first-child { border-top: 0; padding-top: 0; }
/* Chat rows: both columns bounded, so a long reply can't grow the second column and squeeze the first to one letter a line. */
.gc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.judge-meta { font-size: 13px; color: var(--text-3); }
.judge-words { font-size: 15px; overflow-wrap: anywhere; }
.judge-what { font-size: 15px; font-weight: 700; }
.judge-what.is-speak { color: var(--accent-dark); }
.judge-why { font-size: 14px; color: var(--text-3); overflow-wrap: anywhere; }
/* The reply he would have given (sql/007), under a would-speak decision. */
.judge-say { font-size: 15px; font-style: italic; overflow-wrap: anywhere; }
.judge-marks { display: flex; gap: 8px; align-items: flex-start; grid-row: 1 / span 4; grid-column: 2; }
@media (max-width: 760px) {
  .judge-row { grid-template-columns: minmax(0, 1fr); }
  .judge-marks { grid-row: auto; grid-column: 1; }
}
.thread { display: grid; gap: 12px; min-width: 0; }
.thread-empty { color: var(--text-3); }
.email {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; min-width: 0;
}
.email-in { border-color: var(--ink); border-width: 1.5px; }
.email-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.email-who { font-weight: 700; font-size: 14px; }
.email-when { font-size: 13px; color: var(--text-3); }
.email-subject { font-weight: 600; font-size: 14px; margin-bottom: 6px; overflow-wrap: anywhere; }
.email-body, .suggested-body {
  margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-sans); font-size: 14px; line-height: 1.55; color: var(--text-2);
}
.email-note { margin-top: 8px; font-size: 13px; color: var(--muted); }
.email-pending { font-size: 14px; color: var(--text-3); font-style: italic; }
.suggested { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.suggested-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.suggested-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.suggested-actions .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
.copy-status { font-size: 13px; color: var(--text-3); }

/* ---------- Settings form ---------- */

.settings-form { display: grid; gap: 8px; max-width: 980px; }
.settings-group { border: none; border-bottom: 1px solid var(--line-soft); margin: 0; padding: 0 0 22px; display: grid; gap: 14px; min-width: 0; }
.settings-group + .settings-group { padding-top: 18px; }
.settings-group legend { padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.settings-group legend + * { clear: left; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 20px; align-items: start; }
.textarea-short { min-height: 88px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent-dark); flex: none; }
.check-hint { margin-top: -10px; padding-left: 30px; }
.preview { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 12px 14px; background: var(--ground-2); border-radius: var(--radius-sm); font-size: 15px; }
.preview-stack { display: grid; gap: 6px; }
.price-check { font-weight: 600; }
.price-check.is-problem { color: var(--danger); }
.price-others { font-size: 14px; color: var(--text-3); }
.price-others:empty { display: none; }
.settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 14px; }
.save-status { font-size: 15px; font-weight: 600; min-height: 1.5em; }
/* Build S97 (Matt, 6 Nov: "rubbish pushing everything further down the page"): an empty status line takes no room,
   so a page's content starts right under its intro. */
.save-status:empty { min-height: 0; }
.save-status.is-ok:empty::before { content: none; } /* no lone tick on an empty line */
.admin-page .notice:empty { display: none; }
.save-status.is-ok { color: var(--text); }
.save-status.is-ok::before { content: '\2713\00a0'; color: var(--accent-dark); }
.save-status.is-dirty { color: var(--accent-dark); }
#settings-error { margin-top: 4px; }

/* ---------- Headline test ---------- */

.section-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.abtest-state-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.abtest-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1.5px solid var(--ink); color: var(--ink); background: var(--paper);
}
.abtest-badge:empty { display: none; }
.abtest-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.abtest-badge.is-locked { background: var(--ink); color: var(--on-ink); }
.abtest-state { font-size: 15px; font-weight: 600; flex: 1 1 320px; }
.abtest-early {
  margin-bottom: 12px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--accent-dark);
  color: var(--text); background: var(--paper); font-size: 15px; max-width: 820px;
}
.abtest-early::before { content: 'Note: '; font-weight: 700; color: var(--accent-dark); }
.abtest-table td, .abtest-table th { vertical-align: middle; }
.abtest-table tbody th { min-width: 200px; }
.abtest-table .variant-tag { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-3); margin-right: 8px; }
.abtest-table .headline-text { font-weight: 700; }
.abtest-table .rate { font-weight: 700; }
.abtest-table .shown-tag { margin-left: 8px; }
.abtest-table .cell-sub { font-weight: 400; }
.abtest-table tr.is-winner > * { background: var(--ground-2); }
.abtest-hint { margin-top: 12px; max-width: 820px; }
.abtest-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
#abtest-status { margin-top: 8px; }
.headlines-form { display: grid; gap: 14px; margin-top: 14px; max-width: 980px; }
.headlines-form .admin-h3 { margin-bottom: 0; }
.headlines-form .settings-actions { padding-top: 0; }
.headline-ideas { display: grid; gap: 8px; }
.idea-list { display: flex; flex-wrap: wrap; gap: 8px; }
.idea-list .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Intro part two ---------- */

.part2-unavailable { margin-bottom: 14px; max-width: 760px; }
.part2-table th[scope="row"] { min-width: 260px; font-weight: 400; }
.part2-table .voice-cell { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; min-width: 240px; }
.part2-table .play-btn { flex: none; min-width: 72px; }
.part2-table .play-btn.is-playing { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.admin-table .cell-sub.is-warning { color: var(--danger); font-weight: 600; }
.play-status { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--accent-dark); }
.play-status:empty { display: none; }
.part2-table .status { margin-bottom: 4px; }
.part2-table .cell-note { display: block; font-size: 13px; color: var(--accent-dark); font-weight: 600; max-width: 360px; }
.part2-table .cell-note + .cell-note { margin-top: 4px; }
.part2-how { margin-top: 14px; display: grid; gap: 10px; max-width: 980px; }
.part2-how .admin-h3 { margin-bottom: 0; }
.part2-script { font-size: 15px; color: var(--text-2); }
.command-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.command {
  font-family: var(--font-mono); font-size: 14px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--on-ink); overflow-wrap: anywhere; user-select: all;
}
.part2-how .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.part2-how code:not(.command) { font-family: var(--font-mono); font-size: 0.92em; }
.part2-summary { font-weight: 600; font-size: 15px; }

/* ---------- Spend panel ---------- */

.spend-card { display: grid; gap: 28px; }
.spend-today-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 10px; }
.spend-today-value { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.spend-today-value small { font-size: 16px; font-weight: 500; color: var(--text-3); }
.meter-track { position: relative; height: 16px; border-radius: 999px; background: var(--track); overflow: hidden; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); min-width: 0; }
.meter-fill.is-over { background: var(--danger); }
.spend-note { margin-top: 8px; font-size: 14px; color: var(--text-3); }
.spend-note.is-over { color: var(--danger); font-weight: 600; }

.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.chart-total { font-size: 14px; color: var(--text-3); }
.chart { position: relative; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: 220px auto; }
.chart-yaxis { position: relative; grid-column: 1; grid-row: 1; }
.chart-yaxis span {
  position: absolute; right: 8px; transform: translateY(50%); font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chart-plot { position: relative; grid-column: 2; grid-row: 1; border-bottom: 1px solid var(--line); }
.chart-gridline { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line-soft); }
.chart-budget { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--ink); z-index: 2; pointer-events: none; }
.chart-budget span {
  position: absolute; right: 0; bottom: 3px; font-size: 12px; font-weight: 600; color: var(--ink);
  background: rgba(255, 255, 255, .85); padding: 0 4px; border-radius: 4px;
}
.chart-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; align-items: end; z-index: 1; }
.chart-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar { width: 100%; max-width: 24px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; }
.chart-bar.is-zero { background: transparent; }
.chart-col.is-today .chart-bar { background: var(--accent-dark); }
.chart-col:hover .chart-bar { background: var(--ink); }
.chart-value {
  position: absolute; left: 50%; transform: translate(-50%, -4px); font-size: 11px; font-weight: 600; color: var(--text-2);
  white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none;
}
.chart-tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5;
  background: var(--ink); color: var(--on-ink); font-size: 12px; line-height: 1.4; padding: 6px 9px; border-radius: 8px;
  white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden;
}
.chart-col:hover .chart-tip { opacity: 1; visibility: visible; }
.chart-col:nth-child(-n+4) .chart-tip { left: 0; transform: none; }
.chart-col:nth-last-child(-n+4) .chart-tip { left: auto; right: 0; transform: none; }
.chart-xaxis { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; padding-top: 6px; }
.chart-xaxis span { font-size: 12px; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; }
.spend-table-toggle { margin-top: 14px; }
.spend-table-toggle summary { cursor: pointer; font-weight: 600; font-size: 15px; min-height: 44px; display: flex; align-items: center; }
.spend-table-toggle .table-wrap { max-height: 360px; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }

/* ---------- Small screens (works, but laptop-first) ---------- */

@media (max-width: 760px) {
  .lead-detail-inner { grid-template-columns: 1fr; }
  .chart { grid-template-columns: 44px 1fr; grid-template-rows: 180px auto; }
  .chart-value { display: none; }
  .admin-header-actions { margin-left: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .chart-tip { transition: opacity .12s ease; }
}

@media (forced-colors: active) {
  .chart-bar, .meter-fill, .mini-bar { background: CanvasText; forced-color-adjust: none; }
}

/* Google Chat card */
.gc-status { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; overflow-wrap: anywhere; }
.gc-dm-form { display: flex; flex-direction: column; gap: 12px; }
.gc-dm-form .btn { align-self: flex-start; }
.gc-memory-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 12px; }
.gc-memory-filter .input { flex: 1 1 220px; min-width: 0; }
.gc-memory-forget { grid-row: 1 / span 2; grid-column: 2; align-self: start; }
@media (max-width: 760px) {
  .gc-memory-forget { grid-row: auto; grid-column: 1; justify-self: start; }
}

/* The interview (slice C of the amendment of 17 Oct 2026): the three deliverables editor on the lead. */
.deliverables-editor { display: flex; flex-direction: column; gap: 12px; }
.deliverable-fields { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.deliverable-fields legend { font-weight: 700; padding: 0 4px; }
.deliverable-fields .input { width: 100%; box-sizing: border-box; }

/* ---------- Proposals (build S26) ---------- */

.status-proposal-draft { border-color: var(--accent-dark); color: var(--accent-dark); }
.status-proposal-draft::before { background: var(--accent-dark); }
.status-proposal-sent::before { background: var(--accent); }
.status-proposal-accepted, .status-proposal-paid { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.status-proposal-accepted::before, .status-proposal-paid::before { background: var(--accent); }
.status-proposal-withdrawn { color: var(--text-3); }
.proposal-ai-cell { display: flex; align-items: center; gap: 10px; }
.proposal-ai-cell > span { display: flex; flex-direction: column; }
/* Build S156 (Matt, 15 Nov: "maybe it should open on side"): the open proposal is a panel on the right, over the page,
 * so the list stays where it is. Close or Escape shuts it. Full width on a phone. */
#proposal-editor-host:not(:empty) { position: fixed; top: 0; right: 0; bottom: 0; width: min(780px, 100vw); z-index: 40; overflow-y: auto; overscroll-behavior: contain; padding: 14px; box-sizing: border-box; background: var(--ground, #fff); border-left: 1.5px solid var(--ink); box-shadow: -14px 0 36px rgba(0, 0, 0, .35); }
#proposal-editor-host:not(:empty) > .proposal-editor { min-height: 100%; box-sizing: border-box; }
#proposal-editor-host .proposal-editor-head { position: sticky; top: -14px; z-index: 1; margin: -18px -20px 0; padding: 14px 20px 10px; background: var(--paper); border-bottom: 1px solid var(--line-soft); }
@media (max-width: 600px) { #proposal-editor-host:not(:empty) { padding: 0; } #proposal-editor-host .proposal-editor-head { top: 0; margin: -14px -14px 0; padding: 12px 14px 10px; } }
.proposal-editor { padding: 18px 20px; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); background: var(--paper); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.proposal-editor-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.proposal-ai { display: flex; align-items: center; gap: 12px; }
.proposal-ai > div { display: flex; flex-direction: column; gap: 2px; }
.proposal-convert { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; align-items: end; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.proposal-convert .call-actions, .proposal-convert .field-hint { grid-column: 1 / -1; }
.proposal-editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.proposal-editor .input, .proposal-textarea { width: 100%; box-sizing: border-box; }
.proposal-textarea { min-height: 0; }
.proposal-question { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.proposal-problems { display: flex; flex-direction: column; gap: 6px; }
.proposal-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ground); }
.proposal-lead-host:empty { display: none; }
@media (max-width: 600px) {
  .proposal-editor { padding: 14px; }
  .proposal-frame { height: 560px; }
}

/* ---------- Clients and the client area (build S26) ---------- */
.clients-h3 { font-size: 17px; font-weight: 700; margin: 18px 0 10px; }
.clients-list { display: flex; flex-direction: column; gap: 14px; }
.client-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.client-name { font-size: 18px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.client-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.client-emps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.client-emp { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.client-emp .cell-strong, .client-emp .cell-sub { display: block; }
.client-check { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.client-check-text { min-height: 96px; }
.client-requests { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.client-request { background: var(--paper); border: var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.client-request.is-handled { opacity: .65; border-color: var(--line); }
.client-request-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
@media (max-width: 700px) { .client-emp { grid-template-columns: 1fr; } }

/* Build S29: /admin3000 as several pages (admin.js showPage). The current page's link is marked for
   sight (an underline bar) and for screen readers (aria-current="page"). */
.admin-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; text-decoration-color: var(--accent, #1D4ED8); }
.admin-page:focus { outline: none; }
.admin-page-note { margin-top: 36px; }

/* ---------- Workflows (build S34): the Clients card's lines and the Workflows page ---------- */

.client-flows { margin-top: 2px; }
.client-wording { margin-top: 10px; font-size: 15px; }
.client-wording label { display: inline-flex; gap: 8px; align-items: center; }
.workflows-table td { vertical-align: top; }
.workflows-table .cell-sub { display: block; }
.workflow-new { display: grid; gap: 12px; max-width: 640px; }
.workflow-new .btn { justify-self: start; }

/* Build S37: "Edit company details" on the client card (folded until opened). */
.client-company { margin-top: 10px; font-size: 15px; }
.client-company summary { cursor: pointer; font-weight: 700; }
.client-company[open] { display: grid; gap: 10px; }

/* Email connectors, on the Settings page (22 Oct 2026): each part of a cell on its own line. */
.connectors-table .cell-strong, .connectors-table .cell-sub { display: block; }
.connectors-table .cell-sub { color: var(--text-3); font-size: 13px; overflow-wrap: anywhere; }

/* Build S47: the "Google setup" checklist on the Workflows page */
.google-setup { margin-bottom: 1.25rem; }
.google-setup-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.google-setup-item { margin: 0 0 0.6rem; }
.google-setup-item .cell-sub { display: block; }

/* Build S53: the Practice calls page (practice.js) */
.pr-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pr-tabs .btn[aria-pressed="true"] { background: var(--ink, #0F1E36); color: #fff; }
.pr-drop { display: grid; gap: 4px; padding: 22px; border: 2px dashed var(--line, #c9c6bd); border-radius: 10px; cursor: pointer; text-align: center; }
.pr-drop.is-over { border-color: var(--danger, #1D4ED8); }
.pr-seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; border: 0; padding: 0; margin: 8px 0; }
.pr-seats legend { font-weight: 600; margin-bottom: 6px; }
.pr-seat { display: grid; gap: 4px; padding: 18px; border: 2px solid var(--line, #c9c6bd); border-radius: 10px; cursor: pointer; }
.pr-seat:has(input:checked) { border-color: var(--accent-dark, #1D4ED8); }
.pr-seat input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent-dark); }
.pr-seat-title { font-size: 18px; font-weight: 700; }
.pr-seat-text { color: var(--text-3); font-size: 14px; }
.pr-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pr-detail { margin-top: 16px; }
.pr-block { margin-top: 16px; }
.pr-list { margin: 6px 0 0; padding-left: 20px; }
.pr-list li { margin-bottom: 8px; }
.pr-list .cell-sub, .pr-suggested { display: block; }
.pr-suggestions .btn { margin-top: 6px; }
.pr-score { font-size: 17px; }
.pr-score .cell-sub { display: block; color: var(--text-3); font-size: 13px; }
.pr-transcript { margin: 6px 0 0; padding-left: 20px; max-height: 480px; overflow: auto; }
.pr-transcript li { margin-bottom: 6px; }
.pr-transcript .cell-sub { display: block; color: var(--text-3); font-size: 12px; }

/* Build S58: the call recording and the response gaps (admin.js recordingBlock, practice.js gapsBlock) */
.recording audio, .pr-recordings audio { width: 100%; max-width: 520px; margin: 4px 0; }
.pr-recordings { list-style: none; margin: 6px 0 0; padding: 0; }
.pr-recordings li { margin-bottom: 10px; }
.gaps-table, .pr-gaps { margin-top: 6px; }
.gaps-table tr.is-slow td:first-child, .pr-gaps tr.is-slow td:first-child { color: var(--accent, #1D4ED8); }
.gaps-table tr.is-worst, .pr-gaps tr.is-worst { background: rgba(194, 65, 12, 0.08); }
.gaps-table .cell-sub, .pr-gaps .cell-sub { display: block; color: var(--text-3); font-size: 12px; }

/* 28 Oct: the proposal that is open below the list, and its Close button. */
.proposals-table tbody tr.is-open > * { background: var(--ground-2); }
.proposals-table tbody tr.is-open > :first-child { box-shadow: inset 4px 0 0 var(--accent); }
.proposal-editor-head .proposal-close { order: 99; margin-left: auto; }
.proposal-editor-head .proposal-delete { order: 98; margin-left: auto; } /* build S157: Delete sits just before Close */
.proposal-editor-head .proposal-delete + .proposal-close, .proposal-editor-head .proposal-close:has(+ .proposal-delete) { margin-left: 0; }

/* Build S68: the stop switches card (Clients page). */
.stop-card { margin: 12px 0 20px; border-left: 4px solid var(--danger); }
.stop-card .btn-stop { background: var(--danger); border-color: var(--danger); color: #fff; }
.stop-all { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0; }
.stop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stop-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.stop-row.is-on .cell-strong { color: var(--danger); }

/* Build S83: the Bucket page's floating "Approved today" counter, top right, kept up after every Approve. */
.bk-float { position: fixed; top: 16px; right: 16px; z-index: 30; margin: 0; padding: 10px 14px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 15px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }

/* Build S93 (Matt, 5 Nov: "width is shit", next to Scribando's full-width page): the admin uses the whole window, with
   the site gutter either side. Text blocks keep their own max-widths. */
.wrap.admin-main, .wrap.admin-header-inner { max-width: none; }

/* Build S93: the Bucket page's CSV box as one small strip ("can be tiny"); the morning run still finds it by its label. */
.bk-strip { padding: 10px 14px; }
.bk-strip-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; }
.bk-strip-row .clients-h3 { margin: 0 6px 8px 0; font-size: 15px; white-space: nowrap; }
.bk-strip-row .field { margin: 0; }
.bk-strip-row label { font-size: 13px; }
.bk-strip-paste { flex: 1 1 320px; min-width: 0; }
.bk-strip .textarea { min-height: 0; height: 38px; padding: 7px 10px; font-size: 13px; line-height: 1.4; }
.bk-strip input[type=file] { font-size: 13px; }
.bk-strip .field-hint { margin: 6px 0 0; font-size: 12px; }

/* Build S93 and S94 (Matt, 5 and 6 Nov: "the tabs need to also be laid out way better, better order", "put the titles
   you've given things ABOVE their tabs... menu can be better", "agencies blue background/theme like publisher-outreach",
   "outreach top label blue and each page a different shade of blue. same with tother top labels like clients and
   marketing").
   The header: the logo on its own line, then the menu, each group's title above its tabs, and Refresh everything at the
   end of the menu's line. Each group has a colour: Outreach blue, Sales orange, Clients green, Marketing purple. Each
   page in a group is a dark theme in its own shade of that colour (a hue, --h, and a strength, --s), made from the
   same tokens as the rest (base.css), so the whole page turns; Agencies is Scribando's publisher outreach navy.
   Overview, Stats and Settings stay light (admin.js sets html[data-admin-theme]). --page is the page's bright accent:
   the line under the header, its tab, and the mark beside a pipeline board's title. */
[data-area="outreach"] { --area: #1D5FA8; --area-bg: #E2ECF8; }
[data-area="sales"] { --area: #1D4ED8; --area-bg: #FFE9DC; }
[data-area="clients"] { --area: #1F7A45; --area-bg: #E3F2E8; }
[data-area="marketing"] { --area: #6B3FA8; --area-bg: #EEE6F8; }
[data-area="home"] { --area: var(--ink); --area-bg: var(--ground-2); }
html[data-admin-theme="dark"] [data-area="outreach"] { --area: #7CB8FF; --area-bg: rgba(96, 165, 250, .16); }
html[data-admin-theme="dark"] [data-area="sales"] { --area: #FDA66B; --area-bg: rgba(251, 146, 60, .16); }
html[data-admin-theme="dark"] [data-area="clients"] { --area: #6EE7A0; --area-bg: rgba(74, 222, 128, .16); }
html[data-admin-theme="dark"] [data-area="marketing"] { --area: #C4B0FF; --area-bg: rgba(167, 139, 250, .16); }

/* The shades: Outreach in blues, Sales in oranges, Clients in greens, Marketing in purples. */
html[data-admin-page="bucket"] { --h: 204; --s: 62%; }     /* Leads: ocean blue */
html[data-admin-page="agencies"] { --h: 219; --s: 55%; }   /* Agencies: navy, as Scribando's page */
html[data-admin-page="referrals"] { --h: 234; --s: 48%; }  /* Referrals: indigo blue */
html[data-admin-page="builders"] { --h: 172; --s: 46%; }  /* Builders (build S103): teal */
html[data-admin-page="outbound"] { --h: 193; --s: 58%; }   /* Outbound: steel blue */
html[data-admin-page="leads"] { --h: 26; --s: 46%; }       /* Inbound: orange */
html[data-admin-page="proposals"] { --h: 14; --s: 44%; }   /* Proposals: red orange */
html[data-admin-page="practice"] { --h: 38; --s: 50%; }    /* Practice calls: amber */
html[data-admin-page="clients"] { --h: 146; --s: 40%; }    /* Clients: green */
html[data-admin-page="onboarding"] { --h: 104; --s: 34%; } /* Onboarding call: moss green (its own page, build S94) */
html[data-admin-page="workflows"] { --h: 166; --s: 44%; }  /* Workflows: teal green */
html[data-admin-page="bobai"] { --h: 124; --s: 34%; }      /* BobAI: leaf green */
html[data-admin-page="articles"] { --h: 266; --s: 40%; }   /* Articles: violet */
html[data-admin-page="pr"] { --h: 288; --s: 38%; }         /* PR: plum */
html[data-admin-page="ads"] { --h: 250; --s: 42%; }        /* Google Ads (build S126): iris */
html { --page: var(--ink); }
html[data-admin-theme="dark"] {
  color-scheme: dark;
  --ground: hsl(var(--h) var(--s) 9%); --ground-2: hsl(var(--h) var(--s) 13%); --paper: hsl(var(--h) var(--s) 17%);
  --ink: hsl(var(--h) 60% 94%); --ink-2: hsl(var(--h) 40% 85%); --ink-3: hsl(var(--h) 30% 76%);
  --text: hsl(var(--h) 60% 94%); --text-2: hsl(var(--h) 40% 85%); --text-3: hsl(var(--h) 30% 76%); --muted: hsl(var(--h) 24% 66%);
  --line: hsl(var(--h) calc(var(--s) * .8) 31%); --line-soft: hsl(var(--h) var(--s) 23%); --track: hsl(var(--h) var(--s) 23%);
  --on-ink: hsl(var(--h) var(--s) 9%); --on-ink-2: hsl(var(--h) var(--s) 17%); --on-ink-muted: hsl(var(--h) var(--s) 31%);
  --ink-line: hsl(var(--h) var(--s) 31%); --ink-border: hsl(var(--h) var(--s) 42%);
  --accent: hsl(var(--h) 88% 60%); --accent-light: hsl(var(--h) 90% 70%); --accent-dark: hsl(var(--h) 90% 70%);
  --tint: hsl(var(--h) 88% 60% / .16); --page: hsl(var(--h) 90% 68%);
}
/* Sales (Matt, 6 Nov: "sales section more orange, lighter.. too brown atm"): orange turns brown when it is made dark,
   so the Sales pages are light instead (admin.js sets html[data-admin-theme="tint"]): an orange page, cream cards and
   the usual dark text, each page in its own shade. */
html[data-admin-theme="tint"] {
  --ground: hsl(var(--h) 100% 80%); --ground-2: hsl(var(--h) 100% 88%); --paper: hsl(var(--h) 100% 98%);
  --line: hsl(var(--h) 60% 68%); --line-soft: hsl(var(--h) 80% 82%); --track: hsl(var(--h) 70% 78%);
  --muted: hsl(var(--h) 30% 28%); --text-3: hsl(var(--h) 25% 22%);
  --tint: hsl(var(--h) 100% 50% / .14); --page: hsl(var(--h) 90% 44%);
}

.admin-brand { flex: 1 0 100%; }
.admin-nav { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 0; flex: 1 1 auto; }
.admin-nav .nav-group { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 22px; border-left: 1px solid var(--line); }
.admin-nav .nav-group:first-child { padding-left: 0; border-left: 0; }
.admin-nav .nav-label { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--area); background: var(--area-bg); border-radius: 999px; padding: 2px 9px; }
.admin-nav .nav-label-none { visibility: hidden; }
.admin-nav .nav-links { display: flex; gap: 0 18px; white-space: nowrap; }
.admin-nav .nav-links a { min-height: 38px; }
.admin-nav a[aria-current="page"] { color: var(--page); text-decoration-color: var(--page); }
.admin-nav .nav-group[data-area="home"] a[aria-current="page"] { text-decoration-color: var(--accent, #1D4ED8); }
.admin-header-actions { margin-left: auto; align-self: flex-end; }
.admin-header { box-shadow: inset 0 -4px 0 var(--page, transparent); }
@media (max-width: 760px) {
  .admin-nav .nav-group { padding: 0 14px 0 0; border-left: 0; }
  .admin-nav .nav-links { flex-wrap: wrap; white-space: normal; }
}
html[data-admin-theme="dark"] .btn-dark:hover { background: var(--ink-2); }
html[data-admin-theme="dark"] .bk-float { box-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
html[data-admin-theme="dark"] .cold-sending-state.is-on { color: #4ADE80; }
/* White text on a fill that turns light on the dark pages: the pressed Practice tab, Stop, and a skip verdict. */
html[data-admin-theme="dark"] :is(.pr-tabs .btn[aria-pressed="true"], .stop-card .btn-stop, .app-verdict-skip) { color: var(--on-ink); }

/* Build S98 (Matt, 7 Nov: "it aint clear... make that a letters toggle"): the Agencies settings' Letters switch, ON or
   OFF in words beside a big track, green when on. It saves on click (agencies.js lettersSwitch). */
.letters-switch, .field .letters-switch { display: inline-flex; align-self: flex-start; width: auto; max-width: 100%; align-items: center; gap: 14px; min-height: 48px; padding: 6px 18px 6px 8px; border: 2px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.letters-switch:focus-visible { outline: 3px solid var(--page, var(--ink)); outline-offset: 2px; }
.letters-switch[aria-busy="true"] { opacity: .6; cursor: progress; }
.letters-switch .switch-track { position: relative; flex: none; width: 60px; height: 32px; border-radius: 999px; background: var(--line); transition: background .15s; }
.letters-switch .switch-knob { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: left .15s; }
.letters-switch .switch-word { color: #C0392B; }
.letters-switch.is-on { border-color: #1F9D55; }
.letters-switch.is-on .switch-track { background: #1F9D55; }
.letters-switch.is-on .switch-knob { left: 32px; }
.letters-switch.is-on .switch-word { color: #1F9D55; }
html[data-admin-theme="dark"] .letters-switch .switch-word { color: #EF5B5B; }
html[data-admin-theme="dark"] .letters-switch.is-on .switch-word { color: #4ADE80; }
html[data-admin-theme="dark"] .letters-switch.is-on { border-color: #3EC27A; }
html[data-admin-theme="dark"] .letters-switch.is-on .switch-track { background: #3EC27A; }

/* ---------- Build S118: the outreach autopilot (public/admin3000/autopilot.js) ---------- */
/* Build S119 (Matt, 11 Nov: "this all puts the main part of the page, down too far"): the bar is one line; its parts
   (Going out next, Left out, Settings) open under it from the bar's own buttons. */
.ap { margin: 0 0 10px; }
.ap-bar { border: var(--border); border-left: 6px solid var(--page, var(--ink)); border-radius: 10px; padding: 6px 12px; background: var(--paper); }
.ap-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ap-title { font-size: 15px; }
.ap-step { display: flex; align-items: center; gap: 6px; }
.ap-step label { font-size: 13px; white-space: nowrap; }
.ap-num { width: 64px; padding: 5px 8px; text-align: center; }
.ap-line { margin: 0; font-size: 14px; }
.ap-row > .ap-line { flex: 1 1 240px; min-width: 0; }
.ap-line-stop { font-weight: 600; color: var(--danger); }
.ap-panel { margin-top: 8px; padding: 10px 14px; }
.ap-panel[hidden] { display: none; }
.ap-panel > .clients-h3 { margin: 0 0 10px; font-size: 15px; }
.ap .save-status:empty { display: none; }
/* Build S119: the day's CSV strip sits under the board (index.html), so it needs its own space above. */
.bk-strip { margin-top: 14px; }
.bk-strip .save-status { margin: 6px 0 0; }
.bk-strip .save-status:empty, #ag-form .save-status:empty { display: none; }
.ap-preview { white-space: pre-wrap; font: inherit; font-size: 13px; margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--ground-2); }
/* Build S158: Write the Upwork application is the main action of an Upwork draft, and the application shows in the panel under the top bar. */
.proposal-editor-head .proposal-write { order: -1; }
.proposal-app-slot:empty { display: none; }
.proposal-app-slot { margin: 14px 0 6px; }
.proposal-app-slot .app-result { margin: 8px 0 14px; }
.proposal-app-slot #app-status:empty { display: none; }

/* The rename of 20 Nov 2026: the header's logo. Most admin pages are dark, where the lockup's ink letters cannot be
   seen (Matt's screenshot of 21 Nov showed only "Replacer"), so those pages show the lockup made for dark grounds.
   The light pages (the Sales ones, data-admin-theme="tint") keep the ordinary lockup. */
.admin-header .logo .logo-dark { display: none; }
html[data-admin-theme="dark"] .admin-header .logo .logo-light { display: none; }
html[data-admin-theme="dark"] .admin-header .logo .logo-dark { display: block; }
html[data-admin-theme="dark"] .admin-header .brand-former { color: var(--muted); }
