:root {
  --bg: #0b0d10;
  --bg-1: #12151a;
  --bg-2: #1a1f27;
  --border: #242a34;
  --text: #e6ebf2;
  --muted: #8a95a5;
  --accent: #6ff7b8;
  --accent-2: #ffb86f;
  --gold: #ffd36a;
  --purple: #a780ff;
  --blue: #6fb7ff;
  --danger: #ff6f6f;
  --warn: #ffcf6f;
  --link: #6fb7ff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 15px/1.4 -apple-system, system-ui, Roboto, Helvetica, sans-serif; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }

.app-head {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, #12151a, #0b0d10);
  border-bottom: 1px solid var(--border);
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.crown {
  width: 34px; height: 34px; border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,211,106,0.4);
}
.title { font-weight: 700; font-size: 15px; }
.subtitle { font-size: 11px; color: var(--muted); }
.icon {
  background: transparent; border: 0; color: var(--muted); font-size: 22px; padding: 6px 10px;
  border-radius: 8px;
}
.head-actions { display: flex; gap: 4px; align-items: center; }
.sync-btn {
  font-size: 12px; font-weight: 700; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border); padding: 8px 10px;
}
.sync-btn:active { transform: scale(0.96); }
.sync-btn.syncing {
  background: var(--accent); color: #0b0d10; border-color: var(--accent);
  animation: sync-pulse 1.2s ease-in-out infinite;
}
.sync-btn.has-queue {
  background: var(--gold); color: #0b0d10; border-color: var(--gold);
}
@keyframes sync-pulse { 0%,100% { opacity: 0.85; } 50% { opacity: 1; } }

.tabs {
  display: flex; gap: 2px; overflow-x: auto; padding: 6px 10px; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; z-index: 9;
  top: calc(env(safe-area-inset-top) + 58px);
}
.tabs button {
  background: transparent; border: 0; color: var(--muted); font-weight: 500;
  padding: 6px 12px; border-radius: 7px; white-space: nowrap; font-size: 13px;
}
.tabs button.active { background: var(--bg-2); color: var(--text); }

.sub-tabs {
  display: flex; gap: 4px; padding: 8px 10px 0 10px; overflow-x: auto;
}
.sub-tabs button {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); font-size: 12px;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap;
}
.sub-tabs button.active { background: var(--accent); color: #0b0d10; border-color: var(--accent); font-weight: 600; }

main { padding-bottom: calc(env(safe-area-inset-bottom) + 20px); }

.filter-bar { display: flex; gap: 6px; padding: 8px 10px; align-items: center; }
.filter-bar input, .filter-bar select {
  background: var(--bg-1); border: 1px solid var(--border); color: var(--text);
  padding: 8px 10px; border-radius: 8px; min-width: 0;
}
.filter-bar input { flex: 1; }
.filter-bar select { flex: 0 0 auto; max-width: 46vw; }
.scrape-btn {
  flex: 1; padding: 10px; border-radius: 8px; background: var(--accent); color: #0b0d10;
  border: 0; font-weight: 700; font-size: 13px;
}
.scrape-btn:disabled { opacity: 0.6; }
.range-mini { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.range-mini input { accent-color: var(--accent); width: 70px; }

.pane { display: none; padding: 0 0 60px 0; }
.pane.active { display: block; }
.pane.overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 30; overflow-y: auto;
  padding-top: env(safe-area-inset-top);
}

.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }

/* Stats */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; }
.mini-stat {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 10px; text-align: center;
}
.mini-stat.accent { border-color: var(--accent); background: linear-gradient(180deg, rgba(111,247,184,0.08), transparent); }
.mini-stat .num { font-size: 20px; font-weight: 700; }
.mini-stat .lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

