/* ============================================================
   DIGGBY DASHBOARD — Styles
   Bloomberg-terminal-meets-modern-SaaS aesthetic
   ============================================================ */

/* ---- SCANLINE OVERLAY (subtle CRT feel) ---- */
body.dash-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(108, 92, 231, 0.006) 3px,
    rgba(108, 92, 231, 0.006) 6px
  );
  pointer-events: none;
  z-index: 1000;
}

/* ---- KEYFRAMES ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
  50% { box-shadow: 0 0 24px 2px rgba(108, 92, 231, 0.08); }
}

@keyframes blinkCaret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes borderOrbit {
  to { transform: rotate(360deg); }
}

/* ---- LAYOUT SHELL ---- */
.dash-body {
  padding-top: 60px;
  min-height: 100vh;
}

.dash-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- NAV ---- */
.dash-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.dash-nav .logo {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.dash-nav .logo span {
  color: var(--accent-glow);
}

.nav-center {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-center::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  animation: pulseGlow 2.5s infinite;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-email {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.nav-logout {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-logout:hover {
  color: var(--red);
  background: rgba(255, 107, 107, 0.06);
}

/* ---- STATS BAR ---- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* Subtle top edge glow on cards */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  opacity: 0.2;
}

.stat-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -1px;
}

.stat-value--loading {
  color: var(--muted);
}

/* Slot card special treatment */
.stat-card--slot .stat-value {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.stat-card--slot .slot-name {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.stat-card--slot .slot-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(0, 210, 211, 0.08);
  border: 1px solid rgba(0, 210, 211, 0.15);
  border-radius: 4px;
  font-size: 11px;
  flex-shrink: 0;
}

.stat-card--slot .slot-detail {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* ---- CONTROLS BAR (tabs + filters) ---- */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeIn 0.4s 0.25s ease forwards;
}

.operator-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  flex-wrap: wrap;
}

.operator-views {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.operator-view-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
}

.operator-view-chip--active {
  color: #061114;
  border-color: rgba(0, 210, 211, 0.3);
  background: linear-gradient(135deg, rgba(0, 210, 211, 0.95), rgba(39, 195, 209, 0.9));
}

.operator-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-input--tag {
  min-width: 160px;
}

/* Feed Tabs */
.feed-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
}

.feed-tabs::-webkit-scrollbar { display: none; }

.feed-tab {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}

.feed-tab:hover {
  color: var(--white);
  background: rgba(108, 92, 231, 0.06);
}

.feed-tab--active {
  background: var(--accent);
  color: var(--white);
}

.feed-tab--active:hover {
  background: var(--accent-glow);
}

/* Feed tab count badge */
.feed-tab .tab-count {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent-glow);
  margin-left: 4px;
  opacity: 0.7;
}

.feed-tab--active .tab-count {
  color: rgba(255, 255, 255, 0.6);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.filter-select,
.filter-input {
  background: var(--surface);
  color: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.filter-select {
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235a5d72' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  min-width: 130px;
}

.filter-select option {
  background: var(--surface2);
  color: var(--white);
}

.filter-input {
  width: 180px;
}

.filter-select:focus,
.filter-input:focus {
  border-color: var(--accent);
}

.filter-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.btn-export {
  background: none;
  border: 1px solid rgba(0, 210, 211, 0.25);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-export:hover {
  background: rgba(0, 210, 211, 0.06);
  border-color: var(--teal);
}

/* ---- OPPORTUNITY WORKSPACE ---- */
.opportunity-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  min-height: 680px;
  margin: 18px 0 22px;
  opacity: 0;
  animation: fadeIn 0.4s 0.32s ease forwards;
}

.opportunity-rail,
.opportunity-map-shell,
.opportunity-list-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 17, 23, 0.88);
}

.opportunity-rail {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.opportunity-rail-head,
.opportunity-list-head,
.table-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.opportunity-rail-head h2,
.table-section-head h2,
.opportunity-list-head h3 {
  margin: 2px 0 0;
  color: var(--white);
  letter-spacing: -0.03em;
}

.opportunity-rail-head h2,
.table-section-head h2 {
  font-size: 20px;
}

.opportunity-list-head h3 {
  font-size: 17px;
}

.workspace-kicker,
.rail-section-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.workspace-status {
  border: 1px solid rgba(0, 210, 211, 0.24);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--teal);
  background: rgba(0, 210, 211, 0.06);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scope-stack {
  display: grid;
  gap: 10px;
}

.scope-card {
  border: 1px solid rgba(90, 93, 114, 0.22);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.scope-card span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scope-card strong {
  display: block;
  color: var(--white);
  font-size: 13px;
  line-height: 1.35;
}

.rail-section {
  padding-top: 16px;
  border-top: 1px solid rgba(90, 93, 114, 0.18);
}

.stage-summary,
.contact-readiness {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.stage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.stage-row span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stage-row strong {
  color: var(--white);
  font-family: var(--mono);
  font-size: 12px;
}

.stage-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
  flex: 0 0 auto;
}

.stage-dot--active-build,
.stage-dot--ready,
.map-pin--active-build span,
.stage-pill--active-build {
  background: #00d2d3;
}

.stage-dot--major-build,
.map-pin--major-build span,
.stage-pill--major-build {
  background: #48d7df;
}

.stage-dot--field-route,
.map-pin--field-route span,
.stage-pill--field-route {
  background: #f49b4f;
}

.stage-dot--hvac-scope,
.map-pin--hvac-scope span,
.stage-pill--hvac-scope {
  background: #8b7cf8;
}

.stage-dot--mechanical-retrofit,
.map-pin--mechanical-retrofit span,
.stage-pill--mechanical-retrofit {
  background: #66bfff;
}

.stage-dot--restaurant-buildout,
.map-pin--restaurant-buildout span,
.stage-pill--restaurant-buildout {
  background: #feca57;
}

.stage-dot--pre-opening,
.map-pin--pre-opening span,
.stage-pill--pre-opening {
  background: #5fe19a;
}

.stage-dot--license-pending,
.map-pin--license-pending span,
.stage-pill--license-pending {
  background: #a3e635;
}

.stage-dot--new-business,
.map-pin--new-business span,
.stage-pill--new-business {
  background: #38bdf8;
}

.stage-dot--insurance-signal,
.map-pin--insurance-signal span,
.stage-pill--insurance-signal {
  background: #8b7cf8;
}

.stage-dot--pre-construction,
.map-pin--pre-construction span,
.stage-pill--pre-construction {
  background: #38bdf8;
}

.stage-dot--tenant-buildout,
.stage-dot--web,
.map-pin--tenant-buildout span,
.stage-pill--tenant-buildout {
  background: #feca57;
}

.stage-dot--opening-license,
.map-pin--opening-license span,
.stage-pill--opening-license {
  background: #00d28c;
}

.stage-dot--opening-context,
.stage-dot--field,
.map-pin--opening-context span,
.stage-pill--opening-context {
  background: #a3e635;
}

.stage-dot--payment-risk,
.map-pin--payment-risk span,
.stage-pill--payment-risk {
  background: #ff6b6b;
}

.stage-dot--opportunity,
.map-pin--opportunity span,
.stage-pill--opportunity {
  background: #8b7cf8;
}

.stage-dot--missing {
  background: #5a5d72;
}

.stage-summary-empty,
.opportunity-list-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field-plan {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.field-plan-count {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
}

.field-plan-primary {
  color: var(--white);
  font-size: 13px;
  line-height: 1.4;
}

.field-plan-button {
  width: 100%;
  border: 1px solid rgba(0, 210, 211, 0.24);
  border-radius: 8px;
  background: rgba(0, 210, 211, 0.07);
  color: var(--teal);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.field-plan-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.opportunity-map-shell {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.map-toolbar {
  min-height: 62px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(90, 93, 114, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.view-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(90, 93, 114, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.view-toggle-button {
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.view-toggle-button--active {
  background: rgba(0, 210, 211, 0.12);
  color: var(--teal);
}

.stat-lens-select {
  min-width: 164px;
}

.map-kpis {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}

.map-kpis div {
  text-align: right;
}

.map-kpis span {
  display: block;
  color: var(--white);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
}

.map-kpis small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.map-and-list {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.opportunity-map {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background-color: #101319;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(35deg, transparent 0 46%, rgba(0, 210, 211, 0.09) 47% 48%, transparent 49% 100%),
    linear-gradient(115deg, transparent 0 55%, rgba(255, 255, 255, 0.055) 56% 57%, transparent 58% 100%);
  background-size: 44px 44px, 44px 44px, 420px 420px, 520px 520px;
}

.opportunity-map::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 13, 0.08), rgba(8, 9, 13, 0.48)),
    linear-gradient(90deg, rgba(8, 9, 13, 0.22), transparent 32%, transparent 68%, rgba(8, 9, 13, 0.22));
  pointer-events: none;
}

.map-region-label {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  border: 1px solid rgba(90, 93, 114, 0.24);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(15, 17, 23, 0.76);
  color: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.4px;
}

.map-pins {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  border: none;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  padding: 0;
}

.map-pin span {
  display: block;
  width: 14px;
  height: 14px;
  border: 3px solid #0c0f14;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.045), 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.map-pin--hot span {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 7px rgba(0, 210, 211, 0.08), 0 0 22px rgba(0, 210, 211, 0.34), 0 8px 22px rgba(0, 0, 0, 0.35);
}

.map-pin em {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  max-width: 190px;
  padding: 6px 8px;
  border: 1px solid rgba(90, 93, 114, 0.3);
  border-radius: 7px;
  background: rgba(15, 17, 23, 0.9);
  color: var(--white);
  font-style: normal;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.map-pin:hover span,
.map-pin:focus-visible span {
  transform: scale(1.25);
}

.map-pin:hover em,
.map-pin:focus-visible em {
  opacity: 1;
}

.map-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.map-empty strong {
  color: var(--white);
}

.map-controls {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 4;
  display: grid;
  gap: 8px;
}

.map-controls span {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(90, 93, 114, 0.24);
  border-radius: 8px;
  background: rgba(15, 17, 23, 0.82);
  color: var(--white);
  font-family: var(--mono);
  font-size: 16px;
}

.map-controls span:last-child {
  width: auto;
  padding: 0 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
}

.opportunity-list-panel {
  border-width: 0 0 0 1px;
  border-radius: 0;
  background: rgba(12, 14, 20, 0.94);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.opportunity-list-head {
  padding: 16px;
  border-bottom: 1px solid rgba(90, 93, 114, 0.18);
}

.opportunity-list-head > span {
  min-width: 34px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0, 210, 211, 0.08);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.opportunity-list {
  padding: 12px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
}

.opportunity-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(90, 93, 114, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--white);
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.opportunity-card:hover,
.opportunity-card:focus-visible {
  border-color: rgba(0, 210, 211, 0.32);
  background: rgba(0, 210, 211, 0.045);
  transform: translateY(-1px);
}

.opportunity-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.stage-pill,
.fit-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 7px;
  color: #081015;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.fit-pill {
  border: 1px solid rgba(90, 93, 114, 0.24);
  background: rgba(90, 93, 114, 0.22);
  color: var(--muted);
}

.fit-pill--high-fit {
  border-color: rgba(0, 210, 211, 0.35);
  background: rgba(0, 210, 211, 0.12);
  color: var(--teal);
}

.fit-pill--good-fit,
.fit-pill--watchlist {
  border-color: rgba(254, 202, 87, 0.24);
  background: rgba(254, 202, 87, 0.1);
  color: var(--amber);
}

.opportunity-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1.3;
}

.opportunity-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  min-height: 18px;
}

.opportunity-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2px;
}

.opportunity-card--loading {
  cursor: default;
}

.opportunity-card--loading span {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface2) 40%, var(--surface) 80%);
  background-size: 400px 100%;
  animation: shimmer 1.8s infinite linear;
}

.opportunity-card--loading span + span {
  margin-top: 10px;
}

.opportunity-card--loading span:nth-child(1) { width: 48%; }
.opportunity-card--loading span:nth-child(2) { width: 88%; }
.opportunity-card--loading span:nth-child(3) { width: 64%; }

.table-section-head {
  margin: 24px 0 10px;
}

.table-section-head > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.opportunity-workspace--list-mode .opportunity-map {
  min-height: 360px;
}

.opportunity-workspace--list-mode .opportunity-list-panel {
  background: rgba(12, 14, 20, 0.98);
}

/* ---- DATA TABLE ---- */
.table-wrap {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 0.4s 0.35s ease forwards;
}

.table-wrap--secondary {
  margin-top: 0;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  table-layout: fixed;
}

.data-table thead {
  background: var(--surface);
}

.data-table th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  cursor: col-resize;
  user-select: none;
  white-space: nowrap;
  transition: color 0.2s;
  position: relative;
  resize: horizontal;
  overflow: hidden;
}

.data-table th:hover {
  color: var(--white);
}

.data-table th .sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.3;
  font-size: 9px;
  vertical-align: middle;
}

.data-table th.sorted-asc .sort-icon,
.data-table th.sorted-desc .sort-icon {
  opacity: 1;
  color: var(--accent-glow);
}

.data-table th.col-value,
.data-table td.col-value {
  text-align: right;
}

.data-table td {
  padding: 13px 16px;
  font-size: 13px;
  color: var(--white);
  border-bottom: 1px solid rgba(108, 92, 231, 0.04);
  vertical-align: middle;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.008);
}

.data-table tbody tr:hover {
  background: rgba(108, 92, 231, 0.04);
}

.data-table tbody tr.row-clickable {
  cursor: pointer;
}

.data-table tbody tr.row-clickable:hover {
  background: rgba(0, 210, 211, 0.06);
}

/* Column-specific styles */
.col-company {
  font-weight: 600;
  min-width: 180px;
}

.company-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.company-name {
  font-weight: 700;
  color: var(--white);
  white-space: normal;
  line-height: 1.35;
}

.company-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.company-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 210, 211, 0.08);
  border: 1px solid rgba(0, 210, 211, 0.16);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.company-meta-pill--muted {
  background: rgba(90, 93, 114, 0.18);
  border-color: rgba(90, 93, 114, 0.28);
  color: var(--muted);
}

.company-meta-pill--crm {
  background: rgba(254, 202, 87, 0.1);
  border-color: rgba(254, 202, 87, 0.18);
  color: var(--amber);
}

.company-description {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
}

.col-type {
  min-width: 90px;
}

