/* Dark theme for provider onboarding. Loaded after step CSS so it wins
   over hardcoded #1a5dcb / #fff in those sheets. Tokens match login. */

[data-theme="dark"] .reg-page,
[data-theme="dark"] .reg-page:has(.reg-stage--modules),
[data-theme="dark"] .reg-page:has(.reg-stage--extra-modules) {
  background: var(--color-background);
}

[data-theme="dark"] .reg-stepper__dot,
[data-theme="dark"] .reg-page:has(.reg-stage--modules) .reg-stepper__dot,
[data-theme="dark"] .reg-page:has(.reg-stage--extra-modules) .reg-stepper__dot {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-stepper__item--active-first .reg-stepper__dot {
  background: var(--color-background);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

[data-theme="dark"] .reg-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-card);
}

[data-theme="dark"] .reg-card__dot {
  background: var(--color-surface-secondary);
}

[data-theme="dark"] .reg-card__dot--active {
  background: var(--color-primary);
}

[data-theme="dark"] .reg-card__heading,
[data-theme="dark"] .reg-card__heading--center,
[data-theme="dark"] .reg-card__divider,
[data-theme="dark"] .reg-success-line,
[data-theme="dark"] .reg-card__link,
[data-theme="dark"] .reg-field__toggle:hover {
  color: var(--color-primary);
}

[data-theme="dark"] .reg-card__divider {
  background: var(--color-primary);
}

[data-theme="dark"] .reg-field__label,
[data-theme="dark"] .reg-summary-card__heading,
[data-theme="dark"] .reg-summary-plan__period,
[data-theme="dark"] .reg-summary-business-edit__logo-hint,
[data-theme="dark"] .reg-confirm-resumen__line,
[data-theme="dark"] .reg-confirm-summary__footnote,
[data-theme="dark"] .reg-confirm-next__item-title,
[data-theme="dark"] .reg-confirm-next__desc {
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-field__label-note,
[data-theme="dark"] .reg-card__sub,
[data-theme="dark"] .reg-card__instructions,
[data-theme="dark"] .reg-username-suggestions__label {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .reg-field__input,
[data-theme="dark"] .reg-summary-field__input,
[data-theme="dark"] .reg-summary-discount__input {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border);
  box-shadow: 0 4px 4px var(--color-shadow-light);
}

[data-theme="dark"] .ppms-cat-dropdown {
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  -webkit-text-fill-color: var(--color-text-primary);
  box-shadow: 0 4px 4px var(--color-shadow-light);
}

[data-theme="dark"] .ppms-cat-dropdown option {
  color: var(--color-text-primary);
  background-color: var(--color-surface);
}

[data-theme="dark"] .ppms-cat-dropdown:required:invalid {
  color: var(--color-text-secondary);
  -webkit-text-fill-color: var(--color-text-secondary);
}

[data-theme="dark"] .reg-field__input::placeholder,
[data-theme="dark"] .reg-summary-field__input::placeholder {
  color: var(--color-text-muted);
}

[data-theme="dark"] .reg-field__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 4px 4px var(--color-shadow-light);
}

[data-theme="dark"] .reg-field__input:-webkit-autofill,
[data-theme="dark"] .reg-field__input:-webkit-autofill:hover,
[data-theme="dark"] .reg-field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-text-primary);
  caret-color: var(--color-text-primary);
  box-shadow: 0 0 0 1000px var(--color-surface) inset, 0 4px 4px var(--color-shadow-light);
  transition: background-color 9999s ease-out;
}

