/* Capii Command Center — Cold Lists
   Accent: #1D4E89 | Capii-only */

:root {
  --bg: #0B0E14;
  --bg-elevated: #12161F;
  --bg-card: #141922;
  --bg-card-hover: #1A2030;
  --border: #232A38;
  --border-subtle: #1C2230;
  --text: #F2F4F8;
  --text-muted: #8B93A7;
  --text-dim: #5C6578;
  --accent: #1D4E89;
  --accent-hover: #2563A8;
  --accent-soft: rgba(29, 78, 137, 0.25);
  --green: #3DCF8E;
  --green-soft: rgba(61, 207, 142, 0.15);
  --amber: #E5A84B;
  --amber-bg: #C48A2A;
  --amber-soft: rgba(229, 168, 75, 0.18);
  --red: #E05C5C;
  --red-soft: rgba(224, 92, 92, 0.15);
  --pill-bg: #1A2130;
  --radius: 8px;
  --radius-sm: 6px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

a { color: #5B9BD5; text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select { font-family: inherit; font-size: inherit; }

/* Top nav tabs */
.top-tabs {
  display: flex;
  gap: 28px;
  padding: 18px 28px 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg);
}

.top-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0 0 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  letter-spacing: 0.01em;
}

.top-tab:hover { color: var(--text); }

.top-tab.active {
  color: var(--text);
}

.top-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.page {
  padding: 24px 28px 48px;
  max-width: 1440px;
  margin: 0 auto;
}

/* Header row */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 6px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.stats-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-width: 110px;
  text-align: center;
  background: var(--bg-elevated);
}

.stat-box .stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.stat-box .stat-value.warn { color: var(--amber); }

.stat-box .stat-label {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: #334058;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-sm { padding: 5px 10px; font-size: 12px; }

.btn-ghost {
  border-color: rgba(255,255,255,0.35);
  color: var(--text);
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-wrap {
  position: relative;
  flex: 0 1 260px;
  min-width: 180px;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 12px 8px 36px;
  outline: none;
}

.search-input::placeholder { color: var(--text-dim); }

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.filter-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.pill-btn:hover { color: var(--text); background: var(--pill-bg); }

.pill-btn.active {
  background: var(--accent);
  color: #fff;
}

.toolbar-spacer { flex: 1; }

.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* List cards grid */
.lists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 18px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.list-card:hover {
  background: var(--bg-card-hover);
  border-color: #2E3A52;
  text-decoration: none;
  transform: translateY(-1px);
}

.list-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
}

.list-card-meta {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.list-card-stats {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.list-card-stats .muted { color: var(--text-muted); font-weight: 400; }

.coverage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.cov-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.cov-pill.good { color: var(--green); border-color: rgba(61,207,142,0.25); background: var(--green-soft); }
.cov-pill.warn { color: var(--amber); border-color: rgba(229,168,75,0.3); background: var(--amber-soft); }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(29, 78, 137, 0.55);
  color: #8BB4E0;
  background: var(--accent-soft);
  font-weight: 500;
}

.list-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: capitalize;
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}

.status-dot.draft::before { background: #6B7280; }
.status-dot.validated::before { background: var(--green); }
.status-dot.sending::before { background: #60A5FA; }
.status-dot.sent::before { background: #A78BFA; }
.status-dot.retired::before { background: #4B5563; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.coming-soon {
  padding: 80px 24px;
  text-align: center;
  color: var(--text-muted);
}

.coming-soon h2 {
  color: var(--text);
  font-weight: 650;
  margin: 0 0 8px;
}

.hidden { display: none !important; }

/* Detail page */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.back-link:hover { color: var(--text); }

.gate-banner {
  background: var(--amber-bg);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin: 16px 0 18px;
  font-weight: 500;
}

.sub-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.sub-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0 0 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.sub-tab:hover { color: var(--text); }

.sub-tab.active {
  color: var(--text);
}

.sub-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.filter-group {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.filter-group .pill-btn {
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
}

.filter-group .pill-btn.active {
  background: var(--accent);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  background: var(--bg-card);
  max-height: calc(100vh - 340px);
  min-height: 280px;
}

table.records {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.records thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #10151E;
}

table.records th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.records td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: middle;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.records.dense th { padding: 8px 10px; }
table.records.dense td { padding: 6px 10px; font-size: 12.5px; }
table.records.dense .val-btn { width: 32px; height: 32px; }

table.records tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

table.records tbody tr:last-child td { border-bottom: none; }

.tier-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(61,207,142,0.3);
}

.tier-pill.B {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(229,168,75,0.35);
}

.tier-pill.X {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(224,92,92,0.35);
}

.flag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid rgba(229,168,75,0.35);
  white-space: nowrap;
}

.profile-link {
  color: #5B9BD5;
  font-weight: 500;
}

.profile-link:hover { text-decoration: underline; }

.val-btns {
  display: flex;
  gap: 4px;
}

.val-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.val-btn:hover { color: var(--text); border-color: #3A455C; }

.val-btn.yes.active {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(61,207,142,0.45);
}

.val-btn.no.active {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(224,92,92,0.45);
}

.panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  padding: 24px;
  color: var(--text-muted);
  min-height: 200px;
}

.panel h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
}

.panel dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 16px;
  margin: 16px 0 0;
  font-size: 13px;
}

.panel dt { color: var(--text-dim); }
.panel dd { margin: 0; color: var(--text); }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 100;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.banner-offline {
  background: rgba(229,168,75,0.12);
  border: 1px solid rgba(229,168,75,0.3);
  color: var(--amber);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .page { padding: 16px; }
  .top-tabs { padding: 14px 16px 0; gap: 20px; }
  .page-header { flex-direction: column; }
  .header-right { align-items: stretch; width: 100%; }
  .stats-row { justify-content: stretch; }
  .stat-box { flex: 1; min-width: 0; }
  .table-wrap { max-height: none; }
}

/* ——— Auth gate ——— */
.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(29, 78, 137, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(29, 78, 137, 0.18), transparent 50%),
    var(--bg);
}

