/* vh-pwa.css — «Instala la app» (13-nov-2026). Solo se carga con VH_PWA_ENABLED o con la cookie de vista previa.
 * Todo va con prefijo .vhp-: no toca nada más del sitio. Marca: navy #0C253D, rojo #CB2F32, dorado #FCB61A, crema #FFF6EC. */
.vhp-guide, .vhp-dlg, .vhp-tests, .vhp-toast, .vhp-admin, .vhp-profile {
  --vhp-ink: #0C253D; --vhp-text: #1f2937; --vhp-muted: #56677A; --vhp-red: #CB2F32; --vhp-red-h: #A21F27;
  --vhp-gold: #FCB61A; --vhp-cream: #FFF6EC; --vhp-cream-2: #F5E9D6; --vhp-surface: #fff; --vhp-line: #E5E7EB;
  --vhp-focus: #0C253D; --vhp-chip-on: #0C253D; --vhp-chip-on-text: #fff;
}
body[data-theme="dark"] .vhp-guide, body[data-theme="dark"] .vhp-dlg, body[data-theme="dark"] .vhp-profile, body[data-theme="dark"] .vhp-admin {
  --vhp-ink: #F3F4F6; --vhp-text: #E5E7EB; --vhp-muted: #B6C2CF; --vhp-surface: var(--color-surface, #13263a);
  --vhp-line: rgba(255,255,255,.14); --vhp-cream: rgba(255,246,236,.08); --vhp-cream-2: rgba(255,246,236,.12);
  --vhp-focus: #FFF6EC; --vhp-chip-on: #FFF6EC; --vhp-chip-on-text: #0C253D;
}
html.vhp-lock { overflow: hidden; }
.vhp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- botones ---------- */
.vhp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 10px; border: 2px solid transparent; font: 600 15px/1.2 Poppins, system-ui, sans-serif; cursor: pointer;
  text-decoration: none; transition: background-color .15s, color .15s, border-color .15s; }
