/* Clean Dashboard Layout - Fluid & Widescreen Responsive */
.dashboard-container {
  max-width: 1880px;
  width: 98%;
  margin-left: auto;
  margin-right: auto;
  padding: 24px 20px 64px;
}

@media (max-width: 1680px) {
  .dashboard-container {
    max-width: 99%;
    width: 99%;
    padding: 20px 16px 56px;
  }
}

@media (max-width: 1100px) {
  .dashboard-container {
    margin-left: 8px;
    margin-right: 8px;
    max-width: 100%;
    width: calc(100% - 16px);
    padding: 16px 8px 48px;
  }
}

/* Header Area & Brand */
.app-header {
  margin-bottom: 22px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-logo-svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.brand-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.title-with-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
}

.app-subtitle {
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 400;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot-anim 2s infinite ease-in-out;
}

@keyframes pulse-dot-anim {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

.cloud-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.cloud-sync-badge .sync-dot {
  font-size: 8px;
  color: #10b981;
}

.cloud-sync-badge.syncing {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.cloud-sync-badge.syncing .sync-dot {
  color: #3b82f6;
  animation: pulse-dot-anim 1s infinite ease-in-out;
}

.cloud-sync-badge.offline {
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
}

.cloud-sync-badge.offline .sync-dot {
  color: #64748b;
}

.cloud-sync-badge.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.cloud-sync-badge.error .sync-dot {
  color: #ef4444;
}

.cloud-sync-badge.pending {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  cursor: pointer;
  transition: all 0.18s ease;
}

.cloud-sync-badge.pending:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
}

.btn-settings-header {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  vertical-align: middle;
}

.btn-settings-header:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

/* Historical Records Section & Domain Tabs */
.historical-records-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.historical-records-header {
  display: flex;
  align-items: center;
}

.historical-title-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.domain-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.domain-tab {
  background: var(--bg-surface);
  color: var(--text-sub);
  border: 1px solid var(--border-subtle);
  padding: 8px 22px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.domain-tab:hover {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: #34486d;
  transform: translateY(-1px);
}

.domain-tab.active {
  background: rgba(37, 99, 235, 0.14);
  color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

/* Search and Quick Filters Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 14px 8px 34px;
  font-size: 12.5px;
  color: var(--text-main);
  outline: none;
  width: 280px;
  transition: all 0.18s ease;
  font-family: inherit;
}

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

.search-box:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  width: 310px;
}

.filter-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 640px) {
  .filter-controls-right {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }

  .segmented-filters {
    width: 100%;
    min-width: 0;
  }

  .filter-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    justify-content: center;
    padding-inline: 8px;
  }

  .column-visibility-wrapper,
  .btn-add-muni {
    flex: 1 1 0;
    min-width: 0;
  }

  .btn-col-picker,
  .btn-add-muni {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }
}

.segmented-filters {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
  align-items: center;
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.filter-tab:hover {
  color: #ffffff;
}

.filter-tab.active {
  background: var(--bg-card);
  color: #ffffff;
  border: 1px solid var(--border-card);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.filter-count {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.filter-tab.active .filter-count {
  color: var(--accent-blue-hover);
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot-red { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.6); }
.status-dot-blue { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.55); }
.status-dot-orange { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.55); }
.status-dot-yellow { background: #eab308; box-shadow: 0 0 6px rgba(234, 179, 8, 0.55); }

.filter-scope-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

/* Table Card & Internal Scroll Container */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-scroll-container {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
  scrollbar-color: #2b3a55 rgba(14, 20, 32, 0.6);
}

.table-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
  background: rgba(14, 20, 32, 0.6);
}

.table-scroll-container::-webkit-scrollbar-thumb {
  background: #2b3a55;
  border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}

.registry-table {
  width: 100%;
  border-collapse: collapse;
}

.registry-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 9px 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8ba2c4;
  background: #0d1320;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  white-space: nowrap;
}

.registry-table tbody td {
  padding: 9px 5px;
  border-bottom: 1px solid rgba(32, 44, 66, 0.5);
  font-size: 13px;
  white-space: nowrap;
}

.registry-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.registry-row:hover {
  background: rgba(30, 44, 70, 0.45);
}

.registry-row.active-row {
  background: rgba(37, 99, 235, 0.14) !important;
  border-left: 3px solid #3b82f6;
}

/* Specific Table Column Sizing */
.col-num {
  width: 40px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.col-muni {
  min-width: 120px;
}

.col-county {
  width: 95px;
  min-width: 90px;
  white-space: nowrap;
}

.county-value {
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 500;
  letter-spacing: 0.15px;
}

.muni-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.muni-title {
  font-weight: 600;
  color: #ffffff;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.muni-sub-meta {
  font-size: 11px;
  color: #7b8fa8;
  font-weight: 400;
  white-space: nowrap;
}

.invoice-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1.5px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-left: 6px;
  vertical-align: middle;
}

.registry-row:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
  background: rgba(37, 99, 235, 0.16);
}

