/* Shared dark theme corrections for portal Settings detail surfaces. */

html.dark .app-topbar--settings-detail .app-topbar__settings-mobile-title > a {
  border-color: #475569;
  background: #1e293b;
  color: #f8fafc;
}

html.dark .app-topbar--settings-detail .app-topbar__settings-mobile-title span {
  color: #93c5fd;
}

html.dark .app-topbar--settings-detail .app-topbar__settings-mobile-title strong,
html.dark .portal-settings-detail-header h1,
html.dark .portal-settings-mobile-header strong,
html.dark .portal-settings-section__header h2,
html.dark .portal-settings-section-heading h3 {
  color: #f8fafc;
}

html.dark .portal-settings-detail-header,
html.dark .portal-settings-mobile-header,
html.dark .portal-settings-section__header,
html.dark .portal-settings-action-footer,
html.dark .portal-settings__actions {
  border-color: #334155;
}

html.dark .portal-settings-detail-header__copy > p,
html.dark .portal-settings-detail-header__copy > span,
html.dark .portal-settings-section__header p,
html.dark .portal-settings-section-heading p,
html.dark .portal-settings-description,
html.dark .portal-settings__description {
  color: #94a3b8;
}

html.dark .portal-settings-mobile-header__back,
html.dark .portal-settings-state,
html.dark .portal-settings-empty,
html.dark .portal-settings-danger-zone,
html.dark .portal-settings-note,
html.dark .portal-settings-section,
html.dark .portal-settings__panel,
html.dark .portal-settings__rows,
html.dark .portal-settings-toggle-list,
html.dark .portal-settings-links-v2 {
  border-color: #475569;
  background: #1e293b;
  color: #f8fafc;
}

html.dark .portal-settings-mobile-header__back {
  color: #f8fafc;
}

html.dark .portal-settings-action-footer,
html.dark .portal-settings__actions {
  background: transparent;
}

html.dark .portal-settings-note {
  border-color: #36598a;
  background: #172554;
  color: #bfdbfe;
}

html.dark .portal-settings-danger-zone {
  border-color: #7f1d1d;
  background: #2b1518;
}

html.dark .portal-settings-danger-zone strong,
html.dark .portal-settings-danger-zone p {
  color: #fecaca;
}

html.dark .portal-settings-status-row,
html.dark .portal-settings-toggle-row,
html.dark .portal-settings-link-row,
html.dark .portal-settings-item-row,
html.dark .portal-settings-section__body,
html.dark .portal-settings__detail {
  color: #f8fafc;
}

html.dark .portal-settings-status-row,
html.dark .portal-settings-toggle-row,
html.dark .portal-settings-link-row,
html.dark .portal-settings-item-row,
html.dark .portal-settings-links-v2,
html.dark .portal-settings-toggle-list {
  border-color: #334155;
}

html.dark .portal-settings-status-row p,
html.dark .portal-settings-toggle-row small,
html.dark .portal-settings-link-row small,
html.dark .portal-settings-item-row p,
html.dark .portal-settings-link-row em {
  color: #94a3b8;
}

html.dark .portal-settings-status-row strong,
html.dark .portal-settings-toggle-row strong,
html.dark .portal-settings-link-row strong,
html.dark .portal-settings-item-row strong {
  color: #f8fafc;
}

/* Customer Settings assemblies. */
html.dark .customer-page .customer-settings-glance,
html.dark .customer-page .customer-settings-readiness,
html.dark .customer-page .customer-settings-activity,
html.dark .customer-page .customer-settings-property-list,
html.dark .customer-page .customer-settings-property-form,
html.dark .customer-page .customer-settings-notification-list,
html.dark .customer-page .customer-settings-security__rows,
html.dark .customer-page .customer-settings-review-list,
html.dark .customer-page .customer-settings-privacy__rules,
html.dark .customer-page .portal-settings-links-v2,
html.dark .customer-page .customer-settings-property-edit__form {
  border-color: #475569;
  background: #1e293b;
}

html.dark .customer-page .customer-settings-glance__item:hover,
html.dark .customer-page .customer-settings-readiness__row:hover,
html.dark .customer-page .customer-settings-property-row:hover {
  background: #243247;
}

html.dark .customer-page .customer-settings-glance__item + .customer-settings-glance__item,
html.dark .customer-page .customer-settings-readiness__row + .customer-settings-readiness__row,
html.dark .customer-page .customer-settings-activity__row + .customer-settings-activity__row,
html.dark .customer-page .customer-settings-property-row + .customer-settings-property-row,
html.dark .customer-page .customer-settings-review-row + .customer-settings-review-row,
html.dark .customer-page .customer-settings-privacy__rules article + article {
  border-color: #334155;
}