.col-date {
  font-family: var(--mono);
  font-size: 12px;
  min-width: 90px;
  color: var(--muted);
}

td.col-date {
  color: var(--muted);
}

.col-address {
  min-width: 160px;
}

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

td.col-community {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.col-value {
  font-family: var(--mono);
  font-weight: 600;
  min-width: 100px;
}

td.col-value {
  color: var(--teal);
  font-size: 12px;
}

.col-phone {
  font-family: var(--mono);
  font-size: 12px;
  min-width: 120px;
}

td.col-phone {
  color: var(--muted);
}

.col-website {
  min-width: 120px;
  max-width: 160px;
}

td.col-website a {
  color: var(--teal);
  font-size: 12px;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

td.col-website a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Type badge */
.type-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1;
}

.type-badge--permit {
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent-glow);
}

.type-badge--dev {
  background: rgba(0, 210, 211, 0.1);
  color: var(--teal);
}

.type-badge--biz {
  background: rgba(254, 202, 87, 0.1);
  color: var(--amber);
}

.type-badge--liquor {
  background: rgba(255, 107, 107, 0.1);
  color: var(--red);
}

.type-badge--court {
  background: rgba(90, 93, 114, 0.2);
  color: var(--muted);
}

/* Empty state */
.table-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
  font-size: 14px;
}

.table-empty .empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.table-empty p {
  margin-top: 4px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.3px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 8, 12, 0.58);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
}

.drawer-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

.lead-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 92vw);
  height: 100vh;
  background: rgba(13, 15, 21, 0.98);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.24s ease;
  z-index: 90;
  display: flex;
  flex-direction: column;
}

.lead-drawer--open {
  transform: translateX(0);
}

.lead-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.lead-drawer-kicker {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--teal);
  margin-bottom: 8px;
}

.lead-drawer-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lead-drawer-subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.lead-drawer-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.lead-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 28px;
}

.lead-drawer-empty,
.lead-drawer-loading {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  padding: 18px 0;
}

.drawer-section + .drawer-section {
  margin-top: 22px;
}

.drawer-section-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.drawer-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.drawer-card-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.drawer-card-value {
  font-size: 13px;
  line-height: 1.45;
  color: var(--white);
  white-space: normal;
  word-break: break-word;
}

.drawer-address {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.drawer-section--brief {
  margin-top: 0;
}

.drawer-insight-card {
  border: 1px solid rgba(0, 210, 211, 0.2);
  border-left: 4px solid var(--teal);
  border-radius: 12px;
  padding: 15px;
  background: rgba(0, 210, 211, 0.055);
}

.drawer-insight-label {
  margin-bottom: 8px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.drawer-insight-card p {
  color: var(--white);
  font-size: 13px;
  line-height: 1.55;
}

.contact-route-list {
  display: grid;
  gap: 10px;
}

.contact-route {
  border: 1px solid rgba(90, 93, 114, 0.22);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.contact-route--ready {
  border-color: rgba(0, 210, 211, 0.22);
}

.contact-route--web {
  border-color: rgba(254, 202, 87, 0.2);
}

.contact-route--field {
  border-color: rgba(163, 230, 53, 0.18);
}

.contact-route div {
  display: grid;
  gap: 5px;
}

.contact-route strong {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.contact-route span,
.contact-route a {
  color: var(--white);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.contact-route a {
  color: var(--teal);
}

.drawer-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drawer-link-row a {
  color: var(--teal);
  text-decoration: none;
  font-size: 12px;
  border-bottom: 1px solid transparent;
}

.drawer-link-row a:hover {
  border-color: currentColor;
}

.drawer-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-field--full {
  margin-top: 12px;
}

.drawer-field span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.drawer-field input,
.drawer-field textarea,
.drawer-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--white);
  padding: 10px 12px;
  font: inherit;
}
.drawer-field select {
  appearance: none;
  cursor: pointer;
}

.drawer-field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
}

.drawer-form--stacked .drawer-field--full,
.drawer-form--stacked .drawer-field {
  margin-top: 0;
}

.drawer-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-save {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), #27c3d1);
  color: #041014;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 700;
}

.drawer-save--secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  border: 1px solid var(--border);
}

.drawer-save-status {
  font-size: 12px;
  color: var(--muted);
}

.drawer-empty-state {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  padding: 8px 0 14px;
}

.drawer-task-summary {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.task-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.task-item-main {
  min-width: 0;
}

.task-item-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.task-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.task-item-notes {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
}

.task-item-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-action {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--teal);
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
}

.task-action--danger {
  color: var(--red);
}

/* ---- SKELETON LOADING ---- */
.skeleton-row td {
  padding: 16px;
}

.skeleton-cell {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface2) 40%,
    var(--surface) 80%
  );
  background-size: 400px 100%;
  animation: shimmer 1.8s infinite linear;
}

.skeleton-cell--short { width: 60px; }
.skeleton-cell--med { width: 120px; }
.skeleton-cell--long { width: 180px; }
.skeleton-cell--num { width: 80px; margin-left: auto; }

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.pagination-info {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

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

.pagination-page {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.pagination-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--white);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ---- LOGIN PAGE ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.login-page::after {
  content: '';
  position: fixed;
  left: 50%;
  top: 48%;
  width: min(780px, 92vw);
  height: min(560px, 72vh);
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 34% 42%, rgba(108, 92, 231, 0.22), transparent 34%),
    radial-gradient(circle at 66% 58%, rgba(0, 210, 211, 0.14), transparent 36%);
  filter: blur(42px);
  opacity: 0.85;
  pointer-events: none;
}

/* Grid background for login */
.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 92, 231, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 92, 231, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 17, 23, 0.88);
  border: 1px solid rgba(108, 92, 231, 0.16);
  border-radius: 16px;
  padding: 48px 40px;
  position: relative;
  z-index: 1;
  opacity: 0;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 28px 90px rgba(0, 0, 0, 0.48),
    0 0 80px rgba(108, 92, 231, 0.12);
  animation: fadeInUp 0.5s 0.1s ease forwards;
}

.login-card::before {
  content: '';
  position: absolute;
  inset: -45%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 70deg,
    rgba(108, 92, 231, 0.92) 94deg,
    rgba(0, 210, 211, 0.9) 116deg,
    transparent 145deg,
    transparent 360deg
  );
  animation: borderOrbit 5.5s linear infinite;
  pointer-events: none;
}

.login-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(15, 17, 23, 0.98), rgba(13, 15, 21, 0.98));
  pointer-events: none;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-logo {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0;
  text-align: center;
  margin-bottom: 36px;
}

.brand-word {
  color: var(--white);
  text-transform: lowercase;
}

.brand-word span {
  color: transparent;
  background: linear-gradient(90deg, var(--accent-glow), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
}

.login-heading {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-sub {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.5;
}

.login-error {
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.15);
  color: var(--red);
  font-family: var(--mono);
  font-size: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.2px;
}

.login-error a {
  color: var(--red);
  text-decoration: underline;
}

.login-form-group {
  margin-bottom: 20px;
}

.login-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.login-input {
  width: 100%;
  background: var(--surface2);
  color: var(--white);
  font-family: var(--mono);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: 0.3px;
}

.login-input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.login-input:focus {
  border-color: var(--accent);
}

.login-btn {
  width: 100%;
  background: var(--accent);
  color: var(--white);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.login-btn:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

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

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-success {
  text-align: center;
  padding: 12px 0;
}

.login-success .check-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 210, 211, 0.08);
  border: 1px solid rgba(0, 210, 211, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 20px;
}

.login-success h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.login-success p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.login-success .expiry-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  opacity: 0.6;
}

.login-footer {
  text-align: center;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
}

.login-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: var(--accent-glow);
}

/* ---- TIER BADGES ---- */
.col-tier {
  min-width: 50px;
  max-width: 60px;
  text-align: center;
}

.tier-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1;
  color: var(--muted);
}

.tier-badge--a {
  background: rgba(0, 210, 140, 0.12);
  color: #00d28c;
  border: 1px solid rgba(0, 210, 140, 0.2);
}

.tier-badge--b {
  background: rgba(254, 202, 87, 0.1);
  color: var(--amber);
  border: 1px solid rgba(254, 202, 87, 0.15);
}

.tier-badge--c {
  background: rgba(90, 93, 114, 0.15);
  color: var(--muted);
  border: 1px solid rgba(90, 93, 114, 0.2);
}

.tier-badge--reject {
  background: rgba(255, 107, 107, 0.08);
  color: rgba(255, 107, 107, 0.5);
  border: 1px solid rgba(255, 107, 107, 0.1);
  font-size: 9px;
}

/* Rejected rows (operator view) */
.row-rejected {
  opacity: 0.45;
}

.row-rejected:hover {
  opacity: 0.7;
}

/* ---- QA TOGGLE BUTTON ---- */
.btn-qa-toggle {
  background: none;
  border: 1px solid rgba(255, 107, 107, 0.2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-qa-toggle:hover {
  background: rgba(255, 107, 107, 0.06);
  border-color: rgba(255, 107, 107, 0.3);
  color: var(--red);
}

.btn-qa-toggle--active {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.3);
  color: var(--red);
}

/* Hidden utility */
.hidden { display: none !important; }

/* ---- SLOTS PAGE ---- */
.slots-page {
  padding-top: 60px;
}

.slots-hero {
  text-align: center;
  padding: 72px 24px 48px;
  position: relative;
}

/* Radial glow behind heading */
.slots-hero::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(108, 92, 231, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.slots-hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeInUp 0.5s 0.1s ease forwards;
}

.slots-hero .slots-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeInUp 0.5s 0.2s ease forwards;
}

.slots-table-wrap {
  max-width: 900px;
  margin: 0 auto 64px;
  padding: 0 24px;
  opacity: 0;
  animation: fadeIn 0.5s 0.3s ease forwards;
}

.slots-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.slots-table thead {
  background: var(--surface);
}

.slots-table th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.slots-table td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--white);
  border-bottom: 1px solid rgba(108, 92, 231, 0.04);
}

.slots-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.008);
}

.slots-table tbody tr {
  transition: background 0.15s;
}

.slots-table tbody tr:hover {
  background: rgba(108, 92, 231, 0.04);
}

.slots-table .slot-city {
  font-weight: 600;
}

.slots-table .slot-category {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* Status badges */
.status-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1;
}

.status-badge--open {
  background: rgba(0, 210, 211, 0.12);
  color: var(--teal);
  border: 1px solid rgba(0, 210, 211, 0.2);
}

.status-badge--taken {
  background: rgba(255, 107, 107, 0.08);
  color: rgba(255, 107, 107, 0.6);
  border: 1px solid rgba(255, 107, 107, 0.1);
}

.status-badge--waitlist {
  background: rgba(254, 202, 87, 0.1);
  color: var(--amber);
  border: 1px solid rgba(254, 202, 87, 0.15);
}

.slot-action a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.2s;
}

.slot-action--claim a {
  color: var(--teal);
}

.slot-action--claim a:hover {
  color: var(--white);
}

.slot-action--waitlist a {
  color: var(--muted);
}

.slot-action--waitlist a:hover {
  color: var(--amber);
}

/* ---- RESPONSIVE ---- */