.col-type {
  width: 58px;
}

.type-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.type-pill.county {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.type-pill.city {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.col-state {
  width: 45px;
}

.state-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
  font-family: var(--font-mono);
}

.col-pop {
  width: 82px;
}

.pop-value {
  color: #cbd5e1;
  font-size: 12px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.col-cities {
  min-width: 110px;
  max-width: 155px;
}

.cities-value {
  color: #94a3b8;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.col-sent {
  width: 108px;
  min-width: 106px;
}

.col-recv {
  width: 108px;
  min-width: 106px;
}

.col-ingest-count {
  min-width: 76px;
}

.col-ingest-start,
.col-ingest-end {
  min-width: 78px;
}

.col-ingest-days {
  min-width: 74px;
}

.col-sites {
  width: 95px;
  min-width: 90px;
}

.col-msg-type {
  width: 135px;
  min-width: 130px;
}

.col-dwr {
  width: 85px;
  min-width: 80px;
}

.col-nrd {
  width: 130px;
  min-width: 120px;
}

/* Sites Badges */
.site-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.5px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15px;
  white-space: nowrap;
}

.site-pill.site-justfoia {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.28);
}

.site-pill.site-govqa {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.28);
}

.site-pill.site-nextrequest {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.site-pill.site-gmail {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.site-pill.site-api {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.site-pill.site-cognito {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.28);
}

.site-pill.site-laserfiche {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.28);
}

.site-pill.site-cary311 {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.28);
}

.site-pill.site-custom,
.site-pill.site-portal {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.site-pill.site-empty {
  background: transparent;
  color: var(--text-muted);
  border: none;
}

/* Message Type Badges */
.msg-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15px;
  white-space: nowrap;
}

