/* NextIsWhat — phone-friendly (works at 380px). Brand colours: green and red (owner, 27 Sep 2026).
   Green = the brand, "go", won, on track. Red = the brand accent and overdue / lost / needs attention.
   (The variable is still called --blue so no other rule had to change; it now holds the brand green.) */
:root {
  --blue: #15803d;        /* brand green */
  --blue-dark: #116b33;
  --blue-soft: #e6f5eb;
  --brand-red: #dc2626;   /* brand accent red */
  --sidebar: #0f2a1b;     /* deep green menu */
  --text: #1c2430;
  --muted: #6b7686;
  --line: #e3e8ef;
  --bg: #f4f6f9;
  --card: #ffffff;
  --red: #c62828;
  --red-soft: #fdecec;
  --amber: #9a6700;
  --amber-soft: #fff4d6;
  --green: #1b7a3d;
  --green-soft: #e6f5ec;
  --wa: #1fa855;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 10px; }
p { margin: 0 0 8px; }
ol, ul { margin: 0 0 8px; padding-left: 20px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.text-danger { color: var(--red); }
.brand { font-weight: 800; color: var(--blue); font-size: 18px; letter-spacing: -0.2px; }
.brand::before { content: ""; display: inline-block; width: 30px; height: 30px; margin-right: 9px; border-radius: 50%; background: #fff url(icons/logo-badge.png) center / 86% no-repeat; vertical-align: middle; flex: none; }
.brand-big::before { width: 44px; height: 44px; }
.brand:hover { text-decoration: none; }
.brand-big { font-size: 26px; margin: 0; }

/* ---------- layout */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 0;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;            /* long menus scroll on short screens */
  overscroll-behavior: contain;
}
.sidebar .brand { display: block; padding: 2px 10px 18px; color: #fff; }
.mainnav { display: flex; flex-direction: column; gap: 2px; }
.mainnav a { padding: 9px 10px; border-radius: 8px; color: #cfe5d7; font-weight: 500; border-left: 3px solid transparent; }
.mainnav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.mainnav a.active { background: var(--blue); color: #fff; border-left-color: var(--brand-red); }
.content { flex: 1; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.search { flex: 1; max-width: 420px; }
.search input { width: 100%; }
.usermenu { margin-left: auto; position: relative; }
.usermenu summary { cursor: pointer; list-style: none; font-weight: 600; padding: 6px 8px; border-radius: 8px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary::after { content: " ▾"; color: var(--muted); }
.usermenu .menu {
  position: absolute; right: 0; top: 38px; z-index: 10;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 30, 50, .12);
  padding: 12px; min-width: 220px; display: flex; flex-direction: column; gap: 8px;
}
.usermenu form { margin: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: 22px 24px 60px; }
.banner { background: var(--blue-soft); color: var(--blue-dark); padding: 8px 24px; font-size: 14px; }
.banner-warn { background: var(--amber-soft); color: var(--amber); }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section { margin-bottom: 26px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }

/* ---------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.card-warn { border-color: #f1d18a; background: #fffaf0; }
.card-ok { border-color: #b7e0c4; background: var(--green-soft); }
.na-missing { border-color: #f3b4b4; background: #fff8f8; }
.na-title { font-size: 16px; margin-bottom: 4px; }
.empty { color: var(--muted); padding: 8px 0; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; min-height: 40px;
  font: inherit; font-weight: 600; color: #fff;
  background: var(--blue); border: 1px solid var(--blue); border-radius: 8px;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; }
.btn-secondary { background: var(--card); color: var(--text); border-color: #cfd6e0; }
.btn-secondary:hover { background: var(--bg); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-wa:hover { background: #178a45; }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #a61f1f; }
.btn-small { padding: 5px 11px; min-height: 34px; font-size: 14px; }
.btn-block { width: 100%; margin-top: 20px; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.link-button { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; }
.link-button:hover { text-decoration: underline; }

/* ---------- forms */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
input, select, textarea {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid #cfd6e0;
  border-radius: 8px;
  min-height: 40px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
/* Our own drop-down style: Safari's built-in one ignores height, which made drop-downs too small to tap. */
select {
  -webkit-appearance: none; appearance: none;
  padding-right: 34px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23116b33' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  line-height: 1.3;
}
select::-ms-expand { display: none; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; }
.input-narrow { width: 90px; }
.form h2 { margin-top: 18px; }
.form h2:first-child, .form > input[type="hidden"] + h2 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 16px; }
.span-2 { grid-column: span 2; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { margin-bottom: 12px; }
.form-grid .field { margin-bottom: 0; }
.field.grow { flex: 1; min-width: 200px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 12px 0 0; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline-form input { max-width: 260px; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input[type="search"] { flex: 1; min-width: 200px; }
.filters select { width: auto; }

/* One-tap chips (outcome panel, due times) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips legend { width: 100%; }
.chip { margin: 0; font-weight: 500; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 7px 12px; border: 1px solid #cfd6e0; border-radius: 999px;
  background: #fff; font-size: 14px; user-select: none;
}
.chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.due-custom { width: auto; margin-top: 4px; }

/* ---------- badges, flashes */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--muted); white-space: nowrap; }
.badge-danger { background: var(--red-soft); color: var(--red); }
.badge-warn { background: var(--amber-soft); color: var(--amber); }
.badge-ok { background: var(--green-soft); color: var(--green); }
.badge-info { background: var(--blue-soft); color: var(--blue-dark); }
.badge-soft { background: #eef1f5; color: var(--muted); }
.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; background: var(--green-soft); color: var(--green); }
.flash-error { background: var(--red-soft); color: var(--red); }
.alert { padding: 10px 12px; color: var(--red); background: var(--red-soft); border-radius: 8px; }

/* ---------- tables and lists */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 13px; color: var(--muted); font-weight: 600; background: #fafbfc; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr.total td { font-weight: 700; background: #fafbfc; }
.card .table-wrap { border: 0; margin: 0; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 0; font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; word-break: break-word; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 12px 0; font-size: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--blue); border-bottom-color: var(--blue); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* ---------- KPIs and team strip */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; }
.kpi-value { font-size: 24px; font-weight: 800; color: var(--blue-dark); }
.kpi { border-top: 3px solid var(--blue); }
.kpi-label { color: var(--muted); font-size: 13px; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.strip-item { flex: 0 0 auto; min-width: 170px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; font-size: 13px; color: var(--text); }
.strip-item strong { font-size: 15px; }
.strip-item:hover { border-color: var(--blue); text-decoration: none; }

/* ---------- Next Action list */
.action-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.action-item { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.action-item.is-overdue { border-left-color: var(--red); }
.action-main { flex: 1; min-width: 220px; }
.action-top { margin-bottom: 4px; }
.action-title { font-weight: 700; font-size: 16px; color: var(--text); display: block; }
.action-sub { color: var(--text); }
.action-buttons { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.action-buttons .btn-row { margin: 0; justify-content: flex-end; }
.why { margin-top: 6px; font-size: 14px; }
.why summary { color: var(--blue); cursor: pointer; }
.why p { margin: 6px 0 0; }
.outcome-panel { flex-basis: 100%; border-top: 1px dashed var(--line); padding-top: 12px; }

/* ---------- Deals board and stage bar */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.board-col { flex: 0 0 250px; background: #eceff4; border-radius: var(--radius); padding: 10px; }
.board-col header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.deal-card { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; color: var(--text); }
.deal-card:hover { border-color: var(--blue); text-decoration: none; }
.deal-card.no-action { border-left: 3px solid var(--red); }
.deal-card .badge { align-self: flex-start; margin-top: 4px; }
.stage-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.stage-bar form { margin: 0; }
.stage { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border: 1px solid #cfd6e0; border-radius: 999px; background: #fff; color: var(--text); cursor: pointer; list-style: none; }
.stage:hover { border-color: var(--blue); }
.stage.current { background: var(--blue); border-color: var(--blue); color: #fff; cursor: default; }
.stage-won:not(.current) { border-color: #b7e0c4; color: var(--green); }
.stage-lost { position: relative; }
.stage-lost summary::-webkit-details-marker { display: none; }
.stage-lost[open] form { position: absolute; z-index: 5; top: 40px; left: 0; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: 0 8px 24px rgba(20, 30, 50, .12); }

/* ---------- timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline p { margin: 6px 0 0; }
.badge-type-call { background: var(--blue-soft); color: var(--blue-dark); }
.badge-type-whatsapp { background: var(--green-soft); color: var(--green); }
.badge-type-meeting { background: var(--amber-soft); color: var(--amber); }

/* ---------- login page */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; background: #fff; border-radius: 12px; padding: 32px 28px; box-shadow: 0 4px 24px rgba(20, 30, 50, .08); border-top: 5px solid var(--blue); }
/* Light, like the public homepage (owner 2 Oct 2026). */
.auth-page { background: #FCFDFC; }
.auth-page .auth-card { border: 1px solid #E7EEE9; border-top: 1px solid #E7EEE9; border-radius: 18px; box-shadow: 0 18px 50px -28px rgba(20, 60, 35, .25); }
.auth-story { display: none; }
/* Computers: the homepage's line + the morning list on the left, the card on the right. */
@media (min-width: 1000px) {
  .auth-page.auth-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 0; }
  .auth-split .auth-card { justify-self: center; align-self: center; margin: 40px 24px; }
  .auth-story { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; gap: 28px 40px; align-items: center; min-height: 100vh;
    padding: 36px 4vw 48px 5vw; background: #F0F8F3; border-right: 1px solid #E7EEE9; color: #2B3A31; }
  .story-home { grid-column: 1 / -1; align-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #2B3A31; font-weight: 650; font-size: 19px; text-decoration: none; }
  .story-home::before { content: ""; width: 34px; height: 34px; border-radius: 50%; background: #fff url(icons/logo-badge.png) center / 86% no-repeat; }
  .story-head h2 { margin: 0 0 14px; font-size: clamp(30px, 2.8vw, 42px); line-height: 1.15; font-weight: 600; letter-spacing: -.015em; }
  .story-head p { margin: 0; max-width: 30em; font-size: 17px; line-height: 1.6; color: #6A7A70; }
  .story-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; font-size: 16px; }
  .story-points li { display: flex; gap: 10px; align-items: center; }
  .story-points li::before { content: "✓"; display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: #E2F2E8; color: #1B8E4B; font-weight: 700; font-size: 13px; }
  .auth-story .reel-box { width: clamp(200px, 17vw, 270px); }
  .story-phone { margin: 0; width: 100%; border-radius: 26px; overflow: hidden; border: 1px solid #E7EEE9; background: #fff;
    box-shadow: 0 18px 50px -28px rgba(20, 60, 35, .3); transform: rotate(1.5deg); }
  .story-phone img { display: block; width: 100%; height: auto; }
}
@media (min-width: 1000px) and (max-width: 1180px) { .auth-story .reel-box { display: none; } .auth-story { grid-template-columns: 1fr; } }

.auth-card label { margin: 14px 0 6px; }
.tagline { margin: 4px 0 20px; color: var(--muted); }

/* ---------- phones and small tablets */
@media (max-width: 900px) {
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; overflow: visible; position: sticky; top: 0; z-index: 20; padding: 8px 12px; border-right: 0; }
  .sidebar .brand { padding: 0 0 6px; font-size: 16px; }
  .mainnav { flex-direction: row; overflow-x: auto; gap: 2px; }
  .mainnav a { white-space: nowrap; padding: 7px 10px; font-size: 14px; }
  .topbar { padding: 8px 12px; }
  .page { padding: 16px 12px 60px; }
  .banner { padding: 8px 12px; }
  .span-2 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .action-buttons { align-items: stretch; flex-basis: 100%; }
  .action-buttons .btn-row { justify-content: flex-start; }
  .board-col { flex-basis: 78vw; }
  .filters select, .filters .btn { flex: 1; }
  /* The outcome panel sits like a bottom sheet on phones. */
  .outcome-panel:not([hidden]) {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    max-height: 85vh; overflow-y: auto;
    background: #fff; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 30px rgba(20, 30, 50, .18);
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
  }
}

/* ---------- sign-up / reset pages */
.auth-title { font-size: 20px; margin: 0 0 6px; }
.auth-links { margin: 18px 0 0; font-size: 14px; text-align: center; color: var(--muted); }
.auth-card .flash { margin-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- on-screen new-lead alert */
.nav-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }

/* ---------- getting started */
.getting-started { border-color: #c9d7ff; background: #f7f9ff; }
.checklist { padding-left: 22px; }
.checklist li { margin-bottom: 6px; }
.checklist li.done a { text-decoration: line-through; color: var(--muted); }

/* ---------- EKM admin panel */
.admin-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 24px; background: var(--sidebar); color: #fff; border-bottom: 3px solid var(--brand-red); }
.admin-bar .brand { color: #fff; }
.admin-bar .muted { color: #aab4c3; }
.admin-nav { display: flex; gap: 4px; }
.admin-nav a { color: #d7deea; padding: 6px 10px; border-radius: 8px; font-weight: 600; }
.admin-nav a.active, .admin-nav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.admin-logout { margin: 0 0 0 auto; }
.admin-logout .link-button { color: #d7deea; }
@media (max-width: 760px) { .admin-bar { padding: 10px 12px; } }

/* ---------- read-only company (trial ended): hide everything that adds or changes data.
   The server refuses such changes anyway; this just keeps the screen honest. */
.read-only main form[method="post"]:not(.ro-ok),
.read-only .page-head .actions,
.read-only a[href*="-edit.php"],
.read-only a[href^="import.php"],
.read-only a[href*="lead-convert"],
.read-only .action-buttons button[data-open-panel],
.read-only .na-card details,
.read-only .stage-bar { display: none !important; }
.banner-warn a { color: inherit; text-decoration: underline; }

/* ---------- NIW Marketing */
.quick-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip-link { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border: 1px solid #cfd6e0; border-radius: 999px; background: #fff; font-size: 14px; color: var(--text); }
.chip-link:hover { border-color: var(--blue); text-decoration: none; }
.chip-link.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip-link.active a, .chip-link.active .link-button { color: #fff; }
.chip-link.saved a { color: inherit; }
.chip-x { display: inline; margin: 0; }
.chip-x .link-button { font-size: 16px; line-height: 1; color: var(--muted); }
.save-filter { margin: -6px 0 16px; }
textarea[readonly] { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: #fafbfc; }
code { background: #f1f3f7; padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* ---------- public web form (inside customers' websites) */
.public-form { background: transparent; }
.pf-card { max-width: 520px; margin: 0 auto; padding: 18px 16px; background: #fff; }
.pf-title { font-size: 20px; margin: 0 0 12px; }
.pf-card label { margin: 12px 0 5px; }
.pf-consent { align-items: flex-start; font-weight: 400; font-size: 14px; }
.pf-consent input { margin-top: 3px; }
.pf-foot { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.kpi-value.text-danger { color: var(--red); }

/* ---------- simple bars in reports (no chart library) */
.bar-cell { width: 38%; min-width: 120px; }
.bar { display: block; height: 10px; border-radius: 999px; background: var(--blue); min-width: 2px; }
.bar-red { background: var(--red); }
.bar-soft { background: #9fd4b1; }
.bar-track { display: block; background: #eef2ef; border-radius: 999px; }

/* ---------- Baton */
.baton-motto { margin: -8px 0 18px; font-weight: 800; letter-spacing: .3px; color: var(--blue-dark); font-size: 13px; }
.baton-motto span { font-weight: 500; color: var(--muted); letter-spacing: 0; }
.section h2 .count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: #eef2ef; color: var(--muted); font-size: 12px; text-align: center; vertical-align: 2px; }
.pinned { background: var(--red-soft); border: 1px solid #f3b4b4; border-radius: var(--radius); padding: 12px 16px; }
.pinned .plain-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pinned .plain-list li .btn { margin-left: auto; }
.badge-stage { background: #eef2ff; color: #3730a3; }
.action-item.is-waiting { border-left-color: var(--amber); }
.waiting-line { margin: 2px 0 4px; }
.handed-line { color: var(--blue-dark); margin-top: 2px; }
.na-waiting { border-color: #f1d18a; background: #fffaf0; }
.waiting-buttons { align-items: flex-start; }
.inline-details { display: inline-block; position: relative; }
.inline-details summary { list-style: none; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-details[open] form { position: absolute; z-index: 5; right: 0; top: 38px; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: 0 8px 24px rgba(20, 30, 50, .12); }
.baton-received { background: var(--green-soft); color: var(--green); padding: 8px 12px; border-radius: 8px; }
.optional-steps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; }
.optional-steps .chip-link { font: inherit; font-size: 13px; cursor: pointer; border-style: dashed; }
.stage-static { cursor: default; }
.stage-static:hover { border-color: #cfd6e0; }
.stage-hint { margin: -10px 0 16px; }

/* =====================================================================
   Phones and tablets (REQUIREMENTS #119): 360px and up, no sideways scrolling,
   tap targets at least 44px, tables become cards. Desktop is unchanged.
   ===================================================================== */
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-btn { display: none; }


/* Calls (#125): phones get the Call button (dialer); computers with a mouse get "📞 Call <number>" (calling app + call timer). */
.call-desk-dial { white-space: nowrap; font-variant-numeric: tabular-nums; }
.call-desk { display: none; }
.phone-num { font-variant-numeric: tabular-nums; align-self: center; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .js .call-phone { display: none; }
  .js .call-desk { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
}
.timer-running { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.call-prompt { background: var(--amber-soft); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
.call-fields .form-row { margin-top: 4px; }
.wa-menu { position: relative; display: inline-block; }
.wa-menu > summary { list-style: none; cursor: pointer; }
.wa-menu > summary::-webkit-details-marker { display: none; }
.wa-menu .menu { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 200px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(20, 30, 50, .12); padding: 6px; display: flex; flex-direction: column; }
.wa-menu .menu a { padding: 8px 10px; border-radius: 6px; color: var(--text, #1f2937); white-space: nowrap; }
.wa-menu .menu a:hover { background: var(--green-soft); text-decoration: none; }
.wa-fields { margin: 0 0 8px; }
.last-contact { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.last-contact svg { flex: none; }
.last-call svg { color: var(--blue-dark); }
.last-whatsapp svg { color: #1a9e4b; }
.last-email svg { color: var(--brand-red); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-danger-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-danger-outline:hover { background: var(--red-soft); }
.connect-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.connect-buttons form, .form-actions form { margin: 0; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.copy-row input { flex: 1 1 260px; font-family: ui-monospace, Menlo, monospace; }
details.card > summary { cursor: pointer; }
.compose-from { margin-bottom: 4px; }
.ai-lab { border-left: 4px solid #7c3aed; }
.ai-lab h2 .badge { vertical-align: 2px; }
.ai-points { margin: 6px 0 4px; padding-left: 20px; }
.ai-points li { margin: 4px 0; }
.ai-out { margin-top: 10px; }
.ai-out textarea { width: 100%; }
.ai-suggest { margin: 4px 0 8px; }
.ai-research p { margin: 6px 0; }
.ai-research .story-label { margin: 10px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.ai-sources { margin: 4px 0; padding-left: 20px; }
.ai-sources a { word-break: break-word; }
.ai-suggest-frame { display: block; width: 100%; height: 64px; border: 0; margin: 8px 0 0; }
.action-brief { flex-basis: 100%; }
.steps-bar { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.steps-bar li { padding: 6px 12px; border-radius: 999px; background: #eef1f5; color: var(--muted); font-size: 13px; font-weight: 600; }
.steps-bar li.on { background: var(--blue); color: #fff; }
.steps-bar li.done { background: var(--green-soft); color: var(--blue); }
.import-issues li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.sr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1024px), (pointer: coarse) {
  .wa-menu .menu a { min-height: 44px; display: flex; align-items: center; }
  .ai-points a, .ai-sources a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---- Touch sizes: phones, tablets (up to 1024px) and any touch screen: every tap target at least 44×44px ---- */
@media (max-width: 1024px), (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { min-height: 44px; font-size: 16px; } /* 16px stops iPhone zooming in */
  .btn, .btn-small, .stage, .chip-link, .tabs a, .usermenu summary, .pager a, summary.btn, .mainnav a { min-height: 44px; min-width: 44px; }
  .btn-small { padding: 8px 14px; font-size: 15px; }
  .chip span { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; }
  .chip-link { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; }
  .link-button { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .tabs a { display: inline-flex; align-items: center; }
  .pager a { display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; }
  .mainnav a { display: flex; align-items: center; }
  details > summary { min-height: 44px; display: flex; align-items: center; }
  .usermenu summary { display: flex; align-items: center; }
  .usermenu .menu a { min-height: 44px; display: flex; align-items: center; }
  label.check { min-height: 44px; }
  input[type=checkbox]:not(label input) { width: 44px; height: 44px; }
  input[type=checkbox], input[type=radio] { min-width: 22px; min-height: 22px; }
  /* Links inside lists, tables and cards get a comfortable tap area */
  .plain-list a, .table td a, .timeline a, .details dd a, .page-head a:not(.btn), .section-head a, .card-head a, .card p a, .section > p > a,
  .empty a, .auth-links a, .action-sub a, .banner a, .checklist a, .tl-head a {
    display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
  }
  .action-title { display: flex; align-items: center; min-height: 44px; }
  .brand { min-height: 44px; display: inline-flex; align-items: center; }
  .admin-nav a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ---- Phone layout (up to 760px): menu button, stacking, tables become cards ---- */
@media (max-width: 760px) {
  .sidebar .brand { padding: 0; }
  .mainnav { flex-wrap: wrap; overflow: visible; }
  .js .menu-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font: inherit; font-weight: 700;
                  color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 8px; cursor: pointer; }
  .js .mainnav { display: none; }
  .js .mainnav.open { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px 0 4px; max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px); overflow-y: auto; overscroll-behavior: contain; }
  .mainnav a { white-space: normal; }
  .input-narrow { width: 100%; }
  .badge { white-space: normal; }

  /* Things that used to scroll sideways now wrap or stack */
  .tabs { flex-wrap: wrap; overflow: visible; }
  .strip { flex-wrap: wrap; overflow: visible; }
  .strip-item { flex: 1 1 100%; }
  .board { flex-direction: column; overflow: visible; }
  .board-col { flex: 1 1 auto; width: 100%; }
  .inline-details[open] form, .stage-lost[open] form { position: static; width: 100%; box-shadow: none; margin-top: 8px; }
  .wa-menu[open] { display: block; width: 100%; }
  .wa-menu .menu { position: static; min-width: 0; box-shadow: none; margin-top: 6px; }
  .wa-menu .menu a { white-space: normal; }
  .inline-details { display: block; width: 100%; }
  .table-wrap { overflow: visible; border: 0; background: transparent; }

  /* Tables become cards: one card per row, each value with its column name */
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards thead { display: none; }
  table.cards tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 12px; }
  table.cards td { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 8px 0;
                   border-bottom: 1px solid var(--line); text-align: right; overflow-wrap: anywhere; min-width: 0; }
  table.cards td:last-child { border-bottom: 0; }
  table.cards td::before { content: attr(data-label); flex: 0 0 38%; text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); }
  table.cards td:not([data-label])::before, table.cards td[data-label=""]::before { content: none; }
  table.cards td:not([data-label]), table.cards td[data-label=""] { justify-content: flex-start; text-align: left; }
  table.cards td > input:not([type=checkbox]):not([type=radio]), table.cards td > select { flex: 1 1 55%; min-width: 0; }
  table.cards td > input[type=checkbox] { flex: 0 0 auto; }
  table.cards td > .badge { max-width: 100%; }
  table.cards tr.total { background: #fafbfc; font-weight: 700; }
  .bar-cell { width: 100%; min-width: 0; }
  .bar-cell .bar-track { flex: 1 1 55%; }
}

@media (min-width: 761px) and (max-width: 1024px) {
  .table-wrap:has(table.wide) { overflow: visible; border: 0; background: transparent; }
  /* Wide editing tables (e.g. the Baton Map) are cards on tablets too */
  table.wide.cards, table.wide.cards tbody, table.wide.cards tr, table.wide.cards td { display: block; width: 100%; }
  table.wide.cards thead { display: none; }
  table.wide.cards tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 12px; }
  table.wide.cards td { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 8px 0;
                   border-bottom: 1px solid var(--line); text-align: right; overflow-wrap: anywhere; min-width: 0; }
  table.wide.cards td:last-child { border-bottom: 0; }
  table.wide.cards td::before { content: attr(data-label); flex: 0 0 38%; text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); }
  table.wide.cards td:not([data-label])::before, table.wide.cards td[data-label=""]::before { content: none; }
  table.wide.cards td:not([data-label]), table.wide.cards td[data-label=""] { justify-content: flex-start; text-align: left; }
  table.wide.cards td > input:not([type=checkbox]):not([type=radio]), table.wide.cards td > select { flex: 1 1 55%; min-width: 0; }
  table.wide.cards td > input[type=checkbox] { flex: 0 0 auto; }
  table.wide.cards td > .badge { max-width: 100%; }
  table.wide.cards tr.total { background: #fafbfc; font-weight: 700; }
}

/* Installable app: "Put NIW on your home screen" bar (home screen + login page, filled in by app.js) */
.install-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line, #e5e7eb); border-left: 4px solid var(--brand-red); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; }
.install-bar img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.install-text { flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.install-btns { display: flex; align-items: center; gap: 10px; }
.ios-share { display: inline-block; width: 14px; height: 16px; vertical-align: -2px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18' fill='none' stroke='%23157fd8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 1v10M3.5 4.5 7 1l3.5 3.5M4 7H2v10h10V7h-2'/%3E%3C/svg%3E"); }
.auth-card .install-bar { margin-top: 4px; }

/* Lead import progress (import.php) */
.import-progress { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .75rem; }
.import-progress[hidden] { display: none; }
.import-progress progress { flex: 1 1 12rem; max-width: 24rem; height: 1rem; accent-color: var(--blue); }

/* Categories (REQUIREMENTS #153): badge + tab dot per colour. Red stays for overdue/lost, so no red here. */
.badge.cat { border: 1px solid transparent; }
.cat-sky { background: #e0f2fe; color: #075985; }
.cat-violet { background: #f3e8ff; color: #6b21a8; }
.cat-teal { background: #ccfbf1; color: #115e59; }
.cat-orange { background: #ffedd5; color: #9a3412; }
.cat-rose { background: #fce7f3; color: #9d174d; }
.cat-slate { background: #eef1f5; color: #475569; }
.cat-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.cat-tabs .count { font-weight: 500; color: var(--muted); font-size: 12px; }
.cat-dot { width: 10px; height: 10px; border-radius: 50%; }
.cat-tabs .cat-dot { background: currentColor; }
.category-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.category-form select { width: auto; min-width: 9rem; }
.deal-card .badge.cat { align-self: flex-start; }

/* Policy warnings (REQUIREMENTS #155), e.g. "Company policy: no free POC" */
.flash-warn { background: var(--amber-soft); color: var(--amber); border: 1px solid currentColor; }
.policy-live { margin: 6px 0 0; font-weight: 600; }

/* Files on leads and deals (REQUIREMENTS #156) */
.file-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-list li:last-child { border-bottom: 0; }
.file-list a { word-break: break-word; }
.file-upload { margin-top: 12px; }

/* Long drop-down options (e.g. "Waiting for Pre-sales/Solutions: site survey") must not widen a table cell on phones */
td select, td input:not([type="checkbox"]):not([type="radio"]) { max-width: 100%; min-width: 0; }
select { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Invoice requests (REQUIREMENTS #157) */
.pre-line { white-space: pre-line; }
.invoice-lines td:first-child input { min-width: 12rem; }
.invoice-lines .line-amount { white-space: nowrap; text-align: right; }
.invoice-total { margin-left: 12px; }

/* Timeline: edit a note (note-edit.php) */
.timeline .tl-edit { display: inline-block; margin-top: 2px; }
@media (max-width: 1024px), (pointer: coarse) { .timeline .tl-edit { min-height: 44px; line-height: 44px; min-width: 44px; } }

/* Tracker (REQUIREMENTS #159): Excel-like grid. It scrolls sideways inside its own box, never the page. */
.sheet-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.sheet-tools details > summary { list-style: none; cursor: pointer; }
.sheet-tools details > summary::-webkit-details-marker { display: none; }
.sheet-tools details[open] > .card { margin-top: 8px; max-width: 560px; }
.sheet-wrap { overflow-x: auto; max-width: 100%; }
.table.sheet { font-size: 13px; }
.table.sheet th { white-space: nowrap; position: relative; }
.table.sheet td[data-cell] { cursor: text; min-width: 7rem; max-width: 22rem; position: relative; }
.table.sheet td[data-cell]:hover, td[data-cell]:focus { background: var(--blue-soft); outline: none; }
.sheet-open a { text-decoration: none; font-size: 16px; }
.cell-ro { color: var(--muted); }
.cell-missing { color: var(--red); font-weight: 600; }
.cell-saving { opacity: .6; }
.cell-saved { background: var(--green-soft) !important; transition: background .6s; }
.cell-editor { width: 100%; min-width: 8rem; font: inherit; }
.cell-msg { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--red); }
.cell-msg-warn { color: var(--amber); }
.col-menu { display: inline-block; margin-left: 4px; }
.col-menu > summary { list-style: none; cursor: pointer; padding: 0 6px; border-radius: 6px; color: var(--muted); }
.col-menu > summary::-webkit-details-marker { display: none; }
.col-menu[open] > summary { background: var(--bg); }
.col-menu-body { position: fixed; z-index: 50; top: 0; left: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12); padding: 10px; width: 16rem; white-space: normal; display: grid; gap: 8px; font-weight: 400; }
.col-menu-body input, .col-menu-body textarea { width: 100%; }
.details-table th { width: 40%; font-weight: 600; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 1024px), (pointer: coarse) {
  .col-menu > summary { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; text-align: center; }
  .sheet-open a { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; text-align: center; }
  .table.sheet td[data-cell] { min-height: 44px; }
  .table.sheet thead th > a { display: inline-block; min-height: 44px; min-width: 44px; line-height: 44px; }
}

/* ===== Next steps screen (index.php, redesign 30 Sep 2026; mock-up design/mockups/next.html) ===== */
.ns { --ns-ink: #16202b; --ns-line: #e7ebf0; --ns-soft: #e8f5ec; max-width: 1320px; }
.ns-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 4px 0 18px; }
.ns-head h1 { font-size: 30px; margin: 0; letter-spacing: -.02em; }
.ns-sub { margin: 2px 0 0; color: var(--muted); }
.ns-ring { --p: 0%; width: 72px; height: 72px; border-radius: 50%; background: conic-gradient(var(--blue) var(--p), #dfe7e2 0); display: grid; place-items: center; position: relative; flex: none; }
.ns-ring::before { content: ''; position: absolute; inset: 7px; background: var(--bg); border-radius: 50%; }
.ns-ring span { position: relative; font-weight: 800; margin-top: -8px; }
.ns-ring small { position: absolute; bottom: -20px; white-space: nowrap; color: var(--muted); font-size: 12px; }
.ns-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.ns-count { background: var(--card); border: 1px solid var(--ns-line); border-radius: 12px; padding: 8px 14px; color: var(--ns-ink); font-weight: 600; text-decoration: none; }
.ns-count:hover { text-decoration: none; border-color: #c9d3cc; }
.ns-count b { font-size: 18px; margin-right: 4px; }
.ns-count.red b { color: var(--red); }
.ns-spacer { flex: 1; }
.ns-filter { padding: 7px 12px; border-radius: 99px; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.ns-filter.on { background: var(--card); color: var(--ns-ink); border: 1px solid var(--ns-line); }
.ns-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: #cbd5e1; }
.ns-dot.cat-sky, .ns-dot.cat-violet, .ns-dot.cat-teal, .ns-dot.cat-orange, .ns-dot.cat-rose, .ns-dot.cat-slate { background: currentColor; }
.ns-brief { background: linear-gradient(135deg, #0f2a1b, #1b4d31); color: #e8f5ec; border-radius: 16px; padding: 12px 18px; margin: 0 0 16px; }
.ns-brief summary { cursor: pointer; list-style: none; font-weight: 600; }
.ns-brief summary::-webkit-details-marker { display: none; }
.ns-brief-more { color: #9fe0b5; font-size: 13px; margin-left: 6px; }
.ns-brief[open] .ns-brief-more { display: none; }
.ns-brief ul { margin: 8px 0 4px; padding-left: 20px; } .ns-brief li { margin: 4px 0; }
.ns-brief .muted { color: #9fb8a8; }
.ns-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.ns-lists { min-width: 0; }
.ns-grp { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; color: var(--ns-ink); display: flex; gap: 8px; align-items: center; scroll-margin-top: 16px; }
.ns-grp:first-child { margin-top: 0; }
.ns-grp span { background: #e9ede9; color: var(--muted); border-radius: 99px; padding: 0 8px; font-size: 12px; letter-spacing: 0; }
.ns-grp.red { color: var(--red); } .ns-grp.red span { background: var(--red-soft); color: var(--red); }
.ns-grp.amber { color: var(--amber); } .ns-grp.muted { color: var(--muted); }
.ns-rows { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--ns-line); border-radius: 16px; overflow: hidden; }
.ns-row { display: grid; grid-template-columns: 76px 12px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--ns-line); cursor: pointer; }
.ns-row:last-child { border-bottom: 0; }
.ns-row:hover, .ns-row:focus { background: #f7faf8; outline: none; }
.ns-row.sel { background: var(--ns-soft); box-shadow: 3px 0 0 var(--blue) inset; }
.ns-row.ns-static { cursor: default; }
.ns-row time { font-size: 13px; font-weight: 700; color: var(--muted); }
.ns-row.late time { color: var(--red); }
.ns-row.wait { background: #fffaf0; } .ns-row.wait.sel { background: #fdf1d8; }
.ns-row.wait time { color: var(--amber); }
.ns-what { min-width: 0; }
.ns-what b { font-size: 15px; }
.ns-person { color: var(--ns-ink); }
.ns-title { display: block; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-stage { font-style: normal; font-size: 12px; color: #4b5563; background: #f1f3f5; border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.ns-btns { display: flex; gap: 6px; }
.ns-ic { border: 1px solid var(--ns-line); border-radius: 10px; padding: 6px 10px; color: var(--ns-ink); font-weight: 700; font-size: 14px; background: #fff; text-decoration: none; cursor: pointer; font-family: inherit; line-height: 1.2; }
.ns-ic:hover { text-decoration: none; border-color: #c9d3cc; }
.ns-ic.ok { background: var(--ns-ink); color: #fff; border-color: var(--ns-ink); }
.ns-more { padding: 10px 16px; font-weight: 600; }
.ns-empty { background: var(--card); border: 1px solid var(--ns-line); border-radius: 16px; padding: 28px; text-align: center; }
.ns-big { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.ns-side { position: sticky; top: 16px; min-width: 0; }
.ns-card { background: var(--card); border-radius: 20px; padding: 24px; box-shadow: 0 10px 30px rgba(15, 42, 27, .08); border: 1px solid var(--ns-line); position: relative; }
.ns-card-top { display: flex; align-items: center; gap: 8px; }
.ns-due { margin-left: auto; background: #fff4e5; color: #9a5b00; font-weight: 700; font-size: 13px; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.ns-due.late { background: var(--red-soft); color: var(--red); }
.ns-company { font-size: 28px; margin: 10px 0 0; letter-spacing: -.02em; line-height: 1.2; }
.ns-company a { color: var(--ns-ink); }
.ns-card-person { margin: 2px 0 12px; font-weight: 600; }
.ns-card-person:empty { display: none; }
.ns-todo { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.ns-why { background: var(--ns-soft); border-radius: 12px; padding: 12px 14px; color: #174d2c; font-size: 15px; }
.ns-why b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.ns-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ns-actions .btn { border-radius: 12px; }
.ns-call { background: var(--blue); color: #fff; border-color: var(--blue); }
.ns-wa { background: #fff; color: #128c48; border: 1px solid #bfe6cc; }
.ns-done { background: var(--ns-ink); color: #fff; border-color: var(--ns-ink); }
.ns-done:hover, .ns-call:hover { color: #fff; }
.ns-later { margin: 14px 0 6px; color: var(--muted); font-size: 14px; }
.ns-later button { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; }
.ns-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 26px; color: var(--muted); cursor: pointer; display: none; }
.ns-team { margin-top: 26px; background: var(--card); border: 1px solid var(--ns-line); border-radius: 16px; padding: 12px 16px; }
.ns-team summary { cursor: pointer; font-weight: 700; }
.ns-sheet { position: fixed; inset: 0; background: rgba(12, 24, 17, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 60; }
.ns-sheet[hidden] { display: none; }
.ns-sheet-card { background: #fff; width: min(620px, 100%); border-radius: 22px 22px 0 0; padding: 24px 26px 26px; position: relative; max-height: 92vh; overflow: auto; }
.ns-sheet-card h2 { margin: 2px 0 14px; font-size: 26px; }
.ns-sheet-card .ns-close { display: block; }
.ns-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-chip { border: 1px solid var(--ns-line); border-radius: 99px; padding: 9px 14px; color: var(--ns-ink); font-weight: 600; background: #fff; cursor: pointer; font: inherit; font-weight: 600; }
.ns-chip.on { background: var(--ns-soft); border-color: var(--blue); color: #0f5f2d; }
.ns-sheet-card textarea { width: 100%; margin-top: 14px; border: 1px solid var(--ns-line); border-radius: 12px; padding: 12px; font: inherit; }
.ns-suggest { margin-top: 14px; background: #fafbfa; border: 1px dashed #cfe3d6; border-radius: 14px; padding: 14px 16px; }
.ns-next { margin: 4px 0 0; font-size: 17px; }
.ns-edit { display: grid; gap: 8px; margin-top: 10px; }
.ns-edit label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.ns-sheet-foot { margin: 14px 0 0; color: var(--muted); }
body.ns-noscroll { overflow: hidden; }
@media (max-width: 1100px) {
  .ns-split { grid-template-columns: 1fr; }
  .ns-side { display: none; position: fixed; inset: 0; z-index: 55; background: rgba(12, 24, 17, .45); padding: 16px; overflow: auto; }
  .ns-side.ns-open { display: block; }
  .ns-side .ns-card { max-width: 560px; margin: 24px auto; }
  .ns-card .ns-close { display: block; }
}
@media (max-width: 760px) {
  .ns-head h1 { font-size: 24px; }
  .ns-ring { width: 60px; height: 60px; }
  .ns-spacer { display: none; }
  .ns-row { grid-template-columns: 58px 10px minmax(0, 1fr); padding: 10px 12px; }
  .ns-row .ns-stage, .ns-row > em { display: none; }
  .ns-row .ns-btns { grid-column: 3; }
  .ns-side { padding: 0; }
  .ns-side .ns-card { margin: 0; min-height: 100%; border-radius: 0; }
  .ns-actions .btn { flex: 1 1 100%; }
  .ns-sheet-card { padding: 20px 16px 24px; }
}
@media (max-width: 1024px), (pointer: coarse) {
  .ns-ic, .ns-chip, .ns-later button, .ns-filter, .ns-count, .ns-close { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
}
/* Next steps: stronger rules so the general phone/touch button styles don't override these */
.ns-card .ns-card-top { padding-right: 36px; }
.ns-sheet-card .ns-chip { border: 1px solid #d5dde3; background: #fff; border-radius: 99px; padding: 9px 14px; color: #16202b; }
.ns-sheet-card .ns-chip.on { background: #e8f5ec; border-color: var(--blue); color: #0f5f2d; }
.ns-sheet-card .btn.ns-done, .ns-card .btn.ns-done { background: #16202b; color: #fff; border: 1px solid #16202b; }
.ns-card .btn.ns-call { background: var(--blue); color: #fff; border: 1px solid var(--blue); }
.ns-card .btn.ns-wa { background: #fff; color: #128c48; border: 1px solid #bfe6cc; }
@media (max-width: 760px) {
  .ns-counts { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding: 0 0 4px; scrollbar-width: none; }
  .ns-counts::-webkit-scrollbar { display: none; }
  .ns-count, .ns-filter { flex: none; white-space: nowrap; }
  .ns-row { grid-template-columns: 52px 8px minmax(0, 1fr) auto; gap: 10px; }
  .ns-row .ns-btns { grid-column: auto; }
  .ns-row time { font-size: 12px; line-height: 1.2; }
  .ns-sub { font-size: 14px; }
}
.ns-sheet-card textarea { border: 1px solid #d5dde3; background: #fff; }

/* ===== Edit in place (✎) — every page ===== */
.ef { display: inline-flex; align-items: baseline; gap: 4px; border-radius: 6px; position: relative; max-width: 100%; }
.ef-v { cursor: text; border-bottom: 1px dashed transparent; min-width: 0; overflow-wrap: anywhere; }
.ef:hover .ef-v { border-bottom-color: #b9c6bf; }
.ef-empty { color: #9aa6b2; font-weight: 400; font-style: italic; }
.ef-pen { background: none; border: 0; padding: 0 2px; color: #9aa6b2; font-size: .85em; cursor: pointer; line-height: 1; opacity: .7; }
.ef:hover .ef-pen, .ef-pen:focus { color: var(--blue); opacity: 1; }
.ef-input { font: inherit; font-size: 16px; padding: 4px 8px; border: 2px solid var(--blue); border-radius: 8px; min-width: 10rem; max-width: 100%; background: #fff; color: var(--text); }
textarea.ef-input { width: 100%; min-width: 16rem; }
.ef.ef-on { display: flex; width: 100%; }
.ef-saving { opacity: .6; }
.ef-saved .ef-v { background: var(--green-soft); transition: background .6s; }
.ef-msg { position: absolute; left: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid var(--red); color: var(--red); font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: normal; min-width: 14rem; }
.ef-msg.warn { border-color: var(--amber); color: var(--amber); }
.ef-link { color: var(--muted); }
@media (max-width: 1024px), (pointer: coarse) { .ef-pen { min-width: 44px; min-height: 44px; margin: -12px -10px -12px -6px; opacity: 1; } }

/* ===== Account page (company.php, redesign step 2; mock-up design/mockups/account.html) ===== */
.acct-crumbs { margin: 0 0 4px; color: var(--muted); }
.acct-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.acct-title { min-width: 0; }
.acct-top h1 { font-size: 30px; margin: 0; letter-spacing: -.02em; display: inline; }
.acct-tags { display: inline-flex; gap: 6px; vertical-align: middle; margin-left: 8px; flex-wrap: wrap; }
.acct-tag { font-size: 13px; font-weight: 700; border-radius: 99px; padding: 3px 10px; background: #eef1f5; color: #475569; }
.acct-tag.pri { background: #fde8e8; color: #b91c1c; }
.acct-sub { margin: 6px 0 0; color: var(--muted); }
.acct-update { flex: none; }
.journey { margin: 18px 0 20px; overflow-x: auto; }
.journey ol { list-style: none; display: flex; margin: 0; padding: 0; min-width: 900px; }
.journey li { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 22px; line-height: 1.25; }
.journey li::before { content: ''; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #dfe5e1; z-index: 1; }
.journey li::after { content: ''; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: #dfe5e1; }
.journey li:first-child::after { display: none; }
.journey li.past::before, .journey li.past::after, .journey li.now::after { background: var(--blue); }
.journey li.now { color: var(--text); font-weight: 700; }
.journey li.now::before { background: #fff; border: 3px solid var(--blue); width: 16px; height: 16px; margin-left: -8px; top: 4px; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.acct-next { margin-bottom: 18px; }
.acct-tabs { display: flex; gap: 6px; margin: 4px 0 12px; flex-wrap: wrap; }
.acct-tabs a { padding: 8px 14px; border-radius: 99px; color: var(--muted); font-weight: 600; text-decoration: none; }
.acct-tabs a span { font-size: 12px; background: #e9ede9; border-radius: 99px; padding: 0 7px; margin-left: 2px; }
.acct-tabs a.on { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.has-tabs .acct-panel { display: none; } .has-tabs .acct-panel.on { display: block; }
html:not(.has-tabs) .acct-tabs { display: none; }
.acct-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
.story { list-style: none; margin: 0; padding: 0; }
.story li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.story li:last-child { border-bottom: 0; }
.story time { color: var(--muted); font-size: 14px; font-weight: 700; } .story time small { display: block; font-weight: 500; }
.story p { margin: 4px 0; }
.story-note summary { cursor: pointer; list-style: none; margin-top: 4px; } .story-note summary::-webkit-details-marker { display: none; }
.story-note[open] summary { display: none; }
.story-open { color: var(--blue); font-weight: 600; white-space: nowrap; }
.acct-dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; margin: 0 0 12px; }
.acct-dl dt { color: var(--muted); font-weight: 600; } .acct-dl dd { margin: 0; }
.acct-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-bottom: 16px; }
.acct-box h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.person-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person-row:last-child { border-bottom: 0; }
.person-row > div:nth-child(2) { flex: 1; min-width: 0; } .person-row > div > b { display: block; } .person-row > div > span { display: block; color: var(--muted); font-size: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--green-soft); color: var(--blue-dark); font-weight: 700; display: grid; place-items: center; flex: none; font-size: 14px; }
.person-call { text-decoration: none; font-size: 18px; }
@media (max-width: 900px) { .acct-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .acct-top { flex-direction: column; } .acct-update { width: 100%; }
  .acct-top h1 { font-size: 24px; } .acct-tags { margin: 6px 0 0; display: flex; }
  .acct-dl { grid-template-columns: 1fr; gap: 2px 0; } .acct-dl dd { margin-bottom: 10px; }
}
@media (max-width: 1024px), (pointer: coarse) {
  .acct-crumbs a, .acct-tabs a, .ns-later a, .ef-link, .acct-panel p.small > a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
}

/* ===== Intelligence (intelligence.php, redesign step 3; mock-up design/mockups/intelligence.html) ===== */
.intel-beta { font-size: 12px; font-weight: 700; background: #efe9ff; color: #6d28d9; border-radius: 99px; padding: 3px 10px; vertical-align: middle; }
.intel-brief { background: linear-gradient(135deg, #0f2a1b, #1b4d31); color: #e8f5ec; border-radius: 20px; padding: 18px 24px; margin: 0 0 18px; }
.intel-brief h2 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #9fe0b5; }
.intel-brief ol { margin: 0; padding-left: 20px; } .intel-brief li { margin: 6px 0; font-size: 16px; }
.intel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.intel-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.intel-panel h2 { margin: 0 0 8px; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.intel-panel h2 span { font-size: 12px; background: #e9ede9; color: var(--muted); border-radius: 99px; padding: 0 8px; }
.intel-panel.warnp { background: #fffaf0; border-color: #f5dfb3; }
.intel-list { list-style: none; margin: 0; padding: 0; }
.intel-list li { padding: 10px 0; border-bottom: 1px solid var(--line); } .intel-list li:last-child { border-bottom: 0; }
.intel-list b { display: block; color: var(--text); } .intel-list span { display: block; color: var(--muted); font-size: 14px; }
.intel-go { font-size: 14px; font-weight: 700; color: var(--blue); }
@media (max-width: 1100px) { .intel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .intel-grid { grid-template-columns: 1fr; } }
@media (max-width: 1024px), (pointer: coarse) { .intel-go, .intel-list li > a:first-child, .intel-panel p.small > a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; } }

/* Reports (redesign step 4, 30 Sep 2026; mock-up design/mockups/reports.html) */
.rp-period { flex-wrap: wrap; }
.rp-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.rp-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.rp-kpi span { display: block; font-size: 13px; color: var(--muted); }
.rp-kpi b { display: block; font-size: 28px; line-height: 1.2; margin: 4px 0 2px; color: var(--text); }
.rp-kpi b.g { color: var(--blue); } .rp-kpi b.r { color: var(--brand-red); }
.rp-kpi em { display: block; font-style: normal; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rp-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.rp-panel.rp-wide { grid-column: 1 / -1; }
.rp-panel h2 { margin: 0 0 10px; font-size: 16px; }
.rp-panel h2.rp-sub { margin-top: 18px; }
.rp-bars { list-style: none; margin: 0; padding: 0; }
.rp-bars li { display: grid; grid-template-columns: minmax(0, 38%) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; }
.rp-bars li span { overflow-wrap: anywhere; }
.rp-bars li i { display: block; height: 12px; border-radius: 6px; background: #7fb896; min-width: 4px; }
.rp-bars li i.am { background: var(--blue); }
.rp-bars.g li i { background: var(--blue); } .rp-bars.r li i { background: var(--brand-red); opacity: .75; }
.rp-bars li b { min-width: 2.5em; text-align: right; }
.rp-weeks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; align-items: end; height: 150px; }
.rp-weeks div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 12px; }
.rp-weeks i { display: block; width: 70%; background: var(--blue); border-radius: 6px 6px 0 0; }
.rp-weeks span { color: var(--muted); white-space: nowrap; margin-top: 4px; }
.rp-stack { display: flex; border-radius: 10px; overflow: hidden; min-height: 34px; background: #e9ede9; }
.rp-stack i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; min-width: 0; }
.rp-stack .p1 { background: var(--brand-red); } .rp-stack .p2 { background: #e0913a; } .rp-stack .p3 { background: var(--blue); } .rp-stack .po { background: #9aa59d; }
@media (max-width: 1100px) { .rp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .rp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-grid { grid-template-columns: 1fr; } .rp-kpi b { font-size: 24px; } .rp-weeks span { font-size: 10px; } }
@media (max-width: 1024px), (pointer: coarse) { .rp-panel p.small > a { display: inline-flex; align-items: center; min-height: 44px; } }
.rp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; font-size: 14px; }
.rp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rp-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.rp-legend .p1 { background: var(--brand-red); } .rp-legend .p2 { background: #e0913a; } .rp-legend .p3 { background: var(--blue); } .rp-legend .po { background: #9aa59d; }

/* Account Tracker (tracker.php, 30 Sep 2026; REQUIREMENTS #168–172) */
.tk-tabs { flex-wrap: wrap; }
.tk-tabs .count.tk-count-on { background: var(--amber-soft); color: var(--amber); }
.tk-filters { flex-wrap: wrap; }
.tk-wrap { overflow-x: auto; max-width: 100%; }
.tk-table { font-size: 13px; }
.tk-table th { white-space: normal; }
.tk-table td { vertical-align: top; }
.tk-table { font-size: 12.5px; }
.tk-table th, .tk-table td { padding-left: 7px; padding-right: 7px; }
.tk-table td.tk-c { cursor: text; position: relative; min-width: 4.5rem; max-width: 15rem; padding-right: 14px; }
.tk-table td.tk-c:hover, .tk-table td.tk-c:focus { background: var(--blue-soft); outline: none; }
.tk-table td.tk-c:hover::after, .tk-table td.tk-c:focus::after { content: "✎"; position: absolute; top: 8px; right: 3px; font-size: 12px; color: var(--blue); }
.tk-table td.tk-c.tk-editing::after { content: none; }
.tk-table td[data-f="last_update"] { min-width: 10rem; }
.tk-table td[data-f="next_action"] { min-width: 8.5rem; font-weight: 600; }
.tk-last { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tk-table .badge.cat { white-space: normal; display: inline-block; line-height: 1.25; font-size: 11px; }
.tk-co { font-weight: 700; }
.tk-open { font-size: 12px; text-decoration: none; }
.tk-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.tk-need { color: var(--red); font-weight: 700; }
.tk-row.tk-missing td { background: var(--red-soft); }
.tk-row.tk-missing td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.tk-late .tk-v { color: var(--red); font-weight: 700; }
.tk-edit { white-space: nowrap; width: 1%; }
.tk-edit-btn { white-space: nowrap; padding: 4px 7px; font-size: 13px; }
.tk-ro { white-space: nowrap; color: var(--muted); }
.tk-days { display: inline-block; border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.tk-days-green { background: var(--green-soft); color: var(--green); }
.tk-days-amber { background: var(--amber-soft); color: var(--amber); }
.tk-days-red { background: var(--red-soft); color: var(--red); }
.tk-clip { background: none; border: 1px solid var(--line); border-radius: 99px; padding: 2px 7px; cursor: pointer; white-space: nowrap; font: inherit; }
.tk-clip:hover { border-color: var(--blue); background: var(--blue-soft); }
.tk-editor { display: flex; gap: 4px; align-items: center; min-width: 12rem; }
.tk-editor .tk-input { flex: 1 1 auto; min-width: 0; font-size: 13px; padding: 4px 6px; }
.tk-ok, .tk-no { flex: none; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-weight: 700; padding: 3px 7px; }
.tk-ok { color: #fff; background: var(--blue); border-color: var(--blue); }
.tk-no { color: var(--muted); }
.tk-saving { opacity: .6; }
.tk-table td.tk-bad, .tk-panel .tk-bad { box-shadow: inset 0 0 0 2px var(--red); background: var(--red-soft); }
.tk-row.tk-flash td { animation: tk-flash 1.2s ease-out; }
@keyframes tk-flash { from { background: #bbf7d0; } to { background: transparent; } }
.tk-wait-title { font-size: 17px; margin: 6px 0 10px; }
.tk-help { margin-top: 8px; }

.tk-shade { position: fixed; inset: 0; background: rgba(15, 42, 27, .35); z-index: 60; }
.tk-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--card); z-index: 61; box-shadow: -8px 0 30px rgba(0,0,0,.15);
            display: flex; flex-direction: column; }
.tk-panel[hidden], .tk-shade[hidden], .tk-ask[hidden], .tk-toast[hidden] { display: none; }
.tk-panel form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.tk-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tk-panel-head h2 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.tk-x { border: 0; background: none; font-size: 20px; cursor: pointer; min-width: 44px; min-height: 44px; }
.tk-panel-body { padding: 14px 18px; overflow-y: auto; flex: 1 1 auto; }
.tk-panel-foot { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); }
.tk-big { min-height: 48px; font-size: 16px; padding-left: 22px; padding-right: 22px; }
.tk-panel-foot .tk-big { flex: 1 1 0; }
.tk-more { margin: 6px 0 12px; }
.tk-more summary { cursor: pointer; color: var(--blue); font-weight: 600; min-height: 32px; }
.tk-prev { border: 1px solid #f5dfb3; background: #fffaf0; border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.tk-prev legend { font-weight: 700; padding: 0 4px; }
.tk-outcomes { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.tk-outcome { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; background: #fff; cursor: pointer; }
.tk-prev input[name="note"] { width: 100%; }
.tk-err { color: var(--red); font-weight: 700; }
.tk-drop { display: block; border: 2px dashed #b8d8c3; border-radius: 14px; padding: 22px 16px; text-align: center; cursor: pointer; background: #f6fbf8; margin: 4px 0 10px; }
.tk-drop.tk-drop-on, .tk-drop:hover, .tk-drop:focus { border-color: var(--blue); background: var(--blue-soft); outline: none; }
.tk-link { color: var(--blue); text-decoration: underline; }
.tk-file-msg { min-height: 1.2em; font-weight: 600; }
.tk-file { padding: 10px 0; border-bottom: 1px solid var(--line); }
.tk-file > a { font-weight: 600; overflow-wrap: anywhere; }
.tk-file .muted { display: block; }
.tk-file-acts { display: flex; gap: 14px; margin-top: 4px; font-size: 14px; }
.tk-ask { position: fixed; inset: 0; z-index: 70; background: rgba(15, 42, 27, .4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tk-ask-box { background: var(--card); border-radius: 18px; padding: 20px 22px; width: min(460px, 100%); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.tk-ask-box h2 { margin: 0 0 6px; font-size: 18px; }
.tk-ask .tk-outcomes .btn[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.tk-ask-note { width: 100%; margin-bottom: 12px; }
.tk-ask-btns { display: flex; gap: 10px; }
.tk-ask-btns .tk-big { flex: 1 1 0; }
.tk-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80; background: #0f2a1b; color: #e8f5ec; border-radius: 12px;
            padding: 12px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; gap: 14px; align-items: center; max-width: calc(100% - 32px); }
.tk-toast .link-button { color: #9fe0b5; font-weight: 700; text-decoration: underline; }
html.tk-locked, html.tk-locked body { overflow: hidden; }
@media (max-width: 760px) { .tk-panel { width: 100%; } }
@media (max-width: 1024px), (pointer: coarse) {
  .tk-back, .tk-clip, .tk-edit-btn, .tk-outcome, .tk-open, .tk-file-acts a, .tk-file-acts button, .tk-toast .link-button, .tk-more summary { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 1024px) {
  .tk-table.cards .tk-edit-btn { width: 100%; font-size: 16px; min-height: 48px; }
  .tk-table.cards td.tk-edit::before { content: none; }
  .tk-table.cards td.tk-c { padding-right: 0; max-width: none; cursor: pointer; }
  .tk-table.cards td.tk-c::after { content: none; }
  .tk-table.cards td.tk-edit { width: auto; order: 99; }
  table.wide.tk-table.cards tr { display: flex; flex-direction: column; }
}
/* The Tracker uses the whole screen width, so all 12 columns fit on a laptop */
.page:has(.tk-wrap) { max-width: none; padding-left: 16px; padding-right: 16px; }

/* AI Lab daily limits (#173–178): a used-up pool's buttons are grey with the message under them */
.ai-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ai-limited .btn, .ai-limited button, button.ai-limited, .ai-limited a.btn { opacity: .45; cursor: not-allowed; pointer-events: none; filter: grayscale(1); }
.ai-limit-msg { display: block; font-size: 12px; color: var(--amber); font-weight: 600; }
.ai-limit-msg[hidden] { display: none; }
.ai-saved .ai-btn { display: inline-flex; flex-direction: row; align-items: baseline; gap: 6px; }
.ai-left { font-weight: 600; color: var(--text); }

/* Simple mode (includes/simple.php, #179–186): one list, one button per item, big and calm */
.nav-form { margin: 0; }
.nav-link { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 10px 14px; border-radius: 10px; cursor: pointer; opacity: .85; }
.nav-link:hover { background: rgba(255,255,255,.08); opacity: 1; }
.nav-switch { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 10px; }
.nav-switch .nav-link { font-size: 13px; }
.topbar-spacer { flex: 1; }
.sm { max-width: 760px; }
.sm-head h1 { margin: 0; font-size: 28px; }
.sm-head p { margin: 2px 0 14px; }
.sm-grp { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 8px; display: flex; gap: 8px; align-items: center; }
.sm-grp span { font-size: 12px; background: #e9ede9; color: var(--muted); border-radius: 99px; padding: 1px 9px; letter-spacing: 0; }
.sm-grp.red { color: var(--red); } .sm-grp.red span { background: var(--red-soft); color: var(--red); }
.sm-grp.muted { color: var(--muted); }
.sm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sm-item { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.sm-item.late { border-color: #f3c4c4; box-shadow: inset 4px 0 0 var(--red); }
.sm-what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sm-co { font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.sm-co:hover { text-decoration: underline; }
.sm-act { color: var(--text); overflow-wrap: anywhere; }
.sm-when { font-size: 13px; color: var(--muted); }
.sm-item.late .sm-when { color: var(--red); font-weight: 700; }
.sm-update { flex: none; min-height: 48px; min-width: 104px; font-size: 16px; font-weight: 700; border-radius: 12px; }
.sm-empty { background: var(--green-soft); border-radius: 18px; padding: 22px; margin: 16px 0; }
.sm-big { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.sm-acct .sm-top { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-bottom: 14px; }
.sm-back { margin: 0 0 6px; font-size: 14px; }
.sm-acct h1 { margin: 0; font-size: 26px; overflow-wrap: anywhere; }
.sm-meta { margin: 4px 0 12px; }
.sm-next { display: flex; flex-direction: column; gap: 2px; background: #f6faf7; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.sm-next strong { font-size: 17px; }
.sm-next.late { background: var(--red-soft); }
.sm-next.late .sm-due b { color: var(--red); }
.sm-due { font-size: 14px; color: var(--muted); }
.sm-update.sm-big { width: 100%; min-height: 54px; font-size: 18px; }
.sm-bar { height: 10px; border-radius: 6px; background: #e3ebe5; overflow: hidden; }
.sm-bar i { display: block; height: 100%; background: var(--blue); }
.sm-progress p { margin: 4px 0 8px; }
.sm-timeline summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; }
.sm-timeline summary h2 { margin: 0; }
.sm-timeline summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.sm-timeline[open] summary::after { content: '▴'; }

.su { position: fixed; inset: 0; z-index: 75; background: rgba(15, 42, 27, .45); display: flex; align-items: flex-end; justify-content: center; }
.su[hidden] { display: none; }
.su-card { background: var(--card); width: min(520px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 18px 20px 26px; position: relative; }
@media (min-width: 761px) { .su { align-items: center; } .su-card { border-radius: 22px; } }
.su-x { position: absolute; top: 8px; right: 8px; border: 0; background: none; font-size: 26px; min-width: 44px; min-height: 44px; cursor: pointer; color: var(--muted); }
.su-for { margin: 0 44px 8px 0; }
.su h2 { font-size: 17px; margin: 14px 0 8px; }
.su-choices { display: flex; flex-direction: column; gap: 10px; }
.su-choice { min-height: 56px; font-size: 18px; font-weight: 700; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; text-align: left; padding: 0 18px; color: var(--text); }
.su-choice:hover, .su-choice:focus { border-color: var(--blue); background: var(--blue-soft); outline: none; }
.su-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.su-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border: 1px solid var(--line); border-radius: 99px; padding: 0 14px; cursor: pointer; background: #fff; }
.su-chip:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.su-chip input { margin: 0; }
.su textarea, .su-note { width: 100%; margin-top: 10px; }
.su-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-weight: 600; font-size: 14px; }
.su-field input, .su-field select { font-weight: 400; }
.su-save { width: 100%; min-height: 52px; font-size: 18px; margin-top: 12px; }
.su-err { color: var(--red); font-weight: 700; }
.su-foot { text-align: center; margin-top: 12px; }
.su-depts .su-chip { width: 100%; }
@media (max-width: 760px) {
  .sm-item { flex-wrap: wrap; }
  .sm-item .sm-update { width: 100%; }
}
@media (max-width: 1024px), (pointer: coarse) { .nav-link, .sm-back a, .su-foot .link-button, .su .link-button { min-height: 44px; display: inline-flex; align-items: center; } .nav-link { display: flex; } }
@media (max-width: 1024px), (pointer: coarse) { .sm-co { display: inline-flex; align-items: center; min-height: 44px; } }
.sm-convert { margin: 10px 0 0; } .sm-convert .btn { width: 100%; min-height: 48px; }
/* Simple mode on wide screens (owner, 30 Sep 2026: "lot of blank spaces"): the list is wider; an account page has
   two columns — what's next + timeline on the left, progress / contact / invoices / files on the right. On phones and
   tablets the wrappers disappear and the cards stack: top, progress, contact, invoices, files, timeline. */
.sm { max-width: 1000px; }
.sm.sm-acct { max-width: 1280px; display: flex; flex-direction: column; }
.sm-acct .sm-col-main, .sm-acct .sm-col-side { display: contents; }
.sm-acct .sm-top { order: 1; } .sm-acct .sm-col-side > * { order: 2; } .sm-acct .sm-timeline { order: 3; }
@media (min-width: 1100px) {
  .sm.sm-acct { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "main side" "time side"; grid-template-rows: auto 1fr; gap: 16px; align-items: start; }
  .sm-acct .sm-col-main { display: block; grid-area: main; }
  .sm-acct .sm-col-side { display: flex; flex-direction: column; gap: 16px; grid-area: side; }
  .sm-acct .sm-col-side > .card { margin: 0; }
  .sm-acct .sm-timeline { grid-area: time; margin: 0; }
  .sm-acct .sm-top { margin: 0; }
}
/* Log out and the view switch in the dark green menu: same colour as the menu links */
.mainnav .nav-link { color: #cfe5d7; font-weight: 500; padding: 9px 10px; border-left: 3px solid transparent; border-radius: 8px; opacity: 1; }
.mainnav .nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.mainnav .nav-switch { border-top-color: rgba(207, 229, 215, .25); }
.mainnav .nav-switch .nav-link { color: #9fe0b5; }

/* Account pulse + Revive or close (#187–190; mock-up design/mockups/pulse.html) */
.pl { max-width: 1280px; --moving: #15803d; --cooling: #d97706; --cold: #64748b; --stuck: #b91c1c; }
.pl-say { font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; margin: 4px 0 6px; }
.pl-say em { font-style: normal; color: var(--stuck); }
.pl-say span { color: var(--muted); font-weight: 600; }
.pl-meta { color: var(--muted); margin: 0 0 16px; }
.pl-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; margin: 0 0 22px; }
.pl-bar i { display: block; }
.pl-bar .moving, .pl-col.moving h3 b { background: var(--moving); } .pl-bar .cooling { background: var(--cooling); } .pl-bar .cold { background: var(--cold); } .pl-bar .stuck { background: var(--stuck); }
.pl-h { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.pl-pick { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; color: var(--text); text-decoration: none; }
.pl-pick:hover { border-color: var(--blue); text-decoration: none; }
.pl-pick-what { flex: 1; min-width: 0; } .pl-pick-what b { display: block; font-size: 16px; } .pl-pick-what span { display: block; color: #3b4652; font-size: 14px; overflow-wrap: anywhere; }
.pl-tag { flex: none; min-width: 84px; text-align: center; font-size: 12px; font-weight: 800; border-radius: 99px; padding: 3px 10px; }
.pl-tag.cold { background: #eef1f4; color: var(--cold); } .pl-tag.stuck { background: var(--red-soft); color: var(--stuck); } .pl-tag.customer { background: var(--green-soft); color: var(--green); }
.pl-go { color: var(--blue); font-weight: 700; font-size: 14px; flex: none; }
.pl-revive { margin: 14px 0 4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pl-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pl-col { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--cold); border-radius: 14px; padding: 12px; min-width: 0; }
.pl-col.moving { border-top-color: var(--moving); } .pl-col.cooling { border-top-color: var(--cooling); } .pl-col.stuck { border-top-color: var(--stuck); }
.pl-col h3 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.pl-col h3 b { font-size: 22px; background: none !important; }
.pl-col.moving h3 b { color: var(--moving); } .pl-col.cooling h3 b { color: var(--cooling); } .pl-col.cold h3 b { color: var(--cold); } .pl-col.stuck h3 b { color: var(--stuck); }
.pl-sub { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pl-chip { font-size: 12.5px; background: #f3f5f4; border-radius: 7px; padding: 3px 8px; color: var(--text); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-chip:hover { background: var(--blue-soft); text-decoration: none; }
.pl-star { color: #d97706; margin-right: 3px; } .pl-p1 { font-style: normal; font-weight: 800; color: var(--stuck); margin-left: 4px; font-size: 10px; }
@media (max-width: 1024px) { .pl-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pl-say { font-size: 21px; } .pl-board { grid-template-columns: 1fr; } .pl-pick { flex-wrap: wrap; } .pl-go { display: none; } }
@media (max-width: 1024px), (pointer: coarse) { .pl-chip { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; padding: 0 10px; } .pl-pick { min-height: 56px; } .rv-top a, .rv-skip .link-button { min-height: 44px; display: inline-flex; align-items: center; } }

.rv { max-width: 560px; }
.rv-top { margin: 0 0 6px; }
.rv-count { color: var(--muted); margin: 0 0 12px; } .rv-count b { color: var(--text); }
.rv-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; }
.rv-tag { font-weight: 800; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #64748b; }
.rv-card h1 { margin: 6px 0 2px; font-size: 26px; overflow-wrap: anywhere; } .rv-card h1 a { color: var(--text); }
.rv-note { background: #f5f7f6; border-radius: 12px; padding: 10px 12px; margin: 12px 0; color: #3b4652; font-size: 14px; overflow-wrap: anywhere; }
.rv-big { width: 100%; min-height: 52px; font-size: 17px; font-weight: 800; }
.rv-revive { margin-top: 14px; }
.rv-close { margin-top: 10px; } .rv-close summary { list-style: none; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rv-close summary::-webkit-details-marker { display: none; }
.rv-close[open] summary { margin-bottom: 10px; }
.rv-skip { text-align: center; margin-top: 10px; }
@media (max-width: 1024px), (pointer: coarse) { .rv-card h1 a { display: inline-flex; align-items: center; min-height: 44px; } }

/* Marketing like the CRM (#191–199): Marketing's colour is violet; warm is amber */
.sm-grp.mk { color: #6d28d9; } .sm-grp.mk span { background: #f1eafe; color: #6d28d9; }
.sm-grp.amber { color: #b45309; } .sm-grp.amber span { background: #fff4d6; color: #b45309; }
.sm-item.from-mk { border: 2px solid #dccbfb; background: #fbf8ff; }
.mk-kind { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #6d28d9; }
.mk-item.warm .mk-kind { color: #b45309; }
.mk-item .sm-co { font-size: 16px; }
.btn.mk-hand { background: #15803d; }
.mk .pl-say em { color: #6d28d9; }
.pl-col.mk-nurt { border-top-color: #6d28d9; } .pl-col.mk-nurt h3 b { color: #6d28d9; }
.pl-col.mk-warm { border-top-color: #d97706; } .pl-col.mk-warm h3 b { color: #d97706; }
.pl-col.mk-handed { border-top-color: #15803d; } .pl-col.mk-handed h3 b { color: #15803d; }
.pl-col.mk-won { border-top-color: #0f766e; } .pl-col.mk-won h3 b { color: #0f766e; }
.mk-grp { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 4px; }
.pl-tag.mk-warm { background: #fff4d6; color: #b45309; } .pl-tag.mk-new { background: #f1eafe; color: #6d28d9; } .pl-tag.mk-step { background: #eef1f4; color: #475569; }
@media (max-width: 1024px), (pointer: coarse) { .sm-head a, .pl-meta a { display: inline-flex; align-items: center; min-height: 44px; } }

/* Marketing as complete as Sales (#204–216) */
.mk-tabs { margin-bottom: 14px; }
.mk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.mk-row { display: flex; gap: 10px; } .mk-row .su-field { flex: 1 1 0; }
.mk-finish { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
.mk-later summary { cursor: pointer; list-style: none; min-height: 44px; }
.mk-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; flex-wrap: wrap; counter-reset: s; }
.mk-steps li { counter-increment: s; font-weight: 700; font-size: 14px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; }
.mk-steps li::before { content: counter(s) " · "; }
.mk-steps li.on { color: #fff; background: var(--blue); border-color: var(--blue); }
.mk-steps li.done { color: var(--blue); }
.mk-blocks { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.mk-block { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fafbfa; display: flex; flex-direction: column; gap: 6px; }
.mk-block-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mk-block-btns { display: flex; gap: 4px; } .mk-block-btns .link-button { min-width: 36px; min-height: 36px; font-size: 16px; }
.mk-preview { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 12px; background: #f4f6f5; }
.mk-review-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.mk-people li { padding: 4px 0; overflow-wrap: anywhere; }
@media (max-width: 1024px), (pointer: coarse) { .mk-block-btns .link-button, .mk-steps li a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; } }
.mk-email-row { border-top: 1px solid var(--line); padding: 10px 0; } .mk-email-row:first-of-type { border-top: 0; }
.mk-email-row p { margin: 0 0 6px; }
.mk-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); } .mk-stats b { color: var(--text); }
/* Marketing calendar (#212): a grid on wide screens, a day-by-day list on phones */
.mk-cal-nav { margin: 2px 0 0; } .mk-cal-nav a { font-weight: 600; }
.mk-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mk-cal-dow { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; padding: 4px 6px; }
.mk-cal-day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mk-cal-grid.week .mk-cal-day { min-height: 260px; }
.mk-cal-day.other { background: #f7f8f7; opacity: .7; } .mk-cal-day.today { border: 2px solid var(--blue); }
.mk-cal-n { font-size: 12px; font-weight: 800; color: var(--muted); }
.mk-cal-it { display: block; font-size: 12px; border-radius: 6px; padding: 2px 6px; text-decoration: none; color: var(--text); background: #eef2ef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-cal-it.task { background: #f1eafe; } .mk-cal-it.wait { background: #fff4d6; } .mk-cal-it.late { background: var(--red-soft); color: var(--red); font-weight: 700; }
.mk-cal-it.email { background: var(--blue-soft); } .mk-cal-it.camp { background: #e0f2fe; } .mk-cal-it.done { background: #f3f5f4; color: var(--muted); text-decoration: line-through; }
.mk-cal-key .mk-cal-it { display: inline-block; margin-right: 4px; }
.mk-cal-list { display: none; }
@media (max-width: 1024px), (pointer: coarse) { .mk-cal-grid { display: none; } .mk-cal-list { display: block; } .mk-cal-key { display: none; } }
@media (max-width: 1024px), (pointer: coarse) { .mk-cal-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; } }

.mk-page .ns-counts { flex-wrap: wrap; }

/* Email sequences + engagement score (#217–221) */
.mk-score { display: inline-block; font-size: 11px; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 99px; vertical-align: middle; white-space: nowrap; }
.mk-score-hot { background: #fff1e6; color: #c2410c; } .mk-score-warm { background: #fff4d6; color: #b45309; } .mk-score-cold { background: #eef1f4; color: #475569; }
h2 .mk-score { font-size: 12px; }
.pl-hot { font-style: normal; margin-left: 3px; font-size: 11px; }
.sq-step h2 { margin-top: 0; }
.sq-step summary { cursor: pointer; }
.sq-foot { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin: 4px 0 24px; }
.auth-legal { margin: 18px 0 0; text-align: center; font-size: 13px; } .auth-legal a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

/* Company page People (#234): click a name → all details, each with ✎ */
.person-more { border-bottom: 1px solid var(--line); }
.person-more:last-of-type { border-bottom: 0; }
.person-more > summary.person-row { border-bottom: 0; cursor: pointer; list-style: none; }
.person-more > summary::-webkit-details-marker { display: none; }
.person-sum { flex: 1; min-width: 0; } .person-sum > b { display: block; color: var(--blue-dark); } .person-sum > span { display: block; color: var(--muted); font-size: 14px; }
.person-open { color: var(--muted); font-size: 15px; padding: 2px 4px; }
.person-more[open] .person-open { color: var(--blue); }
.person-edit { margin: 0 0 6px 50px; }
.person-links { margin: 0 0 10px 50px; }
.tpl-pick select { max-width: 420px; } .tpl-manage { margin-left: 10px; }
@media (max-width: 1024px), (pointer: coarse) { .person-more > summary.person-row { min-height: 44px; } .person-links a, .tpl-manage { display: inline-flex; align-items: center; min-height: 44px; } }
.mk-bounce { margin-top: 10px; } @media (max-width: 1024px), (pointer: coarse) { .mk-bounce .link-button { min-height: 44px; } }
.compose-cc { margin: -4px 0 12px; } .compose-cc > summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; min-height: 32px; } @media (max-width: 1024px), (pointer: coarse) { .compose-cc > summary { min-height: 44px; } }
.compose-files { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 4px; margin: 0 0 14px; } .compose-files legend { font-weight: 600; padding: 0 4px; } .compose-files .check { display: flex; margin: 6px 0; }

/* Templates library (#243) */
.tpl-card .tpl-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tpl-card h2 { margin: 0 0 2px; }
.tpl-preview { white-space: normal; background: var(--bg, #f6f8f6); border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 15px; color: var(--ink, #16202b); }
.tpl-files a { display: inline-flex; align-items: center; min-height: 32px; margin-right: 4px; }
.tpl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.tpl-search { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; flex-wrap: wrap; } .tpl-search input { max-width: 360px; }
.tpl-people li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
@media (max-width: 1024px), (pointer: coarse) { .tpl-files a { min-height: 44px; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.fu-week b { color: var(--ink, #16202b); } .fu-week.good b { color: var(--green, #15803d); } .fu-week.low b { color: var(--red, #b91c1c); }

/* ---------- Plan and payment (pay.php, REQUIREMENTS #86–91) */
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; margin-top: 12px; }
.pay-label { margin: 14px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pay-label:first-child { margin-top: 0; }
.pay-big { margin: 0; font-size: 32px; font-weight: 700; }
.pay-code { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: .06em; color: var(--blue); }
.pay-months { margin-top: 10px; max-width: 260px; }
.pay-qr { text-align: center; }
.pay-qr img { width: 100%; max-width: 260px; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px; margin: 0 auto 8px; display: block; }
@media (max-width: 900px) { .pay-grid { grid-template-columns: 1fr; } }
.banner .banner-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; margin-left: 4px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 600; text-decoration: none; }
@media (max-width: 1024px), (pointer: coarse) { .banner .banner-btn { min-height: 44px; } }

/* Menu groups (owner brief 3 Oct 2026): Think · Act · Manage · Grow · Tools — quiet labels, not headings */
.nav-group { display: block; margin: 12px 10px 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(207, 229, 215, .5); }
.nav-group:first-child { margin-top: 2px; }
@media (max-width: 760px) { .nav-group { flex-basis: 100%; grid-column: 1 / -1; margin: 10px 10px 0; } .mainnav .nav-switch { grid-column: 1 / -1; } }
.page-q { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
/* Next Action card: "Why?" = the facts; "Last note" = what was written (owner brief 3 Oct 2026) */
.ns-note { margin-top: 8px; padding: 10px 14px; border-left: 3px solid var(--line); color: #3b4652; font-size: 14px; overflow-wrap: anywhere; }
.ns-note b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
/* Intelligence: Noticed → Why it matters → What to do (owner brief 3 Oct 2026) */
.intel-h { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.intel-h span { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.intel-kicker { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.intel-noticed { margin: 0 0 10px; font-size: 19px; font-weight: 700; line-height: 1.3; }
.intel-wwd { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 14.5px; }
.intel-wwd dt { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding-top: 2px; white-space: nowrap; }
.intel-wwd dd { margin: 0; }
.intel-clear { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.intel-clear span { border-bottom: 1px dotted var(--line); }
@media (max-width: 480px) { .intel-wwd { grid-template-columns: 1fr; } }
/* Attention: the exceptions first (owner brief 3 Oct 2026) */
.att-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.att-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 12px; padding: 10px 14px; }
.att-list li span { grid-column: 1; color: #3b4652; font-size: 14px; }
.att-list li em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; color: var(--muted); font-size: 13px; }
.att-ok { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.att-ok p { margin: 0; } .att-ok-big { font-size: 20px; font-weight: 700; margin-bottom: 4px !important; }
@media (max-width: 480px) { .att-list li { grid-template-columns: 1fr; } .att-list li em { grid-column: 1; grid-row: auto; } }
/* Reports: what changed this week (owner brief 3 Oct 2026) */
.rp-changed { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 0 0 16px; }
.rp-changed h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.rp-changed ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.rp-changed b { font-size: 20px; margin-right: 4px; } .rp-changed li.r b { color: var(--red); }
@media (max-width: 1024px), (pointer: coarse) { .att-list a { display: inline-flex; align-items: center; min-height: 44px; } }
/* Pulse: the one account that matters most today (owner brief 3 Oct 2026) */
.pl-first { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; display: grid; gap: 6px; justify-items: start; }
.pl-first p { margin: 0; }
.pl-first-name { font-size: 22px; font-weight: 700; line-height: 1.25; }
.pl-first-why { color: #3b4652; font-size: 16px; }
.pl-first-do { font-size: 15px; } .pl-first-do span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.pl-first .btn { margin-top: 6px; }
.pl-h-small { margin-top: 10px; }
/* Marketing sending safety (Phase 1) */
.mk-quota { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: var(--blue-soft); color: var(--blue-dark); font-size: 14px; font-weight: 600; }
.mk-own { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.mk-own summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Shared deal plan (Phase 2): rep page, deal card, notifications */
.topbar-note { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-weight: 700; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plan-link-row { display: flex; gap: 8px; flex-wrap: wrap; } .plan-link-row input { flex: 1; min-width: 220px; }
.plan-link-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.plan-req { border-left: 4px solid var(--amber); } .plan-req-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-st-done td { color: var(--muted); } .plan-st-current td:first-child input { font-weight: 700; }
.plan-done-us { margin: -4px 0 16px; }
.plan-events li, .notes-list li { padding: 6px 0; border-top: 1px solid var(--line); } .plan-events li:first-child, .notes-list li:first-child { border-top: 0; }
.notes-list li.unread { font-weight: 600; }
.ns-plan { display: inline-block; font-size: 12px; font-weight: 700; color: var(--blue-dark); background: var(--blue-soft); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }

/* Momentum (Phase 3): Hot / Steady / Cooling / Stalled */
.mo { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 9px; vertical-align: middle; }
.mo-hot { background: #e6f5ec; color: #146c35; } .mo-steady { background: #eef2f6; color: #3b4652; }
.mo-cooling { background: var(--amber-soft); color: var(--amber); } .mo-stalled { background: var(--red-soft); color: var(--red); }
.mo-why { display: block; font-size: 13px; color: #3b4652; margin-top: 2px; }
.mo-card h2 { display: flex; align-items: center; gap: 8px; }
.mo-push { margin-bottom: 14px; }
.mo-push-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mo-push-list li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 12px; padding: 10px 14px; }
.mo-push-list a { text-decoration: none; }
@media (max-width: 1024px), (pointer: coarse) { .mo-push-list a { display: inline-flex; align-items: center; min-height: 44px; } }
.stk-days { font-weight: 700; } .stk-amber { color: var(--amber); } .stk-red { color: var(--red); }
/* Stage plays (Phase 4) */
.play-step { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 4px; margin: 12px 0; }
.play-step legend { font-weight: 700; padding: 0 6px; }
.play-btns { display: flex; gap: 10px; } .play-btns form { margin: 0; }
.plan-send { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.plan-play { border-left: 4px solid var(--blue); }
/* Answers (Phase 5) */
.ans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.ans h2 { font-size: 17px; } .ans-big { font-size: 24px; font-weight: 700; margin: 4px 0 10px; } .ans-big span { font-size: 14px; font-weight: 500; color: var(--muted); }
.ans-exp { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; }
.digest-text { width: 100%; font-family: inherit; font-size: 15px; line-height: 1.5; }
@media (max-width: 480px) { .ans-grid { grid-template-columns: 1fr; } }
.filters input[type="date"] { flex: 0 1 180px; width: auto; min-width: 150px; }
/* Conversation funnel per campaign (Phase 6) */
.funnel { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.funnel li { background: var(--blue-soft); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.funnel li b { font-size: 22px; color: var(--blue-dark); } .funnel li span { font-size: 13px; font-weight: 600; } .funnel li em { font-style: normal; font-size: 12px; color: var(--muted); }
.revival summary, .dnd-skip summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dnd-skip { margin: 8px 0; padding: 4px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); }
@media (max-width: 760px) { .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Voice notes (Phase 7) */
.voice-pick { display: grid; gap: 8px; } .voice-pick form { margin: 0; }
.voice-pick-btn { width: 100%; text-align: left; display: grid; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 56px; font: inherit; cursor: pointer; }
.voice-pick-btn span { color: var(--muted); font-size: 14px; }
.voice-discard { margin: -6px 0 16px; }

/* ===== Company page = master record (owner, 3 Oct 2026; REQUIREMENTS #274; picture design/company-360/company.html) ===== */
.acct-health { margin: 6px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.health { font-size: 13px; font-weight: 700; border-radius: 99px; padding: 3px 10px; }
.health-moving { background: var(--green-soft); color: var(--green); }
.health-cooling { background: var(--amber-soft); color: var(--amber); }
.health-cold { background: #e8eef7; color: #335; }
.health-stuck { background: var(--red-soft); color: var(--red); }
.acct-money { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.acct-money div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; min-width: 150px; }
.acct-money b { display: block; font-size: 18px; } .acct-money b.won { color: var(--green); } .acct-money b.due { color: var(--amber); }
.acct-money span { font-size: 12px; color: var(--muted); }
.acct-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 0; }
.acct-others { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.acct-others h3, .acct-h3 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.acct-others h3 { margin-top: 0; }
.acct-others li { padding: 4px 0; }
.wait { color: var(--amber); font-weight: 600; }
.hist-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.hist-filters a { font-size: 13px; border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; color: var(--text); text-decoration: none; background: var(--card); }
.hist-filters a span { color: var(--muted); font-size: 12px; }
.hist-filters a.on { background: var(--blue); border-color: var(--blue); color: #fff; } .hist-filters a.on span { color: #dff3e6; }
.story li.story-next { background: var(--green-soft); border-radius: 10px; padding: 10px; border-bottom: 0; margin-bottom: 4px; }
.story li.story-empty { display: block; }
.stagebar { display: flex; gap: 2px; max-width: 260px; margin: 6px 0 2px; } .stagebar i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); } .stagebar i.d { background: var(--blue); }
.side-person { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.side-person:last-child { border-bottom: 0; } .side-person small { display: block; color: var(--muted); }
.mini-links { display: flex; gap: 4px; flex: none; } .mini-links a { font-size: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 3px 7px; text-decoration: none; color: var(--text); }
@media (max-width: 1024px), (pointer: coarse) {
  .hist-filters a, .mini-links a, .acct-others a, .side-person a, .company-records a, .acct-panel li > a, .acct-box .card-head a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
}
@media (max-width: 760px) {
  .acct-money div { flex: 1 1 140px; min-width: 0; }
}
/* Upload page: "What is in your file?" (REQUIREMENTS #272) */
.import-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.import-choice a { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; }
.import-choice a b { display: block; margin-bottom: 4px; } .import-choice a span { color: var(--muted); font-size: 14px; }
.import-choice a.on { border: 2px solid var(--blue); background: var(--green-soft); }
@media (max-width: 760px) { .import-choice { grid-template-columns: 1fr; } }

/* WhatsApp history (#277): a chat — the customer's messages on the left, ours on the right (WhatsApp's own greens). */
.wa-chat { background: #efeae2; border-radius: 12px; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; margin-bottom: 12px; }
.wa-day { text-align: center; margin: 6px 0 2px; }
.wa-day span { display: inline-block; background: #fff; color: var(--muted); font-size: 12px; border-radius: 8px; padding: 2px 10px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.wa-msg { max-width: 80%; border-radius: 10px; padding: 7px 10px 5px; box-shadow: 0 1px 1px rgba(0,0,0,.08); overflow-wrap: anywhere; }
.wa-msg p { margin: 0 0 2px; font-size: 14.5px; line-height: 1.4; }
.wa-msg.ours { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 3px; }
.wa-msg.theirs { align-self: flex-start; background: #fff; border-top-left-radius: 3px; }
.wa-meta { display: block; font-size: 11.5px; color: #667781; text-align: right; }
.wa-msg.theirs .wa-meta { text-align: left; }
.wa-empty { margin: 4px 0 12px; }
.wa-card > summary { cursor: pointer; list-style: none; }
.wa-card > summary::-webkit-details-marker { display: none; }
.wa-card > summary h2 { display: inline; }
.wa-log { margin-top: 4px; }

/* Service tickets (#278) */
.ticket-now.late { border-left: 4px solid var(--red); }
.ticket-due { font-size: 20px; font-weight: 700; margin: 2px 0 8px; }
.ticket-body { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 8px 0; white-space: normal; }
.ticket-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ticket-actions .inline-form, .ticket-list .inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 4px 6px 0 0; }
.ticket-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ticket-list li:last-child { border-bottom: 0; }
.ticket-new { margin-top: 12px; }
.ticket-new > summary { list-style: none; display: inline-flex; cursor: pointer; }
.ticket-new > summary::-webkit-details-marker { display: none; }
.ticket-new[open] > summary { margin-bottom: 10px; }
.status-tabs .tk-link { margin-left: auto; }
.copy-code { display: inline-block; max-width: 100%; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; overflow-wrap: anywhere; word-break: break-all; margin: 0 6px 6px 0; vertical-align: middle; }
@media (max-width: 760px) {
  .wa-msg { max-width: 92%; }
  .status-tabs .tk-link { margin-left: 0; }
}

/* Email / Tag People on a ticket (#280) */
.tag-group { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 8px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 0 18px; }
.tag-group legend { font-weight: 600; padding: 0 4px; }
.tag-group .check { margin: 8px 0 0; }

/* Templates → Moments (#281; picture design/moments/templates.html) */
.mo-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.mo-head h1 { margin: 0; }
.mo-head p { margin: 2px 0 0; }
.mo-head-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-disabled { opacity: .5; cursor: not-allowed; background: var(--card); color: var(--text); border: 1px solid var(--line); }
.mo-tabs { margin-bottom: 12px; }
.mo-for { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; padding: 9px 14px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mo-for.none { border-left-color: var(--amber); }
.mo-for .mo-change { flex-basis: 100%; }
.mo-for .mo-change[open] { padding-top: 6px; }
.mo-for .mo-change > summary { cursor: pointer; color: var(--blue); display: inline-block; }
.mo-for .inline-fields { margin: 6px 0 0; }
.mo-found li { padding: 4px 0; }
.mo-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.mo-list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.mo-toggle { display: flex; background: var(--bg); border-radius: 9px; padding: 3px; margin-bottom: 6px; }
.mo-toggle span { flex: 1; text-align: center; padding: 7px 4px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); }
.mo-toggle span.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.mo-toggle small { display: block; font-weight: 500; font-size: 11px; }
.mo-pick { display: none; }
.mo-group { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin: 12px 8px 4px; }
.mo-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border-radius: 8px; color: var(--text); }
.mo-row:hover { background: var(--bg); text-decoration: none; }
.mo-row.on { background: var(--green-soft); outline: 1px solid #bfe3cb; }
.mo-row b { display: block; font-size: 14px; }
.mo-row small { color: var(--muted); font-size: 12px; }
.mo-rate { font-size: 12px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.mo-rate.low { color: var(--amber); }
.mo-rate.none { color: var(--muted); font-weight: 500; }
.mo-sugg { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--blue); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.mo-card h2 { margin: 0; font-size: 21px; }
.mo-mhead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mo-mhead p { margin: 2px 0 0; }
.mo-pill { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; margin: 0 6px 4px 0; }
.mo-pill.p1 { background: var(--green-soft); color: var(--blue-dark); }
.mo-pill.p2 { background: #e0f2fe; color: #075985; }
.mo-opts { display: flex; gap: 10px; margin: 12px 0 4px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.mo-opts-r { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mo-opts-r .inline-form { display: inline-flex; margin: 0; }
.mo-seg, .mo-seg-row .mo-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; vertical-align: middle; }
.mo-seg a { padding: 5px 11px; font-size: 13px; font-weight: 600; color: var(--text); border-right: 1px solid var(--line); }
.mo-seg a:last-child { border-right: 0; }
.mo-seg a:hover { text-decoration: none; background: var(--bg); }
.mo-seg a.on { background: var(--blue); color: #fff; }
.mo-seg a.missing:not(.on) { color: var(--muted); font-weight: 500; }
.mo-note { background: var(--amber-soft); color: var(--amber); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.mo-note .inline-form { display: inline-flex; }
.mo-fill { border: 1px solid #fdba74; background: #fff7ed; border-radius: 10px; padding: 6px 14px 10px; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 0 14px; }
.mo-fill legend { font-weight: 600; color: #c2410c; padding: 0 4px; }
.mo-fill .field { margin: 6px 0 0; min-width: 180px; flex: 1; }
.mo-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.mo-ch { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; background: var(--card); }
.mo-ch h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.mo-ch h3 small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.mo-ch h3 small.over { color: var(--amber); font-weight: 700; }
.mo-txt { font-size: 14px; line-height: 1.55; flex: 1; overflow-wrap: anywhere; }
.mo-subj { font-weight: 700; font-size: 14px; margin: 0 0 6px; overflow-wrap: anywhere; }
.ph { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--green-soft); color: var(--blue-dark); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.ph.fill { background: transparent; color: var(--text); font-family: inherit; font-size: inherit; padding: 0; border-bottom: 1px dashed #9ccfaf; border-radius: 0; white-space: normal; }
.ph.empty { background: #ffedd5; color: #c2410c; outline: 1px solid #fdba74; }
.mo-blocked { font-size: 12px; color: #c2410c; margin: 6px 0 0; font-weight: 600; }
.mo-go { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.mo-line { font-size: 14px; padding: 7px 0; margin: 0; border-bottom: 1px dashed var(--line); }
.mo-line:last-of-type { border-bottom: 0; }
.mo-line b { display: inline-block; width: 46px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.mo-after { margin-top: 14px; background: var(--sidebar); color: #e7f3ec; border-radius: 12px; padding: 14px 18px; display: grid; grid-template-columns: auto 1fr 1fr; gap: 16px; align-items: center; }
.mo-after .t { font-weight: 700; color: #fff; }
.mo-after small { display: block; color: #9fc9b0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.mo-phs { margin: 10px 0 0; }
.mo-call { margin-top: 14px; }
.mo-call > summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.mo-lines { background: var(--bg); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.mo-lines-t { font-weight: 700; margin: 0 0 4px; }
.mo-edit h2 { font-size: 17px; margin: 18px 0 8px; }
.mo-edit h2:first-of-type { margin-top: 0; }
.mo-seg-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.mo-edit-more { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mo-set .card { margin-bottom: 14px; }
.mo-set .inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 2px 4px 2px 0; }
.na-moment { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.na-moment .inline-form { display: inline-flex; }
@media (max-width: 1024px), (pointer: coarse) {
  .mo-seg a { min-height: 44px; display: inline-flex; align-items: center; }
  .mo-row { min-height: 44px; }
  .mo-for .mo-change > summary, .mo-for > span > a { min-height: 44px; display: inline-flex; align-items: center; }
  .mo-call > summary { min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 1000px) {
  .mo-three { grid-template-columns: 1fr; }
  .mo-after { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  .mo-grid { grid-template-columns: 1fr; }
  .mo-list { padding: 8px; }
  .mo-list .mo-group, .mo-list .mo-row { display: none; }
  .mo-pick { display: flex; gap: 6px; align-items: center; }
  .mo-pick select { flex: 1; min-width: 0; }
  .js .mo-pick [data-mo-go] { display: none; }
  .mo-opts-r { margin-left: 0; }
}

/* ---------- Marketing Plays (REQUIREMENTS #285; picture design/moments/marketing-plays.html) */
.mo-toggle a { flex: 1; text-align: center; padding: 7px 4px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); }
.mo-toggle a:hover { text-decoration: none; color: var(--text); background: rgba(255, 255, 255, .6); }
.mp-who { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; background: var(--bg); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.mp-who > b { font-size: 22px; }
.mp-chip { font-size: 12px; border-radius: 999px; padding: 2px 9px; background: var(--card); border: 1px solid var(--line); }
.mp-chip.x { color: var(--red); border-color: #f5c2c2; }
.mp-who details { flex-basis: 100%; }
.mp-who details > summary { list-style: none; display: inline-flex; }
.mp-who details > summary::-webkit-details-marker { display: none; }
.mp-who .mp-list, .mp-who .mp-change { flex-basis: auto; }
.mp-who details[open] { flex-basis: 100%; }
.mp-people { columns: 2; column-gap: 24px; margin: 8px 0 0; max-height: 320px; overflow: auto; }
.mp-people li { break-inside: avoid; padding: 3px 0; }
.mp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mp-ch { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 8px 0 2px; }
.mp-start { margin-top: 14px; }
.mp-start-row { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; }
.mp-start-row .check { margin: 0; }
.mp-runs-h { margin: 18px 0 6px; font-size: 15px; }
.mp-home { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line);
           border-left: 4px solid var(--wa); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }
.mp-prog { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 6px 0 12px; }
.mp-prog i { display: block; height: 100%; background: var(--blue); }
.mp-run-h { font-size: 16px; margin: 16px 0 4px; }
.mp-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.mp-row:last-child { border-bottom: 0; }
.mp-row.now { background: #f6fbf8; border-radius: 8px; outline: 1px solid #bfe3cb; }
.mp-row.mp-sent { opacity: .45; }
.mp-n { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.mp-msg { margin: 4px 0 6px; font-size: 14px; color: #3b4652; overflow-wrap: anywhere; }
.mp-send .field { margin: 4px 0; }
.mp-row-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.mp-row-actions .inline-form { display: flex; }
.mp-row-actions .inline-form .btn, .mp-ref > summary { width: 100%; justify-content: center; }
.mp-ref > summary { list-style: none; }
.mp-ref > summary::-webkit-details-marker { display: none; }
.mp-ref[open] { min-width: 220px; }
.mp-kpi { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mp-kpi div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 110px; }
.mp-kpi b { display: block; font-size: 20px; }
.mp-kpi span { font-size: 12px; color: var(--muted); }
.mp-run-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mp-step-edit { margin: 10px 0; }
@media (max-width: 1024px), (pointer: coarse) {
  .mo-toggle a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .mp-people li a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 1000px) {
  .mp-steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .mp-row { grid-template-columns: 28px minmax(0, 1fr); }
  .mp-row-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .mp-row-actions .inline-form .btn, .mp-ref > summary { width: auto; }
  .mp-people { columns: 1; }
}
@media (max-width: 1024px), (pointer: coarse) { .mp-run-h a { min-height: 44px; display: inline-flex; align-items: center; } }

/* ---- Home styles (#286): the Briefing home + Compact display ---- */
.bf { max-width: 880px; margin: 0 auto; }
.home-briefing .page-q { display: none; }
.bf-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; }
.bf-menu-btn { display: none; }
.js .home-briefing .bf-menu-btn { display: inline-flex; align-items: center; }
.bf-switch { display: inline-flex; background: #eef2f5; border-radius: 10px; padding: 3px; font-size: 13px; font-weight: 600; margin-left: auto; }
.bf-switch span, .bf-switch a { padding: 6px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.bf-switch .on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.bf-switch a:hover { color: var(--text); }
.bf-back { font-size: 13px; font-weight: 600; margin-left: 8px; vertical-align: middle; }
.bf-hello { background: linear-gradient(135deg, var(--sidebar), #14532d); color: #fff; border-radius: 20px; padding: 24px 26px; }
.bf-hello h1 { margin: 0; font-size: 26px; letter-spacing: -.3px; color: #fff; }
.bf-hello p { margin: 4px 0 0; color: #cfe5d7; }
.bf-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px !important; font-size: 14px; color: #e7f3ec !important; }
.bf-stats b { color: #fff; }
.bf-stats .late b { color: #fca5a5; }
.bf-stats .fu-week, .bf-stats .fu-week b { color: #e7f3ec; }
.bf-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin-top: 16px; }
.bf-ch { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.bf-ch h2 { margin: 0; font-size: 17px; }
.bf-pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--green-soft); color: var(--green); }
.bf-list { list-style: none; margin: 0; padding: 0; }
.bf-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; margin-top: 10px; }
.bf-num { color: #9aa5b1; font-size: 13px; font-weight: 700; }
.bf-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-radius: 6px; padding: 2px 7px; background: #e0f2fe; color: #075985; max-width: 100%; overflow-wrap: anywhere; }
.bf-tag.late { background: var(--red-soft); color: var(--red); }
.bf-tag.amber { background: var(--amber-soft); color: var(--amber); }
.bf-what h3 { margin: 4px 0 2px; font-size: 16px; }
.bf-what h3 a { color: inherit; }
.bf-what p { margin: 0; color: var(--muted); font-size: 14px; }
.bf-what .bf-moment { margin-top: 3px; font-size: 13px; }
.bf-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; margin: 0; }
.bf-btns form { margin: 0; }
.bf-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.bf-empty { padding: 10px 2px 4px; }
.bf-big { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.bf-mail { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; margin-top: 10px; }
.bf-who { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.bf-who span { color: var(--muted); font-size: 12px; }
.bf-mail q { display: block; color: #374151; font-style: italic; margin: 4px 0 10px; overflow-wrap: anywhere; }
.bf-mail .bf-btns { justify-content: flex-start; }
.bf-nudges { list-style: none; margin: 6px 0 0; padding: 0; }
.bf-nudges li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.bf-nudges li:last-child { border-bottom: 0; }
.bf-nudges a { font-weight: 600; white-space: nowrap; }
.bf-full { display: block; text-align: center; background: #111827; color: #fff; border-radius: 14px; padding: 14px; font-weight: 700; margin-top: 18px; }
.bf-full:hover { color: #fff; text-decoration: none; background: #1f2937; }
.bf-change { text-align: center; }
/* Briefing on a laptop: the menu folds away behind "☰ Menu" (only with JavaScript; without it the normal menu stays) */
@media (min-width: 761px) {
  .js .home-briefing .sidebar { display: none; }
  .js .home-briefing.bf-menu-open .sidebar { display: block; position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: 230px; height: 100vh; overflow-y: auto; box-shadow: 4px 0 24px rgba(0, 0, 0, .25); }
}
@media (max-width: 760px) {
  .js .home-briefing .bf-menu-btn { display: none; } /* phones keep the normal Menu button at the top */
  .bf-hello { padding: 20px 18px; border-radius: 16px; }
  .bf-hello h1 { font-size: 22px; }
  .bf-card { padding: 14px 14px; }
  .bf-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bf-num { display: none; }
  .bf-btns { justify-content: flex-start; }
}
@media (max-width: 1024px), (pointer: coarse) {
  .bf-switch span, .bf-switch a { min-height: 44px; display: inline-flex; align-items: center; }
  .bf-what h3 a, .bf-moment a, .bf-nudges a, .bf-note a, .bf-back { min-height: 44px; display: inline-flex; align-items: center; }
}
/* Compact display (My Profile → Display): tighter spacing on a computer with a mouse; touch screens keep 44px targets */
@media (min-width: 1025px) and (pointer: fine) {
  .density-compact { font-size: 14px; }
  .density-compact .page { padding: 14px 20px 48px; }
  .density-compact .card { padding: 12px 14px; margin-bottom: 12px; }
  .density-compact .table th, .density-compact .table td { padding: 5px 8px; }
  .density-compact .mainnav a, .density-compact .mainnav .nav-link { padding: 6px 10px; }
  .density-compact .nav-group { margin-top: 8px; }
  .density-compact .ns-row { padding-top: 6px; padding-bottom: 6px; }
  .density-compact .ns-grp { margin-top: 14px; }
  .density-compact .page-head { margin-bottom: 10px; }
  .density-compact .bf-item { padding: 9px 12px; margin-top: 7px; }
  .density-compact .bf-card { padding: 14px 16px; margin-top: 12px; }
  .density-compact .bf-hello { padding: 18px 20px; }
  .density-compact h1 { font-size: 22px; }
}

/* Training videos (owner, 4 Oct 2026): training.php and the "Watch how this works" link next to each page's question */
.page-qrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 4px; }
.page-qrow .page-q { margin: 0; }
.page-video { font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.page-video:hover { border-color: var(--blue); background: var(--blue-soft); }
.training-toc { display: grid; gap: 6px; margin: 0 0 18px; }
.training-toc a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 600; }
.training-toc a:hover { border-color: var(--blue); }
.training-n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 13px; flex: none; }
.training-video { scroll-margin-top: 16px; }
.training-video h2 { margin: 2px 0 6px; }
.training-section { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--blue); }
.yt-thumb { position: relative; display: block; margin-top: 12px; border-radius: 12px; overflow: hidden; background: #0e1424; }
.yt-thumb img { display: block; width: 100%; height: auto; }
.yt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 48px; border-radius: 12px; background: rgba(204, 0, 0, .9); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.yt-thumb:hover .yt-play { background: #cc0000; }
.training-video video { display: block; width: 100%; height: auto; margin-top: 12px; border-radius: 12px; background: #0e1424; }
@media (max-width: 1024px), (pointer: coarse) { .page-video, .training-toc a { min-height: 44px; display: inline-flex; align-items: center; } .training-toc a { display: flex; } }

/* Internal Preview + Monthly Release (database 51): the staff-only preview tag, "What's new" for customers, Release Control */
.tag-preview { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #eceff3; color: #5b6573; font-size: 11px; font-weight: 600; vertical-align: middle; }
.whats-new { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; background: var(--blue-soft); border: 1px solid #bfe3cc; border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; }
.whats-new p { margin: 0; }
.wn-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.wn-title { font-weight: 700; margin-top: 2px !important; }
.wn-text { color: var(--text); margin-top: 2px !important; }
.wn-close .link-button { font-size: 16px; color: var(--muted); }
.rc-table td { vertical-align: top; }
.rc-table tr.rc-now td { background: #fffbea; }
.rc-details textarea { width: 100%; margin-bottom: 6px; font-size: 13px; }
.rc-details { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rc-details textarea[name=test_notes] { grid-column: 1; } .rc-details textarea[name=release_note] { grid-column: 2; }
@media (max-width: 1024px), (pointer: coarse) { .wn-close .link-button { min-width: 44px; min-height: 44px; } .rc-details { grid-template-columns: 1fr; } .rc-details textarea { grid-column: 1 !important; } }
.nav-group-ntc { text-transform: none; letter-spacing: .02em; } /* the NextToCome section keeps its name as written */

/* Settings: the tabs one under another on the left (owner, 5 Oct 2026) */
.settings-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.settings-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; }
.settings-nav a:hover { background: var(--bg); }
.settings-nav a.active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.settings-body { min-width: 0; }
@media (max-width: 1100px) { .settings-shell { grid-template-columns: 1fr; } .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 1024px), (pointer: coarse) { .settings-nav a { min-height: 44px; display: inline-flex; align-items: center; } }

/* Proposal Room (feature proposal_room) */
.proposal-card .proposal-row + .proposal-row { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.proposal-card .proposal-row.older { opacity: .85; }
.proposal-facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 10px; }
.proposal-facts dt { color: var(--muted); }
.proposal-facts dd { margin: 0; }
.proposal-link { width: 100%; margin-bottom: 6px; font-size: 13px; }
.proposal-card form.inline { display: inline; }
.proposal-more { margin-top: 8px; }
.proposal-preview { white-space: pre-wrap; word-wrap: break-word; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px; margin: 0; }
.proposal-answer { background: var(--blue-soft); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
/* Settings pages with their own side column (Plan and Payment, Company …): beside the Settings list there is not enough
   room for three columns, so the side column always goes underneath (owner screenshot of the payment page, 6 Oct 2026). */
.settings-body .grid-main { grid-template-columns: minmax(0, 1fr); }

/* Team spaces switcher (staff only until released; owner brief 8 Oct 2026): links on wide screens, a drop-down on phones */
.space-switch { display: inline-flex; gap: 4px; background: var(--blue-soft); border: 2px solid var(--blue); border-radius: 12px; padding: 4px; flex-shrink: 0; }
.space-switch a { padding: 10px 20px; border-radius: 9px; color: var(--blue); text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.space-switch a:hover { background: var(--card); }
.space-switch a.active { background: var(--blue); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.space-switch-phone { display: none; position: relative; }
.space-switch-phone summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; padding: 8px 14px; border-radius: 10px; background: var(--blue-soft); border: 2px solid var(--blue); color: var(--blue); white-space: nowrap; }
.space-switch-phone summary::-webkit-details-marker { display: none; }
.space-switch-phone summary::after { content: " ▾"; }
.space-switch-phone .menu { position: absolute; right: 0; top: 42px; z-index: 11; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 30, 50, .12); padding: 8px; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.space-switch-phone .menu a { padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.space-switch-phone .menu a.active { background: var(--blue-soft); color: var(--blue); }
@media (max-width: 1100px) { .space-switch { display: none; } .space-switch-phone { display: block; } }
@media (max-width: 1024px), (pointer: coarse) { .space-switch-phone summary, .space-switch-phone .menu a { min-height: 44px; display: flex; align-items: center; } }
.space-empty { text-align: center; padding: 34px 20px; }
.space-empty p:first-child { font-size: 17px; color: var(--text); margin-bottom: 14px; }
.health-why { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.health-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.health-dot.red { background: var(--red, #c8102e); } .health-dot.amber { background: #e0a100; } .health-dot.green { background: var(--blue); }
/* Customer Meetings (staff only until released) */
.week-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-day { background: var(--bg); border-radius: 8px; padding: 6px; min-height: 90px; }
.week-day.is-today { outline: 2px solid var(--blue); }
.week-day-name { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.week-item { display: block; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 6px; padding: 4px 6px; margin-bottom: 4px; font-size: 12px; color: var(--text); text-decoration: none; }
.week-item.done { border-left-color: var(--muted); opacity: .8; }
@media (max-width: 760px) { .week-cal { grid-template-columns: 1fr; } .week-day { min-height: 0; } }
.brief-item { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.brief-item:first-child { border-top: 0; }
.brief-tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; text-align: center; align-self: start; }
.brief-tag.raise { background: #fff2d6; color: #8a5a00; } .brief-tag.fix { background: #fde7e9; color: #a3101f; } .brief-tag.own { background: var(--blue-soft); color: var(--blue); }
.brief-tag.upsell { background: #e8f3ff; color: #1b5fa8; } .brief-tag.suggest { background: #f0ecfb; color: #5b3fa8; }
.point-check { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.point-check:first-child { border-top: 0; }
.point-check button { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); font-size: 18px; cursor: pointer; }
.point-check.done button { background: var(--blue); border-color: var(--blue); color: #fff; }
.point-check.done span { text-decoration: line-through; color: var(--muted); }
.step-row { display: grid; grid-template-columns: 110px 1fr 170px 150px; gap: 8px; align-items: end; padding: 6px 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .step-row { grid-template-columns: 1fr; } }
.people-pick { display: grid; grid-template-columns: 1fr 190px; gap: 6px 10px; align-items: center; }
.meet-lines li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.space-switch-phone .sp-short { display: none; }
@media (max-width: 420px) { .space-switch-phone .sp-long { display: none; } .space-switch-phone .sp-short { display: inline; } .topbar { gap: 8px; } }

/* Baton Map, simple view (8 Oct 2026): numbered steps, Edit opens one, switched-off steps folded away */
.bm-help summary, .bm-off summary { cursor: pointer; font-weight: 700; }
.bm-list { list-style: none; margin: 0 0 16px; padding: 0; counter-reset: none; }
.bm-cat { margin: 18px 0 8px; font-weight: 700; }
.bm-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; position: relative; }
.bm-step + .bm-step::before { content: ""; position: absolute; left: 30px; top: -9px; height: 8px; border-left: 2px solid var(--line); }
.bm-step:target { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.bm-row { display: flex; gap: 12px; align-items: flex-start; }
.bm-num { flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.bm-body { flex: 1; min-width: 0; }
.bm-stage { font-weight: 700; font-size: 16px; }
.bm-next { margin: 2px 0 4px; overflow-wrap: anywhere; }
.bm-meta { font-size: 14px; color: var(--muted); }
.bm-who { font-weight: 600; color: var(--blue); }
.bm-who.bm-wait { color: var(--text); }
.bm-tools { display: flex; gap: 6px; flex-shrink: 0; }
.bm-tools form { margin: 0; }
.bm-tools .btn[disabled] { opacity: .35; cursor: default; }
.bm-edit { margin: 8px 0 0 44px; }
.bm-edit > summary { list-style: none; display: inline-flex; }
.bm-edit > summary::-webkit-details-marker { display: none; }
.bm-edit[open] > summary { margin-bottom: 10px; }
.bm-edit > form { border-top: 1px solid var(--line); padding-top: 12px; }
.bm-more { margin: 4px 0 12px; }
.bm-more > summary { cursor: pointer; color: var(--blue); font-weight: 600; margin-bottom: 8px; }
.bm-add > summary { list-style: none; display: inline-flex; }
.bm-add > summary::-webkit-details-marker { display: none; }
.bm-add[open] > summary { margin-bottom: 12px; }
.bm-off-list { list-style: none; padding: 0; margin: 8px 0 0; }
.bm-off-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.bm-off-list form { margin: 0; flex-shrink: 0; }
@media (max-width: 760px) { .bm-edit { margin-left: 0; } .bm-step + .bm-step::before { display: none; } }

/* Videos playing on the page (assets/yt.js, 10 Oct 2026) */
.yt-box { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin-top: 12px; }
.yt-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-dialog { width: min(960px, 94vw); padding: 12px; border: 0; border-radius: 14px; background: #0e1424; }
.yt-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.yt-dialog .yt-box { margin-top: 8px; }
.yt-close { display: block; margin-left: auto; min-height: 40px; padding: 6px 14px; border: 0; border-radius: 8px; background: #fff; color: #111; font-weight: 700; cursor: pointer; }
