/* ============================================================
   BDI · New Prospect Search — interactive prototype
   Light theme · production-feel · brand-purple accent retained.
   ============================================================ */
:root {
  /* Brand */
  --accent-primary: #6622CB;
  --accent-primary-deep: #4F1AA0;
  --accent-secondary: #FF4D00;
  --accent-ok: #1A9D5F;

  /* Light surfaces — tinted slightly toward purple (per impeccable rules, no pure white) */
  --surface: #F7F5FB;          /* page bg, filter panel */
  --surface-raised: #FFFFFF;   /* cards, results area */
  --surface-2: #FBFAFE;        /* hover/alt states */

  /* Foreground — dark navy with purple tint (no pure black) */
  --foreground: #1A1730;
  --foreground-muted: #4D4866;
  --foreground-faint: #807B9A;
  --foreground-accent: #6622CB;

  /* Edges */
  --edge: #E7E3F0;
  --edge-subtle: #EFEDF5;
  --edge-strong: #D2CDE0;

  /* Shadows — subtle on light, more dramatic on hover/modal */
  --shadow-soft: 0 1px 2px rgba(26,23,48,0.04), 0 1px 1px rgba(26,23,48,0.02);
  --shadow-lift: 0 4px 14px rgba(26,23,48,0.08), 0 1px 3px rgba(26,23,48,0.04);
  --shadow-modal: 0 24px 80px rgba(26,23,48,0.22), 0 6px 18px rgba(26,23,48,0.10);
  --shadow-bar: 0 -4px 24px rgba(26,23,48,0.06);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  --easing: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--foreground);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus { outline: 0; }
:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(102,34,203,0.18); color: var(--foreground); }

/* ============================================================
   APP BAR
   ============================================================ */
.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge-subtle);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 24px;
}
.appbar__left { display: flex; align-items: center; gap: 24px; min-width: 0; }
.appbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--foreground-muted);
  letter-spacing: 0.005em;
  padding: 6px 10px 6px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--edge);
  background: var(--surface-raised);
  transition: background-color 200ms var(--easing), color 200ms var(--easing), border-color 200ms var(--easing);
}
.appbar__brand:hover { background: rgba(102,34,203,0.06); color: var(--accent-primary); border-color: rgba(102,34,203,0.3); }
.appbar__crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground-faint);
  letter-spacing: 0.005em;
}
.appbar__sep { opacity: 0.6; }
.appbar__current { color: var(--foreground); }
.appbar__right { display: flex; align-items: center; gap: 14px; }
.prevbadge {
  font-family: 'Archivo', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255,77,0,0.10);
  border: 1px solid rgba(255,77,0,0.30);
  color: #C73D00;
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6622CB, #9D5BE5);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  letter-spacing: 0.04em;
}

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 56px);
  background: var(--surface-raised);
}

/* ============================================================
   FILTER PANEL
   ============================================================ */
.filters {
  background: var(--surface);
  border-right: 1px solid var(--edge-subtle);
  overflow-y: auto;
  max-height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
}
.filters::-webkit-scrollbar { width: 6px; }
.filters::-webkit-scrollbar-thumb { background: var(--edge-strong); border-radius: 3px; }
.filters__inner { padding: 18px 18px 28px; }

.filters__title {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--foreground-faint);
  margin: 16px 4px 8px;
}

/* Personal email toggle — sits at top, reads as a precondition not a card */
.petoggle {
  background: transparent;
  border-top: 1px solid var(--edge-subtle);
  border-bottom: 1px solid var(--edge-subtle);
  padding: 14px 4px;
  margin: -8px -4px 6px;
}
.petoggle::before {
  content: "Lawful basis";
  display: block;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--foreground-faint);
  margin-bottom: 8px;
}
.petoggle__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.petoggle__title {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--foreground);
}
.petoggle__sub {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--foreground-faint);
  margin-top: 2px;
}

/* Toggle switch */
.switch { position: relative; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  display: block;
  width: 36px; height: 20px;
  background: var(--edge-strong);
  border-radius: 10px;
  transition: background-color 220ms var(--easing);
  cursor: pointer;
  position: relative;
}
.switch__thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26,23,48,0.16);
  transition: transform 220ms var(--easing-out);
}
.switch input:checked + .switch__track { background: var(--accent-primary); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent-primary); outline-offset: 2px; }