html.dark .customer-page .customer-settings-glance__copy strong,
html.dark .customer-page .customer-settings-readiness__copy strong,
html.dark .customer-page .customer-settings-review-row strong,
html.dark .customer-page .customer-settings-security__status strong,
html.dark .customer-page .customer-settings-privacy__rules strong,
html.dark .customer-page .customer-settings-support__centre strong,
html.dark .customer-page .customer-settings-about strong,
html.dark .customer-page .customer-settings-property-row__title strong {
  color: #f8fafc;
}

html.dark .customer-page .customer-settings-glance__detail,
html.dark .customer-page .customer-settings-readiness__copy small,
html.dark .customer-page .customer-settings-activity__row p,
html.dark .customer-page .customer-settings-activity__row time,
html.dark .customer-page .customer-settings-property-row__copy p,
html.dark .customer-page .customer-settings-property-row__copy small,
html.dark .customer-page .customer-settings-review-row p,
html.dark .customer-page .customer-settings-security__status p,
html.dark .customer-page .customer-settings-privacy__rules p,
html.dark .customer-page .customer-settings-support__centre p,
html.dark .customer-page .customer-settings-support__facts,
html.dark .customer-page .customer-settings-property-form > summary small {
  color: #94a3b8;
}

html.dark .customer-page .customer-settings-glance__icon,
html.dark .customer-page .customer-settings-readiness__icon,
html.dark .customer-page .customer-settings-property-row__icon,
html.dark .customer-page .customer-settings-security__status-icon,
html.dark .customer-page .customer-settings-review-row__icon,
html.dark .customer-page .customer-settings-privacy__icon,
html.dark .customer-page .portal-settings-toggle-row__icon,
html.dark .customer-page .portal-settings-link-row__icon {
  background: #172554;
  color: #93c5fd;
}

html.dark .customer-page .customer-settings-glance__icon.tone-success,
html.dark .customer-page .customer-settings-readiness__icon.tone-success,
html.dark .customer-page .customer-settings-security__status-icon.tone-success,
html.dark .customer-page .customer-settings-review-row__icon.tone-success,
html.dark .customer-page .customer-settings-privacy__icon.tone-success {
  background: #052e16;
  color: #86efac;
}

html.dark .customer-page .customer-settings-glance__icon.tone-warning,
html.dark .customer-page .customer-settings-readiness__icon.tone-warning {
  background: #422006;
  color: #fbbf24;
}

html.dark .customer-page .customer-settings-next-action {
  border-color: #a16207;
  background: #2d210c;
}

html.dark .customer-page .customer-settings-next-action strong,
html.dark .customer-page .customer-settings-ready strong {
  color: #f8fafc;
}

html.dark .customer-page .customer-settings-ready {
  border-color: #166534;
  background: #052e16;
  color: #bbf7d0;
}

html.dark .customer-page .customer-settings-support__centre {
  border-color: #36598a;
  background: #172554;
}

html.dark .customer-page .customer-settings-support__icon {
  background: #1e3a8a;
  color: #bfdbfe;
}

html.dark .customer-page .customer-settings-support__logout {
  border-color: #991b1b;
  color: #fca5a5;
}

html.dark .customer-page .customer-settings-support__logout:hover,
html.dark .customer-page .customer-settings-support__logout:focus-visible {
  background: #2b1518;
}