/* Tablet */
@media (max-width: 900px) {
  .dash-container {
    padding: 0 20px;
  }

  .dash-nav {
    padding: 0 20px;
  }

  .nav-center {
    display: none;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .filter-input {
    width: 100%;
    flex: 1;
    min-width: 140px;
  }

  .opportunity-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .opportunity-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .opportunity-rail-head,
  .scope-stack,
  .rail-section--route {
    grid-column: 1 / -1;
  }

  .map-and-list {
    grid-template-columns: 1fr;
  }

  .opportunity-list-panel {
    border-width: 1px 0 0;
  }

  .opportunity-map {
    min-height: 440px;
  }

  .slots-hero h1 {
    font-size: 36px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .dash-body {
    padding-top: 56px;
  }

  .dash-nav {
    height: 56px;
    padding: 0 16px;
  }

  .dash-container {
    padding: 0 12px;
  }

  .nav-email {
    display: none;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 16px 0 12px;
  }

  .stat-card {
    padding: 12px 14px;
  }

  .stat-label {
    font-size: 9px;
    margin-bottom: 6px;
  }

  .stat-value {
    font-size: 20px;
  }

  .feed-tabs {
    gap: 2px;
  }

  .feed-tab {
    padding: 7px 10px;
    font-size: 10px;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-select, .filter-input {
    width: 100%;
    flex: 1 1 auto;
    font-size: 10px;
    padding: 8px 10px;
  }

  .btn-export {
    font-size: 9px;
    padding: 7px 12px;
  }

  .opportunity-workspace {
    gap: 12px;
    margin-top: 14px;
  }

  .opportunity-rail {
    display: flex;
    padding: 14px;
  }

  .map-toolbar,
  .opportunity-list-head,
  .table-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .map-kpis {
    justify-content: space-between;
    gap: 8px;
  }

  .map-kpis div {
    text-align: left;
  }

  .opportunity-map {
    min-height: 360px;
  }

  .map-region-label {
    left: 12px;
    right: 12px;
    max-width: calc(100% - 24px);
  }

  .map-controls {
    top: 62px;
    right: 12px;
  }

  .opportunity-list {
    max-height: 460px;
  }

  .drawer-grid,
  .drawer-form-grid {
    grid-template-columns: 1fr;
  }

  .pagination {
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
  }

  .login-card {
    padding: 36px 24px;
  }

  .login-heading {
    font-size: 22px;
  }

  .slots-hero {
    padding: 48px 16px 32px;
  }

  .slots-table th,
  .slots-table td {
    padding: 12px 14px;
    font-size: 13px;
  }
}

/* ============================================================
 * Phase 3 — Review Session modal (approval queue)
 * ============================================================ */
.operator-view-chip--review {
  border-color: rgba(255, 196, 0, 0.35);
  color: #ffc400;
}
.operator-view-chip--review.operator-view-chip--active {
  color: #1a1500;
  background: linear-gradient(135deg, rgba(255, 211, 66, 0.95), rgba(255, 169, 0, 0.9));
  border-color: rgba(255, 211, 66, 0.6);
}
.operator-view-chip--action {
  border-color: rgba(0, 210, 211, 0.5);
  color: #00d2d3;
  font-weight: 600;
}
.operator-view-chip--action:hover {
  background: rgba(0, 210, 211, 0.08);
}

.review-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 10, 0.82);
  backdrop-filter: blur(6px);
  z-index: 900;
  display: none;
}
.review-modal-backdrop--open { display: block; }

.review-modal {
  position: fixed;
  inset: 40px;
  max-width: 880px;
  margin: 0 auto;
  background: #0b1218;
  border: 1px solid var(--border);
  border-radius: 16px;
  z-index: 901;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.review-modal--open { display: flex; }

.review-modal-head {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(0, 210, 211, 0.05);
}
.review-modal-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}
.review-modal-progress {
  color: #00d2d3;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}
.review-modal-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
}
.review-modal-close:hover { color: #fff; }

.review-modal-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}
.review-card-company {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 6px;
  word-break: break-word;
}
.review-card-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
}
.review-card-tier {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  margin-right: 8px;
}
.review-card-tier--A { background: rgba(0, 210, 211, 0.18); color: #00d2d3; }
.review-card-tier--B { background: rgba(255, 211, 66, 0.18); color: #ffd342; }
.review-card-tier--C { background: rgba(160, 160, 160, 0.2); color: #bdbdbd; }

.review-card-section {
  margin: 18px 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.review-card-section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.review-card-section-value {
  color: #e6e6e6;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.review-card-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  font-size: 13px;
  color: #e6e6e6;
}
.review-card-contact-row a { color: #00d2d3; }
.review-card-contact-missing { color: #888; font-style: italic; }

.review-modal-actions {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
}
.review-action {
  border: 1px solid var(--border);
  background: transparent;
  color: #e6e6e6;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.review-action:disabled { opacity: 0.4; cursor: not-allowed; }
.review-action-kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  color: #bdbdbd;
}
.review-action--approve { border-color: rgba(0, 210, 211, 0.6); color: #00d2d3; }
.review-action--approve:hover:not(:disabled) { background: rgba(0, 210, 211, 0.1); }
.review-action--reject { border-color: rgba(255, 107, 107, 0.55); color: #ff8a8a; }
.review-action--reject:hover:not(:disabled) { background: rgba(255, 107, 107, 0.08); }
.review-action--suppress { border-color: rgba(255, 107, 107, 0.3); color: #c27373; }
.review-action--suppress:hover:not(:disabled) { background: rgba(255, 107, 107, 0.06); }
.review-action--enrich { border-color: rgba(255, 211, 66, 0.5); color: #ffd342; }
.review-action--enrich:hover:not(:disabled) { background: rgba(255, 211, 66, 0.08); }
.review-action--skip { color: var(--muted); }

.review-modal-status {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.4px;
  min-width: 120px;
  text-align: right;
}
.review-modal-status--error { color: #ff8a8a; }
.review-modal-status--ok    { color: #00d2d3; }

.review-modal-empty {
  padding: 60px 28px;
  text-align: center;
  color: var(--muted);
}
.review-modal-empty-big {
  font-size: 40px;
  color: #00d2d3;
  margin-bottom: 12px;
}

/* ------------------------------------------------------------------
   Customer map workspace reset
   The dashboard first screen should be a territory map, not an operator
   admin console. These overrides keep existing data bindings intact while
   removing the stacked stats/filter/table clutter from the default view.
------------------------------------------------------------------- */

.dash-body {
  background:
    radial-gradient(circle at 18% 10%, rgba(108, 92, 231, 0.16), transparent 26%),
    radial-gradient(circle at 78% 18%, rgba(0, 210, 211, 0.10), transparent 30%),
    #07080d;
}

.dash-nav {
  height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(90, 93, 114, 0.18);
  background: rgba(7, 8, 13, 0.86);
}

.dash-nav .logo {
  font-size: 24px;
  letter-spacing: -0.045em;
}

.nav-center {
  opacity: 0.72;
}

.dash-container {
  width: min(100% - 48px, 1760px);
  margin: 0 auto;
  padding: 96px 0 72px;
}

.stats-bar,
.operator-toolbar,
.table-section-head,
.table-wrap--secondary {
  display: none !important;
}

.controls-bar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin: 0 0 24px;
  padding: 12px;
  border: 1px solid rgba(90, 93, 114, 0.22);
  border-radius: 18px;
  background: rgba(14, 17, 26, 0.72);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
}

.feed-tabs {
  display: flex;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
  padding: 0;
  border: 0;
}

.feed-tab {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  white-space: nowrap;
  color: rgba(240, 241, 245, 0.56);
  background: transparent;
}

.feed-tab--active {
  color: #07080d;
  background: linear-gradient(92deg, #8f7cff, #38d4e7);
  box-shadow: 0 12px 32px rgba(108, 92, 231, 0.25);
}

.filter-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.filter-select,
.filter-input {
  min-height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.filter-input {
  width: 220px;
}

#btn-source-archive,
#btn-qa-toggle {
  display: none !important;
}

.btn-export {
  min-height: 38px;
  border-radius: 12px;
  background: transparent;
}

.opportunity-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-top: 0;
}

.opportunity-rail,
.opportunity-map-shell,
.opportunity-list-panel {
  border: 1px solid rgba(90, 93, 114, 0.22);
  border-radius: 18px;
  background: rgba(14, 17, 26, 0.70);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
}

.opportunity-rail {
  min-height: calc(100vh - 220px);
  padding: 24px;
}

.opportunity-rail-head {
  align-items: flex-start;
}

.opportunity-rail-head h2 {
  font-size: 24px;
}

.scope-stack {
  gap: 10px;
  margin: 24px 0;
}

.scope-card {
  min-height: 68px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.026);
}

.rail-section {
  padding-top: 22px;
}

.rail-section--route {
  display: none;
}

.opportunity-map-shell {
  min-height: calc(100vh - 220px);
  overflow: hidden;
}

.map-toolbar {
  height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(90, 93, 114, 0.18);
}

.map-kpis {
  gap: 26px;
}

.map-and-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 0;
  min-height: calc(100vh - 292px);
}

.opportunity-map {
  min-height: calc(100vh - 292px);
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(33deg, transparent 0 45%, rgba(0, 210, 211, 0.10) 45% 47%, transparent 47% 100%),
    linear-gradient(145deg, transparent 0 33%, rgba(108, 92, 231, 0.13) 33% 35%, transparent 35% 100%),
    linear-gradient(90deg, rgba(90, 93, 114, 0.14) 1px, transparent 1px),
    linear-gradient(rgba(90, 93, 114, 0.14) 1px, transparent 1px),
    #090d16;
  background-size: auto, auto, 64px 64px, 64px 64px, auto;
}

.opportunity-map::after {
  opacity: 0.32;
}

.map-region-label {
  left: 28px;
  top: 28px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(7, 8, 13, 0.72);
}

.map-controls {
  right: 24px;
  top: 24px;
}

.map-controls span {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(7, 8, 13, 0.72);
}

.map-pin {
  transform: scale(1.08);
}

.opportunity-list-panel {
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: rgba(7, 8, 13, 0.44);
  box-shadow: none;
}

.opportunity-list-head {
  min-height: 86px;
  padding: 24px;
  border-bottom: 1px solid rgba(90, 93, 114, 0.18);
}

.opportunity-list {
  max-height: calc(100vh - 378px);
  padding: 20px;
}

.opportunity-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.opportunity-card + .opportunity-card {
  margin-top: 14px;
}

.lead-drawer {
  width: min(520px, 100vw);
}

@media (max-width: 1180px) {
  .dash-container {
    width: min(100% - 28px, 1760px);
  }

  .controls-bar,
  .opportunity-workspace,
  .map-and-list {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .opportunity-rail {
    min-height: auto;
  }

  .scope-stack {
    grid-template-columns: repeat(3, 1fr);
  }

  .rail-section {
    display: none;
  }

  .opportunity-map,
  .opportunity-map-shell {
    min-height: 640px;
  }

  .opportunity-list-panel {
    border-left: 0;
    border-top: 1px solid rgba(90, 93, 114, 0.18);
  }
}

@media (max-width: 720px) {
  .dash-nav {
    padding: 0 18px;
  }

  .nav-center {
    display: none;
  }

  .nav-email {
    display: none;
  }

  .dash-container {
    padding-top: 84px;
  }

  .controls-bar {
    padding: 10px;
  }

  .filter-select,
  .filter-input,
  .btn-export {
    min-width: 160px;
  }

  .scope-stack {
    grid-template-columns: 1fr;
  }

  .opportunity-map {
    min-height: 520px;
  }
}

/* ------------------------------------------------------------------
   Real map and viewport fit pass
------------------------------------------------------------------- */

.dash-body {
  background:
    radial-gradient(circle at 22% 12%, rgba(125, 111, 255, 0.18), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(85, 221, 232, 0.14), transparent 30%),
    linear-gradient(180deg, #101423 0%, #0b1020 46%, #080b13 100%);
}

.dash-container {
  width: min(100% - 40px, 1760px);
  padding: 82px 0 22px;
}

.controls-bar {
  margin-bottom: 16px;
  background: rgba(20, 25, 39, 0.82);
}

.opportunity-workspace {
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 16px;
}

.opportunity-rail,
.opportunity-map-shell {
  min-height: calc(100dvh - 182px);
  background: rgba(20, 25, 39, 0.78);
}

.opportunity-rail {
  padding: 20px;
}

.scope-stack {
  margin: 18px 0;
}

.rail-section {
  padding-top: 16px;
}

.map-toolbar {
  height: 60px;
  padding: 0 20px;
  background: rgba(13, 17, 29, 0.66);
}

.map-and-list {
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: calc(100dvh - 242px);
}

.opportunity-map {
  min-height: calc(100dvh - 242px);
  background: #d9e2ec;
}

.real-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #d9e2ec;
}

.opportunity-map--leaflet {
  background: #d9e2ec;
}

.opportunity-map--leaflet::after {
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.02), rgba(8, 12, 20, 0.10)),
    linear-gradient(90deg, rgba(8, 12, 20, 0.06), transparent 24%, transparent 76%, rgba(8, 12, 20, 0.06));
}

.opportunity-map--leaflet .map-pins,
.opportunity-map--leaflet .map-controls {
  display: none;
}

.opportunity-map .leaflet-container {
  background: #d9e2ec;
  color: #111827;
  font-family: var(--body);
}

.opportunity-map .leaflet-tile-pane {
  filter: grayscale(0.12) saturate(0.88) contrast(0.96) brightness(0.94);
}

.opportunity-map .leaflet-control-zoom {
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.opportunity-map .leaflet-control-zoom a {
  width: 38px;
  height: 38px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  line-height: 38px;
}

.opportunity-map .leaflet-tooltip {
  border: 1px solid rgba(18, 24, 38, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.opportunity-map .leaflet-tooltip span {
  color: #475569;
  font-size: 11px;
}

.map-empty[hidden] {
  display: none !important;
}

.map-empty {
  z-index: 5;
  color: rgba(15, 23, 42, 0.62);
}

.map-empty strong {
  color: #111827;
}

.map-region-label {
  z-index: 6;
  background: rgba(255, 255, 255, 0.92);
  color: #121827;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.opportunity-list {
  max-height: calc(100dvh - 326px);
}

.opportunity-card {
  background: rgba(255, 255, 255, 0.055);
}

@media (max-width: 1180px) {
  .dash-container {
    padding-top: 78px;
  }

  .opportunity-rail,
  .opportunity-map-shell,
  .opportunity-map,
  .map-and-list {
    min-height: auto;
  }

  .opportunity-map {
    min-height: 620px;
  }
}

/* ------------------------------------------------------------------
   STAT/Aman customer workspace pass
------------------------------------------------------------------- */

.dash-container {
  width: min(100% - 32px, 1840px);
  padding: 24px 0 16px;
}

.controls-bar {
  min-height: 58px;
  margin-bottom: 12px;
  border-color: rgba(122, 131, 160, 0.26);
  background: rgba(22, 28, 45, 0.92);
}

.feed-tabs {
  gap: 8px;
}

.feed-tab {
  min-height: 40px;
  padding: 0 18px;
}

#filter-region {
  display: none;
}

.filter-bar {
  gap: 8px;
}

.filter-select,
.filter-input,
.btn-export {
  min-height: 40px;
  background: rgba(247, 250, 252, 0.07);
  border-color: rgba(122, 131, 160, 0.24);
  color: rgba(248, 250, 252, 0.92);
}

.filter-input::placeholder {
  color: rgba(203, 213, 225, 0.42);
}

.opportunity-workspace {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
}

.opportunity-rail,
.opportunity-map-shell {
  height: calc(100dvh - 166px);
  min-height: 620px;
  border-color: rgba(122, 131, 160, 0.22);
  background: rgba(19, 25, 42, 0.92);
}

.opportunity-rail {
  padding: 18px;
  overflow: hidden;
}

.workspace-kicker,
.rail-section-label,
.map-kpis small,
.lead-drawer-kicker,
.drawer-section-label {
  letter-spacing: 0.14em;
}

.client-brief {
  margin-top: -2px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 13px;
  line-height: 1.5;
}

.scope-stack {
  display: none;
}

.rail-section {
  padding-top: 18px;
}

.map-toolbar {
  height: 54px;
  min-height: 54px;
  padding: 0 18px;
  background: rgba(12, 17, 30, 0.84);
}

.view-toggle {
  display: none;
}

.map-and-list {
  height: calc(100dvh - 220px);
  min-height: 566px;
  grid-template-columns: minmax(0, 1fr) 350px;
}

.opportunity-map {
  min-height: 0;
  height: 100%;
}

.opportunity-map .leaflet-control-zoom {
  margin-left: 18px;
  margin-top: 18px;
}

.map-region-label {
  top: 18px;
  left: 72px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.94);
}

.opportunity-list-panel {
  background: #111827;
}

.opportunity-list-head {
  min-height: 78px;
  padding: 18px 20px;
}

.opportunity-list {
  max-height: calc(100dvh - 300px);
  padding: 16px;
}

.opportunity-card {
  border-color: rgba(148, 163, 184, 0.20);
  background: rgba(248, 250, 252, 0.07);
}

.opportunity-card p,
.opportunity-card-meta {
  color: rgba(203, 213, 225, 0.72);
}

.drawer-backdrop {
  background: rgba(5, 9, 18, 0.52);
  backdrop-filter: blur(4px);
}

.lead-drawer {
  width: min(620px, 94vw);
  background:
    linear-gradient(180deg, rgba(20, 27, 45, 0.98), rgba(10, 15, 28, 0.98)),
    #0f172a;
  color: #f8fafc;
  border-left: 1px solid rgba(94, 234, 212, 0.22);
  box-shadow: -30px 0 80px rgba(2, 6, 23, 0.62);
}

.lead-drawer-head {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.lead-drawer-title,
.drawer-card-value,
.drawer-insight-card p,
.contact-route span,
.drawer-address {
  color: #f8fafc;
}

.lead-drawer-subtitle,
.drawer-section-label,
.drawer-card-label,
.contact-route strong,
.lead-drawer-empty,
.lead-drawer-loading {
  color: #94a3b8;
}

.lead-drawer-close {
  border-color: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.drawer-card,
.drawer-address,
.contact-route {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(30, 41, 59, 0.72);
}

.drawer-insight-card {
  border-color: rgba(94, 234, 212, 0.34);
  background: rgba(19, 78, 74, 0.34);
}

.drawer-insight-label,
.lead-drawer-kicker,
.contact-route a {
  color: #5eead4;
}

.contact-route--ready {
  border-color: rgba(94, 234, 212, 0.34);
}

.contact-route--web,
.contact-route--field {
  border-color: rgba(148, 163, 184, 0.20);
}

@media (max-width: 1180px) {
  .dash-container {
    padding-top: 18px;
  }

  .opportunity-rail,
  .opportunity-map-shell,
  .map-and-list {
    height: auto;
    min-height: auto;
  }

  .opportunity-map {
    height: 620px;
  }
}

@media (min-width: 1181px) {
  .dash-body {
    height: 100dvh;
    overflow: hidden;
  }

  .dash-container {
    height: calc(100dvh - 60px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    padding: 20px 0 12px;
  }

  .stats-bar,
  .operator-toolbar,
  .table-section-head,
  .table-wrap--secondary {
    display: none !important;
  }

  .controls-bar {
    margin: 0;
  }

  .opportunity-workspace {
    height: auto;
    min-height: 0;
    margin: 0;
  }

  .opportunity-rail,
  .opportunity-map-shell,
  .map-and-list {
    height: auto;
    min-height: 0;
  }

  .opportunity-rail {
    overflow-y: auto;
  }

  .opportunity-list {
    max-height: none;
    min-height: 0;
    overflow-y: auto;
  }

  .lead-drawer-body {
    max-height: calc(100dvh - 112px);
    overflow-y: auto;
  }
}

/* ------------------------------------------------------------------
   STAT client workspace correction
------------------------------------------------------------------- */

.feed-tabs {
  flex: 0 0 auto;
}

.feed-tab {
  cursor: default;
}

#filter-sort {
  min-width: 172px;
}

.rail-section--route {
  display: none;
}

.opportunity-list-panel {
  order: -1;
  border-width: 0 1px 0 0;
  background: rgba(17, 24, 39, 0.96);
}

.opportunity-list-head {
  align-items: center;
}

.opportunity-list {
  gap: 8px;
}

.opportunity-card {
  padding: 14px 16px;
}

.opportunity-card p {
  min-height: 0;
  color: rgba(226, 232, 240, 0.78);
}

.opportunity-card-meta {
  gap: 10px 14px;
  color: rgba(203, 213, 225, 0.80);
}

.opportunity-card-meta span {
  max-width: 100%;
}

.lead-drawer {
  width: min(460px, 94vw);
}

.drawer-section--compact + .drawer-section--compact {
  margin-top: 18px;
}

.drawer-stat-hero {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.13), rgba(139, 124, 248, 0.09)),
    rgba(15, 23, 42, 0.86);
}

.drawer-stat-hero p {
  margin: 8px 0 0;
  color: #f8fafc;
  font-size: 14px;
  line-height: 1.55;
}

.drawer-primary-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(94, 234, 212, 0.34);
  border-radius: 10px;
  background: #5eead4;
  color: #06121a;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(94, 234, 212, 0.18);
}

.drawer-primary-action--disabled {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  box-shadow: none;
}

.drawer-stat-list,
.drawer-contact-stack,
.drawer-disclosure-body {
  display: grid;
  gap: 8px;
}

.drawer-stat-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.drawer-stat-row:last-child {
  border-bottom: 0;
}

.drawer-stat-row span {
  color: #94a3b8;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-stat-row strong {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.45;
}

.drawer-stat-row a {
  color: #5eead4;
  text-decoration: none;
}

.drawer-stat-facts {
  margin-top: 18px;
}

.drawer-stat-facts .drawer-stat-list {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.drawer-disclosure {
  margin-top: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.52);
}

.drawer-disclosure summary {
  cursor: pointer;
  padding: 13px 14px;
  color: #cbd5e1;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer-disclosure-body {
  padding: 0 14px 14px;
}

.drawer-disclosure-body p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
}

@media (min-width: 1181px) {
  .opportunity-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px;
  }

  .map-and-list {
    grid-template-columns: minmax(560px, 1.1fr) minmax(440px, 0.9fr);
  }

  .opportunity-map {
    min-height: 0;
    height: 100%;
  }

  .opportunity-list-head {
    min-height: 70px;
  }

  .opportunity-list {
    padding: 14px;
  }
}

/* ------------------------------------------------------------------
   STAT client iteration: preserve modes, remove filler, connect map
------------------------------------------------------------------- */

.dash-nav .logo {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.dash-nav .logo .brand-word span {
  color: transparent;
  background: linear-gradient(92deg, #8f7cff, #38d4e7);
  -webkit-background-clip: text;
  background-clip: text;
}

.dash-nav .logo .brand-word {
  color: #f8fafc;
}

.nav-center {
  color: rgba(203, 213, 225, 0.56);
}

.profile-menu {
  position: relative;
}

.profile-menu summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  cursor: pointer;
  list-style: none;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #8f7cff, #38d4e7);
  color: #06121a;
  font-size: 10px;
  font-weight: 900;
}

.profile-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 230px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.46);
}

.profile-popover-head {
  padding: 8px 8px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 8px;
}

.profile-popover-head strong,
.profile-popover-head span {
  display: block;
}

.profile-popover-head strong {
  color: #f8fafc;
  font-size: 13px;
}

.profile-popover-head span {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
}

.profile-popover button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  padding: 0 8px;
  cursor: pointer;
}

.profile-popover button:hover {
  background: rgba(148, 163, 184, 0.10);
  color: #f8fafc;
}

.feed-tab:disabled {
  opacity: 1;
  cursor: default;
}

.feed-tab:disabled:hover {
  transform: none;
}

.client-context {
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 0 18px;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.58);
  color: #f8fafc;
  pointer-events: none;
}

.client-context span {
  color: #94a3b8;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.client-context strong {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
}

.map-kpis {
  display: none;
}

.view-toggle {
  display: inline-flex;
}

.opportunity-rail {
  display: none !important;
}

.opportunity-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.opportunity-list-head .workspace-kicker {
  color: rgba(148, 163, 184, 0.76);
}

.opportunity-card.is-selected,
.opportunity-table tr.is-selected {
  border-color: rgba(94, 234, 212, 0.62);
  background: rgba(94, 234, 212, 0.10);
}

.opportunity-card p {
  font-size: 13px;
  line-height: 1.45;
}

.opportunity-table-wrap {
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.opportunity-table {
  width: 100%;
  border-collapse: collapse;
  color: #e2e8f0;
  font-size: 12px;
}

.opportunity-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 10px;
  background: rgba(15, 23, 42, 0.98);
  color: #94a3b8;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.opportunity-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  vertical-align: top;
}

.opportunity-table tr {
  border: 1px solid transparent;
  cursor: pointer;
}

.opportunity-table tr:hover {
  background: rgba(148, 163, 184, 0.06);
}

.opportunity-table td strong,
.opportunity-table td span {
  display: block;
}

.opportunity-table td strong {
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.3;
}

.opportunity-table td span {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.35;
}

.drawer-stat-hero + .drawer-section {
  margin-top: 22px;
}

.drawer-stat-hero p {
  font-size: 15px;
}

@media (min-width: 1181px) {
  .opportunity-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .map-and-list {
    grid-template-columns: minmax(460px, 0.72fr) minmax(720px, 1.28fr);
  }

  .map-toolbar {
    justify-content: flex-start;
  }
}

.rail-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rail-close {
  display: none;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.74);
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.rail-close:hover,
.rail-close:focus-visible {
  border-color: rgba(94, 234, 212, 0.36);
  color: #f8fafc;
}

.legend-toggle-button {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.60);
  color: rgba(203, 213, 225, 0.86);
  padding: 0 13px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.legend-toggle-button:hover,
.legend-toggle-button:focus-visible,
.legend-toggle-button--active {
  border-color: rgba(94, 234, 212, 0.42);
  background: rgba(94, 234, 212, 0.10);
  color: #5eead4;
}

.opportunity-workspace {
  position: relative;
}

.opportunity-workspace--rail-open .opportunity-rail {
  display: flex !important;
  position: absolute;
  z-index: 30;
  left: 16px;
  top: 72px;
  bottom: 16px;
  width: min(316px, calc(100% - 32px));
  min-height: 0;
  height: auto;
  overflow-y: auto;
  border-color: rgba(94, 234, 212, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(20, 27, 45, 0.98), rgba(10, 15, 28, 0.98)),
    #0f172a;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

.opportunity-workspace--rail-open .rail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.map-layer-toggles {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.map-layer-toggle {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.54);
  color: rgba(203, 213, 225, 0.58);
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
}

.map-layer-toggle span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  line-height: 1.25;
}

.map-layer-toggle strong {
  color: rgba(203, 213, 225, 0.54);
  font-family: var(--mono);
  font-size: 11px;
}

.map-layer-toggle--active {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.08);
  color: #e2e8f0;
}

.map-layer-toggle--active strong {
  color: #f8fafc;
}

.map-layer-toggle:not(.map-layer-toggle--active) .stage-dot {
  opacity: 0.28;
}

.map-layer-reset {
  width: 100%;
  min-height: 40px;
  margin-top: 18px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 10px;
  background: rgba(94, 234, 212, 0.08);
  color: #5eead4;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.opportunity-workspace--list-mode .legend-toggle-button {
  display: none;
}

.opportunity-workspace--list-mode .map-and-list {
  grid-template-columns: minmax(0, 1fr);
}

.opportunity-workspace--list-mode .opportunity-map {
  display: none;
}

.opportunity-workspace--list-mode .opportunity-list-panel {
  order: 0;
  border-width: 0;
  background: rgba(24, 33, 52, 0.92);
}

.opportunity-workspace--list-mode .opportunity-list {
  max-height: calc(100dvh - 300px);
  padding: 0;
  display: block;
}

.opportunity-workspace--list-mode .opportunity-table-wrap {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.opportunity-workspace--list-mode .opportunity-table th,
.opportunity-workspace--list-mode .opportunity-table td {
  padding-left: 16px;
  padding-right: 16px;
}

@media (max-width: 1180px) {
  .opportunity-workspace--rail-open .opportunity-rail {
    left: 12px;
    right: 12px;
    top: 66px;
    bottom: auto;
    width: auto;
    max-height: min(560px, calc(100dvh - 150px));
  }
}

/* ------------------------------------------------------------------
   STAT command-bar cleanup: one toolbar, persistent layers, lighter UI
------------------------------------------------------------------- */

.dash-body {
  background:
    radial-gradient(circle at 16% 8%, rgba(139, 124, 248, 0.16), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(56, 212, 231, 0.12), transparent 34%),
    linear-gradient(180deg, #111827 0%, #121c2f 44%, #101827 100%);
  color: #f8fafc;
}

.dash-body::before {
  opacity: 0.38;
}

.dash-nav {
  background: rgba(17, 24, 39, 0.92);
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.dash-container {
  width: min(100% - 48px, 1880px);
  max-width: none;
  padding: 24px 0 14px;
}

.controls-bar {
  min-height: 66px;
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(31, 41, 62, 0.86);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.24);
}

.feed-tabs[hidden] {
  display: none !important;
}

.controls-bar .view-toggle {
  display: inline-flex;
  height: 44px;
  padding: 4px;
  border-color: rgba(148, 163, 184, 0.20);
  background: rgba(15, 23, 42, 0.50);
}

.controls-bar .view-toggle-button {
  min-width: 82px;
  height: 34px;
  padding: 0 16px;
  color: #aab6ca;
}

.controls-bar .view-toggle-button--active {
  background: linear-gradient(135deg, rgba(139, 124, 248, 0.90), rgba(56, 212, 231, 0.86));
  color: #06121a;
  box-shadow: 0 10px 28px rgba(56, 212, 231, 0.20);
}

.controls-bar .filter-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  overflow: visible;
}

.controls-bar .filter-select,
.controls-bar .filter-input,
.controls-bar .btn-export,
.controls-bar .legend-toggle-button {
  min-height: 42px;
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.08);
  color: #eef5ff;
}

.controls-bar .filter-select {
  min-width: 150px;
}

.controls-bar #filter-sort {
  min-width: 188px;
}

.controls-bar .filter-input {
  width: min(280px, 24vw);
}

.controls-bar .filter-input::placeholder {
  color: rgba(203, 213, 225, 0.58);
}

.controls-bar .legend-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
}