/* Filter group accordion */
.fgroup {
  border-bottom: 1px solid var(--edge-subtle);
  margin: 0;
  padding: 0;
}
.fgroup:last-of-type { border-bottom: 0; }
.fgroup summary {
  list-style: none;
  cursor: pointer;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.005em;
  color: var(--foreground);
  padding: 14px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  position: relative;
}
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--foreground-faint);
  border-bottom: 1.5px solid var(--foreground-faint);
  transform: rotate(-45deg);
  transition: transform 220ms var(--easing);
  flex-shrink: 0;
}
.fgroup[open] summary::after { transform: rotate(45deg); }
.fgroup__count {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--accent-primary);
  background: rgba(102,34,203,0.10);
  padding: 1.5px 7px;
  border-radius: var(--radius-pill);
  min-width: 18px;
  text-align: center;
  margin-left: auto;
  margin-right: 8px;
}
.fgroup__count:empty { display: none; }
.fbody { padding: 4px 4px 16px; }

/* Chip input */
.chipinput {
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 6px;
  transition: border-color 200ms var(--easing), box-shadow 200ms var(--easing);
}
.chipinput:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(102,34,203,0.10);
}
.chipinput .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.chipinput .chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  padding: 3px 4px 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(102,34,203,0.08);
  border: 1px solid rgba(102,34,203,0.30);
  color: var(--accent-primary-deep);
}
.chip--exclude {
  background: rgba(255,77,0,0.07);
  border-color: rgba(255,77,0,0.32);
  color: #C73D00;
}
.chip__close {
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 180ms var(--easing), background-color 180ms var(--easing);
  font-size: 13px;
  line-height: 1;
}
.chip__close:hover { opacity: 1; background: rgba(26,23,48,0.08); }
.chipinput__field {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--foreground);
  font-size: 12.5px;
  padding: 5px 6px;
  font-family: inherit;
}
.chipinput__field::placeholder { color: var(--foreground-faint); }
.chipinput__hint {
  font-size: 10.5px;
  color: var(--foreground-faint);
  padding: 4px 6px 2px;
  line-height: 1.4;
}
.chipinput__hint code {
  background: rgba(26,23,48,0.06);
  padding: 0 4px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--foreground-muted);
}

/* Checkbox lists */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--foreground-muted);
  transition: background-color 180ms var(--easing), color 180ms var(--easing);
}
.checks label:hover { background: rgba(102,34,203,0.04); color: var(--foreground); }
.checks input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border: 1.5px solid var(--edge-strong);
  border-radius: 3.5px;
  background: var(--surface-raised);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background-color 180ms var(--easing), border-color 180ms var(--easing);
}
.checks input[type="checkbox"]:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}
.checks input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4.5px; top: 1.5px;
  width: 4px; height: 8px;
  border-right: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  transform: rotate(45deg);
}
.checks input:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }

/* Search input inside accordions */
.fsearch {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  color: var(--foreground);
  border-radius: var(--radius-md);
  padding: 7px 10px;
  font-size: 12.5px;
  margin-bottom: 8px;
  font-family: inherit;
  transition: border-color 200ms var(--easing), box-shadow 200ms var(--easing);
}
.fsearch::placeholder { color: var(--foreground-faint); }
.fsearch:focus { outline: 0; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(102,34,203,0.10); }

.fmore {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--accent-primary);
  margin: 8px 6px 0;
  transition: color 180ms var(--easing);
}
.fmore:hover { color: var(--accent-primary-deep); }

/* Year founded range */
.range { display: flex; gap: 10px; }
.range label { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.range span {
  font-size: 10.5px;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--foreground-faint);
}
.range input {
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--foreground);
  font-family: inherit;
  transition: border-color 200ms var(--easing), box-shadow 200ms var(--easing);
}
.range input:focus { outline: 0; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(102,34,203,0.10); }

.reset {
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--foreground-faint);
  margin-top: 16px;
  padding: 6px 4px;
  transition: color 180ms var(--easing);
}
.reset:hover { color: var(--accent-secondary); }

/* ============================================================
   RESULTS
   ============================================================ */
.results {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface-raised);
}

.actionbar {
  position: sticky;
  top: 56px;
  z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge-subtle);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.actionbar__left, .actionbar__right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.count { display: flex; flex-direction: column; line-height: 1.2; }
.count__num {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}
.count__lbl {
  font-family: 'Manrope', sans-serif;
  font-size: 11.5px;
  color: var(--foreground-faint);
  margin-top: 2px;
  letter-spacing: 0.015em;
}
.link {
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: background-color 180ms var(--easing);
}
.link:hover { background: rgba(102,34,203,0.08); }

