/* ============================================================================
 * NUEVARIFA.COM — PANEL DEL ORGANIZADOR (RF-025)
 * Usa exclusivamente los tokens de home.css (--n-*, --accent*, --surface, --text,
 * --text-muted, --line, --radius-sm/md/lg).
 * Diseño de doble columna en escritorio (resumen fijo a la izquierda + área de
 * trabajo a la derecha) y pestañas en rejilla de 5 columnas sin scroll horizontal.
 * ========================================================================== */

.pn-body { min-height: 100dvh; background: var(--ui-bg, var(--bg)); overflow-x: clip; }
.pn-body .org-breadcrumb { margin-bottom: 0; }
[hidden] { display: none !important; }
.pn { flex: 1 1 auto; }
.pn-wrap { max-width: none; width: 100%; padding: 0; display: grid; gap: 16px; }

/* ---------- Integración del App Shell (ui-kit.css + org-shell.css) ---------- */
.org-topbar__brand .brand-logo { max-width: 136px; height: auto; }

.pn-loading { padding: 2rem 0; color: var(--text-muted); font-weight: 600; }
.pn-alert, .pn-form-error {
  margin: 0; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 0.9rem;
}

.pn-hello { margin: 0; font-size: 0.92rem; color: var(--text-muted); font-weight: 600; }
.pn-hello span { color: var(--text); font-weight: 800; }
.pn-title {
  margin: 0; font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.15; letter-spacing: -0.025em; font-weight: 800; overflow-wrap: anywhere;
}
.pn-lead { margin: 0.5rem 0 1.25rem; max-width: 52ch; font-size: 1.02rem; color: var(--text-muted); }
.pn-help { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.45; }
.pn-help:empty { display: none; }
.pn-subtitle { margin: 0; font-size: 1.02rem; font-weight: 800; letter-spacing: -0.01em; }

.pn-overview-lead {
  margin: 6px 0 8px; max-width: 68ch; font-size: 0.95rem; color: var(--text-muted); line-height: 1.5;
}
.pn-context-note {
  font-size: 0.84rem; color: var(--text-muted); font-weight: 600;
}
@media (max-width: 640px) {
  .pn-context-note { display: none; }
}

/* ---------- Barra superior contextual de la rifa ---------- */
.pn-app { display: grid; gap: 16px; }
.pn-top { display: grid; gap: 8px; }
.pn-top-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.pn-top-left, .pn-top-right { display: flex; align-items: center; gap: 12px; }
.pn-picker { display: flex; align-items: center; gap: 8px; margin: 0; }
.pn-picker label { margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.pn-picker .input {
  min-height: 40px; padding: 6px 14px; font-weight: 700; font-size: 0.88rem; max-width: 300px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.pn-quota { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

.pn-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  font-size: 0.88rem; font-weight: 800; color: var(--n-900); text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 140ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .pn-back:hover {
    border-color: #059669; background: #ecfdf5; color: #065f46;
    transform: translateX(-2px);
  }
}

/* ---------- Espacio de trabajo de la rifa (2 columnas en escritorio) ---------- */
.pn-workspace { display: grid; gap: 20px; align-items: start; }
@media (min-width: 960px) {
  .pn-workspace { grid-template-columns: minmax(320px, 390px) minmax(0, 1fr); gap: 28px; }
  .pn-workspace:has(#pnSections.hidden) { grid-template-columns: minmax(0, 760px); }
  .pn-workspace > .pn-card { position: sticky; top: calc(var(--ui-topbar-h, 60px) + 16px); }
}
@media (min-width: 1280px) {
  .pn-workspace { grid-template-columns: 400px minmax(0, 1fr); gap: 28px; }
}

/* ---------- Tarjeta lateral / resumen de la rifa ---------- */
.pn-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(16px, 2.2vw, 20px); border-radius: var(--ui-radius-lg);
  background: var(--ui-surface); border: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow-sm);
}
.pn-card > * { max-width: 100%; }

/* Hero media en la tarjeta del organizador */
.pn-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f8fafc;
  margin-bottom: 2px;
}
.pn-card-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pn-card-media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
}
.pn-card-media-emoji {
  font-size: 3.2rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.pn-card-header { display: grid; gap: 8px; }
.pn-card-info { display: grid; gap: 5px; min-width: 0; }
.pn-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 2px; }

.pn-card .pn-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--n-950);
}

.pn-prize {
  margin: 0;
  font-weight: 800;
  font-size: 0.98rem;
  color: #047857;
  overflow-wrap: anywhere;
}
.pn-meta { margin: 0; font-size: 0.86rem; color: var(--text-muted); line-height: 1.45; }
.pn-note { margin: 0; font-size: 0.84rem; color: var(--n-600); }
.pn-note:empty { display: none; }