.msg-type-badge.msg-fresh {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.msg-type-badge.msg-followup {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.msg-type-badge.msg-update {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.28);
}

.msg-type-badge.msg-awaiting {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.msg-type-badge.msg-uptodate {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* DWR Pill (Days Without Reply) */
.dwr-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.dwr-pill.empty {
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-weight: 400;
}

/* NRD Pill (Next Request Day) */
.nrd-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nrd-pill.nrd-upcoming {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.nrd-pill.nrd-urgent {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.32);
}

.nrd-pill.nrd-overdue,
.nrd-pill.nrd-duenow {
  color: #f87171;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.nrd-pill.nrd-empty {
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-weight: 400;
}

.col-fees {
  width: 60px;
}

.fee-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.fee-badge.paid {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.fee-badge.free {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.fee-empty {
  color: var(--text-muted);
  font-size: 12px;
}

.col-req-file {
  width: 180px;
}

.req-file-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-plain {
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  font-family: var(--font);
}

.status-badge.green {
  color: var(--badge-green-text);
  background: var(--badge-green-bg);
  border-color: var(--badge-green-border);
}

.status-badge.awaiting,
.status-badge.pending {
  color: var(--badge-awaiting-text);
  background: var(--badge-awaiting-bg);
  border-color: var(--badge-awaiting-border);
}

.status-badge.orange {
  color: var(--badge-orange-text);
  background: var(--badge-orange-bg);
  border-color: var(--badge-orange-border);
}

.status-badge.red {
  color: var(--badge-red-text);
  background: var(--badge-red-bg);
  border-color: var(--badge-red-border);
}

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

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.empty-state-svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  opacity: 0.35;
  color: var(--text-sub);
}

/* Add Municipality Button */
.btn-add-muni {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.btn-add-muni:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.btn-add-muni:active {
  transform: translateY(0);
}

/* Top Navigation Bar & View Switcher */
.top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-bar-right {
  display: flex;
  align-items: center;
}

.domain-tabs {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 3px;
}

.domain-tab {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid transparent;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.domain-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  transform: translateY(-1px);
}

.domain-tab.active {
  background: rgba(37, 99, 235, 0.2);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.view-switch-tabs {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.nav-view-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.16s ease;
  font-family: inherit;
}

.nav-view-tab:hover {
  color: #ffffff;
  background: var(--bg-card);
  border-color: var(--border-card);
}

.nav-view-tab.active {
  background: var(--bg-card);
  color: #ffffff;
  border: 1px solid var(--border-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-view-tab.btn-historical-nav.active {
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* Sortable Column Headers */
.registry-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.sort-header-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.row-open-button {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.registry-table th.sortable:hover {
  color: #ffffff;
  background: #131c2e;
}

.registry-table th.sortable.sorted {
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.12);
}

.sort-icon {
  font-size: 9px;
  color: #60a5fa;
  margin-left: 3px;
  display: inline-block;
}

/* Date Cell & Color-Coded Date Pills */
.date-cell-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  min-height: 26px;
}

.btn-cell-plus {
  width: 22px;
  height: 22px;
  min-width: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #93c5fd;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
}

.btn-cell-plus:hover {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

.btn-cell-plus:active {
  transform: translateY(0);
}

.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  letter-spacing: 0.1px;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}

.date-pill-green {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.date-pill-orange {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.38);
}

.date-pill-red {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.date-pill-gray {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.25);
}

/* Fallback / Legacy Today Button in Table Cell */
.btn-cell-today {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.14s ease;
  font-family: inherit;
  white-space: nowrap;
}

.btn-cell-today:hover {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.btn-cell-today:active {
  transform: translateY(0);
}

/* Historical Records View Layout */
.history-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.history-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-back-tracker {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-sub);
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-back-tracker:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.history-view-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.history-view-sub {
  font-size: 11.5px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* Two-Pane Layout */
.history-two-pane {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 960px) {
  .history-two-pane {
    grid-template-columns: 1fr;
  }
}

.history-left-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-muni-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-muni-card:hover {
  background: var(--bg-card);
  border-color: #3b5074;
  transform: translateY(-1px);
}

.history-muni-card.active {
  background: rgba(37, 99, 235, 0.14);
  border-color: var(--accent-blue);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.2);
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

.history-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.history-pop {
  font-size: 10.5px;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.history-count-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

/* History Detail Panel (Right Pane) */
.history-right-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 22px 24px;
  min-height: 520px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

@media (max-width: 960px) {
  .history-right-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

.history-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.history-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #60a5fa;
  margin-bottom: 4px;
}

.history-detail-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.history-detail-meta {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 5px;
}

.history-detail-meta code {
  font-family: var(--font-mono);
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
}

.btn-archive-current {
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-archive-current:hover {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* History Timeline Items */
.history-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.history-timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.history-timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 16px;
  flex-shrink: 0;
  padding-top: 4px;
}

.marker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.marker-line {
  width: 2px;
  flex-grow: 1;
  background: rgba(59, 130, 246, 0.2);
  margin-top: 6px;
}

.history-timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 9px;
  padding: 14px 16px;
  flex-grow: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.history-cycle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-cycle-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

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

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

.history-detail-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.history-label {
  font-size: 11px;
  color: #7b8fa8;
}

.history-val {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  font-family: var(--font-mono);
}

.history-credential-val-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-copy-history-val {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-copy-history-val:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

.history-file-access-link:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #7dd3fc !important;
}

.history-meta-code {
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
}

.file-badge-inline {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
}

.history-source-file-row {
  margin-top: 4px;
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.history-source-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.history-source-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  word-break: break-all;
}

.history-col-span-2 {
  grid-column: span 2;
}

.history-val.highlight-count {
  color: #f59e0b;
}

.history-notes-row {
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
  margin-top: 6px;
  line-height: 1.45;
}

.history-notes-list {
  margin: 6px 0 2px 18px;
  padding: 0;
  list-style-type: disc;
}

.history-notes-list li {
  margin-bottom: 4px;
  line-height: 1.45;
  color: #cbd5e1;
}

.history-notes-list li:last-child {
  margin-bottom: 0;
}

.history-no-entries, .history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.history-sub-text {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 6px;
}

/* Header Auth Controls */
.header-auth-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-user-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 500;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: 9999px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-auth-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-auth-header:hover {
  background: #334155;
  border-color: #475569;
}

.btn-auth-header.btn-sign-out {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.28);
}

.btn-auth-header.btn-sign-out:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Auth Modal Styles */
.auth-modal-card {
  max-width: 420px;
  width: 90%;
}

.auth-modal-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 3px;
}

.auth-error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 10px;
  line-height: 1.4;
}

.auth-actions-row {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.auth-toggle-mode {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #1e293b;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.auth-link-btn {
  background: none;
  border: none;
  color: #38bdf8;
  font-weight: 600;
  cursor: pointer;
  padding: 0 4px;
  text-decoration: underline;
}

.auth-link-btn:hover {
  color: #7dd3fc;
}

/* Column Visibility Dropdown */
.column-visibility-wrapper {
  position: relative;
  display: inline-block;
}

.btn-col-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-col-picker:hover {
  background: #334155;
  color: #f8fafc;
}

.column-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  z-index: 100;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.column-picker-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding-bottom: 6px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 2px;
}

.col-pick-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.col-pick-item input[type="checkbox"] {
  accent-color: #3b82f6;
  cursor: pointer;
}

/* Request Type (Domain) Badges */
th.col-domain-type, td.col-domain-type {
  min-width: 68px;
  width: 76px;
  text-align: center;
}

.req-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.2;
}

.req-type-badge-ce {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.req-type-badge-gis {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.req-type-badge-ta {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.req-type-badge-td {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.req-type-badge-ot {
  background: rgba(236, 72, 153, 0.16);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

/* Method Pills */
th.col-req-type, td.col-req-type {
  min-width: 92px;
  width: 98px;
  text-align: left;
}

.method-cell-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.btn-cell-quick-send {
  width: 22px;
  height: 22px;
  min-width: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
}

.btn-cell-quick-send:hover {
  background: #9333ea;
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}

.btn-cell-quick-send:active {
  transform: translateY(0);
}

.btn-cell-quick-send:focus-visible {
  outline: 2px solid #a855f7;
  outline-offset: 1px;
}

.btn-cell-quick-send[aria-busy="true"],
.btn-cell-quick-send:disabled {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

.method-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.method-portal {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.method-email {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.28);
}

.method-api---download,
.method-api-download {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.method-open-records {
  background: rgba(249, 115, 22, 0.15);
  color: #ff8533;
  border: 1px solid rgba(249, 115, 22, 0.38);
}

/* Cadence Column & Badges */
th.col-cadence, td.col-cadence {
  min-width: 82px;
  width: 88px;
  text-align: left;
}

.cadence-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cadence-biweekly {
  background: rgba(99, 102, 241, 0.14);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.32);
}

.cadence-monthly {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.cadence-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.cadence-biweekly .cadence-dot {
  background-color: #818cf8;
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.6);
}

.cadence-monthly .cadence-dot {
  background-color: #64748b;
}

/* Undo Toast */
#toast.has-undo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.btn-undo-toast {
  background: #ffffff;
  color: #0f172a;
  border: none;
  font-weight: 700;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: opacity 0.15s ease;
}

.btn-undo-toast:hover {
  opacity: 0.9;
}

/* Turnaround Time Badges */
.history-avg-turnaround-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 2px 8px;
  border-radius: 4px;
}

.history-card-avg-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
}

/* ==========================================================================
   Ingest Log View Styling
   ========================================================================== */

.nav-view-tab.btn-ingest-nav.active {
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* Ingest Filter Bar */
.ingest-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ingest-search-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 480px;
}

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

.ingest-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ingest-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.ingest-state-filters {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.ingest-state-filter-btn {
  background: transparent;
  border: none;
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.ingest-state-filter-btn:hover {
  color: #ffffff;
}

.ingest-state-filter-btn.active {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Ingest Data Table */
.ingest-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}

.ingest-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.ingest-data-table th {
  background: rgba(15, 23, 42, 0.7);
  padding: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}

.ingest-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  width: auto;
  text-align: left;
}

.ingest-sort-btn:hover {
  color: #ffffff;
}

.ingest-sort-icon {
  font-size: 9px;
  color: #60a5fa;
  display: inline-block;
  min-width: 10px;
}

.ingest-data-table th.sorted .ingest-sort-btn {
  color: #60a5fa;
}

.ingest-data-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  vertical-align: middle;
}

.ingest-data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.ingest-data-table .col-ingest-date {
  white-space: nowrap;
  min-width: 80px;
}

.ingest-data-table .col-ingest-muni {
  white-space: nowrap;
  min-width: 115px;
}

.ingest-data-table .col-ingest-start,
.ingest-data-table .col-ingest-end {
  white-space: nowrap;
  min-width: 88px;
}

.ingest-data-table .col-ingest-days {
  white-space: nowrap;
  min-width: 76px;
}

.ingest-data-table .col-ingest-cadence {
  white-space: nowrap;
  min-width: 108px;
}

.cadence-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cadence-pill.cadence-biweekly {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.cadence-pill.cadence-monthly {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.ingest-date-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #cbd5e1;
  white-space: nowrap;
}

.ingest-date-cell.empty,
.ingest-date-cell.text-muted {
  color: var(--text-muted);
}

.ingest-data-table .ingest-muni-name {
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
}

.ingest-data-table .file-name-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-ext-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-left: 6px;
}

.ext-badge-csv {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ext-badge-xlsx {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ext-badge-pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ext-badge-zip {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.ext-badge-gsheet {
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.ext-badge-default {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.days-covered-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.days-covered-pill.is-long {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}

.days-covered-pill.is-zero {
  color: var(--text-muted);
  opacity: 0.85;
}

.record-count-muted {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.record-count-highlight {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #34d399;
}

.ingest-notes-cell {
  color: var(--text-sub);
  font-size: 11.5px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingest-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Scan Inbox Header Button */
.btn-sync-inbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.35);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sync-inbox:hover:not(:disabled) {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.6);
  color: #c4b5fd;
  transform: translateY(-1px);
}

.btn-sync-inbox:active:not(:disabled) {
  transform: translateY(0);
}

.btn-sync-inbox:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-sync-inbox:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.btn-sync-inbox.scanning .sync-icon {
  animation: spin-scan-inbox 1s linear infinite;
}

@keyframes spin-scan-inbox {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Requester details and active browser request controls */
.header-auth-group{flex-wrap:wrap;justify-content:flex-end;}
.btn-helper-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.15s ease;
}

.btn-helper-action:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.6);
  color: #bfdbfe;
  transform: translateY(-1px);
}

.btn-helper-action:active:not(:disabled) {
  transform: translateY(0);
}

.btn-helper-action:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-helper-action:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Undo Button Styles */
.btn-header-undo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-header-undo:not(:disabled) {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}

.btn-header-undo:not(:disabled):hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.6);
  color: #7dd3fc;
}

.btn-header-undo:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-header-undo:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.undo-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #0284c7;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* Ingest Log Days Covered Styles */
.col-ingest-days {
  text-align: right;
  min-width: 110px;
}

.days-covered-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.25);
  white-space: nowrap;
  display: inline-block;
}

.days-covered-pill.empty {
  background: transparent;
  border: none;
  color: var(--text-muted);
}

/* Data Inventory Tab & View Styles */
.nav-view-tab.btn-inventory-nav.active {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
}

.inventory-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.inventory-domain-tabs {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  flex-shrink: 0;
}

.inventory-domain-tabs .domain-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: all 0.15s ease;
}

.inventory-domain-tabs .domain-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.inventory-domain-tabs .domain-tab.active {
  background: var(--brand-primary, #3b82f6);
  color: #fff;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.35);
}

.inventory-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 440px;
  min-width: 260px;
}

.inventory-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.inventory-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inventory-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.inventory-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inventory-format-filters {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.inv-filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inv-filter-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.inv-filter-btn.active {
  background: #6366f1;
  color: #ffffff;
}

.inv-filter-btn:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.inventory-count-badge {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.inventory-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.inventory-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

.inventory-data-table th {
  background: #0f172a;
  color: var(--text-muted);
  font-weight: 600;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 2;
  user-select: none;
}

.inventory-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  width: 100%;
}

.inventory-sort-btn:hover {
  color: var(--text-main);
}

.inventory-sort-btn:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  border-radius: 2px;
}

.inventory-sort-icon {
  font-size: 9px;
  color: #6366f1;
}

.inventory-data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  color: var(--text-main);
}

.inventory-data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.inv-file-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-yn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.inv-yn-badge.yn-yes {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.inv-yn-badge.yn-no {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.inv-yn-badge.yn-custom {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 10px;
}

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

.ext-badge-xls {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.ext-badge-api {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.inv-field-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-field-empty {
  color: var(--text-muted);
  text-align: center;
}

.inv-notes-cell {
  font-size: 11.5px;
  color: var(--text-sub);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.inventory-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 13px;
}

#mort-helper-finish[hidden] { display: none; }
.header-auth-group { margin-left:auto; max-width:100%; }
.mort-helper-status { font-size: 12px; color: #94a3b8; }
.mort-helper-status.connected { color: #6ee7b7; }
.helper-field-preview { text-align: left; max-width: 800px; margin: auto; }
.helper-field-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Critical CE investigations remain distinct from routine Action follow-ups. */
.status-dot-critical { background: #fb7185; box-shadow: 0 0 6px rgba(251, 113, 133, 0.55); }
.filter-tab[data-filter="critical"].active { border-color: #fb7185; color: #fecdd3; }
.filter-tab[data-filter="critical"].active .filter-count { color: #fecdd3; }
.msg-type-badge.msg-critical { color: #fecdd3; background: rgba(190, 18, 60, 0.18); border: 1px solid rgba(251, 113, 133, 0.6); }
.critical-context { color: var(--text-sub); font-size: 11px; line-height: 1.5; margin-top: 4px; white-space: normal; }
@media (max-width: 640px) {
  .segmented-filters { flex-wrap: wrap; }
  .filter-tab { flex: 1 1 92px; min-height: 44px; }
}

/* ==========================================================================
   Lead Sources View Styling (read-only reference tab)
   Rules are scoped to .sources-view so generic names stay local to this tab.
   ========================================================================== */

.nav-view-tab.btn-sources-nav.active {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.38);
}

/* Four view buttons no longer fit one row on phones */
.nav-bar-right { flex-wrap: wrap; row-gap: 8px; }

.sources-view summary:focus-visible,
.sources-view a:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
}

.sources-view .view-panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sources-view .view-panel-header > div { min-width: 0; }
.sources-view .view-panel-title { font-size: 17px; font-weight: 700; color: var(--text-highlight); letter-spacing: -0.01em; text-wrap: balance; }
.sources-view .view-panel-subtitle { font-size: 12.5px; color: var(--text-sub); margin-top: 2px; }
.sources-view .sources-count { font-size: 12px; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.sources-view .sources-count strong { color: var(--text-main); font-weight: 600; }

/* Filter bar: reuses the Ingest Log search and chip container, with its own chips */
.sources-view .sources-filter-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.sources-view .sources-filter-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.sources-view .filter-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 84px;
}
.sources-view .ingest-search-wrap { flex: 1 1 260px; min-width: 0; }
.sources-view .ingest-state-filters { flex-wrap: wrap; max-width: 100%; }

.sources-view .sources-chip {
  background: transparent;
  border: none;
  color: var(--text-sub);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.sources-view .sources-chip:hover { color: #ffffff; }
.sources-view .sources-chip.active { background: rgba(59, 130, 246, 0.18); color: #60a5fa; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.sources-view .sources-chip.is-zero { color: var(--text-muted); }
.sources-view .chip-count { margin-left: 6px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sources-view .sources-chip.active .chip-count { color: inherit; opacity: 0.75; }

/* Fulton quick start */
.sources-view .quickstart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 14px;
}

.sources-view .quickstart-card summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 14px;
  cursor: pointer;
  border-radius: 10px;
}

.sources-view .quickstart-card summary::-webkit-details-marker { display: none; }
.sources-view .quickstart-card summary:hover { background: rgba(255, 255, 255, 0.02); }
.sources-view .qs-chevron { color: var(--text-muted); transition: transform 0.16s ease; flex-shrink: 0; }
.sources-view .quickstart-card[open] .qs-chevron { transform: rotate(90deg); }
.sources-view .qs-title { font-size: 13px; font-weight: 600; color: var(--text-main); }
.sources-view .qs-meta { font-size: 12px; color: var(--text-sub); }
.sources-view .qs-list { list-style: none; border-top: 1px solid var(--border-subtle); }

.sources-view .qs-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 4px 16px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.sources-view .qs-row:last-child { border-bottom: 0; }
.sources-view .qs-head { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-sub); background: rgba(15, 23, 42, 0.7); padding-block: 8px; }
.sources-view .qs-step { font-family: var(--font-mono); font-size: 12px; color: #6ee7b7; font-variant-numeric: tabular-nums; padding-top: 1px; }
.sources-view .qs-action { color: var(--text-main); font-size: 12.5px; }
.sources-view .qs-why { color: var(--text-sub); font-size: 12px; }

/* Sources table */
.sources-view .sources-table { width: 100%; min-width: 1500px; border-collapse: collapse; text-align: left; font-size: 12.5px; }

.sources-view .sources-table th {
  background: rgba(15, 23, 42, 0.7);
  padding: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  user-select: none;
}

.sources-view .sources-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sources-view .sources-sort-btn:hover { color: #ffffff; }
.sources-view .sources-sort-icon { font-size: 9px; color: #60a5fa; display: inline-block; min-width: 10px; }
.sources-view .sources-table th.sorted .sources-sort-btn { color: #60a5fa; }

.sources-view .sources-table td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  vertical-align: top;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
}

.sources-view .sources-table tbody tr:last-child td { border-bottom: 0; }
.sources-view .sources-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.sources-view .sources-table .col-priority { width: 72px; }
.sources-view .sources-table .col-county { white-space: nowrap; width: 128px; }
.sources-view .sources-table .col-type { white-space: nowrap; width: 140px; }
.sources-view .sources-table .col-source { min-width: 230px; max-width: 290px; }
.sources-view .sources-table .col-links { width: 220px; }
.sources-view .sources-table .col-access { min-width: 250px; max-width: 330px; }
.sources-view .sources-table .col-cadence { min-width: 200px; max-width: 260px; }
.sources-view .sources-table .col-cost { min-width: 120px; max-width: 170px; }
.sources-view .sources-table .col-contact { min-width: 200px; max-width: 250px; }
.sources-view .sources-table .col-notes { min-width: 260px; max-width: 340px; }
.sources-view .county-name { font-weight: 600; color: var(--text-main); }
.sources-view .source-name { font-weight: 600; color: var(--text-main); font-size: 12.5px; }
.sources-view .lead-type { margin-top: 3px; color: var(--text-muted); font-size: 11.5px; }
.sources-view .cell-empty { color: var(--text-muted); }
.sources-view .contact-phone { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11.5px; color: #cbd5e1; }

.sources-view .pill {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 9px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sources-view .pill-type,
.sources-view .pill-blue { color: #93c5fd; background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.28); }
.sources-view .pill-green { color: var(--badge-green-text); background: var(--badge-green-bg); border-color: var(--badge-green-border); }
.sources-view .pill-orange { color: var(--badge-orange-text); background: var(--badge-orange-bg); border-color: var(--badge-orange-border); }
.sources-view .pill-muted { color: #94a3b8; background: rgba(148, 163, 184, 0.1); border-color: rgba(148, 163, 184, 0.25); }
.sources-view .pill-priority { min-width: 26px; justify-content: center; font-family: var(--font-mono); }

.sources-view .link-list { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

.sources-view .src-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 210px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sources-view .src-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sources-view .src-link svg { flex-shrink: 0; }
.sources-view .src-link:hover { background: rgba(59, 130, 246, 0.16); border-color: rgba(59, 130, 246, 0.45); color: #93c5fd; }

.sources-view .sources-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); font-size: 13px; }

.sources-view .btn-clear {
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.sources-view .btn-clear:hover { background: var(--bg-hover); }

/* Phone: the table becomes stacked cards with a label per cell */
@media (max-width: 760px) {
  .sources-view .filter-label { min-width: 0; width: 100%; }
  .sources-view .qs-row { grid-template-columns: 28px minmax(0, 1fr); }
  .sources-view .qs-row .qs-why { grid-column: 2; }
  .sources-view .qs-head { display: none; }
  .sources-view .sources-table { min-width: 0; }
  .sources-view .sources-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sources-view .sources-table,
  .sources-view .sources-table tbody,
  .sources-view .sources-table tr,
  .sources-view .sources-table td { display: block; width: 100%; }
  .sources-view .sources-table tr { padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); }
  .sources-view .sources-table tbody tr:last-child { border-bottom: 0; }

  .sources-view .sources-table td {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    justify-items: start;
    gap: 0 10px;
    padding: 4px 0;
    border: 0;
    min-width: 0;
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sources-view .sources-table td::before {
    content: attr(data-label);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-top: 2px;
  }

  .sources-view .sources-table td[class] { width: 100%; min-width: 0; max-width: none; }
  .sources-view .sources-table td > * { grid-column: 2; min-width: 0; max-width: 100%; }
  .sources-view .sources-table td.is-empty { display: none; }
  .sources-view .sources-table td.sources-empty { display: block; }
  .sources-view .sources-table td.sources-empty::before { content: none; }
  .sources-view .src-link { max-width: 100%; }
}