.auth-gate.hidden { display: none !important; }

.auth-gate-inner {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}

.auth-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.auth-title {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-dim);
}

.auth-denied {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  border: 1px solid rgba(224, 92, 92, 0.35);
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
}

.auth-google-btn {
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  font-size: 14px;
  gap: 10px;
}

.auth-chrome {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
}

.auth-chrome.hidden { display: none !important; }

.auth-chrome-email {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-tabs { align-items: center; }

.top-tab {
  text-decoration: none;
  min-height: 40px;
  display: inline-flex;
  align-items: flex-end;
}

/* Niche / cards */
.niche-toolbar { margin-top: -8px; margin-bottom: 16px; }
.filter-label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 4px;
}
.list-card-top { min-height: 0; }
.niche-chip {
  display: inline-flex;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8BB4E0;
  background: var(--accent-soft);
  border: 1px solid rgba(29, 78, 137, 0.45);
  border-radius: 4px;
  padding: 2px 7px;
}

/* Pager */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0 4px;
  flex-wrap: wrap;
}
.pager-info {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 200px;
  text-align: center;
}
.pager .btn { min-height: 40px; min-width: 96px; }
.pager .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Sticky filter bar */
.sticky-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(11, 14, 20, 0.92);
  backdrop-filter: blur(8px);
  padding: 10px 0;
  margin-left: -4px;
  margin-right: -4px;
  padding-left: 4px;
  padding-right: 4px;
  border-bottom: 1px solid transparent;
}

/* Tap targets */
.pill-btn { min-height: 36px; }
.btn { min-height: 36px; }
.btn-sm { min-height: 40px; padding: 8px 12px; }
.val-btn { width: 40px; height: 40px; }
.search-input { min-height: 40px; }

/* Mobile pass */
@media (max-width: 900px) {
  .lists-grid {
    grid-template-columns: 1fr;
  }
  .sticky-toolbar {
    position: sticky;
    top: 0;
  }
  .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .desktop-table { display: none; }
  .mobile-cards { display: flex; }
  .auth-chrome-email { max-width: 120px; }
  .top-tabs { flex-wrap: wrap; gap: 12px 20px; }
  .pager { gap: 10px; }
  .filter-group { flex-wrap: wrap; }
  .header-right { align-items: stretch; }
  .stats-row { width: 100%; }
}

@media (max-width: 560px) {
  .page-title { font-size: 22px; }
  .auth-gate-inner { padding: 24px 18px; }
  .stat-box { padding: 8px 10px; }
}


/* ——— Pass 2: denser cards, coverage bars, mobile card-stack ——— */

.filters,
.sticky-toolbar {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(11, 14, 20, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.lists-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.list-card {
  padding: 12px 14px 10px;
  gap: 8px;
  border-radius: 8px;
}

.list-card-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

.list-card-meta {
  font-size: 11px;
}

.list-card-stats {
  font-size: 13px;
  margin: 0;
}

.list-card-footer {
  padding-top: 6px;
  font-size: 11px;
}

.niche-chip {
  font-size: 9px;
  padding: 2px 6px;
}

/* Mini coverage bars (LI% / email%) */
.cov-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}

.cov-bar-row {
  display: grid;
  grid-template-columns: 28px 1fr 36px;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cov-bar-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.cov-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  min-width: 0;
  transition: width 0.25s ease;
}

.cov-bar-fill.good { background: var(--green); }
.cov-bar-fill.warn { background: var(--amber); }

.cov-bar-val {
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0;
}

/* Skeleton loading cards */
.list-card.skeleton {
  pointer-events: none;
  min-height: 132px;
  cursor: default;
}

.list-card.skeleton:hover {
  transform: none;
  background: var(--bg-card);
  border-color: var(--border);
}

.skel {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skel-shine 1.2s ease-in-out infinite;
}

.skel-title { height: 14px; width: 72%; margin: 4px 0; }
.skel-meta { height: 10px; width: 48%; }
.skel-bar { height: 4px; width: 100%; margin-top: 4px; }
.skel-chip { height: 16px; width: 64px; border-radius: 4px; }

@keyframes skel-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state strong { color: var(--text); display: block; margin-bottom: 6px; font-size: 15px; }
.empty-state.error {
  border-color: rgba(224, 92, 92, 0.35);
  color: var(--red);
  background: var(--red-soft);
}

/* Denser contact table */
table.records th {
  padding: 8px 10px;
}

table.records td {
  padding: 6px 10px;
  font-size: 12.5px;
}

.cell-muted {
  color: var(--text-dim);
  font-weight: 400;
}

.cell-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #5B9BD5;
  font-weight: 500;
  font-size: 12px;
}