.card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  margin: 10px; padding: 14px;
}
.card-h { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.card-h > span + span,
.card-h > span + button { text-transform: none; letter-spacing: 0; font-weight: 500; }

.compact-list { display: grid; gap: 6px; }
.compact-row {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px;
  align-items: center; padding: 8px; background: var(--bg-2); border-radius: 8px;
}
.compact-row img, .compact-row .ph {
  width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--bg);
  display: grid; place-items: center; font-size: 16px;
}
.compact-row .ph.cat-msp { background: var(--accent); color: #0b0d10; font-weight: 700; }
.compact-row .ph.cat-dealer { background: var(--gold); color: #0b0d10; font-weight: 700; }
.compact-row .ph.cat-school { background: var(--link); color: #0b0d10; font-weight: 700; }
.compact-row .ph.cat-church { background: var(--purple); color: #0b0d10; font-weight: 700; }
.compact-row .compact-title { font-size: 13px; font-weight: 600; }
.compact-row .compact-meta { font-size: 11px; color: var(--muted); }

.score-badge {
  font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  background: var(--bg-2); color: var(--text); min-width: 24px; text-align: center;
}
.score-badge.hi { background: var(--accent); color: #0b0d10; }
.score-badge.mid { background: var(--warn); color: #0b0d10; }
.score-badge.big { font-size: 16px; padding: 6px 10px; }

/* Printer cards grid */
.card-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px; padding: 8px;
}
/* Picture-first phone listing card. Hero image fills the top, score + price
   chips overlay the photo so the body underneath stays clean. */
.printer-card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; cursor: pointer; position: relative;
  transition: transform 0.16s, border-color 0.16s;
}
.printer-card:active { transform: scale(0.985); }
.printer-card.saved { border-color: var(--accent-2); }
.printer-card .card-img-wrap { position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-2); }
.printer-card .card-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.printer-card .card-img-ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, #1a1f27, #0f1319); color: var(--muted); font-size: 36px;
}
.printer-card .img-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.7) 100%);
}
.printer-card .chip-top, .printer-card .chip-bot {
  position: absolute; left: 8px; right: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 6px; z-index: 2;
}
.printer-card .chip-top { top: 8px; }
.printer-card .chip-bot { bottom: 8px; }
.printer-card .pchip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-weight: 700; font-size: 11px; background: rgba(15,18,24,0.85); color: var(--text);
  border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(6px);
}
.printer-card .pchip.score-hi { background: var(--accent); color: #0b0d10; border-color: var(--accent); }
.printer-card .pchip.score-mid { background: var(--gold, var(--warn, #ffcf6f)); color: #0b0d10; }
.printer-card .pchip.price { font-size: 13px; padding: 4px 11px; }
.printer-card .pchip.price.free { background: var(--accent); color: #0b0d10; border-color: var(--accent); }
.printer-card .saved-mark {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 26px; height: 26px; display: grid; place-items: center;
  background: rgba(15,18,24,0.85); border-radius: 50%;
  color: var(--accent-2); font-size: 14px; border: 1px solid rgba(255,255,255,0.1);
}
.printer-card .card-body { padding: 10px 10px 12px; display: grid; gap: 3px; }
.printer-card .title { font-size: 13px; font-weight: 650; line-height: 1.25; }
.printer-card .subtitle { font-size: 11px; color: var(--muted); line-height: 1.25; min-height: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.printer-card .meta { font-size: 10px; color: var(--muted); display: flex; gap: 4px; flex-wrap: wrap; }
.printer-card .meta .sep { opacity: 0.5; }
/* Feed view (big image, single column) toggleable from the printers list */
.card-list.feed { grid-template-columns: 1fr; gap: 14px; padding: 10px; }
.card-list.feed .printer-card .card-img-wrap { aspect-ratio: 16/10; }
.card-list.feed .printer-card .pchip { font-size: 13px; padding: 5px 14px; }
.card-list.feed .printer-card .pchip.price { font-size: 16px; padding: 6px 16px; }
.card-list.feed .printer-card .title { font-size: 15px; }
.card-list.feed .printer-card .meta { font-size: 12px; }

/* Lead cards */
.lead-list { padding: 8px 10px; display: grid; gap: 8px; }
.lead-card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; cursor: pointer;
}
.lead-card.prio-1 { border-left: 3px solid var(--accent); }
.lead-card.prio-2 { border-left: 3px solid var(--gold); }
.lead-card.status-won { opacity: 0.75; border-left-color: var(--accent) !important; }
.lead-card.status-lost { opacity: 0.5; }
.lead-card .tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.tag {
  display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px;
  background: var(--bg-2); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.tag.cat-msp { background: var(--accent); color: #0b0d10; }
.tag.cat-dealer { background: var(--gold); color: #0b0d10; }
.tag.cat-school { background: var(--link); color: #0b0d10; }
.tag.cat-church { background: var(--purple); color: #0b0d10; }
.lead-card .org { font-weight: 600; font-size: 15px; }
.lead-card .meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.lead-card .quickactions { display: flex; gap: 6px; margin-top: 10px; }
.lead-card .quickactions a, .lead-card .quickactions button {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 8px; background: var(--bg-2); color: var(--text);
  font-size: 12px; text-decoration: none; border: 0; font-weight: 600;
}
.lead-card .quickactions a.primary { background: var(--accent); color: #0b0d10; }

/* List/grid toggle */
.view-toggle {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.view-toggle[data-view="grid"] { background: var(--accent); color: #0b0d10; border-color: var(--accent); }

/* Grid view — 2-column tiles optimized for one-tap calling */
.lead-list.grid-view { grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
.lead-tile {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; min-height: 148px;
  cursor: pointer; position: relative;
}
.lead-tile.prio-1 { border-left: 3px solid var(--accent); }
.lead-tile.prio-2 { border-left: 3px solid var(--gold); }
.lead-tile.status-won { opacity: 0.7; }
.lead-tile.status-lost { opacity: 0.4; }
.lead-tile .tile-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.lead-tile .prio-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--muted);
  display: inline-block; flex-shrink: 0;
}
.lead-tile .prio-dot.p1 { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.lead-tile .prio-dot.p2 { background: var(--gold); }
.lead-tile .prio-dot.p3 { background: var(--link); }
.lead-tile .prio-dot.p4 { background: var(--muted); }
.lead-tile .tile-org {
  font-weight: 700; font-size: 14px; line-height: 1.25;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  margin-bottom: 2px;
}
.lead-tile .tile-meta { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.lead-tile .tile-call {
  margin-top: auto; text-align: center; display: block;
  padding: 12px 0; border-radius: 10px;
  background: var(--accent); color: #0b0d10;
  font-size: 15px; font-weight: 800; letter-spacing: 0.04em;
  text-decoration: none;
}
.lead-tile .tile-call.disabled { background: var(--bg-2); color: var(--muted); font-weight: 600; }
.lead-tile .tile-call:active { transform: scale(0.97); }

/* Detail views */
.back {
  background: transparent; border: 0; color: var(--accent);
  padding: 12px 14px 6px 14px; font-size: 16px; position: sticky; top: 0;
  width: 100%; text-align: left; z-index: 5; background: var(--bg);
}
.overlay .hero {
  width: 100%; aspect-ratio: 4/3; background: var(--bg-2); margin-bottom: 8px;
  display: grid; place-items: center; font-size: 48px; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.overlay .hero img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.overlay .thumbs { display: flex; gap: 6px; padding: 0 14px 8px 14px; overflow-x: auto; }
.overlay .thumbs img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; }
.overlay .thumbs img.active { border-color: var(--accent); }

.detail-head { display: flex; align-items: center; gap: 10px; padding: 6px 14px; }
.title-big { font-weight: 700; font-size: 17px; }
.subtitle-big { color: var(--muted); font-size: 13px; margin-top: 2px; }

#listing-detail-body, #lead-detail-body { padding-bottom: 140px; }
#lead-detail-body > h2 { margin: 10px 14px 4px 14px; font-size: 22px; }
#lead-detail-body > .tag-row { padding: 0 14px; }

.fields { padding: 8px 14px; display: grid; gap: 6px; }
.field {
  display: grid; grid-template-columns: 80px 1fr; gap: 10px; align-items: center;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
.field .label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.field .value { font-size: 14px; word-break: break-word; }
.field .value.free { color: var(--accent); font-weight: 700; }

/* Results map (W/L tab) */
.results-map-card { padding: 10px; }
.wl-map {
  width: 100%; height: 280px; border-radius: 10px; overflow: hidden;
  background: #1a1f27;
}
.hq-marker { font-size: 20px; text-align: center; line-height: 28px; filter: drop-shadow(0 0 4px rgba(255,211,106,0.6)); }
.leaflet-container { background: #1a1f27 !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--bg-1) !important; color: var(--text) !important;
  border: 1px solid var(--border);
}
.leaflet-popup-content { font-size: 12px; line-height: 1.4; margin: 8px 10px; }
.leaflet-control-zoom a { background: var(--bg-2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; }

/* Interaction summary (lead detail top card) */
.summary-card {
  margin: 10px 14px 0 14px; padding: 10px 12px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
}
.summary-card.cold { opacity: 0.75; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.summary-hd { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; display: block; margin-bottom: 8px; }
.summary-cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.summary-cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg-2); border-radius: 8px; padding: 8px 4px;
  opacity: 0.55;
}
.summary-cell.has { opacity: 1; }
.summary-cell.total { background: var(--accent); color: #0b0d10; opacity: 1; font-weight: 700; }
.summary-cell .summary-n { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-cell .summary-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.summary-cell.has .summary-lbl { color: var(--text); }
.summary-cell.total .summary-lbl { color: #0b0d10; }

.pitch-label {
  color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
  padding: 10px 14px 4px 14px;
}
.pitch {
  background: var(--bg-1); border: 1px solid var(--accent); border-radius: 12px;
  margin: 0 14px; padding: 14px; font-size: 15px; line-height: 1.5; white-space: pre-wrap;
}

.section-h {
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600; margin: 14px 14px 6px 14px;
}
.description { margin: 0 14px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.description p { margin: 0; font-size: 13px; color: var(--muted); white-space: pre-wrap; }

.reasons-block { margin: 0 14px; }
.reason {
  display: flex; justify-content: space-between; gap: 10px;
  background: var(--bg-2); padding: 6px 10px; border-radius: 6px; font-size: 12px; margin: 3px 0;
}
.reason.pos { border-left: 2px solid var(--accent); }
.reason.neg { border-left: 2px solid var(--danger); }
.reason .bonus { font-weight: 700; color: var(--muted); }
.reason.pos .bonus { color: var(--accent); }
.reason.neg .bonus { color: var(--danger); }

.notes-block { padding: 0 14px; margin-top: 10px; }
.notes-block textarea {
  width: 100%; min-height: 80px; resize: vertical;
  background: var(--bg-1); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-family: inherit;
}

.interactions { margin: 0 14px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.interaction { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.interaction:last-child { border-bottom: 0; }
.interaction .when { color: var(--muted); font-size: 11px; }

.action-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: linear-gradient(180deg, transparent, #0b0d10 20%);
  padding: 10px 14px calc(env(safe-area-inset-bottom) + 10px) 14px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.action-bar button, .action-bar a {
  flex: 1 1 auto; min-width: 72px; padding: 11px 0; border-radius: 10px;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  font-weight: 600; text-align: center; text-decoration: none; font-size: 13px;
}
.action-bar button.primary, .action-bar a.primary { background: var(--accent); color: #0b0d10; border-color: var(--accent); }
.action-bar button.secondary { background: var(--accent-2); color: #0b0d10; border-color: var(--accent-2); }
.action-bar button.won { background: var(--accent); color: #0b0d10; border-color: var(--accent); }
.action-bar button.lost { background: var(--danger); color: #0b0d10; border-color: var(--danger); }
.action-bar button.voicemail { background: var(--gold); color: #0b0d10; border-color: var(--gold); }
.action-bar button.working { background: var(--purple); color: #0b0d10; border-color: var(--purple); }
.action-bar button.saved { background: var(--accent-2); color: #0b0d10; border-color: var(--accent-2); }

.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 14px; border-radius: 8px; z-index: 100; pointer-events: none;
}

/* Quick Call mode */
.qc-head {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.qc-pos-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qc-pos {
  color: var(--text); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  flex: 1; text-align: center;
}
.qc-nav-btn {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 14px; font-size: 18px; font-weight: 700;
  min-width: 44px; min-height: 36px;
}
.qc-nav-btn:active { transform: scale(0.94); background: var(--accent); color: #0b0d10; }
.qc-nav-btn:disabled { opacity: 0.35; }

/* Lead chooser strip — horizontally scrollable chips */
.qc-picker {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px 0;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.qc-picker::-webkit-scrollbar { height: 4px; }
.qc-picker::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.qc-picker-empty { padding: 8px 4px; font-size: 12px; }
.qc-chip {
  flex: 0 0 auto; scroll-snap-align: center;
  background: var(--bg-1); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 6px 8px;
  display: flex; align-items: center; gap: 6px;
  min-width: 90px; max-width: 140px;
  font-size: 11px; font-weight: 600;
}
.qc-chip.active {
  background: var(--accent); color: #0b0d10; border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(111, 247, 184, 0.3);
}
.qc-chip.prio-1 { border-left: 3px solid var(--accent); }
.qc-chip.prio-2 { border-left: 3px solid var(--gold); }
.qc-chip.prio-3 { border-left: 3px solid var(--link); }
.qc-chip.prio-4 { border-left: 3px solid var(--muted); }
.qc-chip.active.prio-1, .qc-chip.active.prio-2, .qc-chip.active.prio-3, .qc-chip.active.prio-4 {
  border-left-color: #0b0d10;
}
.qc-chip-idx {
  font-size: 10px; opacity: 0.75; font-variant-numeric: tabular-nums;
  min-width: 14px; text-align: right;
}
.qc-chip-cat { font-size: 9px; text-transform: uppercase; opacity: 0.6; letter-spacing: 0.05em; }
.qc-chip-org { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.qc-filter { display: flex; gap: 6px; }
.qc-filter select {
  background: var(--bg-1); border: 1px solid var(--border); color: var(--text);
  padding: 6px 8px; border-radius: 6px; font-size: 12px;
  flex: 1; min-width: 0;
}

/* Sticky bottom nav for thumb-reach prev/next */
.qc-sticky-nav {
  position: sticky; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 14px calc(env(safe-area-inset-bottom) + 10px) 14px;
  background: linear-gradient(180deg, transparent, var(--bg) 40%);
}
.qc-nav-big {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 0; font-size: 15px; font-weight: 700;
  min-height: 54px;
}
.qc-nav-big:active { transform: scale(0.97); background: var(--accent); color: #0b0d10; }
.qc-card {
  padding: 14px;
  display: grid; gap: 12px;
}
.qc-empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.qc-org { font-size: 24px; font-weight: 700; line-height: 1.2; }
.qc-meta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.qc-pitch {
  background: var(--bg-1); border: 2px solid var(--accent); border-radius: 14px;
  padding: 16px; font-size: 16px; line-height: 1.5; white-space: pre-wrap;
  color: var(--text);
}
.qc-pitch-block { display: flex; flex-direction: column; gap: 10px; }
.qc-pitch-label {
  color: var(--muted); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 600;
}
.qc-objection {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; line-height: 1.4;
}
.qc-objection .q { color: var(--muted); font-style: italic; margin-bottom: 4px; }
.qc-objection .a { color: var(--text); }

.qc-persona-row {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
}
.qc-persona-loading { color: var(--muted); text-align: center; font-size: 13px; }
.qc-persona-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
}
.qc-persona-head .link {
  background: transparent; border: none; color: var(--link);
  font-size: 11px; cursor: pointer; padding: 0; text-transform: none; letter-spacing: 0;
}
.qc-persona-chips {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
}
.persona-chip {
  appearance: none; background: var(--bg-0); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 8px; font-size: 13px; font-weight: 500; cursor: pointer;
  text-align: center; line-height: 1.2;
}
.persona-chip.active {
  background: var(--accent); color: #0b0d10; border-color: var(--accent);
  font-weight: 700;
}
.persona-chip:active { transform: scale(0.97); }
.qc-contact {
  display: grid; grid-template-columns: 80px 1fr; gap: 10px 14px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 14px;
}
.qc-contact .label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; align-self: center; }
.qc-contact .val { word-break: break-word; }
.qc-contact .val a { color: var(--link); text-decoration: none; }
.qc-actions-big {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.qc-actions-big a, .qc-actions-big button {
  padding: 18px 0; border-radius: 12px; background: var(--bg-2);
  color: var(--text); border: 1px solid var(--border); font-weight: 700;
  text-align: center; text-decoration: none; font-size: 15px;
}
.qc-actions-big a.primary { background: var(--accent); color: #0b0d10; border-color: var(--accent); font-size: 18px; padding: 22px 0; grid-column: 1 / -1; }
.qc-outcome-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-top: 4px;
}
.qc-outcome-row button {
  padding: 14px 0; border-radius: 10px; border: 1px solid var(--border);
  font-weight: 700; font-size: 13px; color: var(--text); background: var(--bg-2);
}
.qc-outcome-row .won { background: var(--accent); color: #0b0d10; border-color: var(--accent); }
.qc-outcome-row .lost { background: var(--danger); color: #0b0d10; border-color: var(--danger); }
.qc-outcome-row .vm { background: var(--gold); color: #0b0d10; border-color: var(--gold); }
.qc-outcome-row .work { background: var(--purple); color: #0b0d10; border-color: var(--purple); }
.qc-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px;
}
.qc-nav button {
  padding: 12px 0; border-radius: 10px; background: var(--bg-2);
  color: var(--muted); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
}

/* W/L report */
.timeline { display: grid; gap: 4px; }
.tl-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center;
  padding: 8px; background: var(--bg-2); border-radius: 6px;
}
.tl-row .icon { font-size: 18px; text-align: center; }
.tl-row .org { font-weight: 600; font-size: 13px; }
.tl-row .when { color: var(--muted); font-size: 11px; text-align: right; }
.tl-row.won { border-left: 3px solid var(--accent); }
.tl-row.lost { border-left: 3px solid var(--danger); }
.tl-row.vm { border-left: 3px solid var(--gold); }
.tl-row.working { border-left: 3px solid var(--purple); }

/* ---------- Scripts library ---------- */
.scripts-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.scripts-library { display: flex; flex-direction: column; gap: 18px; padding-bottom: 40px; }
.scenario-block h3 { margin: 0 0 4px 0; font-size: 16px; }
.scenario-block .muted.small { margin-bottom: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.script-grid { display: flex; flex-direction: column; gap: 10px; }
.script-card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
  cursor: pointer;
}
.script-card.is-default { border-color: var(--accent); }
.script-head { display: flex; justify-content: space-between; align-items: center; }
.persona-pill {
  background: var(--bg-0); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 10px; font-size: 12px; font-weight: 600;
}
.default-tag { color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.script-one-liner { font-size: 14px; line-height: 1.35; color: var(--text); }
.script-body { display: none; flex-direction: column; gap: 6px; font-size: 13px; }
.script-card.expanded .script-body { display: flex; }
.script-text { background: var(--bg-0); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.script-actions { display: flex; gap: 8px; margin-top: 6px; }
.copy-btn {
  appearance: none; background: transparent; border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 8px 10px; font-size: 12px; cursor: pointer;
}

/* Landed-cost block on listing detail */
.cost-block {
  margin: 12px 0;
  padding: 10px 12px;
  background: #0a0c10;
  border: 1px solid var(--border, #1f242b);
  border-radius: 10px;
}
.cost-block .section-h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted, #6b7480); margin-bottom: 8px; }
.cost-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.cost-row.muted { color: var(--muted, #6b7480); }
.cost-row.total { border-top: 1px solid var(--border, #1f242b); padding-top: 8px; margin-top: 4px; color: var(--accent, #6fcf97); font-size: 14px; }

/* ---------- Expiring auctions ---------- */
.expiring-head { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 0; }
.batches-list { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.batch-card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.batch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.batch-day { font-size: 16px; font-weight: 700; letter-spacing: 0.04em; }
.batch-anchor { font-size: 12px; color: var(--muted); margin-top: 2px; }
.batch-econ { text-align: right; }
.batch-net { font-size: 22px; font-weight: 700; }
.batch-net.accent { color: var(--accent); }
.batch-stats { display: flex; gap: 6px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.batch-stats span { white-space: nowrap; }
.batch-stops { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.batch-stop {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; cursor: pointer;
}
.batch-stop-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.batch-stop-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.batch-stop-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.batch-stop-time { font-size: 11px; color: var(--gold); margin-top: 3px; }
.batch-actions { display: flex; gap: 8px; }
.batch-actions button {
  flex: 1; padding: 12px; border-radius: 8px; background: var(--accent); color: #0b0d10;
  border: 0; font-weight: 700; font-size: 13px; cursor: pointer;
}

/* Trip itinerary overlay */
.trip-head { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.trip-actions { display: flex; gap: 8px; padding: 12px 14px; flex-wrap: wrap; }
.trip-actions a, .trip-actions button {
  padding: 10px 14px; border-radius: 8px; font-weight: 700; font-size: 13px;
  border: 1px solid var(--border); cursor: pointer; text-decoration: none;
}
.trip-actions a.primary { background: var(--accent); color: #0b0d10; border-color: var(--accent); }
.trip-actions a.secondary { background: var(--bg-1); color: var(--text); }
.trip-actions button.ghost { background: transparent; color: var(--muted); }
.trip-itinerary {
  margin: 12px 14px; padding: 14px; background: var(--bg-1);
  border: 1px solid var(--border); border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.5; white-space: pre-wrap; color: var(--text);
}

/* Quick Call business-intel block */
.qc-intel-block {
  margin: 10px 0;
  padding: 10px 12px;
  background: #0a0c10;
  border: 1px solid var(--border, #1f242b);
  border-left: 3px solid var(--accent, #6fcf97);
  border-radius: 8px;
}
.qc-intel-block.qc-intel-empty { border-left-color: var(--muted, #6b7480); text-align: center; }
.qc-intel-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #6b7480);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.qc-intel-head .link {
  background: none;
  border: 0;
  color: var(--accent, #6fcf97);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
}
.qc-intel-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.qc-intel-row:first-of-type { border-top: 0; }
.qc-intel-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #6b7480);
}
.qc-intel-val { font-size: 13px; line-height: 1.4; color: var(--text, #e6ebf2); }
.qc-intel-row.angle .qc-intel-val { color: var(--accent, #6fcf97); font-weight: 500; }
.qc-research-btn {
  display: block;
  margin: 8px auto 4px;
  padding: 10px 16px;
  background: var(--accent, #6fcf97);
  color: #0b0d10;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.qc-research-btn:active { opacity: 0.8; }

/* ---------- Call recordings ---------- */
.calls-head { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.calls-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.calls-actions button { padding: 8px 10px; font-size: 12px; }
.calls-list { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 40px; }
.call-row {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer;
}
.call-head { display: flex; align-items: center; gap: 8px; }
.call-icon { font-size: 16px; }
.call-number { flex: 1; font-weight: 600; font-size: 14px; }
.call-outcome {
  font-size: 10px; padding: 2px 7px; border-radius: 4px; text-transform: uppercase;
  letter-spacing: 0.04em; font-weight: 700; background: var(--bg-2); color: var(--muted);
}
.call-outcome.won { background: var(--accent); color: #0b0d10; }
.call-outcome.working { background: var(--purple); color: #0b0d10; }
.call-outcome.lost { background: var(--danger); color: #0b0d10; }
.call-outcome.voicemail { background: var(--gold); color: #0b0d10; }
.call-outcome.status-pending, .call-outcome.status-transcribing, .call-outcome.status-classifying {
  background: var(--bg-2); color: var(--warn);
}
.call-outcome.status-error { background: var(--danger); color: #0b0d10; }
.call-meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.call-preview { color: var(--text); font-size: 13px; line-height: 1.4; margin-top: 6px; }

.cd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.cd-actions button { padding: 10px 12px; font-size: 13px; }
.cd-section { margin: 16px 0; padding: 12px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; }
.cd-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 6px; }
.cd-summary { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.cd-transcript {
  background: var(--bg-0); padding: 10px; border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5;
  white-space: pre-wrap; color: var(--text); max-height: 300px; overflow-y: auto; margin: 0;
}

/* ---------- CRM (calls page) ---------- */
.crm-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 2px;
}
.crm-stat {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
}
.crm-stat .v { font-size: 20px; font-weight: 700; line-height: 1; }
.crm-stat .k { font-size: 10px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.crm-stat.won { border-color: #1d4f37; background: linear-gradient(180deg, #122b1f, var(--bg-1)); }
.crm-stat.won .v { color: #6ff7b8; }
.crm-stat.lost { border-color: #4f1d1d; background: linear-gradient(180deg, #2b1212, var(--bg-1)); }
.crm-stat.lost .v { color: #ff8a8a; }

.crm-views { display: flex; gap: 4px; padding: 4px 0 8px; overflow-x: auto; }
.crm-views button {
  flex-shrink: 0; padding: 8px 14px; font-size: 12px; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; color: var(--muted);
}
.crm-views button.active { background: var(--accent); color: #0b0d10; border-color: var(--accent); }

/* Pipeline lanes */
.crm-pipeline {
  display: flex; gap: 10px; overflow-x: auto; padding: 0 10px 24px;
  scroll-snap-type: x mandatory;
}
.lane {
  flex-shrink: 0; width: 78vw; max-width: 320px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  scroll-snap-align: start; display: flex; flex-direction: column; max-height: 70vh;
}
.lane-h {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-bottom: 2px solid var(--lane, var(--border));
  font-weight: 700; font-size: 13px;
}
.lane-h .count { font-size: 11px; color: var(--muted); }
.lane-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.lane-empty { padding: 14px; text-align: center; }
.lane-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  cursor: pointer; display: flex; flex-direction: column; gap: 3px;
}
.lane-card:active { transform: scale(0.98); }
.lc-head { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.lc-org { font-size: 12px; font-weight: 700; }
.lc-sum { font-size: 11px; color: var(--text); line-height: 1.3;
          display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-meta { font-size: 10px; color: var(--muted); display: flex; gap: 6px; }
.lc-meta span { display: inline-block; }
.lane-card .cb { font-size: 10px; color: var(--gold); font-weight: 700; }
.lane-card .prio.p1 { background: var(--danger); color: #0b0d10; padding: 1px 5px; border-radius: 4px; font-size: 9px; font-weight: 800; }
.lane-card .prio.p2 { background: var(--gold); color: #0b0d10; padding: 1px 5px; border-radius: 4px; font-size: 9px; font-weight: 800; }

/* Callbacks queue */
.cb-group { margin-bottom: 14px; padding: 0 10px; }
.cb-group-h {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent);
  font-weight: 800; margin-bottom: 6px; padding-top: 10px;
}
.cb-when { font-size: 10px; color: var(--gold); font-weight: 700; padding: 2px 8px; border-radius: 4px; background: rgba(255,211,106,0.12); }

/* Threads (contacts) view */
.threads-list { display: flex; flex-direction: column; gap: 6px; padding: 0 10px 40px; }
.thread-row {
  display: grid; grid-template-columns: 36px 1fr; gap: 10px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; align-items: center;
}
.thread-row:active { transform: scale(0.99); }
.th-stage {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 16px;
}
.th-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.th-org { font-weight: 700; font-size: 14px; }
.th-count { font-size: 11px; color: var(--muted); }
.th-sub { font-size: 11px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.th-sub .dot { opacity: 0.6; }
.thread-row .cb { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--gold); font-weight: 700; }

/* CRM editor in call detail */
.crm-editor { display: flex; flex-direction: column; gap: 10px; }
.crm-stage-row { display: flex; gap: 4px; flex-wrap: wrap; }
.stage-pill {
  padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--muted);
}
.stage-pill.active { background: var(--pillc, var(--accent)); color: #0b0d10; border-color: var(--pillc, var(--accent)); }
.crm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crm-grid label, .crm-notes { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.crm-grid input, .crm-grid select, .crm-notes textarea {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 10px; border-radius: 8px; font-size: 14px;
}
.crm-grid input:focus, .crm-grid select:focus, .crm-notes textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.crm-notes textarea { min-height: 70px; resize: vertical; }
.ghost.mini { padding: 4px 8px; font-size: 11px; background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; margin-top: 4px; align-self: flex-start; }

/* Online/offline pill in the header */
.online-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-right: 6px;
  border: 1px solid transparent;
}
.online-pill.on { color: #0b0d10; background: #6fcf97; }
.online-pill.off { color: #fff; background: #c0392b; animation: pulseOffline 2.2s ease-in-out infinite; }
@keyframes pulseOffline {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* Cold Leads stats bar — quick glance at queue health */
.leads-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 2px 8px;
  font-size: 11px;
  border-bottom: 1px solid var(--border, #1f242b);
  margin-bottom: 6px;
}
.stat-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-2, #151a20);
  color: var(--text, #e6ebf2);
  border: 1px solid var(--border, #1f242b);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.stat-chip.p1 { background: #3b1e1e; border-color: #c0392b; color: #ffb3aa; }
.stat-chip.p2 { background: #3b2b1e; border-color: #d97706; color: #ffcf99; }
.stat-chip.p3 { color: var(--muted, #6b7480); }
.stat-chip.stale { background: #3b2f1e; border-color: #e67e22; color: #ffc78c; font-weight: 700; }
.stat-chip.muted { color: var(--muted, #6b7480); background: transparent; border-color: transparent; }
.stat-chip.total { margin-left: auto; color: var(--muted, #6b7480); background: transparent; border-color: transparent; }

/* Stale badge on lead cards */
.tag.stale { background: #e67e22; color: #0b0d10; font-weight: 700; }
.tag.muted { background: transparent; color: var(--muted, #6b7480); border: 1px solid var(--border, #1f242b); }

/* ───────────────────────────────────────────────────────────────
   Radius-scrape panel — live slider, gradient fill, aesthetic button row
   ─────────────────────────────────────────────────────────────── */
.scrape-panel {
  margin: 12px 10px;
  padding: 14px;
  background: linear-gradient(145deg, #141822 0%, #12151a 70%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 4px 14px rgba(0,0,0,0.25);
}
.scrape-panel .card-h {
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--muted); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.scrape-panel .card-h > span:first-child { color: var(--text); font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.radius-row {
  display: flex; align-items: center; gap: 10px; padding: 4px 2px 8px 2px;
}
#leads-radius {
  flex: 1; appearance: none; -webkit-appearance: none;
  height: 6px; border-radius: 999px;
  background: var(--bg-2);
  outline: none; cursor: pointer;
}
#leads-radius::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #fff 0%, var(--accent) 50%, #1a8555 100%);
  box-shadow: 0 0 0 2px rgba(11,13,16,0.9), 0 2px 8px rgba(111,247,184,0.45);
  cursor: grab;
  transition: transform 120ms ease;
}
#leads-radius::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.1); }
#leads-radius::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #fff 0%, var(--accent) 50%, #1a8555 100%);
  border: 2px solid #0b0d10;
  box-shadow: 0 2px 8px rgba(111,247,184,0.45);
  cursor: grab;
}
#leads-radius-label {
  color: var(--accent); font-weight: 700; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.radius-actions {
  display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: stretch;
  margin-top: 4px;
}
.radius-actions .scrape-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #4fd99a 100%);
  color: #0b0d10; font-weight: 700;
  border-radius: 10px; padding: 12px 14px; font-size: 13px;
  border: 0;
  box-shadow: 0 2px 8px rgba(111,247,184,0.3);
  transition: transform 80ms ease, box-shadow 120ms ease;
}
.radius-actions .scrape-btn:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(111,247,184,0.2); }
.radius-actions .scrape-btn:disabled { opacity: 0.55; cursor: wait; background: var(--bg-2); color: var(--muted); box-shadow: none; }
.scrape-single-zip {
  background: var(--bg-0); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 8px; font-size: 12px; max-width: 120px;
}
.radius-actions .view-toggle {
  padding: 10px 12px; border-radius: 10px; font-size: 12px;
  background: var(--bg-0); border: 1px solid var(--border);
}

/* Leads tools row — new lead + bulk gather */
.leads-tools {
  gap: 8px;
  padding: 8px 10px 4px 10px !important;
}
.leads-tools .scrape-btn {
  flex: 1;
  padding: 12px 14px; border-radius: 10px; font-weight: 700; font-size: 13px;
  border: 0; transition: transform 80ms ease, filter 120ms ease;
}
.leads-tools .scrape-btn:active { transform: translateY(1px); }
.leads-tools .scrape-btn:disabled { opacity: 0.55; cursor: wait; filter: grayscale(0.3); }
#btn-bulk-gather { box-shadow: 0 2px 10px rgba(167,128,255,0.25); }
#btn-bulk-gather:hover { filter: brightness(1.05); }
#bulk-gather-status {
  padding: 2px 12px 8px 12px;
  font-variant-numeric: tabular-nums;
}

/* ───────────────────────────────────────────────────────────────
   New-lead overlay — hero + triple-action button row
   ─────────────────────────────────────────────────────────────── */
.nl-hero {
  background: linear-gradient(145deg, rgba(255,211,106,0.08) 0%, transparent 70%);
  padding: 12px 14px 10px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.nl-hero h2 {
  margin: 2px 0 4px 0;
  font-size: 20px; font-weight: 700;
  background: linear-gradient(135deg, var(--gold) 0%, #fff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.nl-hero .muted.small { font-size: 12px; line-height: 1.4; }

.nl-actions-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px; margin: 8px 0 6px 0;
}
.nl-action-btn {
  padding: 11px 8px; border: 0; border-radius: 10px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: transform 80ms ease, filter 120ms ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nl-action-btn:active { transform: translateY(1px); }
.nl-action-btn:disabled { opacity: 0.55; cursor: wait; filter: grayscale(0.3); }
.nl-action-btn.paste {
  background: var(--bg-0); color: var(--text); border: 1px solid var(--border);
}
.nl-action-btn.format {
  background: linear-gradient(135deg, var(--purple) 0%, #8866dd 100%);
  color: #0b0d10;
  box-shadow: 0 2px 8px rgba(167,128,255,0.3);
}
.nl-action-btn.save {
  background: linear-gradient(135deg, var(--accent) 0%, #4fd99a 100%);
  color: #0b0d10;
  box-shadow: 0 2px 8px rgba(111,247,184,0.3);
}
.nl-status {
  min-height: 14px; font-size: 11px; margin: 4px 0 8px 0;
  transition: color 150ms ease;
}
.nl-status.thinking {
  color: var(--purple);
  background: linear-gradient(90deg, transparent, rgba(167,128,255,0.15), transparent);
  background-size: 200% 100%;
  animation: thinking-shimmer 1.4s linear infinite;
  padding: 3px 8px; border-radius: 6px;
}
@keyframes thinking-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Target chips + custom input + max-leads slider — aesthetic additions */
.scrape-label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
  margin: 10px 2px 6px 2px;
  display: flex; align-items: center; gap: 6px;
}
.scrape-label .small { text-transform: none; letter-spacing: 0; font-weight: 400; }

.target-chips {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 4px 0 6px 0;
}
.target-chip {
  background: var(--bg-0); color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 11px; font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 80ms ease, border-color 120ms ease;
}
.target-chip.active {
  background: linear-gradient(135deg, var(--accent) 0%, #4fd99a 100%);
  color: #0b0d10;
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(111,247,184,0.2);
}
.target-chip:active { transform: scale(0.96); }
.target-chip-action {
  background: transparent; color: var(--link);
  border: 1px dashed var(--border);
  border-radius: 999px; padding: 6px 11px; font-size: 11px;
  cursor: pointer; font-weight: 600;
}
.target-chip-action:hover { border-color: var(--link); color: var(--link); }

.target-custom-input {
  width: 100%; background: var(--bg-0); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 13px;
  transition: border-color 120ms ease;
}
.target-custom-input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,211,106,0.12);
}

.max-leads-row {
  display: flex; align-items: center; gap: 10px; padding: 2px 2px 4px 2px;
}
#max-leads {
  flex: 1; appearance: none; -webkit-appearance: none;
  height: 6px; border-radius: 999px; background: var(--bg-2);
  outline: none; cursor: pointer;
}
#max-leads::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #fff 0%, var(--gold) 50%, #bb8a2a 100%);
  box-shadow: 0 0 0 2px rgba(11,13,16,0.9), 0 2px 8px rgba(255,211,106,0.45);
  cursor: grab;
}
#max-leads::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #fff 0%, var(--gold) 50%, #bb8a2a 100%);
  border: 2px solid #0b0d10;
  box-shadow: 0 2px 8px rgba(255,211,106,0.45);
  cursor: grab;
}
#max-leads-label {
  color: var(--gold); font-weight: 700; font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* ─── UX polish: mobile smoother ─── */

/* Image fade-in on phone cards */
.printer-card .card-img,
.compact-row img {
  animation: phoneImgFadeIn 0.24s ease-out;
}
@keyframes phoneImgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* Shimmer on image placeholders */
.card-img-ph,
.compact-row .ph {
  background: linear-gradient(100deg, #151a20 30%, #1d232b 50%, #151a20 70%);
  background-size: 200% 100%;
  animation: phoneShimmer 1.6s ease-in-out infinite;
  color: rgba(230, 235, 242, 0.5);
}
@keyframes phoneShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Active press feedback on all tap targets — critical for phone UX */
.printer-card:active,
.compact-row:active,
.lead-card:active,
.lead-tile:active,
button:not(:disabled):active,
a:active {
  transform: scale(0.985);
  transition: transform 0.08s ease-out;
}

/* Pane transition on tab switch */
.pane.active {
  animation: phonePaneFade 0.2s ease-out;
}
@keyframes phonePaneFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Smoother horizontal scroll on the Quick Call chip picker */
.qc-picker {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* ========================================================================
   Miles tab — mileage tracking, gas log, tax summary
   ======================================================================== */

.miles-sub-tabs {
  display: flex; gap: 4px; padding: 10px 8px 0 8px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  position: sticky; top: calc(env(safe-area-inset-top) + 98px); z-index: 8;
  background: var(--bg);
}
.miles-sub-tabs::-webkit-scrollbar { display: none; }
.miles-sub-tabs button {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); font-size: 12px;
  padding: 7px 10px; border-radius: 8px; white-space: nowrap; font-weight: 500;
  flex-shrink: 0;
}
.miles-sub-tabs button.active { background: var(--accent); color: #0b0d10; border-color: var(--accent); font-weight: 700; }
.miles-sub { display: none; }
.miles-sub.active { display: block; animation: phonePaneFade 0.2s ease-out; }

/* Live trip card */
.miles-active-card {
  background: linear-gradient(160deg, #141820, #10131a);
  border: 1px solid var(--border);
}
.miles-live-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 6px 0 8px 0;
}
.miles-live-stat {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 8px; text-align: center;
}
.miles-live-v {
  font-size: 26px; font-weight: 800; color: var(--accent);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.miles-live-k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.miles-live-meta { padding: 4px 0 10px 0; font-variant-numeric: tabular-nums; }
.miles-live-actions {
  display: flex; gap: 8px; padding: 4px 0;
}
.miles-btn-start { background: var(--accent) !important; color: #0b0d10 !important; flex: 2; }
.miles-btn-stop  { background: var(--danger) !important; color: #fff !important; flex: 2; }
.miles-state-on  { color: var(--accent) !important; font-weight: 700; }
.miles-auto-note { padding: 10px 0 0 0; line-height: 1.45; }

/* Today KPI grid */
.miles-today-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 0 2px 0;
}
.miles-kpi {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 6px; text-align: center;
}
.miles-kpi-v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.miles-kpi-k { font-size: 10px; color: var(--muted); margin-top: 2px; letter-spacing: 0.06em; }

/* Trip list / trip row */
.miles-trip-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.miles-trips-summary { padding: 4px 10px 8px 10px; }
.trip-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px;
  transition: transform 0.15s ease-out, background 0.15s;
  will-change: transform;
}
.trip-row:active { background: var(--bg-2); }
.trip-main { flex: 1; min-width: 0; }
.trip-top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.trip-miles { font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.trip-route { font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-purpose { font-size: 12px; color: var(--accent-2); margin-top: 2px; }
.trip-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.trip-swipe {
  display: flex; gap: 4px;
}
.swipe-btn {
  border: 1px solid var(--border); background: var(--bg-2); color: var(--muted);
  font-size: 11px; padding: 4px 7px; border-radius: 6px; font-weight: 600;
}
.swipe-personal:active, .swipe-personal:hover { background: rgba(255,111,111,0.12); color: var(--danger); border-color: var(--danger); }
.swipe-business:active, .swipe-business:hover { background: rgba(111,247,184,0.12); color: var(--accent); border-color: var(--accent); }

/* Classification pills */
.class-pill {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg-2); white-space: nowrap;
}
.class-biz { color: var(--accent); border-color: rgba(111,247,184,0.4); background: rgba(111,247,184,0.08); }
.class-per { color: var(--accent-2); border-color: rgba(255,184,111,0.4); background: rgba(255,184,111,0.08); }
.class-com { color: var(--gold); border-color: rgba(255,211,106,0.4); background: rgba(255,211,106,0.08); }
.class-unc { color: var(--muted); border-color: var(--border); background: var(--bg-2); }

/* Trip detail overlay */
.trip-detail-wrap { padding: 12px; }
.trip-detail-head {
  padding: 12px 12px 16px 12px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 10px;
}
.trip-detail-miles { font-size: 32px; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.trip-class-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 12px;
}
.class-choose {
  background: var(--bg-1); border: 1px solid var(--border); color: var(--muted);
  padding: 12px 8px; border-radius: 10px; font-weight: 600; font-size: 13px;
}
.class-choose.on {
  background: var(--accent); color: #0b0d10; border-color: var(--accent);
}

/* Gas log */
.miles-gas-card { background: var(--bg-1); }
.miles-gas-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 0 10px 0;
}
.miles-gas-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.miles-gas-form input, .miles-gas-form select {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 10px; border-radius: 8px; font-size: 14px; min-width: 0;
}
.miles-gas-wide { grid-column: span 2; }
.miles-gas-actions { display: flex; gap: 8px; padding-top: 4px; }
.gas-list { display: flex; flex-direction: column; gap: 6px; }
.gas-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px;
}
.gas-main { font-weight: 600; font-size: 14px; }
.gas-right { display: flex; align-items: center; gap: 10px; }
.gas-total { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.gas-del {
  background: transparent; border: 0; color: var(--muted); font-size: 14px;
  padding: 4px 8px; border-radius: 6px;
}
.gas-del:active { background: rgba(255,111,111,0.15); color: var(--danger); }

/* Tax summary */
.tax-headline {
  text-align: center; padding: 20px 14px;
  background: linear-gradient(160deg, #151a20, #10131a);
  border: 1px solid var(--border);
}
.tax-headline-label { text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.tax-headline-value {
  font-size: 40px; font-weight: 800; color: var(--gold); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.tax-headline-sub { margin-top: 6px; }
.tax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 10px; }
.tax-grid .card { margin: 0; }
.tax-stat-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.tax-stat-row b { font-variant-numeric: tabular-nums; }
.tax-method-row {
  display: flex; justify-content: space-between; align-items: center; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px; background: var(--bg-1);
}
.tax-method-row.winner { border-color: var(--accent); background: rgba(111,247,184,0.06); }
.tax-method-row.winner .tax-method-val { color: var(--accent); }
.tax-method-name { font-size: 13px; }
.tax-method-val { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 16px; }
.tax-export-actions { display: flex; gap: 8px; }

/* Settings */
[data-miles-sub="settings"] label {
  display: flex; flex-direction: column; gap: 4px; padding: 6px 0;
  font-size: 12px; color: var(--muted);
}
[data-miles-sub="settings"] input,
[data-miles-sub="settings"] select {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-size: 14px;
}
.toggle-row { flex-direction: row !important; align-items: center; gap: 10px !important; color: var(--text) !important; font-size: 14px !important; padding: 8px 0 !important; }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--accent); }
.set-loc-row { display: flex; gap: 6px; align-items: flex-end; margin-bottom: 6px; }
.set-loc-row label { flex: 1; }
.set-loc-row button { height: 38px; }
.miles-settings-save-row { display: flex; gap: 12px; align-items: center; padding: 12px 10px 24px 10px; }

/* ----- Phone-optimized (≤420px) ----- */
@media (max-width: 420px) {
  /* Bigger tap targets on all Miles controls */
  .miles-btn-start, .miles-btn-stop { padding: 14px 10px; font-size: 15px; }
  .miles-live-v { font-size: 28px; }
  .miles-live-stat { padding: 12px 4px; }

  /* Today's KPI grid: 2×2 is more readable than 1×4 on narrow phones */
  .miles-today-grid { grid-template-columns: repeat(2, 1fr); }
  .miles-kpi-v { font-size: 20px; }

  /* Trip row: stack main/right so classification pill + swipe buttons get room */
  .trip-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
  .trip-right { flex-direction: row; justify-content: space-between; align-items: center; }
  .trip-swipe { flex: 1; justify-content: flex-end; }
  .swipe-btn { padding: 8px 14px; font-size: 12px; min-height: 36px; }
  .trip-route { white-space: normal; line-height: 1.35; }

  /* Tax cards stack vertically — easier to scan KPIs on a narrow screen */
  .tax-grid { grid-template-columns: 1fr; }
  .tax-headline-value { font-size: 36px; }

  /* Gas form: 2-col stays but labels get their own row */
  .miles-gas-form { gap: 10px; }
  .miles-gas-actions { flex-direction: column; }
  .miles-gas-actions button { width: 100%; padding: 12px; }

  /* Settings: wider lat/lng input, bigger GPS buttons on their own row */
  .set-loc-row { flex-direction: column; align-items: stretch; }
  .set-loc-row button { height: 44px; margin-top: 4px; }

  /* Sub-tabs: slightly tighter so all 5 fit w/o scroll on 375w */
  .miles-sub-tabs button { padding: 7px 9px; font-size: 11.5px; }

  /* Trip detail: class-choose buttons get bigger */
  .class-choose { padding: 14px 8px; font-size: 14px; min-height: 52px; }

  /* Method compare rows: stack the label + value vertically if tight */
  .tax-method-row { flex-wrap: wrap; gap: 4px; }
  .tax-method-name { flex: 1 1 70%; }
  .tax-method-val { flex: 1 1 25%; text-align: right; }

  /* Filter bar: let selects wrap rather than ellipsize */
  [data-miles-sub="trips"] .filter-bar { flex-wrap: wrap; }
  [data-miles-sub="trips"] .filter-bar input { flex: 1 1 100%; }
}

/* ===== Calendar — auctions on a day grid ===== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 10px;
}
.cal-cell {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 6px 6px;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  position: relative;
  cursor: pointer;
  transition: transform 0.06s ease, border-color 0.12s ease;
}
.cal-cell.cal-has-items:hover { transform: translateY(-1px); }
.cal-cell.cal-empty { opacity: 0.45; cursor: default; }
.cal-cell.cal-cool   { border-color: #2a3a4a; }
.cal-cell.cal-warm   { border-color: var(--accent-2); }
.cal-cell.cal-hot    { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cal-cell.cal-selected { background: var(--bg-2); border-color: var(--link); box-shadow: 0 0 0 1px var(--link) inset; }
.cal-day-name { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.cal-date { font-size: 18px; font-weight: 600; color: var(--text); line-height: 1; margin-top: 1px; }
.cal-count { font-size: 11px; color: var(--muted); margin-top: 4px; }
.cal-est { font-size: 11px; color: var(--accent); font-weight: 600; }
.cal-top-score {
  position: absolute;
  top: 4px;
  right: 5px;
  background: var(--accent);
  color: #0b0d10;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 5px;
  line-height: 1.4;
}
.calendar-day-details { padding: 0 10px 24px; }
.cal-detail-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 4px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.cal-detail-h-title { font-weight: 600; }
.cal-stops { display: flex; flex-direction: column; gap: 8px; }
.cal-stop {
  display: flex;
  gap: 10px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}
.cal-stop:active { background: var(--bg-2); }
.cal-stop-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-2);
}
.cal-stop-noimg { display: flex; align-items: center; justify-content: center; font-size: 22px; }
.cal-stop-body { flex: 1; min-width: 0; }
.cal-stop-title { font-size: 14px; line-height: 1.3; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-stop-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cal-stop-time { color: var(--accent); font-weight: 600; }

@media (max-width: 420px) {
  .calendar-grid { grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 6px; }
  .cal-cell { min-height: 70px; padding: 6px 3px 4px; }
  .cal-date { font-size: 16px; }
  .cal-count { font-size: 10px; }
  .cal-est { font-size: 10px; }
}

/* ===== Auction end-time badges ===== */
.ends-at {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.ends-at.ends-soon {
  color: var(--danger);
  animation: ends-pulse 1.5s ease-in-out infinite;
}
@keyframes ends-pulse { 0%,100% { opacity:1 } 50% { opacity:0.6 } }

/* Card-image overlay countdown — sits above the price chip on picture cards */
.chip-ends {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(11,13,16,0.78);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  letter-spacing: 0.2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.chip-ends.ends-soon {
  background: var(--danger);
  color: #fff;
  animation: ends-pulse 1.5s ease-in-out infinite;
}

/* ===== Lead contact-name display ===== */
.lead-contact { color: var(--accent); font-weight: 500; }
.lead-contact-line {
  font-size: 13px;
  color: var(--accent);
  margin-top: 2px;
  margin-bottom: 4px;
  font-weight: 500;
}
.tile-contact {
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-detail-contact {
  font-size: 16px;
  color: var(--accent);
  font-weight: 500;
  margin-top: -8px;
  margin-bottom: 12px;
}