/* Plumber Settings assemblies. */
html.dark .plumber-page .portal-settings-v2 .plumber-settings-avatar-panel,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-notifications-form > .space-y-4 > :first-child,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-notifications-form > .space-y-4 > :last-child,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-credit-band,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-support-banner,
html.dark .plumber-page .portal-settings-v2 .plumber-documents-status-card,
html.dark .plumber-page .portal-settings-v2 .plumber-document-reference-row,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-ledger__row,
html.dark .plumber-page .portal-settings-v2 .plumber-document-upload,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-upload-panel {
  border-color: #475569;
  background: #1e293b;
  color: #f8fafc;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__strip,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__list,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-service-list,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-ledger,
html.dark .plumber-page .portal-settings-v2 .plumber-documents-list,
html.dark .plumber-page .portal-settings-v2 .plumber-documents-status-grid {
  border-color: #475569;
  background: #1e293b;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__strip a,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-readiness-row,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-service-list .plumber-service-option,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-ledger__row,
html.dark .plumber-page .portal-settings-v2 .plumber-document-reference-row {
  border-color: #334155;
  background: transparent;
  color: #f8fafc;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-readiness-row:hover,
html.dark .plumber-page .portal-settings-v2 a.plumber-settings-ledger__row:hover,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-service-list .plumber-service-option:hover {
  background: #243247;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__strip strong,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-readiness-row strong,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-service-group h3,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-services-toolbar strong,
html.dark .plumber-page .portal-settings-v2 .plumber-documents-status-card strong,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-support-banner strong {
  color: #f8fafc;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__strip small,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__heading span,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__updated,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-readiness-row small,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-support-banner p,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-support-banner__facts,
html.dark .plumber-page .portal-settings-v2 .plumber-document-reference-row p,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-ledger__row span {
  color: #94a3b8;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__strip a > span,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-readiness-row__icon,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-credit-band__icon,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-ledger__icon,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-support-banner__icon {
  background: #172554;
  color: #93c5fd;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-next-action {
  border-color: #a16207;
  background: #2d210c;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__ready {
  border-color: #166534;
  background: #052e16;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-overview__ready > span {
  background: #14532d;
  color: #86efac;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-support-banner {
  background: #172554;
}

html.dark .plumber-page .portal-settings-v2 .plumber-settings-support-banner__icon {
  background: #1e3a8a;
  color: #bfdbfe;
  box-shadow: inset 0 0 0 1px #36598a;
}

html.dark .plumber-page .portal-settings-v2 .plumber-availability-toggle,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-quiet-hours,
html.dark .plumber-page .portal-settings-v2 .plumber-profile-placeholder,
html.dark .plumber-page .portal-settings-v2 .plumber-settings-upload-help {
  border-color: #475569;
  background: #1e293b;
  color: #f8fafc;
}

/* Flowbite utility classes still occur in a few older Settings assemblies. */
.form-select {
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 1rem 1rem;
  padding-right: 2.35rem;
}

html.dark .form-select {
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 1rem 1rem;
}

html.dark .portal-settings-v2 .bg-white,
html.dark .portal-settings-v2 .bg-slate-50,
html.dark .portal-settings-v2 .bg-gray-50 {
  background-color: #1e293b !important;
}

html.dark .portal-settings-v2 .border-slate-200,
html.dark .portal-settings-v2 .border-gray-200,
html.dark .portal-settings-v2 .border-slate-300 {
  border-color: #475569 !important;
}

html.dark .portal-settings-v2 .text-slate-900,
html.dark .portal-settings-v2 .text-slate-800,
html.dark .portal-settings-v2 .text-gray-900,
html.dark .portal-settings-v2 .text-gray-800 {
  color: #f8fafc !important;
}

html.dark .portal-settings-v2 .text-slate-700,
html.dark .portal-settings-v2 .text-slate-600,
html.dark .portal-settings-v2 .text-gray-700,
html.dark .portal-settings-v2 .text-gray-600 {
  color: #cbd5e1 !important;
}

/* Settings navigation uses a shared row component in both portals. */
html.dark #main-content .portal-settings-v2 .portal-settings__navigation,
html.dark #main-content .portal-settings-v2 .plumber-profile-nav {
  border-color: #334155 !important;
  background: #0f172a !important;
  color: #cbd5e1;
}

html.dark #main-content .portal-settings-v2 .plumber-profile-section,
html.dark #main-content .portal-settings-v2 .portal-settings__group {
  border-color: transparent;
  background: transparent;
}

html.dark #main-content .portal-settings-v2 .plumber-profile-section-list h3,
html.dark #main-content .portal-settings-v2 .portal-settings__group h3,
html.dark #main-content .portal-settings-v2 .portal-settings__group > span {
  color: #94a3b8 !important;
}

html.dark #main-content .portal-settings-v2 .plumber-profile-row,
html.dark #main-content .portal-settings-v2 .portal-settings__row {
  border-color: transparent;
  background: transparent;
  color: #cbd5e1;
}

html.dark #main-content .portal-settings-v2 .plumber-profile-row:hover,
html.dark #main-content .portal-settings-v2 .plumber-profile-row:focus-visible,
html.dark #main-content .portal-settings-v2 .plumber-profile-row.is-active,
html.dark #main-content .portal-settings-v2 .portal-settings__row:hover,
html.dark #main-content .portal-settings-v2 .portal-settings__row:focus-visible,
html.dark #main-content .portal-settings-v2 .portal-settings__row.is-active {
  border-color: #36598a;
  background: #172554;
  color: #bfdbfe;
}

html.dark #main-content .portal-settings-v2 .plumber-profile-row__icon,
html.dark #main-content .portal-settings-v2 .portal-settings__row-icon {
  border-color: #36598a;
  background: #172554;
  color: #93c5fd;
}

html.dark #main-content .portal-settings-v2 .plumber-profile-row__label,
html.dark #main-content .portal-settings-v2 .portal-settings__row-label {
  color: inherit;
}

