:root {
  /* HQ brand tokens (Janszen Media HQ v1.6 styles.min.css) — dark only, like HQ */
  --bg: #08080d; --panel: #0e0e18; --panel2: #141420; --text: #dce6f0; --hi: #f0f4f8; --muted: #6b7f92; --line: #1e1e2e; --line2: #252535;
  --accent: #F26522; --accent-hover: #d85a1d; --accent-text: #ffffff; --accent-dim: rgba(242,101,34,.1);
  --a: #4ade80; --a-bg: rgba(22,163,74,.16); --b: #60a5fa; --b-bg: rgba(59,130,246,.14); --c: #f59e0b; --c-bg: rgba(180,83,9,.18);
  --check: #a855f7; --check-bg: rgba(168,85,247,.12); --hidden: #6b7f92; --hidden-bg: rgba(107,127,146,.12); --warn: #ef4444;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: #f58a52; }
button:not(.ghost):not(.tab):not(.tile):not(.hbar):not(.leg):not(.chip):not(.icon-btn):not(.pill-sel):hover { background: var(--accent-hover); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--hi); font-size: 15px; }
.brand img { width: 22px; height: 22px; }
.brand span { font-weight: 700; }
.login-card { text-align: center; }
.login-card .login-mark { width: 28px; height: 28px; display: block; margin: 0 auto 10px; }
.login-card h1 { color: var(--hi); }
.top { border-bottom: 1px solid var(--line); box-shadow: inset 0 -2px 0 var(--accent-dim); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.big { font-size: 18px; margin: 4px 0 8px; }
.nowrap { white-space: nowrap; }
.warn { color: var(--warn); }
.grow { flex: 1; }
[hidden] { display: none !important; }

button { font: inherit; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); cursor: pointer; }
button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
textarea { width: 100%; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px; width: min(380px, 100%); }
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-card form { display: flex; flex-direction: column; gap: 10px; }

.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
.table-wrap { overflow-x: auto; padding: 0 16px; }
#list tbody tr { cursor: pointer; }
#list tbody tr:hover { background: var(--panel2); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 12px; }