.controls-bar .btn-export {
  padding: 0 18px;
}

.controls-bar .legend-toggle-button:hover,
.controls-bar .legend-toggle-button:focus-visible,
.controls-bar .legend-toggle-button--active,
.controls-bar .filter-select:focus,
.controls-bar .filter-input:focus {
  border-color: rgba(94, 234, 212, 0.58);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.10);
}

.opportunity-map-shell {
  min-height: calc(100dvh - 164px);
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(24, 33, 52, 0.86);
}

.map-toolbar {
  display: none !important;
}

.map-and-list {
  height: calc(100dvh - 164px);
  min-height: 610px;
}

.opportunity-map {
  min-height: 0;
  height: 100%;
}

.opportunity-list-panel {
  background: rgba(23, 31, 49, 0.86);
}

.opportunity-list-head {
  min-height: 76px;
  padding: 18px 22px;
  background: rgba(30, 41, 59, 0.48);
}

.opportunity-list {
  max-height: calc(100dvh - 240px);
  padding: 18px;
}

.opportunity-card {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(42, 54, 78, 0.70);
  box-shadow: none;
}

.opportunity-card:hover,
.opportunity-card:focus-visible,
.opportunity-card.is-selected {
  border-color: rgba(94, 234, 212, 0.52);
  background: rgba(51, 65, 92, 0.78);
}

.stage-pill,
.fit-pill {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-shadow: none;
}