.capgauge { display: flex; flex-direction: column; line-height: 1.2; min-width: 140px; }
.capgauge__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.capgauge__num {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}
.capgauge.is-warn .capgauge__num { color: #C73D00; }
.capgauge.is-locked .capgauge__num { color: var(--accent-secondary); }
.capgauge__lbl {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  color: var(--foreground-faint);
  letter-spacing: 0.005em;
}
.capgauge__track {
  height: 4px;
  background: rgba(102,34,203,0.10);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 7px;
}
.capgauge__fill {
  height: 100%;
  width: 0%;
  background: var(--accent-primary);
  transition: width 320ms var(--easing-out), background-color 220ms var(--easing);
  border-radius: 2px;
}
.capgauge.is-warn .capgauge__fill { background: #FF8000; }
.capgauge.is-locked .capgauge__fill { background: var(--accent-secondary); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.005em;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--accent-primary);
  color: #fff;
  transition: background-color 200ms var(--easing), transform 180ms var(--easing-out), opacity 200ms var(--easing), box-shadow 220ms var(--easing);
  box-shadow: 0 3px 12px rgba(102,34,203,0.28);
}
.cta:hover:not(:disabled) { background: var(--accent-primary-deep); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(102,34,203,0.40); }
.cta:active:not(:disabled) { transform: translateY(0); }
.cta:disabled {
  opacity: 1;
  background: var(--edge);
  color: var(--foreground-faint);
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================================================
   RESULTS TABLE
   ============================================================ */
.tablewrap {
  flex: 1;
  padding: 0;
}
/* Horizontal scroll only when viewport actually can't fit the table.
   Putting overflow-x: auto on desktop creates a scroll container that
   breaks position:sticky on <th>. */
@media (max-width: 720px) {
  .tablewrap { overflow-x: auto; }
}
.rtable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
  position: relative;
}
.rtable thead th {
  /* sticky removed temporarily — diagnosing layout bug */
  background: var(--surface);
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--foreground-faint);
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--edge-strong);
  user-select: none;
}
.rtable__check { width: 38px; padding-left: 28px !important; }
.rtable__li { width: 60px; text-align: center !important; }

.sortable { cursor: pointer; transition: color 180ms var(--easing); }
.sortable:hover { color: var(--foreground); }
.sortarrow {
  display: inline-block;
  width: 8px; height: 8px;
  margin-left: 4px;
  opacity: 0;
  border-right: 1.2px solid currentColor;
  border-bottom: 1.2px solid currentColor;
  transform: rotate(45deg);
  vertical-align: 2px;
  transition: opacity 180ms var(--easing), transform 180ms var(--easing);
}
.sortable.is-sorted .sortarrow { opacity: 1; }
.sortable.is-sorted.is-desc .sortarrow { transform: rotate(-135deg); vertical-align: -2px; }

.rtable tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--edge-subtle);
  font-size: 13px;
  color: var(--foreground-muted);
  letter-spacing: 0.005em;
  vertical-align: middle;
}
.rtable tbody tr { transition: background-color 180ms var(--easing); }
.rtable tbody tr:nth-child(2n) td { background: rgba(102,34,203,0.014); }
.rtable tbody tr:hover td { background: rgba(102,34,203,0.045); }
.rtable tbody tr.is-selected td { background: rgba(102,34,203,0.075); }
.rtable tbody tr.is-selected:hover td { background: rgba(102,34,203,0.10); }
.rtable tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-primary);
}
.rtable .cell-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  color: var(--foreground);
  font-size: 13.5px;
}
.rtable .cell-name__email {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  font-size: 11px;
  color: var(--foreground-faint);
  letter-spacing: 0;
  padding: 1px 7px 1px 5px;
  background: rgba(26,23,48,0.04);
  border-radius: var(--radius-pill);
}
.rtable .cell-name__email svg { opacity: 0.55; }
.rtable tbody tr:hover .cell-name__email { background: rgba(102,34,203,0.08); color: var(--accent-primary); }
.rtable tbody tr:hover .cell-name__email svg { opacity: 0.85; }
.rtable .cell-company {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  color: var(--foreground);
  font-size: 13px;
}
.rtable .cell-company__sub {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 11px;
  color: var(--foreground-faint);
  margin-top: 1px;
}
.rtable .cell-li { text-align: center; }
.rtable .li-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--foreground-faint);
  transition: background-color 180ms var(--easing), color 180ms var(--easing);
}
.rtable .li-icon:hover {
  background: rgba(102,34,203,0.10);
  color: var(--accent-primary);
}
.rtable .li-icon--off {
  opacity: 0.18;
  cursor: not-allowed;
}