.pn-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 800;
  background: var(--n-100); color: var(--n-800);
}
.pn-pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--n-500); }
.pn-pill b { font-weight: 800; }
.pn-pill[data-tone="live"] { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.pn-pill[data-tone="live"] span { background: #10b981; animation: pn-pulse 1.6s ease-in-out infinite; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3); }
.pn-pill[data-tone="paused"] { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.pn-pill[data-tone="paused"] span { background: #f59e0b; border-radius: 50%; }
.pn-pill[data-tone="done"] { background: #0f172a; color: #ffffff; }
.pn-pill[data-tone="done"] span { background: #10b981; }
.pn-pill[data-tone="off"] { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
@keyframes pn-pulse { 50% { opacity: 0.35; } }

/* ---------- Borrador: activar ---------- */
.pn-activate {
  width: 100%; padding: 18px; border-radius: var(--radius-md);
  background: var(--accent-soft); border: 1px solid #a7f3d0;
  display: grid; gap: 10px; justify-items: start;
}
.pn-activate h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--accent-ink); }
.pn-activate p { color: var(--n-800); max-width: 56ch; font-size: 0.92rem; }
.pn-activate .btn { margin-top: 4px; }

/* ---------- Rifa activada: métricas y controles ---------- */
.pn-manage { width: 100%; display: grid; gap: 14px; padding-top: 10px; border-top: 1px solid var(--line); }

.pn-metrics-strip {
  display: grid; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md);
  background: #f8fafc; border: 1px solid var(--line);
}
.pn-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pn-progress .board-progress {
  flex: 1; height: 9px; border-radius: 999px; background: #e2e8f0; overflow: hidden;
}
.pn-progress .board-progress span {
  display: block; height: 100%; width: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #059669);
  transform-origin: left center; transform: scaleX(var(--sold, 0));
  transition: transform 300ms var(--ease-out);
}
.pn-progress p {
  margin: 0; font-size: 0.85rem; font-weight: 800; color: #0f172a;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.pn-kpis {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--ui-border);
}
@media (max-width: 420px) {
  .pn-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pn-kpis > div {
  padding: 10px 12px; border-radius: var(--ui-radius); background: var(--ui-surface);
  border: 1px solid var(--ui-border); min-width: 0; overflow: hidden;
  box-shadow: var(--ui-shadow-sm);
}
.pn-kpis dt { font-size: 0.72rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pn-kpis dd {
  margin-top: 3px; font-size: clamp(0.84rem, 3.4vw, 1.15rem); font-weight: 900; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere;
}
.pn-kpis > div:first-child dd { color: #047857; }
.pn-kpis > div:nth-child(2) dd { color: #b45309; }
.pn-kpis > div:nth-child(3) dd { color: #0f172a; }

.pn-kpis.is-small { padding: 10px 12px; border-radius: var(--radius-md); background: var(--n-50); border: 1px solid var(--line); }
.pn-kpis.is-small dd { font-size: 1.1rem; }

/* Próximamente (RF-028) */
.pn-launch {
  width: 100%; padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--line);
  background: var(--n-100); display: grid; gap: 8px;
}
.pn-launch-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; }
.pn-launch h2 { font-size: 1rem; font-weight: 800; }
.pn-launch p { color: var(--n-800); font-size: 0.88rem; }
.pn-launch-count { font-weight: 700; font-size: 0.82rem; }
.pn-launch-count:empty { display: none; }
.pn-launch-form { padding-top: 8px; border-top: 1px solid var(--line); }

/* Cierre de la rifa (RF-027) */
.pn-endgame {
  display: grid; gap: 8px; justify-items: start; padding: 14px; border-radius: var(--radius-md);
  background: var(--accent-soft); border: 2px solid var(--accent);
}
.pn-endgame h2 { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; color: var(--accent-ink); }
.pn-endgame p { color: var(--n-800); font-size: 0.88rem; }
.pn-endgame.is-calm { background: var(--surface); border: 1px solid var(--line); }
.pn-endgame.is-calm h2 { color: var(--text); }
.pn-endgame-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.pn-card-bar { display: grid; gap: 10px; }
.pn-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pn-card-bar > .pn-card-actions .btn {
  flex: 1 1 140px; min-height: 42px; padding: 0 14px; font-size: 0.88rem; font-weight: 800;
}
.pn-card-bar > .pn-card-actions .btn-primary {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}
.pn-card-bar > .pn-card-actions .btn-ghost.pn-outline {
  border-color: #cbd5e1; background: #ffffff; color: #0f172a;
}
@media (hover: hover) and (pointer: fine) {
  .pn-card-bar > .pn-card-actions .btn-ghost.pn-outline:hover {
    border-color: #94a3b8; background: #f8fafc;
  }
}

.pn-more { border-radius: var(--radius-sm); background: var(--n-50); border: 1px solid var(--line); }
.pn-more summary {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; cursor: pointer;
  font-weight: 700; font-size: 0.85rem; color: var(--text-muted); list-style: none; user-select: none;
}
.pn-more summary::-webkit-details-marker { display: none; }
.pn-more summary::after { content: '+'; margin-left: auto; font-size: 1.1rem; color: var(--text-muted); }
.pn-more[open] summary { color: var(--text); }
.pn-more[open] summary::after { content: '−'; }
.pn-more-body { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.pn-more-body p { width: 100%; font-size: 0.84rem; color: var(--text-muted); }

.pn-outline { border-color: var(--n-950); background: var(--surface); }
.btn-danger { background: #b91c1c; color: #ffffff; border-color: #b91c1c; }
.btn-danger:hover { background: #991b1b; border-color: #991b1b; }

/* ---------- Hub de Operativa y Tareas Pendientes ---------- */
.pn-pending-hub {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.pn-pending-hub.hidden,
.pn-pending-hub[hidden] {
  display: none !important;
}

.pn-hub-header {
  margin-bottom: 10px;
}

.pn-hub-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pn-hub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 10px;
}

.pn-hub-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.pn-hub-subtitle {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pn-hub-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pn-hub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.2s ease;
}

.pn-hub-card.is-amber {
  background: #fffbeb;
  border-color: #fde68a;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08);
}

.pn-hub-card.is-purple {
  background: #faf5ff;
  border-color: #e9d5ff;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.08);
}

.pn-hub-card.is-gold {
  background: #fefce8;
  border-color: #fef08a;
}

.pn-hub-card.is-green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.pn-hub-card-body {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 260px;
}

.pn-hub-badge-icon {
  font-size: 1.45rem;
  flex-shrink: 0;
}

.pn-hub-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.pn-hub-card.is-amber .pn-hub-card-title { color: #92400e; }
.pn-hub-card.is-purple .pn-hub-card-title { color: #6b21a8; }
.pn-hub-card.is-green .pn-hub-card-title { color: #166534; }
.pn-hub-card.is-gold .pn-hub-card-title { color: #854d0e; }

.pn-hub-card-text {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pn-hub-card.is-amber .pn-hub-card-text { color: #b45309; }
.pn-hub-card.is-purple .pn-hub-card-text { color: #7e22ce; }
.pn-hub-card.is-green .pn-hub-card-text { color: #15803d; }
.pn-hub-card.is-gold .pn-hub-card-text { color: #a16207; }

.pn-hub-card.is-queue {
  flex-direction: column;
  align-items: stretch;
}
.pn-hub-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pn-pending-queue {
  list-style: none;
  margin: 4px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed rgba(217, 119, 6, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pn-queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #fde68a;
}
.pn-queue-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 220px;
}
.pn-queue-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #78350f;
}
.pn-queue-ago {
  font-size: 0.76rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 999px;
}
.pn-queue-sub {
  font-size: 0.83rem;
  color: #6b7280;
  word-break: break-word;
}
.pn-queue-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Venta rápida (plegable dentro de Números) ---------- */
.pn-quick-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.pn-quick-card.hidden,
.pn-quick-card[hidden] {
  display: none !important;
}
.pn-quick-fold {
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.pn-quick-fold[open] {
  border-color: #94a3b8;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
.pn-quick-fold > .pn-fold-summary {
  flex-wrap: wrap;
  background: #f8fafc;
}
.pn-quick-price {
  font-size: 0.84rem;
  font-weight: 800;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pn-quick-price:empty {
  display: none;
}
.pn-quick-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pn-quick-numbers-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pn-quick-input-nums {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pn-quick-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pn-quick-chip-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 2px;
}
.pn-quick-chip {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pn-quick-chip:hover {
  border-color: #10b981;
  background: #ecfdf5;
}
.pn-quick-chip.is-picked {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.pn-quick-preview {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.86rem;
  font-weight: 700;
}
.pn-quick-preview.is-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.pn-quick-buyer-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pn-quick-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.pn-quick-modes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pn-quick-modes label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.pn-quick-modes input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pn-quick-modes span {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.pn-quick-modes input:checked + span {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}
.pn-quick-modes input:focus-visible + span {
  outline: 2px solid #059669;
  outline-offset: 2px;
}
.pn-quick-submit {
  min-width: 190px;
}
.pn-quick-form .pn-form-error:empty {
  display: none;
}
@media (max-width: 640px) {
  .pn-quick-buyer-row {
    grid-template-columns: 1fr;
  }
  .pn-quick-submit {
    width: 100%;
  }
}

/* ---------- Apartados de la Rifa en Tarjetas Desplegables (Accordion Deck) ---------- */
.pn-sections { display: grid; gap: 16px; min-width: 0; }

.pn-accordion-deck {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.pn-acc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pn-acc-card:hover {
  border-color: var(--n-300);
}

.pn-acc-card.is-expanded {
  border-color: #059669;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.pn-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.pn-acc-trigger:hover {
  background: #f8fafc;
}

.pn-acc-card.is-expanded .pn-acc-trigger {
  background: #f8fafc;
  border-bottom-color: var(--line);
}

.pn-acc-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.pn-acc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 1.15rem;
  transition: background 0.16s ease;
}

.pn-acc-card.is-expanded .pn-acc-icon {
  background: #ecfdf5;
}

.pn-acc-pill {
  display: none;
}

.pn-acc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pn-acc-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pn-acc-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pn-acc-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.pn-acc-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--n-100);
  color: var(--text-muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.pn-acc-pill.pn-acc-pill-amber {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
  animation: pn-pulse 2s ease-in-out infinite;
}

.pn-acc-pill.pn-acc-pill-purple {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #e9d5ff;
}

.pn-acc-pill.pn-acc-pill-green {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.pn-acc-pill.pn-acc-pill-gold {
  background: #fef9c3;
  color: #854d0e;
  border-color: #fef08a;
}

.pn-acc-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.pn-acc-card.is-expanded .pn-acc-arrow {
  transform: rotate(180deg);
  color: #0b6e4f;
}

/* El panel interior cuando se despliega la tarjeta */
.pn-acc-card .pn-panel {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 2.5vw, 24px);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  animation: pn-in 220ms var(--ease-out);
}
@keyframes pn-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .pn-pending-hub {
    padding: 16px 18px;
  }
  .pn-acc-trigger {
    padding: 14px 16px;
    gap: 10px;
  }
  .pn-acc-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.25rem;
  }
  .pn-acc-title {
    font-size: 0.98rem;
  }
  .pn-acc-sub {
    font-size: 0.76rem;
  }
  .pn-acc-pill {
    display: none;
  }
  .pn-acc-card .pn-panel {
    padding: 16px 14px;
  }
}

.pn-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pn-panel-head h2 { font-size: 1.3rem; font-weight: 900; letter-spacing: -0.02em; margin: 0; }
.pn-panel-head .btn { min-height: 38px; padding: 0 16px; font-size: 0.88rem; font-weight: 700; border-radius: 999px; }
.pn-panel-head .btn[aria-pressed="true"] { background: var(--n-950); color: var(--n-0); border-color: var(--n-950); }

/* ---------- 1. Tablero de números ---------- */
.pn-board-controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.pn-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pn-filters button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 0.88rem; color: var(--n-800);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 140ms ease-out;
}
.pn-filters button:hover { border-color: var(--n-400); background: var(--n-50); }
.pn-filters button span {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 7px; border-radius: 999px;
  background: var(--n-100); color: var(--n-700); font-weight: 800; font-size: 0.78rem; font-variant-numeric: tabular-nums;
}
.pn-filters button[aria-pressed="true"] {
  background: #0f172a; border-color: #0f172a; color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}
.pn-filters button[aria-pressed="true"] span { background: rgba(255, 255, 255, 0.22); color: #ffffff; }

.pn-search { flex: 1 1 220px; max-width: 340px; margin: 0; }
#pnPanel-compradores .pn-search { max-width: 100%; }
.pn-search .input {
  min-height: 42px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--surface); font-size: 0.9rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.pn-search .input:focus { border-color: #059669; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }

/* Rejilla de Números */
.pn-board {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px;
  margin-top: 4px;
}
@media (min-width: 640px) {
  .pn-board { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 10px; }
}

.pn-board .cell,
.pn-cell {
  position: relative;
  aspect-ratio: 1;
  min-height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-family: inherit;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .pn-cell:not(.is-paid):not(.is-reserved):hover {
    transform: translateY(-2px);
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
    color: #047857;
  }
}
.pn-cell:active { transform: scale(0.93); }

/* Reservado: Cálido, limpio y sin las feas rayas diagonales */
.pn-board .cell.is-reserved,
.pn-cell.is-reserved {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  color: #b45309;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.1);
}
.pn-board .cell.is-reserved::after,
.pn-cell.is-reserved::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
}
@media (hover: hover) and (pointer: fine) {
  .pn-cell.is-reserved:hover {
    border-color: #f59e0b;
    background: #fef3c7;
    transform: translateY(-2px);
  }
}

/* Pagado: Elegante pizarra/esmeralda */
.pn-board .cell.is-paid,
.pn-cell.is-paid {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}
@media (hover: hover) and (pointer: fine) {
  .pn-cell.is-paid:hover {
    background: #1e293b;
    border-color: #1e293b;
    transform: translateY(-2px);
  }
}

/* Ganador: Dorado radiante */
.pn-board .cell.is-winner,
.pn-cell.is-winner {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #b45309;
  color: #ffffff;
  font-weight: 900;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  z-index: 2;
}

/* Selección múltiple */
.pn-board .cell.is-selected,
.pn-cell.is-selected {
  outline: 3px solid #059669;
  outline-offset: 2px;
  background: #ecfdf5;
  color: #065f46;
  border-color: #059669;
  font-weight: 900;
  transform: scale(1.04);
}
.pn-board.is-multi .pn-cell:not(.is-paid):not(.is-reserved):not(.is-selected) {
  border-style: dashed;
  border-color: #94a3b8;
}

/* Leyenda del Tablero */
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 14px;
  padding: 12px 18px;
  background: var(--n-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--n-700);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.legend span i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
}
.legend span i.lg-reserved {
  background: #fffbeb;
  border-color: #fde68a;
  position: relative;
}
.legend span i.lg-reserved::after {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f59e0b;
  position: absolute;
  top: 2px;
  right: 2px;
}
.legend span i.lg-paid {
  background: #0f172a;
  border-color: #0f172a;
}
.legend span i.lg-winner {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #b45309;
}

.pn-selbar {
  position: sticky; bottom: 12px; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--n-950); color: var(--n-0); box-shadow: var(--shadow-md);
}
.pn-selbar p { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--n-0); }
.pn-selbar-actions { display: flex; gap: 8px; }
.pn-selbar .btn-ghost { color: var(--n-200); }
.pn-selbar .btn-ghost:hover { background: var(--n-800); color: var(--n-0); }

/* ---------- 2. Compradores y listas ---------- */
.pn-pay-summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 10px 14px; border-radius: var(--radius-md); background: var(--n-50); border: 1px solid var(--line);
}
.pn-pay-summary p { margin: 0; font-weight: 700; font-size: 0.9rem; overflow-wrap: anywhere; }
.pn-pay-summary .btn { min-height: 36px; padding: 0 12px; font-size: 0.85rem; }

.pn-list { display: grid; gap: 8px; }
.pn-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
  padding: 12px 14px; border-radius: var(--radius-md); background: var(--n-50); border: 1px solid var(--line);
}
.pn-row-main { min-width: 0; display: grid; gap: 2px; }
.pn-row-title { font-weight: 800; overflow-wrap: anywhere; }
.pn-row-sub { font-size: 0.86rem; color: var(--text-muted); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pn-row-side { display: grid; gap: 4px; justify-items: end; text-align: right; }
.pn-row-amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pn-row .btn { min-height: 38px; padding: 0 12px; font-size: 0.85rem; }
.pn-row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.pn-tag {
  display: inline-block; justify-self: start; padding: 2px 8px; border-radius: 99px;
  font-size: 0.74rem; font-weight: 800; background: var(--n-200); color: var(--n-800);
}
.pn-tag.is-warn { background: var(--accent-soft); color: var(--accent-ink); }
.pn-empty-row { padding: 16px; border-radius: var(--radius-md); background: var(--n-50); border: 1px dashed var(--n-300); color: var(--text-muted); font-size: 0.9rem; text-align: center; }

@media (max-width: 420px) {
  .pn-row { grid-template-columns: 1fr; }
  .pn-row-side { justify-items: start; text-align: left; grid-auto-flow: column; align-items: center; justify-content: space-between; }
}

.pn-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.pn-check input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }

/* ---------- 3. Difundir y ajustes (3 niveles con acordeones) ---------- */
.pn-share-hero {
  display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-md);
  background: var(--n-50); border: 1px solid var(--n-300);
}
.pn-share-hero-info h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 800; }
.pn-share-hero-info p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

.pn-section-group { display: grid; gap: 10px; padding-top: 6px; }
.pn-group-title { margin: 0; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.pn-materials-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.pn-group-link { font-size: 0.9rem; font-weight: 700; color: var(--ui-primary, #14532d); text-decoration: underline; text-underline-offset: 3px; }
.pn-group-link:hover { text-decoration-thickness: 2px; }

.pn-materials-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }

.pn-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.pn-tile {
  display: grid; gap: 8px; align-content: space-between; justify-items: start;
  padding: 16px; border-radius: var(--ui-radius); background: var(--ui-bg); border: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow-sm);
}
.pn-tile h3 { font-size: 0.98rem; font-weight: 800; letter-spacing: -0.01em; }
.pn-tile p { color: var(--text-muted); font-size: 0.86rem; line-height: 1.45; }

/* ---------- Acordeones plegables (<details class="pn-fold">) ---------- */
.pn-folds { display: grid; gap: 10px; }
.pn-fold { border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-surface); box-shadow: var(--ui-shadow-sm); overflow: hidden; }
.pn-fold[open] { border-color: var(--ui-border-strong); background: var(--ui-surface); }
.pn-sub-fold { margin-top: 6px; }

.pn-fold-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px;
  padding: 12px 16px; cursor: pointer; list-style: none; user-select: none; background: var(--n-50);
  transition: background-color 150ms ease;
}
.pn-fold-summary::-webkit-details-marker { display: none; }
.pn-fold-summary:hover { background: var(--n-100); }
.pn-fold-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pn-fold-summary-copy { display: block; flex: 1 1 200px; min-width: 0; }
.pn-fold-summary h3,
.pn-fold-title { display: block; margin: 0; font-size: 0.95rem; font-weight: 800; color: var(--text); line-height: 1.3; }
.pn-fold-summary p,
.pn-fold-sub { display: block; margin: 2px 0 0; font-size: 0.83rem; color: var(--text-muted); line-height: 1.4; }
.pn-fold-summary::after {
  content: '+'; flex-shrink: 0; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--text-muted); font-weight: 800; font-size: 1rem;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.pn-fold[open] > .pn-fold-summary { border-bottom: 1px solid var(--line); background: var(--n-100); }
.pn-fold[open] > .pn-fold-summary::after { content: '−'; color: var(--text); border-color: var(--n-500); }
.pn-fold-body { display: grid; gap: 12px; padding: 16px; background: var(--surface); }

/* ---------- Foto y vídeo del premio (RF-035 parte 3) ---------- */
.pn-media-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .pn-media-grid { grid-template-columns: 1fr 1fr; } }
.pn-media-col { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: var(--radius-sm); background: var(--n-50); border: 1px solid var(--line); }
.pn-col-label { font-size: 0.82rem; font-weight: 800; color: var(--text); }
.pn-media-current { width: 100%; display: grid; gap: 6px; justify-items: start; }
.pn-media-img { width: 100%; max-width: 320px; max-height: 180px; object-fit: contain; border-radius: var(--radius-sm); background: var(--n-200); }
.pn-media-video { width: 100%; max-width: 320px; max-height: 180px; border-radius: var(--radius-sm); background: #000; }
.pn-media-crop, .pn-media-box, .pn-media-recorder { display: grid; gap: 10px; width: 100%; justify-items: start; }
.pn-media-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.pn-media-tabs button { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); padding: 6px 12px; font: inherit; font-size: 0.84rem; font-weight: 700; cursor: pointer; }
.pn-media-tabs button[aria-pressed="true"] { background: var(--n-950); border-color: var(--n-950); color: var(--n-0); }
.pn-media-canvas { width: 100%; max-width: 320px; max-height: 240px; object-fit: contain; border-radius: var(--radius-sm); background: var(--n-200); touch-action: none; cursor: grab; }
.pn-media-canvas:active { cursor: grabbing; }
.pn-media-zoom { display: grid; gap: 4px; width: 100%; font-weight: 600; font-size: 0.85rem; }
.pn-media-timer { font-variant-numeric: tabular-nums; font-weight: 600; margin: 0; }

.pn-copy { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.pn-copy .input { flex: 1 1 180px; min-width: 0; font-variant-numeric: tabular-nums; }
.pn-addr-host { align-self: center; font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

/* ---------- Pantalla del local (RF-042) ---------- */
.pn-screen-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.pn-screen-qr { width: 140px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); line-height: 0; flex-shrink: 0; }
.pn-screen-qr img, .pn-screen-qr canvas { width: 100%; height: auto; }
.pn-screen-main { flex: 1 1 240px; min-width: 0; display: grid; gap: 10px; }
.pn-screen-options { display: grid; gap: 6px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--n-50); }
.pn-screen-options legend { padding: 0 4px; font-weight: 700; }
.pn-screen-options label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; }

/* ---------- 4. Sorteo y bolsa (RF-038) ---------- */
.pn-draw { display: grid; gap: 12px; }
.pn-box {
  display: grid; gap: 10px; justify-items: start;
  padding: 18px; border-radius: var(--radius-md); background: var(--n-50); border: 1px solid var(--line);
}
.pn-box h3 { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }
.pn-box p { color: var(--n-800); font-size: 0.92rem; }
.pn-box .pn-help { color: var(--text-muted); }
.pn-box .field { width: 100%; max-width: 360px; }
.pn-box.is-result { border: 2px solid var(--n-950); background: var(--surface); }
.pn-winner { font-size: clamp(2.2rem, 8vw, 3.2rem); font-weight: 800; letter-spacing: -0.04em; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.pn-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; overflow-wrap: anywhere; }
.pn-schedule { display: grid; gap: 14px; }
.pn-sch-group { display: grid; gap: 12px; }
.pn-notify { display: grid; gap: 6px; justify-items: start; }
#pnImageFormats { margin-bottom: 10px; }

.pn-bag {
  position: relative; display: grid; place-items: center; width: 100%; box-sizing: border-box; align-self: stretch;
  min-height: 190px; margin: 4px 0 8px; padding: 20px 16px; border-radius: 28px 28px 40px 40px; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #fff7e0, #f3e2b8); border: 2px solid var(--n-950);
}
.pn-bag-chips { position: absolute; inset: 0; }
.pn-bag-chip {
  position: absolute; padding: 3px 9px; border-radius: 999px; background: #fff; border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--n-800);
  animation: pn-bag-float 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * -0.27s);
}
.pn-bag-display {
  position: relative; z-index: 1; min-width: 3.2ch; padding: 6px 22px; border-radius: 16px; background: var(--n-950); color: #fff;
  font-size: clamp(2.6rem, 11vw, 4rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; text-align: center;
}
.pn-bag.is-drawing { animation: pn-bag-shake 0.28s linear infinite; }
.pn-bag.is-drawing .pn-bag-chip { animation-duration: 0.7s; }
.pn-bag.is-revealed .pn-bag-display { background: var(--accent); animation: pn-bag-pop 0.5s ease-out; }
@keyframes pn-bag-float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(5deg); } }
@keyframes pn-bag-shake { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-4px) rotate(-1.2deg); } 75% { transform: translateX(4px) rotate(1.2deg); } }
@keyframes pn-bag-pop { 0% { transform: scale(0.7); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .pn-bag-chip, .pn-bag.is-drawing, .pn-bag.is-drawing .pn-bag-chip, .pn-bag.is-revealed .pn-bag-display { animation: none; }
}
.pn-bag-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 5. Contactos ---------- */
.pn-aud { display: grid; gap: 14px; }
.pn-aud-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pn-aud-select { flex: 1 1 220px; max-width: 320px; margin: 0; }
.pn-aud-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pn-aud-new { display: grid; gap: 10px; max-width: 520px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- Diálogos (<dialog>) con el panel de home.css ---------- */
.pn-dialog {
  width: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 16px; border: 0; background: transparent;
  color: inherit; overflow-y: auto;
}
.pn-dialog[open] { display: flex; position: fixed; inset: 0; height: 100%; }
.pn-dialog::backdrop { background: rgb(22 19 15 / 0.55); }
.pn-dialog .dialog-panel { position: relative; }
.pn-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.pn-fieldset legend { padding: 0; }
.pn-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pn-dialog-actions .btn { flex: 1 1 140px; }
.pn-campaign-text { min-height: 180px; font-size: 0.92rem; }
.pn-canvas { padding: 8px; border-radius: var(--radius-md); background: var(--n-100); max-height: 56vh; overflow: auto; }
.pn-canvas canvas { width: 100%; height: auto; border-radius: var(--radius-sm); }

.pn-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 5px;
  gap: 6px;
  border-radius: var(--radius-md);
  background: var(--n-100);
}
.pn-segmented.is-two { grid-template-columns: 1fr 1fr; }
.pn-segmented label { position: relative; cursor: pointer; }
.pn-segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pn-segmented span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--n-700);
  transition: all 140ms ease-out;
}
.pn-segmented input:checked + span {
  background: var(--surface);
  color: var(--n-950);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.pn-segmented input[value="reservado"]:checked + span {
  background: #fffbeb;
  color: #b45309;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}
.pn-segmented input[value="pagado"]:checked + span {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}
.pn-segmented input:focus-visible + span {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* ---------- Pie y Toast ---------- */
.pn-footer { padding: 20px 0 36px; border-top: 1px solid var(--ui-border); font-size: 0.88rem; }
.pn-footer .wrap { max-width: 1200px; padding: 0 1.5rem; display: flex; flex-wrap: wrap; gap: 4px 20px; }
@media (max-width: 1023.98px) {
  .pn-footer .wrap { padding: 0 1rem; }
}
.pn-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); font-weight: 600; text-decoration: none; }
.pn-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Notificación Toast Ultra-Moderna (Heads-Up Banner) ---------- */
.pn-toast {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 99999;
  
  display: flex;
  align-items: center;
  gap: 12px;
  
  width: max-content;
  min-width: 280px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 13px 20px;
  box-sizing: border-box;
  
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -0.01em;
  text-align: left;
  
  box-shadow: 
    0 20px 40px -8px rgba(0, 0, 0, 0.5),
    0 4px 14px -2px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 24px -2px rgba(16, 185, 129, 0.22);
  
  opacity: 0;
  transform: translate(-50%, -150%) scale(0.96);
  transition: 
    transform 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.2),
    opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease;
  pointer-events: none;
  cursor: pointer;
  user-select: none;
}

.pn-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

.pn-toast:active {
  transform: translate(-50%, 2px) scale(0.98);
}

.pn-toast::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}

.pn-toast.is-push::before {
  content: '🔔';
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 0.85rem;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.pn-toast.is-error {
  background: rgba(28, 11, 16, 0.95);
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 
    0 20px 40px -8px rgba(0, 0, 0, 0.5),
    0 4px 14px -2px rgba(0, 0, 0, 0.25),
    0 0 24px -2px rgba(239, 68, 68, 0.3);
}

.pn-toast.is-error::before {
  content: '✕';
  background: rgba(239, 68, 68, 0.22);
  color: #f87171;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

@media (max-width: 640px) {
  .pn-toast {
    top: calc(12px + env(safe-area-inset-top, 0px));
    min-width: 0;
    width: calc(100vw - 24px);
    max-width: 440px;
    padding: 11px 15px;
    font-size: 0.84rem;
    border-radius: 14px;
    gap: 10px;
  }
}

/* ---------- Botones de cabecera en panel de organizador ---------- */
#pnPushHeaderBtn.pn-header-push-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; min-width: 38px; min-height: 38px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: 1.05rem; cursor: pointer; transition: all 0.15s ease;
}
#pnPushHeaderBtn.pn-header-push-btn:hover {
  background: var(--n-100); border-color: var(--n-300);
}
#pnPushHeaderBtn.pn-header-push-btn.is-active {
  background: rgba(11, 110, 79, 0.08); border-color: rgba(11, 110, 79, 0.25); color: var(--accent);
}
#pnPushHeaderBtn .pn-push-badge-dot {
  display: none;
}
#pnPushHeaderBtn.is-active .pn-push-badge-dot {
  display: block; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: #10b981; box-shadow: 0 0 0 2px var(--surface), 0 0 6px rgba(16, 185, 129, 0.6);
}
.pn-push-text {
  display: none;
}

#pnNewRaffle {
  height: 38px; min-height: 38px; padding: 0 16px; border-radius: 99px;
  background: linear-gradient(135deg, #0B6E4F 0%, #08523b 100%); color: #ffffff;
  font-size: 0.88rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 8px rgba(11, 110, 79, 0.22); text-decoration: none; white-space: nowrap;
  transition: all 0.15s ease; border: none;
}
#pnNewRaffle:hover {
  transform: translateY(-1px); box-shadow: 0 4px 14px rgba(11, 110, 79, 0.32); color: #ffffff;
}
#pnNewRaffle:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .site-header .wrap { gap: 8px; }
  .site-header .brand-name { font-size: 1.15rem; }
  .site-header .header-actions { gap: 6px; }
  .pn-body .account-name { max-width: 8ch; }
  #pnNewRaffle { padding: 0 11px; font-size: 0.82rem; height: 36px; min-height: 36px; }
  #pnPushHeaderBtn.pn-header-push-btn { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
}

/* ---------- Pagos, plan y vista general (RF-039 y adenda B) ---------- */
.pn-billing { display: grid; gap: 12px; margin-bottom: 8px; }
.pn-billing-notice {
  padding: 12px 16px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 0.95rem;
}
.pn-billing-notice[data-tone="ok"] { background: var(--accent-soft); color: var(--accent-ink); border-color: #a7f3d0; }
.pn-billing-notice[data-tone="warn"] { background: var(--n-200); }
/* RF-048: banner de compra de rifas. Tinta oscura y esmeralda; sin formularios, lleva a /comprar. */
.pn-banner {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px 18px; align-items: center;
  padding: 18px 22px; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--n-950); color: var(--n-0); border: 1px solid var(--n-950);
}
.pn-banner::after { content: ''; position: absolute; inset: auto -40px -60px auto; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(closest-side, var(--accent-glow), transparent); pointer-events: none; }
.pn-banner[data-tone="info"] { background: var(--surface); color: var(--n-900); border-color: var(--line); }
.pn-banner[data-tone="info"]::after { display: none; }
.pn-banner[data-tone="warn"] { background: var(--amber-soft); color: var(--n-900); border-color: var(--amber); }
.pn-banner[data-tone="warn"]::after { display: none; }
.pn-banner-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent); flex: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9a2 2 0 002-2V6h14v1a2 2 0 002 2v2a2 2 0 00-2 2v1a2 2 0 002 2v2h-3M3 9v2a2 2 0 012 2v1a2 2 0 01-2 2v2h14'/%3E%3Cpath d='M12 7v10' stroke-dasharray='1 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 26px;
}
.pn-banner[data-tone="warn"] .pn-banner-icon { background-color: var(--amber); }
.pn-banner-body { display: grid; gap: 2px; min-width: 0; }
.pn-banner-kicker { margin: 0; font-size: 0.74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-bright); }
.pn-banner[data-tone="info"] .pn-banner-kicker { color: var(--accent-ink); }
.pn-banner[data-tone="warn"] .pn-banner-kicker { color: #92400e; }
.pn-banner h2 { margin: 0; font-family: var(--display); font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.pn-banner-text { margin: 4px 0 0; font-size: 0.92rem; line-height: 1.45; color: rgba(255,255,255,.78); max-width: 62ch; }
.pn-banner[data-tone="info"] .pn-banner-text, .pn-banner[data-tone="warn"] .pn-banner-text { color: var(--n-700); }
.pn-banner-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.pn-banner .btn { width: auto; }
.pn-banner[data-tone="promo"] .btn-primary { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--n-950); }
@media (min-width: 760px) {
  .pn-banner { grid-template-columns: auto 1fr auto; padding: 20px 26px; }
  .pn-banner-actions { grid-column: auto; justify-content: flex-end; }
}
.pn-billing-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.pn-return { display: grid; gap: 18px; justify-items: start; }
.pn-return > * { max-width: 100%; }
.pn-return-head { display: grid; gap: 4px; }
.pn-return[data-tone] .pn-title::before { content: ''; display: block; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 50%; }
.pn-return[data-tone="ok"] .pn-title::before {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 24px no-repeat;
}
.pn-return[data-tone="wait"] .pn-title::before { border: 4px solid var(--n-200); border-top-color: var(--accent); animation: pn-spin 900ms linear infinite; }
.pn-return[data-tone="warn"] .pn-title::before { display: none; }
@keyframes pn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pn-return[data-tone="wait"] .pn-title::before { animation: none; } }
.pn-return .pn-lead { margin: 4px 0 0; }
.pn-return-share { width: 100%; max-width: 560px; display: grid; gap: 8px; }
.pn-return-label { font-weight: 700; font-size: 0.92rem; }

