/* NEXORA v24 — dark-surface text readability */

/* Any intentionally dark/black surface gets light, high-contrast typography. */
.n19-hero,
.n19-hero *,
.n19-story-hero,
.n19-story-hero *,
.n19-support-card,
.n19-support-card *,
.n19-payment-result,
.n19-payment-result *,
.n19-admin-side,
.n19-admin-side *,
.n19-admin-main .kpi,
.n19-admin-main .kpi *,
.n19-admin-mark,
.n19-admin-mark *,
.n19-art-core,
.n19-art-core *,
.toast,
.toast *,
.drawer-panel.dark,
.drawer-panel.dark *,
.modal.dark,
.modal.dark *,
.dark-surface,
.dark-surface *,
.bg-dark,
.bg-dark * {
  color: #f5f7fb !important;
}

/* Secondary copy on dark surfaces remains bright enough to read. */
.n19-hero p,
.n19-hero-note strong,
.n19-hero-stamp small,
.n19-story-hero p,
.n19-support-card p,
.n19-payment-result p,
.n19-payment-result .eyebrow,
.n19-admin-side button,
.n19-admin-side button span,
.n19-admin-main .kpi span,
.n19-art-core small,
.dark-surface p,
.dark-surface small,
.dark-surface .muted,
.bg-dark p,
.bg-dark small,
.bg-dark .muted {
  color: #d5dbe5 !important;
}

/* Keep accent elements vivid on dark surfaces. */
.n19-hero h1 em,
.n19-hero-number,
.n19-hero-note span,
.n19-story-hero h1 em,
.n19-support-card .btn-primary,
.n19-payment-result .n19-payment-icon svg,
.n19-payment-actions .btn-primary,
.n19-admin-mark,
.n19-admin-side button.active,
.n19-admin-side .nav-badge {
  color: #d9ff45 !important;
}

/* Buttons on dark surfaces need readable labels too. */
.n19-hero .btn-primary,
.n19-payment-actions .btn-primary,
.n19-support-card .btn-primary {
  color: #151617 !important;
}

.n19-hero .n19-text-link,
.n19-payment-actions .btn-ghost,
.n19-support-card a:not(.btn-primary),
.n19-support-card button:not(.btn-primary) {
  color: #f5f7fb !important;
}

/* Dark admin inputs / selects / textareas should never contain black text. */
.n19-admin-side input,
.n19-admin-side textarea,
.n19-admin-side select,
.n19-admin-main .kpi input,
.n19-admin-main .kpi textarea,
.n19-admin-main .kpi select,
.n19-admin-shell .dark input,
.n19-admin-shell .dark textarea,
.n19-admin-shell .dark select,
.dark-surface input,
.dark-surface textarea,
.dark-surface select,
.bg-dark input,
.bg-dark textarea,
.bg-dark select {
  color: #f5f7fb !important;
  caret-color: #f5f7fb !important;
}

.dark-surface input::placeholder,
.dark-surface textarea::placeholder,
.bg-dark input::placeholder,
.bg-dark textarea::placeholder {
  color: #aeb7c5 !important;
  opacity: 1 !important;
}

/* Tables / list rows that use a dark background keep all text readable. */
.n19-admin-shell .dark table,
.n19-admin-shell .dark table th,
.n19-admin-shell .dark table td,
.dark-surface table,
.dark-surface table th,
.dark-surface table td,
.bg-dark table,
.bg-dark table th,
.bg-dark table td {
  color: #f5f7fb !important;
}

.n19-admin-shell .dark table th,
.dark-surface table th,
.bg-dark table th {
  color: #dce3ec !important;
}

/* Native select options inherit a readable dark palette where supported. */
.dark-surface option,
.bg-dark option,
.n19-admin-shell .dark option {
  background: #15191f !important;
  color: #f5f7fb !important;
}