.cell-icon-link svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.email-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(29, 78, 137, 0.4);
  color: #8BB4E0;
  font-size: 11px;
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover { color: var(--text); }

.breadcrumb .crumb-sep { opacity: 0.5; }

.breadcrumb .crumb-current {
  color: var(--text);
  font-weight: 500;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-count {
  font-size: 11px;
  color: var(--text-dim);
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}

.toast {
  z-index: 200;
  max-width: min(360px, calc(100vw - 32px));
}

.toast.progress {
  border-color: rgba(29, 78, 137, 0.55);
}

/* Mobile ≤720px: contact rows as card-stack */
@media (max-width: 720px) {
  .table-wrap {
    max-height: none;
    border: none;
    background: transparent;
    overflow: visible;
  }

  table.records {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  table.records thead {
    display: none;
  }

  table.records tbody tr {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: var(--shadow);
  }

  table.records tbody tr:hover {
    background: var(--bg-card-hover);
  }

  table.records td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
  }

  table.records td:last-child {
    border-bottom: none;
    padding-top: 10px;
  }

  table.records td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding-top: 2px;
  }

  table.records td.col-hide-mobile {
    display: none;
  }

  .val-btns { margin-left: auto; }

  .sticky-toolbar,
  .filters {
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .btn {
    flex: 1;
  }
}


/* ——— Pass 2 UX ——— */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.list-card.dense-card {
  padding: 14px 14px 12px;
  gap: 8px;
}

.list-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}

.niche-chip-empty {
  opacity: 0.55;
  border-style: dashed;
}

.card-open {
  color: #8BB4E0;
  font-weight: 600;
  font-size: 12px;
}

.cov-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.cov-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  margin-bottom: 3px;
}

.cov-bar-label {
  color: var(--text-dim);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cov-bar-pct {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.cov-bar-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.cov-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.25s ease;
}

.cov-bar.good .cov-bar-fill { background: var(--green); }
.cov-bar.good .cov-bar-pct { color: var(--green); }
.cov-bar.warn .cov-bar-fill { background: var(--amber); }
.cov-bar.warn .cov-bar-pct { color: var(--amber); }

/* Skeletons */
.skeleton-card, .sk {
  pointer-events: none;
}

.sk {
  background: linear-gradient(90deg, #1A2130 25%, #232B3C 50%, #1A2130 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.2s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sk-chip { width: 88px; height: 16px; }
.sk-title { width: 70%; height: 18px; margin-top: 4px; }
.sk-line { width: 90%; height: 12px; }
.sk-line.short { width: 45%; }
.sk-bar { width: 100%; height: 8px; border-radius: 999px; }
.sk-row { height: 36px; margin: 8px 12px; border-radius: 6px; }

.skeleton-table { padding: 8px 0; }

.error-state .muted { color: var(--text-dim); margin: 8px 0 14px; }

/* Presence icons */
.cell-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.cell-with-icon .cell-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence-icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.95;
}

.presence-email { color: #8BB4E0; }
.presence-li { color: #5B9BD5; }
.presence-empty { color: var(--text-dim); opacity: 0.45; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Crumb */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  flex-wrap: wrap;
}

.crumb-link {
  color: var(--text-muted);
  margin-bottom: 0;
}

.crumb-link:hover { color: var(--text); }

.crumb-sep {
  color: var(--text-dim);
}

.crumb-current {
  color: var(--text);
  font-weight: 560;
  max-width: min(520px, 70vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Email chip */
.email-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(29, 78, 137, 0.45);
  color: #8BB4E0;
  font-weight: 560;
}

/* Mobile contact cards */
.mobile-cards {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.contact-card-name {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.contact-card-row {
  font-size: 13px;
}

.contact-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.dot-sep { color: var(--text-dim); }

.contact-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contact-card-actions {
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.muted { color: var(--text-muted); }

/* Sticky filter bar stronger */
.sticky-toolbar {
  border-bottom-color: var(--border-subtle);
}

@media (max-width: 900px) {
  .filter-bar {
    align-items: stretch;
  }
  .filter-cluster {
    width: 100%;
  }
  .mobile-cards { display: flex; }
  .desktop-table { display: none !important; }
  .pager-info { min-width: 0; flex: 1; }
  .crumb-current { max-width: 55vw; }
}

@media (min-width: 901px) {
  .mobile-cards { display: none !important; }
  .desktop-table { display: block; }
}
