/* ============================================================
   components.css — Round 1 (consolidated component styles)

   This file replaces the ten styles-additions-v*.css files. It loads
   AFTER tokens.css and base.css.

   Round 1 promise: visual parity with current production. The contents
   below are the v-files concatenated in their original load order, with
   only two transformations:
     1. Each v-file's header comment removed; a section banner inserted
        in its place so you can still locate which sprint added what.
     2. The 3D coverflow carousel CSS (.c3d-*) removed — Round 1 retires
        the coverflow in favor of a horizontal-scroll watched row.
        The new .watched-row-* rules at the bottom of this file replace it.

   What did NOT happen in Round 1: rule deduplication, token migration,
   selector cleanup. Those are Round 2 — best done with the new card
   designs in hand. Doing them blind in Round 1 risks regressions.

   To find a rule: ctrl+F by selector. To find what sprint added it:
   look for the nearest section banner above the rule.
   ============================================================ */


/* ============================================================
   SECTION — Stream tag chips & status-driven cards (Step 1)
   Originally: styles-additions.css
   ============================================================ */

/* ---------- Stream chips (inline, used in cards & elsewhere) ---------- */

.stream-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.stream-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stream-chip-empty {
  background: transparent;
  border: 0.5px dashed rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.45);
  font-style: italic;
}

/* ---------- Stream filter chips (dashboard header) ---------- */

.stream-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}

.stream-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.stream-filter-chip:hover {
  background: rgba(0, 0, 0, 0.04);
}

.stream-filter-chip.is-active {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.35);
  font-weight: 500;
}

.stream-filter-chip.is-untagged {
  border-style: dashed;
  opacity: 0.7;
}

.stream-filter-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stream-filter-chip-count {
  font-size: 11px;
  opacity: 0.6;
  margin-left: 4px;
}

/* ---------- Account cards (new aesthetic) ---------- */

.account-card {
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  background: var(--card-bg-default, transparent);
  font-family: inherit;
}

.account-card:hover {
  transform: translateY(-1px);
}

.account-card.has-status {
  border-color: transparent;
}

.account-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.account-card .card-id-block {
  min-width: 0; /* allow truncation */
  flex: 1;
}

.account-card .card-name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}

.account-card .card-sub {
  font-size: 12px;
  margin-top: 2px;
  opacity: 0.95;
}

.account-card .card-status-pill {
  font-size: 10px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.account-card .card-streams {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.account-card .card-stats {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 8px;
}

.account-card .card-stat {
  flex: 1;
  min-width: 0;
}

.account-card .card-stat-lbl {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 2px;
}

.account-card .card-stat-val {
  font-size: 13px;
  font-weight: 500;
}

.account-card .card-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.account-card .card-action-flag {
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
}

.account-card .card-action-prompt {
  font-weight: 500;
}

.account-card .card-action-detail {
  opacity: 0.75;
}

.account-card .card-action-arrow {
  margin-left: auto;
  opacity: 0.7;
  font-size: 14px;
}

/* ---------- Stream tags editor (in account panel) ---------- */

.stream-tags-editor {
  margin: 16px 0;
}

.ste-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-bottom: 8px;
}

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

.ste-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ste-chip:hover {
  background: rgba(0, 0, 0, 0.04);
}

.ste-chip.is-active {
  font-weight: 500;
  border-width: 1px;
}

.ste-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ste-hint {
  font-size: 11px;
  opacity: 0.55;
  margin-top: 8px;
  font-style: italic;
}

/* ---------- Optional: dark mode safety ---------- */

@media (prefers-color-scheme: dark) {
  .stream-filter-chip { border-color: rgba(255, 255, 255, 0.2); }
  .stream-filter-chip:hover { background: rgba(255, 255, 255, 0.05); }
  .stream-filter-chip.is-active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
  }
  .stream-chip-empty {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
  }
  .account-card { border-color: rgba(255, 255, 255, 0.1); }
  .account-card .card-stats {
    border-top-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  .ste-chip { border-color: rgba(255, 255, 255, 0.2); }
  .ste-chip:hover { background: rgba(255, 255, 255, 0.05); }
}

/* ============================================================
   SECTION — At-a-glance, watched, win prob, panel status (Step 1.5)
   Originally: styles-additions-v2.css
   ============================================================ */

/* ---------- Section labels (homepage) ---------- */

.h-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin: 24px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.h-section-label-count {
  opacity: 0.5;
  font-weight: 400;
}

/* ---------- At-a-glance stats row ---------- */

.ag-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.ag-card {
  background: rgba(0, 0, 0, 0.04);
  padding: 10px 12px;
  border-radius: 8px;
}

.ag-lbl {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.ag-val {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
}

.ag-trend {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 3px;
}

@media (max-width: 540px) {
  .ag-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Account card star + winprob (homepage list) ---------- */

.account-card { position: relative; overflow: hidden; }

.account-card .card-row1 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.account-card .card-star {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.account-card .card-star:hover { transform: scale(1.15); }

.account-card .card-streams { padding-left: 28px; }

.account-card .card-stats {
  margin-left: 28px;
  max-width: 65%;
}

.account-card .card-action { padding-left: 28px; }

.account-card .card-winprob {
  position: absolute;
  right: 18px;
  bottom: 14px;
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -2px;
  -webkit-text-stroke: 1.5px currentColor;
  color: transparent;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
  font-family: inherit;
}

/* ---------- Panel status block (top of opened panel) ---------- */

.psb {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.psb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

.psb-flag {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.psb-prompt {
  font-size: 16px;
  font-weight: 500;
  flex: 1;
}

.psb-pill {
  font-size: 10px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.psb-detail {
  font-size: 13px;
  margin-bottom: 12px;
  opacity: 0.85;
  position: relative;
  z-index: 2;
}

.psb-prob {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -2px;
  -webkit-text-stroke: 1.5px currentColor;
  color: transparent;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.psb-prob-pct { font-size: 38px; }

.psb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  position: relative;
  z-index: 2;
}

.psb-btn {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  transition: opacity 0.15s ease;
}

.psb-btn:hover { opacity: 0.85; }

/* ---------- Dark mode safety ---------- */

@media (prefers-color-scheme: dark) {
  .ag-card { background: rgba(255, 255, 255, 0.06); }
  .c3d-inner { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
  .watched-empty { background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.5); }
  .c3d-arrow { border-color: rgba(255, 255, 255, 0.2); }
  .c3d-arrow:hover { background: rgba(255, 255, 255, 0.05); }
  .c3d-dot { background: rgba(255, 255, 255, 0.25); }
  .c3d-dot.is-active { background: rgba(255, 255, 255, 0.7); }
  .psb-btn { border-color: rgba(255, 255, 255, 0.2); }
}

/* ============================================================
   SECTION — View tabs, list toggles, activities, quotes, dormant (Step 2)
   Originally: styles-additions-v3.css
   ============================================================ */

/* ---------- View tabs ---------- */

.ds-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  width: fit-content;
  margin: 0 0 18px;
  align-items: center;
}

.ds-tab {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.6);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.ds-tab:hover { color: rgba(0, 0, 0, 0.85); }

.ds-tab.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: rgba(0, 0, 0, 0.92);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.ds-tab-count {
  font-size: 11px;
  opacity: 0.55;
  font-weight: 400;
}

.ds-config-btn {
  margin-left: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.55);
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
}

.ds-config-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.85);
}

/* ---------- Config panel ---------- */

.ds-config-panel {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 18px;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
}

.ds-config-header {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 12px;
}

.ds-config-section { margin-bottom: 12px; }

.ds-config-section-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-bottom: 6px;
}

.ds-config-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  cursor: pointer;
}

.ds-config-row input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
}

.ds-config-row-text { flex: 1; }

.ds-config-row-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.ds-config-row-desc {
  font-size: 11px;
  opacity: 0.65;
  line-height: 1.4;
  margin-top: 1px;
}

.ds-config-hint {
  font-size: 11px;
  opacity: 0.55;
  margin-top: 8px;
  font-style: italic;
}

/* ---------- List blocks (containers for each enabled list) ---------- */

.ds-list-block { margin-bottom: 24px; }

.ds-list-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.ds-list-title {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.ds-list-count {
  font-size: 11px;
  opacity: 0.5;
}

.ds-empty {
  font-size: 12px;
  opacity: 0.55;
  font-style: italic;
  padding: 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
}

/* ---------- Activity list ---------- */

.al-empty {
  font-size: 12px;
  opacity: 0.55;
  font-style: italic;
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  text-align: center;
}

.al-group { margin-bottom: 18px; }

.al-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 8px;
}

.al-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.al-group-title {
  font-size: 13px;
  font-weight: 500;
}

.al-group-count {
  font-size: 11px;
  opacity: 0.6;
  margin-left: auto;
}

.al-overdue-badge {
  color: #993C1D;
  font-weight: 500;
}

