/* ============================================================
   styles-additions-v8.css — Sprint 3: Quotes
   Covers: status/source badges, dashboard quotes section, panel
   quotes section, quote modal, quote detail modal, touch detail
   modal additions for linked quotes.
   ============================================================ */

/* ---------- 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; }
}
