/* Fase G — Dark mode más fino */
html.nv-dark {
  color-scheme: dark;
}
html.nv-dark body,
body.nv-dark {
  --nv-bg: #0b1220;
  --nv-bg-soft: #111827;
  --nv-surface: #1e293b;
  --nv-text: #e8eef7;
  --nv-text-muted: #94a3b8;
  --nv-border: #2d3a4f;
  --nv-header-bg: #0f172a;
  --nv-link: #93c5fd;
  --nv-link-hover: #bfdbfe;
  background: var(--nv-bg);
  color: var(--nv-text);
}
html.nv-dark .nv-header,
html.nv-dark .nv-mainbar,
html.nv-dark .nv-menubar,
html.nv-dark .nv-topbar,
html.nv-dark .nv-mobile-drawer {
  background: var(--nv-header-bg) !important;
  border-color: var(--nv-border) !important;
  color: var(--nv-text);
}
html.nv-dark .nv-card,
html.nv-dark .nv-list-item,
html.nv-dark .nv-widget,
html.nv-dark .nv-sidebar .widget,
html.nv-dark .nv-footer,
html.nv-dark .nv-single__body,
html.nv-dark .nv-author-box,
html.nv-dark .nv-related {
  background: var(--nv-surface) !important;
  border-color: var(--nv-border) !important;
  color: var(--nv-text);
}
html.nv-dark .nv-single__title,
html.nv-dark .nv-card__title a,
html.nv-dark .nv-list-item__title a,
html.nv-dark h1, html.nv-dark h2, html.nv-dark h3 {
  color: #f8fafc !important;
}
html.nv-dark a { color: var(--nv-link); }
html.nv-dark a:hover { color: var(--nv-link-hover); }
html.nv-dark .nv-meta,
html.nv-dark .nv-card__excerpt,
html.nv-dark .nv-list-item__excerpt,
html.nv-dark .nv-single__excerpt {
  color: var(--nv-text-muted) !important;
}
html.nv-dark input,
html.nv-dark textarea,
html.nv-dark select {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html.nv-dark .nv-badge,
html.nv-dark .nv-badge-tipo {
  filter: saturate(1.05) brightness(1.05);
}
html.nv-dark img { opacity: .96; }
html.nv-dark .nv-theme-toggle {
  background: #1e293b;
  border: 1px solid #475569;
  color: #fde68a;
  box-shadow: 0 0 0 1px rgba(253, 230, 138, .15);
}

/* Newsletter */
.nv-newsletter {
  margin: 1.75rem 0;
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  background: linear-gradient(135deg, #5B4DFF 0%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 12px 32px rgba(91, 77, 255, .25);
}
.nv-newsletter__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.nv-newsletter__title { display: block; font-size: 1.15rem; margin-bottom: .35rem; }
.nv-newsletter__text { margin: 0; opacity: .92; font-size: .95rem; max-width: 36rem; }
.nv-newsletter__form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.nv-newsletter__form input[type=email] {
  min-width: 200px;
  flex: 1;
  padding: .7rem .9rem;
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
}
.nv-newsletter__btn {
  padding: .7rem 1.15rem;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  background: #0f172a;
  color: #fff;
}
.nv-newsletter__hint { margin: .5rem 0 0; font-size: .8rem; opacity: .85; }
html.nv-dark .nv-newsletter {
  background: linear-gradient(135deg, #312e81, #0e7490);
}
.nv-nl-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100001;
  background: #166534;
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* Quick edit */
.nv-qe-bar {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 99990;
  display: flex;
  gap: .5rem;
  align-items: center;
}
.nv-qe-bar__toggle,
.nv-qe-bar__admin {
  border: 0;
  border-radius: 999px;
  padding: .55rem 1rem;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15,23,42,.2);
}
.nv-qe-bar__toggle { background: #5B4DFF; color: #fff; }
.nv-qe-bar__admin { background: #0f172a; color: #e2e8f0; }
.nv-qe-panel {
  position: fixed;
  bottom: 4rem;
  right: 1rem;
  z-index: 99991;
  width: min(380px, calc(100vw - 2rem));
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 16px 40px rgba(15,23,42,.25);
  border: 1px solid #e2e8f0;
}
html.nv-dark .nv-qe-panel {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
.nv-qe-panel label {
  display: block;
  font-weight: 600;
  font-size: .85rem;
  margin-bottom: .75rem;
}
.nv-qe-panel input,
.nv-qe-panel textarea {
  width: 100%;
  margin-top: .35rem;
  padding: .55rem .7rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
}
.nv-qe-actions { display: flex; gap: .5rem; }
.nv-qe-save {
  background: #5B4DFF;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: .55rem 1rem;
  font-weight: 700;
  cursor: pointer;
}
.nv-qe-close {
  background: #e2e8f0;
  border: 0;
  border-radius: 8px;
  padding: .55rem 1rem;
  cursor: pointer;
}
.nv-qe-status { font-size: .85rem; margin: .5rem 0 0; color: #64748b; }

.nv-newsletter__seg {
  padding: .65rem .7rem;
  border: 0;
  border-radius: 10px;
  font-size: .95rem;
}
.nv-push-bar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99970;
  display: flex;
  gap: .5rem;
  align-items: center;
  background: #0f172a;
  color: #fff;
  padding: .75rem 1rem;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  max-width: calc(100vw - 1.5rem);
  font-size: .9rem;
}
.nv-push-bar__btn {
  border: 0;
  border-radius: 999px;
  padding: .45rem .9rem;
  font-weight: 700;
  cursor: pointer;
  background: #5B4DFF;
  color: #fff;
}
.nv-push-bar__close {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
}