.vhp-btn-primary { background: var(--vhp-red, #CB2F32); color: #fff; }
.vhp-btn-primary:hover { background: var(--vhp-red-h, #A21F27); }
.vhp-btn-secondary { background: transparent; color: var(--vhp-ink, #0C253D); border-color: var(--vhp-ink, #0C253D); }
.vhp-btn-secondary:hover { background: var(--vhp-cream, #FFF6EC); }
.vhp-btn-ghost { background: transparent; color: var(--vhp-ink, #0C253D); border-color: var(--vhp-line, #E5E7EB); min-height: 40px; font-size: 14px; }
.vhp-btn-ghost:hover { border-color: var(--vhp-ink, #0C253D); }
.vhp-btn-small { min-height: 36px; padding: 6px 14px; font-size: 14px; border-radius: 8px; }
.vhp-btn:disabled { opacity: .6; cursor: wait; }
.vhp-btn:focus-visible, .vhp-link:focus-visible, .vhp-x:focus-visible, .vhp-btn-soft:focus-visible, .vhp-toast-x:focus-visible { outline: 3px solid var(--vhp-focus, #0C253D); outline-offset: 2px; }
.vhp-dlg h2[tabindex="-1"]:focus { outline: none; }   /* el título recibe el foco al abrir (lector de pantalla); no es un control */
.vhp-link { background: none; border: 0; padding: 6px 0; min-height: 36px; color: var(--vhp-ink, #0C253D); font: 600 14px/1.3 Poppins, system-ui, sans-serif;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.vhp-ico { flex: 0 0 auto; }
.vhp-ico-sm { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.vhp-ico-ok { color: #15803D; }
.vhp-ico-btn { width: 20px; height: 20px; }

/* ---------- Mi perfil (mismo aspecto que el bloque de Telegram) ---------- */
.vhp-btn-soft { margin-left: 8px; padding: 4px 12px; min-height: 30px; background: #f3f4f6; color: #374151; border: 1px solid #d1d5db;
  border-radius: 6px; cursor: pointer; font-size: 13px; vertical-align: middle; }
.vhp-btn-soft:hover { background: #e5e7eb; }
.vhp-profile-status { margin: 4px 0 0; font-size: 13px; color: #6b7280; }
body[data-theme="dark"] .vhp-profile-status { color: var(--color-text-muted, #B6C2CF); }
#vh-pwa-guide-box { margin-top: 10px; padding: 14px; border: 1px solid var(--vhp-line); border-radius: 12px; background: var(--vhp-surface); }
#vh-pwa-guide-box[hidden] { display: none; }

/* ---------- guía (pasos) ---------- */
.vhp-guide { color: var(--vhp-text); font-size: 15px; line-height: 1.45; text-align: left; }
.vhp-for { margin: 0; font-size: 15px; color: var(--vhp-text); }
.vhp-for strong { color: var(--vhp-ink); }
.vhp-ok { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #ECFDF3; color: #14532D; font-weight: 600; font-size: 14px; }
.vhp-pick { margin: 6px 0 4px; padding: 12px; border-radius: 12px; background: var(--vhp-cream); border: 1px solid var(--vhp-line); }
.vhp-pick[hidden] { display: none; }
.vhp-pick fieldset { border: 0; margin: 0 0 10px; padding: 0; min-width: 0; }
.vhp-pick fieldset:last-child { margin-bottom: 0; }
.vhp-pick legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--vhp-muted); }
.vhp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vhp-chip { position: relative; display: inline-flex; }
.vhp-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.vhp-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--vhp-line);
  background: var(--vhp-surface); color: var(--vhp-text); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.vhp-chip span:hover { border-color: var(--vhp-ink); }
.vhp-chip input:checked + span { background: var(--vhp-chip-on); border-color: var(--vhp-chip-on); color: var(--vhp-chip-on-text); }
.vhp-chip input:focus-visible + span { outline: 3px solid var(--vhp-focus); outline-offset: 2px; }
.vhp-native { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 2px; }
.vhp-native span { font-size: 14px; color: var(--vhp-muted); }
.vhp-steps { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: vhp; }
.vhp-steps li { counter-increment: vhp; display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.vhp-steps li + li { border-top: 1px dashed var(--vhp-line); }
.vhp-step-ico { position: relative; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--vhp-cream-2); color: var(--vhp-ink); }
.vhp-step-ico::after { content: counter(vhp); position: absolute; top: -6px; left: -6px; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  box-sizing: border-box; background: var(--vhp-red); color: #fff; font: 700 12px/20px Poppins, system-ui, sans-serif; text-align: center; }
.vhp-step-txt { padding-top: 2px; }
.vhp-step-txt strong { color: var(--vhp-ink); }
.vhp-note { display: flex; align-items: flex-start; margin: 10px 0 0; font-size: 13.5px; color: var(--vhp-muted); }
.vhp-note .vhp-ico-sm { margin-top: 2px; }
.vhp-guide [data-vhp-copy] { margin-top: 10px; }

/* ---------- ventana emergente ---------- */
.vhp-dlg { padding: 0; border: 0; background: transparent; color: var(--vhp-text); max-width: none; max-height: none; width: 100%; height: 100%;
  margin: 0; inset: 0; overflow: hidden; }
.vhp-dlg[open] { display: flex; align-items: flex-end; justify-content: center; }
.vhp-dlg::backdrop { background: rgba(6, 21, 37, .62); }
.vhp-dlg-card { position: relative; width: 100%; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--vhp-surface); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.25); font-family: Poppins, system-ui, sans-serif; }
@media (prefers-reduced-motion: no-preference) {
  .vhp-dlg[open] .vhp-dlg-card { animation: vhp-up .28s cubic-bezier(.2,.8,.2,1); }
  @keyframes vhp-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.vhp-dlg-hero { position: relative; height: 112px; overflow: hidden; border-radius: 20px 20px 0 0; background-color: #0C253D;
  background-image: linear-gradient(rgba(252,182,26,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(252,182,26,.12) 1px, transparent 1px);
  background-size: 22px 22px; display: flex; justify-content: center; align-items: flex-end; }
.vhp-dlg-art { display: block; width: 220px; height: 120px; }
.vhp-dlg-appicon { position: absolute; left: 50%; bottom: 14px; width: 58px; height: 58px; margin-left: -29px; border-radius: 14px;
  box-shadow: 0 0 0 3px #CB2F32, 0 8px 18px rgba(0,0,0,.35); background: #FFF6EC; }
.vhp-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; display: inline-flex; align-items: center;
  justify-content: center; background: rgba(255,246,236,.14); color: #FFF6EC; cursor: pointer; }
.vhp-x:hover { background: rgba(255,246,236,.26); }
.vhp-dlg .vhp-x:focus-visible { outline-color: #FFF6EC; }
.vhp-dlg-body { padding: 18px 20px 0; }
.vhp-dlg h2 { margin: 0; font: 800 22px/1.2 Poppins, system-ui, sans-serif; color: var(--vhp-ink); text-wrap: balance; }
.vhp-dlg-lead { margin: 6px 0 14px; font-size: 15.5px; color: var(--vhp-muted); }
.vhp-dlg-guide { padding-top: 12px; border-top: 1px solid var(--vhp-line); }
.vhp-dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  position: sticky; bottom: 0; background: var(--vhp-surface); border-top: 1px solid var(--vhp-line); }
.vhp-dlg-actions .vhp-btn { flex: 1 1 auto; }
.vhp-dlg-preview { margin: 12px 0 0; font-size: 12.5px; color: var(--vhp-muted); }
.vhp-dlg-actions .vhp-dlg-preview { flex: 1 1 100%; margin: 0; }
@media (min-width: 640px) {
  .vhp-dlg[open] { align-items: center; padding: 24px; box-sizing: border-box; }
  .vhp-dlg-card { max-width: 520px; border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35); max-height: 90vh; }
  .vhp-dlg-body { padding: 22px 26px 0; }
  .vhp-dlg-hero { height: 128px; }
  .vhp-dlg-actions { margin: 18px -26px 0; padding: 14px 26px 18px; }
  .vhp-dlg-actions .vhp-btn { flex: 0 0 auto; }
}

/* ---------- Configurar alertas: avisos de ejemplo (el modal es claro siempre) ---------- */
.vhp-tests { margin: 14px 0 6px; padding: 14px 0 4px; border-top: 2px solid #E5E7EB; color: #1f2937; }
.vhp-tests h4 { margin: 0 0 4px; font-size: .98rem; font-weight: 700; color: #0C253D; display: flex; align-items: center; }
.vhp-tests-lead { margin: 0 0 10px; font-size: .82rem; color: #56677A; }
.vhp-perm { margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; background: #FFF6EC; border: 1px solid #F5E9D6; font-size: .82rem; color: #374151; }
.vhp-perm p { margin: 0; }
.vhp-perm .vhp-btn { margin-top: 8px; }
.vhp-perm-ok { display: flex; align-items: center; color: #14532D; font-weight: 600; }
.vhp-test-list { list-style: none; margin: 0; padding: 0; }
.vhp-test-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.vhp-test-name { font-size: .9rem; font-weight: 600; color: #111827; }
.vhp-tests .vhp-btn-small { background: #fff; color: #0C253D; border: 1.5px solid #0C253D; min-height: 36px; min-width: 76px; }
.vhp-tests .vhp-btn-small:hover { background: #FFF6EC; }
.vhp-tests .vhp-btn-primary.vhp-btn-small { background: #CB2F32; border-color: #CB2F32; color: #fff; }
.vhp-tests .vhp-btn:focus-visible { outline: 3px solid #0C253D; outline-offset: 2px; }
.vhp-tests .vhp-dlg-preview { color: #56677A; }

/* ---------- vista previa de un aviso (como notificación del sistema) ---------- */
.vhp-toast { position: fixed; top: max(12px, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 2147483600;
  width: min(420px, calc(100vw - 24px)); background: #FAFAFA; border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Poppins, sans-serif; color: #111827; }
.vhp-toast[hidden] { display: none; }
.vhp-toast-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 10px 10px 12px; }
.vhp-toast-icon { width: 36px; height: 36px; border-radius: 9px; flex: 0 0 36px; }
.vhp-toast-main { flex: 1 1 auto; min-width: 0; }
.vhp-toast-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: #56677A; }
.vhp-toast-app { font-weight: 600; text-transform: none; }
.vhp-toast-title { margin-top: 2px; font-weight: 700; font-size: 14.5px; }
.vhp-toast-body { font-size: 14px; line-height: 1.35; color: #1f2937; }
.vhp-toast-x { flex: 0 0 36px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #EEF0F3; color: #374151; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer; }
.vhp-toast-note { margin: 0; padding: 8px 14px 10px; border-top: 1px solid #E5E7EB; font-size: 12.5px; color: #56677A; }
@media (prefers-reduced-motion: no-preference) {
  .vhp-toast:not([hidden]) { animation: vhp-drop .25s ease-out; }
  @keyframes vhp-drop { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
}

/* ---------- admin: tarjeta en /admin-usuarios/ ---------- */
.vhp-admin { margin-top: 20px; }
.vhp-admin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.vhp-admin-head h2 { margin: 0; font-size: 1.25rem; color: var(--color-text-heading, #0C253D); }
.vhp-admin-tag { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #FFF6EC; color: #7A4A00; border: 1px solid #F5E9D6; }
.vhp-admin-stats { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; padding: 0; }
.vhp-admin-stats li { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--color-border, #E5E7EB); background: var(--color-surface, #fff);
  font-size: 13.5px; color: var(--color-text-body, #374151); }
.vhp-admin-stats strong { display: block; font: 800 24px/1.1 Poppins, system-ui, sans-serif; color: var(--color-text-heading, #0C253D); }
.vhp-admin-note { margin: 10px 0 0; font-size: 13px; color: var(--color-text-muted, #56677A); }
.vhp-admin-table td, .vhp-admin-table th { white-space: nowrap; }

/* Mi perfil: notificaciones a la vista (14-nov-2026) */
.vhp-notif-row{margin-top:12px;padding-top:12px;border-top:1px dashed #e5e7eb;display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.vhp-notif-row .vhp-notif-t{margin:0;flex:1 1 100%}
.vhp-notif-row .vhp-profile-status,.vhp-notif-row .vhp-perm-ok{margin:0;flex:1 1 220px}
.vhp-notif-row button{min-height:44px}

/* 15-nov-2026: avisos reales (Web Push) */
.vhp-notif-row .vhp-push-off{margin-left:auto;font-weight:500;color:#56677A;text-decoration:underline;min-height:44px}
.vhp-push-msg{margin:0;flex:1 1 100%;font-size:.82rem;color:#374151}
.vhp-tests .vhp-push-msg{margin:0 0 8px;padding:8px 12px;border-radius:8px;background:#F0F7F2;border:1px solid #CFE6D6;color:#14532D}
body[data-theme="dark"] .vhp-push-msg, body[data-theme="dark"] .vhp-notif-row .vhp-push-off { color: var(--color-text-muted, #B6C2CF); }
body[data-theme="dark"] .vhp-tests .vhp-push-msg { background: #12301D; border-color: #1F4D2E; color: #C9F0D5; }
