/* num-iD CRM Zero — one stylesheet, clean and airy. */

:root {
  --yellow: #F2DC14;
  --ink: #141414;
  --bg: #FAFAF8;
  --card: #FFFFFF;
  --border: #E4E4E0;
  --muted: #6B6B66;
  --link: #1A1A1A;
}

* { box-sizing: border-box; }

/* Something hidden stays hidden, whatever display its class gives it. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

/* --- Top bar ------------------------------------------------------------ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111111;
  border-bottom: 3px solid var(--yellow);
  padding: 14px 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img { display: block; }

.brand-title {
  color: var(--yellow);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.topnav { display: flex; align-items: center; gap: 16px; }
.topnav .who { color: #C9C9C4; font-size: 13px; }
.topnav .link-btn { color: #C9C9C4; }
.topnav .link-btn:hover { color: #FFFFFF; }

/* --- Layout ------------------------------------------------------------- */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 28px 64px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 14px; }
h3 { font-size: 14px; margin: 0; }

.page-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.breadcrumb { margin: 0 0 16px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }

/* --- Cards -------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.card.narrow { max-width: 480px; margin: 48px auto; }
.card.empty { color: var(--muted); text-align: center; padding: 48px 24px; }
.table-card { padding: 8px 0; }

.login-card { text-align: center; padding: 48px 32px; }
.login-card h1 { margin-top: 18px; }
.login-card form { margin-top: 22px; }

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

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 12px 18px;
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

tbody tr { border-bottom: 1px solid #F0F0EC; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #FCFCF6; }

td.num, th.num { text-align: right; }

.account-link { font-weight: 700; color: var(--link); text-decoration: none; }
.account-link:hover { text-decoration: underline; }

.subject-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-table input[type="text"] { width: 220px; }

/* --- Forms, buttons ----------------------------------------------------- */

input[type="text"], input[type="search"], textarea {
  font: inherit;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
}

input:focus, textarea:focus { outline: 2px solid var(--yellow); outline-offset: 0; }

textarea { width: 100%; resize: vertical; }

button, .btn {
  font: inherit;
  display: inline-block;
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
}