html.dark #main-content .portal-settings-v2 .plumber-profile-row__meta,
html.dark #main-content .portal-settings-v2 .plumber-profile-row__description,
html.dark #main-content .portal-settings-v2 .plumber-profile-row__chevron,
html.dark #main-content .portal-settings-v2 .portal-settings__row-meta,
html.dark #main-content .portal-settings-v2 .portal-settings__row-chevron {
  color: #94a3b8;
}

html.dark #main-content .portal-settings-v2 .plumber-profile-logout-row,
html.dark #main-content .portal-settings-v2 .portal-settings__logout {
  border-color: #334155;
  color: #cbd5e1;
}

/* The desktop Settings rail is rendered by the application shell rather
   than inside the portal-settings content node. */
html.dark .app-sidebar-settings {
  border-color: #334155;
  background: #0f172a;
  color: #cbd5e1;
}

html.dark .app-sidebar-settings__top,
html.dark .app-sidebar-settings__logout {
  border-color: #334155;
}

html.dark .app-sidebar-settings__back,
html.dark .app-sidebar-settings__logout,
html.dark .app-sidebar-settings__item {
  color: #cbd5e1;
}

html.dark .app-sidebar-settings__heading span,
html.dark .app-sidebar-settings__group h2 {
  color: #94a3b8;
}

html.dark .app-sidebar-settings__heading strong,
html.dark .app-sidebar-settings__item-copy strong {
  color: #f8fafc;
}

html.dark .app-sidebar-settings__back:hover,
html.dark .app-sidebar-settings__back:focus-visible,
html.dark .app-sidebar-settings__item:hover,
html.dark .app-sidebar-settings__item:focus-visible,
html.dark .app-sidebar-settings__item.is-active {
  border-color: #36598a;
  background: #172554;
  color: #bfdbfe;
}

html.dark .app-sidebar-settings__item:hover .app-sidebar-settings__item-copy strong,
html.dark .app-sidebar-settings__item:focus-visible .app-sidebar-settings__item-copy strong,
html.dark .app-sidebar-settings__item.is-active .app-sidebar-settings__item-copy strong {
  color: #bfdbfe;
}

html.dark .app-sidebar-settings__item-icon,
html.dark .app-sidebar-settings__back-icon {
  color: currentColor;
}

/* Keep every Settings icon centred and visible, including icons supplied by
   older portal-specific assemblies. */
.portal-settings-v2 svg {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.portal-settings-v2 .app-sidebar-settings__item-icon,
.portal-settings-v2 .app-sidebar-settings__back-icon,
.portal-settings-v2 .portal-settings__row-icon,
.portal-settings-v2 .portal-settings-toggle-row__icon,
.portal-settings-v2 .portal-settings-link-row__icon,
.portal-settings-v2 .customer-settings-glance__icon,
.portal-settings-v2 .customer-settings-readiness__icon,
.portal-settings-v2 .customer-settings-property-row__icon,
.portal-settings-v2 .customer-settings-security__status-icon,
.portal-settings-v2 .customer-settings-review-row__icon,
.portal-settings-v2 .customer-settings-privacy__icon,
.portal-settings-v2 .plumber-documents-status-card__icon,
.portal-settings-v2 .plumber-document-reference-row__icon,
.portal-settings-v2 .plumber-settings-ledger__icon,
.portal-settings-v2 .plumber-settings-credit-band__icon,
.portal-settings-v2 .plumber-settings-support-banner__icon {
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.portal-settings-v2 .app-sidebar-settings__item-icon svg,
.portal-settings-v2 .app-sidebar-settings__back-icon svg,
.portal-settings-v2 .portal-settings__row-icon svg,
.portal-settings-v2 .portal-settings-toggle-row__icon svg,
.portal-settings-v2 .portal-settings-link-row__icon svg,
.portal-settings-v2 .customer-settings-glance__icon svg,
.portal-settings-v2 .customer-settings-readiness__icon svg,
.portal-settings-v2 .customer-settings-property-row__icon svg,
.portal-settings-v2 .customer-settings-security__status-icon svg,
.portal-settings-v2 .customer-settings-review-row__icon svg,
.portal-settings-v2 .customer-settings-privacy__icon svg,
.portal-settings-v2 .plumber-documents-status-card__icon svg,
.portal-settings-v2 .plumber-document-reference-row__icon svg,
.portal-settings-v2 .plumber-settings-ledger__icon svg,
.portal-settings-v2 .plumber-settings-credit-band__icon svg,
.portal-settings-v2 .plumber-settings-support-banner__icon svg {
  display: block;
  margin: 0;
  transform: none;
}