/* Custom checkbox in table */
.cbx { display: inline-flex; cursor: pointer; }
.cbx input { position: absolute; opacity: 0; pointer-events: none; }
.cbx__box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--edge-strong);
  border-radius: 3.5px;
  background: var(--surface-raised);
  position: relative;
  transition: background-color 180ms var(--easing), border-color 180ms var(--easing);
}
.cbx input:checked + .cbx__box {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}
.cbx input:checked + .cbx__box::after {
  content: "";
  position: absolute;
  left: 4px; top: 0.5px;
  width: 4.5px; height: 9px;
  border-right: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  transform: rotate(45deg);
}
.cbx input:focus-visible + .cbx__box { outline: 2px solid var(--accent-primary); outline-offset: 2px; }

/* Empty state */
.empty {
  padding: 80px 24px;
  text-align: center;
  color: var(--foreground-faint);
}
.empty__ic {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(102,34,203,0.07);
  border: 1px solid rgba(102,34,203,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 18px;
}
.empty__h {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.015em;
  color: var(--foreground);
  margin: 0;
}
.empty__p {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: var(--foreground-muted);
  margin: 8px auto 0;
  max-width: 360px;
  line-height: 1.6;
}

.loadmore {
  padding: 24px 28px 40px;
  text-align: center;
}
.loadmore button {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  color: var(--foreground-muted);
  transition: background-color 200ms var(--easing), border-color 200ms var(--easing), color 200ms var(--easing), box-shadow 200ms var(--easing);
  box-shadow: var(--shadow-soft);
}
.loadmore button:hover {
  background: rgba(102,34,203,0.05);
  border-color: rgba(102,34,203,0.35);
  color: var(--accent-primary);
}

/* ============================================================
   ENRICHMENT PROGRESS BAR
   ============================================================ */
.enrich {
  position: sticky;
  bottom: 0;
  z-index: 25;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(102,34,203,0.28);
  padding: 14px 28px;
  box-shadow: var(--shadow-bar);
}
.enrich__row { max-width: 1200px; margin: 0 auto; }
.enrich__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 12px; flex-wrap: wrap; }
.enrich__title {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--foreground);
}
.enrich__nums {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
}
.bar {
  height: 6px;
  background: rgba(102,34,203,0.10);
  border-radius: 3px;
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), #9D5BE5);
  transition: width 400ms var(--easing-out);
  border-radius: 3px;
}
.enrich__hint {
  font-size: 11.5px;
  color: var(--foreground-faint);
  margin-top: 8px;
  line-height: 1.5;
}
.enrich__hint #enrich-status { color: var(--accent-primary); font-weight: 500; }

/* ============================================================
   GDPR MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26,23,48,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadein 200ms var(--easing-out);
}
.modal__card {
  position: relative;
  width: min(480px, 100%);
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-modal);
  animation: pop 240ms var(--easing-out);
}
.modal__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(102,34,203,0.10);
  border: 1px solid rgba(102,34,203,0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 16px;
}
.modal__h {
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--foreground);
  line-height: 1.3;
}
.modal__p {
  font-family: 'Manrope', sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--foreground-muted);
  margin: 12px 0 8px;
}
.modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.modal__list li {
  font-family: 'Manrope', sans-serif;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--foreground-muted);
  padding-left: 18px;
  position: relative;
}
.modal__list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-primary);
}
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  padding: 9px 15px;
  border-radius: var(--radius-md);
  transition: background-color 200ms var(--easing), border-color 200ms var(--easing), transform 180ms var(--easing-out);
  border: 1px solid transparent;
}
.btn--primary { background: var(--accent-primary); color: #fff; box-shadow: 0 3px 10px rgba(102,34,203,0.28); }
.btn--primary:hover { background: var(--accent-primary-deep); transform: translateY(-1px); }
.btn--ghost {
  background: var(--surface-raised);
  color: var(--foreground-muted);
  border-color: var(--edge);
}
.btn--ghost:hover { background: var(--surface); color: var(--foreground); border-color: var(--edge-strong); }

@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--foreground);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  color: #fff;
  box-shadow: var(--shadow-modal);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--easing), transform 220ms var(--easing-out);
  z-index: 80;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .filters {
    position: relative;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--edge-subtle);
  }
  .appbar__crumbs { display: none; }
}

@media (max-width: 600px) {
  .actionbar { padding: 12px 18px; }
  .actionbar__left, .actionbar__right { width: 100%; justify-content: space-between; }
  .capgauge { text-align: left; }
  .rtable thead th { top: 0; }
  .rtable thead th:nth-child(4), .rtable thead th:nth-child(5) { display: none; }
  .rtable tbody td:nth-child(4), .rtable tbody td:nth-child(5) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