[data-theme="dark"] .reg-field__toggle {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .reg-btn {
  background: var(--color-primary);
  color: var(--color-text-light);
  box-shadow: 0 4px 4px var(--color-shadow-light);
}

[data-theme="dark"] .reg-btn--outline,
[data-theme="dark"] .reg-btn--map {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 4px 4px var(--color-shadow-light);
}

[data-theme="dark"] .reg-btn--outline:hover,
[data-theme="dark"] .reg-btn--map:hover {
  background: var(--color-surface-muted);
}

[data-theme="dark"] .reg-alert--danger {
  background: rgba(255, 194, 194, 0.16);
  border-color: var(--color-error);
  color: var(--color-error);
}

[data-theme="dark"] .reg-alert--success {
  background: rgba(122, 234, 164, 0.16);
  border-color: var(--color-success);
  color: var(--color-success);
}

[data-theme="dark"] .reg-alert--info {
  background: rgba(230, 184, 0, 0.16);
  border-color: var(--color-primary);
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-alert--warning {
  background: rgba(255, 196, 107, 0.16);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

[data-theme="dark"] .reg-plan-card--basic,
[data-theme="dark"] .reg-module-card--default,
[data-theme="dark"] .reg-extra-card--default,
[data-theme="dark"] .reg-confirm-summary,
[data-theme="dark"] .reg-confirm-next__header,
[data-theme="dark"] .reg-summary-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-card);
}

[data-theme="dark"] .reg-plan-card__badge--neutral,
[data-theme="dark"] .reg-module-card__badge--neutral,
[data-theme="dark"] .reg-extra-card__badge--included,
[data-theme="dark"] .reg-summary-plan__icon {
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-plan-card--basic .reg-plan-card__intro,
[data-theme="dark"] .reg-plan-card--basic .reg-plan-card__section-title,
[data-theme="dark"] .reg-plan-card--basic .reg-plan-card__feature,
[data-theme="dark"] .reg-module-card--default .reg-module-card__intro,
[data-theme="dark"] .reg-module-card--default .reg-module-card__section-title,
[data-theme="dark"] .reg-module-card--default .reg-module-card__ideal-item,
[data-theme="dark"] .reg-module-card--default .reg-module-card__feature,
[data-theme="dark"] .reg-module-card--default .reg-module-card__footnote,
[data-theme="dark"] .reg-extra-card--default .reg-extra-card__section-title,
[data-theme="dark"] .reg-extra-card--default .reg-extra-card__feature,
[data-theme="dark"] .reg-extra-card--default .reg-extra-card__footnote {
  color: var(--color-text-primary);
}

/* Gold / bright fills: dark ink only — white on #e6b800 fails contrast. */
[data-theme="dark"] .reg-plan-card--pro,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__title,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__currency,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__amount,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__period,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__price-label,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__intro,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__section-title,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__feature,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__req-item,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__req-note,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__footnote,
[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__footer-badge,
[data-theme="dark"] .reg-module-card--selected,
[data-theme="dark"] .reg-module-card--selected .reg-module-card__title,
[data-theme="dark"] .reg-module-card--selected .reg-module-card__intro,
[data-theme="dark"] .reg-module-card--selected .reg-module-card__section-title,
[data-theme="dark"] .reg-module-card--selected .reg-module-card__ideal-item,
[data-theme="dark"] .reg-module-card--selected .reg-module-card__feature,
[data-theme="dark"] .reg-module-card--selected .reg-module-card__footnote,
[data-theme="dark"] .reg-extra-card--primary,
[data-theme="dark"] .reg-extra-card--added,
[data-theme="dark"] .reg-extra-card--primary .reg-extra-card__title,
[data-theme="dark"] .reg-extra-card--added .reg-extra-card__title,
[data-theme="dark"] .reg-extra-card--primary .reg-extra-card__section-title,
[data-theme="dark"] .reg-extra-card--added .reg-extra-card__section-title,
[data-theme="dark"] .reg-extra-card--primary .reg-extra-card__feature,
[data-theme="dark"] .reg-extra-card--added .reg-extra-card__feature,
[data-theme="dark"] .reg-extra-card--primary .reg-extra-card__footnote,
[data-theme="dark"] .reg-extra-card--added .reg-extra-card__footnote,
[data-theme="dark"] .reg-plan-nav__btn--start,
[data-theme="dark"] .reg-module-nav__btn--next,
[data-theme="dark"] .reg-extra-nav__btn--next {
  color: var(--color-text-light);
}

[data-theme="dark"] .reg-plan-card--pro .reg-plan-card__req-dot {
  background: var(--color-text-light);
}

[data-theme="dark"] .reg-plan-card--basic .reg-plan-card__section-title--includes,
[data-theme="dark"] .reg-module-card--default .reg-module-card__section-title--includes,
[data-theme="dark"] .reg-extra-card--default .reg-extra-card__section-title,
[data-theme="dark"] .reg-confirm-summary__heading,
[data-theme="dark"] .reg-confirm-resumen__label {
  color: var(--color-primary);
}

[data-theme="dark"] .reg-plan-card__choose-btn,
[data-theme="dark"] .reg-module-card__choose-btn--outline,
[data-theme="dark"] .reg-extra-card__action-btn--add {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

[data-theme="dark"] .reg-plan-card__choose-btn:hover,
[data-theme="dark"] .reg-module-card__choose-btn--outline:hover,
[data-theme="dark"] .reg-extra-card__action-btn--add:hover {
  background: var(--color-surface-muted);
}

[data-theme="dark"] .reg-plan-nav__btn--back,
[data-theme="dark"] .reg-module-nav__btn--back,
[data-theme="dark"] .reg-extra-nav__btn--back,
[data-theme="dark"] .reg-summary-nav__back {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-plan-card--basic .reg-plan-card__badge--primary,
[data-theme="dark"] .reg-plan-card--basic .reg-plan-card__footer-badge,
[data-theme="dark"] .reg-module-card__badge--primary,
[data-theme="dark"] .reg-extra-card__badge--primary,
[data-theme="dark"] .reg-module-card__price-tag--paid,
[data-theme="dark"] .reg-summary-plan__badge,
[data-theme="dark"] .reg-summary-business-edit__file-label {
  background: var(--color-primary);
  color: #121212;
  -webkit-text-fill-color: #121212;
}

[data-theme="dark"] .reg-username-chip {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

[data-theme="dark"] .reg-username-chip:hover,
[data-theme="dark"] .reg-username-chip.is-selected {
  background: var(--color-primary);
  color: var(--color-text-light);
}

[data-theme="dark"] .reg-summary-billing {
  background: var(--color-surface-muted);
}

[data-theme="dark"] .reg-summary-billing__option {
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-summary-billing__option--active {
  background: var(--color-surface);
  color: var(--color-primary);
}

[data-theme="dark"] .reg-summary-discount__btn,
[data-theme="dark"] .reg-summary-business-edit__save {
  background: var(--color-primary);
  color: #121212;
  -webkit-text-fill-color: #121212;
  border-color: var(--color-primary);
}

[data-theme="dark"] .reg-summary-confirm {
  color: var(--color-text-light);
}

[data-theme="dark"] .reg-confirm-summary__pending {
  background: rgba(255, 196, 107, 0.16);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

[data-theme="dark"] .reg-confirm-summary__pending--paid {
  background: rgba(122, 234, 164, 0.16);
  border-color: var(--color-success);
  color: var(--color-success);
}

[data-theme="dark"] .reg-confirm-dashboard {
  color: var(--color-text-light);
}

[data-theme="dark"] .reg-page .ppms-circular-blue__circle {
  background: var(--color-surface-muted);
  box-shadow: 0 4px 4px var(--color-shadow-light);
}

/* Default module / extra cards: navy titles were invisible on dark fills. */
[data-theme="dark"] .reg-module-card--default .reg-module-card__title,
[data-theme="dark"] .reg-extra-card--default .reg-extra-card__title,
[data-theme="dark"] .reg-extra-card--default .reg-extra-card__selected-label,
[data-theme="dark"] .reg-extra-card--default .reg-extra-card__amount,
[data-theme="dark"] .reg-extra-card--default .reg-extra-card__period {
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-extra-card--default .reg-extra-card__currency {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .reg-module-card--default .reg-module-card__ideal-dot {
  background: var(--color-text-primary);
}

[data-theme="dark"] .reg-module-card__price-tag--free {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-extra-card--primary .reg-extra-card__selected-label,
[data-theme="dark"] .reg-extra-card--added .reg-extra-card__selected-label,
[data-theme="dark"] .reg-extra-card--primary .reg-extra-card__amount,
[data-theme="dark"] .reg-extra-card--added .reg-extra-card__amount,
[data-theme="dark"] .reg-extra-card--primary .reg-extra-card__period,
[data-theme="dark"] .reg-extra-card--added .reg-extra-card__period,
[data-theme="dark"] .reg-extra-card--primary .reg-extra-card__currency,
[data-theme="dark"] .reg-extra-card--added .reg-extra-card__currency {
  color: #121212;
  -webkit-text-fill-color: #121212;
}

/* Summary: right column uses .reg-summary-block / .reg-summary-total, not .reg-summary-card. */
[data-theme="dark"] .reg-summary-block,
[data-theme="dark"] .reg-summary-total,
[data-theme="dark"] .reg-confirm-next__item {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-card);
}

[data-theme="dark"] .reg-summary-plan__title,
[data-theme="dark"] .reg-summary-plan__amount,
[data-theme="dark"] .reg-summary-plan__note,
[data-theme="dark"] .reg-summary-module__desc,
[data-theme="dark"] .reg-summary-extras__price,
[data-theme="dark"] .reg-summary-extras__desc,
[data-theme="dark"] .reg-summary-business__details p,
[data-theme="dark"] .reg-summary-block__title,
[data-theme="dark"] .reg-summary-block__hint,
[data-theme="dark"] .reg-summary-costs__group,
[data-theme="dark"] .reg-summary-total__row,
[data-theme="dark"] .reg-summary-field__label,
[data-theme="dark"] .reg-summary-card--business .reg-summary-field__label,
[data-theme="dark"] .reg-summary-card--business .reg-summary-field__input,
[data-theme="dark"] .reg-summary-business-edit__cancel,
[data-theme="dark"] .reg-confirm-summary__title,
[data-theme="dark"] .reg-confirm-next__title,
[data-theme="dark"] .reg-confirm-next__num {
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-summary-plan__currency,
[data-theme="dark"] .reg-summary-new-card,
[data-theme="dark"] .reg-summary-pay-later-hint,
[data-theme="dark"] .reg-summary-business__categories-label,
[data-theme="dark"] .reg-summary-business__categories-empty {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .reg-summary-module__name,
[data-theme="dark"] .reg-summary-extras__title,
[data-theme="dark"] .reg-summary-costs__row,
[data-theme="dark"] .reg-summary-total__amount,
[data-theme="dark"] .reg-summary-business__edit {
  color: var(--color-primary);
}

[data-theme="dark"] .reg-summary-business__category-tag {
  background: var(--color-surface-muted);
  color: var(--color-primary);
}

[data-theme="dark"] .reg-summary-business__logo,
[data-theme="dark"] .reg-confirm-next__num {
  background: var(--color-surface-muted);
}

[data-theme="dark"] .reg-summary-billing__option--active {
  background: var(--color-background);
  color: var(--color-primary);
}

[data-theme="dark"] .reg-summary-billing__savings {
  color: var(--color-text-primary);
}

[data-theme="dark"] .reg-summary-discount__input {
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

[data-theme="dark"] .reg-summary-discount__input::placeholder {
  color: var(--color-text-muted);
}

[data-theme="dark"] .reg-summary-business-edit__cancel,
[data-theme="dark"] .reg-summary-confirm-later {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

[data-theme="dark"] .reg-summary-costs__divider,
[data-theme="dark"] .reg-summary-extras__divider {
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

[data-theme="dark"] .reg-summary-confirm,
[data-theme="dark"] .reg-confirm-dashboard,
[data-theme="dark"] .reg-plan-nav__btn--start,
[data-theme="dark"] .reg-module-nav__btn--next,
[data-theme="dark"] .reg-extra-nav__btn--next {
  color: #121212;
  -webkit-text-fill-color: #121212;
}

/* Checks: gold on dark cards, black on gold fills. */
[data-theme="dark"] .reg-module-card--default .reg-module-card__icon img,
[data-theme="dark"] .reg-extra-card--default .reg-extra-card__icon img,
[data-theme="dark"] .reg-plan-card--basic .reg-plan-card__icon img,
[data-theme="dark"] .reg-summary-new-card img,
[data-theme="dark"] .reg-summary-methods__icon {
  filter: var(--filter-svg-to-primary);
}

.reg-plan-card--pro .reg-plan-card__icon img,
.reg-module-card--selected .reg-module-card__icon img,
.reg-extra-card--primary .reg-extra-card__icon img,
.reg-extra-card--added .reg-extra-card__icon img,
.reg-stepper__item--completed .reg-stepper__check {
  filter: brightness(0);
}
