/* =====================================================================
   Privacidad (pages/privacy.js) — lista de interruptores por grupos.
   Mismo lenguaje que Test de velocidad / Mando. Sin filtros ni animaciones
   propias; en Lite (perf-lite) los paneles pasan a color liso.
   ===================================================================== */
.pv-wrap {
  --pv-panel: linear-gradient(160deg, rgba(18,18,20,.96) 0%, rgba(13,13,14,.96) 58%, rgba(10,10,11,.96) 100%);
  --pv-border: rgba(200,200,205,.13);
  --pv-border-soft: rgba(200,200,205,.08);
  --pv-text: #f2f2f3; --pv-muted: rgba(245,245,247,.78); --pv-dim: rgba(245,245,247,.55);
  --pv-warn: #fbbf24;
  --pv-ok: #34d399;
  --pv-accent: #f5f5f5;
  --pv-accent-line: rgba(245,245,245,.55);
  display: flex; flex-direction: column; gap: 14px; color: var(--pv-text);
}
.pv-wrap [hidden] { display: none !important; }
.pv-card {
  background: var(--pv-panel); border: 1px solid var(--pv-border); border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 26px rgba(0,0,0,.42);
  padding: 6px 18px;
}
.pv-error { padding: 18px; color: var(--pv-muted); }

/* Estado (anillo + desglose + acción) */
.pv-hero { display: flex; align-items: center; gap: 22px; padding: 20px 24px; flex-wrap: wrap; }
.pv-ring { position: relative; width: 76px; height: 76px; flex: none; }
.pv-ring svg { transform: rotate(-90deg); display: block; }
.pv-ring circle { fill: none; stroke-width: 7; }
.pv-ring-bg { stroke: rgba(200,200,205,.14); }
.pv-ring-fg { stroke: var(--pv-accent); stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.pv-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.pv-hero-text { flex: 1 1 300px; min-width: 0; }
.pv-count { font-size: 17px; font-weight: 700; }
.pv-top-sub { font-size: 12.5px; color: var(--pv-dim); margin-top: 4px; }
.pv-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; font-size: 12px; color: var(--pv-muted); }
.pv-stats span { display: inline-flex; align-items: center; gap: 6px; }
.pv-stats b { font-weight: 700; color: var(--pv-text); }
.pv-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pv-dot-off { background: var(--pv-accent); }
.pv-dot-warn { background: var(--pv-warn); }
.pv-dot-on { background: #727272; }
.pv-btn-primary {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--pv-accent); color: #fff; border: 1px solid var(--pv-accent);
  border-radius: 10px; padding: 10px 16px; white-space: nowrap;
  transition: background .15s ease;
}
.pv-btn-primary:hover:not(:disabled) { background: #d4d4d8; }
.pv-btn-primary:disabled { opacity: .55; cursor: default; }
.pv-done {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--pv-ok);
  background: rgba(52,211,153,.08); border: 1px solid rgba(52,211,153,.25);
  border-radius: 10px; padding: 9px 14px;
}

/* Categorías */
.pv-section { margin: 10px 2px 0; font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pv-muted); }
.pv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .pv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pv-tile, .pv-adv-tile {
  font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%;
  transition: border-color .15s ease, background .15s ease;
}
.pv-tile { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.pv-tile:hover, .pv-adv-tile:hover { border-color: rgba(200,200,205,.28); }
.pv-tile.is-open, .pv-adv-tile.is-open { border-color: var(--pv-accent-line); }
.pv-tile-head { display: flex; align-items: center; gap: 12px; width: 100%; }
.pv-ic {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(245,245,245,.12); color: #e5e5e5;
}
.pv-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pv-tile-name { font-size: 14px; font-weight: 600; }
.pv-tile-count { font-size: 12px; color: var(--pv-dim); }
.pv-chev { flex: none; color: var(--pv-dim); transform: rotate(-90deg); transition: transform .15s ease; }
.is-open .pv-chev { transform: rotate(0deg); }
.pv-bar { display: block; height: 4px; border-radius: 4px; background: rgba(200,200,205,.12); overflow: hidden; }
.pv-bar i { display: block; height: 100%; background: var(--pv-accent); border-radius: 4px; transition: width .3s ease; }
.pv-chip { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.pv-chip.is-ok { color: var(--pv-ok); background: rgba(52,211,153,.1); }
.pv-chip.is-pending { color: var(--pv-warn); background: rgba(251,191,36,.1); }
.pv-adv-tile { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }

/* Detalle de la categoría abierta */
.pv-detail { padding: 6px 20px; }
.pv-detail-title { margin: 12px 0 2px; font-size: 15px; font-weight: 600; }
.pv-detail-title + .pv-row { border-top: none; }

.pv-group { margin: 12px 0 2px; font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pv-muted); }

/* Filas */
.pv-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--pv-border-soft); }
.pv-group + .pv-row { border-top: none; }
.pv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pv-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.pv-desc { font-size: 12.5px; color: var(--pv-dim); }
.pv-warn { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--pv-warn); margin-top: 2px; }
.pv-warn svg { flex: none; margin-top: 2px; }
.pv-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  color: var(--pv-muted); background: rgba(255,255,255,.06); border: 1px solid var(--pv-border); border-radius: 6px; padding: 1px 7px;
}
.pv-row .switch { padding: 0; font: inherit; }
.pv-row .switch:disabled { cursor: default; opacity: .5; }
.pv-row.is-locked .pv-title { color: var(--pv-muted); }

/* Esqueleto mientras se lee */
.pv-skel-t { display: block; height: 13px; width: 38%; border-radius: 5px; }
.pv-skel-d { display: block; height: 11px; width: 65%; border-radius: 5px; margin-top: 6px; }
.pv-skel-sw { display: block; width: 44px; height: 24px; border-radius: 999px; flex: none; }

.pv-foot { margin: 0 2px; font-size: 12.5px; color: var(--pv-dim); }
.pv-adv-sub { margin: 4px 0 6px; font-size: 12.5px; color: var(--pv-dim); max-width: 78ch; }
.pv-tags { display: flex; gap: 10px; margin-top: 3px; font-size: 11.5px; color: var(--pv-dim); }
.pv-tag-warn { color: var(--pv-warn); }

/* Lite: paneles lisos y sin sombra grande */
.perf-lite .pv-card { background: #0e0e0f; box-shadow: none; }
