/* ============================================================
   Lucia — vistas Parte 4
   Database · Explorer · Scrapers · Dictionary · Users · Bot
   ============================================================ */

/* ---------- DATABASE ---------- */
.db-view { display: flex; flex-direction: column; gap: 16px; }
.db-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.db-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.db-tools .search-input { min-width: 200px; flex: 0 0 auto; }
.db-tools .select { width: auto; min-width: 140px; flex: 0 0 auto; }
.scrapers-tools .select { width: auto; min-width: 140px; }
.page-head .select { width: auto; }

.db-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  max-height: calc(100vh - 280px);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
/* Sin bordes verticales — solo separadores horizontales */
.data-table thead th {
  position: sticky; top: 0;
  background: var(--surface-2);
  border-bottom: 2px solid var(--line);
  border-left: none; border-right: none;
  text-align: left;
  padding: var(--pad-cell);
  font-weight: 600; font-size: 11px;
  color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap; z-index: 1;
}
.data-table thead th.is-sortable { cursor: pointer; user-select: none; }
.data-table thead th.is-sortable:hover { color: var(--ink); }
.data-table thead th.is-sorted::after { content: '↑'; margin-left:6px; color:var(--accent-2); }
.data-table thead th.is-sorted.is-desc::after { content: '↓'; }
/* Columnas numéricas alineadas a la derecha con tabular-nums */
.data-table thead th.num-col,
.data-table tbody td.num-col { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody td {
  padding: var(--pad-cell);
  border-bottom: 1px solid var(--line);
  border-left: none; border-right: none;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table-dense { font-size: 12px; }
.data-table-dense thead th,
.data-table-dense tbody td { padding: 6px 10px; }

/* Badge / Pill para estados — fondo 15% opacidad */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 16px;
  font-size: 11px; font-weight: 600; line-height: 1.3;
  white-space: nowrap;
}
.badge--down   { background: rgba(229,57,53,.13);  color: #c62828; }
.badge--up     { background: rgba(46,125,50,.13);   color: #2e7d32; }
.badge--new    { background: rgba(99,102,241,.13);  color: var(--accent,#6366f1); }
.badge--warn   { background: rgba(251,146,60,.15);  color: #e65100; }
.badge--neutral{ background: rgba(120,120,120,.12); color: var(--ink-2); }
.badge--active { background: rgba(46,125,50,.13);   color: #2e7d32; }
.badge--inactive{ background: rgba(229,57,53,.11);  color: #b71c1c; }

.cell-brand {
  font-weight: 500;
  color: var(--ink);
}
.cell-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--ink-2);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.cell-pill.is-info  { background: oklch(0.93 0.04 250); color: oklch(0.35 0.10 250); }
.cell-pill.is-rubro { background: oklch(0.93 0.05 80);  color: oklch(0.35 0.10 80); }
.cell-pill.is-ok    { background: oklch(0.93 0.05 145); color: oklch(0.35 0.10 145); }
.cell-pill.is-off   { background: var(--surface-2); color: var(--ink-3); }

[data-theme="dark"] .cell-pill.is-info  { background: oklch(0.25 0.04 250); color: oklch(0.80 0.08 250); }
[data-theme="dark"] .cell-pill.is-rubro { background: oklch(0.25 0.05 80);  color: oklch(0.80 0.08 80); }
[data-theme="dark"] .cell-pill.is-ok    { background: oklch(0.25 0.05 145); color: oklch(0.80 0.08 145); }

.row-actions {
  display: flex;
  gap: 4px;
  white-space: nowrap;
  align-items: center;
  justify-content: flex-end;
}
td.row-actions { text-align: right; width: 1%; }
.row-actions .icon-btn, td.row-actions .btn { display: inline-flex; vertical-align: middle; }
.row-actions .icon-btn {
  width: 26px; height: 26px;
  font-size: 12px;
}

.db-empty {
  text-align: center !important;
  padding: 40px !important;
  color: var(--ink-3) !important;
  font-style: italic;
}
.db-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.is-down { color: var(--down); font-weight: 500; }
.num-col { text-align: right; }

/* ---------- BRAND MONO (compartido Explorer/Scrapers) ---------- */
.brand-mono {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 26px;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
}
.brand-mono-sm {
  width: 36px; height: 36px;
  font-size: 18px;
  border-radius: 8px;
}

/* ---------- EXPLORER ---------- */
.explorer { display: flex; flex-direction: column; gap: 20px; }
.explorer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--gap-grid);
}
.brand-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.brand-card:hover {
  border-color: var(--ink-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.brand-card-name {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-top: 6px;
  color: var(--ink);
}
.brand-card-count {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.brand-card-meta {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.chip-mini {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-weight: 500;
}
.chip-mini.is-up   { background: oklch(0.93 0.06 145); color: var(--up); }
.chip-mini.is-down { background: oklch(0.93 0.06 25);  color: var(--down); }
[data-theme="dark"] .chip-mini.is-up   { background: oklch(0.20 0.05 145); }
[data-theme="dark"] .chip-mini.is-down { background: oklch(0.20 0.05 25); }

/* ---------- SCRAPERS ---------- */
.scrapers { display: flex; flex-direction: column; gap: 20px; }
.scrapers-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.scrapers-tools { display: flex; gap: 8px; flex-wrap: wrap; }

.scraper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap-grid);
}
.scraper-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s, opacity .2s;
}
.scraper-card.is-off { opacity: 0.6; }
.scraper-card:hover { border-color: var(--line-2); }

.scraper-head-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.scraper-info { flex: 1; min-width: 0; }
.scraper-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scraper-meta {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: capitalize;
}
.badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-on  { background: oklch(0.93 0.06 145); color: var(--up); }
.badge-off { background: var(--surface-2); color: var(--ink-3); }
[data-theme="dark"] .badge-on { background: oklch(0.20 0.05 145); }

.scraper-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.scraper-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}
.toggle input { display: none; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--line-2);
  border-radius: 999px;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--surface);
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--up); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); }

/* ---------- DICTIONARY ---------- */
.dict { display: flex; flex-direction: column; gap: 16px; }

/* ---------- USERS ---------- */
.users-view { display: flex; flex-direction: column; gap: 20px; }
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap-grid);
}
.user-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 14px;
  align-items: start;
  transition: border-color .15s;
}
.user-card:hover { border-color: var(--line-2); }
.user-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  grid-row: span 2;
}
.user-info { min-width: 0; }
.user-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-email {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-meta {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.role-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.role-admin   { background: oklch(0.93 0.06 25);  color: var(--down); }
.role-analyst { background: oklch(0.93 0.06 250); color: oklch(0.35 0.10 250); }
.role-viewer  { background: var(--surface-2); color: var(--ink-2); }
.role-guest   { background: var(--surface-2); color: var(--ink-3); }
[data-theme="dark"] .role-admin   { background: oklch(0.20 0.05 25); }
[data-theme="dark"] .role-analyst { background: oklch(0.20 0.05 250); color: oklch(0.80 0.08 250); }

.user-brands { font-size: 11px; }
.user-last {
  grid-column: 1 / -1;
  font-size: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.user-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  font-size: 12px;
}

/* ---------- MODAL (compartido) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.5);
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}
[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, 0.6); }
.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow: auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: 0;
}
.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--surface-2);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field > span {
  font-size: 11px;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Explorer brand cards ── */
.brand-card-action {
  margin-top: 8px;
  font-size: 11px;
  color: var(--accent-2);
  opacity: 0;
  transition: opacity .15s;
  font-weight: 600;
  letter-spacing: .02em;
}
.brand-card:hover .brand-card-action { opacity: 1; }
.brand-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.brand-card { transition: transform .15s, box-shadow .15s, border-color .15s; }

/* ── Scrapers ── */
.scraper-progress-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}
.scraper-progress-bar {
  height: 4px;
  background: var(--accent-2);
  transition: width .5s ease;
  min-width: 2%;
}
.scraper-progress-label {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--ink-2);
}