.pn-plans, .pn-upgrade {
  width: 100%; display: grid; gap: 12px; justify-items: start;
  padding: clamp(16px, 3vw, 22px); border-radius: var(--radius-lg); background: var(--n-100); border: 1px solid var(--line);
}
.pn-upgrade-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.pn-upgrade-copy { flex: 1 1 260px; display: grid; gap: 2px; }
.pn-plans h2, .pn-upgrade h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.pn-plans-lead, .pn-upgrade #pnUpgradeText { color: var(--n-800); max-width: 60ch; font-size: 0.9rem; }
.pn-plans-terms { max-width: 64ch; }
.pn-upgrade-body { width: 100%; display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.pn-plan-grid { width: 100%; display: grid; gap: 12px; }
@media (min-width: 680px) { .pn-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pn-plan {
  display: grid; gap: 12px; align-content: start; justify-items: start; padding: 20px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.pn-plan-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; width: 100%; }
.pn-plan h3 { font-size: 1.1rem; font-weight: 800; }
.pn-plan-price { font-size: 1.15rem; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.pn-plan-perks { display: grid; gap: 6px; font-size: 0.92rem; color: var(--n-800); }
.pn-plan-perks li { position: relative; padding-left: 20px; }
.pn-plan-perks li::before { content: ''; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.pn-plan-math { font-size: 0.88rem; font-weight: 600; color: var(--n-800); padding: 10px 12px; border-radius: var(--radius-sm); background: var(--n-50); }

/* =========================================================================
   DASHBOARD DEL ORGANIZADOR & MIS RIFAS (RF-039 adenda B)
   ========================================================================= */
.pn-overview {
  display: grid;
  gap: 24px;
}

.pn-overview-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.pn-overview-heading {
  display: grid;
  gap: 4px;
  max-width: 720px;
}

/* Pestañas de Navegación */
.pn-overview-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  background: var(--n-100);
  border-radius: var(--radius-md);
  width: fit-content;
  max-width: 100%;
}

.pn-ovtab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--n-700);
  cursor: pointer;
  transition: all 140ms ease-out;
}
@media (max-width: 480px) {
  .pn-overview-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pn-ovtab {
    padding: 8px 10px;
    font-size: 0.88rem;
  }
}

.pn-ovtab:hover {
  color: var(--n-950);
  background: rgba(255, 255, 255, 0.6);
}

.pn-ovtab.is-active {
  background: var(--surface);
  color: var(--n-950);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Alertas Operativas / Action Center */
.pn-action-alerts {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.pn-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.pn-alert-banner .pn-alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.pn-alert-content {
  flex: 1 1 240px;
  display: grid;
  gap: 2px;
}

.pn-alert-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: inherit;
}

.pn-alert-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: inherit;
  opacity: 0.92;
}

.pn-alert-btn {
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.pn-alert-urgent {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  color: #92400e;
}
.pn-alert-urgent .pn-alert-btn {
  background: #d97706;
  color: #ffffff;
  border: none;
}
.pn-alert-urgent .pn-alert-btn:hover {
  background: #b45309;
}

.pn-alert-action {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
}
.pn-alert-action .pn-alert-btn {
  background: #059669;
  color: #ffffff;
  border: none;
}
.pn-alert-action .pn-alert-btn:hover {
  background: #047857;
}

.pn-alert-info {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: #334155;
}
.pn-alert-info .pn-alert-btn {
  background: #0284c7;
  color: #ffffff;
  border: none;
}

.pn-alert-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Cuadrícula de KPIs */
.pn-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}

.pn-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow-sm);
}