.stage-pill {
  color: #07131f !important;
}

.stage-pill--major-build,
.stage-pill--active-build {
  background: #62e2e7;
}

.stage-pill--hvac-scope,
.stage-pill--insurance-signal,
.stage-pill--opportunity {
  background: #9b8cff;
}

.stage-pill--restaurant-buildout,
.stage-pill--tenant-buildout {
  background: #ffd35d;
}

.fit-pill {
  border-color: rgba(94, 234, 212, 0.34);
  background: rgba(20, 184, 166, 0.16);
  color: #bffdf5;
}

.fit-pill--high-fit {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(20, 184, 166, 0.18);
  color: #ccfff8;
}

.opportunity-table {
  color: #eef5ff;
  font-size: 13px;
}

.opportunity-table th {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(32, 43, 66, 0.98);
  color: #b9c6dc;
}

.opportunity-table td {
  padding-top: 15px;
  padding-bottom: 15px;
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

.opportunity-table tbody tr {
  background: rgba(30, 41, 59, 0.28);
}

.opportunity-table tbody tr:nth-child(even) {
  background: rgba(37, 49, 71, 0.34);
}

.opportunity-table tr:hover {
  background: rgba(94, 234, 212, 0.08);
}

.opportunity-table td strong {
  color: #f8fafc;
}

.opportunity-table td span {
  color: #c5d0e4;
}

.opportunity-workspace--list-mode .legend-toggle-button {
  display: inline-flex;
}

.opportunity-workspace--list-mode .opportunity-list-head {
  display: none;
}

.opportunity-workspace--list-mode .opportunity-list {
  max-height: calc(100dvh - 164px);
}

.opportunity-workspace--list-mode .opportunity-table-wrap {
  border-top: 0;
  background: rgba(24, 33, 52, 0.92);
}

.opportunity-workspace--rail-open .opportunity-rail {
  top: 14px;
  left: 14px;
  bottom: auto;
  max-height: calc(100dvh - 206px);
  width: min(340px, calc(100% - 28px));
  background:
    linear-gradient(180deg, rgba(31, 41, 62, 0.98), rgba(20, 29, 46, 0.98)),
    #1f293e;
}

.map-layer-toggle {
  background: rgba(248, 250, 252, 0.07);
  color: #cbd5e1;
}

.map-layer-toggle--active {
  border-color: rgba(94, 234, 212, 0.42);
  background: rgba(20, 184, 166, 0.13);
}

@media (min-width: 1181px) {
  .map-and-list {
    grid-template-columns: minmax(460px, 0.72fr) minmax(720px, 1.28fr);
  }
}

@media (max-width: 900px) {
  .dash-container {
    width: min(100% - 28px, 1880px);
  }

  .controls-bar {
    grid-template-columns: 1fr;
  }

  .controls-bar .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .controls-bar .filter-input {
    min-width: 220px;
  }
}

/* ------------------------------------------------------------------
   Papyrus mode experiment: lighter STAT ledger + map workspace
------------------------------------------------------------------- */

body.dash-body.papyrus-mode {
  --paper: #f2e8cf;
  --paper-strong: #fff7e2;
  --paper-soft: #eadfbe;
  --paper-line: rgba(88, 70, 40, 0.18);
  --ink: #2e271d;
  --ink-soft: #5e5546;
  --ink-muted: #887c67;
  --teal-ink: #236b6f;
  --blue-ink: #30598f;
  --violet-ink: #6857bd;
  padding-top: 64px;
  background:
    linear-gradient(rgba(102, 82, 45, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 82, 45, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 17% 4%, rgba(255, 251, 225, 0.78), transparent 31%),
    radial-gradient(circle at 82% 8%, rgba(84, 205, 222, 0.12), transparent 30%),
    linear-gradient(180deg, #f6eed8 0%, #efe3c2 100%);
  background-size: 82px 82px, 82px 82px, auto, auto, auto;
  color: var(--ink);
}

body.dash-body.papyrus-mode::before {
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 5px,
      rgba(82, 67, 43, 0.018) 5px,
      rgba(82, 67, 43, 0.018) 7px
    );
  opacity: 0.42;
  mix-blend-mode: multiply;
}

.papyrus-mode .dash-nav {
  height: 64px;
  padding: 0 42px;
  background: rgba(245, 237, 217, 0.86);
  border-bottom: 1px solid var(--paper-line);
  box-shadow: 0 10px 40px rgba(90, 72, 38, 0.10);
}

.papyrus-mode .dash-nav .logo,
.papyrus-mode .dash-nav .logo .brand-word {
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.38);
}

.papyrus-mode .dash-nav .logo .brand-word span {
  background: linear-gradient(115deg, #786cf2 0%, #38c9e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.papyrus-mode .nav-center {
  color: var(--ink-muted);
  opacity: 1;
}

.papyrus-mode .nav-center::before {
  background: #786cf2;
  animation: none;
  box-shadow: 0 0 0 3px rgba(120, 108, 242, 0.12);
}

.papyrus-mode .profile-menu summary {
  border-color: rgba(78, 62, 34, 0.18);
  background: rgba(255, 249, 229, 0.78);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.papyrus-mode .profile-avatar {
  background: linear-gradient(135deg, #8477f3, #4ed0e6);
  color: #17120c;
}

.papyrus-mode .nav-email {
  color: var(--ink-soft);
}

.papyrus-mode .profile-popover {
  border-color: rgba(78, 62, 34, 0.20);
  background: rgba(255, 249, 231, 0.96);
  color: var(--ink);
  box-shadow: 0 24px 54px rgba(92, 72, 34, 0.18);
}

.papyrus-mode .profile-popover-head {
  border-bottom-color: rgba(78, 62, 34, 0.14);
}

.papyrus-mode .profile-popover-head strong,
.papyrus-mode .profile-popover button {
  color: var(--ink);
}

.papyrus-mode .profile-popover-head span,
.papyrus-mode .profile-popover button {
  color: var(--ink-muted);
}

.papyrus-mode .profile-popover button:hover {
  background: rgba(48, 89, 143, 0.08);
  color: var(--blue-ink);
}

.papyrus-mode .dash-container {
  width: min(100% - 64px, 1860px);
  padding: 38px 0 22px;
}

.papyrus-mode .controls-bar {
  min-height: 72px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid rgba(78, 62, 34, 0.20);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 250, 233, 0.86), rgba(239, 226, 194, 0.82)),
    rgba(247, 237, 210, 0.88);
  box-shadow:
    0 18px 46px rgba(88, 70, 40, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.papyrus-mode .controls-bar .view-toggle {
  height: 46px;
  padding: 0;
  border-color: rgba(78, 62, 34, 0.22);
  border-radius: 0;
  background: transparent;
}

.papyrus-mode .controls-bar .view-toggle-button,
.papyrus-mode .controls-bar .filter-select,
.papyrus-mode .controls-bar .filter-input,
.papyrus-mode .controls-bar .btn-export,
.papyrus-mode .controls-bar .legend-toggle-button {
  min-height: 44px;
  border-color: rgba(78, 62, 34, 0.22);
  border-radius: 2px;
  background: rgba(255, 249, 229, 0.72);
  color: var(--ink);
  box-shadow: none;
}

.papyrus-mode .controls-bar .view-toggle-button {
  min-width: 88px;
  color: var(--ink-muted);
}

.papyrus-mode .controls-bar .view-toggle-button--active {
  background: linear-gradient(135deg, rgba(132, 119, 243, 0.88), rgba(78, 208, 230, 0.82));
  color: #20180d;
  box-shadow: 0 10px 26px rgba(48, 89, 143, 0.16);
}

.papyrus-mode .controls-bar .legend-toggle-button,
.papyrus-mode .controls-bar .btn-export {
  color: var(--teal-ink);
}

.papyrus-mode .controls-bar .filter-input::placeholder {
  color: rgba(94, 85, 70, 0.56);
}

.papyrus-mode .controls-bar .filter-select option {
  background: #fff7e2;
  color: var(--ink);
}

.papyrus-mode #filter-market {
  color: var(--teal-ink) !important;
  border-color: rgba(35, 107, 111, 0.46) !important;
}

.papyrus-mode .controls-bar .legend-toggle-button:hover,
.papyrus-mode .controls-bar .legend-toggle-button:focus-visible,
.papyrus-mode .controls-bar .legend-toggle-button--active,
.papyrus-mode .controls-bar .filter-select:focus,
.papyrus-mode .controls-bar .filter-input:focus {
  border-color: rgba(35, 107, 111, 0.58);
  box-shadow: 0 0 0 3px rgba(64, 187, 198, 0.14);
}

.papyrus-mode .opportunity-workspace,
.papyrus-mode .opportunity-map-shell {
  border-color: rgba(78, 62, 34, 0.22);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.74), rgba(241, 230, 197, 0.78)),
    rgba(244, 235, 210, 0.86);
  box-shadow: 0 28px 80px rgba(80, 61, 30, 0.14);
}

.papyrus-mode .map-and-list {
  min-height: 610px;
}

.papyrus-mode .opportunity-list-panel {
  border-color: rgba(78, 62, 34, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.62), rgba(232, 219, 186, 0.44)),
    rgba(246, 237, 211, 0.72);
}

.papyrus-mode .opportunity-list-head {
  min-height: 84px;
  border-bottom-color: rgba(78, 62, 34, 0.16);
  background: rgba(238, 225, 192, 0.36);
}

.papyrus-mode .opportunity-list-head > span {
  background: rgba(35, 107, 111, 0.11);
  color: var(--teal-ink);
}

.papyrus-mode .workspace-kicker,
.papyrus-mode .opportunity-list-head .workspace-kicker,
.papyrus-mode .rail-section-label,
.papyrus-mode .drawer-section-label,
.papyrus-mode .drawer-insight-label,
.papyrus-mode .lead-drawer-kicker {
  color: var(--ink-muted);
  letter-spacing: 0.18em;
}

.papyrus-mode .opportunity-list-head h3,
.papyrus-mode .opportunity-rail-head h2,
.papyrus-mode .lead-drawer-title {
  color: var(--ink);
}

.papyrus-mode .opportunity-list {
  padding: 20px;
}

.papyrus-mode .opportunity-card {
  border-color: rgba(78, 62, 34, 0.18);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 251, 236, 0.76), rgba(239, 228, 195, 0.66));
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(84, 64, 31, 0.08);
}

.papyrus-mode .opportunity-card:hover,
.papyrus-mode .opportunity-card:focus-visible,
.papyrus-mode .opportunity-card.is-selected {
  border-color: rgba(35, 107, 111, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 252, 238, 0.92), rgba(237, 229, 201, 0.78));
  transform: translateY(-1px);
}

.papyrus-mode .opportunity-card strong {
  color: var(--ink);
}

.papyrus-mode .opportunity-card p,
.papyrus-mode .opportunity-card-meta {
  color: var(--ink-soft);
}

.papyrus-mode .stage-pill,
.papyrus-mode .fit-pill {
  min-height: 25px;
  border: 1px solid rgba(78, 62, 34, 0.12);
  color: var(--ink) !important;
  text-shadow: none;
}

.papyrus-mode .stage-pill--major-build,
.papyrus-mode .stage-pill--active-build {
  background: #cce8dd;
}

.papyrus-mode .stage-pill--hvac-scope,
.papyrus-mode .stage-pill--insurance-signal,
.papyrus-mode .stage-pill--opportunity {
  background: #dcd4ff;
}

.papyrus-mode .stage-pill--restaurant-buildout,
.papyrus-mode .stage-pill--tenant-buildout {
  background: #ecd48e;
}

.papyrus-mode .fit-pill,
.papyrus-mode .fit-pill--high-fit {
  border-color: rgba(35, 107, 111, 0.25);
  background: rgba(205, 232, 221, 0.52);
  color: var(--teal-ink) !important;
}

.papyrus-mode .opportunity-map {
  background: #efe6cc;
}

.papyrus-mode .real-map,
.papyrus-mode .opportunity-map--leaflet,
.papyrus-mode .opportunity-map .leaflet-container {
  background: #efe6cc;
}

.papyrus-mode .opportunity-map--leaflet::after {
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.04), rgba(82, 67, 43, 0.08)),
    linear-gradient(90deg, rgba(82, 67, 43, 0.08), transparent 21%, transparent 79%, rgba(82, 67, 43, 0.10));
}

.papyrus-mode .opportunity-map .leaflet-tile-pane {
  filter: sepia(0.18) saturate(0.76) contrast(0.92) brightness(1.04);
}

.papyrus-mode .opportunity-map .leaflet-control-zoom {
  border-color: rgba(78, 62, 34, 0.20);
  border-radius: 2px;
  box-shadow: 0 12px 28px rgba(80, 61, 30, 0.16);
}

.papyrus-mode .opportunity-map .leaflet-control-zoom a,
.papyrus-mode .map-region-label,
.papyrus-mode .opportunity-map .leaflet-tooltip {
  border-color: rgba(78, 62, 34, 0.18);
  background: rgba(255, 249, 230, 0.94);
  color: var(--ink);
}

.papyrus-mode .opportunity-map .leaflet-tooltip span {
  color: var(--ink-soft);
}

.papyrus-mode .map-region-label {
  border: 1px solid rgba(78, 62, 34, 0.18);
  border-radius: 2px;
  box-shadow: 0 10px 26px rgba(80, 61, 30, 0.12);
}

.papyrus-mode .map-empty {
  color: var(--ink);
}

.papyrus-mode .map-empty span {
  color: var(--ink-soft);
}

.papyrus-mode .opportunity-workspace--rail-open .opportunity-rail {
  border-color: rgba(35, 107, 111, 0.36);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 250, 233, 0.96), rgba(237, 225, 193, 0.96)),
    #f3ead1;
  box-shadow: 0 28px 72px rgba(80, 61, 30, 0.20);
}

.papyrus-mode .client-brief {
  color: var(--ink-soft);
}

.papyrus-mode .rail-close,
.papyrus-mode .map-layer-toggle,
.papyrus-mode .map-layer-reset {
  border-color: rgba(78, 62, 34, 0.20);
  border-radius: 2px;
  background: rgba(255, 249, 230, 0.62);
  color: var(--ink-soft);
}

.papyrus-mode .map-layer-toggle strong {
  color: var(--ink-muted);
}

.papyrus-mode .map-layer-toggle--active {
  border-color: rgba(35, 107, 111, 0.34);
  background: rgba(205, 232, 221, 0.46);
  color: var(--ink);
}