.al-card {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.al-card:hover { background: rgba(0, 0, 0, 0.04); }
.al-card.is-overdue { background: #FAECE7; }
.al-card.is-overdue:hover { background: #F5DDD2; }
.al-card.is-today { background: #FAEEDA; }
.al-card.is-today:hover { background: #F5E2C2; }

.al-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  margin-top: 6px;
  margin-left: 5px;
}
.al-card.is-overdue .al-bullet { background: #993C1D; }
.al-card.is-today .al-bullet { background: #854F0B; }

.al-body { min-width: 0; }

.al-line1 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.al-line2 {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 2px;
  line-height: 1.3;
}

.al-card.is-overdue .al-line2 { opacity: 0.9; color: #712B13; }
.al-card.is-today .al-line2 { opacity: 0.9; color: #633806; }

.al-due {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  align-self: center;
}

.al-card.is-overdue .al-due { background: #993C1D; color: #fff; }
.al-card.is-today .al-due { background: #854F0B; color: #fff; }

.al-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 400;
}

.al-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.al-more {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.al-more:hover {
  color: rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.03);
}

/* ---------- Quote list ---------- */

.ql-empty {
  font-size: 12px;
  opacity: 0.55;
  font-style: italic;
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  text-align: center;
}

.ql-group { margin-bottom: 18px; }

.ql-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 8px;
}

.ql-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ql-group-title {
  font-size: 13px;
  font-weight: 500;
}

.ql-group-meta {
  font-size: 11px;
  opacity: 0.6;
  margin-left: auto;
}

.ql-row {
  display: grid;
  grid-template-columns: 1.5fr 80px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s ease;
}

.ql-row:hover { background: rgba(0, 0, 0, 0.04); }
.ql-row.is-cooling { background: #FAEEDA; color: #412402; }
.ql-row.is-cooling:hover { background: #F5E2C2; }
.ql-row.is-stalled { background: #FAECE7; color: #4A1B0C; }
.ql-row.is-stalled:hover { background: #F5DDD2; }
.ql-row.is-won { background: #E1F5EE; color: #04342C; }
.ql-row.is-won:hover { background: #D2EAE0; }

.ql-left { min-width: 0; }

.ql-account {
  font-weight: 500;
  font-size: 13px;
}

.ql-sub {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 400;
  margin-top: 1px;
}

.ql-amount {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 13px;
}

.ql-meta {
  font-size: 12px;
  opacity: 0.8;
}

.ql-prob {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  min-width: 36px;
}

.ql-prob.is-high { background: #E1F5EE; color: #085041; }
.ql-prob.is-med  { background: #FAEEDA; color: #633806; }
.ql-prob.is-low  { background: #FAECE7; color: #712B13; }
.ql-prob.is-won  { background: #0F6E56; color: #fff; }

.ql-arrow {
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
}

.ql-row.is-cooling .ql-arrow,
.ql-row.is-stalled .ql-arrow,
.ql-row.is-won .ql-arrow {
  color: inherit;
  opacity: 0.5;
}

.ql-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 400;
}

.ql-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* ---------- Dormant accounts list ---------- */

.da-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.da-header-text {
  font-size: 12px;
  opacity: 0.7;
}

.da-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  opacity: 0.7;
}

.da-threshold-select {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 6px;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.da-empty {
  font-size: 12px;
  opacity: 0.55;
  font-style: italic;
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  text-align: center;
}

.da-list { display: flex; flex-direction: column; gap: 2px; }

.da-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s ease;
}

.da-row:hover { background: rgba(0, 0, 0, 0.04); }

.da-name {
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.da-watched {
  color: #854F0B;
  font-size: 12px;
}

.da-sub {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 1px;
}

.da-streams {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.da-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

.da-chip-empty {
  background: transparent;
  border: 0.5px dashed rgba(0, 0, 0, 0.2);
  font-style: italic;
  opacity: 0.6;
}

.da-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.da-since {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.da-arrow {
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
}

/* ---------- Dark mode safety ---------- */

@media (prefers-color-scheme: dark) {
  .ds-tabs { background: rgba(255, 255, 255, 0.06); }
  .ds-tab { color: rgba(255, 255, 255, 0.6); }
  .ds-tab:hover { color: rgba(255, 255, 255, 0.85); }
  .ds-tab.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
  }
  .ds-config-btn:hover { background: rgba(255, 255, 255, 0.08); }
  .ds-config-panel {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
  }
  .al-card:hover, .ql-row:hover, .da-row:hover { background: rgba(255, 255, 255, 0.05); }
  .da-threshold-select { border-color: rgba(255, 255, 255, 0.2); }
  .al-bullet { background: rgba(255, 255, 255, 0.3); }
  .al-due, .ql-prob, .da-since, .al-chip, .ql-chip, .da-chip {
    background: rgba(255, 255, 255, 0.08);
  }
  .al-more:hover { background: rgba(255, 255, 255, 0.05); }
}

/* ============================================================
   SECTION — Universal infographic row renderer (Step 3)
   Originally: styles-additions-v4.css
   ============================================================ */

/* ---------- Universal infographic row ---------- */

.rr-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  border-radius: 12px;
  margin-bottom: 6px;
  cursor: pointer;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease;
}

.rr-row:hover { transform: translateY(-1px); }

.rr-icon-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.rr-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.rr-star {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  cursor: pointer;
  transition: transform 0.1s ease;
  flex-shrink: 0;
}

.rr-star:hover { transform: scale(1.15); }

.rr-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rr-line1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.rr-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.rr-name-sub {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 400;
}

.rr-action {
  font-size: 13px;
  opacity: 0.85;
  flex: 1;
  min-width: 0;
}

.rr-due {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rr-streams {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.rr-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  font-weight: 400;
}

.rr-chip-empty {
  background: transparent;
  border: 0.5px dashed currentColor;
  font-style: italic;
  opacity: 0.6;
}

.rr-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Context strip ---------- */

.rr-context {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding-top: 8px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.rr-context-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rr-context-lbl {
  font-size: 9.5px;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rr-context-val {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.rr-context-sub {
  font-size: 10px;
  opacity: 0.65;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Sparkline ---------- */

.rr-spark {
  display: inline-flex;
  align-items: flex-end;
  gap: 1px;
  height: 12px;
}

.rr-spark-bar {
  width: 3px;
  background: currentColor;
  opacity: 0.55;
  border-radius: 1px;
  min-height: 1px;
}

/* ---------- Win prob bubble overlay (right side, semi-transparent) ---------- */

.rr-winprob {
  position: absolute;
  right: 14px;
  bottom: 8px;
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -1.5px;
  -webkit-text-stroke: 1.2px currentColor;
  color: transparent;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
  font-family: inherit;
}

/* ---------- Responsive: collapse context strip on narrow screens ---------- */

@media (max-width: 540px) {
  .rr-context {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .rr-context-cell:nth-child(4),
  .rr-context-cell:nth-child(5) {
    display: none;
  }
  .rr-winprob {
    font-size: 28px;
  }
}

/* ---------- Override old activity/quote/dormant row styles ---------- */
/* The .al-card, .ql-row, .da-row classes from v3 are no longer used by the
   list renderers (everything goes through .rr-row), but the group header
   styles are still in use. The .da-list grid is also no longer used.
   We leave v3's headers untouched. */

.da-list,
.al-card,
.ql-row,
.da-row {
  /* legacy classes — no longer rendered, but kept defined to avoid
     accidental visual regression if anywhere still references them. */
}

/* ---------- Dark mode safety ---------- */

@media (prefers-color-scheme: dark) {
  .rr-context { border-top-color: rgba(255, 255, 255, 0.1); }
  .rr-chip { background: rgba(255, 255, 255, 0.08); }
}

/* ============================================================
   SECTION — Touch modal, touch list, version pill (Sprint 2)
   Originally: styles-additions-v5.css
   ============================================================ */

/* ===== Version pill in masthead ===== */
.mast-version {
  margin-top: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #888780;
  letter-spacing: 0.5px;
  cursor: help;
  user-select: none;
}

/* ===== "Log a touch" masthead button ===== */
.btn-secondary {
  display: inline-block;
  margin-top: 8px;
  margin-right: 6px;
  padding: 8px 14px;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #d8d6d0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn-secondary:hover {
  background: #f7f5f1;
  border-color: #1a1a1a;
}

/* ===== Touch modal ===== */
.touch-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  z-index: 9000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 16px;
  overflow-y: auto;
}
.touch-modal-overlay.touch-modal-open {
  display: flex;
}

.touch-modal {
  background: #fdfcf9;
  border-radius: 10px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  overflow: hidden;
  font-family: 'IBM Plex Sans', sans-serif;
}

.touch-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 10px;
  border-bottom: 1px solid #ebe7df;
}
.touch-modal-header h2 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: #1a1a1a;
}
.touch-modal-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #6b6960;
}
.touch-modal-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  color: #888780;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.touch-modal-close:hover { color: #1a1a1a; }

.touch-modal-form {
  padding: 16px 24px 20px;
}

.tm-row {
  margin-bottom: 14px;
}
.tm-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 480px) {
  .tm-row-grid { grid-template-columns: 1fr; }
}
.tm-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #888780;
}
.tm-label-hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: #b3b0a6;
  margin-left: 6px;
}

.tm-segmented {
  display: inline-flex;
  background: #f3f0e9;
  border-radius: 6px;
  padding: 3px;
}
.tm-seg-opt {
  cursor: pointer;
}
.tm-seg-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tm-seg-opt span {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 4px;
  color: #6b6960;
  transition: background 0.12s, color 0.12s;
}
.tm-seg-opt input:checked + span {
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.tm-date-input,
.tm-text-input {
  display: block;
  margin-top: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d8d6d0;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}

.touch-modal-form select,
.touch-modal-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d8d6d0;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: #1a1a1a;
}
.touch-modal-form textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.45;
  font-family: 'IBM Plex Sans', sans-serif;
}
.touch-modal-form select:focus,
.touch-modal-form textarea:focus,
.touch-modal-form input:focus {
  outline: 2px solid #378ADD;
  outline-offset: -1px;
  border-color: transparent;
}

.tm-error {
  background: #FAECE7;
  color: #993C1D;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}

.touch-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #ebe7df;
}
.tm-btn-cancel,
.tm-btn-submit {
  padding: 9px 18px;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
}
.tm-btn-cancel {
  background: #fff;
  color: #1a1a1a;
  border-color: #d8d6d0;
}
.tm-btn-cancel:hover { background: #f7f5f1; }
.tm-btn-submit {
  background: #1a1a1a;
  color: #fff;
}
.tm-btn-submit:hover { background: #2a2a2a; }
.tm-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Touch list (in account panel) ===== */
.panel-touch-list {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #ebe7df;
}
.panel-touch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.panel-touch-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #888780;
}
.panel-touch-count {
  display: inline-block;
  margin-left: 6px;
  color: #b3b0a6;
  font-weight: 500;
}
.panel-touch-add {
  background: transparent;
  border: 1px solid #d8d6d0;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  color: #1a1a1a;
}
.panel-touch-add:hover {
  background: #f7f5f1;
  border-color: #1a1a1a;
}

.panel-touch-empty {
  font-size: 13px;
  color: #b3b0a6;
  padding: 16px;
  text-align: center;
  background: #f7f5f1;
  border-radius: 6px;
}

.panel-touch-row {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
}
.panel-touch-row:hover {
  background: #f7f5f1;
}
.ptr-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ebe7df;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #6b6960;
}
.ptr-meta {
  flex: 1;
  min-width: 0;
}
.ptr-line-1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b6960;
  margin-bottom: 2px;
}
.ptr-channel {
  font-weight: 500;
  color: #1a1a1a;
}
.ptr-direction {
  color: #b3b0a6;
}
.ptr-date {
  color: #888780;
}
.ptr-line-2 {
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ptr-line-full {
  display: none;
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.5;
  white-space: pre-wrap;
  margin-top: 4px;
}
.panel-touch-row-expanded .ptr-line-2 { display: none; }
.panel-touch-row-expanded .ptr-line-full { display: block; }

.ptr-empty {
  color: #b3b0a6;
}

.ptr-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.ptr-badge-planned {
  background: #E6F1FB;
  color: #1F5D9D;
}
.ptr-badge-missed {
  background: #FAECE7;
  color: #993C1D;
}
.ptr-badge-cancelled {
  background: #f3f0e9;
  color: #888780;
}

/* ============================================================
   SECTION — Touch-centric panel, edit modal, account picker (Sprint 2.2)
   Originally: styles-additions-v6.css
   ============================================================ */

/* ===== ROBUST PANEL SHOW/HIDE — fixes regression in 2.1 ===== */

/* Default closed state — panel hidden off-screen, overlay invisible */
#panel {
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  right: -560px;
  width: 540px !important;
  max-width: 90vw !important;
  background: #fdfcf9 !important;
  z-index: 200 !important;
  overflow-y: auto !important;
  transition: right 0.25s cubic-bezier(.2,.7,.3,1) !important;
  box-shadow: -16px 0 32px rgba(0,0,0,0.15) !important;
  visibility: visible !important;
  display: block !important;
  transform: none !important;
  opacity: 1 !important;
}

#panel.panel-open {
  right: 0 !important;
}

#panel-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.4) !important;
  z-index: 199 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s !important;
  visibility: visible !important;
  display: block !important;
}

#panel-overlay.panel-overlay-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* ===== Touch-centric panel ===== */
.tcpanel {
  display: flex;
  flex-direction: column;
  height: 100%;
  font-family: 'IBM Plex Sans', sans-serif;
}

.tcpanel-header {
  position: relative;
  padding: 28px 24px 20px;
  border-bottom: 1px solid #ebe7df;
}

.tcpanel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 0;
  font-size: 24px;
  color: #888780;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.tcpanel-close:hover { color: #1a1a1a; }

/* Pencil edit icon — small, unobtrusive */
.tcpanel-edit-btn {
  position: absolute;
  top: 22px;
  right: 56px;
  background: transparent;
  border: 0;
  font-size: 15px;
  color: #b3b0a6;
  cursor: pointer;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 4px;
  transition: all 0.12s;
}
.tcpanel-edit-btn:hover {
  color: #1a1a1a;
  background: #f7f5f1;
}

.tcpanel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 70px; /* leave room for close + edit buttons */
}

.tcpanel-watched-star {
  background: transparent;
  border: 0;
  font-size: 22px;
  color: #d8d6d0;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
  transition: color 0.12s, transform 0.08s;
}
.tcpanel-watched-star:hover { transform: scale(1.1); }
.tcpanel-watched-on { color: #C49B3A; }

.tcpanel-name {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.2;
}

.tcpanel-meta {
  margin-top: 6px;
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #888780;
}
.tcpanel-meta-extra {
  margin-top: 4px;
  font-size: 12px;
  color: #6b6960;
  font-family: 'IBM Plex Sans', sans-serif;
  letter-spacing: 0;
  text-transform: none;
}
.tcpanel-meta-extra a {
  color: #1F5D9D;
  text-decoration: none;
}
.tcpanel-meta-extra a:hover { text-decoration: underline; }

/* Sections */
.tcpanel-section {
  padding: 20px 24px;
  border-bottom: 1px solid #f3f0e9;
}
.tcpanel-section:last-child { border-bottom: 0; }

.tcpanel-section-label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #888780;
}

/* At a glance — stats grid */
.tcpanel-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 700px) {
  .tcpanel-stats { grid-template-columns: repeat(2, 1fr); }
}
.tcpanel-stat label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #b3b0a6;
  margin-bottom: 4px;
}
.tcpanel-stat strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.2;
}
.tcpanel-stat span {
  display: block;
  font-size: 11px;
  color: #888780;
  margin-top: 2px;
}

/* Revenue stream pills */
.tcpanel-streams {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tcpanel-stream-pill {
  background: transparent;
  border: 1px solid #d8d6d0;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b6960;
  transition: all 0.12s;
}
.tcpanel-stream-pill:hover { border-color: #1a1a1a; }
.tcpanel-stream-on {
  --pill-color: var(--color-ink-700); /* Round 1 fallback when JS doesn't set inline */
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--pill-color);
  box-shadow: inset 0 0 0 1px var(--pill-color);
}
.tcpanel-stream-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.tcpanel-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #b3b0a6;
  font-style: italic;
}

/* Touch history section */
.tcpanel-history-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tcpanel-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.tcpanel-history-count {
  display: inline-block;
  margin-left: 6px;
  color: #b3b0a6;
  font-weight: 500;
  font-size: 12px;
}
.tcpanel-history-add {
  background: #1a1a1a;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s;
}
.tcpanel-history-add:hover { background: #2a2a2a; }

.tcpanel-history-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tcpanel-empty {
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: #b3b0a6;
  background: #f7f5f1;
  border-radius: 6px;
}

.tcpanel-touch-row {
  display: flex;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #f3f0e9;
}
.tcpanel-touch-row:hover { background: #f7f5f1; }
.tcpanel-touch-row:last-child { border-bottom: 0; }

.tcpr-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ebe7df;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #6b6960;
}
.tcpr-meta {
  flex: 1;
  min-width: 0;
}
.tcpr-line-1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b6960;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.tcpr-channel {
  font-weight: 600;
  color: #1a1a1a;
}
.tcpr-direction { color: #b3b0a6; }
.tcpr-date { color: #888780; }
.tcpr-contact { color: #1F5D9D; font-size: 11px; }

.tcpr-line-2 {
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tcpr-line-full {
  display: none;
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.55;
  white-space: pre-wrap;
  margin-top: 4px;
}
.tcpanel-touch-row-expanded .tcpr-line-2 { display: none; }
.tcpanel-touch-row-expanded .tcpr-line-full { display: block; }
.tcpr-empty { color: #b3b0a6; }

.tcpr-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.tcpr-badge-planned { background: #E6F1FB; color: #1F5D9D; }
.tcpr-badge-missed { background: #FAECE7; color: #993C1D; }
.tcpr-badge-cancelled { background: #f3f0e9; color: #888780; }


/* ===== Account Edit Modal ===== */
.aem-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  z-index: 9100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 16px;
  overflow-y: auto;
}
.aem-overlay.aem-open { display: flex; }

.aem-modal {
  background: #fdfcf9;
  border-radius: 10px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  overflow: hidden;
  font-family: 'IBM Plex Sans', sans-serif;
}

.aem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px 14px;
  border-bottom: 1px solid #ebe7df;
}
.aem-header h2 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: #1a1a1a;
}
.aem-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  color: #888780;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.aem-close:hover { color: #1a1a1a; }

.aem-form {
  padding: 16px 24px 20px;
}

.aem-row { margin-bottom: 14px; }
.aem-row-grid {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 14px;
}
.aem-row-grid-3 {
  display: grid;
  grid-template-columns: 1fr 80px 100px;
  gap: 14px;
}
@media (max-width: 480px) {
  .aem-row-grid-3 { grid-template-columns: 1fr; }
}
.aem-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #888780;
}
.aem-form input,
.aem-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d8d6d0;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: #1a1a1a;
  font-family: 'IBM Plex Sans', sans-serif;
}
.aem-form textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.45;
}
.aem-form input:focus,
.aem-form textarea:focus {
  outline: 2px solid #378ADD;
  outline-offset: -1px;
  border-color: transparent;
}

.aem-section-divider {
  margin: 16px 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #b3b0a6;
  border-top: 1px solid #f3f0e9;
  padding-top: 14px;
}

.aem-error {
  background: #FAECE7;
  color: #993C1D;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}

.aem-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #ebe7df;
}
.aem-spacer { flex: 1; }
.aem-delete,
.aem-cancel,
.aem-save {
  padding: 9px 18px;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
}
.aem-delete {
  background: transparent;
  color: #993C1D;
  border-color: #FAECE7;
}
.aem-delete:hover { background: #FAECE7; }
.aem-cancel {
  background: #fff;
  color: #1a1a1a;
  border-color: #d8d6d0;
}
.aem-cancel:hover { background: #f7f5f1; }
.aem-save {
  background: #1a1a1a;
  color: #fff;
}
.aem-save:hover { background: #2a2a2a; }
.aem-save:disabled { opacity: 0.6; cursor: not-allowed; }


/* ===== Account Picker Modal ===== */
.apm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  z-index: 9050;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 16px;
}
.apm-overlay.apm-open { display: flex; }

.apm-modal {
  background: #fdfcf9;
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  overflow: hidden;
  font-family: 'IBM Plex Sans', sans-serif;
}

.apm-header {
  padding: 18px 24px 12px;
  border-bottom: 1px solid #ebe7df;
}
.apm-header h2 {
  margin: 0 0 10px;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  color: #1a1a1a;
}
.apm-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d8d6d0;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
}
.apm-search:focus {
  outline: 2px solid #378ADD;
  outline-offset: -1px;
  border-color: transparent;
}
.apm-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.apm-row {
  padding: 10px 24px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #f3f0e9;
}
.apm-row:hover {
  background: #f7f5f1;
}
.apm-row-name {
  font-weight: 500;
  color: #1a1a1a;
  font-size: 14px;
}
.apm-row-meta {
  font-size: 12px;
  color: #888780;
  margin-top: 2px;
}
.apm-empty {
  padding: 24px;
  text-align: center;
  color: #b3b0a6;
  font-size: 13px;
}


/* ===== Smart context strip in TouchModal ===== */
.tm-context-strip {
  background: #fdfaf3;
  border: 1px solid #f0e8d3;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}
.tm-context-strip-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #888780;
  margin-bottom: 4px;
}
.tm-context-strip-text {
  color: #1a1a1a;
  line-height: 1.4;
}
.tm-context-strip-text strong {
  font-weight: 600;
}

/* ============================================================
   SECTION — Touch detail modal, dashboard activity stream (Sprint 2.3)
   Originally: styles-additions-v7.css
   ============================================================ */

/* ===== Dashboard Activity Stream ===== */
.dash-activity {
  background: transparent;
}

.dash-activity-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #ebe7df;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dash-activity-tab {
  background: transparent;
  border: 0;
  padding: 8px 14px 10px;
  font: inherit;
  font-size: 13px;
  color: #888780;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
  margin-bottom: -1px;
}
.dash-activity-tab:hover { color: #1a1a1a; }
.dash-activity-tab-active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
  font-weight: 500;
}
.dash-activity-tab-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: #b3b0a6;
  font-weight: 400;
}
.dash-activity-tab-active .dash-activity-tab-count { color: #888780; }

.dash-activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-activity-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: #b3b0a6;
  background: #f7f5f1;
  border-radius: 6px;
}

.dash-activity-row {
  display: flex;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #f3f0e9;
}
.dash-activity-row:hover { background: #f7f5f1; }
.dash-activity-row:last-child { border-bottom: 0; }

.dar-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ebe7df;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #6b6960;
}
.dar-meta { flex: 1; min-width: 0; }
.dar-line-1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b6960;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.dar-account {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 13px;
}
.dar-channel {
  font-weight: 500;
  color: #1a1a1a;
}
.dar-direction { color: #b3b0a6; }
.dar-date { color: #888780; }
.dar-contact { color: #1F5D9D; font-size: 11px; }
.dar-body {
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dar-empty { color: #b3b0a6; }

.dash-activity-loadmore {
  margin-top: 12px;
  width: 100%;
  background: transparent;
  border: 1px solid #d8d6d0;
  border-radius: 6px;
  padding: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: #1a1a1a;
}
.dash-activity-loadmore:hover {
  background: #f7f5f1;
  border-color: #1a1a1a;
}
.dash-activity-more-note {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: #b3b0a6;
  font-style: italic;
}


/* ===== Touch Detail Modal ===== */
.tdm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  z-index: 9300;  /* above other modals so chain navigation works */
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 16px;
  overflow-y: auto;
}
.tdm-overlay.tdm-open { display: flex; }

.tdm-modal {
  background: #fdfcf9;
  border-radius: 10px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  overflow: hidden;
  font-family: 'IBM Plex Sans', sans-serif;
}

.tdm-content { display: flex; flex-direction: column; }

.tdm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #ebe7df;
}
.tdm-header-text { flex: 1; min-width: 0; padding-right: 12px; }

.tdm-channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tdm-icon {
  font-size: 20px;
  color: #6b6960;
}
.tdm-title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: #1a1a1a;
}
.tdm-direction-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #6b6960;
  background: #f3f0e9;
  padding: 3px 8px;
  border-radius: 4px;
}

.tdm-subtitle {
  font-size: 14px;
  color: #6b6960;
  margin-bottom: 6px;
}
.tdm-subtitle strong { color: #1a1a1a; font-weight: 600; }

.tdm-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tdm-date {
  font-size: 13px;
  color: #888780;
}
.tdm-status-completed {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #1D9E75;
  background: #E1F5EE;
  padding: 3px 8px;
  border-radius: 4px;
}

.tdm-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  color: #888780;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.tdm-close:hover { color: #1a1a1a; }

/* Sections */
.tdm-section {
  padding: 18px 24px;
  border-bottom: 1px solid #f3f0e9;
}
.tdm-section:last-of-type { border-bottom: 0; }

.tdm-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.tdm-section-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #888780;
}
.tdm-section-count {
  display: inline-block;
  margin-left: 4px;
  color: #b3b0a6;
  font-weight: 500;
}

.tdm-edit-body, .tdm-plan-followup {
  background: transparent;
  border: 1px solid #d8d6d0;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  color: #6b6960;
}
.tdm-edit-body:hover, .tdm-plan-followup:hover {
  background: #f7f5f1;
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.tdm-body {
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1.5;
  white-space: pre-wrap;
}
.tdm-empty { color: #b3b0a6; font-style: italic; }

/* Inline edit */
.tdm-body-edit { display: flex; flex-direction: column; gap: 8px; }
.tdm-body-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d8d6d0;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: #1a1a1a;
  font-family: 'IBM Plex Sans', sans-serif;
  resize: vertical;
  line-height: 1.5;
}
.tdm-body-textarea:focus {
  outline: 2px solid #378ADD;
  outline-offset: -1px;
  border-color: transparent;
}
.tdm-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.tdm-edit-cancel, .tdm-edit-save {
  padding: 6px 12px;
  border-radius: 5px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
}
.tdm-edit-cancel {
  background: #fff;
  color: #1a1a1a;
  border-color: #d8d6d0;
}
.tdm-edit-cancel:hover { background: #f7f5f1; }
.tdm-edit-save { background: #1a1a1a; color: #fff; }
.tdm-edit-save:hover { background: #2a2a2a; }
.tdm-edit-save:disabled { opacity: 0.6; cursor: not-allowed; }

/* Touch references (parent + children) */
.tdm-touch-ref {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f0e8d3;
  border-radius: 6px;
  background: #fdfaf3;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  margin-bottom: 6px;
}
.tdm-touch-ref:hover {
  background: #faf3e3;
  border-color: #C49B3A;
}
.tdm-touch-ref-arrow {
  flex: 0 0 18px;
  font-size: 16px;
  color: #888780;
  text-align: center;
  font-weight: 600;
}
.tdm-touch-ref-content { flex: 1; min-width: 0; }
.tdm-touch-ref-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #6b6960;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.tdm-touch-ref-date { color: #888780; }
.tdm-touch-ref-body {
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.4;
}

.tdm-empty-followups {
  font-size: 13px;
  color: #b3b0a6;
  padding: 12px;
  text-align: center;
  background: #f7f5f1;
  border-radius: 6px;
  font-style: italic;
}

.tdm-followups {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Meta details */
.tdm-meta-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 13px;
}
.tdm-meta-list dt {
  color: #888780;
  font-weight: 500;
}
.tdm-meta-list dd {
  margin: 0;
  color: #1a1a1a;
}

.tdm-attachments-coming {
  font-size: 13px;
  color: #b3b0a6;
  padding: 16px;
  text-align: center;
  background: #f7f5f1;
  border-radius: 6px;
  font-style: italic;
}

/* Footer */
.tdm-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid #ebe7df;
  background: #fdfcf9;
}
.tdm-spacer { flex: 1; }
.tdm-btn-delete, .tdm-btn-close {
  padding: 9px 18px;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
}
.tdm-btn-delete {
  background: transparent;
  color: #993C1D;
  border-color: #FAECE7;
}
.tdm-btn-delete:hover { background: #FAECE7; }
.tdm-btn-close {
  background: #1a1a1a;
  color: #fff;
}
.tdm-btn-close:hover { background: #2a2a2a; }


/* ===== Touch row enhancements (chain indicator + arrow) ===== */
.tcpr-chain {
  display: inline-block;
  font-size: 11px;
  color: #C49B3A;
  margin-right: 2px;
  cursor: help;
}
.tcpr-arrow {
  flex: 0 0 16px;
  color: #d8d6d0;
  font-size: 18px;
  align-self: center;
  font-weight: 300;
  transition: color 0.12s, transform 0.12s;
}
.tcpanel-touch-row:hover .tcpr-arrow {
  color: #1a1a1a;
  transform: translateX(2px);
}


/* ===== Smart context strip — make it look clickable ===== */
.tm-context-strip {
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.tm-context-strip:hover {
  background: #faf3e3;
  border-color: #C49B3A;
}
.tm-context-strip-cta {
  font-weight: 500;
  color: #C49B3A;
  letter-spacing: 0;
  text-transform: none;
  font-size: 11px;
}

/* ============================================================
   SECTION — Quotes — badges, dashboard quotes, quote modal, detail modal (Sprint 3)
   Originally: styles-additions-v8.css
   ============================================================ */

/* ---------- Status & Source badges (used everywhere) ---------- */
.qtsb {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.qsrcb {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Dashboard quotes section ---------- */
.dash-quotes {
  background: var(--paper, #faf8f3);
  border: 1px solid #e6e1d5;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.dash-quotes-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e6e1d5;
  padding-bottom: 8px;
  flex-wrap: wrap;
}
.dash-quotes-tab {
  background: transparent;
  border: 1px solid #e6e1d5;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: #6b6960;
  transition: all 0.15s;
  font-family: inherit;
}
.dash-quotes-tab:hover { background: #f3f0e9; }
.dash-quotes-tab-active {
  background: #1F5D9D;
  border-color: #1F5D9D;
  color: white;
}
.dash-quotes-tab-count {
  display: inline-block;
  padding: 0 5px;
  border-radius: 8px;
  background: rgba(0,0,0,0.08);
  font-size: 0.72rem;
  margin-left: 4px;
}
.dash-quotes-tab-active .dash-quotes-tab-count { background: rgba(255,255,255,0.25); }
.dash-quotes-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-quotes-empty {
  padding: 24px;
  color: #888780;
  font-size: 0.9rem;
  text-align: center;
}
.dash-quotes-row {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
  background: white;
  border: 1px solid #ece7db;
  cursor: pointer;
  transition: all 0.12s;
  align-items: center;
}
.dash-quotes-row:hover {
  background: #f7f4ec;
  border-color: #d8d2c4;
  transform: translateX(2px);
}
.dqr-left { flex: 1; min-width: 0; }
.dqr-line-1 {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.dqr-serial {
  background: #f3f0e9;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #5b5950;
}
.dqr-tag {
  background: #E6F1FB;
  color: #1F5D9D;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.dqr-line-2 {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.dqr-account { color: #2a2a2a; }
.dqr-title {
  color: #6b6960;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dqr-line-3 {
  font-size: 0.78rem;
  color: #888780;
}
.dqr-right {
  text-align: right;
  flex-shrink: 0;
}
.dqr-amount {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  color: #1D9E75;
}
.dqr-win-prob {
  font-size: 0.78rem;
  color: #888780;
  margin-top: 2px;
}
.dash-quotes-more {
  padding: 8px;
  text-align: center;
  font-size: 0.78rem;
  color: #888780;
}

/* ---------- Account panel: Quotes section ---------- */
.tcpanel-quotes-section {
  border-bottom: 1px solid #e6e1d5;
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.tcpanel-quotes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.tcpanel-quotes-count {
  display: inline-block;
  padding: 1px 8px;
  background: #f3f0e9;
  color: #6b6960;
  border-radius: 10px;
  font-size: 0.78rem;
  margin-left: 6px;
  font-weight: 500;
}
.tcpanel-quotes-add {
  background: #E1F5EE;
  color: #1D9E75;
  border: 1px solid #B5E0CD;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.tcpanel-quotes-add:hover {
  background: #1D9E75;
  color: white;
  border-color: #1D9E75;
}
.tcpanel-quotes-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tcpanel-quote-row {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  background: white;
  border: 1px solid #ece7db;
  cursor: pointer;
  transition: all 0.12s;
  align-items: center;
}
.tcpanel-quote-row:hover {
  background: #f7f4ec;
  border-color: #d8d2c4;
}
.tcpqr-left { flex: 1; min-width: 0; }
.tcpqr-line-1 {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.tcpqr-serial {
  background: #f3f0e9;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.76rem;
  color: #5b5950;
}
.tcpqr-tag {
  background: #E6F1FB;
  color: #1F5D9D;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
}
.tcpqr-title {
  font-size: 0.92rem;
  color: #2a2a2a;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tcpqr-meta {
  font-size: 0.76rem;
  color: #888780;
}
.tcpqr-right {
  text-align: right;
  flex-shrink: 0;
}
.tcpqr-amount {
  font-size: 1rem;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  color: #1D9E75;
}
.tcpqr-win {
  font-size: 0.74rem;
  color: #888780;
  margin-top: 2px;
}

/* ---------- Touch row: $ indicator for linked quotes ---------- */
.tcpr-quote-link {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #1D9E75;
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  line-height: 16px;
  margin-right: 4px;
  cursor: help;
}

/* ---------- Quote modal ---------- */
.qm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  overflow-y: auto;
  padding: 5vh 16px;
}
.qm-overlay.qm-open {
  opacity: 1;
  pointer-events: auto;
}
.qm-modal {
  background: var(--paper, #faf8f3);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  margin: 0 auto;
  overflow: hidden;
}
.qm-content { padding: 0; }
.qm-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid #e6e1d5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.qm-title-text {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #2a2a2a;
}
.qm-subtitle {
  font-size: 0.9rem;
  color: #6b6960;
}
.qm-subtitle code {
  background: #f3f0e9;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
}
.qm-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #888780;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.qm-close:hover { background: #ece7db; color: #2a2a2a; }
.qm-origin-strip {
  background: #E1F5EE;
  border-left: 3px solid #1D9E75;
  margin: 0 24px;
  padding: 10px 14px;
  font-size: 0.86rem;
  color: #2a2a2a;
  margin-top: 14px;
  border-radius: 4px;
}
.qm-form {
  padding: 16px 24px 20px;
}
.qm-row { margin-bottom: 14px; }
.qm-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.qm-row-grid .qm-row { margin-bottom: 0; }
.qm-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2a2a2a;
  margin-bottom: 4px;
}
.qm-req {
  background: #FAECE7;
  color: #993C1D;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  margin-left: 4px;
}
.qm-hint {
  color: #888780;
  font-weight: 400;
  font-size: 0.78rem;
  margin-left: 4px;
}
.qm-input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d8d2c4;
  border-radius: 6px;
  background: white;
  font-family: inherit;
  font-size: 0.95rem;
  color: #2a2a2a;
  box-sizing: border-box;
}
.qm-input:focus {
  outline: none;
  border-color: #1F5D9D;
  box-shadow: 0 0 0 3px rgba(31, 93, 157, 0.15);
}
.qm-tag-input {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.qm-amount-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.qm-currency-prefix {
  position: absolute;
  left: 10px;
  color: #888780;
  pointer-events: none;
  font-weight: 500;
}
.qm-amount-input { padding-left: 22px; }
.qm-prob-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qm-prob-wrap input[type=range] { flex: 1; }
.qm-prob-display {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: #1F5D9D;
  min-width: 42px;
  text-align: right;
}
.qm-quick-status {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.qm-quick-label {
  font-size: 0.82rem;
  color: #888780;
}
.qm-quick-btn {
  background: #FAEEDA;
  color: #996024;
  border: 1px solid #EBC685;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.qm-quick-btn:hover {
  background: #996024;
  color: white;
  border-color: #996024;
}
.qm-error {
  background: #FAECE7;
  color: #993C1D;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.86rem;
  margin-bottom: 14px;
}
.qm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}
.qm-btn-cancel {
  background: transparent;
  color: #6b6960;
  border: 1px solid #d8d2c4;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.qm-btn-cancel:hover { background: #f3f0e9; }
.qm-btn-submit {
  background: #1D9E75;
  color: white;
  border: 1px solid #1D9E75;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.qm-btn-submit:hover { background: #18815f; }
.qm-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Quote detail modal ---------- */
.qdm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  overflow-y: auto;
  padding: 5vh 16px;
}
.qdm-overlay.qdm-open {
  opacity: 1;
  pointer-events: auto;
}
.qdm-modal {
  background: var(--paper, #faf8f3);
  border-radius: 12px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  margin: 0 auto;
  overflow: hidden;
}
.qdm-content { padding: 0; }
.qdm-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid #e6e1d5;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.qdm-id-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.qdm-serial {
  background: #f3f0e9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.86rem;
  color: #5b5950;
}
.qdm-tag {
  background: #E6F1FB;
  color: #1F5D9D;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
}
.qdm-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 6px 0 4px 0;
  color: #2a2a2a;
}
.qdm-account-line {
  font-size: 0.95rem;
  color: #6b6960;
}
.qdm-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #888780;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}
.qdm-close:hover { background: #ece7db; color: #2a2a2a; }
.qdm-section {
  padding: 14px 24px;
  border-bottom: 1px solid #e6e1d5;
}
.qdm-section:last-of-type { border-bottom: none; }
.qdm-section-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b6960;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 10px 0;
}
.qdm-section-count {
  display: inline-block;
  padding: 1px 8px;
  background: #f3f0e9;
  color: #6b6960;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 500;
  margin-left: 4px;
}
.qdm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.qdm-stats-section { background: #f7f4ec; }
.qdm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.qdm-stat label {
  display: block;
  font-size: 0.74rem;
  color: #888780;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.qdm-stat strong {
  display: block;
  font-size: 1.2rem;
  font-family: 'Fraunces', serif;
  color: #2a2a2a;
  font-weight: 600;
}
.qdm-stat span {
  display: block;
  font-size: 0.78rem;
  color: #888780;
  margin-top: 2px;
}
.qdm-body {
  font-size: 0.92rem;
  color: #2a2a2a;
  line-height: 1.55;
  background: white;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #ece7db;
}
.qdm-notes { background: #FAEEDA; border-color: #EBC685; }
.qdm-origin-section { background: #E1F5EE; }
.qdm-origin-note {
  font-size: 0.82rem;
  color: #18815f;
  margin-top: 6px;
  font-style: italic;
}
.qdm-no-origin {
  font-size: 0.88rem;
  color: #6b6960;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px dashed #d8d2c4;
}
.qdm-empty {
  font-size: 0.88rem;
  color: #888780;
  font-style: italic;
  padding: 8px;
  text-align: center;
}
.qdm-touch-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qdm-touch-ref {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  background: white;
  border: 1px solid #ece7db;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}
.qdm-touch-ref:hover {
  background: #f7f4ec;
  border-color: #d8d2c4;
}
.qdm-touch-ref-marker {
  font-size: 1.1rem;
  color: #1D9E75;
  font-weight: 700;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.qdm-touch-ref-content { flex: 1; min-width: 0; }
.qdm-touch-ref-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.84rem;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.qdm-touch-ref-date { color: #888780; }
.qdm-touch-ref-body {
  font-size: 0.84rem;
  color: #6b6960;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qdm-status-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qdm-status-btn {
  background: white;
  border: 1px solid;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.qdm-status-btn:hover {
  background: currentColor;
  filter: brightness(0.94);
}
.qdm-status-btn:hover { color: white !important; }
.qdm-meta-section { background: #f7f4ec; }
.qdm-meta-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 0.84rem;
}
.qdm-meta-list dt { color: #888780; font-weight: 500; }
.qdm-meta-list dd { margin: 0; color: #2a2a2a; }
.qdm-attachments-coming {
  margin-top: 10px;
  padding: 10px;
  background: white;
  border: 1px dashed #d8d2c4;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #888780;
  text-align: center;
}
.qdm-footer {
  padding: 14px 24px;
  background: #f3f0e9;
  display: flex;
  align-items: center;
  gap: 10px;
}
.qdm-btn-delete {
  background: transparent;
  border: 1px solid #FAECE7;
  color: #993C1D;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: inherit;
}
.qdm-btn-delete:hover { background: #993C1D; color: white; border-color: #993C1D; }
.qdm-btn-edit {
  background: white;
  border: 1px solid #d8d2c4;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.qdm-btn-edit:hover { background: #1F5D9D; color: white; border-color: #1F5D9D; }
.qdm-btn-close {
  background: transparent;
  border: 1px solid #d8d2c4;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: inherit;
}
.qdm-btn-close:hover { background: #ece7db; }
.qdm-spacer { flex: 1; }

/* ---------- Touch detail: linked quotes section additions ---------- */
.tdm-convert-quote {
  background: #E1F5EE;
  color: #1D9E75;
  border: 1px solid #B5E0CD;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.tdm-convert-quote:hover {
  background: #1D9E75;
  color: white;
  border-color: #1D9E75;
}
.tdm-empty-quotes {
  padding: 12px;
  background: #FAEEDA;
  color: #6b5b3d;
  border: 1px dashed #EBC685;
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.5;
}
.tdm-quotes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tdm-quote-ref {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  background: white;
  border: 1px solid #ece7db;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}
.tdm-quote-ref:hover {
  background: #f7f4ec;
  border-color: #1D9E75;
}
.tdm-quote-marker {
  font-size: 1.1rem;
  color: #1D9E75;
  font-weight: 700;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.tdm-quote-content { flex: 1; min-width: 0; }
.tdm-quote-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.tdm-quote-meta code {
  background: #f3f0e9;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.76rem;
  color: #5b5950;
}
.tdm-quote-tag {
  background: #E6F1FB !important;
  color: #1F5D9D !important;
  font-weight: 600;
}
.tdm-quote-amount {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: #1D9E75;
}
.tdm-quote-title {
  font-size: 0.9rem;
  color: #2a2a2a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Mobile responsive ---------- */
@media (max-width: 600px) {
  .qm-row-grid { grid-template-columns: 1fr; }
  .qdm-stats { grid-template-columns: 1fr 1fr; }
  .qdm-meta-list { grid-template-columns: 1fr; }
  .dash-quotes-row { flex-wrap: wrap; }
  .dqr-right { width: 100%; text-align: left; display: flex; gap: 12px; }
  .dqr-amount { font-size: 0.95rem; }
}

/* ============================================================
   Sprint 3.1 additions: outcome modal, action bars, interest badges
   ============================================================ */

/* ---------- Top action bar in account panel ---------- */
.tcpanel-action-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, #faf6ec, #f7f4ec);
  border-bottom: 1px solid #e6e1d5;
  margin-bottom: 0;
}
.tcpanel-action-touch,
.tcpanel-action-quote {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  border: 1px solid;
}
.tcpanel-action-touch {
  background: white;
  color: #1F5D9D;
  border-color: #B5D2EE;
}
.tcpanel-action-touch:hover {
  background: #1F5D9D;
  color: white;
  border-color: #1F5D9D;
}
.tcpanel-action-quote {
  background: #1D9E75;
  color: white;
  border-color: #1D9E75;
}
.tcpanel-action-quote:hover {
  background: #18815f;
  border-color: #18815f;
}

/* ---------- Action bar in touch detail modal ---------- */
.tdm-action-bar {
  display: flex;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(to bottom, #faf6ec, #f7f4ec);
  border-bottom: 1px solid #e6e1d5;
}
.tdm-action-primary,
.tdm-action-secondary,
.tdm-action-quote {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  border: 1px solid;
  flex: 1;
}
.tdm-action-primary {
  background: #1F5D9D;
  color: white;
  border-color: #1F5D9D;
}
.tdm-action-primary:hover { background: #1a4f86; }
.tdm-action-secondary {
  background: white;
  color: #6b6960;
  border-color: #d8d2c4;
}
.tdm-action-secondary:hover {
  background: #f3f0e9;
  color: #2a2a2a;
  border-color: #888780;
}
.tdm-action-quote {
  background: #1D9E75;
  color: white;
  border-color: #1D9E75;
}
.tdm-action-quote:hover { background: #18815f; }

/* ---------- Touch row quick-outcome shortcut button ---------- */
.tcpr-quick-outcome {
  background: #1F5D9D;
  color: white;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  margin: auto 4px;
  transition: all 0.12s;
}
.tcpr-quick-outcome:hover { background: #18815f; transform: scale(1.1); }

/* ---------- Customer interest badge (used in touch row + touch detail) ---------- */
.tom-interest-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Outcome data display in touch detail ---------- */
.tdm-outcome-section {
  background: #f7f4ec;
}
.tdm-outcome-quote {
  background: white;
  border-left: 3px solid #1D9E75;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.tdm-outcome-quote-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b6960;
  font-weight: 600;
  margin-bottom: 4px;
}
.tdm-outcome-quote-text {
  font-size: 0.95rem;
  color: #2a2a2a;
  line-height: 1.55;
  font-family: 'Fraunces', serif;
  font-style: italic;
}
.tdm-outcome-list {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 0.86rem;
}
.tdm-outcome-list dt { color: #888780; font-weight: 500; }
.tdm-outcome-list dd { margin: 0; color: #2a2a2a; }
.tdm-internal-note {
  background: #FAEEDA;
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 3px solid #EBC685;
}
.tdm-term-chip {
  display: inline-block;
  background: #E6F1FB;
  color: #1F5D9D;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  margin-right: 4px;
  margin-bottom: 2px;
  font-family: 'IBM Plex Mono', monospace;
}

/* ---------- Outcome modal (TouchOutcomeModal / .tom-) ---------- */
.tom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 220;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  overflow-y: auto;
  padding: 4vh 16px;
}
.tom-overlay.tom-open {
  opacity: 1;
  pointer-events: auto;
}
.tom-modal {
  background: var(--paper, #faf8f3);
  border-radius: 12px;
  width: 100%;
  max-width: 720px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  margin: 0 auto;
  overflow: hidden;
}
.tom-content { padding: 0; }
.tom-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid #e6e1d5;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(to bottom, white, #faf8f3);
}
.tom-title {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #2a2a2a;
}
.tom-subtitle {
  font-size: 0.95rem;
  color: #6b6960;
}
.tom-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #888780;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tom-close:hover { background: #ece7db; color: #2a2a2a; }

.tom-form { padding: 18px 24px 24px; }
.tom-section { margin-bottom: 18px; }
.tom-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.tom-section-grid .tom-section { margin-bottom: 0; }
.tom-section-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #2a2a2a;
  margin-bottom: 6px;
}
.tom-req {
  background: #FAECE7;
  color: #993C1D;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  margin-left: 4px;
}
.tom-hint {
  color: #888780;
  font-weight: 400;
  font-size: 0.78rem;
}

/* The 4 path buttons */
.tom-paths {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.tom-path-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: white;
  border: 2px solid #ece7db;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.12s;
}
.tom-path-btn:hover {
  border-color: var(--path-color, #888780);
  background: var(--path-bg, #f3f0e9);
}
.tom-path-btn.tom-path-active {
  border-color: var(--path-color, #888780);
  background: var(--path-bg, #f3f0e9);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}
.tom-path-btn strong {
  font-size: 1rem;
  color: var(--path-color, #2a2a2a);
  font-weight: 600;
  margin-bottom: 4px;
}
.tom-path-btn span {
  font-size: 0.82rem;
  color: #6b6960;
  font-weight: 400;
}

/* Details — hidden until path picked */
.tom-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s, opacity 0.3s;
}
.tom-details.tom-details-shown {
  max-height: 2000px;
  opacity: 1;
  margin-top: 18px;
}

/* "What did they say" — emphasized */
.tom-section-priority {
  background: #E1F5EE;
  border: 1px solid #B5E0CD;
  border-radius: 8px;
  padding: 14px;
}
.tom-section-priority .tom-section-label { color: #18815f; }
.tom-priority-note {
  font-size: 0.82rem;
  color: #18815f;
  margin-top: 6px;
  font-style: italic;
}

.tom-input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d8d2c4;
  border-radius: 6px;
  background: white;
  font-family: inherit;
  font-size: 0.95rem;
  color: #2a2a2a;
  box-sizing: border-box;
  resize: vertical;
}
.tom-input:focus {
  outline: none;
  border-color: #1D9E75;
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.18);
}

/* Interest pills */
.tom-interest-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tom-interest-pill {
  background: white;
  border: 1px solid #d8d2c4;
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  color: #6b6960;
}
.tom-interest-pill:hover {
  background: var(--p-bg, #f3f0e9);
  color: var(--p-color, #2a2a2a);
  border-color: var(--p-color, #888780);
}
.tom-interest-pill.tom-interest-active {
  background: var(--p-color, #1F5D9D);
  color: white;
  border-color: var(--p-color, #1F5D9D);
  font-weight: 600;
}

.tom-error {
  background: #FAECE7;
  color: #993C1D;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.86rem;
  margin-bottom: 14px;
}

.tom-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #ece7db;
  margin-top: 18px;
  flex-wrap: wrap;
}
.tom-followup-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tom-followup-btn {
  background: white;
  border: 1px dashed #d8d2c4;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.84rem;
  cursor: pointer;
  font-family: inherit;
  color: #6b6960;
  transition: all 0.12s;
}
.tom-followup-btn:hover {
  background: #f3f0e9;
  color: #2a2a2a;
  border-style: solid;
}
.tom-followup-btn.tom-followup-active {
  background: #1F5D9D;
  color: white;
  border-color: #1F5D9D;
  border-style: solid;
}
.tom-quote-btn.tom-followup-active {
  background: #1D9E75;
  border-color: #1D9E75;
}
.tom-spacer { flex: 1; }
.tom-btn-cancel {
  background: transparent;
  color: #6b6960;
  border: 1px solid #d8d2c4;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.tom-btn-cancel:hover { background: #f3f0e9; }
.tom-btn-save {
  background: #1D9E75;
  color: white;
  border: 1px solid #1D9E75;
  border-radius: 6px;
  padding: 8px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.tom-btn-save:hover { background: #18815f; }
.tom-btn-save:disabled { opacity: 0.5; cursor: not-allowed; }

/* Mobile */
@media (max-width: 600px) {
  .tom-paths { grid-template-columns: 1fr; }
  .tom-section-grid { grid-template-columns: 1fr; }
  .tdm-action-bar { flex-direction: column; }
  .tcpanel-action-bar { flex-direction: column; }
}

/* ============================================================
   SECTION — AI signals UI, AI pill, signal cards (Sprint 4)
   Originally: styles-additions-v9.css
   ============================================================ */

/* ---------- AI status pill in masthead ---------- */
.ai-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
}
.ai-pill:hover { transform: scale(1.03); }
.ai-pill-hidden { display: none !important; }
.ai-pill-analyzing {
  background: #E6F1FB;
  color: #1F5D9D;
  border-color: #B5D2EE;
}
.ai-pill-warning {
  background: #FAEEDA;
  color: #996024;
  border-color: #EBC685;
}
.ai-pill-batching {
  background: #FAEEDA;
  color: #996024;
  border-color: #EBC685;
}
.ai-pill-budget_full {
  background: #FAECE7;
  color: #993C1D;
  border-color: #EBB7A4;
}
.ai-pill-offline {
  background: #FAECE7;
  color: #993C1D;
  border-color: #EBB7A4;
}
.ai-pill-icon { margin-right: 2px; }
.ai-pill-spinner {
  display: inline-block;
  margin-right: 4px;
  animation: ai-pill-spin 1.2s linear infinite;
}
@keyframes ai-pill-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Intent dot in touch detail header & touch row ---------- */
.tdm-intent-dot,
.tcpr-intent-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b3b0a6;
  margin-left: 6px;
  flex-shrink: 0;
  cursor: help;
}
.tdm-intent-buying_signal,    .tcpr-intent-dot.tcpr-intent-buying_signal     { background: #1D9E75; box-shadow: 0 0 0 2px #E1F5EE; }
.tdm-intent-objection,         .tcpr-intent-dot.tcpr-intent-objection         { background: #993C1D; box-shadow: 0 0 0 2px #FAECE7; }
.tdm-intent-stalling,          .tcpr-intent-dot.tcpr-intent-stalling          { background: #996024; box-shadow: 0 0 0 2px #FAEEDA; }
.tdm-intent-info_gathering,    .tcpr-intent-dot.tcpr-intent-info_gathering    { background: #1F5D9D; box-shadow: 0 0 0 2px #E6F1FB; }
.tdm-intent-relationship_building, .tcpr-intent-dot.tcpr-intent-relationship_building { background: #6b5b9d; box-shadow: 0 0 0 2px #ece7f5; }
.tdm-intent-decline,           .tcpr-intent-dot.tcpr-intent-decline           { background: #993C1D; box-shadow: 0 0 0 2px #FAECE7; }
.tdm-intent-unknown,           .tcpr-intent-dot.tcpr-intent-unknown           { background: #888780; }

/* ---------- Signals section in touch detail modal ---------- */
.tdm-signals-section {
  background: linear-gradient(to bottom, #f7f4ec 0%, #faf8f3 100%);
  border-top: 2px solid #E1F5EE;
}
.tdm-signals-meta {
  flex: 1;
  font-size: 0.78rem;
  color: #888780;
  margin-left: auto;
  margin-right: 8px;
  text-align: right;
  font-family: 'IBM Plex Mono', monospace;
}
.tdm-signals-retry {
  background: white;
  border: 1px solid #d8d2c4;
  color: #6b6960;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
}
.tdm-signals-retry:hover { background: #f3f0e9; color: #2a2a2a; }
.tdm-signals-retry:disabled { opacity: 0.5; cursor: not-allowed; }

.tdm-signals-pending,
.tdm-signals-error { background: #f7f4ec; }
.tdm-signals-pending-msg {
  padding: 12px;
  background: white;
  border: 1px dashed #d8d2c4;
  border-radius: 6px;
  font-size: 0.86rem;
  color: #6b6960;
  text-align: center;
}
.tdm-signals-spinner {
  display: inline-block;
  margin-right: 4px;
  animation: ai-pill-spin 1.2s linear infinite;
}
.tdm-signals-error-msg {
  padding: 10px 12px;
  background: #FAECE7;
  border: 1px solid #EBB7A4;
  border-radius: 6px;
  font-size: 0.86rem;
  color: #993C1D;
}

.tdm-signal-summary {
  background: white;
  border-left: 3px solid #1D9E75;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #2a2a2a;
  line-height: 1.55;
  margin-bottom: 12px;
  font-family: 'Fraunces', serif;
}

.tdm-signal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.tdm-signal-cell {
  background: white;
  border: 1px solid #ece7db;
  border-radius: 6px;
  padding: 8px 12px;
}
.tdm-signal-cell label {
  display: block;
  font-size: 0.72rem;
  color: #888780;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.tdm-signal-cell strong {
  display: block;
  font-size: 0.95rem;
  color: #2a2a2a;
  text-transform: capitalize;
}
.tdm-signal-cell span {
  display: block;
  font-size: 0.78rem;
  color: #888780;
  margin-top: 2px;
  font-family: 'IBM Plex Mono', monospace;
}

/* Intent color overrides for the strong tag in signal cell */
.tdm-signal-cell strong.tdm-intent-buying_signal      { color: #1D9E75; }
.tdm-signal-cell strong.tdm-intent-objection          { color: #993C1D; }
.tdm-signal-cell strong.tdm-intent-stalling           { color: #996024; }
.tdm-signal-cell strong.tdm-intent-info_gathering     { color: #1F5D9D; }
.tdm-signal-cell strong.tdm-intent-relationship_building { color: #6b5b9d; }
.tdm-signal-cell strong.tdm-intent-decline            { color: #993C1D; }
.tdm-signal-cell strong.tdm-sentiment-positive        { color: #1D9E75; }
.tdm-signal-cell strong.tdm-sentiment-negative        { color: #993C1D; }
.tdm-signal-cell strong.tdm-sentiment-mixed           { color: #996024; }
.tdm-signal-cell strong.tdm-sentiment-neutral         { color: #6b6960; }

.tdm-signal-block {
  background: white;
  border: 1px solid #ece7db;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.tdm-signal-block-buying { border-left: 3px solid #1D9E75; }
.tdm-signal-block-risk   { border-left: 3px solid #996024; }
.tdm-signal-block-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2a2a2a;
  margin-bottom: 6px;
}
.tdm-signal-item {
  font-size: 0.88rem;
  color: #2a2a2a;
  margin-bottom: 4px;
  cursor: help;
}
.tdm-signal-item strong {
  font-weight: 500;
}
.tdm-signal-evidence {
  display: block;
  font-size: 0.78rem;
  color: #6b6960;
  font-style: italic;
  font-family: 'Fraunces', serif;
  padding-left: 12px;
  margin-top: 1px;
  border-left: 2px solid #f3f0e9;
}
.tdm-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tdm-topic-chip {
  background: #E6F1FB;
  color: #1F5D9D;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  text-transform: lowercase;
}
.tdm-facts-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tdm-fact-row {
  font-size: 0.84rem;
  color: #2a2a2a;
  padding: 3px 8px;
  background: #f7f4ec;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
}
.tdm-signals-thin {
  font-size: 0.84rem;
  color: #888780;
  font-style: italic;
  padding: 8px 0;
}

/* Mobile */
@media (max-width: 600px) {
  .tdm-signal-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SECTION — Z-index fixes, quote-touch bridge styling (Sprint 4.1)
   Originally: styles-additions-v10.css
   ============================================================ */

/* z-index stacking. Higher = on top. */
.tdm-overlay { z-index: 200; }
.qdm-overlay { z-index: 200; }
.qm-overlay  { z-index: 210; }
.tom-overlay { z-index: 9999; }  /* always on top — outcome modal opens FROM other modals */

/* Quote panel: + Log a touch button matches the existing convert-quote button */
.qdm-log-touch {
  background: #E6F1FB;
  color: #1F5D9D;
  border: 1px solid #B5D2EE;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.qdm-log-touch:hover {
  background: #1F5D9D;
  color: white;
  border-color: #1F5D9D;
}


/* ============================================================
   SECTION — Watched row (Round 1 replacement for 3D coverflow)
   Horizontal-scroll snap row of watched-account cards. Drag-to-reorder
   handled by watched.js; this file just supplies the visual shell.
   ============================================================ */

.watched-row {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 4px;
  padding: 4px 4px 12px;
  margin: 0 -4px;
  -webkit-overflow-scrolling: touch;
}

.watched-row::-webkit-scrollbar { height: 6px; }
.watched-row::-webkit-scrollbar-track { background: transparent; }
.watched-row::-webkit-scrollbar-thumb {
  background: rgba(28, 28, 26, 0.12);
  border-radius: var(--radius-pill);
}
.watched-row::-webkit-scrollbar-thumb:hover { background: rgba(28, 28, 26, 0.22); }

.watched-card {
  scroll-snap-align: start;
  flex: 0 0 280px;
  background: var(--bg-elev-1);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 0.5px solid var(--border-subtle);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow var(--motion-fast) var(--easing-out),
              transform var(--motion-fast) var(--easing-out);
  user-select: none;
}

.watched-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.watched-card.is-dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.watched-card.has-status {
  border-left: 3px solid var(--status-active-accent);
}
.watched-card.has-status[data-status="overdue"] { border-left-color: var(--status-overdue-accent); }
.watched-card.has-status[data-status="stale"]   { border-left-color: var(--status-stale-accent); }
.watched-card.has-status[data-status="quote_out"] { border-left-color: var(--status-quote-out-accent); }
.watched-card.has-status[data-status="active_customer"] { border-left-color: var(--status-active-accent); }

.watched-card-star {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 18px;
  height: 18px;
  cursor: pointer;
  color: var(--brand-gold);
}
.watched-card-star svg {
  width: 100%;
  height: 100%;
  transition: transform var(--motion-fast) var(--easing-out);
}
.watched-card-star:hover svg { transform: scale(1.15); }

.watched-card-prob {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.watched-card-name {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  padding-right: 28px;
  word-break: break-word;
}

.watched-card-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--text-secondary);
}

.watched-card-streams {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: var(--space-2);
}

.watched-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--color-paper-100);
  color: var(--text-secondary);
}

.watched-card-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.watched-card-statuspill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  margin-top: 4px;
  align-self: flex-start;
}

.watched-empty {
  padding: 24px;
  font-style: italic;
  color: var(--text-secondary);
  font-size: var(--text-base);
  text-align: center;
  background: var(--color-paper-100);
  border-radius: var(--radius-md);
}