.pn-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pn-kpi-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.pn-kpi-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pn-kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.pn-kpi-emerald .pn-kpi-value { color: #047857; }
.pn-kpi-amber .pn-kpi-value { color: #b45309; }
.pn-kpi-indigo .pn-kpi-value { color: #4338ca; }
.pn-kpi-teal .pn-kpi-value { color: #0f766e; }

.pn-kpi-minitrack {
  width: 100%;
  height: 6px;
  background: var(--n-200);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.pn-kpi-minifill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  transition: width 300ms ease;
}

.pn-kpi-sub {
  font-size: 0.82rem;
  color: var(--n-600);
  font-weight: 500;
}

/* Grupos y Tarjetas de Rifas */
.pn-raffles-section {
  display: grid;
  gap: 24px;
}

.pn-overview-group {
  display: grid;
  gap: 14px;
}

.pn-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pn-badge-counter {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pn-rlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.pn-rcard {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.pn-rcard-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  overflow: hidden;
  box-shadow: var(--ui-shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .pn-rcard-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -4px rgba(11, 110, 79, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #10b981;
  }
  .pn-rcard-link:hover .pn-rcard-img {
    transform: scale(1.03);
  }
  .pn-rcard-link:hover .pn-rcard-go {
    transform: translateX(3px);
    color: #047857;
  }
}

.pn-rcard-link:active {
  transform: scale(0.99);
}

.pn-rcard.is-new .pn-rcard-link {
  border: 2px solid #059669;
  background: #f0fdf4;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.14);
}

/* Media Thumbnail */
.pn-rcard-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f8fafc;
  overflow: hidden;
}

.pn-rcard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.pn-rcard-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
}

.pn-rcard-emoji {
  font-size: 3.2rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.pn-rcard-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  z-index: 2;
}

.pn-rcard-overlay .pn-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--line);
}

.pn-pill-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}

.pn-pill[data-tone="live"] .pn-pill-dot { background: #10b981; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3); }
.pn-pill[data-tone="live"] { color: #065f46; border-color: #a7f3d0; }
.pn-pill[data-tone="draft"] .pn-pill-dot { background: #6366f1; }
.pn-pill[data-tone="draft"] { color: #4338ca; border-color: #c7d2fe; }
.pn-pill[data-tone="paused"] .pn-pill-dot { background: #f59e0b; }
.pn-pill[data-tone="paused"] { color: #92400e; border-color: #fde68a; }
.pn-pill[data-tone="done"] .pn-pill-dot { background: #64748b; }
.pn-pill[data-tone="done"] { color: #334155; border-color: #cbd5e1; }
.pn-pill[data-tone="off"] .pn-pill-dot { background: #ef4444; }
.pn-pill[data-tone="off"] { color: #991b1b; border-color: #fecaca; }

.pn-rcard-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

/* Cuerpo de la Tarjeta */
.pn-rcard-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 10px;
}

.pn-rcard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pn-rcard-chips .pn-chip {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--n-50);
  color: var(--n-800);
  cursor: default;
}

.pn-rcard-chips .pn-chip-price {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
  font-weight: 800;
}

.pn-rcard-chips .pn-chip-delivery {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.pn-rcard-chips .pn-chip-date {
  background: #fdf4ff;
  color: #86198f;
  border-color: #f5d0fe;
}

.pn-rcard-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--n-950);
  overflow-wrap: anywhere;
}

.pn-rcard-prize {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Barra de Progreso */
.pn-rcard-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.pn-rcard-track {
  width: 100%;
  height: 8px;
  background: var(--n-200);
  border-radius: 999px;
  overflow: hidden;
}

.pn-rcard-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  transition: width 300ms ease;
}

.pn-rcard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.pn-rcard-sold {
  font-weight: 700;
  color: var(--n-800);
}

.pn-rcard-collected {
  font-weight: 800;
  color: #047857;
}

/* Avisos en la Tarjeta */
.pn-rcard-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
}

.pn-notice-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.pn-notice-winner {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* Pie de Acción */
.pn-rcard-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.pn-rcard-go {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-ink);
  transition: transform 120ms ease, color 120ms ease;
}

/* Estudio rápido de WhatsApp en la pestaña Difundir y modal de imagen */
.pn-wa-studio {
  display: grid; gap: 10px;
}
.pn-fold-body.pn-wa-studio {
  margin-top: 0; border-top: 0; padding: 16px;
}
.pn-wa-studio-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
}
.pn-wa-tpls { display: flex; flex-wrap: wrap; gap: 6px; }
.pn-chip {
  min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--n-800);
  cursor: pointer; transition: background 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
}
.pn-chip[aria-pressed="true"] {
  background: var(--n-950); color: var(--n-0); border-color: var(--n-950);
}
.pn-wa-textarea {
  width: 100%; font: inherit; font-size: 0.9rem; line-height: 1.48;
  padding: 10px 12px; border-radius: var(--radius-sm); resize: vertical;
  background: var(--surface); border: 1px solid var(--line);
}
.pn-image-caption-field { margin-top: 4px; }

/* Cabecera del tablero: acciones en fila y a todo el ancho en móvil */
.pn-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) {
  .pn-head-actions { width: 100%; }
  .pn-head-actions .btn { flex: 1 1 100%; min-height: 46px; }
  .pn-search { max-width: 100%; flex-basis: 100%; }
}

/* Móvil: nada del panel puede ensanchar la página (los hijos de la rejilla y los botones largos se ajustan) */
.pn-wrap > * { min-width: 0; }
.pn-pending-hub .btn, .pn-push-banner .btn, .pn-panel .btn { white-space: normal; text-align: center; }
.pn-app, .pn-sections { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 959px) { .pn-workspace { grid-template-columns: minmax(0, 1fr); } }
.pn-sections > *, .pn-workspace > *, .pn-app > * { min-width: 0; }

/* RF-042: Acceso destacado a Pantalla del local (TV / Tablet / Monitor) */
.pn-screen-bar-btn {
  border-color: rgba(5, 150, 105, 0.35);
  color: #065f46;
  background: #ecfdf5;
}
.pn-screen-bar-btn:hover {
  background: #d1fae5;
  border-color: #059669;
}

.pn-screen-spotlight {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}
.pn-screen-spotlight.hidden,
.pn-screen-spotlight[hidden] { display: none !important; }

.pn-screen-spot-copy {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 60ch;
}
.pn-screen-spot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.38);
  color: #6ee7b7;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.pn-screen-spot-copy h2,
.pn-screen-spot-copy h4 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}
.pn-screen-spot-copy p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.pn-screen-spot-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  flex: 1 1 210px;
  max-width: 280px;
}
.pn-screen-spot-play {
  background: #10b981;
  border-color: #10b981;
  color: #042f2e;
  font-weight: 800;
  min-height: 44px;
}
.pn-screen-spot-play:hover {
  background: #34d399;
  border-color: #34d399;
  color: #022c22;
}
.pn-screen-spot-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pn-screen-spot-sec {
  flex: 1 1 auto;
  min-height: 40px;
  font-size: 0.82rem;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}
.pn-screen-spot-sec:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

@media (max-width: 780px) {
  .pn-screen-spotlight {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .pn-screen-spot-actions {
    max-width: none;
  }
  .pn-screen-spot-sub {
    width: 100%;
  }
}

/* Lista de contactos manual y envío por email/WhatsApp */
.pn-aud-add-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 780px) {
  .pn-aud-add-form {
    grid-template-columns: 1fr;
  }
}
.pn-campaign-email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.pn-campaign-email-box strong {
  display: block;
  font-size: 0.92rem;
  color: #065f46;
}
.pn-campaign-email-box .pn-help {
  margin: 2px 0 0;
}
.pn-campaign-wa-wrap {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.pn-campaign-wa-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pn-campaign-wa-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.86rem;
}
.pn-campaign-wa-list li .btn {
  padding: 4px 10px;
  font-size: 0.78rem;
  min-height: 32px;
}

/* Propuesta de instalación PWA en móvil */
.pn-install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 100%);
  border: 1.5px solid #86efac;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.08);
}
.pn-install-banner.hidden { display: none; }
.pn-install-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 260px;
}
.pn-install-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}
.pn-install-copy strong {
  display: block;
  font-size: 0.96rem;
  color: #064e3b;
}
.pn-install-copy p {
  margin: 3px 0 0;
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.4;
}
.pn-install-ios {
  margin-top: 6px !important;
  padding: 6px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a !important;
}
.pn-install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pn-install-actions .btn { min-height: 44px; }
@media (max-width: 600px) {
  .pn-install-actions { width: 100%; }
  .pn-install-actions .btn { flex: 1 1 auto; }
}