button:hover, .btn:hover { border-color: #BBBBB4; }

.btn-primary {
  background: var(--yellow);
  border-color: var(--yellow);
  font-weight: 700;
}
.btn-primary:hover { border-color: #D9C512; background: #EBD512; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
.link-btn:hover { color: var(--ink); }

.search { display: flex; gap: 8px; }
.search input { width: 300px; }

.inline-form { display: inline-flex; gap: 8px; align-items: center; }

.stacked-form { display: flex; flex-direction: column; gap: 8px; }
.stacked-form label { font-weight: 600; margin-top: 10px; }
.stacked-form .btn { margin-top: 18px; align-self: flex-start; }

.notes-form { margin-top: 18px; }
.notes-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.notes-form button { margin-top: 10px; }

.error { color: #A3271E; }

/* --- Account detail ----------------------------------------------------- */

.account-head-row { display: flex; align-items: baseline; gap: 14px; }

/* --- Interactions ------------------------------------------------------- */

.interaction {
  border-top: 1px solid #F0F0EC;
  padding: 18px 0;
}
.interaction:first-of-type { border-top: none; padding-top: 6px; }

.interaction-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.dir { font-weight: 700; font-size: 13px; }
.dir-out { color: #1F6B2F; }
.dir-in { color: #1E4FA3; }

.gmail-link { margin-left: auto; font-size: 13px; color: var(--muted); text-decoration: none; }
.gmail-link:hover { color: var(--ink); text-decoration: underline; }

.interaction-subject { font-weight: 700; margin-bottom: 8px; }

.body-preview, .body-full {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #333330;
}

details.body summary {
  list-style: none;
  cursor: pointer;
}
details.body summary::-webkit-details-marker { display: none; }

.body-preview {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
details.body[open] .body-preview { display: none; }

.expander { color: var(--muted); font-size: 13px; }
.expander::before { content: "Show full email ▾"; }
details.body[open] .expander::before { content: "Show less ▴"; }
.expander:hover { color: var(--ink); }

.fromto { margin: 8px 0 0; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }

a { color: var(--link); }

/* --- CRUD additions ---------------------------------------------------- */

.error-banner {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 14px 16px;
}

.delete-form { display: inline; margin: 0; }
.link-btn.danger { color: #b91c1c; }
.link-btn.danger:hover { color: #7f1d1d; }
.account-head-row .delete-form { margin-left: auto; }

.inline-form label {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.contact-row { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.contact-row input[name="name"]  { flex: 1 1 160px; }
.contact-row input[name="email"] { flex: 1.4 1 220px; }
.contact-row input[name="title"] { flex: 1 1 160px; }
.contact-actions { white-space: nowrap; text-align: right; }
.contact-actions a { margin-right: 8px; text-decoration: none; }

.add-contact { margin-top: 14px; }
.add-contact summary { cursor: pointer; color: var(--link); font-size: 14px; }
.add-contact form { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.add-contact input[name="email"] { flex: 1.4 1 220px; }

/* --- Selects ------------------------------------------------------------- */

select {
  font: inherit;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 10px;
}
select:focus { outline: 2px solid var(--yellow); outline-offset: 0; }

/* The accounts list needs room for its columns: on a wide screen it takes it,
   so every column (Last activity included) shows without scrolling sideways. */
.container:has(#filters) { max-width: 1720px; }

/* --- Filter bar ---------------------------------------------------------- */

.filters.card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.filter-label {
  width: 84px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Toggle chips: a hidden checkbox followed by its label. */
.chip-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s, opacity 0.12s;
}
.chip:hover { border-color: #BBBBB4; }

.chip-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #F0F0EC;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.chip.is-empty { opacity: 0.45; }

.chip-input:focus-visible + .chip { outline: 2px solid var(--yellow); outline-offset: 2px; }

.chip-input:checked + .chip {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
  opacity: 1;
}
.chip-input:checked + .chip .chip-count { background: rgba(255, 255, 255, 0.18); color: #FFFFFF; }

/* Priority chips: coloured dot when off, coloured fill when on. */
.chip-pri::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pri);
}
.chip-p0 { --pri: #7F1D1D; }
.chip-p1 { --pri: #DC2626; }
.chip-p2 { --pri: #D97706; }
.chip-p3 { --pri: #2563EB; }
.chip-input:checked + .chip-pri { background: var(--pri); border-color: var(--pri); }
.chip-input:checked + .chip-pri::before { background: rgba(255, 255, 255, 0.85); }

.chip-owner { padding-left: 6px; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.filter-row-tools { padding-top: 14px; border-top: 1px solid #F0F0EC; }

.filter-search { flex: 1 1 240px; min-width: 200px; }

.sort { display: inline-flex; align-items: center; gap: 8px; }

.filter-links { display: flex; gap: 18px; margin-left: auto; }
.filter-links a { color: var(--muted); font-size: 13.5px; text-decoration: none; }
.filter-links a:hover { color: var(--ink); text-decoration: underline; }

/* --- Multi-select dropdowns (native <details>) --------------------------- */

.ms { position: relative; }

.ms > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #FFFFFF;
  cursor: pointer;
  user-select: none;
}
.ms > summary::-webkit-details-marker { display: none; }
.ms > summary::after { content: "▾"; color: var(--muted); font-size: 12px; }
.ms > summary:hover { border-color: #BBBBB4; }
.ms[open] > summary, .ms.ms-active > summary { border-color: var(--ink); }

.ms-label { color: var(--muted); }
.ms-value {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.ms-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 260px;
  padding: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(20, 20, 20, 0.12);
}

.ms-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.ms-option:hover { background: #F6F6F2; }
.ms-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.ms-option.is-empty { opacity: 0.45; }
.ms-text { flex: 1; }
.ms-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.ms-actions {
  margin-top: 6px;
  padding: 10px 12px 4px;
  border-top: 1px solid #F0F0EC;
  text-align: right;
}

/* --- Results table ------------------------------------------------------- */

.results-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }

#results { transition: opacity 0.15s; }
#results.is-loading { opacity: 0.55; }

.table-scroll { overflow-x: auto; overflow-y: hidden; }   /* sideways only: no inner vertical bar */
.accounts-table { min-width: 1060px; }
.accounts-table th, .accounts-table td { padding: 12px 10px; }
.accounts-table th:first-child, .accounts-table td:first-child { padding-left: 16px; }
.accounts-table th:last-child, .accounts-table td:last-child { padding-right: 16px; }
.accounts-table td { vertical-align: middle; }
.acc-cell { min-width: 190px; }
/* A long contact email is cut (full address on hover), never widens the column. */
.acc-cell .main-contact-line { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }

.status-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
@media (max-width: 1440px) { .status-cell { max-width: 150px; } }
@media (min-width: 1081px) and (max-width: 1300px) {
  .accounts-table th, .accounts-table td { padding-left: 7px; padding-right: 7px; }
  .acc-cell { min-width: 160px; }
  .acc-cell .main-contact-line { max-width: 180px; }
  .status-cell { max-width: 110px; }
}
@media (min-width: 1800px) { .status-cell { max-width: 260px; } }

.no-domain { color: #B45309; }

.pri {
  display: inline-block;
  min-width: 36px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.pri-p0 { background: #7F1D1D; }
.pri-p1 { background: #DC2626; }
.pri-p2 { background: #D97706; }
.pri-p3 { background: #2563EB; }

.prod-list { display: flex; flex-wrap: wrap; gap: 6px; }

.prod, .fr {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.prod-hlr { background: #E0F2FE; color: #075985; border-color: #BAE6FD; }
.prod-mnp { background: #EDE9FE; color: #5B21B6; border-color: #DDD6FE; }
.prod-gnr { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.prod-tbd { background: #F3F4F6; color: #4B5563; border-color: #E5E7EB; }

.fr-low { background: #DCFCE7; color: #166534; }
.fr-medium { background: #FEF3C7; color: #92400E; }
.fr-high { background: #FEE2E2; color: #991B1B; }
.fr-blocked { background: #1F2937; color: #FFFFFF; }
.fr-tbd { background: #F3F4F6; color: #4B5563; }

.owner { display: inline-flex; align-items: center; gap: 8px; }

/* --- Account detail: commercial facts + edit grid ------------------------ */

.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 4px; }

.kv { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 14px 0 6px; }
.kv div { min-width: 120px; }
.kv dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.kv dd { margin: 2px 0 0; font-weight: 600; }

.edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 14px 0 18px;
  padding: 18px;
  background: #FAFAF6;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.edit-grid[hidden] { display: none; }
.edit-grid > label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.edit-grid input, .edit-grid select { width: 100%; }
.edit-grid fieldset { margin: 0; padding: 0; border: none; }
.edit-grid legend { margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.edit-wide { grid-column: 1 / -1; }
.edit-actions { display: flex; align-items: center; gap: 16px; }

.stacked-form select { width: 100%; }

@media (max-width: 720px) {
  .filter-label { width: 100%; }
  .filter-links { margin-left: 0; }
  .edit-grid { grid-template-columns: 1fr; }
}

/* --- Domains + merge ----------------------------------------------------- */

.domains-help { margin: -6px 0 12px; }

.domain-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.domain-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #FAFAF6;
}
.domain-name { font-weight: 600; }
.domain-list .link-btn { font-size: 17px; line-height: 1; padding: 0 4px; }

.domain-add input[name="domain"] { width: 320px; max-width: 100%; }

.merge-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid #F0F0EC; }
.merge-box summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.merge-box summary:hover { color: var(--ink); }
.merge-box p { margin: 10px 0; }
.merge-box input[name="target"] { width: 360px; max-width: 100%; }

.via {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: #F3F0FF;
  color: #4C3D99;
}

/* --- Executive summary --------------------------------------------------- */

.summary-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.summary-head h2 { margin: 0; }
.summary-regen { margin-left: auto; }

.summary-headline { margin: 0 0 8px; font-size: 16px; font-weight: 700; line-height: 1.45; }
.summary-text { margin: 0; font-size: 14.5px; line-height: 1.65; max-width: 78ch; }
.summary-sub {
  margin: 18px 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.next-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.next-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FAFAF6;
}
.next-steps li > span:nth-child(2) { flex: 1; }
.next-steps .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.st {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.st-new { background: #E0F2FE; color: #075985; }
.st-progressing { background: #DCFCE7; color: #166534; }
.st-stalling { background: #FEF3C7; color: #92400E; }
.st-dormant { background: #F3F4F6; color: #4B5563; }
.st-live { background: #14532D; color: #FFFFFF; }
.st-lost { background: #FEE2E2; color: #991B1B; }

.last-cell .st { margin-top: 4px; }

.summary-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #FFFBEB;
  color: #92400E;
  font-size: 13.5px;
}

.summary-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; }
.summary-cols .summary-sub { margin-top: 10px; }
@media (max-width: 860px) { .summary-cols { grid-template-columns: 1fr; } }

/* --- Sortable headers ---------------------------------------------------- */

.accounts-table th { white-space: nowrap; }
.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.sort-link:hover { color: var(--ink); }
.sort-ind { font-size: 11px; opacity: 0.35; }
th.sorted { color: var(--ink); }
th.sorted .sort-ind { opacity: 1; }
th.num .sort-link { flex-direction: row-reverse; }

/* --- Internal team emails ---------------------------------------------- */

.dir-internal { color: #6B6B66; }
.interaction-internal {
  background: #F7F7F4;
  border-radius: 10px;
  padding: 14px 16px;
  margin-left: -16px;
  margin-right: -16px;
}

/* --- Top navigation ------------------------------------------------------ */

.mainnav { display: flex; gap: 6px; margin-left: 32px; margin-right: auto; }
.mainnav a {
  padding: 7px 14px;
  border-radius: 7px;
  color: #C9C9C4;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.mainnav a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.06); }
.mainnav a.active { color: var(--ink); background: var(--yellow); }

/* --- Weekly review: agenda ----------------------------------------------- */

.container:has(.review-table), .container:has(.focus-nav) { max-width: 1320px; }
.review-sub { margin: 0; }
.review-filters .filter-row { gap: 14px; }
.review-owner-label { width: auto; margin-left: 16px; }

.review-table td { vertical-align: middle; }
.review-row { cursor: pointer; }
.review-prods { margin-top: 6px; }

.section-row td {
  padding: 16px 14px 10px;
  background: #FAFAF6;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.section-row .pri { margin-right: 8px; }

.imp { width: 110px; height: 8px; border-radius: 999px; background: #EFEFEA; overflow: hidden; }
.imp span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }

.silence { font-weight: 600; }
.silence-amber { color: #B45309; }
.silence-red { color: #B91C1C; }

.situation { min-width: 280px; max-width: 460px; }
.situation .st { margin-right: 6px; }
.situation .headline { font-size: 13.5px; }

/* --- Weekly review: presenter mode --------------------------------------- */

.focus-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: -8px 0 18px;
  padding: 12px 0;
  background: var(--bg);
}
.focus-progress { display: flex; align-items: center; gap: 12px; flex: 1; }
.focus-bar { flex: 1; max-width: 320px; height: 6px; border-radius: 999px; background: #E8E8E3; overflow: hidden; }
.focus-bar span { display: block; height: 100%; background: var(--yellow); }
.focus-arrows { display: flex; gap: 10px; }

.focus-title { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.focus-title h1 { margin: 0; font-size: 30px; }
.focus-title .pri { font-size: 14px; padding: 6px 12px; }
.focus-open { margin-left: auto; }
.focus-kv dd { font-size: 16px; }

.focus-summary .summary-text { font-size: 15.5px; }
.focus-headline { font-size: 19px; }

.focus-emails { list-style: none; margin: 0; padding: 0; }
.focus-emails li { border-bottom: 1px solid #F0F0EC; }
.focus-email > summary {
  list-style: none;
  display: grid;
  grid-template-columns: 24px 110px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: 7px;
  cursor: pointer;
}
.focus-email > summary::-webkit-details-marker { display: none; }
.focus-email > summary:hover { background: #F6F6F2; }
.focus-email[open] > summary { background: #FFFBDB; }
.focus-email[open] .focus-email-subj { white-space: normal; font-weight: 700; }
.focus-email-body { padding: 4px 0 16px 36px; }
.focus-email-meta { margin: 6px 0 10px; }
.focus-email-text {
  max-height: 60vh;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.6;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFFFF;
}
.focus-all-emails { margin: 14px 0 0; }
.focus-emails li:last-child { border-bottom: none; }
.focus-emails li.is-internal { color: var(--muted); }
.focus-email-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-keys { text-align: center; }

@media (max-width: 720px) {
  .focus-nav { flex-wrap: wrap; }
  .focus-email > summary { grid-template-columns: 24px 1fr; }
  .focus-email > summary > :nth-child(2), .focus-email > summary > :nth-child(4) { display: none; }
  .focus-email-body { padding-left: 0; }
}

/* --- Weekly review: progress, reviewed marks, call panel ----------------- */

.week-progress { display: flex; align-items: center; gap: 14px; margin: -6px 0 18px; }
.week-progress .focus-bar { max-width: 360px; }
.hide-reviewed { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13.5px; color: var(--muted); cursor: pointer; }

.done-col { width: 44px; text-align: center; white-space: nowrap; }
.done-mark { color: #15803D; font-weight: 800; }
.note-mark { font-size: 13px; margin-left: 2px; }
.review-row.is-reviewed td { background: #F7FBF6; }

.focus-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.focus-main > .card:last-child { margin-bottom: 0; }
.call-panel { position: sticky; top: 76px; }
.call-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.call-head h2 { margin: 0; }
.call-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.call-card textarea { min-height: 220px; font-size: 14.5px; line-height: 1.55; }
.call-status { min-height: 20px; margin: 6px 0 12px; }
.call-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.call-actions .btn-primary { margin-left: auto; }
#toggle-reviewed.is-on { background: #DCFCE7; border-color: #86EFAC; color: #166534; font-weight: 700; }

.earlier-note { padding: 12px 0; border-top: 1px solid #F0F0EC; }
.earlier-note:first-of-type { border-top: none; padding-top: 4px; }
.earlier-note p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.55; }

@media (max-width: 1080px) {
  .focus-grid { grid-template-columns: 1fr; }
  .call-panel { position: static; }
}

/* --- Weekly review: tabs ------------------------------------------------- */

.container:has(.review-tabs) { max-width: 1320px; }
.review-tabs { display: flex; gap: 4px; margin: 0 0 22px; border-bottom: 1px solid var(--border); }
.review-tabs a {
  padding: 10px 16px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.review-tabs a:hover { color: var(--ink); }
.review-tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }

/* --- Pre-meeting notes --------------------------------------------------- */

.prep-card { background: #FFFDF0; border-color: #F1E6A6; }
.prep-card.prep-empty { background: var(--card); border-color: var(--border); }
.prep-card h2 { margin: 0; }
.prep-text { margin: 8px 0 0; white-space: pre-wrap; font-size: 15px; line-height: 1.6; }

.prep-count { margin-left: auto; font-size: 13.5px; color: var(--muted); }
.prep-section { margin: 26px 0 12px; }
.prep-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; }
.prep-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.prep-facts { margin-top: 4px; }
.prep-headline { margin: 10px 0 6px; font-weight: 600; line-height: 1.45; }
.prep-steps { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: #3D3D3A; }
.prep-editor textarea { width: 100%; min-height: 150px; font-size: 14.5px; line-height: 1.55; }
.prep-status { min-height: 18px; margin-top: 6px; }

/* --- Calendar ------------------------------------------------------------ */

.cal-month { margin: 26px 0 12px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cal-week {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.cal-week:hover { border-color: #BBBBB4; box-shadow: 0 4px 14px rgba(20, 20, 20, 0.06); }
.cal-week.is-current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-num { font-weight: 800; font-size: 15px; }
.cal-dates { font-size: 14px; color: #3D3D3A; }
.cal-stats { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); }
.cal-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #F3F4F6;
  color: #4B5563;
  white-space: nowrap;
}
.cal-badge.live { background: var(--yellow); color: var(--ink); }
.cal-badge.closed { background: #E0F2FE; color: #075985; }
.cal-badge.pending { background: #FEF3C7; color: #92400E; }

/* --- Week view ----------------------------------------------------------- */

.week-nav { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.week-nav-title { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.week-nav-title h1 { margin: 0; }
.week-totals { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; margin: 0 0 18px; font-size: 14px; }
.pri.pri-sm { min-width: 0; padding: 2px 7px; font-size: 11px; margin-left: 6px; }
.week-notes { margin-bottom: 0; }
.week-notes .card { margin-bottom: 24px; }

@media (max-width: 860px) {
  .prep-item { grid-template-columns: 1fr; }
}

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

.week-nav-spacer { width: 140px; }
.kpis { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.kpi-value { font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-of { font-size: 18px; font-weight: 600; color: var(--muted); }
.kpi-label { margin-top: 4px; font-size: 13px; color: var(--muted); }
.kpi-main { border-color: var(--ink); }
.kpi-main .kpi-value { font-size: 34px; }
.kpi-bar { max-width: none; margin-top: 10px; height: 8px; }
.kpi-warn .kpi-value { color: #B91C1C; }

.wk-breakdowns, .wk-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.wk-breakdowns .card, .wk-lists .card { margin-bottom: 16px; }
.wk-owner-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wk-owner-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 8px 8px 0; }
.wk-owner-table td { padding: 8px 8px 8px 0; border-top: 1px solid #F0F0EC; }
.wk-owner-table .num { text-align: right; }
.wk-cov, .wk-prio { display: flex; align-items: center; gap: 10px; }
.wk-cov .imp { width: 90px; }
.wk-prio { padding: 8px 0; border-top: 1px solid #F0F0EC; font-size: 14px; }
.wk-prio:first-of-type { border-top: 0; }
.wk-prio .muted { flex: 1; }
.wk-live-note { margin: 12px 0 0; }

.wk-list h2 { margin-bottom: 2px; }
.wk-list > p.small { margin-top: 0; }
.wk-missed { border-left: 4px solid #DC2626; }
.wk-covered { border-left: 4px solid #16A34A; }
.wk-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 6px;
  border-top: 1px solid #F0F0EC;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
}
.wk-row:hover { background: #F7F7F3; }
.wk-pos { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.wk-name { min-width: 0; }
.wk-name strong { font-weight: 600; }
.wk-icons { margin-left: 4px; font-size: 13px; }
.wk-headline { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-rev { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }

.cov-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cov-yes { background: #DCFCE7; color: #166534; }
.cov-no { background: #FEE2E2; color: #991B1B; }

@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi-main { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .wk-breakdowns, .wk-lists { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .week-nav-spacer { display: none; }
}

/* --- Tasks ---------------------------------------------------------------- */

.nav-count {
  display: inline-block;
  min-width: 20px;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.mainnav a.active .nav-count { background: rgba(20, 20, 20, 0.12); color: var(--ink); }
.nav-count.is-late, .mainnav a.active .nav-count.is-late { background: #DC2626; color: #FFFFFF; }

.container:has(.tasks-layout) { max-width: 1280px; }
.tasks-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.task-filters .filter-label { width: 96px; }
.task-filters .filter-row { flex-wrap: nowrap; align-items: flex-start; }
.task-filters .filter-row .filter-label { padding-top: 9px; }
.task-filters .filter-row > .chips { flex: 1; min-width: 0; }
.task-filters .filter-row > .muted { padding-top: 9px; white-space: nowrap; }
.tasks-side { position: sticky; top: 76px; }
.task-group { padding: 18px 20px 10px; }
.task-group-title { margin-bottom: 6px; }
.task-group-title.due-over { color: #B91C1C; }

.task-list { list-style: none; margin: 0; padding: 0; }
.task {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  border-top: 1px solid #F0F0EC;
}
.task-list .task:first-child { border-top: 0; }
.task-check { position: relative; display: inline-flex; width: 22px; height: 22px; cursor: pointer; }
.task-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.task-box {
  width: 22px;
  height: 22px;
  border: 2px solid #BBBBB4;
  border-radius: 6px;
  background: #FFFFFF;
  transition: background 0.12s, border-color 0.12s;
}
.task-check:hover .task-box { border-color: var(--ink); }
.task-check input:focus-visible + .task-box { outline: 2px solid var(--yellow); outline-offset: 2px; }
.task-check input:checked + .task-box { background: #16A34A; border-color: #16A34A; }
.task-check input:checked + .task-box::after {
  content: "";
  display: block;
  width: 6px;
  height: 11px;
  margin: 1px 0 0 6px;
  border: solid #FFFFFF;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.task-main { min-width: 0; }
.task-title { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.task-title:hover { text-decoration: underline; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.task-account { color: var(--ink); font-weight: 600; text-decoration: none; }
.task-account:hover { text-decoration: underline; }
.task-flash { color: #166534; font-weight: 600; }
.task.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.task.is-done .avatar { opacity: 0.5; }

.due { font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due-over { color: #B91C1C; }
.due-today { color: #B45309; }
.due-soon { color: #92400E; }
.task.is-done .due { color: var(--muted); font-weight: 400; }

.task-add { display: flex; flex-direction: column; gap: 12px; }
.task-add-title { width: 100%; font-size: 15px; font-weight: 600; }
/* Labels above the fields: the form lives in narrow columns. */
.task-field { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.task-field .filter-label { width: auto; }
.task-account-input { width: 100%; }
.due-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.due-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.due-pick { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; }
.due-pick.is-on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
input[type="date"] {
  font: inherit;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 10px;
}
.chip-me { font-weight: 400; opacity: 0.7; }
.task-add .chip { min-height: 32px; padding: 5px 12px 5px 5px; font-size: 13px; }
.task-add-actions { display: flex; align-items: center; gap: 12px; }

.task-add-wrap { margin-top: 12px; }
.task-add-wrap > summary { list-style: none; display: inline-block; }
.task-add-wrap > summary::-webkit-details-marker { display: none; }
.task-add-wrap[open] > summary { margin-bottom: 14px; }
.task-done-list { margin-top: 8px; }
.task-done-list > summary { cursor: pointer; padding: 4px 0; }
.tasks-card h2 { margin-bottom: 8px; }
.call-panel { max-height: calc(100vh - 92px); overflow-y: auto; }
.call-panel .tasks-card { padding: 18px; }
.call-panel .task { grid-template-columns: 24px minmax(0, 1fr) auto; }
.call-panel .task .avatar { display: none; }

.task-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.task-head h1 { overflow-wrap: anywhere; }
.task-head.is-done h1 { color: var(--muted); text-decoration: line-through; }
.task-done-line { margin: 0 0 4px; color: #166534; font-weight: 600; }
.task-mail { margin-top: 10px; padding-top: 12px; border-top: 1px solid #F0F0EC; }
.task-mail-err { color: #B91C1C; }
.task-mail-head { margin-bottom: 6px; font-weight: 700; color: #3D3D3A; }
.task-mail-list { margin: 0; padding: 0; list-style: none; }
.task-mail-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 3px 0; }
.inline-form { display: inline; }
.task-note { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #F0F0EC; }
.task-note:first-of-type { border-top: 0; padding-top: 0; }
.task-note-main { min-width: 0; flex: 1; }
.task-note-body { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-note-form { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 14px; }
.task-edit > summary { list-style: none; cursor: pointer; }
.task-edit > summary::-webkit-details-marker { display: none; }
.task-edit > summary h2 { display: inline; margin: 0; }
.task-edit > summary h2::after { content: " ▸"; color: var(--muted); }
.task-edit[open] > summary { margin-bottom: 16px; }
.task-edit .task-add { max-width: 640px; }
.task-edit[open] > summary h2::after { content: " ▾"; }
.task-delete { margin: -8px 0 24px; }

@media (max-width: 1080px) {
  .tasks-layout { grid-template-columns: minmax(0, 1fr); }
  .tasks-side { position: static; order: -1; }
}
@media (max-width: 720px) {
  .task-filters .filter-row { flex-wrap: wrap; }
  .task { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .task .avatar { display: none; }
}
@media (max-width: 1080px) { .call-panel { max-height: none; overflow: visible; } }

/* --- Account cleanup -------------------------------------------------------- */

.container:has(.cl-table) { max-width: 1480px; }
.cl-kpis { grid-template-columns: 2fr repeat(4, 1fr); }
.kpi-link { color: var(--ink); text-decoration: none; }
.kpi-link:hover { border-color: #BBBBB4; }

.cl-section { margin-bottom: 8px; }
.cl-section > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.cl-section > summary::-webkit-details-marker { display: none; }
.cl-section > summary h2 { margin: 0; }
.cl-section > summary h2::before { content: "▾ "; color: var(--muted); }
.cl-section:not([open]) > summary h2::before { content: "▸ "; }
.cl-dups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cl-dup { padding: 16px 18px; margin-bottom: 0; }
.cl-dup-why { margin-bottom: 6px; }
.cl-dup-table th, .cl-dup-table td { padding: 7px 8px; font-size: 13.5px; vertical-align: middle; }
.cl-dup-table th { font-size: 11px; }
.cl-dup-table td:first-child, .cl-dup-table td:nth-child(2) { width: 36px; text-align: center; }
.cl-dup-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 12px; border-top: 1px solid #F0F0EC; }
.cl-dup-name-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); flex: 1; min-width: 200px; }
.cl-dup-name-label input { font-weight: 600; }

.cl-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.cl-sub a { color: var(--muted); text-decoration: none; }
.cl-sub a:hover { color: var(--ink); }
.cl-sub code { padding: 1px 6px; border-radius: 5px; background: #F0F0EC; color: #3D3D3A; font-size: 11.5px; }
.cl-domain { color: #1D4ED8; }
.cl-src { font-style: italic; }
.cl-flag { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.cl-flag-odd { background: #FEF3C7; color: #92400E; }
.cl-flag-nodomain { background: #F3F4F6; color: #4B5563; }
.cl-flag-dup { background: #EDE9FE; color: #5B21B6; }

.cl-filters .filter-label { width: 70px; }
.cl-table th, .cl-table td { padding: 6px 10px; vertical-align: middle; }
.cl-table th { position: sticky; top: 0; background: var(--card); z-index: 1; }
.cl-sel-cell { width: 28px; }
.cl-row { transition: background 0.4s; }
.cl-row.is-ok { background: #F6FBF6; box-shadow: inset 3px 0 0 #16A34A; }
.cl-row.just-saved { background: #FFFBDB; }
.cl-ok {
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  color: #BBBBB4; font-weight: 800; line-height: 1;
}
.cl-ok:hover { color: #16A34A; border-color: #16A34A; }
.cl-ok.is-on { background: #16A34A; border-color: #16A34A; color: #FFFFFF; }
.cl-name-cell { min-width: 260px; }
.cl-table input.cl-name {
  width: 100%;
  padding: 3px 6px;
  margin-left: -7px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 700;
}
.cl-table input.cl-name:hover, .cl-table input.cl-name:focus { border-color: var(--border); background: #FFFFFF; }
.cl-dup-inc:disabled { visibility: hidden; }
.cl-toggles { display: flex; gap: 3px; }
.cl-toggles button {
  min-width: 30px; height: 28px; padding: 0 6px;
  border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--muted);
}
.cl-toggles button:hover { color: var(--ink); }
.cl-pri.is-on { color: #FFFFFF; }
.cl-pri-p0.is-on { background: #7F1D1D; border-color: #7F1D1D; }
.cl-pri-p1.is-on { background: #DC2626; border-color: #DC2626; }
.cl-pri-p2.is-on { background: #D97706; border-color: #D97706; }
.cl-pri-p3.is-on { background: #2563EB; border-color: #2563EB; }
.cl-own { border-radius: 50% !important; min-width: 28px !important; padding: 0 !important; }
.cl-own.is-on { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.cl-merge { display: flex; gap: 4px; }
.cl-merge input { width: 150px; padding: 5px 8px; font-size: 13px; }
.cl-merge button, .cl-del { padding: 5px 9px; font-size: 12.5px; }
.cl-del { color: #B91C1C; }
.cl-del:hover { border-color: #B91C1C; }
.cl-none { padding: 24px; text-align: center; }

.cl-bulk {
  position: sticky; bottom: 16px; z-index: 5;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: -8px 0 24px; padding: 12px 18px;
  border-radius: 12px; background: var(--ink); color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(20, 20, 20, 0.25);
}
.cl-bulk[hidden] { display: none; }
.cl-bulk-group { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: #C9C9C4; }
.cl-bulk button:not(.btn-primary):not(.link-btn) { padding: 4px 9px; font-size: 12.5px; background: #2A2A28; border-color: #3A3A37; color: #FFFFFF; }
.cl-bulk button:not(.btn-primary):not(.link-btn):hover { border-color: #FFFFFF; }
.cl-bulk .link-btn { color: #C9C9C4; }
.cl-bulk-merge { display: flex; gap: 4px; }
.cl-bulk-merge input { width: 190px; padding: 5px 8px; font-size: 13px; }

.cl-missing-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid #F0F0EC; }
.cl-missing-row input { width: 220px; padding: 5px 8px; font-size: 13px; }
.cl-missing-row button { padding: 5px 10px; font-size: 13px; }

.cl-log-row { display: grid; grid-template-columns: 150px 120px 110px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid #F0F0EC; font-size: 13.5px; }
.cl-log-row:first-of-type { border-top: 0; }
.cl-log-action { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.cl-log-merge, .cl-log-delete { color: #B91C1C; }
.cl-log-ok { color: #166534; }

#cl-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  padding: 10px 16px; border-radius: 8px; background: #B91C1C; color: #FFFFFF; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 50;
}
#cl-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
#cl-toast { cursor: pointer; }
#cl-toast.is-on { pointer-events: auto; }
.cl-table input.cl-name.is-saving { background: #FFFBEB; }
.cl-table input.cl-name.is-unsaved { border-color: #DC2626; background: #FEF2F2; }

@media (max-width: 1080px) {
  .cl-dups { grid-template-columns: 1fr; }
  .cl-kpis { grid-template-columns: repeat(2, 1fr); }
  .cl-log-row { grid-template-columns: 1fr; gap: 2px; }
}

/* --- Status override + team notes ------------------------------------------ */

.st-override { box-shadow: 0 0 0 2px var(--ink); }
.st-ai {
  opacity: 0.6;
  font-weight: 600;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0 3px, transparent 3px 7px);
  box-shadow: inset 0 0 0 1px currentColor;
}
.st-ai.st-none { background-color: #F3F4F6; color: #6B6B66; }
.state-override-box {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
}
.state-override-who { font-size: 13.5px; }
.state-override-why { margin: 6px 0 8px; white-space: pre-wrap; }
.state-override-ai { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.state-override-ai .link-btn { margin-left: auto; font-size: 13px; text-decoration: underline; }
.state-edit { margin: 0 0 14px; }
.state-edit > summary { list-style: none; display: inline-block; font-size: 13px; }
.state-edit > summary::-webkit-details-marker { display: none; }
.state-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 14px; border-radius: 8px; background: #FAFAF8; border: 1px solid var(--border); }
.state-form > div:last-child { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip-state { min-height: 32px; padding: 5px 12px; }
.chip-input:checked + .chip-st-new { background: #075985; border-color: #075985; }
.chip-input:checked + .chip-st-progressing { background: #166534; border-color: #166534; }
.chip-input:checked + .chip-st-stalling { background: #B45309; border-color: #B45309; }
.chip-input:checked + .chip-st-dormant { background: #4B5563; border-color: #4B5563; }
.chip-input:checked + .chip-st-live { background: #14532D; border-color: #14532D; }
.chip-input:checked + .chip-st-lost { background: #991B1B; border-color: #991B1B; }

.notes-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.notes-head h2 { margin: 0; }
.acct-note-form { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.acct-note { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #F0F0EC; }
.acct-note-main { flex: 1; min-width: 0; }
.acct-note-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.acct-note-body { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.acct-note.is-status .acct-note-body { color: #3D3D3A; font-style: italic; }
.note-kind { padding: 1px 7px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 11px; font-weight: 700; }
.focus-notes .focus-note { padding: 8px 0; border-top: 1px solid #F0F0EC; }
.focus-notes .focus-note:first-of-type { border-top: 0; padding-top: 0; }
.focus-notes .focus-note p { margin: 2px 0 0; white-space: pre-wrap; }
.main-contact { font-size: 13.5px; color: #3D3D3A; }
.main-contact a, .contact-mail { color: #1D4ED8; text-decoration: none; font-weight: 400; }
.main-contact a:hover, .contact-mail:hover { text-decoration: underline; }
.main-contact-line { margin-top: 1px; }

/* --- Excel detail per NIS slug ---------------------------------------------- */

.xl-card > summary { list-style: none; cursor: pointer; }
.xl-card > summary::-webkit-details-marker { display: none; }
.xl-card > summary h2::before { content: "▾ "; color: var(--muted); }
.xl-card:not([open]) > summary { margin-bottom: 0; }
.xl-card:not([open]) > summary h2::before { content: "▸ "; }
.xl-blocks { display: flex; flex-direction: column; gap: 14px; }
.xl-block { padding: 14px 16px; border: 1px solid var(--border); border-left: 4px solid var(--yellow); border-radius: 8px; background: #FCFCFA; }
.xl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.xl-head code { padding: 2px 8px; border-radius: 5px; background: #F0F0EC; font-size: 13px; font-weight: 700; }
.xl-nums { margin-left: auto; }
.xl-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0; }
.xl-dl dt { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.xl-dl dd { margin: 4px 0 0; }
.xl-col { padding: 0 5px; border-radius: 4px; background: #F0F0EC; color: #6B6B66; font-size: 10.5px; letter-spacing: 0; }
.xl-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.xl-pill { padding: 2px 8px; border-radius: 999px; background: #FFFFFF; border: 1px solid var(--border); font-size: 12.5px; }
.xl-prio { margin-top: 10px; }
.xl-prio > summary { cursor: pointer; }
.xl-prio-table { margin-top: 6px; font-size: 13px; }
.xl-prio-table th, .xl-prio-table td { padding: 6px 8px; }
@media (max-width: 860px) { .xl-dl { grid-template-columns: 1fr; } }
.info-banner { padding: 12px 18px; border-color: #BBF7D0; background: #F0FDF4; color: #166534; font-weight: 600; }

/* --- Global search (Spotlight) ---------------------------------------------- */

.gsearch { position: relative; flex: 1; max-width: 460px; margin: 0 20px; }
.gsearch input[type="search"] {
  width: 100%;
  padding: 8px 64px 8px 34px;
  border: 1px solid #FFFFFF;
  border-radius: 9px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.gsearch input[type="search"]::placeholder { color: #8A8A84; }
.gsearch input[type="search"]:focus { outline: 3px solid var(--yellow); outline-offset: 0; background: #FFFFFF; }
.gsearch-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #6B6B66; font-size: 17px; pointer-events: none; }
.gsearch-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  padding: 1px 6px; border: 1px solid var(--border); border-radius: 5px; background: #F4F4F0;
  color: #6B6B66; font: 11px/1.6 inherit; pointer-events: none;
}
.gsearch.is-open .gsearch-kbd, .gsearch input:focus ~ .gsearch-kbd { display: none; }
.gsearch.is-loading .gsearch-icon { animation: gs-pulse 0.8s ease-in-out infinite; }
@keyframes gs-pulse { 50% { color: #C9B200; } }

.gsearch-panel {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px));
  max-height: min(70vh, 640px); overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  z-index: 100;
}
.gs-group + .gs-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid #F0F0EC; }
.gs-group-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.gs-icon { font-size: 13px; }
.gs-count { margin-left: auto; font-weight: 600; letter-spacing: 0; }
.gs-item {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none;
}
.gs-item.is-active, .gs-item:hover { background: #FFF8C4; }
.gs-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.gs-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-detail { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.gs-field {
  flex-shrink: 0;
  padding: 0 7px; border-radius: 999px; background: #F0F0EC; color: #3D3D3A;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.gs-snippet { min-width: 0; font-size: 13px; color: #3D3D3A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-item .gs-snippet { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.gs-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.gs-done { font-size: 11px; font-weight: 700; color: #166534; }
.gs-item mark, .sr-item mark { background: var(--yellow); color: var(--ink); border-radius: 3px; padding: 0 1px; }
.gs-more { font-size: 13px; color: var(--muted); padding-top: 4px; padding-bottom: 4px; }
.gs-all { justify-content: space-between; margin-top: 4px; border-top: 1px solid #F0F0EC; border-radius: 0 0 8px 8px; font-size: 13px; font-weight: 600; }
.gs-all kbd { padding: 0 6px; border: 1px solid var(--border); border-radius: 5px; font-size: 11px; color: var(--muted); }
.gs-empty { padding: 18px; text-align: center; color: var(--muted); }

.sr-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sr-jump .chip { text-decoration: none; color: var(--ink); }
.sr-group { padding: 18px 16px; }
.sr-group h2 { padding: 0 10px; }
.sr-item { border-top: 1px solid #F7F7F3; border-radius: 0; }
.sr-item .gs-title { white-space: normal; }

.interaction.is-target { box-shadow: 0 0 0 3px var(--yellow); border-radius: 8px; }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .gsearch { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .gsearch-kbd { display: none; }
}

/* --- Status control (account header, call presenter) ---------------------- */

.state-ctl { margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #FCFCFA; }
.state-ctl.is-override { border-color: #FDE68A; background: #FFFBEB; }
.state-ctl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.state-ctl-label { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.state-ctl-tag { padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.state-ctl .state-edit { margin: 0 0 0 auto; }
.state-ctl .state-edit > summary.state-ctl-btn { display: inline-block; padding: 6px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.state-ctl .state-edit[open] { flex-basis: 100%; margin-left: 0; }
.state-ctl .state-edit[open] > summary.state-ctl-btn { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.state-ctl .state-form { margin-top: 10px; background: #FFFFFF; }
.state-form-label { font-size: 12.5px; font-weight: 700; color: #3D3D3A; }
.state-form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.state-ctl .state-override-box { margin: 10px 0 0; padding: 10px 12px; background: #FFFFFF; }
.state-override-why { font-style: italic; }
.state-ctl-remove { margin-left: auto; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.state-ctl-remove:hover { border-color: #B91C1C; color: #B91C1C; }
.state-override-ai form { margin-left: auto; }

/* --- Notices (rate/coverage updates, promotions…): kept, but out of the way -- */

.interactions-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.interactions-head h2 { margin: 0; }
.notices-toggle { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13.5px; cursor: pointer; }
.interactions-card:not(.show-notices) .interaction.is-notice { display: none; }
.interaction.is-notice { opacity: 0.62; }
.interaction.is-notice:hover { opacity: 1; }
.notice-badge { padding: 1px 8px; border-radius: 999px; background: #EDE9FE; color: #5B21B6; font-size: 11.5px; font-weight: 700; }
.kind-form .kind-btn { font-size: 12px; }

/* --- WhatsApp -------------------------------------------------------------- */

.wa-badge { padding: 1px 8px; border-radius: 999px; background: #DCFCE7; color: #166534; font-size: 11.5px; font-weight: 700; }
.interaction.is-whatsapp { border-left: 3px solid #25D366; padding-left: 12px; }
.wa-section { margin: 8px 0 12px; }
.wa-chat { padding: 18px 20px; }
.wa-chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.wa-label { font-size: 16px; }
.wa-thread { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 10px; background: #EFEAE2; max-height: 460px; overflow-y: auto; }
.wa-day { align-self: center; margin: 6px 0 2px; padding: 2px 10px; border-radius: 8px; background: #FFFFFFCC; color: #54656F; font-size: 11.5px; }
.wa-msg { max-width: 78%; padding: 6px 9px 4px; border-radius: 8px; box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.12); font-size: 14px; }
.wa-msg.wa-in { align-self: flex-start; background: #FFFFFF; }
.wa-msg.wa-out { align-self: flex-end; background: #D9FDD3; }
.wa-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-text.is-empty { color: #667781; font-style: italic; font-size: 13px; }
.wa-time { margin-top: 1px; text-align: right; color: #667781; font-size: 11px; }
.wa-more { margin-top: 8px; }
.wa-more > summary { cursor: pointer; }
.wa-link-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.wa-link-form input { flex: 1; min-width: 180px; }
.wa-linked { padding: 12px 18px; border-top: 1px solid #F0F0EC; }
.wa-linked:first-child { border-top: 0; }
.wa-linked > summary { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.wa-linked .wa-thread { margin-top: 10px; }
.wa-linked-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.wa-linked-actions input { width: 200px; padding: 5px 8px; font-size: 13px; }
.wa-none { padding: 16px 18px; }
.wa-ignored { margin: 8px 0 24px; }
.wa-ignored > summary { cursor: pointer; }
.wa-ignored-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #F0F0EC; }
@media (max-width: 1440px) and (min-width: 1081px) { .topnav .who { display: none; } }
.wa-hidden-note { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #F0FDF4; font-size: 13.5px; color: #3D3D3A; }
.wa-match { margin-top: 4px; color: #3D3D3A; }

/* --- Email composer ---------------------------------------------------------- */

.cp-new { margin-left: auto; padding: 6px 14px; font-size: 13.5px; text-decoration: none; }
.cp-drafts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #FFFBEB; }
.cp-draft-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.cp-draft-link:hover { text-decoration: underline; }
.cp-draft { display: inline-flex; align-items: center; gap: 2px; }
.cp-draft-del { display: inline; margin: 0; }
.cp-draft-x {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.cp-draft-x:hover { background: #FEE2E2; color: #B91C1C; }
@media (max-width: 760px) { .cp-draft-x { width: 34px; height: 34px; font-size: 19px; } }
.reply-link { font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; background: #FFFFFF; }
.reply-link:hover { border-color: var(--ink); }

.container:has(.cp-grid) { max-width: 1320px; }
.cp-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cp-email { display: flex; flex-direction: column; gap: 10px; }
.cp-row { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #F0F0EC; }
.cp-label { width: 60px; flex-shrink: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.cp-from { font-size: 14px; color: #3D3D3A; }
/* Send as: one of your addresses (pills), and a line saying how it compares with before. */
.cp-from-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-from-opt { position: relative; display: inline-flex; align-items: baseline; gap: 7px; padding: 6px 13px;
               border: 1px solid var(--border); border-radius: 999px; background: #FFFFFF; font-size: 13.5px; cursor: pointer; }
.cp-from-opt:hover { border-color: #BBBBB4; }
.cp-from-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cp-from-opt:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.cp-from-opt:has(input:focus-visible) { outline: 2px solid var(--yellow); outline-offset: 2px; }
.cp-from-name { font-weight: 700; }
.cp-from-addr { color: var(--muted); font-size: 12.5px; }
.cp-from-opt:has(input:checked) .cp-from-addr { color: rgba(255, 255, 255, 0.75); }
.cp-from-note { margin-top: -4px; padding: 7px 11px; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.cp-from-note.is-same { background: #F0FDF4; color: #166534; }
.cp-from-note.is-change { background: #FFFBEB; border: 1px solid #FCD34D; color: #92400E; font-weight: 600; }
.cp-from-note.is-none { padding: 0 2px; color: var(--muted); }
.fu-row.fu-from { align-items: flex-start; }
.fu-row.fu-from > span { padding-top: 9px; }
#fu-from-note { margin: 6px 0 2px; }
@media (max-width: 760px) {
  .cp-from-opt { flex-direction: column; gap: 0; border-radius: 12px; padding: 6px 12px; }
  .cp-from-addr { overflow-wrap: anywhere; }
}
.cp-chips { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; cursor: text; }
.cp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: #F0F0EC; font-size: 13px; }
.cp-chip-x { padding: 0 6px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.cp-chip-x:hover { background: #E4E4E0; color: var(--ink); }
.cp-chips .cp-chip-input { flex: 1; min-width: 180px; border: 0; padding: 6px 4px; background: transparent; }
.cp-chips .cp-chip-input:focus { outline: none; }
.cp-email input.cp-subject { flex: 1; border: 0; padding: 6px 4px; font-weight: 600; font-size: 15px; }
.cp-email input.cp-subject:focus { outline: none; }
.cp-body { width: 100%; min-height: 360px; font: 14.5px/1.55 inherit; padding: 12px 14px; }
.cp-original { border-top: 1px solid #F0F0EC; padding-top: 8px; }
.cp-original > summary { cursor: pointer; }
.cp-original-body { margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--border); background: #FAFAF8; white-space: pre-wrap; font-size: 13px; max-height: 320px; overflow-y: auto; color: #3D3D3A; }
.cp-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-actions .cp-discard { margin-left: auto; }
.cp-chat { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; }
.cp-chat h2 { margin: 0; }
.cp-thread { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; min-height: 120px; overflow-y: auto; padding: 4px 2px; }
.cp-msg { max-width: 92%; padding: 8px 11px; border-radius: 10px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-msg.cp-user { align-self: flex-end; background: #FFF3A6; }
.cp-msg.cp-assistant { align-self: flex-start; background: #F0F0EC; }
.cp-msg.is-writing { opacity: 0.85; }
.cp-msg.is-writing::after { content: " ▍"; animation: cp-blink 1s steps(1) infinite; }
@keyframes cp-blink { 50% { opacity: 0; } }
.cp-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-q { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; }
.cp-ask { display: flex; flex-direction: column; gap: 8px; }
.cp-ask button { align-self: flex-end; }
#composer.is-busy .cp-body { background: #FFFDF0; }

@media (max-width: 960px) {
  .cp-grid { grid-template-columns: minmax(0, 1fr); }
  .cp-chat { position: static; order: -1; }
  .cp-thread { max-height: 34vh; }
  .cp-label { width: 54px; }
  .cp-body { min-height: 280px; font-size: 16px; }
}

/* --- Reply clock: who owes the next email (account header, accounts list) ---- */
.rt-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin: 12px 0 4px; padding: 10px 14px;
  border: 1px solid var(--border); border-left: 4px solid #A8A29E; border-radius: 10px; background: #FAFAF7;
}
.rt-main { display: flex; align-items: center; gap: 10px; flex: 1 1 380px; min-width: 0; }
.rt-icon { font-size: 18px; line-height: 1; }
.rt-text { min-width: 0; }
.rt-text strong { display: block; font-size: 14.5px; }
.rt-detail { display: block; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.rt-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rt-actions form { margin: 0; }
.rt-actions .btn { white-space: nowrap; }
.rt-stats { flex: 1 0 100%; font-size: 12.5px; color: var(--muted); }
.rt-main + .rt-actions + .rt-stats { padding-top: 6px; border-top: 1px solid rgba(0, 0, 0, 0.06); }
.rt-stats strong { color: var(--ink); }
.rt-m-good { color: #15803D !important; }
.rt-m-amber { color: #B45309 !important; }
.rt-m-red { color: #B91C1C !important; }
.rt-sev-green { border-left-color: #16A34A; background: #F3FBF5; }
.rt-sev-amber { border-left-color: #D97706; background: #FFFAEB; }
.rt-sev-red { border-left-color: #DC2626; background: #FEF2F2; }
.rt-sev-amber .rt-text strong { color: #92400E; }
.rt-sev-red .rt-text strong { color: #991B1B; }

.rt-pill {
  display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent;
}
.rt-pill.rt-sev-green { background: #ECFDF3; border-color: #BBF7D0; color: #166534; }
.rt-pill.rt-sev-amber { background: #FFF7E6; border-color: #FCD9A0; color: #92400E; }
.rt-pill.rt-sev-red { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }

/* --- Account tags ----------------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%;
  padding: 1px 4px 1px 9px; border-radius: 999px; border: 1px solid var(--tc-b);
  background: var(--tc-bg); color: var(--tc-fg); font-size: 12px; font-weight: 700; line-height: 1.6;
  white-space: nowrap;
}
span.tag:not(:has(.tag-x)) { padding-right: 9px; }
.tag-c0 { --tc-bg: #EEF2FF; --tc-b: #C7D2FE; --tc-fg: #3730A3; }
.tag-c1 { --tc-bg: #ECFDF5; --tc-b: #A7F3D0; --tc-fg: #065F46; }
.tag-c2 { --tc-bg: #FFF7ED; --tc-b: #FED7AA; --tc-fg: #9A3412; }
.tag-c3 { --tc-bg: #FDF2F8; --tc-b: #FBCFE8; --tc-fg: #9D174D; }
.tag-c4 { --tc-bg: #F0F9FF; --tc-b: #BAE6FD; --tc-fg: #075985; }
.tag-c5 { --tc-bg: #FEFCE8; --tc-b: #FDE68A; --tc-fg: #854D0E; }
.tag-c6 { --tc-bg: #F5F3FF; --tc-b: #DDD6FE; --tc-fg: #5B21B6; }
.tag-c7 { --tc-bg: #F0FDFA; --tc-b: #99F6E4; --tc-fg: #115E59; }
.tag-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tc-fg); }
.tag-x {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit;
  font-size: 14px; line-height: 1; opacity: 0.55; cursor: pointer;
}
.tag-x:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }
.tag-ed { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.tag-ed.is-busy { opacity: 0.6; pointer-events: none; }
.tag-add {
  padding: 1px 9px; border: 1px dashed #C9C9C2; border-radius: 999px; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.6; cursor: pointer;
}
.tag-add:hover { border-color: var(--ink); color: var(--ink); }
.tag-input {
  width: 150px; padding: 2px 9px; border: 1px solid var(--ink); border-radius: 999px;
  font-size: 12.5px; line-height: 1.5;
}
.tag-err { font-size: 12px; color: #B91C1C; }
.acct-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; }
.acct-tags-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.acct-tags .tag-ed { margin-top: 0; }
.chip-tag { gap: 7px; }
.chip-tag .tag-dot { flex: none; }
.chip-input:checked + .chip-tag .tag-dot { box-shadow: 0 0 0 2px #FFFFFF; }
.tag-all-btn { margin-left: auto; font-size: 13px; }
.results-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }

/* Bulk bar: one tag on several accounts. */
.tag-bulk {
  position: fixed; left: 50%; bottom: 18px; z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; width: min(760px, calc(100% - 24px));
  padding: 10px 14px; border-radius: 14px; background: var(--ink); color: #FFFFFF;
  box-shadow: 0 12px 34px rgba(20, 20, 20, 0.28);
}
.tag-bulk[hidden] { display: none; }
.tag-bulk .tb-count { font-size: 13.5px; white-space: nowrap; }
.tag-bulk .tb-input { flex: 1 1 180px; min-width: 0; padding: 7px 12px; border: 0; border-radius: 999px; font-size: 14px; }
.tag-bulk .link-btn { color: #FFFFFF; }
.tag-bulk .tb-msg { color: #E7E5E0; }
.tag-bulk .tb-close { margin-left: auto; font-size: 15px; }
body.has-tag-bulk { padding-bottom: 90px; }

/* Prepare: pick accounts, notes for a tag. */
.prep-toolbar { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 -10px; }
.prep-title .tag-pick { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.prep-item.is-picked { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.prep-src b { color: var(--ink); }
.prep-acct textarea { width: 100%; min-height: 84px; font-size: 14.5px; line-height: 1.55; }
.tn-card { border-color: #E9DD8C; background: #FFFDF2; }
.tn-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }
.tn-head h2 { margin: 0; }
.tn-head p { margin: 0; }
.tn-tags { margin-bottom: 10px; }
.tn-done { color: #15803D; font-weight: 800; }
.chip-input:checked + .chip .tn-done { color: #86EFAC; }
.tn-empty, .tn-pick { margin: 0; }
.tn-editor textarea { width: 100%; min-height: 110px; font-size: 14.5px; line-height: 1.55; background: #FFFFFF; }
.tn-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; }
.tn-label { color: var(--muted); font-weight: 600; }
.tn-acc { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; background: #FFFFFF; color: var(--ink); text-decoration: none; font-weight: 600; }
.tn-acc:hover { border-color: var(--ink); }
.tn-acc.is-out { opacity: 0.6; border-style: dashed; }
.tn-warn { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #FFF7E6; border: 1px solid #FCD9A0; color: #7C2D12; font-size: 13px; }
.tn-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.tn-msg { font-weight: 600; }

@media (max-width: 760px) {
  .tag { font-size: 12.5px; line-height: 1.8; }
  .tag-x { width: 26px; height: 26px; font-size: 16px; }
  .tag-add { padding: 4px 12px; font-size: 13px; }
  .tag-input { width: 100%; font-size: 16px; padding: 6px 12px; }
  .tag-bulk { bottom: calc(10px + env(safe-area-inset-bottom)); }
  .tag-bulk .tb-input { flex-basis: 100%; font-size: 16px; }
  .prep-toolbar { flex-wrap: wrap; }
  .tag-all-btn { margin-left: 0; }
}

/* --- Backups ------------------------------------------------------------------ */
.bk-status {
  display: flex; align-items: flex-start; gap: 12px; margin: 0 0 18px; padding: 12px 16px;
  border: 1px solid #BBF7D0; border-left: 4px solid #16A34A; border-radius: 10px; background: #F3FBF5; line-height: 1.5;
}
.bk-status.is-warn { border-color: #FECACA; border-left-color: #DC2626; background: #FEF2F2; }
.bk-status-icon { font-size: 18px; line-height: 1.3; }
.bk-status.is-ok .bk-status-icon { color: #15803D; }
.bk-status.is-warn .bk-status-icon { color: #B91C1C; }
.bk-bad { color: #B91C1C; font-weight: 600; }
.bk-ok { color: #15803D; font-weight: 700; text-decoration: none; }
.bk-snap-form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.bk-snap-text { flex: 1 1 320px; }
.bk-snap-text h2 { margin: 0 0 2px; }
.bk-snap-text p { margin: 0; }
.bk-snap-form input[type=text] { flex: 1 1 280px; min-width: 0; }
.bk-kind { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #F0F0EC; }
.bk-snapshot { background: #FFF3A6; }
.bk-safety { background: #FEE2E2; color: #991B1B; }
.bk-label { margin-top: 3px; font-weight: 600; }
.bk-actions { white-space: nowrap; text-align: right; }
.bk-btn { padding: 4px 10px; font-size: 13px; }
.bk-more { display: inline-block; margin-left: 8px; text-align: left; vertical-align: middle; }
.bk-more > summary { list-style: none; cursor: pointer; font-size: 13px; }
.bk-more > summary::-webkit-details-marker { display: none; }
.bk-more[open] > summary { font-weight: 700; }
.bk-restore {
  position: absolute; right: 16px; z-index: 5; display: flex; flex-direction: column; gap: 8px; width: 320px;
  margin-top: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #FFFFFF;
  white-space: normal; box-shadow: 0 10px 28px rgba(20, 20, 20, 0.16);
}
.bk-restore p { margin: 0; }
.bk-restore label { display: flex; flex-direction: column; gap: 4px; }
.bk-danger { align-self: flex-start; border-color: #DC2626; background: #DC2626; color: #FFFFFF; }
.bk-danger:hover { background: #B91C1C; border-color: #B91C1C; }
.bk-table tr { position: relative; }
.bk-card { overflow: visible; }
.bk-how { font-size: 13.5px; }
.bk-how > summary { cursor: pointer; font-weight: 700; }
.bk-how ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.6; }
@media (max-width: 760px) {
  .bk-table td { margin-top: 6px; }
  .bk-table td:first-child { margin-top: 0; }
  .bk-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label); display: block; font-size: 11.5px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.04em;
  }
  .bk-table.m-cards thead { display: none; }
  .bk-table.m-cards td.num { text-align: left; }
  .bk-actions { text-align: left; white-space: normal; }
  .bk-btn { min-height: 40px; display: inline-flex; align-items: center; }
  .bk-more > summary { display: inline-flex; align-items: center; min-height: 40px; }
  .bk-restore { position: static; width: auto; box-shadow: none; }
  .bk-snap-form .btn { width: 100%; }
}
.bk-recovery h2 { margin: 0 0 2px; }
.bk-rec-head p { margin: 0 0 10px; }
.bk-parts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.bk-parts li::before { display: inline-block; width: 22px; font-weight: 800; }
.bk-parts li.ok::before { content: "✓"; color: #15803D; }
.bk-parts li.no::before { content: "✗"; color: #B91C1C; }
.bk-parts li.warn::before { content: "!"; color: #B45309; }
.bk-key-ok { margin: 0; color: #14532D; }
.bk-key-warn { padding: 10px 14px; border: 1px solid #FCD9A0; border-radius: 10px; background: #FFF7E6; }
.bk-key-warn p { margin: 0 0 10px; color: #7C2D12; }
.bk-key-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.bk-key-form input[type=password] { flex: 1 1 200px; min-width: 0; }
.bk-key-form p { flex-basis: 100%; margin: 0; }
.bk-key-change > summary { cursor: pointer; margin-top: 6px; font-size: 13px; list-style: none; }
.bk-pkg { margin-left: 6px; font-size: 11.5px; font-weight: 700; color: #14532D; }
.bk-pkg.is-db { color: var(--muted); font-weight: 600; }

/* --- View-only access (support@…): nothing that changes the CRM is offered ---- */
.ro-badge {
  padding: 2px 10px; border-radius: 999px; background: #3A3A37; color: #FFFFFF;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
body.is-readonly :is(#edit-btn, .cp-new, .reply-link, .cp-drafts, .tag-add, .tag-x, .tag-pick, [data-tag-all],
  .prep-toolbar, .tag-bulk, .tn-card, .bk-snap, .rt-actions, .rt-go, .tk-add-btn, .tk-new-btn, .tk-col-add, .tk-new,
  .task-check, .task-box, .cl-sel, .cl-bulk, .delete-form, .state-edit, .wt-act, .fu-sit .fu-go) { display: none !important; }
body.is-readonly :is(.tk-due-pill, .tk-icon-btn, .cl-table button) { pointer-events: none; }
body.is-readonly .acct-tags:not(:has(.tag)) { display: none; }
body.is-readonly textarea[readonly], body.is-readonly input[readonly]:not([type=search]) { background: #F7F7F4; cursor: default; }
#ro-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px);
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #FFFFFF;
  font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
#ro-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* --- Composer: scheduled sending -------------------------------------------- */
.cp-sched { position: relative; }
.cp-sched-menu {
  position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; gap: 2px;
  min-width: 230px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: #FFFFFF;
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.16);
}
.cp-sched-menu[hidden] { display: none; }
.cp-sched-opt { justify-content: flex-start; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; font-weight: 600; }
.cp-sched-opt:hover { background: #FFF8C4; }
.cp-sched-menu p { margin: 4px 10px 2px; }
.cp-sched-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; padding: 9px 12px;
  border: 1px solid #BFDBFE; border-radius: 8px; background: #EFF6FF; font-size: 13.5px;
}
.cp-sched-banner.is-failed { border-color: #FECACA; background: #FEF2F2; }
.cp-draft-link.is-scheduled { color: #1D4ED8; }
.cp-draft-link.is-failed { color: #B91C1C; }
@media (max-width: 760px) {
  .cp-sched-menu { position: fixed; left: 12px; right: 12px; bottom: 12px; }
  .cp-sched-opt { min-height: 44px; }
}
.cp-sched-pick { margin: 6px 4px 2px; padding-top: 8px; border-top: 1px solid #F0F0EC; }
.cp-sched-pick label { display: block; margin: 0 6px 4px; font-weight: 600; color: var(--muted); }
.cp-sched-pick-row { display: flex; gap: 6px; padding: 0 4px; }
.cp-sched-pick-row input { flex: 1 1 auto; min-width: 0; font-size: 14px; }
.cp-draft-link.is-sending { color: #1D4ED8; }

/* --- Scheduled emails (scheduled.html) ---------------------------------------- */
.sch-day { margin: 22px 0 8px; font-size: 16px; }
.sch-day.is-failed { color: #B91C1C; }
.sch-list { padding: 4px 18px; }
.sch-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid #F0F0EC; }
.sch-item:first-child { border-top: 0; }
.sch-item.is-busy { opacity: 0.6; }
.sch-when strong { font-size: 18px; font-variant-numeric: tabular-nums; color: #1D4ED8; }
.sch-item.is-failed .sch-when strong { color: #B91C1C; }
.sch-acc a { font-weight: 800; color: var(--ink); text-decoration: none; }
.sch-acc a:hover { text-decoration: underline; }
.sch-tag { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #EFF6FF; color: #1D4ED8; font-size: 11.5px; font-weight: 700; }
.sch-subj { margin-top: 2px; font-weight: 600; }
.sch-to { margin-top: 2px; overflow-wrap: anywhere; }
.sch-error { margin-top: 6px; padding: 6px 10px; border-radius: 6px; background: #FEF2F2; color: #991B1B; }
.sch-body { margin-top: 6px; }
.sch-body > summary { cursor: pointer; color: var(--muted); }
.sch-text { margin-top: 6px; padding: 10px 12px; border-left: 3px solid var(--yellow); background: #FAFAF7; white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; }
.sch-msg { margin-top: 6px; font-weight: 600; }
.sch-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sch-actions .btn { padding: 5px 11px; font-size: 13px; }
.sch-more { position: relative; }
.sch-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; gap: 2px; min-width: 240px;
  padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: #FFFFFF; box-shadow: 0 10px 28px rgba(20, 20, 20, 0.16);
}
.sch-menu[hidden] { display: none; }
.sch-opt { justify-content: flex-start; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; font-weight: 600; }
.sch-opt:hover { background: #FFF8C4; }
.sch-pick { display: flex; gap: 6px; padding: 6px 4px 2px; border-top: 1px solid #F0F0EC; }
.sch-pick input { flex: 1 1 auto; min-width: 0; }
.sch-menu p { margin: 4px 8px 2px; }
@media (max-width: 760px) {
  .sch-list { padding: 4px 14px; }
  .sch-item { grid-template-columns: 52px minmax(0, 1fr); }
  .sch-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .sch-actions .btn { min-height: 42px; }
  .sch-menu { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; }
  .sch-opt { min-height: 44px; }
}

/* --- Top bar on laptops: every link on one line ------------------------------ */
.mainnav a { white-space: nowrap; }
.topnav .link-btn { white-space: nowrap; }
@media (min-width: 1081px) and (max-width: 1480px) {
  .topbar { padding-left: 20px; padding-right: 20px; }
  .mainnav { gap: 2px; margin-left: 18px; }
  .mainnav a { padding-left: 9px; padding-right: 9px; font-size: 13.5px; }
  .gsearch { min-width: 140px; margin: 0 12px; }
  .gsearch-kbd { display: none; }   /* room for the word "Search" (⌘K still works) */
  .topnav { gap: 10px; }
}
@media (min-width: 1081px) and (max-width: 1700px) { .topnav .who { display: none; } }
@media (min-width: 1081px) and (max-width: 1300px) {
  .brand-title { display: none; }
  .mainnav { margin-left: 10px; }
  .mainnav a { padding-left: 7px; padding-right: 7px; font-size: 13px; }
  .gsearch-kbd { display: none; }
}
.cp-sig { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.cp-sig label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.cp-sig-preview { width: 100%; height: 150px; border: 1px dashed var(--border); border-radius: 8px; background: #FFFFFF; }
.cp-sig-preview[hidden] { display: none; }
.fu-sig { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }

/* --- The top bar stays on screen ----------------------------------------------- */
/* --topbar-h is its real height (mobile.js measures it): what sticks under it,
   and the jump to an #anchor, leave that room. */
.topbar { position: sticky; top: 0; z-index: 60; }
/* No elastic bounce past the top or the end of the page (macOS / iOS): with it,
   the page — and the top bar with it — slides away from the fixed bars. */
html, body { overscroll-behavior-y: none; }
html { scroll-padding-top: calc(var(--topbar-h, 76px) + 12px); }
.focus-nav { top: var(--topbar-h, 76px); }
.call-panel, .tasks-side, .cp-chat { top: calc(var(--topbar-h, 76px) + 6px); }
.call-panel { max-height: calc(100vh - var(--topbar-h, 76px) - 18px); }

/* --- Account page: the summary bar under the top bar (once the header scrolls away) --- */
html:has(#acct-bar) { scroll-padding-top: calc(var(--topbar-h, 76px) + 64px); }
.acct-bar {
  position: fixed; left: 0; right: 0; top: var(--topbar-h, 71px); z-index: 55;
  background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(20, 20, 20, 0.07);
  transform: translateY(-110%); opacity: 0; pointer-events: none; transition: transform 0.18s ease, opacity 0.18s ease;
}
.acct-bar.is-on { transform: none; opacity: 1; pointer-events: auto; }
.acct-bar-in { display: flex; align-items: center; gap: 10px; max-width: 1360px; min-width: 0; margin: 0 auto; padding: 8px 28px; }
.acct-bar-name { flex: 0 0 auto; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
                 font-size: 16.5px; font-weight: 800; color: var(--ink); text-decoration: none; }
.acct-bar-name:hover { text-decoration: underline; }
.acct-bar .rt-pill { margin-top: 0; text-decoration: none; }
.acct-bar-more { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.acct-bar-more .owner { font-size: 13.5px; }
.acct-bar-rev { font-size: 13px; font-weight: 700; color: #3D3D3A; font-variant-numeric: tabular-nums; }
.acct-bar-act { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }
.acct-bar-links { display: flex; gap: 2px; }
.acct-bar-links a { padding: 4px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.acct-bar-links a:hover { color: var(--ink); background: #F3F3EF; }
.acct-bar-links a.is-current { color: var(--ink); background: #FFF3A6; }
.acct-bar-write { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
@media (max-width: 1500px) { .acct-bar-more .tag { display: none; } }
@media (max-width: 1360px) { .acct-bar-more .prod { display: none; } }
@media (max-width: 1080px) { .acct-bar-links { display: none; } .acct-bar-in { padding: 8px 20px; } }
@media (max-width: 760px) {
  html:has(#acct-bar) { scroll-padding-top: calc(var(--topbar-h, 76px) + 56px); }
  .acct-bar-in { gap: 8px; padding: 7px 16px; }
  .acct-bar-more { display: none; }
  .acct-bar-name { max-width: none; flex: 1 1 auto; font-size: 15px; }
  .acct-bar .st { flex: none; }
  .acct-bar-write { padding: 7px 10px; min-height: 38px; }
  .acct-bar-write span { display: none; }
}
body.is-readonly .acct-bar-write { display: none !important; }

/* --- Account history (bottom of the account page) ------------------------- */
.hist-card { --c: #475569; }
.hist-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }
.hist-head h2 { margin: 0; }
.hist-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.hist-filters .chip { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.hist-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip-input:checked + .hist-chip { background: var(--c); border-color: var(--c); }
.chip-input:checked + .hist-chip::before { background: rgba(255, 255, 255, 0.85); }
.hist-who .avatar { width: 22px; height: 22px; font-size: 10px; }
.hist-c-details { --c: #475569; }
.hist-c-status { --c: #7C3AED; }
.hist-c-notes { --c: #B45309; }
.hist-c-contacts { --c: #0E7490; }
.hist-c-tasks { --c: #2563EB; }
.hist-c-emails { --c: #15803D; }
.hist-c-tags { --c: #BE185D; }
.hist-c-domains { --c: #4338CA; }
.hist-c-excel { --c: #4D7C0F; }
.hist-c-whatsapp { --c: #047857; }
.hist-list { list-style: none; margin: 0; padding: 0; }
.hist-day { margin: 14px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--border);
            font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.hist-day:first-child { margin-top: 0; }
.hist-row { display: grid; grid-template-columns: 46px 150px minmax(0, 1fr) auto; gap: 12px; align-items: baseline;
            padding: 7px 0; border-bottom: 1px solid #F1F1ED; font-size: 13.5px; }
.hist-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-kind { display: inline-flex; align-items: baseline; gap: 7px; font-weight: 700; color: var(--c); }
.hist-kind::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); transform: translateY(-1px); }
.hist-text { min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.hist-via { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #EEF2FF;
            color: #4338CA; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.hist-by { color: #3D3D3A; font-size: 12.5px; font-weight: 600; white-space: nowrap; text-align: right; }
.hist-more { margin-top: 12px; }
.hist-more[hidden], #hist-none[hidden] { display: none; }
.avatar.avatar-sys { background: #E7E7E2; color: var(--muted); }
.hist-foot { margin: 14px 0 0; }
@media (max-width: 760px) {
  .hist-row { grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; }
  .hist-time { grid-row: 1; grid-column: 1; }
  .hist-kind { grid-row: 1; grid-column: 2; }
  .hist-text { grid-column: 1 / -1; }
  .hist-by { grid-column: 1 / -1; text-align: left; font-weight: 500; color: var(--muted); }
}

/* --- AI training ------------------------------------------------------------ */
.ait-teach textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; resize: vertical; }
.ait-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.ait-area-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.ait-pill { position: relative; display: inline-flex; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
            background: #FFFFFF; font-size: 13px; font-weight: 600; cursor: pointer; }
.ait-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ait-pill:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.ait-pill:has(input:focus-visible) { outline: 2px solid var(--yellow); outline-offset: 2px; }
.ait-only { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.ait-add-row .btn-primary { margin-left: auto; }
.ait-add-msg { margin: 6px 0 0; color: #B91C1C; }
.ait-filters { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 16px; }
.ait-filters .chip { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.ait-area-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; }
.ait-area-head h2 { margin: 0; }
.ait-rules { margin: 0; padding: 0; list-style: none; }
.ait-rule { display: flex; align-items: flex-start; gap: 16px; padding: 12px 0; border-top: 1px solid #F0F0EC; }
.ait-rule:first-child { border-top: 0; }
.ait-rule-main { flex: 1 1 auto; min-width: 0; }
.ait-text { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; }
.ait-rule.is-off .ait-text { color: var(--muted); text-decoration: line-through; text-decoration-color: #C9C9C2; }
.ait-rule.is-editing .ait-text { display: none; }
.ait-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ait-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #F0F0EC; color: #3D3D3A; font-weight: 600; font-size: 11.5px; }
.ait-badge.is-learned { background: #EEF2FF; color: #4338CA; }
.ait-badge.is-scope { background: #FFF8C4; color: #6B5B00; }
.ait-from { color: #3D3D3A; font-style: italic; overflow-wrap: anywhere; }
.ait-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.ait-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.ait-edit-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.ait-edit-form select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: #FFFFFF; font: inherit; font-size: 13px; }
.ait-empty { padding: 6px 0; }
.ait-reads summary { cursor: pointer; }
.ait-reads h3 { margin: 16px 0 6px; font-size: 13.5px; }
.ait-reads pre { margin: 0; padding: 10px 12px; border-radius: 8px; background: #F7F7F4; font-size: 12.5px; white-space: pre-wrap; }
.ait-log ul { margin: 0; padding: 0; list-style: none; }
.ait-log li { padding: 5px 0; border-top: 1px solid #F3F3EF; font-size: 13px; }
.ait-log li:first-child { border-top: 0; }
.ait-log-detail { color: #3D3D3A; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .ait-rule { flex-direction: column; gap: 8px; }
  .ait-add-row .btn-primary { margin-left: 0; }
}
/* In the composer: what Claude learned from a request. */
.cp-msg.cp-learned { align-self: stretch; background: #EEF2FF; color: #312E81; font-size: 13px; }
.cp-msg.cp-learned.is-undone { background: #F3F3EF; color: var(--muted); }
.cp-learned-links { display: inline-flex; gap: 10px; margin-left: 8px; }
.cp-learned-links a { color: #4338CA; font-weight: 600; }

/* --- New companies (from the emails, waiting for a decision) ------------------- */
.nc-filters { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.nc-filters .chip { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.nc-bulk { position: sticky; top: calc(var(--topbar-h, 76px) + 8px); z-index: 20; display: flex; align-items: center; gap: 14px;
           margin-bottom: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: #FFFFFF;
           box-shadow: 0 8px 24px rgba(20, 20, 20, 0.10); }
.nc-card { margin-bottom: 12px; }
.nc-card.is-done { padding-top: 12px; padding-bottom: 12px; }
.nc-done { margin: 0; }
.nc-head { display: flex; align-items: flex-start; gap: 12px; }
.nc-sel { margin-top: 6px; width: 16px; height: 16px; flex: none; }
.nc-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.nc-title h2 { margin: 0; font-size: 18px; }
.nc-domain { font-weight: 600; color: #3D3D3A; }
.nc-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; background: #F0F0EC; color: #3D3D3A; font-size: 12px; font-weight: 600; }
.nc-badge.is-sent { background: #DCFCE7; color: #166534; }
.nc-badge.is-back { background: #FFF8C4; color: #6B5B00; }
.nc-people { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0 28px; }
.nc-emails { margin: 8px 0 0 28px; padding: 0; list-style: none; font-size: 13.5px; }
.nc-emails li { padding: 3px 0; overflow-wrap: anywhere; }
.nc-dir { display: inline-block; min-width: 78px; color: var(--muted); font-size: 12px; font-weight: 600; }
.nc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 12px 0 0 28px; padding-top: 12px; border-top: 1px solid #F0F0EC; }
.nc-create, .nc-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nc-actions input[type="text"] { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13.5px; }
.nc-create input[name="name"] { width: 200px; }
.nc-add input[name="account"] { width: 260px; }
.nc-actions select { padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; background: #FFFFFF; font: inherit; font-size: 13.5px; }
.nc-discard { margin-left: auto; }
.nc-empty { color: #166534; }
.nc-decided summary { cursor: pointer; }
.nc-decided ul { margin: 10px 0 0; padding: 0; list-style: none; }
.nc-decided li { padding: 4px 0; border-top: 1px solid #F3F3EF; font-size: 13px; }
@media (max-width: 760px) {
  .nc-people, .nc-emails, .nc-actions { margin-left: 0; }
  .nc-create input[name="name"], .nc-add input[name="account"] { width: 100%; }
  .nc-discard { margin-left: 0; }
}

/* Emails taken off an account's list, and putting them back. */
.remove-btn { font-size: 12.5px; color: var(--muted); }
.remove-btn:hover { color: #B91C1C; }
.removed-card summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; cursor: pointer; list-style: none; }
.removed-card summary::-webkit-details-marker { display: none; }
.removed-card summary h2 { margin: 0; }
.removed-card summary h2::before { content: "▸ "; color: var(--muted); }
.removed-card[open] summary h2::before { content: "▾ "; }
.removed-list { margin: 12px 0 0; padding: 0; list-style: none; }
.removed-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 7px 0; border-top: 1px solid #F0F0EC; font-size: 13.5px; }

/* A teammate's draft open in the composer. */
.cp-shared { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; padding: 12px 16px;
             background: #EEF2FF; border-color: #C7D2FE; color: #312E81; font-size: 14px; }
.cp-shared.is-locked { background: #F3F3EF; border-color: var(--border); color: #3D3D3A; }
.cp-who { display: block; margin-bottom: 2px; font-size: 11.5px; font-weight: 700; color: #6B5B00; }
.cp-reload { margin-left: 8px; font-weight: 700; color: var(--ink); }

/* --- Weekly review: call order (Standard / Focus) and why an account is in focus --- */
.call-order .chip-focus { border-color: #FCD34D; }
.chip-input:checked + .chip-focus { background: var(--ink); border-color: var(--ink); }
.call-order-help { flex: 1 1 320px; }
.section-row.is-quiet td { color: var(--muted); }
.why-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.why { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #F3F3EF; color: #3D3D3A; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.why-waiting { background: #FEE2E2; color: #991B1B; }
.why-follow { background: #FFEDD5; color: #9A3412; }
.why-prep { background: #FFF8C4; color: #6B5B00; }
.why-mail { background: #E0F2FE; color: #075985; }
.why-task { background: #DCFCE7; color: #166534; }
.why-note { background: #F3E8FF; color: #6B21A8; }
.why-state { background: #EEF2FF; color: #3730A3; }
.focus-why { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; }
.focus-why .why { font-size: 12.5px; padding: 2px 10px; }
.focus-mode-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 700; }

/* --- Weekly review: the last 7 days at a glance ---------------------------------- */
.recap-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin: 0 0 16px; }
.recap-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #FFFFFF; }
.recap-kpi b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.recap-kpi span { color: var(--muted); font-size: 12.5px; }
.recap-kpi.is-alert { border-color: #FCA5A5; background: #FEF2F2; }
.recap-kpi.is-alert b { color: #B91C1C; }
.recap-list { margin: 0; padding: 0; list-style: none; }
.recap-item { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 10px; padding: 14px 18px; }
.recap-item.is-waiting { border-left: 4px solid #DC2626; }
.recap-rank { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
              background: #F3F3EF; color: var(--ink); font-weight: 800; text-decoration: none; }
.recap-rank:hover { background: var(--yellow); }
.recap-main { flex: 1 1 auto; min-width: 0; }
.recap-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.recap-name { font-size: 17px; font-weight: 800; color: var(--ink); text-decoration: none; }
.recap-name:hover { text-decoration: underline; }
.recap-facts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; font-size: 13px; }
.recap-rev { font-weight: 700; color: #3D3D3A; font-variant-numeric: tabular-nums; }
.recap-sentence { margin: 6px 0 6px; font-size: 14.5px; line-height: 1.5; color: #222; }
.recap-last { margin-top: 6px; color: #3D3D3A; overflow-wrap: anywhere; }
.recap-go { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 20px; }
.recap-other-list { display: flex; flex-wrap: wrap; gap: 8px; }
.recap-other { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
               color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; }
.recap-other:hover { border-color: var(--ink); }
@media (max-width: 760px) {
  .recap-item { gap: 10px; padding: 12px; }
  .recap-facts { margin-left: 0; }
}
.recap-outreach h2 { margin-top: 0; }
.recap-out-list { margin: 0; padding-left: 26px; }
.recap-out-list li { padding: 6px 0; border-top: 1px solid #F3F3EF; font-size: 13.5px; }
.recap-out-list li:first-child { border-top: 0; }
.recap-out-list li > * { margin-right: 6px; vertical-align: middle; }
.recap-out-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.recap-out-name:hover { text-decoration: underline; }
.recap-out-last { overflow-wrap: anywhere; }

/* Email attachments in the composer. */
.cp-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cp-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; width: 100%; }
.cp-files:empty { display: none; }
.cp-files li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: #FAFAF8; font-size: 13px; }
.cp-files a { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.cp-files a:hover { text-decoration: underline; }
.cp-file-x { padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.cp-file-x:hover { background: #F0F0EC; color: #B91C1C; }
.cp-attach-btn { cursor: pointer; padding: 6px 12px; font-size: 13px; }
.cp-email.is-dropping { outline: 3px dashed var(--yellow); outline-offset: 4px; }

/* Weekly review lists: tick "reviewed" and write call notes in place. */
.rv-check { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; vertical-align: middle; }
.rv-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-box { display: inline-block; width: 20px; height: 20px; border: 2px solid #C9C9C2; border-radius: 6px; background: #FFFFFF; }
.rv-check input:checked + .rv-box { background: #16A34A; border-color: #16A34A; }
.rv-check input:checked + .rv-box::after { content: "✓"; display: block; color: #FFFFFF; font-size: 14px; font-weight: 800; line-height: 16px; text-align: center; }
.rv-check input:focus-visible + .rv-box { outline: 2px solid var(--yellow); outline-offset: 2px; }
.rv-check-label { font-size: 13px; font-weight: 600; color: #3D3D3A; }


.rv-notes-row td { background: #FFFDF0; }
.rv-notes { display: flex; flex-direction: column; gap: 4px; }
.rv-notes textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; resize: vertical; background: #FFFFFF; }
.recap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #F3F3EF; }
.recap-actions .rv-note-btn { margin: 0; }
.recap-item .rv-notes { margin-top: 8px; }
.recap-item.is-reviewed { opacity: 0.75; }

/* Review buttons in the lists: clear, with words. */
.rv-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rv-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px;
          background: #FFFFFF; color: #3D3D3A; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.rv-btn:hover { border-color: var(--ink); color: var(--ink); }
.rv-mark.is-on { background: #16A34A; border-color: #16A34A; color: #FFFFFF; }
.rv-mark.is-on:hover { background: #15803D; }
.rv-note-btn.has-notes { background: #FFF8C4; border-color: #F2DC14; color: var(--ink); }
.rv-notes-head { font-size: 13px; color: #3D3D3A; }
.rv-notes-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.done-col .done-mark { color: #16A34A; font-weight: 800; font-size: 16px; }

/* --- Top bar: the less used sections under "More", so the search keeps its room --- */
.nav-more { position: relative; display: flex; }
.nav-more-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 0; border-radius: 7px; background: transparent;
                color: #C9C9C4; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.nav-more-btn:hover, .nav-more.is-open .nav-more-btn { color: #FFFFFF; background: rgba(255, 255, 255, 0.06); }
.nav-more-btn.active { color: var(--ink); background: var(--yellow); }
.nav-more-caret { font-size: 11px; opacity: 0.8; }
.nav-more-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; min-width: 200px; flex-direction: column; gap: 2px;
                 padding: 6px; border: 1px solid #2E2E2B; border-radius: 10px; background: #1A1A19; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.nav-more.is-open .nav-more-menu { display: flex; }
.nav-more-menu a { display: flex; align-items: center; gap: 8px; }
.nav-more-menu a .nav-count { margin-left: auto; }
.gsearch { min-width: 200px; }
@media (min-width: 1081px) and (max-width: 1900px) { .topnav .who { display: none; } }
@media (min-width: 1081px) and (max-width: 1480px) { .nav-more-btn { padding-left: 9px; padding-right: 9px; font-size: 13.5px; } .gsearch { min-width: 170px; } }

/* --- Agenda as cards: see and review in one place ------------------------------- */
.agenda-list { margin: 0; padding: 0; list-style: none; }
.agenda-section { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 14px; color: #3D3D3A; }
.agenda-section:first-child { margin-top: 0; }
.agenda-section.is-quiet { color: var(--muted); }
.agenda-item { cursor: pointer; }
.agenda-item:hover { border-color: #C9C9C2; }
.agenda-item.is-reviewed { opacity: 0.72; background: #F7FBF7; }
.agenda-item .done-mark { padding: 1px 8px; border-radius: 999px; background: #DCFCE7; color: #166534; font-size: 12px; font-weight: 700; }
.agenda-imp { display: inline-block; width: 70px; vertical-align: middle; }
.rv-open { margin-left: auto; color: var(--muted); font-weight: 600; text-decoration: none; }
.rv-open:hover { color: var(--ink); }
.agenda-item .why-list .prod { font-size: 11.5px; padding: 1px 8px; }

/* Focus: Outreach and Quiet as compact rows (one line each, wraps on small screens). */
.agenda-row { margin: 0 0 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; background: #FFFFFF; cursor: pointer; }
.agenda-row:hover { border-color: #C9C9C2; }
.agenda-row.is-reviewed { opacity: 0.72; background: #F7FBF7; }
.agenda-row-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13.5px; }
.agenda-row-last { flex: 1 1 260px; min-width: 0; color: #3D3D3A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recap-rank.is-small { width: 26px; height: 26px; font-size: 12.5px; }
.recap-actions.is-compact { margin: 0 0 0 auto; padding: 0; border: 0; }
.agenda-row .rv-notes { flex-basis: 100%; margin-top: 6px; }
.agenda-row .done-mark { padding: 1px 8px; border-radius: 999px; background: #DCFCE7; color: #166534; font-size: 12px; font-weight: 700; }

/* Suggested action — Claude's one move per account (agenda cards, call, account) */
.recap-action { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 2px 0 8px;
  padding: 7px 12px; border-left: 3px solid #E8D44D; border-radius: 0 8px 8px 0; background: #FFFBE6;
  font-size: 14px; line-height: 1.45; color: #222; }
.recap-action .avatar { align-self: center; width: 22px; height: 22px; font-size: 10px; }
.recap-action .sa-text { flex: 1 1 320px; min-width: 0; }
.recap-action.is-pending { background: #FAFAF7; border-left-color: #DDDDD5; font-size: 13px; }
.sa-label { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #7A6400; white-space: nowrap; }
.sa-when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.agenda-row-action { display: flex; align-items: baseline; gap: 8px; margin: 5px 0 0 34px; font-size: 12.5px; color: #3D3D3A; }
.agenda-row-action .sa-label { font-size: 10.5px; }
.agenda-row-action .sa-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggested { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0 14px; padding: 10px 14px;
  border-left: 3px solid #E8D44D; border-radius: 0 10px 10px 0; background: #FFFBE6; font-size: 14.5px; line-height: 1.45; }
.suggested .sa-label { flex-basis: 100%; }
.suggested .sa-text { flex: 1 1 300px; min-width: 0; }
.suggested .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 640px) {
  .agenda-row-action { margin-left: 0; }
  .agenda-row-action .sa-text { white-space: normal; }
}

/* Cleanup: contact column */
.cl-contact-cell { min-width: 170px; max-width: 240px; }
.cl-contact { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cl-contact-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-contact-email { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-nocontact { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 12px; font-weight: 700; }
.cl-contact-add { margin-top: 3px; padding: 1px 8px; border: 1px dashed #C9C9C2; border-radius: 999px; background: none; color: #3D3D3A; font-size: 12px; cursor: pointer; }
.cl-contact-add:hover { border-style: solid; background: #FFFBE6; }
.cl-contact-form { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cl-contact-form input { width: 100%; padding: 4px 8px; font-size: 13px; }
.cl-contact-form .btn-primary { padding: 3px 12px; font-size: 12.5px; }
.cl-contact-status { flex-basis: 100%; color: #B91C1C; }
.cl-clear { font-size: 13px; font-weight: 600; white-space: nowrap; }
button.kpi { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; font: inherit; color: inherit; cursor: pointer; }

/* Cleanup: status bar — how many accounts the filters leave; sticks under the top bar */
.cl-bar {
  position: sticky; top: var(--topbar-h, 71px); z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, 0.97);
}
.cl-bar.is-stuck { border-radius: 0 0 12px 12px; box-shadow: 0 8px 20px rgba(20, 20, 20, 0.10); }
.cl-bar.is-filtered { border-color: #E8D44D; background: rgba(255, 251, 230, 0.98); }
.cl-bar-count { flex: none; font-size: 14px; color: #3D3D3A; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cl-bar-count b { font-size: 20px; font-weight: 800; color: var(--ink); margin-right: 2px; }
.cl-bar.is-empty .cl-bar-count b { color: #B91C1C; }
.cl-bar-filters { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; flex-wrap: wrap; min-width: 0; }
.cl-bar-pill { padding: 3px 10px; border-radius: 999px; background: #FFFFFF; border: 1px solid #E8D44D; color: #3D3D3A; font-size: 12.5px; }
.cl-bar-pill b { font-weight: 700; }
.cl-bar-act { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }
.cl-bar-sel { padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.cl-bar-up { padding: 5px 12px; font-size: 13px; white-space: nowrap; }
@media (max-width: 760px) {
  .cl-bar { padding: 8px 12px; gap: 8px; }
}