.papyrus-mode .map-layer-toggle--active strong,
.papyrus-mode .map-layer-reset {
  color: var(--teal-ink);
}

.papyrus-mode .opportunity-workspace--list-mode .opportunity-list-panel,
.papyrus-mode .opportunity-workspace--list-mode .opportunity-table-wrap {
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.74), rgba(238, 225, 192, 0.60));
}

.papyrus-mode .opportunity-table {
  color: var(--ink);
  font-size: 13px;
}

.papyrus-mode .opportunity-table th {
  background: rgba(224, 211, 176, 0.88);
  color: var(--ink-muted);
  border-bottom-color: rgba(78, 62, 34, 0.20);
}

.papyrus-mode .opportunity-table td {
  border-bottom-color: rgba(78, 62, 34, 0.13);
}

.papyrus-mode .opportunity-table tbody tr {
  background: rgba(255, 250, 233, 0.50);
}

.papyrus-mode .opportunity-table tbody tr:nth-child(even) {
  background: rgba(238, 225, 192, 0.28);
}

.papyrus-mode .opportunity-table tr:hover,
.papyrus-mode .opportunity-table tr.is-selected {
  background: rgba(205, 232, 221, 0.44);
}

.papyrus-mode .opportunity-table td strong {
  color: var(--ink);
}

.papyrus-mode .opportunity-table td span {
  color: var(--ink-soft);
}

.papyrus-mode .drawer-backdrop--open {
  background: rgba(58, 47, 29, 0.28);
  backdrop-filter: blur(5px);
}

