:root {
  --bg: #0b1219;
  --bg-elev: #0f1720;
  --panel: #14202c;
  --panel-2: #1a2836;
  --border: #243447;
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #e8eef4;
  --muted: #8aa0b4;
  --accent: #3b82f6;
  --accent-2: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --green: #3fb950;
  --amber: #d29922;
  --red: #f85149;
  --nav-w: 268px;
  --radius: 12px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  --scroll-size: 10px;
  --scroll-track: transparent;
  --scroll-thumb: rgba(138, 160, 180, 0.32);
  --scroll-thumb-hover: rgba(59, 130, 246, 0.55);
  --scroll-thumb-active: var(--accent);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Themed scrollbars — Firefox + Chromium/Electron */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
*::-webkit-scrollbar {
  width: var(--scroll-size);
  height: var(--scroll-size);
}
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner {
  background: var(--scroll-track);
}
*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:active {
  background: var(--scroll-thumb-active);
  background-clip: padding-box;
}
*::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

code { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }

/* ========== App shell ========== */
.shell {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

.app-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 14px;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  overflow: auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.logo {
  display: inline-block;
  width: max-content;
  flex-shrink: 0;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--accent);
  color: white;
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 13px;
}
.nav-brand-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.nav-brand-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.nav-menu { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.nav-item:hover { background: rgba(255,255,255,0.03); }
.nav-item.active {
  background: var(--accent-soft);
  border-color: rgba(59, 130, 246, 0.35);
}
.nav-ico {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 1px;
}
.nav-item.active .nav-ico { color: var(--accent); }
.nav-item-title { display: block; font-size: 13px; font-weight: 650; }
.nav-item-desc { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.nav-tool {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  margin-top: 4px;
  padding: 14px 14px 15px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: linear-gradient(180deg, rgba(59,130,246,0.18), rgba(59,130,246,0.06));
  color: var(--text);
  cursor: pointer;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.nav-tool:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(59,130,246,0.26), rgba(59,130,246,0.1));
}
.nav-tool.active {
  outline: 1px solid rgba(59, 130, 246, 0.55);
}
.nav-tool-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93c5fd;
  font-weight: 700;
}
.nav-tool-title {
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}
.nav-tool-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.nav-footer {
  margin-top: auto;
  padding: 12px 8px 4px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.conn.running .dot { background: var(--amber); animation: pulse 1.2s infinite; }
.conn.done .dot { background: var(--green); }
.conn.error .dot, .conn.blocked .dot { background: var(--red); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }

.shell-main {
  min-width: 0;
  padding: 28px 32px 56px;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(59,130,246,0.08), transparent 55%),
    var(--bg);
}

.page { display: none; max-width: 1180px; }
.page.active { display: block; animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-top.compact { margin-bottom: 8px; }
.page-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.page-title { margin: 0; font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.page-lead { margin: 8px 0 0; color: var(--muted); font-size: 14px; max-width: 560px; line-height: 1.45; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.back-link {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  padding: 0;
  margin-bottom: 8px;
  cursor: pointer;
}
.back-link:hover { text-decoration: underline; }

.panel-flat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.block-head { margin-bottom: 14px; }
.block-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.block-head p { margin: 4px 0 0; }
.block-head.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.banner-pending {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(210,153,34,0.08);
  border: 1px solid rgba(210,153,34,0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.banner-pending strong { display: block; margin-bottom: 2px; }

.source-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.source-bar-left { display: flex; flex-direction: column; gap: 6px; min-width: 280px; flex: 1; }
.source-select-wrap { display: flex; flex-direction: column; gap: 6px; }
.source-select-wrap select { max-width: 640px; }

.empty-state {
  text-align: center;
  padding: 56px 24px;
}
.empty-state h2 { margin: 0 0 8px; font-size: 18px; }
.empty-state .btn { margin-top: 18px; }
.overview-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.overview-empty-actions .btn { margin-top: 0; }
.dataset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.dataset-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dataset-kind {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.dataset-name {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}
.dataset-fields { line-height: 1.4; }
.dataset-card .btn { align-self: flex-start; margin-top: 4px; }

.an-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.an-source { display: flex; flex-direction: column; gap: 6px; min-width: 280px; flex: 1; }
.an-source select { max-width: 560px; }
.an-juris { display: flex; gap: 6px; flex-wrap: wrap; }
.an-pill {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.an-pill:hover { border-color: var(--accent); color: var(--text); }
.an-pill.active {
  background: var(--accent-soft);
  border-color: rgba(59, 130, 246, 0.45);
  color: var(--text);
}
.an-meta { margin: 0 0 6px auto; }

.an-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.an-stat {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  min-height: 118px;
}
.an-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.an-stat-green::before { background: var(--green); }
.an-stat-teal::before { background: #2dd4bf; }
.an-stat-amber::before { background: var(--amber); }
.an-stat-n {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.an-stat-l { margin-top: 8px; font-size: 13px; font-weight: 650; }
.an-stat-s { margin-top: 4px; font-size: 12px; color: var(--muted); }

.an-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.an-juris-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.an-juris-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-weight: 650;
}
.an-juris-top strong { font-size: 22px; letter-spacing: -0.03em; }
.an-juris-track {
  height: 8px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  margin-bottom: 8px;
}
.an-juris-fill { height: 100%; border-radius: 99px; min-width: 2px; }
.an-juris-fill.la { background: var(--accent); }
.an-juris-fill.sm { background: #2dd4bf; }

.an-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.an-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px 16px;
  margin-bottom: 14px;
}
.an-grid-2 .an-card { margin-bottom: 0; }
.an-card-head { margin-bottom: 16px; }
.an-card-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.an-card-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.an-pipeline { display: flex; flex-direction: column; gap: 12px; }
.an-pipe-meta, .an-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 6px;
}
.an-pipe-meta span, .an-bar-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.an-pipe-track, .an-bar-track {
  height: 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.an-pipe-fill, .an-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  min-width: 3px;
}
.an-pipe-fill.blue { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.an-pipe-fill.teal { background: linear-gradient(90deg, #0f766e, #2dd4bf); }
.an-pipe-fill.violet { background: linear-gradient(90deg, #6d28d9, #c4b5fd); }

.an-rings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  text-align: center;
}
.an-ring {
  width: 104px;
  height: 104px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), rgba(255,255,255,0.06) 0);
  display: grid;
  place-items: center;
}
.an-ring-email { --ring: #3fb950; }
.an-ring-phone { --ring: #d29922; }
.an-ring-linkedin { --ring: #60a5fa; }
.an-ring-hole {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.an-ring-label { margin-top: 10px; font-size: 13px; font-weight: 650; }

.an-roles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.an-role {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px 12px;
}
.an-role-pct { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; }
.an-role-name { margin-top: 4px; font-size: 13px; font-weight: 650; }
.an-ticks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.an-tick {
  font-size: 11px;
  color: var(--muted);
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
  padding: 3px 7px;
}
.an-tick.on { color: #dbeafe; background: var(--accent-soft); }

.an-bars { display: flex; flex-direction: column; gap: 11px; }

.an-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.an-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 12px;
  color: var(--muted);
}
button.an-chip {
  cursor: pointer;
}

.an-heat { display: flex; flex-direction: column; gap: 6px; }
.an-heat-row {
  display: grid;
  grid-template-columns: 108px repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}
.an-heat-head span { font-size: 11px; color: var(--muted); text-align: center; }
.an-heat-head span:first-child { text-align: left; }
.an-heat-role { font-size: 12px; color: var(--muted); }
.an-heat-cell {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  background: rgba(45, 212, 191, calc(0.08 + var(--t) * 0.45));
  color: #ecfeff;
  border: 1px solid rgba(45, 212, 191, calc(0.12 + var(--t) * 0.35));
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.an-click {
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
button.an-stat, button.an-juris-card { width: 100%; appearance: none; }
button.an-pipe, button.an-bar, button.an-ring-wrap, button.an-role-main,
button.an-heat-role, button.an-leg, button.an-month, button.an-col {
  background: transparent;
  border: 0;
  padding: 0;
}
button.an-pipe, button.an-bar { width: 100%; }
button.an-heat-role {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
}
.an-click:hover, .an-tile:hover, .an-slice:hover { filter: brightness(1.08); }
.an-click.is-on, .an-role.is-on, .an-chip.is-on, .an-heat-cell.is-on, .an-tile.is-on, .an-leg.is-on {
  outline: 1px solid rgba(96, 165, 250, 0.7);
  outline-offset: 1px;
}
.an-stat.is-on, .an-juris-card.is-on { outline-offset: -1px; }

.an-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.an-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.an-filter-clear {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.an-card-head.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.an-seg { display: flex; gap: 4px; background: var(--panel-2); padding: 3px; border-radius: 999px; border: 1px solid var(--border); }
.an-seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.an-seg-btn.active { background: var(--accent-soft); color: var(--text); }

.an-waffle {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}
.an-tile {
  aspect-ratio: 1;
  border: 0;
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  min-height: 18px;
}
.an-tile-enrich { background: #c4b5fd; }
.an-tile-contacts { background: #2dd4bf; }
.an-tile-roles { background: #3b82f6; }
.an-tile-opendata { background: #334155; }
.an-legend, .an-legend-col {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.an-legend-col { flex-direction: column; }
.an-leg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  text-align: left;
}
.an-leg i.an-tile { width: 12px; height: 12px; min-height: 12px; border-radius: 3px; pointer-events: none; }
.an-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.an-cols {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 160px;
}
.an-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 160px;
  justify-content: flex-end;
}
.an-col-n { font-size: 12px; font-weight: 700; }
.an-col-track {
  width: 100%;
  height: 110px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px 8px 4px 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.an-col-fill {
  width: 100%;
  background: linear-gradient(180deg, #34d399, #0f766e);
  min-height: 2px;
}
.an-col-l { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.25; min-height: 28px; }

.an-timeline {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  overflow-x: auto;
  min-height: 140px;
  padding-bottom: 4px;
}
.an-month {
  flex: 1 0 52px;
  background: transparent;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.an-month-bar {
  width: 100%;
  height: 96px;
  background: var(--panel-2);
  border-radius: 8px 8px 3px 3px;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.an-month-bar span {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, #60a5fa, #1d4ed8);
  min-height: 6px;
}
.an-month-l { font-size: 11px; color: var(--muted); }
.an-month-n { font-size: 12px; font-weight: 700; }

.an-pie-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; }
.an-pie { width: 100%; max-width: 200px; overflow: visible; }
.an-slice { cursor: pointer; stroke: var(--panel); stroke-width: 1.5; }

.an-role-main {
  background: transparent;
  border: 0;
  padding: 0;
  width: 100%;
  text-align: left;
}
.an-role-ladder {
  margin-top: 10px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.an-lad { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
button.an-tick { cursor: pointer; }

.an-reach-dots { display: flex; gap: 5px; align-items: center; }
.an-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.an-dot-email { background: #3fb950; }
.an-dot-phone { background: #d29922; }
.an-dot-li { background: #60a5fa; }

#dashExploreSearch { max-width: 280px; }

.an-views { min-width: 180px; flex: 0 1 220px; }
.an-explore-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.an-pulse {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.an-health-card { margin-bottom: 0; }
.an-health {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.an-health .an-ring { margin: 0 auto; }
.an-health-n { font-size: 13px; font-weight: 700; }
.an-health-s { font-size: 12px; color: var(--muted); margin: 0; }
.an-ring-health { --ring: #2dd4bf; }
.an-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.an-insight {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.an-insight:hover, .an-insight.is-on { border-color: rgba(59, 130, 246, 0.45); background: var(--accent-soft); }
.an-insight-k { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.an-insight-n { font-size: 18px; font-weight: 800; margin: 4px 0 2px; letter-spacing: -0.03em; }
.an-insight-s { font-size: 12px; color: var(--muted); margin: 0; }
.an-insight.amber .an-insight-n { color: var(--amber); }
.an-insight.teal .an-insight-n { color: #2dd4bf; }
.an-insight.violet .an-insight-n { color: #c4b5fd; }
.an-insight.blue .an-insight-n { color: var(--accent); }

.an-conv {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.an-conv-chip {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 5px 10px;
}
.an-conv-chip strong { color: var(--text); font-weight: 700; }

.an-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.an-vs-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.an-vs-card.is-on, .an-vs-card:hover { border-color: rgba(59, 130, 246, 0.45); }

#dashExploreTable tbody tr.an-click { cursor: pointer; }
#dashExploreTable tbody tr.an-click:hover td,
#dashExploreTable tbody tr.is-on td { background: rgba(59, 130, 246, 0.08); }
.an-vs-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.an-vs-top strong { font-size: 22px; }
.an-vs-row { display: grid; grid-template-columns: 110px 1fr 42px; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 12px; }
.an-vs-track { height: 7px; border-radius: 99px; background: rgba(255,255,255,0.05); overflow: hidden; }
.an-vs-fill { height: 100%; border-radius: 99px; }
.an-vs-fill.la { background: linear-gradient(90deg, #1d4ed8, #60a5fa); }
.an-vs-fill.sm { background: linear-gradient(90deg, #0f766e, #2dd4bf); }

.an-scatter { min-height: 240px; }
.an-scatter svg { width: 100%; height: 240px; display: block; }
.an-scatter-dot { cursor: pointer; stroke: var(--panel); stroke-width: 1; }
.an-scatter-dot:hover { stroke: #fff; stroke-width: 2; }
.an-scatter-axis { fill: var(--muted); font-size: 10px; }

.an-queue { display: flex; flex-direction: column; gap: 6px; min-height: 220px; }
.an-q-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  text-align: left;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.an-q-item:hover, .an-q-item.is-on { border-color: rgba(59, 130, 246, 0.4); background: var(--accent-soft); }
.an-q-title { font-size: 13px; font-weight: 700; }
.an-q-sub { font-size: 12px; color: var(--muted); }
.an-q-val { font-size: 13px; font-weight: 700; color: #2dd4bf; }

.an-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
}
.an-drawer.hidden { display: none; }
.an-drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.55);
}
.an-drawer-panel {
  position: relative;
  width: min(440px, 100%);
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--border);
  overflow: auto;
  padding: 22px 22px 32px;
  box-shadow: -16px 0 40px rgba(0,0,0,0.35);
}
body.cc-modal-open { overflow: hidden; }
.an-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.an-drawer-head h2 { margin: 4px 0 0; font-size: 20px; }
.an-drawer-body { display: flex; flex-direction: column; gap: 14px; }
.an-dl { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; font-size: 13px; }
.an-dl dt { color: var(--muted); }
.an-party {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
}
.an-party-role { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.an-party-name { font-weight: 700; margin-top: 2px; }
.an-party-flags { display: flex; gap: 6px; margin-top: 6px; }
.an-score-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-top: 8px;
}
.an-score-fill { height: 100%; background: linear-gradient(90deg, #1d4ed8, #2dd4bf); }

kbd {
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 5px;
  padding: 1px 6px;
}

@media (max-width: 1100px) {
  .an-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .an-pie-wrap { grid-template-columns: 1fr; }
  .an-pulse, .an-compare { grid-template-columns: 1fr; }
  .an-insights { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .an-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .an-hero, .an-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-split, .an-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .an-hero, .an-roles, .an-rings { grid-template-columns: 1fr; }
  .an-heat-row { grid-template-columns: 84px repeat(3, minmax(0, 1fr)); }
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-height: 92px;
}
.kpi .n { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.kpi .l { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi.green .n { color: var(--green); }
.kpi.amber .n { color: var(--amber); }
.kpi.red .n { color: var(--red); }
.kpi.blue .n { color: var(--accent); }

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.dash-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.bar-chart { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 40px; gap: 10px; align-items: center; }
.bar-label { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track {
  height: 8px;
  background: var(--panel-2);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.bar-fill { height: 100%; background: var(--accent); border-radius: 20px; min-width: 2px; }
.bar-fill.green { background: var(--green); }
.bar-fill.amber { background: var(--amber); }
.bar-fill.red { background: var(--red); }
.bar-count { font-size: 12px; font-weight: 700; text-align: right; }

.rank-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow: auto; }
.rank-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid transparent;
}
.rank-n { font-size: 11px; color: var(--muted); font-weight: 700; }
.rank-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-count { font-size: 13px; font-weight: 700; color: var(--accent); }

.dash-toolbar { margin: 0; }
.dash-toolbar select { width: auto; min-width: 160px; }
.dash-table-wrap { max-height: 520px; margin-top: 4px; }
.badge:not(.ok):not(.no):not(.out) { background: rgba(138,160,180,0.15); color: var(--muted); }

/* Fill wizard panels */
.fill-panels { max-width: 1100px; }
.steps {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 16px;
}
.step {
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  font-size: 13px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel);
}
.step span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--panel-2);
  color: var(--muted); font-size: 12px; font-weight: 700;
}
.step.active { color: var(--text); border-color: var(--accent); }
.step.active span { background: var(--accent); color: white; }
.step.complete span { background: var(--green); color: white; }

.panel {
  display: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.panel.active { display: block; animation: fade 0.2s ease; }
.panel h2 { margin: 0 0 6px; font-size: 18px; }

.dropzone {
  margin-top: 18px; border: 2px dashed var(--border); border-radius: 14px;
  padding: 48px; text-align: center; cursor: pointer; transition: 0.15s;
  background: var(--panel-2);
}
.dropzone.hover { border-color: var(--accent); background: #1a2a3d; }
.dz-icon { font-size: 40px; color: var(--accent); }
.link { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

.status { margin-top: 16px; padding: 12px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); }
.status.ok { border-color: var(--green); }
.status.err { border-color: var(--red); color: #ffb4ae; }

.totals { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 18px; }
.totcard { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; min-width: 120px; }
.totcard .n { font-size: 24px; font-weight: 800; }
.totcard .l { font-size: 12px; color: var(--muted); }
.totcard.good .n { color: var(--green); }
.totcard.warn .n { color: var(--amber); }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=search] { flex: 1; min-width: 220px; }
.spacer { flex: 1; }
.selcount { color: var(--muted); font-size: 13px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

input[type=text], input[type=search], input[type=number], input[type=password], input[type=tel], input[type=email], select, textarea {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; border-radius: 9px; font: inherit; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

.table-wrap { max-height: 460px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; background: var(--panel-2); text-align: left;
  padding: 10px 12px; border-bottom: 1px solid var(--border); z-index: 1;
}
tbody td { padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: top; }
tbody tr:hover { background: rgba(47,129,247,0.06); }
tr.blocked-row { opacity: 0.5; }
.c-check { width: 42px; text-align: center; }
.c-row { width: 60px; color: var(--muted); }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.badge.ok { background: rgba(46,160,67,0.18); color: #6fdd8b; }
.badge.no { background: rgba(210,153,34,0.18); color: #e3b341; }
.badge.out { background: rgba(248,81,73,0.15); color: #ff9c94; }

.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 10px; cursor: pointer; font: inherit; transition: 0.15s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary, .btn.active { background: var(--accent); border-color: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn.danger { background: transparent; border-color: var(--red); color: #ff9c94; }
.btn.danger:hover { background: rgba(248,81,73,0.12); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.nav-buttons { display: flex; justify-content: space-between; margin-top: 20px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form-grid label input, .form-grid label select, .form-grid label textarea { margin-top: 2px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row input { flex: 1; }
.input-row .btn { white-space: nowrap; }
.advanced { margin-top: 18px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; }
.advanced summary { cursor: pointer; color: var(--muted); }
.run-summary { margin-top: 18px; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; }
.resume-banner {
  margin-top: 16px; padding: 14px 16px; background: rgba(210,153,34,0.08);
  border: 1px solid rgba(210,153,34,0.35); border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.resume-banner strong { display: block; margin-bottom: 4px; }
.resume-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.progress-head { display: flex; align-items: center; gap: 14px; margin: 10px 0; }
.progbar { flex: 1; height: 14px; background: var(--panel-2); border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.progfill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #57a6ff); transition: width 0.3s; }
.progtext { font-size: 13px; color: var(--muted); min-width: 160px; }
.proxy-line { font-size: 12px; color: var(--muted); margin-bottom: 12px; min-height: 16px; }

.analysis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.acard { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.acard .n { font-size: 28px; font-weight: 800; }
.acard .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.acard.green .n { color: var(--green); }
.acard.amber .n { color: var(--amber); }
.acard.red .n { color: var(--red); }
.acard.blue .n { color: var(--accent); }

.ladbs-links-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: var(--panel-2); position: sticky; top: 0; z-index: 2;
}
.ladbs-links-bar .btn { padding: 7px 12px; font-size: 12px; }
tr.result-row { cursor: pointer; }
tr.result-row.selected { background: rgba(47,129,247,0.14); outline: 1px solid rgba(47,129,247,0.35); }
.btn.linkish {
  background: transparent; border: 1px solid var(--border); color: var(--accent);
  padding: 4px 8px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 11px;
}
.btn.linkish:hover { border-color: var(--accent); background: rgba(47,129,247,0.1); }
.btn.linkish:disabled { opacity: 0.35; cursor: not-allowed; }
.c-links { white-space: nowrap; }
.logbox { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; }
.logbox summary { cursor: pointer; color: var(--muted); }
#log { max-height: 240px; overflow: auto; font-family: Consolas, monospace; font-size: 12px; color: #b8c7d6; white-space: pre-wrap; margin: 8px 0 0; }

@media (max-width: 1100px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .app-nav {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .nav-footer { margin-top: 12px; }
  .shell-main { padding: 20px 16px 48px; }
  .bar-row { grid-template-columns: 90px 1fr 32px; }
}

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 22px; }
}

/* ========== Extracting LA projects ========== */
.extract-hero { margin-bottom: 18px; }
.extract-hero .page-lead { max-width: 520px; }
.block-title { margin: 0; font-size: 16px; }

input[type=date] {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; border-radius: 9px; font: inherit; outline: none; width: 100%;
}
input[type=date]:focus { border-color: var(--accent); }

.extract-stages {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.extract-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.extract-stage:hover:not(:disabled) { color: var(--text); border-color: rgba(59,130,246,0.45); }
.extract-stage.active {
  color: var(--text);
  border-color: rgba(59,130,246,0.55);
  background: var(--accent-soft);
}
.extract-stage:disabled { opacity: 0.4; cursor: not-allowed; }
.extract-stage-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel-2); color: var(--muted);
  font-size: 12px; font-weight: 700;
}
.extract-stage.active .extract-stage-num { background: var(--accent); color: white; }
.extract-stage-label { font-size: 13px; font-weight: 650; }

.extract-stage-panel { display: none; }
.extract-stage-panel.active { display: block; animation: fade 0.18s ease; }

.extract-search-card { padding: 18px 20px; }
.extract-search-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.extract-search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  width: 100%;
}
.extract-search-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.extract-search-side {
  display: grid;
  grid-template-columns: 150px 90px;
  gap: 10px;
}
.extract-search-side label,
.extract-search-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.extract-search-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.extract-refine-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
@media (min-width: 980px) {
  .extract-refine-layout:has(> .extract-advanced[open]):has(> .extract-sources[open]) {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: start;
  }
}

.extract-advanced {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}
.extract-advanced summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  list-style: none;
  user-select: none;
}
.extract-advanced summary:hover { background: rgba(255, 255, 255, 0.03); }
.extract-advanced summary::-webkit-details-marker { display: none; }
.extract-advanced summary::before {
  content: '';
  width: 6px;
  height: 6px;
  margin: 0 4px 1px 0;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  flex-shrink: 0;
}
.extract-advanced[open] summary::before {
  margin-bottom: 3px;
  transform: rotate(45deg);
}
.extract-advanced[open] summary { border-bottom: 1px solid var(--border); }
.extract-advanced-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.extract-advanced-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px 16px 16px;
}

.source-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding: 10px;
}
.extract-refine-layout:has(> .extract-advanced[open]):has(> .extract-sources[open]) .source-list {
  max-height: min(52vh, 460px);
}
@media (min-width: 980px) {
  .extract-refine-layout:not(:has(> .extract-advanced[open])):has(> .extract-sources[open]) .source-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
.source-link {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid transparent;
}
.source-link:hover { border-color: var(--border); }
.source-link-kind {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.source-link-title { font-size: 13px; line-height: 1.35; }

.filter-block { margin: 0; }
.filter-block + .filter-block {
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.filter-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.filter-block-head strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-any {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.filter-any input { accent-color: var(--accent); margin: 0; }
.filter-any:hover { color: var(--text); }
.filter-any:has(input:checked) {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(59, 130, 246, 0.4);
}
.filter-block:has(.filter-any input:checked) .chip-grid {
  opacity: 0.38;
  pointer-events: none;
}

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.chip input {
  appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: transparent;
}
.chip:hover {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.35);
}
.chip:has(input:checked) {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.5);
  background: var(--accent-soft);
}
.chip:has(input:checked) input {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='white' d='M10.1 2.6 4.6 8.8 1.9 6.1l-.9.9 3.6 3.6 6.4-7.2z'/></svg>");
  background-size: 9px 9px;
  background-repeat: no-repeat;
  background-position: center;
}

.extract-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin: 18px 0 12px;
}
.extract-results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.extract-table-card {
  padding: 0;
  overflow: hidden; /* clip outer radius only */
}
.extract-table-wrap {
  max-height: min(60vh, 560px);
  margin: 0;
  border: none;
  border-radius: 0;
  overflow: auto; /* must scroll the project list */
  -webkit-overflow-scrolling: touch;
}
.permit-code { font-size: 12px; }
.cell-strong { font-weight: 650; }
.cell-work { font-size: 12px; color: var(--text); max-width: 280px; line-height: 1.4; }
.work-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 8px 10px;
}
.work-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  font-weight: 700;
}
.work-text { font-size: 13px; line-height: 1.4; }
.work-alt { margin-top: 6px; line-height: 1.35; }
.status-compare {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.status-compare.changed {
  border-color: rgba(248, 81, 73, 0.4);
  background: rgba(248, 81, 73, 0.08);
}
.status-compare.same {
  border-color: rgba(46, 160, 67, 0.35);
  background: rgba(46, 160, 67, 0.08);
}
.status-compare-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px;
  font-size: 13px;
}
.status-compare-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.type-compare {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.c-open { width: 64px; text-align: right; }

.extract-enrich-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.extract-log-wrap {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--panel);
}
.extract-log-wrap summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.extract-log {
  max-height: 160px;
  overflow: auto;
  margin: 8px 0 0;
  font-family: Consolas, monospace;
  font-size: 12px;
  color: #b8c7d6;
  white-space: pre-wrap;
}

.enrich-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.enrich-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.enrich-card.err { border-color: rgba(248, 81, 73, 0.45); }
.enrich-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.role-block { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.enrich-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.role-line {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px;
  font-size: 13px;
  align-items: start;
}
.role-line > span:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.role-label { color: var(--muted); font-size: 12px; }
.apollo-role-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.apollo-role-btn:hover { color: var(--accent, #2f6fed); }
.apollo-role-btn.has-result { color: var(--accent, #3b82f6); }
.apollo-role-btn.is-loading,
.apollo-role-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  text-decoration: none;
}
.apollo-hit {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
}
.apollo-hit.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent, #3b82f6);
}
.apollo-hit.err {
  color: #ff9c94;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.apollo-view-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.12);
  color: #cfe0ff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.apollo-view-btn:hover { border-color: var(--accent); background: rgba(59, 130, 246, 0.2); }
.apollo-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(47, 111, 237, 0.22);
  border-top-color: var(--accent, #2f6fed);
  animation: contacts-spin 0.8s linear infinite;
  flex-shrink: 0;
}
.enrich-card.is-apollo-loading {
  outline: 2px solid rgba(47, 111, 237, 0.28);
}
.apollo-card-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--accent, #2f6fed);
}
.apollo-card-all-btn { margin-top: 8px; align-self: flex-start; }
.apollo-card-all-btn:disabled { cursor: wait; opacity: 0.65; }
.enrich-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.enrich-card-actions .apollo-card-all-btn,
.enrich-card-actions .websearch-card-all-btn { margin-top: 0; }
.websearch-card-all-btn { margin-top: 8px; align-self: flex-start; }
.websearch-card-all-btn:disabled { cursor: wait; opacity: 0.65; }
.websearch-hit {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
}
.websearch-hit.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #34d399;
}
.websearch-hit.err {
  color: #ff9c94;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.websearch-view-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(16, 185, 129, 0.12);
  color: #bbf7d0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.websearch-view-btn:hover { border-color: #34d399; background: rgba(16, 185, 129, 0.2); }
.enrich-card.is-websearch-loading {
  outline: 2px solid rgba(16, 185, 129, 0.28);
}
.websearch-card-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: #34d399;
}
.websearch-facts {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.websearch-facts li { font-size: 13px; }
.websearch-sources {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.apollo-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(6px);
}
.apollo-popup {
  width: min(920px, 100%);
  max-height: min(86vh, 920px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.apollo-popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.apollo-popup-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.apollo-popup-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}
.apollo-popup-head p { margin: 4px 0 0; }
.apollo-popup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.apollo-popup-close {
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.apollo-popup-close:hover { border-color: var(--accent); }
.apollo-popup-body {
  overflow: auto;
  padding: 18px 20px 22px;
}
.apollo-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.apollo-hero-photo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.apollo-hero-name {
  font-size: 20px;
  font-weight: 700;
}
.apollo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.apollo-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #cfe0ff;
  text-decoration: none;
  font-size: 12px;
}
.apollo-chip:hover { border-color: var(--accent); }
.apollo-modal-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.apollo-panel {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
}
.apollo-panel h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.apollo-panel-wide { grid-column: 1 / -1; }
.apollo-kv { margin: 0; display: grid; gap: 0; }
.apollo-kv .apollo-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.apollo-kv .apollo-row:last-child { border-bottom: 0; }
.apollo-kv .apollo-row dt,
.apollo-kv .apollo-row > span:first-child { color: var(--muted); font-weight: 500; }
.apollo-kv .apollo-row dd,
.apollo-kv .apollo-row > span:last-child { margin: 0; word-break: break-word; }
.apollo-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.apollo-person-card {
  background: var(--bg-elev, var(--bg));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.apollo-modal-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 32px 8px;
  color: var(--muted);
}
.apollo-modal-state.err { color: #ff9c94; }
@media (max-width: 760px) {
  .apollo-modal-cols { grid-template-columns: 1fr; }
  .apollo-popup-overlay { padding: 12px; }
}
.monitor-flag {
  font-size: 12px;
  color: var(--amber);
  border: 1px solid rgba(210, 153, 34, 0.35);
  background: rgba(210, 153, 34, 0.08);
  border-radius: 8px;
  padding: 6px 8px;
}

.extract-exports-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  align-items: start;
}
.extract-exports-side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
#extractExportsList { max-height: 520px; }
.extract-exports-main { min-height: 320px; }
.extract-empty {
  text-align: center;
  padding: 48px 20px;
}
.extract-empty h3 { margin: 0 0 8px; font-size: 16px; }
.export-view-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.export-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.contacts-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px 24px;
  flex-wrap: wrap;
}
.contacts-copy { max-width: 560px; }
.contacts-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.contacts-wait {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.contacts-wait.busy { color: var(--text); }
.contacts-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: contacts-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes contacts-spin {
  to { transform: rotate(360deg); }
}
.contacts-result { padding: 16px 20px; margin-top: 12px; }
.contacts-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.contacts-stat {
  min-width: 110px;
}
.contacts-stat .n { font-size: 22px; font-weight: 700; }
.contacts-stat .l { font-size: 12px; color: var(--muted); }

@media (max-width: 980px) {
  .extract-search-toolbar { grid-template-columns: 1fr; }
  .extract-search-side { grid-template-columns: 1fr 1fr; }
  .extract-refine-layout,
  .extract-refine-layout:has(> .extract-advanced[open]):has(> .extract-sources[open]) {
    grid-template-columns: 1fr;
  }
  .extract-exports-layout { grid-template-columns: 1fr; }
  .contacts-actions { align-items: flex-start; }
}
@media (max-width: 720px) {
  .extract-search-side { grid-template-columns: 1fr; }
  .source-link { grid-template-columns: 1fr; gap: 2px; }
}

/* ========== Central Control ========== */
.cc-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.cc-stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.cc-stat-n { font-size: 22px; font-weight: 750; letter-spacing: -0.03em; }
.cc-stat-l { margin-top: 4px; font-size: 13px; font-weight: 650; }
.cc-stat-s { margin-top: 2px; }
.cc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.cc-search { flex: 1; min-width: 220px; }
.cc-search input, .cc-toolbar select, .cc-track, .cc-notes select, .cc-notes textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.cc-filters { display: flex; gap: 6px; }
.cc-table-card { padding: 0; overflow: hidden; }
.cc-table-card table { width: 100%; border-collapse: collapse; }
.cc-table-card th, .cc-table-card td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cc-table-card tbody tr { cursor: pointer; }
.cc-table-card tbody tr:hover, .cc-table-card tbody tr.is-on { background: rgba(59, 130, 246, 0.08); }
.cc-roles { display: grid; gap: 2px; font-size: 12px; line-height: 1.35; min-width: 160px; }
.cc-role-k {
  display: inline-block;
  min-width: 2.4em;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cc-track { min-width: 110px; }
.cc-stage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.cc-run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.cc-run-actions .btn { font-size: 13px; }
.cc-bulk {
  margin: 0 0 16px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}
.cc-bulk-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.cc-bulk-copy p { margin: 0; }
.cc-check-col {
  width: 36px;
  text-align: center;
  vertical-align: middle !important;
}
.cc-check-col input {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
}
.cc-table-card tbody tr.is-checked {
  background: rgba(27, 54, 93, 0.07);
}
.cc-batch-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}
.cc-batch-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b365d, #3b82f6);
  transition: width 0.35s ease;
}
.cc-sync-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
.cc-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.cc-role-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.cc-search-roles {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cc-search-role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.03);
}
.cc-search-details { margin: 0 0 12px; }
.cc-hit-list {
  display: grid;
  gap: 12px;
  margin: 8px 0 16px;
}
.cc-hit-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  padding: 12px 14px 14px;
}
.cc-hit-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.cc-hit-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.cc-hit-summary {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
}
.cc-hit-card .apollo-hero { margin-bottom: 12px; }
.cc-hit-card .apollo-hero-name { font-size: 17px; }
.cc-hit-card .apollo-modal-cols {
  grid-template-columns: 1fr;
  gap: 10px;
}
.cc-hit-card .apollo-panel { padding: 12px; }
.cc-hit-card .apollo-modal-state { padding: 6px 0 2px; }
.cc-details-pre {
  margin: 0 0 8px;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.cc-notes { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.cc-notes textarea { min-height: 92px; resize: vertical; }
.btn.danger { background: rgba(248,81,73,0.16); color: #ff9c94; border-color: transparent; }
.btn.danger:hover { filter: brightness(1.08); }

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 32px;
}
.cc-modal.hidden { display: none; }
.cc-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 18, 0.74);
  backdrop-filter: blur(8px);
}
.cc-modal-panel {
  position: relative;
  width: min(1180px, 100%);
  height: min(90vh, 940px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 280px at 8% -10%, rgba(59, 130, 246, 0.16), transparent 55%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  overflow: hidden;
  animation: ccModalIn 0.18s ease-out;
}
@keyframes ccModalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.cc-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cc-modal-head-main { min-width: 0; }
.cc-modal-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cc-modal-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.cc-modal-track-pill {
  display: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: capitalize;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.cc-modal-track-pill.is-on { display: inline-flex; }
.cc-modal-track-pill.track-active {
  color: #cfe0ff;
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.14);
}
.cc-modal-track-pill.track-watching {
  color: #f3d48a;
  border-color: rgba(210, 153, 34, 0.4);
  background: rgba(210, 153, 34, 0.12);
}
.cc-modal-track-pill.track-done {
  color: #b7f0c4;
  border-color: rgba(63, 185, 80, 0.4);
  background: rgba(63, 185, 80, 0.12);
}
.cc-modal-track-pill.track-skipped {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}
.cc-modal-head h2 {
  margin: 6px 0 0;
  font-size: 26px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.cc-modal-addr {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.cc-modal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
#ccDrawerPermitLink { white-space: nowrap; }
.cc-modal-close {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.cc-modal-close:hover { border-color: var(--accent); background: var(--accent-soft); }
.cc-modal-body {
  overflow: auto;
  padding: 18px 22px 20px;
  min-height: 0;
  flex: 1;
}
.cc-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 22px 14px;
  border-top: 1px solid var(--border);
  background: rgba(20, 32, 44, 0.96);
  flex-shrink: 0;
}
.cc-modal-footer-main,
.cc-modal-footer-side {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cc-modal-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.15fr);
  gap: 18px;
  align-items: start;
}
.cc-modal-col {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.cc-modal-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.cc-modal-fact {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  min-width: 0;
}
.cc-modal-fact-k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.cc-modal-fact-v {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}
.cc-modal-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.cc-modal-card h3,
.cc-modal-card .block-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.cc-modal-work {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  max-height: 7.8em;
  overflow: auto;
}
.cc-pipe {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.cc-pipe-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  min-width: 0;
}
.cc-pipe-card .muted { margin-bottom: 6px; }
.cc-pipe-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.cc-run-meta {
  margin: 8px 0 0;
  min-height: 1.2em;
}
.cc-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.cc-role-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  min-width: 0;
}
.cc-role-card-k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.cc-role-card-name {
  margin-top: 5px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}
.cc-role-card-co,
.cc-role-card-contact {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}
.cc-role-card-contact a { color: var(--accent); text-decoration: none; }
.cc-role-card-contact a:hover { text-decoration: underline; }
.cc-modal-empty {
  margin: 0;
  padding: 10px 0 2px;
}
.cc-modal .cc-hit-list { margin: 8px 0 0; }
.cc-modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 980px) {
  .cc-modal { padding: 12px; }
  .cc-modal-panel { height: min(94vh, 940px); }
  .cc-modal-layout,
  .cc-modal-facts,
  .cc-pipe { grid-template-columns: 1fr; }
  .cc-modal-head h2 { font-size: 22px; }
}
@media (max-width: 980px) {
  .cc-stats { grid-template-columns: 1fr 1fr; }
}

/* ========== Project Calling ========== */
#page-calling { max-width: 1280px; }
#page-calling .page-lead { max-width: 640px; }
.call-demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: rgba(210, 153, 34, 0.08);
  border-color: rgba(210, 153, 34, 0.35);
}
.call-demo-banner.ok {
  background: rgba(45, 212, 191, 0.08);
  border-color: rgba(45, 212, 191, 0.35);
}
.call-demo-banner.ok #callRetellHint {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
.call-sandbox { margin-bottom: 18px; padding: 0; overflow: hidden; }
.call-open-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.call-open-card p { margin: 4px 0 0; max-width: 640px; }
.call-analysis {
  margin: 0 0 16px;
  padding: 16px 18px 18px;
}
.call-analysis-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.call-analysis-head h2 { margin: 0 0 4px; font-size: 18px; }
.call-analysis-head p { margin: 0; max-width: 720px; }
.call-analysis-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.call-an-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.call-an-chip strong { font-variant-numeric: tabular-nums; }
.call-an-chip span { color: var(--muted); font-size: 12px; }
.call-an-chip.is-on,
.call-an-chip:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: var(--accent-soft);
}
.call-analysis-empty { margin: 0; padding: 8px 2px 4px; }
.call-analysis-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.call-an-col {
  background: rgba(8, 14, 22, 0.35);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  min-width: 0;
}
.call-an-col.is-on { border-color: rgba(59, 130, 246, 0.45); }
.call-an-col.tone-ok { border-color: rgba(45, 212, 191, 0.28); }
.call-an-col.tone-warm { border-color: rgba(210, 153, 34, 0.32); }
.call-an-col.tone-stop { border-color: rgba(248, 113, 113, 0.35); }
.call-an-col-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 6px 6px 10px;
}
.call-an-col-head h3 { margin: 0 0 4px; font-size: 15px; }
.call-an-col-head p { margin: 0; }
.call-an-count {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.call-an-list { display: grid; gap: 8px; }
.call-an-card {
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px 10px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.call-an-card:hover { border-color: rgba(59, 130, 246, 0.4); background: var(--accent-soft); }
.call-an-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.call-an-addr { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.call-an-interest { margin-top: 6px; }
.call-an-next {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.22);
  font-size: 13px;
  line-height: 1.4;
}
@media (max-width: 720px) {
  .call-analysis-board { grid-template-columns: 1fr; }
}
.call-workbench {
  padding: 0;
  overflow: hidden;
  margin: 0 0 16px;
}
.call-dock {
  display: grid;
  gap: 12px;
  padding: 16px 18px 14px;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.08), transparent 88%),
    var(--panel);
  border-bottom: 1px solid var(--border);
}
.call-dock.has-selection {
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.16), transparent 90%),
    var(--panel);
}
.call-dock.is-running {
  background:
    linear-gradient(180deg, rgba(210, 153, 34, 0.14), transparent 90%),
    var(--panel);
}
.call-dock-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px 16px;
  align-items: center;
}
.call-dock-count {
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(8, 14, 22, 0.45);
  border: 1px solid var(--border);
  text-align: center;
  line-height: 1.1;
}
.call-dock.has-selection .call-dock-count {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.16);
}
.call-dock.is-running .call-dock-count {
  border-color: rgba(210, 153, 34, 0.45);
  background: rgba(210, 153, 34, 0.14);
}
.call-dock-count strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.call-dock-count span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.call-dock-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 750;
}
.call-dock-copy p { margin: 0; max-width: 46rem; }
.call-dock-run {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.call-dock-run .btn { font-size: 13px; }
.call-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.cc-role-card .btn { margin-top: 8px; }
.call-dock-phone {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 10px 16px;
  align-items: end;
}
.call-batch-phone { display: flex; flex-direction: column; gap: 6px; }
.call-batch-phone input { width: 100%; }
.call-dock-phone #callBatchMeta { margin: 0; padding-bottom: 4px; }
.call-queue {
  margin: 0;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 14, 22, 0.28);
}
.call-queue-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.call-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.call-queue-head h2 { margin: 0 0 4px; font-size: 18px; }
.call-queue-head p { margin: 0; }
.call-queue-meters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.call-queue-meter {
  min-width: 64px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  text-align: center;
}
.call-queue-meter b {
  display: block;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.call-queue-meter span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.call-queue-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
  margin: 0 0 12px;
}
.call-queue-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #57a6ff);
  transition: width 0.35s ease;
}
.call-queue.is-running .call-queue-bar {
  background: linear-gradient(90deg, #d29922, #f0c14b);
}
.call-queue-live {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(210, 153, 34, 0.4);
  background: rgba(210, 153, 34, 0.1);
  border-radius: 14px;
}
.call-now {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.call-now-pulse {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: #e3b341;
  box-shadow: 0 0 0 0 rgba(227, 179, 65, 0.7);
  animation: callPulse 1.4s ease-out infinite;
  flex-shrink: 0;
}
.call-now-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e3b341;
}
.call-queue-live p { margin: 4px 0 0; }
.call-queue-live-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.call-queue-list {
  display: grid;
  gap: 0;
  max-height: min(36vh, 320px);
  overflow: auto;
}
.call-queue-item {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 14px minmax(0, 1fr) auto;
  gap: 0 10px;
  align-items: stretch;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 10px 4px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  position: relative;
}
.call-queue-item + .call-queue-item { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.call-queue-item:hover { background: rgba(59, 130, 246, 0.08); }
.call-queue-index {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  z-index: 1;
}
.call-queue-rail {
  width: 2px;
  min-height: 100%;
  margin: 4px auto 0;
  background: var(--border);
  border-radius: 99px;
  align-self: stretch;
}
.call-queue-item:last-child .call-queue-rail { background: transparent; }
.call-queue-item.is-preparing .call-queue-index,
.call-queue-item.is-calling .call-queue-index,
.call-queue-item.is-in_call .call-queue-index {
  border-color: rgba(210, 153, 34, 0.55);
  color: #e3b341;
  box-shadow: 0 0 0 4px rgba(210, 153, 34, 0.12);
}
.call-queue-item.is-done .call-queue-index {
  border-color: rgba(63, 185, 80, 0.45);
  color: #6fdd8b;
}
.call-queue-item.is-failed .call-queue-index {
  border-color: rgba(248, 113, 113, 0.45);
  color: #ff9c94;
}
.call-queue-item.is-analyzing .call-queue-index {
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}
.call-queue-item-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
}
.call-q-status {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 9px 4px 8px;
  border-radius: 999px;
  background: rgba(138, 160, 180, 0.12);
  color: var(--muted);
  white-space: nowrap;
}
.call-q-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.call-q-status.is-live {
  background: rgba(210, 153, 34, 0.16);
  color: #e3b341;
}
.call-q-status.is-live i { animation: callPulse 1.2s ease-out infinite; }
.call-q-status.is-done { background: rgba(46, 160, 67, 0.16); color: #6fdd8b; }
.call-q-status.is-failed { background: rgba(248, 81, 73, 0.15); color: #ff9c94; }
.call-q-status.is-wait { background: rgba(59, 130, 246, 0.16); color: #93c5fd; }
.call-q-status.is-stop { background: rgba(248, 113, 113, 0.1); color: #ffb4ae; }
#callTable .cc-check-col input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
#callTable tbody tr.is-checked td {
  background: rgba(59, 130, 246, 0.1);
}
#callTable tbody tr.is-checked td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}
@keyframes callPulse {
  0% { box-shadow: 0 0 0 0 rgba(227, 179, 65, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(227, 179, 65, 0); }
  100% { box-shadow: 0 0 0 0 rgba(227, 179, 65, 0); }
}
@media (max-width: 900px) {
  .call-dock-top,
  .call-dock-phone { grid-template-columns: 1fr; }
  .call-dock-run { justify-content: flex-start; }
  .call-queue-head { flex-direction: column; }
  .call-queue-meters { justify-content: flex-start; }
  .call-queue-live { flex-direction: column; align-items: stretch; }
}
.call-project-panel {
  width: min(1180px, 100%);
  height: min(90vh, 940px);
}
.call-pop-panel {
  background:
    radial-gradient(900px 240px at 6% -12%, rgba(59, 130, 246, 0.18), transparent 52%),
    var(--panel);
}
.call-pop-head {
  padding: 18px 22px 14px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), transparent 90%);
}
.call-pop-head h2 {
  font-size: 22px;
  max-width: 46rem;
  overflow-wrap: anywhere;
}
.call-pop-head .permit-code {
  display: inline;
  font-size: 13px;
}
.call-pop-footer {
  background: rgba(11, 18, 25, 0.92);
}
#callProjectDrawer .call-sandbox-col.call-pop-main,
#ccDrawer .call-sandbox-col.call-pop-main {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 16px 18px 22px;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.05), transparent 28%),
    transparent;
}
.call-pop-hero {
  padding: 14px 16px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.1);
  border-radius: 16px;
}
.call-pop-hero-name {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.call-pop-hero p { margin: 6px 0 0; }
.call-pop-live {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(210, 153, 34, 0.4);
  background: rgba(210, 153, 34, 0.1);
}
.call-pop-live strong { display: block; }
.call-pop-live p { margin: 2px 0 0; }
.call-pop-facts { margin: 0; }
.call-pop-pipe {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.call-pop-pipe-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(8, 14, 22, 0.35);
  border: 1px solid var(--border);
  min-width: 0;
}
.call-pop-pipe-item span:first-child {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
#callProjectDrawer .cc-role-card.is-target,
#ccDrawer .cc-role-card.is-target {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: inset 3px 0 0 var(--accent);
}
#callProjectDrawer .call-pop-side,
#ccDrawer .call-pop-side {
  padding: 16px 16px 20px;
  background: rgba(8, 14, 22, 0.42);
}
#callProjectDrawer .call-reports-head,
#ccDrawer .call-reports-head {
  background: transparent;
  align-items: flex-start;
}
#callProjectDrawer .call-reports-head h2,
#ccDrawer .call-reports-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.call-pop-next {
  padding: 14px 16px;
  margin: 0 0 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.call-pop-next strong {
  display: block;
  margin: 2px 0 6px;
  font-size: 16px;
}
.call-pop-next p { margin: 0; font-size: 14px; line-height: 1.45; }
.call-pop-empty {
  padding: 18px 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.call-pop-empty strong { display: block; margin-bottom: 6px; }
.call-pop-report-list { gap: 0; }
.call-pop-report {
  background: transparent;
  border: 0;
  border-radius: 0;
}
.call-pop-report + .call-pop-report { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.call-pop-report-head {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 10px 4px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.call-pop-report-head:hover { background: rgba(59, 130, 246, 0.08); }
.call-pop-report-body {
  display: none;
  padding: 0 4px 14px 42px;
}
.call-pop-report.is-open .call-pop-report-body { display: block; }
.call-pop-report.is-open .call-pop-report-head .call-queue-index {
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}
@media (max-width: 980px) {
  .call-pop-pipe { grid-template-columns: 1fr; }
  .call-pop-live { flex-wrap: wrap; }
}
.call-project-panel > .cc-modal-body.call-sandbox-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}
#ccDrawer .call-sandbox-col.call-pop-main .cc-modal-card h3 {
  margin: 0 0 10px;
}
.call-project-panel .call-sandbox-col { padding: 16px 18px 20px; }
#callSandbox .call-sandbox-col.call-pop-main {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 16px 18px 22px;
}
#callSandbox .call-load-card {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border-color: rgba(59, 130, 246, 0.28);
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.12), transparent 88%),
    rgba(8, 14, 22, 0.28);
}
#callSandbox .call-load-card .call-queue-kicker { margin-bottom: 4px; }
#callSandbox .call-load-card > .muted { margin: 0 0 12px; }
#callSandbox .call-sandbox-hero {
  margin: 0;
}
#callSandbox .call-sandbox-hero .form-grid { margin-top: 10px; }
#callSandbox .call-sandbox-hero input,
#callSandbox .call-sandbox-hero select,
#callSandbox .call-sandbox-dial input,
#callSandbox .call-sandbox-more input,
#callSandbox .call-sandbox-more select,
#callSandbox .call-sandbox-more textarea,
#callSandbox .call-load-card input,
#callSandbox .call-load-card select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
#callSandbox .call-sandbox-dial {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(210, 153, 34, 0.38);
  background: rgba(210, 153, 34, 0.08);
}
#callSandbox .call-sandbox-dial .call-batch-phone { margin-top: 8px; }
#callSandbox .call-sandbox-dial #callDialHint { margin: 8px 0 0; }
#callSandbox .call-sandbox-more {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(8, 14, 22, 0.28);
  margin: 0;
  overflow: hidden;
}
#callSandbox .call-sandbox-more > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  list-style: none;
  user-select: none;
}
#callSandbox .call-sandbox-more > summary::-webkit-details-marker { display: none; }
#callSandbox .call-sandbox-more > summary::after {
  content: 'Show';
  float: right;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
}
#callSandbox .call-sandbox-more[open] > summary {
  border-bottom: 1px solid var(--border);
}
#callSandbox .call-sandbox-more[open] > summary::after { content: 'Hide'; }
#callSandbox .call-sandbox-more .form-grid { padding: 12px 14px 16px; margin: 0; }
#callSandbox .call-scripts {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(8, 14, 22, 0.28);
}
#callSandbox .call-scripts-head h3 { margin: 0 0 4px; font-size: 16px; }
#callSandbox .call-script {
  background: var(--panel);
  border-color: rgba(59, 130, 246, 0.2);
}
#callSandbox .call-pop-side {
  padding: 16px 16px 20px;
  background: rgba(8, 14, 22, 0.42);
}
#callSandbox .call-reports-head {
  background: transparent;
  align-items: flex-start;
}
#callSandbox .call-reports-head h2 { margin: 0 0 4px; font-size: 18px; }
#callSandbox .call-sandbox-report-tools {
  display: grid;
  gap: 8px;
  justify-items: end;
}
#callSandbox .call-sandbox-panel.is-live {
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(210, 153, 34, 0.28);
}
#callSandbox:has(#callHangupBtn:not(.hidden)) #callWebBtn { display: none; }
#callSandbox .call-pop-live { margin-bottom: 14px; }
#callSandbox .call-sandbox-footer {
  flex-wrap: wrap;
  align-items: center;
}
#callSandbox .call-sandbox-footer-meta { flex: 1 1 220px; }
@media (max-width: 980px) {
  #callSandbox .call-load-row { grid-template-columns: 1fr; }
}
.call-sandbox-panel > .cc-modal-body.call-sandbox-split {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.call-sandbox-col {
  overflow: auto;
  padding: 16px 18px 20px;
  min-height: 0;
}
.call-sandbox-reports-col {
  border-left: 1px solid var(--border);
  background: rgba(8, 14, 22, 0.38);
}
.call-sandbox-reports-col .call-reports { margin-top: 0; }
.call-sandbox-reports-col .call-report { background: var(--panel); }
.call-sandbox-reports-col .call-field-grid {
  grid-template-columns: 1fr 1fr;
}
.call-sandbox-footer {
  align-items: flex-end;
}
.call-sandbox-footer-meta {
  flex: 1 1 100%;
  min-width: 0;
}
.call-sandbox-footer-meta #callRunMeta { margin: 0; min-height: 1.2em; }
.call-sandbox-footer .cc-batch-progress { margin-top: 6px; }
.call-load-card {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-2);
}
.call-load-card p { margin: 4px 0 10px; }
.call-load-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) minmax(140px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}
.call-load-row label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.call-scripts { margin: 16px 0; }
.call-scripts-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.call-scripts-head h3 { margin: 0 0 4px; font-size: 16px; }
.call-script-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.call-script {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.call-script h4 { margin: 0 0 6px; font-size: 14px; }
.call-script ol { margin: 8px 0 0; padding-left: 18px; }
.call-script li { margin: 4px 0; font-size: 13px; line-height: 1.4; }
@media (max-width: 980px) {
  .call-load-row, .call-script-list { grid-template-columns: 1fr; }
  .call-sandbox-panel > .cc-modal-body.call-sandbox-split,
  .call-project-panel > .cc-modal-body.call-sandbox-split { grid-template-columns: 1fr; }
  .call-sandbox-reports-col { border-left: 0; border-top: 1px solid var(--border); }
  .call-open-card { flex-direction: column; align-items: flex-start; }
}
.call-sandbox-form fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px 16px;
  margin: 0 0 14px;
}
.call-sandbox-form legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.call-sandbox-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 64px;
  font: inherit;
}
.call-sandbox-form textarea[name="project_roles_json"] {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}
.call-sandbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.call-payload {
  margin: 12px 0 0;
  padding: 12px 14px;
  max-height: 280px;
  overflow: auto;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.call-payload.hidden, .call-payload[hidden] { display: none; }
.call-transcript {
  margin-top: 12px;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.45;
}
.call-reports { margin-top: 22px; }
.call-reports-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  position: static;
  background: transparent;
}
.call-reports-head h2 { margin: 0; font-size: 18px; }
.call-report-list { display: grid; gap: 12px; }
.call-report {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.call-report-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.call-report-head:hover { background: rgba(255, 255, 255, 0.03); }
.call-report-title { font-weight: 700; font-size: 15px; }
.call-report-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.call-report-body {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
}
.call-report.is-open .call-report-body { display: block; }
.call-report-who { margin: 14px 0 12px; }
.call-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.call-field {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
}
.call-field-k {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.call-next {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.call-next p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
@media (max-width: 980px) {
  .call-field-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .call-field-grid { grid-template-columns: 1fr; }
  .call-report-head { flex-direction: column; }
}

body.is-hosted #hostedOutputHint { margin: 8px 0 0; }
body.is-hosted .nav-brand-sub::after {
  content: " · server";
}

.login-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(59,130,246,0.12), transparent 55%),
    var(--bg);
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.login-card {
  width: min(420px, 100%);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.login-title {
  margin: 8px 0 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.login-card input[type=text],
.login-card input[type=password] {
  width: 100%;
  display: block;
  box-sizing: border-box;
}
.login-card .btn.primary {
  display: block;
  width: 100%;
  margin-top: 4px;
}
.login-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.login-mode-btn {
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.login-mode-btn:hover { border-color: var(--accent); }
.login-mode-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
#signOutBtn { width: 100%; }

/* ========== Standard workspace (simpler, separate from Pro) ========== */
.std-body {
  min-height: 100vh;
  margin: 0;
  background: #f4f6f8;
  color: #1c2430;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
  overflow-x: hidden;
}
.std-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 22px;
  background: #fff;
  border-bottom: 1px solid #e6ebf0;
}
.std-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.std-logo {
  font-weight: 800;
  letter-spacing: 0.4px;
  background: #2563eb;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
}
.std-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.std-sub { font-size: 12px; color: #6b7c8d; margin-top: 2px; }
.std-out {
  background: transparent;
  color: #1c2430;
  border: 1px solid #d5dee6;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.std-out:hover { border-color: #2563eb; color: #2563eb; }
.std-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  width: 100%;
  max-width: 100%;
}
.std-nav {
  background: #fff;
  border-right: 1px solid #e6ebf0;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.std-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #1c2430;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.std-nav-item:hover { background: #f8fafc; }
.std-nav-item.active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.std-main {
  background: #f4f6f8;
  padding: 28px 32px;
  min-width: 0;
  overflow-x: hidden;
}
.std-page { display: none; }
.std-page.active { display: block; }
.std-page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1c2430;
}
.std-lead {
  margin: 8px 0 22px;
  color: #5b6b7a;
  font-size: 14px;
  line-height: 1.5;
  max-width: 640px;
}
.std-card {
  background: #fff;
  border: 1px solid #e6ebf0;
  border-radius: 12px;
  padding: 18px 20px 8px;
  margin-bottom: 18px;
}
.std-card-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.std-note {
  margin: 0 0 14px;
  color: #6b7c8d;
  font-size: 13px;
  line-height: 1.45;
}
.std-sheets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.std-sheet h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}
.std-sheet ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: #1c2430;
  font-size: 13px;
  line-height: 1.55;
}
.std-sheet li { white-space: pre-wrap; }
.std-drop {
  background: #fff;
  border: 2px dashed #d5dee6;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  color: #1c2430;
}
.std-drop.hover { border-color: #2563eb; background: #eff6ff; }
.std-drop-icon { font-size: 28px; color: #2563eb; margin-bottom: 8px; }
.std-link {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}
.std-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e6ebf0;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.45;
}
.std-status.ok { border-color: #86efac; background: #f0fdf4; }
.std-status.err { border-color: #fca5a5; background: #fef2f2; }
.std-status.hidden { display: none; }
#page-master-record.active,
#page-calling.active {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100vh - 120px);
  overflow: hidden;
}
.std-page-head { margin-bottom: 14px; flex: 0 0 auto; }
.std-page-head .std-lead { margin-bottom: 0; max-width: none; }
.std-city-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 0 8px;
  max-width: 360px;
}
.std-city-toggle.has-review {
  grid-template-columns: 1.05fr 1.05fr 1.15fr;
  max-width: 560px;
}
.std-table td.std-review-reason {
  white-space: normal;
  max-width: 520px;
  overflow: visible;
  text-overflow: unset;
}
.std-city-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #d5dee6;
  background: #fff;
  color: #5b6b7a;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.std-city-btn:hover { border-color: #2563eb; color: #1c2430; }
.std-city-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.std-page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.std-ladbs {
  flex: 0 0 auto;
  text-align: right;
}
.std-ladbs-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.std-export-btn {
  background: #fff;
  color: #1c2430;
  border: 1px solid #d5dee6;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}
.std-export-btn:hover { border-color: #2563eb; color: #2563eb; }
.std-export-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.std-ladbs-btn {
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}
.std-ladbs-btn:hover { background: #1d4ed8; }
.std-ladbs-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.std-web-btn {
  background: #0f766e;
  color: #fff;
  border: 1px solid #0f766e;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}
.std-web-btn:hover { background: #0d9488; }
.std-web-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.std-stop-btn {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}
.std-stop-btn:hover { background: #fef2f2; border-color: #ef4444; }
.std-stop-btn.hidden { display: none; }
.std-reset-btn {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}
.std-reset-btn:hover { background: #fef2f2; border-color: #ef4444; }
.std-reset-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.is-review-hidden { display: none !important; }
.std-select-hint {
  margin: 8px 0 0;
  color: #5b6b7a;
  font-size: 12px;
  line-height: 1.4;
}
.std-table th.std-check,
.std-table td.std-check {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  text-align: center;
  padding: 6px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8fafc;
}
.std-table td.std-check { background: #fff; }
.std-table tbody tr:nth-child(even) td.std-check { background: #fbfdff; }
.std-table tbody tr:hover td.std-check { background: #eff6ff; }
.std-table tbody tr.is-selected td.std-check { background: #dbeafe; }
.std-table tbody tr.is-selected { background: #eff6ff; }
.std-ladbs-progress {
  margin: 8px 0 0;
  color: #5b6b7a;
  font-size: 13px;
}
.std-ladbs-progress.hidden { display: none; }
.std-table-wrap {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d5dee6;
  border-radius: 10px;
  max-height: calc(100vh - 170px);
}
.std-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 12px;
  color: #1c2430;
}
.std-table th,
.std-table td {
  border: 1px solid #e6ebf0;
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.std-cell-tip {
  position: fixed;
  z-index: 80;
  max-width: min(520px, calc(100vw - 24px));
  padding: 8px 10px;
  background: #1c2430;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.std-cell-tip.is-on {
  opacity: 1;
  visibility: visible;
}
.std-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  font-weight: 700;
  white-space: pre;
}
.std-table tbody tr:nth-child(even) { background: #fbfdff; }
.std-table tbody tr:hover { background: #eff6ff; }
.std-table td.std-ladbs-cell { background: #fef3c7; }
.std-table tbody tr:nth-child(even) td.std-ladbs-cell { background: #fde68a; }
.std-table tbody tr:hover td.std-ladbs-cell { background: #fcd34d; }
.std-table td.std-web-cell { background: #ccfbf1; }
.std-table tbody tr:nth-child(even) td.std-web-cell { background: #99f6e4; }
.std-table tbody tr:hover td.std-web-cell { background: #5eead4; }
.std-ladbs-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: #5b6b7a;
  font-size: 13px;
  line-height: 1.4;
}
.std-ladbs-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  flex: 0 0 auto;
}
.std-web-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #ccfbf1;
  border: 1px solid #0d9488;
  flex: 0 0 auto;
}
.std-table-empty {
  padding: 28px 16px;
  color: #6b7c8d;
  font-size: 14px;
}
.std-table th.std-call-col,
.std-table td.std-call-col {
  position: sticky;
  right: 0;
  z-index: 2;
  max-width: none;
  overflow: visible;
  white-space: nowrap;
  background: #fff;
  box-shadow: -8px 0 10px -8px rgba(15, 23, 42, 0.18);
}
.std-table th.std-call-col { background: #f8fafc; z-index: 3; }
.std-table tbody tr:nth-child(even) td.std-call-col { background: #fbfdff; }
.std-table tbody tr:hover td.std-call-col { background: #eff6ff; }
.std-table tbody tr.is-selected td.std-call-col { background: #eff6ff; }
.std-call-btn {
  background: #0f766e;
  color: #fff;
  border: 0;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.std-call-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.std-call-btn.is-hangup {
  background: #b91c1c;
}
.std-call-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.std-call-modal.hidden { display: none; }
.std-call-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}
.std-call-modal-panel {
  position: relative;
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}
.std-call-modal-panel h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.std-call-modal-lead {
  margin: 8px 0 16px;
  color: #5b6b7a;
  font-size: 13px;
  line-height: 1.45;
}
.std-call-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.std-call-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #d5dee6;
  border-radius: 10px;
  cursor: pointer;
}
.std-call-choice:has(input:checked) {
  border-color: #0f766e;
  background: #f0fdfa;
}
.std-call-choice input { margin-top: 3px; }
.std-call-choice-role { font-weight: 700; color: #1c2430; }
.std-call-choice-meta { color: #5b6b7a; font-size: 13px; margin-top: 2px; }
.std-call-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.std-table-wrap.is-picking {
  outline: 2px solid #0f766e;
  outline-offset: -2px;
}
.std-table-wrap.is-picking .std-table tbody tr {
  cursor: pointer;
}
.std-table-wrap.is-picking .std-table tbody tr:hover {
  background: #ccfbf1;
}
.std-test-project {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e6ebf0;
  border-radius: 10px;
}
.std-test-project strong { display: block; }
.std-test-project span {
  display: block;
  margin-top: 4px;
  color: #5b6b7a;
  font-size: 13px;
}
.std-test-phone {
  display: block;
  margin-bottom: 14px;
}
.std-test-phone span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1c2430;
}
.std-test-phone input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid #d5dee6;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
}
.std-test-phone input:focus {
  outline: 2px solid #99f6e4;
  border-color: #0f766e;
}
.std-test-report {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #d5dee6;
  border-radius: 10px;
  background: #fbfdff;
  max-height: 280px;
  overflow: auto;
}
.std-test-report h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.std-test-fact {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.4;
}
.std-test-fact b { display: inline-block; min-width: 92px; color: #5b6b7a; font-weight: 600; }
.std-test-summary, .std-test-transcript {
  white-space: pre-wrap;
  color: #1c2430;
}
.std-call-modal-panel.std-test-call-panel { width: min(560px, 100%); }
@media (max-width: 860px) {
  .std-sheets { grid-template-columns: 1fr; }
  .std-page-head-row { flex-direction: column; }
  .std-ladbs { text-align: left; }
}