.scraper-live-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 8px; padding: 2px 8px;
  background: #dcfce7; color: #166534;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  animation: pulse-badge 1.5s ease-in-out infinite;
}
@keyframes pulse-badge { 0%,100% { opacity:1 } 50% { opacity:.6 } }

.scraper-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  animation: pulse-badge 1s ease-in-out infinite;
  flex-shrink: 0;
}

tr.row-running td { background: rgba(34,197,94,.05); }

@keyframes spin { to { transform: rotate(360deg); } }
.scraper-spin { display: inline-block; animation: spin .8s linear infinite; }

/* ══ ETL Pipeline Monitor ════════════════════════════════════════════════ */

/* Overlay global durante scraping */
.scraper-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; gap: 16px;
  padding: 48px 32px; box-sizing: border-box;
}
.scraper-overlay-card {
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 24px; min-width: 320px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  display: flex; flex-direction: column; gap: 16px;
}
.scraper-overlay-brand { display: flex; align-items: center; gap: 14px; }
.scraper-overlay-spinner {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid var(--line-2); border-top-color: var(--accent-2);
  animation: spin .8s linear infinite;
}
.scraper-overlay-title { font-weight: 700; font-size: 16px; }
.scraper-overlay-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.scraper-overlay-progress { background: var(--line); border-radius: 99px; height: 6px; overflow: hidden; }
.scraper-overlay-bar { height: 100%; background: var(--accent-2); border-radius: 99px; transition: width .4s ease; }
.scraper-overlay-stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }

/* Log terminal */
.scraper-log-panel {
  flex: 1; min-width: 0; max-width: 640px;
  background: #0d1117; border-radius: var(--radius);
  border: 1px solid #30363d; display: flex; flex-direction: column;
  max-height: calc(100vh - 96px); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.scraper-log-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; border-bottom: 1px solid #30363d;
  font-size: 11px; font-weight: 600; color: #8b949e;
  font-family: 'JetBrains Mono', monospace;
}
.scraper-log-body {
  flex: 1; overflow-y: auto; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 1px;
  scrollbar-width: thin; scrollbar-color: #30363d transparent;
}
.scraper-log-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; line-height: 1.6; color: #c9d1d9;
  word-break: break-all;
}
.scraper-log-line.log-ok   { color: #3fb950; }
.scraper-log-line.log-err  { color: #f85149; }
.scraper-log-line.log-cat  { color: #79c0ff; font-weight: 600; }
.scraper-log-line.log-page { color: #8b949e; }

/* Tabla ETL */
.etl-table { table-layout: auto; }
.etl-row-parent { cursor: pointer; transition: background .1s; }
.etl-row-parent:hover td { background: var(--surface-2); }
.etl-row-child td { background: color-mix(in srgb, var(--surface) 60%, var(--surface-2)); font-size: 12px; }
.etl-row-child:hover td { background: var(--surface-2); }

.etl-expand-cell { width: 32px; text-align: center; }
.etl-toggle { display: inline-block; font-size: 10px; color: var(--ink-3); transition: transform .2s; }
.etl-toggle.is-open { transform: rotate(90deg); }

.etl-progress-wrap { position: relative; background: var(--line); border-radius: 4px; height: 20px; overflow: hidden; }
.etl-progress-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-2); opacity: .3; transition: width .5s ease; }
.etl-progress-label { position: relative; z-index: 1; font-size: 10px; line-height: 20px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.etl-cat-path { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-2); }
.etl-cat-status { font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.etl-cat-status.running { color: var(--accent-2); }
.etl-cat-status.done    { color: #3fb950; }
.etl-cat-status.error   { color: var(--down); }
.etl-cat-status.pending { color: var(--ink-3); }

/* ═══ DICCIONARIO: Panel de cobertura ═══ */
.cov-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.cov-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.cov-title { font-size: .9rem; font-weight: 700; letter-spacing: -.01em; }
.cov-bars { display: flex; flex-direction: column; gap: 10px; }
.cov-bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 48px 90px;
  align-items: center; gap: 12px;
}
.cov-lbl { font-size: .76rem; font-weight: 600; color: var(--ink-2); }
.cov-track {
  height: 8px; border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}
.cov-fill {
  height: 100%; border-radius: 4px;
  background: var(--accent-2);
  transition: width .4s ease;
}
.cov-pct {
  font-size: .82rem; font-weight: 700;
  font-variant-numeric: tabular-nums; text-align: right;
}
.cov-nums {
  font-size: .7rem; color: var(--ink-3);
  font-variant-numeric: tabular-nums; text-align: right;
}
.cov-brands { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.cov-brands-title { font-size: .72rem; color: var(--ink-3); margin-bottom: 8px; }
.cov-brands-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cov-brand-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .76rem; font-weight: 500; cursor: pointer;
  transition: border-color .15s;
}
.cov-brand-chip:hover { border-color: var(--accent-2); }
.cov-brand-pct {
  font-weight: 700; color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

/* Preview de regla en el modal */
.rule-preview {
  margin: 10px 0 4px;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
}
.rule-preview-count { font-size: .78rem; margin-bottom: 8px; }
.rule-preview-count strong { color: var(--accent-2); font-size: .9rem; }
.rule-preview-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 140px; overflow-y: auto;
}
.rule-preview-item {
  display: flex; flex-direction: column;
  font-size: .74rem; padding: 4px 6px;
  background: var(--surface); border-radius: 5px;
}
.rule-preview-meta { font-size: .66rem; color: var(--ink-3); }

@media (max-width: 640px) {
  .cov-bar-row { grid-template-columns: 60px 1fr 42px; }
  .cov-nums { display: none; }
}

/* ═══ BASE DE DATOS: chips de filtro rápido ═══ */
.db-chips {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.db-chip {
  padding: 6px 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .78rem; font-weight: 500; cursor: pointer;
  transition: all .15s; color: var(--ink-2);
}
.db-chip:hover { border-color: var(--accent-2); color: var(--ink); }
.db-chip.is-on {
  background: var(--accent); border-color: var(--accent);
  color: var(--surface); font-weight: 600;
}
.db-live-count {
  margin-left: auto;
  font-size: .78rem; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.db-live-count strong { color: var(--accent-2); font-size: .9rem; }
@media (max-width: 640px) {
  .db-live-count { width: 100%; margin-left: 0; text-align: right; }
}
/* ── Selección y borrado de productos en Catálogo (sesión julio 2026) ── */
.prod-select-cb { position: absolute; top: 8px; left: 8px; z-index: 2; width: 18px; height: 18px; cursor: pointer; }
.prod-card.is-selecting { cursor: pointer; }
.prod-card.is-selecting:hover { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.btn-ghost.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── Píldora flotante de scraping minimizado (sesión julio 2026) ── */
.scraper-pill {
  position: fixed; bottom: 20px; right: 20px; z-index: 901;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  cursor: pointer; font-size: 12px;
}
.scraper-pill-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); border-top-color: var(--bg);
  animation: scraper-spin-anim .8s linear infinite;
}
.scraper-pill-text { display: flex; flex-direction: column; line-height: 1.3; }
.scraper-pill-pct { opacity: .7; font-size: 10.5px; }

/* ── Progreso inline de scrapers vía GitHub Action (sesión julio 2026) ── */
.site-acc-external { margin: 8px 0; padding: 8px 0; border-top: 1px dashed var(--line); }
.site-acc-ext-bar { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.site-acc-ext-fill { height: 100%; background: var(--accent-2); transition: width .3s ease; }