.papyrus-mode .lead-drawer {
  background:
    linear-gradient(rgba(102, 82, 45, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 82, 45, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fff4d8 0%, #efe2bf 100%);
  background-size: 62px 62px, 62px 62px, auto;
  border-left-color: rgba(78, 62, 34, 0.22);
  box-shadow: -28px 0 70px rgba(78, 58, 28, 0.22);
  color: var(--ink);
}

.papyrus-mode .lead-drawer-head {
  border-bottom-color: rgba(78, 62, 34, 0.18);
  background: rgba(255, 249, 230, 0.54);
}

.papyrus-mode .lead-drawer-subtitle,
.papyrus-mode .lead-drawer-empty,
.papyrus-mode .lead-drawer-loading {
  color: var(--ink-soft);
}

.papyrus-mode .lead-drawer-close {
  border-color: rgba(78, 62, 34, 0.20);
  background: rgba(255, 249, 230, 0.54);
  color: var(--ink-soft);
}

.papyrus-mode .drawer-stat-hero,
.papyrus-mode .drawer-card,
.papyrus-mode .drawer-address,
.papyrus-mode .drawer-disclosure {
  border-color: rgba(78, 62, 34, 0.18);
  border-radius: 2px;
  background: rgba(255, 249, 230, 0.58);
}

.papyrus-mode .drawer-stat-hero {
  border-left: 3px solid rgba(35, 107, 111, 0.62);
  box-shadow: 0 12px 30px rgba(80, 61, 30, 0.08);
}

.papyrus-mode .drawer-stat-hero p,
.papyrus-mode .drawer-insight-card p,
.papyrus-mode .drawer-card-value,
.papyrus-mode .drawer-stat-row strong {
  color: var(--ink);
}

.papyrus-mode .drawer-primary-action {
  border-color: rgba(35, 107, 111, 0.26);
  border-radius: 2px;
  background: linear-gradient(135deg, #b9eadf, #72dbe7);
  color: #172116;
  box-shadow: 0 14px 34px rgba(35, 107, 111, 0.18);
}

.papyrus-mode .drawer-primary-action--disabled {
  background: rgba(78, 62, 34, 0.08);
  color: var(--ink-muted);
  box-shadow: none;
}

.papyrus-mode .drawer-stat-row {
  border-bottom-color: rgba(78, 62, 34, 0.14);
}

.papyrus-mode .drawer-stat-facts .drawer-stat-list {
  border-top-color: rgba(78, 62, 34, 0.14);
}

.papyrus-mode .drawer-stat-row span,
.papyrus-mode .drawer-card-label,
.papyrus-mode .drawer-disclosure summary {
  color: var(--ink-muted);
}

.papyrus-mode .drawer-stat-row a {
  color: var(--teal-ink);
}

.papyrus-mode .drawer-disclosure-body p {
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .papyrus-mode .dash-container {
    width: min(100% - 28px, 1880px);
  }

  .papyrus-mode .dash-nav {
    padding: 0 18px;
  }
}

/* ------------------------------------------------------------------
   Papyrus premium refinement
------------------------------------------------------------------- */

body.dash-body.papyrus-mode {
  --paper: #f5ecd4;
  --paper-strong: #fff8e6;
  --paper-soft: #eadcb5;
  --paper-line: rgba(74, 57, 29, 0.18);
  --ink: #241f18;
  --ink-soft: #554b3d;
  --ink-muted: #7d715e;
  --teal-ink: #116a70;
  --violet-ink: #6558d8;
  background:
    linear-gradient(rgba(82, 66, 38, 0.040) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 66, 38, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 13% 0%, rgba(255, 251, 224, 0.88), transparent 29%),
    radial-gradient(circle at 80% 8%, rgba(58, 198, 217, 0.13), transparent 31%),
    linear-gradient(180deg, #f8efd8 0%, #efe2bd 100%);
  background-size: 88px 88px, 88px 88px, auto, auto, auto;
}

.papyrus-mode .dash-nav {
  background:
    linear-gradient(180deg, rgba(255, 249, 229, 0.92), rgba(238, 225, 193, 0.78));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.62), 0 14px 46px rgba(74, 57, 29, 0.10);
}

.papyrus-mode .dash-nav .logo,
.papyrus-mode .dash-nav .logo .brand-word {
  font-size: 25px;
  letter-spacing: -0.055em;
}

.papyrus-mode .nav-center {
  color: rgba(36, 31, 24, 0.48);
  font-size: 10px;
  letter-spacing: 0.32em;
}

.papyrus-mode .profile-menu summary {
  min-height: 38px;
  border-radius: 999px;
  background: rgba(255, 249, 232, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 22px rgba(74, 57, 29, 0.08);
}

.papyrus-mode .dash-container {
  width: min(100% - 72px, 1920px);
  padding-top: 42px;
}

.papyrus-mode .controls-bar {
  min-height: 76px;
  margin-bottom: 26px;
  padding: 12px 20px;
  border-color: rgba(74, 57, 29, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 250, 233, 0.54), rgba(236, 224, 194, 0.44));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 22px 54px rgba(74, 57, 29, 0.10);
}

.papyrus-mode .controls-bar .view-toggle {
  height: 50px;
  border-color: rgba(74, 57, 29, 0.24);
  background: rgba(255, 249, 232, 0.34);
}

.papyrus-mode .controls-bar .view-toggle-button {
  min-width: 104px;
  height: 48px;
  color: rgba(36, 31, 24, 0.48);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.papyrus-mode .controls-bar .view-toggle-button--active {
  color: #12130f;
  background:
    linear-gradient(135deg, rgba(133, 118, 244, 0.88), rgba(67, 203, 226, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 16px 34px rgba(45, 131, 144, 0.18);
}

.papyrus-mode .controls-bar .filter-bar {
  gap: 12px;
}

.papyrus-mode .controls-bar .filter-select,
.papyrus-mode .controls-bar .filter-input,
.papyrus-mode .controls-bar .legend-toggle-button,
.papyrus-mode .controls-bar .btn-export {
  min-height: 48px;
  border-color: rgba(74, 57, 29, 0.19);
  background: rgba(255, 249, 232, 0.50);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.papyrus-mode .controls-bar .filter-select {
  min-width: 165px;
}

.papyrus-mode .controls-bar #filter-sort {
  min-width: 218px;
}

.papyrus-mode .controls-bar .filter-input {
  width: min(360px, 28vw);
}

.papyrus-mode .controls-bar .btn-export {
  min-width: 132px;
  border-color: rgba(17, 106, 112, 0.28);
  color: var(--teal-ink);
  background:
    linear-gradient(180deg, rgba(255, 252, 238, 0.76), rgba(228, 218, 188, 0.58));
}

.papyrus-mode .controls-bar .legend-toggle-button--active,
.papyrus-mode .controls-bar .legend-toggle-button:hover,
.papyrus-mode .controls-bar .btn-export:hover {
  border-color: rgba(17, 106, 112, 0.44);
  background: rgba(208, 232, 224, 0.58);
}

.papyrus-mode .opportunity-workspace {
  margin-top: 0;
  border-color: rgba(74, 57, 29, 0.18);
  background: rgba(255, 250, 234, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    0 30px 80px rgba(74, 57, 29, 0.12);
}

.papyrus-mode .opportunity-map-shell {
  background: transparent;
  box-shadow: none;
}

.papyrus-mode .map-and-list {
  height: calc(100dvh - 178px);
  min-height: 640px;
}

@media (min-width: 1181px) {
  .papyrus-mode .map-and-list {
    grid-template-columns: minmax(430px, 0.48fr) minmax(760px, 1fr);
  }

  .papyrus-mode .opportunity-workspace--list-mode .map-and-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.papyrus-mode .opportunity-list-panel {
  background:
    linear-gradient(180deg, rgba(255, 250, 234, 0.78), rgba(237, 225, 193, 0.50));
}

.papyrus-mode .opportunity-list-head {
  min-height: 76px;
  padding: 20px 22px 18px;
  background: rgba(235, 222, 190, 0.28);
}

.papyrus-mode .opportunity-list-head > span {
  min-width: 38px;
  height: 34px;
  border: 1px solid rgba(17, 106, 112, 0.16);
  background: rgba(206, 229, 220, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.papyrus-mode .workspace-kicker,
.papyrus-mode .opportunity-list-head .workspace-kicker,
.papyrus-mode .rail-section-label,
.papyrus-mode .drawer-section-label,
.papyrus-mode .drawer-insight-label,
.papyrus-mode .lead-drawer-kicker {
  font-size: 10px;
  color: rgba(36, 31, 24, 0.44);
  letter-spacing: 0.24em;
}

.papyrus-mode .opportunity-list-head h3 {
  margin-top: 3px;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.papyrus-mode .opportunity-list {
  gap: 16px;
  padding: 22px;
}

.papyrus-mode .opportunity-card {
  padding: 20px 22px;
  border-color: rgba(74, 57, 29, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 251, 236, 0.88), rgba(239, 227, 194, 0.68));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    0 12px 30px rgba(74, 57, 29, 0.075);
}

.papyrus-mode .opportunity-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.papyrus-mode .opportunity-card strong {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.22;
  letter-spacing: -0.018em;
}

.papyrus-mode .opportunity-card-value {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.papyrus-mode .opportunity-card p {
  margin-top: 9px;
  color: rgba(36, 31, 24, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.papyrus-mode .opportunity-card-top {
  margin: 13px 0 0;
}

.papyrus-mode .opportunity-card-meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(74, 57, 29, 0.11);
  color: rgba(36, 31, 24, 0.54);
}

.papyrus-mode .stage-pill,
.papyrus-mode .fit-pill {
  min-height: 22px;
  padding: 0 9px;
  font-size: 8.5px;
  letter-spacing: 0.13em;
}

.papyrus-mode .opportunity-map {
  min-height: 0;
}

.papyrus-mode .opportunity-map .leaflet-tile-pane {
  filter: sepia(0.12) saturate(0.82) contrast(0.96) brightness(1.03);
}

.papyrus-mode .map-region-label,
.papyrus-mode .opportunity-map .leaflet-control-zoom a {
  background: rgba(255, 249, 230, 0.90);
  box-shadow: 0 8px 18px rgba(74, 57, 29, 0.10);
}

.papyrus-mode .opportunity-table-wrap {
  padding: 20px;
}

.papyrus-mode .opportunity-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.papyrus-mode .opportunity-table th {
  padding: 16px 18px;
  background:
    linear-gradient(180deg, rgba(225, 210, 170, 0.86), rgba(218, 202, 160, 0.72));
  color: rgba(36, 31, 24, 0.52);
  border-bottom: 1px solid rgba(74, 57, 29, 0.18);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.papyrus-mode .opportunity-table td {
  padding: 15px 18px;
}

.papyrus-mode .opportunity-table tbody tr {
  background: rgba(255, 251, 236, 0.56);
}

.papyrus-mode .opportunity-table tbody tr:nth-child(even) {
  background: rgba(242, 231, 198, 0.48);
}

.papyrus-mode .opportunity-table td strong {
  font-size: 13.5px;
  letter-spacing: -0.012em;
}

.papyrus-mode .opportunity-table td span {
  color: rgba(36, 31, 24, 0.64);
}

.papyrus-mode .opportunity-table td:nth-child(2) .stage-pill,
.papyrus-mode .opportunity-table td:nth-child(3) .fit-pill {
  width: auto;
  min-width: 0;
}

.papyrus-mode .opportunity-workspace--rail-open .opportunity-rail {
  width: min(360px, calc(100% - 28px));
  padding: 22px;
}

.papyrus-mode .map-layer-toggle {
  min-height: 42px;
  background: rgba(255, 250, 234, 0.54);
}

.papyrus-mode .lead-drawer {
  width: min(520px, 92vw);
}

.papyrus-mode .lead-drawer-head {
  padding: 28px 28px 22px;
}

.papyrus-mode .lead-drawer-body {
  padding: 24px 28px 34px;
}

.papyrus-mode .drawer-stat-hero {
  padding: 20px;
  background: rgba(255, 249, 230, 0.66);
}

@media (max-width: 1450px) {
  .papyrus-mode .dash-container {
    width: min(100% - 72px, 1500px);
  }

  .papyrus-mode .controls-bar {
    gap: 12px;
  }

  .papyrus-mode .controls-bar .filter-bar {
    gap: 8px;
  }

  .papyrus-mode .controls-bar .view-toggle-button {
    min-width: 92px;
  }

  .papyrus-mode .controls-bar .filter-select {
    min-width: 132px;
  }

  .papyrus-mode .controls-bar #filter-sort {
    min-width: 170px;
  }

  .papyrus-mode .controls-bar .filter-input {
    width: min(220px, 20vw);
    min-width: 0;
  }

  .papyrus-mode .controls-bar .legend-toggle-button {
    padding-left: 12px;
    padding-right: 12px;
  }

  .papyrus-mode .controls-bar .btn-export {
    min-width: 112px;
  }
}

@media (max-width: 900px) {
  .papyrus-mode .dash-container {
    width: min(100% - 28px, 1880px);
  }

  .papyrus-mode .controls-bar .filter-select,
  .papyrus-mode .controls-bar .filter-input {
    min-width: 190px;
  }
}

/* ------------------------------------------------------------------
   Papyrus finish pass: solid ledger header, centered pills, quieter color
------------------------------------------------------------------- */

body.dash-body.papyrus-mode {
  --paper: #f5edd5;
  --paper-strong: #fff8e5;
  --paper-warm: #efe3bd;
  --paper-line: rgba(70, 52, 24, 0.18);
  --ink: #211d17;
  --ink-soft: #554b3b;
  --ink-muted: #82735d;
  --teal-ink: #1c6264;
  --sage-ink: #365c4f;
  --violet-ink: #51467f;
  --ochre-ink: #675222;
  background:
    linear-gradient(rgba(80, 62, 30, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 62, 30, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(255, 252, 231, 0.90), transparent 28%),
    radial-gradient(circle at 82% 7%, rgba(76, 194, 207, 0.095), transparent 32%),
    linear-gradient(180deg, #f9f1dc 0%, #efe2bd 100%);
  background-size: 96px 96px, 96px 96px, auto, auto, auto;
}

.papyrus-mode .controls-bar {
  border-color: rgba(70, 52, 24, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 252, 239, 0.46), rgba(237, 225, 194, 0.28));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 18px 46px rgba(70, 52, 24, 0.075);
}

.papyrus-mode .controls-bar .filter-select,
.papyrus-mode .controls-bar .filter-input,
.papyrus-mode .controls-bar .legend-toggle-button,
.papyrus-mode .controls-bar .btn-export,
.papyrus-mode .controls-bar .view-toggle {
  border-color: rgba(70, 52, 24, 0.16);
  background: rgba(255, 250, 235, 0.42);
}

.papyrus-mode .controls-bar .view-toggle-button--active {
  background:
    linear-gradient(135deg, rgba(133, 122, 230, 0.72), rgba(91, 190, 199, 0.68));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    0 14px 28px rgba(62, 111, 119, 0.14);
}

.papyrus-mode .opportunity-workspace {
  border-color: rgba(70, 52, 24, 0.14);
  background: rgba(255, 250, 235, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 28px 72px rgba(70, 52, 24, 0.10);
}

.papyrus-mode .opportunity-list-panel {
  border-color: rgba(70, 52, 24, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.68), rgba(239, 228, 198, 0.38));
}

.papyrus-mode .opportunity-list-head {
  background: rgba(235, 222, 190, 0.18);
}

.papyrus-mode .opportunity-card {
  border-color: rgba(70, 52, 24, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 252, 240, 0.72), rgba(239, 228, 198, 0.42));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 8px 22px rgba(70, 52, 24, 0.055);
}

.papyrus-mode .opportunity-card:hover,
.papyrus-mode .opportunity-card:focus-visible,
.papyrus-mode .opportunity-card.is-selected {
  border-color: rgba(28, 98, 100, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.86), rgba(235, 226, 199, 0.54));
}

.papyrus-mode .stage-pill,
.papyrus-mode .fit-pill,
.papyrus-mode .opportunity-table .stage-pill,
.papyrus-mode .opportunity-table .fit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  min-width: 92px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(70, 52, 24, 0.14);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}

.papyrus-mode .opportunity-table .stage-pill,
.papyrus-mode .opportunity-table .fit-pill {
  min-width: 118px;
  max-width: 160px;
}

.papyrus-mode .stage-pill--major-build,
.papyrus-mode .stage-pill--active-build {
  border-color: rgba(54, 92, 79, 0.22);
  background: linear-gradient(180deg, #d6e7dd, #bdd7cb);
  color: var(--sage-ink) !important;
}

.papyrus-mode .stage-pill--hvac-scope,
.papyrus-mode .stage-pill--insurance-signal,
.papyrus-mode .stage-pill--opportunity {
  border-color: rgba(81, 70, 127, 0.20);
  background: linear-gradient(180deg, #e2def2, #ccc5e5);
  color: var(--violet-ink) !important;
}

.papyrus-mode .stage-pill--restaurant-buildout,
.papyrus-mode .stage-pill--tenant-buildout,
.papyrus-mode .stage-pill--field-route {
  border-color: rgba(103, 82, 34, 0.22);
  background: linear-gradient(180deg, #ecdca2, #dcc47b);
  color: var(--ochre-ink) !important;
}

.papyrus-mode .stage-pill--mechanical-retrofit,
.papyrus-mode .stage-pill--pre-construction {
  border-color: rgba(47, 85, 111, 0.18);
  background: linear-gradient(180deg, #dce8ec, #c6d9df);
  color: #36566b !important;
}

.papyrus-mode .stage-pill--pre-opening,
.papyrus-mode .stage-pill--opening-context,
.papyrus-mode .stage-pill--opening-license {
  border-color: rgba(64, 109, 68, 0.18);
  background: linear-gradient(180deg, #dfe9c2, #c8dda1);
  color: #456334 !important;
}

.papyrus-mode .fit-pill,
.papyrus-mode .fit-pill--high-fit {
  border-color: rgba(28, 98, 100, 0.22);
  background: linear-gradient(180deg, #e1eee7, #cadfd4);
  color: var(--teal-ink) !important;
}

.papyrus-mode .fit-pill--good-fit,
.papyrus-mode .fit-pill--watchlist {
  border-color: rgba(103, 82, 34, 0.20);
  background: linear-gradient(180deg, #f0e4bd, #ded098);
  color: var(--ochre-ink) !important;
}

.papyrus-mode .opportunity-table-wrap {
  padding: 24px 28px;
  background:
    linear-gradient(180deg, rgba(255, 252, 241, 0.68), rgba(238, 227, 199, 0.36));
}

.papyrus-mode .opportunity-table {
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
}

.papyrus-mode .opportunity-table thead {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #dfd0a4;
  box-shadow:
    0 1px 0 rgba(70, 52, 24, 0.28),
    0 10px 18px rgba(70, 52, 24, 0.10);
}

.papyrus-mode .opportunity-table th {
  position: sticky;
  top: 0;
  z-index: 9;
  background: #dfd0a4;
  background-image: linear-gradient(180deg, #e7d9b0 0%, #d8c797 100%);
  background-clip: padding-box;
  color: rgba(33, 29, 23, 0.56);
  border-bottom: 1px solid rgba(70, 52, 24, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.papyrus-mode .opportunity-table th:first-child {
  border-top-left-radius: 2px;
}

.papyrus-mode .opportunity-table th:last-child {
  border-top-right-radius: 2px;
}

.papyrus-mode .opportunity-table tbody tr,
.papyrus-mode .opportunity-table tbody tr:nth-child(even) {
  background: transparent;
}

.papyrus-mode .opportunity-table td {
  border-bottom: 1px solid rgba(70, 52, 24, 0.14);
  background: rgba(255, 251, 238, 0.22);
}

.papyrus-mode .opportunity-table tbody tr:nth-child(even) td {
  background: rgba(239, 228, 198, 0.20);
}

.papyrus-mode .opportunity-table tr:hover td,
.papyrus-mode .opportunity-table tr.is-selected td {
  background: rgba(211, 232, 223, 0.42);
}

.papyrus-mode .opportunity-table td strong {
  color: var(--ink);
}

.papyrus-mode .opportunity-table td span:not(.stage-pill):not(.fit-pill) {
  color: rgba(33, 29, 23, 0.66);
}

.papyrus-mode .opportunity-table-wrap {
  padding: 0 28px 24px;
  scroll-padding-top: 0;
}

.papyrus-mode .opportunity-table {
  margin-top: 24px;
}

.papyrus-mode .opportunity-table td:nth-child(2) .stage-pill,
.papyrus-mode .opportunity-table td:nth-child(3) .fit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
}

.papyrus-mode .opportunity-table td:nth-child(2) .stage-pill {
  min-width: 124px;
}

.papyrus-mode .opportunity-table td:nth-child(3) .fit-pill {
  min-width: 90px;
}

/* ------------------------------------------------------------------
   Papyrus structural cleanup: full-bleed ledger, fewer boxes
------------------------------------------------------------------- */

.papyrus-mode .controls-bar,
.papyrus-mode .opportunity-workspace {
  border-radius: 0;
}

.papyrus-mode .controls-bar {
  margin-bottom: 22px;
  padding: 14px 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 240, 0.42), rgba(239, 228, 199, 0.20));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 18px 42px rgba(70, 52, 24, 0.06);
}

.papyrus-mode .controls-bar .view-toggle,
.papyrus-mode .controls-bar .filter-select,
.papyrus-mode .controls-bar .filter-input,
.papyrus-mode .controls-bar .legend-toggle-button,
.papyrus-mode .controls-bar .btn-export {
  border-radius: 0;
}

.papyrus-mode .opportunity-workspace {
  min-height: 0;
  border-color: rgba(70, 52, 24, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 252, 241, 0.44), rgba(239, 228, 198, 0.18));
}

.papyrus-mode .opportunity-map-shell {
  border: 0;
}

.papyrus-mode .map-and-list {
  min-height: 0;
  height: calc(100dvh - 206px);
}

.papyrus-mode .opportunity-list-panel {
  border-color: rgba(70, 52, 24, 0.14);
  background: rgba(255, 250, 235, 0.25);
}

.papyrus-mode .opportunity-list-head {
  min-height: 68px;
  padding: 18px 20px 14px;
  background: rgba(235, 222, 190, 0.12);
}

.papyrus-mode .opportunity-card {
  border-radius: 0;
  border-color: rgba(70, 52, 24, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 252, 240, 0.64), rgba(239, 228, 198, 0.30));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 4px 14px rgba(70, 52, 24, 0.035);
}

.papyrus-mode .opportunity-workspace--list-mode {
  padding: 0;
}

.papyrus-mode .opportunity-workspace--list-mode .map-and-list {
  height: calc(100dvh - 206px);
  min-height: 560px;
}

.papyrus-mode .opportunity-workspace--list-mode .opportunity-list-panel {
  border: 0;
  background: transparent;
}

.papyrus-mode .opportunity-workspace--list-mode .opportunity-list-head {
  display: none;
}

.papyrus-mode .opportunity-workspace--list-mode .opportunity-list {
  max-height: none;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.papyrus-mode .opportunity-workspace--list-mode .opportunity-table-wrap {
  height: 100%;
  padding: 0;
  overflow: auto;
  border-top: 0;
  background: transparent;
}

.papyrus-mode .opportunity-table {
  width: 100%;
  margin-top: 0;
  table-layout: fixed;
}

.papyrus-mode .opportunity-table th {
  top: 0;
  padding: 15px 18px;
}

.papyrus-mode .opportunity-table th:nth-child(1) { width: 34%; }
.papyrus-mode .opportunity-table th:nth-child(2) { width: 10%; }
.papyrus-mode .opportunity-table th:nth-child(3) { width: 8%; }
.papyrus-mode .opportunity-table th:nth-child(4) { width: 9%; }
.papyrus-mode .opportunity-table th:nth-child(5) { width: 8%; }
.papyrus-mode .opportunity-table th:nth-child(6) { width: 17%; }
.papyrus-mode .opportunity-table th:nth-child(7) { width: 14%; }

.papyrus-mode .opportunity-table td {
  padding: 16px 18px;
  background: rgba(255, 251, 238, 0.18);
}

.papyrus-mode .opportunity-table td,
.papyrus-mode .opportunity-table td strong,
.papyrus-mode .opportunity-table td span {
  overflow-wrap: normal;
}

.papyrus-mode .opportunity-table td:nth-child(4),
.papyrus-mode .opportunity-table td:nth-child(5),
.papyrus-mode .opportunity-table th:nth-child(4),
.papyrus-mode .opportunity-table th:nth-child(5) {
  white-space: nowrap;
}

.papyrus-mode .opportunity-table td:nth-child(2),
.papyrus-mode .opportunity-table td:nth-child(3) {
  white-space: nowrap;
}

.papyrus-mode .opportunity-table td:nth-child(2) .stage-pill,
.papyrus-mode .opportunity-table td:nth-child(3) .fit-pill,
.papyrus-mode .stage-pill,
.papyrus-mode .fit-pill {
  min-width: 0;
  height: 24px;
  padding: 0 13px;
  white-space: nowrap;
}

.papyrus-mode .opportunity-table td:nth-child(2) .stage-pill {
  min-width: 82px;
}

.papyrus-mode .opportunity-table td:nth-child(3) .fit-pill {
  min-width: 74px;
}

.papyrus-mode .opportunity-table td span:not(.stage-pill):not(.fit-pill) {
  display: block;
  max-width: 100%;
}

.papyrus-mode .opportunity-table td:nth-child(6) span,
.papyrus-mode .opportunity-table td:nth-child(7) span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   Papyrus row treatment: map list reads like a ranked ledger
------------------------------------------------------------------- */

.papyrus-mode .opportunity-list {
  gap: 0;
}

.papyrus-mode .opportunity-card {
  border: 0;
  border-bottom: 1px solid rgba(70, 52, 24, 0.13);
  background: transparent;
  box-shadow: none;
  padding: 18px 20px;
}

.papyrus-mode .opportunity-card:first-child {
  border-top: 1px solid rgba(70, 52, 24, 0.10);
}

.papyrus-mode .opportunity-card:hover,
.papyrus-mode .opportunity-card:focus-visible,
.papyrus-mode .opportunity-card.is-selected {
  background:
    linear-gradient(90deg, rgba(208, 231, 223, 0.52), rgba(255, 252, 240, 0.12));
  transform: none;
}

.papyrus-mode .opportunity-card.is-selected {
  box-shadow: inset 3px 0 0 rgba(28, 98, 100, 0.52);
}

.papyrus-mode .opportunity-card-main {
  gap: 14px;
}

.papyrus-mode .opportunity-card p {
  max-width: 62ch;
}

.papyrus-mode .opportunity-card-top {
  gap: 8px;
}

.papyrus-mode .opportunity-card-meta {
  border-top: 0;
  margin-top: 10px;
  padding-top: 0;
}

.papyrus-mode .drawer-stat-hero,
.papyrus-mode .drawer-card,
.papyrus-mode .drawer-address,
.papyrus-mode .drawer-disclosure {
  border-radius: 0;
  box-shadow: none;
}

.papyrus-mode .lead-drawer {
  width: min(480px, 92vw);
}

.papyrus-mode .drawer-stat-hero {
  background:
    linear-gradient(180deg, rgba(255, 252, 240, 0.72), rgba(239, 228, 198, 0.38));
}

/* ------------------------------------------------------------------
   Papyrus compact chrome + sortable ledger headers
------------------------------------------------------------------- */

body.dash-body.papyrus-mode {
  padding-top: 54px;
}

.papyrus-mode .dash-nav {
  height: 54px;
  padding: 0 36px;
}

.papyrus-mode .dash-nav .logo,
.papyrus-mode .dash-nav .logo .brand-word {
  font-size: 23px;
}

.papyrus-mode .profile-menu summary {
  min-height: 34px;
}

.papyrus-mode .profile-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.papyrus-mode .dash-container {
  width: min(100% - 64px, 1920px);
  padding-top: 20px;
}

.papyrus-mode .controls-bar {
  min-height: 54px;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.papyrus-mode .controls-bar .view-toggle {
  height: 40px;
}

.papyrus-mode .controls-bar .view-toggle-button {
  height: 38px;
  min-width: 88px;
}

.papyrus-mode .controls-bar .filter-select,
.papyrus-mode .controls-bar .filter-input,
.papyrus-mode .controls-bar .legend-toggle-button,
.papyrus-mode .controls-bar .btn-export {
  min-height: 40px;
}

.papyrus-mode .controls-bar .filter-select {
  min-width: 150px;
}

.papyrus-mode .controls-bar #filter-sort {
  min-width: 206px;
}

.papyrus-mode .controls-bar .filter-input {
  width: min(350px, 26vw);
}

.papyrus-mode .map-and-list,
.papyrus-mode .opportunity-workspace--list-mode .map-and-list {
  height: calc(100dvh - 146px);
  min-height: 600px;
}

.papyrus-mode .opportunity-table th {
  padding: 0;
}

.papyrus-mode .opportunity-sort-button {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 0 18px;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
}

.papyrus-mode .opportunity-sort-button em {
  color: rgba(33, 29, 23, 0.28);
  font-style: normal;
  font-size: 10px;
  line-height: 1;
}

.papyrus-mode .opportunity-sort-button--active {
  color: rgba(33, 29, 23, 0.78);
}

.papyrus-mode .opportunity-sort-button--active em {
  color: var(--teal-ink);
}

.papyrus-mode .opportunity-sort-button:hover,
.papyrus-mode .opportunity-sort-button:focus-visible {
  outline: 0;
  background: rgba(255, 249, 230, 0.24);
}

.papyrus-mode .opportunity-table td {
  padding-top: 14px;
  padding-bottom: 14px;
}

@media (max-width: 1450px) {
  .papyrus-mode .dash-container {
    width: min(100% - 48px, 1500px);
    padding-top: 16px;
  }

  .papyrus-mode .controls-bar {
    margin-bottom: 12px;
  }

  .papyrus-mode .map-and-list,
  .papyrus-mode .opportunity-workspace--list-mode .map-and-list {
    height: calc(100dvh - 136px);
  }

  .papyrus-mode .controls-bar .filter-select {
    min-width: 128px;
  }

  .papyrus-mode .controls-bar #filter-sort {
    min-width: 166px;
  }

  .papyrus-mode .controls-bar .filter-input {
    width: min(240px, 19vw);
  }
}

/* ------------------------------------------------------------------
   UX correction pass: calmer customer workspace, clearer command bar,
   map-first desktop, and explicit mobile patterns.
------------------------------------------------------------------- */

body.dash-body.papyrus-mode {
  --paper: #f4f1e8;
  --paper-strong: #fffdf6;
  --paper-soft: #e8e2d2;
  --paper-line: rgba(54, 48, 38, 0.14);
  --ink: #211f1b;
  --ink-soft: #504c43;
  --ink-muted: #777166;
  --teal-ink: #0f6a70;
  --violet-ink: #5e57c8;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 248, 0.82), transparent 30%),
    linear-gradient(180deg, #f7f5ee 0%, #ece7da 100%);
  background-size: auto;
}

body.dash-body.papyrus-mode::before {
  display: none;
}

.papyrus-mode .dash-container {
  width: min(100% - 56px, 1760px);
}

.papyrus-mode .controls-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(54, 48, 38, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.74);
  box-shadow: 0 14px 34px rgba(54, 48, 38, 0.075);
}

.command-primary,
.command-secondary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.command-primary {
  justify-content: flex-start;
}

.command-secondary {
  justify-content: flex-end;
}

.papyrus-mode .controls-bar .filter-bar {
  justify-content: center;
  gap: 8px;
  overflow: visible;
}

.papyrus-mode .controls-bar .view-toggle,
.papyrus-mode .controls-bar .filter-select,
.papyrus-mode .controls-bar .filter-input,
.papyrus-mode .controls-bar .legend-toggle-button,
.papyrus-mode .controls-bar .btn-export {
  border-radius: 6px;
  border-color: rgba(54, 48, 38, 0.16);
  background: rgba(255, 253, 246, 0.88);
  box-shadow: none;
}

.papyrus-mode .controls-bar .view-toggle {
  background: rgba(232, 226, 211, 0.52);
}

.papyrus-mode .controls-bar .view-toggle-button {
  min-width: 82px;
  color: rgba(33, 31, 27, 0.58);
}

.papyrus-mode .controls-bar .view-toggle-button--active {
  color: #10130f;
  background: linear-gradient(135deg, rgba(99, 91, 206, 0.82), rgba(50, 184, 196, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.papyrus-mode .controls-bar .filter-select {
  min-width: 144px;
}

.papyrus-mode .controls-bar #filter-sort {
  min-width: 178px;
}

.papyrus-mode .controls-bar #filter-week {
  min-width: 166px;
}

.papyrus-mode .controls-bar .filter-input {
  width: clamp(220px, 22vw, 360px);
}

.papyrus-mode .controls-bar .btn-export,
.papyrus-mode .controls-bar .legend-toggle-button {
  min-width: 104px;
  color: var(--teal-ink);
}

.workspace-list-mode .legend-toggle-button,
.legend-toggle-button[hidden] {
  display: none !important;
}

.papyrus-mode .controls-bar {
  grid-template-columns: minmax(460px, 1fr) auto auto;
  grid-template-areas: "primary filters secondary";
  align-items: center;
  gap: 10px;
  min-height: 58px;
}

.papyrus-mode .controls-bar .command-primary {
  grid-area: primary;
  display: grid;
  grid-template-columns: auto minmax(148px, 176px) minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.papyrus-mode .controls-bar .filter-bar {
  grid-area: filters;
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
}

.papyrus-mode .controls-bar .command-secondary {
  grid-area: secondary;
  justify-content: flex-end;
}

.papyrus-mode .controls-bar .filter-input {
  width: 100%;
  min-width: 0;
}

.papyrus-mode .controls-bar .stat-lens-select {
  width: 100%;
  min-width: 0;
  font-weight: 800;
  color: var(--teal-ink);
}

.papyrus-mode .controls-bar #filter-sort {
  min-width: 148px;
}

.papyrus-mode .opportunity-workspace,
.papyrus-mode .opportunity-map-shell {
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.60);
  box-shadow: 0 20px 48px rgba(54, 48, 38, 0.08);
}

.papyrus-mode .map-and-list {
  grid-template-columns: minmax(340px, 0.44fr) minmax(620px, 1fr);
  height: calc(100dvh - 146px);
  min-height: 600px;
}

.papyrus-mode .opportunity-list-panel {
  background: rgba(255, 253, 246, 0.76);
}

.papyrus-mode .opportunity-list-head {
  min-height: 64px;
  padding: 16px 18px 14px;
  background: rgba(232, 226, 211, 0.24);
}

.papyrus-mode .opportunity-list {
  padding: 0;
  gap: 0;
}

.papyrus-mode .opportunity-card {
  padding: 17px 18px;
  border: 0;
  border-bottom: 1px solid rgba(54, 48, 38, 0.12);
  background: transparent;
  box-shadow: none;
}

.papyrus-mode .opportunity-card:hover,
.papyrus-mode .opportunity-card:focus-visible,
.papyrus-mode .opportunity-card.is-selected {
  background: linear-gradient(90deg, rgba(214, 234, 226, 0.66), rgba(255, 253, 246, 0.12));
}

.papyrus-mode .opportunity-card strong {
  font-size: 15px;
  line-height: 1.22;
}

.papyrus-mode .opportunity-card p {
  max-width: 64ch;
  color: rgba(33, 31, 27, 0.70);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.papyrus-mode .opportunity-card-meta {
  border-top: 0;
  color: rgba(33, 31, 27, 0.56);
}

.papyrus-mode .opportunity-map {
  background: #f3f0e7;
}

.papyrus-mode .opportunity-map .leaflet-tile-pane {
  filter: saturate(0.74) contrast(0.96) brightness(1.03);
}

.papyrus-mode .opportunity-map--leaflet::after {
  background: linear-gradient(90deg, rgba(255, 253, 246, 0.10), transparent 24%, transparent 76%, rgba(255, 253, 246, 0.14));
}

.papyrus-mode .opportunity-workspace--rail-open .opportunity-rail {
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.97);
  box-shadow: 0 22px 58px rgba(54, 48, 38, 0.18);
}

.papyrus-mode .drawer-source-strip {
  margin-top: 16px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(54, 48, 38, 0.13);
  display: grid;
  gap: 6px;
}

.papyrus-mode .drawer-source-strip span {
  color: rgba(33, 31, 27, 0.45);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.papyrus-mode .drawer-source-strip strong {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

@media (min-width: 1181px) {
  .papyrus-mode .map-and-list {
    grid-template-columns: minmax(360px, 0.42fr) minmax(680px, 1fr);
  }

  .papyrus-mode .opportunity-workspace--list-mode .map-and-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .papyrus-mode .controls-bar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "primary"
      "filters"
      "secondary";
  }

  .command-primary,
  .command-secondary,
  .papyrus-mode .controls-bar .filter-bar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .papyrus-mode .controls-bar .filter-input {
    flex: 1 1 260px;
    width: auto;
  }

  .papyrus-mode .map-and-list,
  .papyrus-mode .opportunity-workspace--list-mode .map-and-list {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .papyrus-mode .opportunity-map {
    height: 520px;
    min-height: 0;
  }

  .papyrus-mode .opportunity-list-panel {
    order: 1;
  }
}

@media (max-width: 720px) {
  body.dash-body.papyrus-mode {
    padding-top: 54px;
  }

  .papyrus-mode .dash-nav {
    padding: 0 20px;
  }

  .papyrus-mode .nav-center,
  .papyrus-mode .nav-email {
    display: none;
  }

  .papyrus-mode .dash-container {
    width: min(100% - 24px, 720px);
    padding-top: 14px;
  }

  .papyrus-mode .controls-bar {
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
  }

  .papyrus-mode .controls-bar .command-primary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .papyrus-mode .controls-bar .view-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .papyrus-mode .controls-bar .view-toggle,
  .papyrus-mode .controls-bar .filter-select,
  .papyrus-mode .controls-bar .filter-input,
  .papyrus-mode .controls-bar .legend-toggle-button,
  .papyrus-mode .controls-bar .btn-export {
    width: 100%;
    min-width: 0;
  }

  .papyrus-mode .controls-bar .filter-bar,
  .command-secondary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .papyrus-mode .controls-bar .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .papyrus-mode .controls-bar #filter-sort {
    grid-column: 1 / -1;
  }

  .papyrus-mode .controls-bar .command-secondary {
    grid-template-columns: 1fr 1fr;
  }

  .papyrus-mode .opportunity-workspace,
  .papyrus-mode .opportunity-map-shell {
    border-radius: 0;
  }

  .papyrus-mode .opportunity-map {
    height: 360px;
    min-height: 320px;
    order: 1;
  }

  .papyrus-mode .opportunity-list-panel {
    order: 0;
  }

  .papyrus-mode .opportunity-map-shell {
    order: 1;
  }

  .papyrus-mode .opportunity-list-head {
    min-height: 58px;
    padding: 14px 16px;
  }

  .papyrus-mode .opportunity-card {
    padding: 16px;
  }

  .papyrus-mode .opportunity-card-main {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .papyrus-mode .opportunity-card-value {
    justify-self: start;
  }

  .papyrus-mode .opportunity-card-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .papyrus-mode .opportunity-workspace--list-mode .opportunity-list {
    overflow: visible;
    height: auto;
  }

  .papyrus-mode .opportunity-table,
  .papyrus-mode .opportunity-table tbody,
  .papyrus-mode .opportunity-table tr,
  .papyrus-mode .opportunity-table td {
    display: block;
    width: 100%;
  }

  .papyrus-mode .opportunity-table thead {
    display: none;
  }

  .papyrus-mode .opportunity-table tbody tr {
    margin: 0;
    padding: 15px 16px;
    border-bottom: 1px solid rgba(54, 48, 38, 0.13);
    background: rgba(255, 253, 246, 0.72);
  }

  .papyrus-mode .opportunity-table td {
    padding: 5px 0;
    border: 0;
    background: transparent;
    white-space: normal !important;
  }

  .papyrus-mode .opportunity-table td:nth-child(n+2) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .papyrus-mode .opportunity-table td:nth-child(n+2)::before {
    content: "";
    min-width: 76px;
    color: rgba(33, 31, 27, 0.42);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .papyrus-mode .opportunity-table td:nth-child(2)::before { content: "Type"; }
  .papyrus-mode .opportunity-table td:nth-child(3)::before { content: "Fit"; }
  .papyrus-mode .opportunity-table td:nth-child(4)::before { content: "Value"; }
  .papyrus-mode .opportunity-table td:nth-child(5)::before { content: "Date"; }
  .papyrus-mode .opportunity-table td:nth-child(6)::before { content: "Contact"; }
  .papyrus-mode .opportunity-table td:nth-child(7)::before { content: "Location"; }

  .papyrus-mode .opportunity-table td span:not(.stage-pill):not(.fit-pill) {
    white-space: normal;
    text-overflow: clip;
  }

  .papyrus-mode .lead-drawer {
    width: 100vw;
    max-width: none;
  }

  .papyrus-mode .lead-drawer-head,
  .papyrus-mode .lead-drawer-body {
    padding-left: 22px;
    padding-right: 22px;
  }

  .papyrus-mode .drawer-stat-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