/* Notificación sutil para completar perfil de organizador */
.pn-profile-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.pn-profile-nudge.hidden { display: none; }
.pn-profile-nudge-copy {
  flex: 1 1 280px;
}
.pn-profile-nudge-copy strong {
  display: block;
  font-size: 0.92rem;
  color: #78350f;
}
.pn-profile-nudge-copy p {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: #713f12;
  line-height: 1.4;
}
.pn-profile-nudge-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pn-nudge-never {
  border: 0;
  background: none;
  padding: 6px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #78350f;
  text-decoration: underline;
  cursor: pointer;
}
.pn-nudge-never:hover {
  color: #451a03;
}

/* ---------- Banners de avisos push (sin estilos en línea) ---------- */
.pn-push-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid #a7f3d0;
  box-shadow: 0 2px 8px rgba(11, 110, 79, 0.06);
}
.pn-push-banner.hidden,
.pn-push-banner[hidden] {
  display: none !important;
}
.pn-push-banner-app {
  background: #f0fdf4;
  border-color: #86efac;
  box-shadow: none;
}
.pn-push-banner-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 240px;
}
.pn-push-banner-ico {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.pn-push-banner-title {
  margin: 0;
  font-weight: 800;
  color: #0b6e4f;
  font-size: 0.96rem;
}
.pn-push-banner-app .pn-push-banner-title {
  color: #166534;
}
.pn-push-banner-desc {
  margin: 0.2rem 0 0;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.4;
}
.pn-push-banner-app .pn-push-banner-desc {
  color: #15803d;
}
.pn-push-banner-btn {
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}
@media (max-width: 560px) {
  .pn-push-banner-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Acogida serena de nuevo organizador (#pnEmpty) — 100 % responsive ---------- */
.pn-empty {
  width: 100%;
  max-width: 920px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.pn-empty.hidden,
.pn-empty[hidden] {
  display: none !important;
}

.pn-empty-card {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
  padding: clamp(20px, 3.5vw, 32px);
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.pn-empty-head {
  display: grid;
  gap: 10px;
  justify-items: start;
  max-width: 64ch;
}
.pn-empty-head .pn-title {
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  line-height: 1.16;
}
.pn-empty-head .pn-lead {
  margin: 0;
  max-width: 58ch;
  font-size: 0.98rem;
  line-height: 1.55;
}
.pn-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.pn-empty-actions .btn {
  min-height: 46px;
}

.pn-empty-guide {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}
.pn-empty-steps-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.pn-empty-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
@media (min-width: 768px) {
  .pn-empty-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.pn-empty-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--n-50);
  border: 1px solid var(--line);
  min-width: 0;
}
.pn-step-badge {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.82rem;
  font-weight: 800;
}
.pn-empty-steps li strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}
.pn-empty-steps li span:not(.pn-step-badge) {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

@media (max-width: 600px) {
  .pn-empty-actions {
    width: 100%;
  }
  .pn-empty-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (pointer: coarse) {
  .pn-chip,
  .pn-quick-chip,
  .pn-filters button,
  .pn-back,
  .pn-nudge-never,
  .pn-panel-head .btn,
  .pn-pay-summary .btn,
  .pn-row .btn,
  #pnPushHeaderBtn.pn-header-push-btn {
    min-height: 44px;
  }
  #pnPushHeaderBtn.pn-header-push-btn {
    min-width: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pn-pill[data-tone="live"] span,
  .pn-acc-pill.pn-acc-pill-amber { animation: none; }
  .pn-toast,
  .pn-acc-arrow { transition: none; }
}

/* Pantallas: código de tele de la rifa (abre su pantalla desde /tv con el mando). */
.pn-tv-code { display: grid; gap: 4px; justify-items: start; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--ui-radius, 10px); background: #0f172a; color: #f8fafc; }
.pn-tv-code__label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #cbd5e1; }
.pn-tv-code__value { font-size: 2.2rem; font-weight: 800; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pn-tv-code__help { font-size: 0.9rem; color: #e2e8f0; }
.pn-tv-code__help strong { color: #86efac; }

/* ---------- RF-060: nota del participante y franja de cobros ---------- */
.pn-note {
  display: block;
  font-size: 0.85rem;
  font-style: italic;
  color: #374151;
  overflow-wrap: anywhere;
}
.pn-cobros-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 12px 16px;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  background: #fef3c7;
  color: #78350f;
  font-weight: 800;
  text-decoration: none;
  min-height: 48px;
}
.pn-cobros-strip:hover { background: #fde68a; }
.pn-cobros-strip:focus-visible { outline: 3px solid #b45309; outline-offset: 2px; }
.pn-cobros-strip__go { white-space: nowrap; color: #92400e; }