.tier { display: inline-block; min-width: 26px; text-align: center; padding: 1px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.tier-A { color: var(--a); background: var(--a-bg); }
.tier-B { color: var(--b); background: var(--b-bg); }
.tier-C { color: var(--c); background: var(--c-bg); }
.tier-check { color: var(--check); background: var(--check-bg); }
.tier-hidden, .tier-none { color: var(--hidden); background: var(--hidden-bg); }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 16px 20px 40px; box-shadow: -8px 0 24px rgba(0,0,0,.12); }
.drawer h2 { margin: 0 0 2px; font-size: 20px; padding-right: 70px; }
.drawer h3 { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.drawer ul { margin: 0; padding-left: 18px; }
.drawer .close { position: absolute; top: 14px; right: 16px; }
.steps { width: 100%; border-collapse: collapse; }
.steps td { padding: 3px 0; border-bottom: 1px solid var(--line); }
.steps td:last-child { text-align: right; }
.call { display: flex; flex-direction: column; gap: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px 12px; }
#override { width: 100%; margin: 6px 0 8px; }

@media (max-width: 700px) {
  .filters > * { flex: 1 1 140px; }
}

/* Views + map */
.near { display: inline-flex; gap: 6px; }
.views { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px; }
.tab { background: transparent; color: var(--text); border-color: var(--line); }
.tab.on { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
#map { height: calc(100vh - 230px); min-height: 420px; margin: 0 16px; border: 1px solid var(--line); border-radius: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 16px; align-items: center; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.dot-A { background: #16a34a; } .dot-B { background: #3b82f6; } .dot-C { background: #b45309; }
.dot-check { background: #a855f7; } .dot-hidden { background: #64748b; }
.leaflet-popup-content { font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.pop-open { margin-top: 6px; padding: 4px 10px; font-size: 12px; }
.top { flex-wrap: wrap; }
@media (max-width: 700px) { #me { display: none; } #map { height: 65vh; margin: 0 8px; } }
#list th[data-sort] { cursor: pointer; user-select: none; }
#list th[data-dir="asc"]::after { content: " \25B2"; font-size: 9px; }
#list th[data-dir="desc"]::after { content: " \25BC"; font-size: 9px; }
td.empty { padding: 28px 10px !important; text-align: center; color: var(--muted); }
.pill { display: inline-block; padding: 1px 8px; margin: 1px 0; border-radius: 999px; background: var(--accent-dim); color: #f58a52; font-size: 11px; font-weight: 600; white-space: nowrap; }
.missing { color: var(--warn); }
.kv { width: 100%; border-collapse: collapse; margin: 6px 0; }
.kv td { padding: 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv td:first-child { color: var(--muted); width: 38%; padding-right: 10px; }

/* ---------- Dashboard ---------- */
#dash-view { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); cursor: pointer; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--accent); transform: translateY(-1px); background: var(--panel); }
.tile-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tile-n { font-size: 30px; font-weight: 800; color: var(--hi); line-height: 1.1; }
.tile.hot .tile-n { color: var(--accent); }
.tile-note { font-size: 12px; color: var(--muted); }
.tile.warn-tile .tile-note { color: #f59e0b; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.card h3 { margin: 0; font-size: 15px; color: var(--hi); }
.card .sub { margin: 2px 0 12px; font-size: 12px; color: var(--muted); }
.card.empty { text-align: center; color: var(--muted); padding: 30px; grid-column: 1 / -1; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 5px 4px; background: none; border: 0; border-radius: 6px; color: var(--text); text-align: left; cursor: pointer; }
.hbar:hover:not(:disabled) { background: var(--panel2); }
.hbar:disabled { cursor: default; opacity: .55; }
.hbar-label { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 14px; display: block; }
.hbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.hbar-val { font-size: 13px; font-weight: 700; color: var(--hi); white-space: nowrap; min-width: 64px; text-align: right; }
.hbar-val .muted { font-weight: 500; margin-left: 4px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { width: 170px; height: 170px; flex: none; }
.donut .arc { cursor: pointer; transition: stroke-width .15s; }
.donut .arc:hover { stroke-width: 22; }
.donut-n { fill: var(--hi); font-size: 24px; font-weight: 800; }
.donut-l { fill: var(--muted); font-size: 11px; }
.legend-list { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 180px; }
.leg { display: grid; grid-template-columns: 12px 1fr auto 44px; align-items: center; gap: 8px; padding: 5px 6px; background: none; border: 0; border-radius: 6px; color: var(--text); text-align: left; cursor: pointer; font-size: 13px; }
.leg:hover { background: var(--panel2); }
.leg i { width: 10px; height: 10px; border-radius: 3px; }
.leg b { color: var(--hi); text-align: right; }
.leg .muted { text-align: right; font-size: 12px; }
.cols { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; height: 150px; align-items: end; border-bottom: 1px solid var(--line2); }
.col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; cursor: default; }
.col-bar { width: 100%; max-width: 24px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; }
.col:hover .col-bar { background: #f58a52; }
.col-v { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.cols-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line2); color: var(--text); cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--accent); background: var(--panel2); }
.chip b { color: var(--hi); }
.feed { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed:last-child { border-bottom: 0; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; box-shadow: 0 0 0 3px var(--accent-dim); }
.tip { position: fixed; z-index: 2000; pointer-events: none; background: #1a1a28; color: var(--hi); border: 1px solid var(--line2); padding: 6px 9px; border-radius: 6px; font-size: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.4); max-width: 260px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

.filters select, .filters input { max-width: 100%; }
.filter-toggle { display: none; margin-left: auto; }
@media (max-width: 700px) {
  .filter-toggle { display: inline-block; }
  .filters:not(.open) > :nth-child(n+3) { display: none; }
  .views { flex-wrap: wrap; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile-n { font-size: 24px; }
}
@media (max-width: 520px) {
  .hbar { grid-template-columns: 1fr auto; row-gap: 4px; }
  .hbar-label { grid-column: 1; grid-row: 1; }
  .hbar-val { grid-column: 2; grid-row: 1; min-width: 0; }
  .hbar-track { grid-column: 1 / -1; grid-row: 2; }
  .card { padding: 14px; }
}

/* ---------- Toolbar: one row + collapsible filters (pill style, like Live Lead Activity) ---------- */
.toolbar { padding: 12px 16px 6px; }
.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line2); border-radius: 999px; background: var(--panel); }
.seg .tab { border: 0; border-radius: 999px; padding: 6px 14px; background: transparent; color: var(--muted); font-weight: 600; }
.seg .tab.on { background: var(--accent-dim); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(242,101,34,.45); }
.pill-sel { border-radius: 999px !important; padding: 7px 14px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-weight: 600; font-size: 13px; }
select.pill-sel { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.pill-sel:hover, .pill-sel:focus { border-color: var(--accent); outline: none; }
.search { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; }
.search svg, .icon-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.search input { border: 0; background: transparent; padding: 7px 0; width: 130px; color: var(--text); font-weight: 600; }
.search input:focus { outline: none; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 13px; background: var(--panel); border: 1px solid var(--line2); color: var(--text); font-weight: 600; font-size: 13px; }
.icon-btn.on, .icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--panel); }
#filter-count { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; padding: 0 5px; text-align: center; }
.more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.more input.pill-sel { width: 120px; }
@media (max-width: 700px) {
  .icon-btn span { display: none; }
  .search input { width: 100px; }
  .bar > select.pill-sel { flex: 1 1 120px; }
}

/* Drawer must sit above Leaflet's map panes (z-index 400-1000). */
.drawer { z-index: 1500; }
.tip { z-index: 2500; }

/* ---------- Hot 10 ---------- */
.hot-card { border-color: rgba(242,101,34,.35); background: linear-gradient(180deg, rgba(242,101,34,.06), var(--panel) 60%); }
.hot-row { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.hot-row:last-child { border-bottom: 0; }
.hot-row:hover { background: var(--panel2); }
.hot-n { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--accent-dim); color: var(--accent); }
.hot-main b { color: var(--hi); }
.hot-main .hi { color: var(--text); font-weight: 600; }
.hot-why { color: #f58a52; margin-top: 2px; }
.hot-call { font-weight: 700; white-space: nowrap; }
.hot-open { border-radius: 999px; padding: 5px 12px; font-size: 12px; }

.seg { flex-wrap: nowrap; flex: none; }
.bar > select.pill-sel { max-width: 220px; min-width: 0; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .seg .tab { padding: 6px 11px; font-size: 13px; }
  .bar > select.pill-sel { max-width: none; flex: 1 1 100%; }
  .search { flex: 1 1 auto; }
  .search input { width: 100%; min-width: 0; }
  .top { gap: 8px; }
}
.more select.pill-sel { max-width: 100%; min-width: 0; text-overflow: ellipsis; }

/* Hot 10: one line per lead */
.hot-head, .hot-row { display: grid; grid-template-columns: 26px minmax(150px, 1.5fr) minmax(80px, .8fr) minmax(70px, .7fr) minmax(90px, .9fr) minmax(110px, 1fr) minmax(110px, 1.2fr) auto auto; gap: 12px; align-items: center; }
.hot-head { padding: 0 6px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); }
.hot-row { padding: 8px 6px; }
.hot-name { font-weight: 700; color: var(--hi); }
.hot-name, .hot-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 13px; }
.hot-cell.hi { color: var(--text); font-weight: 600; }
.hot-why { color: #f58a52; margin: 0; }
@media (max-width: 900px) {
  .hot-head { display: none; }
  .hot-row { grid-template-columns: 26px 1fr auto; row-gap: 2px; }
  .hot-row .hot-cell { display: none; }
  .hot-row .hot-why { display: block; grid-column: 2; grid-row: 2; }
  .hot-call { grid-column: 3; grid-row: 1; }
  .hot-open { grid-column: 3; grid-row: 2; justify-self: end; }
}

/* Contact badges (neutral; green only when phone + email are both present) */
.cbadges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.cb { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line2); }
.cb-good { color: #4ade80; border-color: rgba(22,163,74,.4); background: rgba(22,163,74,.1); }

/* Info box */
.info { position: relative; background: var(--panel); border: 1px solid var(--line2); border-left: 3px solid var(--accent); border-radius: 12px; padding: 14px 18px; }
.info h3 { margin: 0 0 6px; font-size: 14px; color: var(--hi); }
.info ul { margin: 0; padding-left: 18px; color: var(--text); font-size: 13px; line-height: 1.55; }
.info b { color: var(--hi); }
.info-close { position: absolute; top: 10px; right: 12px; padding: 3px 10px; font-size: 12px; border-radius: 999px; }

/* Drawer: never scroll sideways; long links wrap */
.drawer { overflow-x: hidden; }
.drawer a, .drawer .kv td, .drawer li { overflow-wrap: anywhere; }
.steps td:first-child { white-space: nowrap; padding-right: 10px; }
.steps td.bar { width: 45%; padding: 0 10px; }
.steps .bar-track { display: block; height: 6px; border-radius: 3px; background: var(--line2); overflow: hidden; }
.steps .bar-track span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.leaflet-popup-content a { color: #c2410c; }
@media (max-width: 900px) {
  .hot-row .hot-site { display: block; grid-column: 2; grid-row: 2; }
  .hot-row .hot-why { grid-row: 3; }
}

/* ===== v1.4.3 fixes ===== */
/* Icon buttons: readable on hover (no orange-on-orange) */
.icon-btn:hover, .icon-btn.on { background: var(--accent-dim) !important; color: #f58a52; border-color: var(--accent); }
/* Hot 10: header + rows share FIXED outer columns so headings line up */
.hot-head, .hot-row { grid-template-columns: 26px minmax(150px, 1.5fr) minmax(80px, .8fr) minmax(70px, .7fr) minmax(90px, .9fr) minmax(110px, 1fr) minmax(110px, 1.2fr) 128px 72px; justify-items: start; text-align: left; }
.hot-head > span:nth-last-child(2) { justify-self: start; }
.hot-open { justify-self: end; }

/* ===== Mobile (<= 700px): card layouts, 44px tap targets, 16px inputs (no iOS zoom) ===== */
@media (max-width: 700px) {
  body { font-size: 15px; }
  .top { padding: 10px 12px; flex-wrap: nowrap; }
  .top #logout { padding: 8px 12px; }
  #counts { font-size: 13px; }
  .toolbar { padding: 10px 12px 4px; }
  .bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .bar .seg { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
  .seg .tab { min-height: 40px; font-size: 14px; }
  .bar > select.pill-sel, .search { min-height: 44px; }
  .bar > select[name="trade"] { grid-column: 1 / -1; }
  .search { grid-column: 1 / -1; }
  .bar .icon-btn { min-height: 44px; justify-content: center; }
  .icon-btn span { display: inline; }
  #map-hint { grid-column: 1 / -1; }
  input, select, textarea, .search input { font-size: 16px !important; }
  .more { display: grid; grid-template-columns: 1fr 1fr; }
  .more .pill-sel { min-height: 44px; width: 100%; }
  .more #clear-filters { grid-column: 1 / -1; }

  #dash-view { padding: 0 12px 24px; gap: 12px; }
  .info ul { font-size: 14px; }
  .card { padding: 14px; border-radius: 14px; }

  .pager button { min-height: 44px; padding: 0 18px; }

  /* Drawer = full screen sheet with sticky close */
  .drawer { width: 100%; padding: 0 16px 40px; border-left: 0; }
  .drawer .close { position: sticky; top: 0; float: right; margin: 12px -4px 0 0; min-height: 40px; z-index: 2; background: var(--panel); }
  .drawer h2 { padding-top: 14px; font-size: 22px; }
  .kv td { font-size: 14px; padding: 7px 0; }
  .kv td:first-child { width: 34%; }

  #map { height: 62vh; margin: 0 12px; }
  .legend { padding: 8px 12px; }
  .tiles { gap: 10px; }
  .tile { padding: 12px 14px; min-height: 96px; }
}

/* ===== Sheet tables (Hot 10 + List): single line, solid heading bar like the lead sheet ===== */
.sheet-wrap, .table-wrap { overflow-x: auto; }
table.sheet { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; font-size: 13px; }
.sheet thead th { background: #000; color: #fff; font-weight: 700; font-size: 12.5px; text-transform: none; letter-spacing: 0; text-align: left; padding: 9px 12px; white-space: nowrap; border-bottom: 2px solid var(--line2); }
.sheet thead th[data-sort] { cursor: pointer; user-select: none; }
.sheet thead th[data-sort]:hover { color: #f58a52; }
.sheet thead th.sorted { color: #f58a52; }
.sheet td { padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; max-width: 240px; }
.sheet tbody tr { cursor: pointer; }
.sheet tbody tr:hover td { background: var(--panel2); }
.sheet tbody tr:last-child td { border-bottom: 0; }
.sheet .c-company { max-width: 230px; }
.sheet .c-company b { color: var(--hi); }
.sheet .c-site, .sheet .c-email { max-width: 180px; }
.sheet .c-svc { max-width: 230px; }
.sheet .c-svc .pill { margin-right: 4px; }
.sheet .c-n, .sheet .c-tier, .sheet .c-score { width: 1%; }
.sheet .c-why { max-width: 200px; }
.sheet .flag { font-size: 10.5px; font-weight: 700; color: #f59e0b; border: 1px solid rgba(245,158,11,.4); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.sheet .hot-why { color: #f58a52; }
.sheet td.empty { white-space: normal; }
/* map pop-up rows */
.pop { min-width: 220px; }
.pop-title { display: block; font-size: 14px; margin-bottom: 6px; }
.pop-row { display: grid; grid-template-columns: 70px 1fr; gap: 8px; font-size: 12.5px; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-row span { color: #64748b; }
.pop .flag { font-size: 10px; color: #b45309; margin-left: 4px; }

/* Mobile: sheet rows become cards (labels on the left, values on the right) */
@media (max-width: 700px) {
  table.sheet, .sheet tbody, .sheet tr, .sheet td { display: block; width: 100%; max-width: none; }
  table.sheet { border: 0; background: none; }
  .sheet thead { display: none; }
  .sheet tbody tr { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
  .sheet tbody tr:hover td { background: none; }
  .sheet td { border: 0; padding: 5px 0; display: grid; grid-template-columns: 96px 1fr; gap: 10px; font-size: 14px; white-space: nowrap; }
  .sheet td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; }
  .sheet td.c-company { display: block; font-size: 16px; padding: 2px 0 6px; white-space: normal; }
  .sheet td.c-company::before, .sheet td.c-n::before { content: none; }
  .sheet td.c-n { display: none; }
  .sheet td.c-svc { white-space: normal; }
  .sheet td.c-svc .pill { margin: 0 4px 4px 0; }
  .sheet td.c-score { display: none; }
  .sheet td.c-phone a.tel { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-dim); text-decoration: none; font-weight: 700; justify-self: start; }
  .sheet td.empty { display: block; }
  .sheet td.empty::before { content: none; }
}
.sheet td .v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .sheet td.c-svc .v { white-space: normal; }
  .sheet td.c-company .v { white-space: normal; }
}
@media (max-width: 700px) {
  .sheet tbody tr { position: relative; }
  .sheet td.c-company { padding-right: 44px; }
  .sheet td.c-tier { position: absolute; top: 12px; right: 12px; width: auto; display: block; padding: 0; }
  .sheet td.c-tier::before { content: none; }
  .sheet td.c-svc .v { display: flex; flex-wrap: wrap; gap: 4px; overflow: visible; }
  .sheet td.c-svc .pill { margin: 0; white-space: nowrap; }
}

/* ===== Orange = clickable only ===== */
.pill { background: var(--panel2) !important; color: var(--text) !important; border: 1px solid var(--line2); font-weight: 600; }
.hot-n { background: var(--panel2) !important; color: var(--muted) !important; }
.hot-why, .sheet .hot-why { color: var(--text) !important; }
.sheet a, .kv a, .pop a { color: #f58a52; text-decoration: none; }
.sheet a:hover, .kv a:hover { text-decoration: underline; }
/* Phone + email: identical link style and size everywhere */
.sheet td.c-phone a.tel, .sheet td.c-email a { font-size: inherit; font-weight: 600; }
@media (max-width: 700px) {
  .sheet td.c-phone a.tel { display: inline; min-height: 0; padding: 0; border: 0; background: none; font-weight: 600; }
  .sheet td.c-phone, .sheet td.c-email { padding: 8px 0; }   /* comfortable tap height without a big button */
  .sheet td.c-svc .pill { white-space: normal; }
}
/* Headings: no orange. Sortable ones show a subtle underline on hover + an arrow when sorted. */
.sheet thead th[data-sort]:hover, .sheet thead th.sorted { color: #fff; }
.sheet thead th[data-sort]:hover { text-decoration: underline; text-underline-offset: 4px; }
.sheet .flag, .pop .flag { color: var(--muted); border-color: var(--line2); }
/* Calmer dashboard: orange reserved for actions (links, buttons, selected tab) */
.hot-card { border-color: var(--line) !important; background: var(--panel) !important; }
.tile.hot .tile-n { color: var(--hi); }
.tile:hover { border-color: var(--line2); }
.hbar-fill, .col-bar { background: #94a3b8 !important; }
.col:hover .col-bar { background: #cbd5e1 !important; }
.feed-dot { background: #94a3b8; box-shadow: none; }
.chip:hover { border-color: var(--line2); background: var(--panel2); color: var(--hi); }
.top { box-shadow: none; }
@media (max-width: 700px) {
  .sheet tbody td { max-width: none !important; }
  .sheet td .v { white-space: normal; overflow-wrap: anywhere; }
}
.icp h3 { margin-top: 18px; }
.icp ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
.icp .good { color: #4ade80; } .icp .bad { color: #94a3b8; } .icp .chk { color: #c084fc; }
@media (max-width: 700px) { .top .icon-btn span { display: none; } .top .icon-btn { min-height: 40px; padding: 8px 11px; } }
.sheet td a, .sheet td a.tel { font-size: inherit !important; font-weight: 500 !important; }
/* Send to HQ */
.hq-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel2); }
.hq-box #hq-send { border-radius: 999px; padding: 7px 16px; font-weight: 700; }
.hq-box select.pill-sel { min-width: 140px; }
.hq-in, .hq-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: #4ade80; border: 1px solid rgba(22,163,74,.4); background: rgba(22,163,74,.1); }
.hq-tag { margin-left: 6px; vertical-align: 1px; }
