:root {
  --mail-theme-canvas: #f5f7fb;
  --mail-theme-surface: #ffffff;
  --mail-theme-surface-elevated: #ffffff;
  --mail-theme-surface-subtle: #f7f9fc;
  --mail-theme-surface-hover: #eef2f8;
  --mail-theme-surface-selected: #e8efff;
  --mail-theme-text: #172033;
  --mail-theme-text-secondary: #344054;
  --mail-theme-text-muted: #667085;
  --mail-theme-text-faint: #7f8794;
  --mail-theme-border: #dfe4ee;
  --mail-theme-border-strong: #cfd6e2;
  --mail-theme-accent-text: #2457d6;
  --mail-theme-accent-fill: #2457d6;
  --mail-theme-accent-fill-hover: #183f9e;
  --mail-theme-accent-soft: #eaf1ff;
  --mail-theme-danger-text: #a62d32;
  --mail-theme-danger-soft: #fff3f3;
  --mail-theme-danger-border: #e3bfc1;
  --mail-theme-warning-text: #76520b;
  --mail-theme-warning-soft: #fff8df;
  --mail-theme-warning-border: #ecdfa8;
  --mail-theme-success-text: #24623c;
  --mail-theme-success-soft: #effaf3;
  --mail-theme-success-border: #b7dfc5;
  --mail-theme-menu-shadow: 0 1rem 2.5rem rgb(30 48 84 / 18%);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --mail-theme-canvas: #0b1220;
  --mail-theme-surface: #111a2b;
  --mail-theme-surface-elevated: #172235;
  --mail-theme-surface-subtle: #182438;
  --mail-theme-surface-hover: #223149;
  --mail-theme-surface-selected: #20365f;
  --mail-theme-text: #edf2fa;
  --mail-theme-text-secondary: #cbd5e4;
  --mail-theme-text-muted: #9eabc0;
  --mail-theme-text-faint: #7f8da3;
  --mail-theme-border: #2c3a50;
  --mail-theme-border-strong: #40516a;
  --mail-theme-accent-text: #91b1ff;
  --mail-theme-accent-fill: #4166ba;
  --mail-theme-accent-fill-hover: #456cc5;
  --mail-theme-accent-soft: #1c315c;
  --mail-theme-danger-text: #ffabb1;
  --mail-theme-danger-soft: #3a2029;
  --mail-theme-danger-border: #71343d;
  --mail-theme-warning-text: #f1ce7b;
  --mail-theme-warning-soft: #382f1d;
  --mail-theme-warning-border: #6c582b;
  --mail-theme-success-text: #91dbad;
  --mail-theme-success-soft: #193427;
  --mail-theme-success-border: #35684b;
  --mail-theme-menu-shadow: 0 1rem 2.5rem rgb(0 0 0 / 42%);
  color: var(--mail-theme-text);
  background: var(--mail-theme-canvas);
}

.theme-menu-button {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--mail-theme-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  cursor: pointer;
}

.theme-menu-button:hover,
.theme-menu-button.flextip-open {
  background: var(--mail-theme-surface-hover);
}

.theme-menu-button:focus-visible {
  border-color: var(--mail-theme-accent-text);
  outline: 3px solid rgb(91 131 230 / 32%);
  outline-offset: 2px;
}

.theme-menu-button__icon {
  width: 1.4rem;
  height: 1.4rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.theme-menu-button__moon {
  display: none;
  fill: currentColor;
  stroke: none;
}

[data-theme="dark"] .theme-menu-button__sun {
  display: none;
}

[data-theme="dark"] .theme-menu-button__moon {
  display: block;
}

.theme-menu-button__label,
.theme-menu-button__chevron {
  display: none !important;
}

.tools-menu-button {
  color: var(--mail-theme-accent-text);
}

.theme-menu {
  width: min(12rem, calc(100vw - 1rem));
}

.theme-menu__option {
  min-height: 2.65rem;
  padding: 0.55rem 0.7rem;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--mail-theme-text-secondary);
  background: transparent;
  border: 0;
  border-radius: 0.45rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.theme-menu__option:hover,
.theme-menu__option:focus-visible {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-surface-hover);
  outline: none;
}

.theme-menu__option[aria-checked="true"] {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-accent-soft);
}

.theme-menu__check {
  width: 1rem;
  flex: 0 0 1rem;
  color: var(--mail-theme-accent-text);
  font-weight: 800;
  text-align: center;
  visibility: hidden;
}

.theme-menu__option[aria-checked="true"] .theme-menu__check {
  visibility: visible;
}

@media (min-width: 48rem) {
  .theme-menu-button {
    width: auto;
    min-width: 0;
    height: 2.9rem;
    padding: 0.45rem 0.7rem;
    display: flex;
    gap: 0.45rem;
  }

  .theme-menu-button__label {
    display: inline !important;
    color: var(--mail-theme-text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    pointer-events: none;
  }

  .theme-menu-button__chevron {
    width: 16px;
    height: 16px;
    display: block !important;
    flex: 0 0 16px;
    transition: transform 0.2s ease;
  }

  .theme-menu-button.flextip-open .theme-menu-button__chevron {
    transform: rotate(180deg);
  }
}

@media (max-width: 30rem) {
  .site-nav__brand-link {
    display: none;
  }
}

@media (pointer: coarse) {
  .theme-menu-button,
  .theme-menu__option {
    min-height: 2.75rem;
  }
}

html[data-theme="dark"] body {
  color: var(--mail-theme-text);
  background: var(--mail-theme-canvas);
}

html[data-theme="dark"] :where(
  .site-nav,
  .settings-menu,
  .project-intro,
  .mail-workspace,
  .mail-workspace__navigation,
  .mail-list-panel,
  .mail-detail-panel,
  .mail-list-controls,
  .mail-list-selection-split,
  .mail-list-selection-options,
  .mail-list__row,
  .mail-list__item,
  .mail-context-menu,
  .mail-folder-dialog,
  .mail-detail-toolbar,
  .import-archive-message,
  .mail-action-overflow,
  .mail-security-help-tip,
  .mail-message-details-dialog,
  .mail-block-dialog,
  .compose-shell,
  .compose-form,
  .compose-actions,
  .compose-discard-dialog,
  .settings-page__empty,
  .settings-card,
  .account-index-table,
  .account-connection-panel,
  .account-custom-folder-dialog,
  .auth-card,
  .invitation-summary,
  .error-state,
  .site-footer
) {
  color: var(--mail-theme-text-secondary);
  background-color: var(--mail-theme-surface);
  border-color: var(--mail-theme-border);
  box-shadow: none;
}

html[data-theme="dark"] .mail-navigation__unified-indicator--global {
  background: #8391ff;
}

html[data-theme="dark"] .mail-navigation__unified-indicator--group {
  border-color: #f6ad55;
}

html[data-theme="dark"] :where(
  .unified-participation-note,
  .unified-participation-card__state
) {
  color: var(--mail-theme-text-muted);
  background-color: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .unified-participation-form label {
  color: var(--mail-theme-text);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .unified-participation-form label:hover {
  background-color: var(--mail-theme-surface-hover);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .unified-participation-form small {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] :where(
  .site-nav,
  .settings-menu,
  .mail-navigation,
  .project-intro,
  .mail-workspace,
  .compose-shell,
  .settings-page,
  .tools-page,
  .auth-card,
  .error-state,
  .site-footer
) :where(h1, h2, h3, h4, p, span, small, strong, dt, dd, legend, label, time) {
  color: inherit;
}

html[data-theme="dark"] :where(
  .flextip,
  .flexdrawer
) {
  color: var(--mail-theme-text-secondary) !important;
  background-color: var(--mail-theme-surface-elevated) !important;
  border-color: var(--mail-theme-border) !important;
  box-shadow: var(--mail-theme-menu-shadow) !important;
}

html[data-theme="dark"] :where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .dkim-output pre
) {
  color: var(--mail-theme-text);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] :where(input, textarea)::placeholder {
  color: var(--mail-theme-text-faint);
}

html[data-theme="dark"] .mail-navigation__global-folder-trigger {
  color: var(--mail-theme-text-secondary);
}

html[data-theme="dark"] .mail-navigation__global-folder-trigger:hover,
html[data-theme="dark"] .mail-navigation__global-folder-trigger:focus-visible {
  color: var(--mail-theme-accent-text);
}

html[data-theme="dark"] :where(
  .mail-navigation__refresh-all-trigger,
  .mail-navigation__level-controls button,
  .mail-panel-header__action button,
  .mail-list-selection-toggle,
  .mail-list-selection-options-trigger,
  .mail-list-selection-options__panel button,
  .mail-search__compact .mail-search__options-toggle,
  .mail-search button,
  .mail-search__clear,
  .mail-list-selection-bar button,
  .mail-detail-actions button,
  .mail-detail-actions .button-link,
  .mail-action-overflow button,
  .mail-action-overflow select,
  .mail-action-overflow__panel > a,
  .mail-action-overflow__panel > button,
  .mail-message-body-loading__actions button,
  .mail-message-body-loading__actions a,
  .mail-remote-images-notice__actions button,
  .mail-message-details-dialog button,
  .mail-block-dialog button,
  .compose-close,
  .compose-attachment-picker,
  .compose-actions button,
  .compose-discard-dialog button,
  .settings-card button,
  .button-link,
  .auth-label-help
) {
  color: var(--mail-theme-text-secondary);
  background-color: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] :where(
  .compose-menu-link,
  .compose-actions .compose-actions__send,
  .auth-form button:not(.auth-label-help),
  .rule-builder__form > button,
  .dkim-form > button
) {
  color: #ffffff;
  background: var(--mail-theme-accent-fill);
  border-color: var(--mail-theme-accent-fill);
}

html[data-theme="dark"] :where(
  .compose-menu-link:hover,
  .compose-menu-link.is-current,
  .compose-actions .compose-actions__send:hover,
  .auth-form button:not(.auth-label-help):hover,
  .rule-builder__form > button:hover,
  .dkim-form > button:hover
) {
  background: var(--mail-theme-accent-fill-hover);
}

html[data-theme="dark"] :where(
  a:not(.compose-menu-link),
  .project-intro__eyebrow,
  .mail-panel-header__eyebrow,
  .mail-detail-panel__back,
  .auth-label-help,
  .dkim-copy-status,
  .settings-tabs a.is-active,
  .settings-tabs a:hover,
  .settings-tabs a:focus-visible
) {
  color: var(--mail-theme-accent-text);
}

html[data-theme="dark"] .settings-tabs a:hover,
html[data-theme="dark"] .settings-tabs a:focus-visible {
  color: var(--mail-theme-text);
  background-color: var(--mail-theme-surface-hover);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .settings-tabs a.is-active {
  color: var(--mail-theme-accent-text);
  background-color: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .settings-tabs a.is-active:hover,
html[data-theme="dark"] .settings-tabs a.is-active:focus-visible {
  color: var(--mail-theme-accent-text);
  background-color: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] :where(
  .app-menu-button,
  .site-nav__brand-link,
  .tools-menu-button,
  .tools-menu-button__label,
  .settings-menu__panel a,
  .settings-menu__form button,
  .mail-navigation,
  .mail-list__item,
  .mail-detail-panel,
  .mail-detail-subject h2,
  .mail-detail-body,
  .compose-header h1,
  .settings-page__header h1,
  .settings-page__empty h2,
  .settings-card h2,
  .settings-card h3,
  .auth-card__header h1,
  .invitation-summary h2,
  .tools-page__header h1,
  .dkim-results__header h2,
  .error-state h1,
  .site-footer__brand,
  .site-footer__nav h2
) {
  color: var(--mail-theme-text);
}

html[data-theme="dark"] :where(
  .settings-menu__title,
  .mail-navigation__eyebrow,
  .mail-navigation__account-count,
  .mail-navigation__secondary,
  .mail-panel-header__context,
  .mail-panel-header__meta,
  .mail-list time,
  .mail-list__preview,
  .mail-list__account,
  .mail-list__mailbox,
  .mail-list-pagination__status,
  .import-archive-message__header span,
  .import-archive-message__header time,
  .import-archive-message__metadata dt,
  .import-archive-message__details dt,
  .mail-action-overflow__move label,
  .mail-detail-header__sender span,
  .mail-sender-verification p,
  .mail-detail-header dt,
  .mail-attachments__meta,
  .mail-message-details-dialog dt,
  .mail-block-dialog__target span,
  .mail-block-dialog__fields label,
  .mail-block-dialog__domain-mode legend,
  .mail-block-dialog__domain-mode small,
  .mail-block-dialog__impact dt,
  .compose-header__eyebrow,
  .compose-status,
  .compose-from__heading label,
  .compose-address-fields label,
  .compose-body__heading > span,
  .compose-attachments p,
  .compose-actions__delivery-note,
  .settings-page__header p:last-child,
  .settings-card header span,
  .settings-card > p,
  .settings-card li,
  .settings-details dt,
  .group-membership-editor small,
  .settings-account-picker label,
  .settings-form label,
  .settings-inline-form label,
  .mbox-destination-picker small,
  .mbox-field-note,
  .mbox-upload-progress p,
  .account-search-actions > span,
  .account-folder-discovery header span,
  .account-system-mappings__header,
  .account-system-mapping-form__folder,
  .account-system-mapping-form__fixed-behavior,
  .auth-card__header p:last-child,
  .auth-form label:not(.auth-checkbox),
  .auth-checkbox,
  .invitation-summary header span:first-child,
  .invitation-summary header p,
  .rule-builder__form legend,
  .tools-page__header p:last-child,
  .dkim-results__header > span,
  .site-footer__brand-section p,
  .site-footer__bottom
) {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] :where(
  .app-menu-button:hover,
  .tools-menu-button:hover,
  .tools-menu-button.flextip-open,
  .site-nav__brand-logo-button:hover,
  .site-nav__brand-logo-button.flextip-open,
  .site-nav__brand-link:hover,
  .settings-menu__panel a:hover,
  .settings-menu__panel a:focus-visible,
  .settings-menu__form button:hover,
  .settings-menu__form button:focus-visible,
  .mail-navigation__refresh-all-trigger:hover,
  .mail-navigation__level-controls button:hover,
  .mail-navigation__row:hover,
  .mail-navigation__row.is-context-open,
  .mail-list-selection-toggle:hover,
  .mail-list-selection-options-trigger:hover,
  .mail-list-selection-options__panel button:hover,
  .mail-list-selection-options__panel button:focus-visible,
  .mail-list__item:hover,
  .mail-context-menu__panel > a:hover,
  .mail-context-menu__panel > button:hover,
  .mail-context-menu__panel > a:focus-visible,
  .mail-context-menu__panel > button:focus-visible,
  .mail-detail-actions button:hover,
  .mail-detail-actions .button-link:hover,
  .mail-action-overflow button:hover,
  .mail-action-overflow__panel > button:hover,
  .mail-action-overflow__panel > a:hover,
  .compose-close:hover,
  .settings-card button:hover,
  .button-link:hover,
  .account-index-table tbody tr:hover
) {
  color: var(--mail-theme-text);
  background-color: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-context-menu__panel > a,
html[data-theme="dark"] .mail-context-menu__panel > button {
  color: var(--mail-theme-text-secondary);
  background-color: transparent;
}

html[data-theme="dark"] .mail-context-menu__panel > a:hover,
html[data-theme="dark"] .mail-context-menu__panel > button:hover,
html[data-theme="dark"] .mail-context-menu__panel > a:focus-visible,
html[data-theme="dark"] .mail-context-menu__panel > button:focus-visible {
  color: var(--mail-theme-text);
  background-color: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-context-menu__panel > button.is-danger {
  color: var(--mail-theme-danger-text);
}

html[data-theme="dark"] .mail-context-menu__panel > button.is-danger:hover,
html[data-theme="dark"] .mail-context-menu__panel > button.is-danger:focus-visible {
  color: var(--mail-theme-danger-text);
  background-color: var(--mail-theme-danger-soft);
}

html[data-theme="dark"] .site-nav__brand-link:hover,
html[data-theme="dark"] .tools-menu-button:hover,
html[data-theme="dark"] .tools-menu-button.flextip-open {
  color: var(--mail-theme-text);
  background-color: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .app-menu-button:hover,
html[data-theme="dark"] .app-menu-button:focus-visible {
  color: var(--mail-theme-text);
  background-color: var(--mail-theme-surface-hover);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .app-menu-button:active,
html[data-theme="dark"] .app-menu-button[aria-expanded="true"] {
  color: var(--mail-theme-accent-text);
  background-color: var(--mail-theme-accent-soft);
  border-color: #3f5f96;
}

html[data-theme="dark"] :where(
  .mail-navigation__row.is-selected,
  .mail-navigation__branch.is-drag-expand-target > summary,
  .mail-list-selection-toggle[aria-pressed="true"],
  .mail-search__options-toggle.has-active-options,
  .mail-search-filters__checks label:has(input:checked),
  .mail-list__row.is-multiselected .mail-list__item,
  .mail-list__item.is-selected,
  .settings-menu__panel a.settings-menu__admin-link,
  .settings-tabs a.settings-tabs__admin-link,
  .settings-page__count,
  .settings-badge,
  .tools-page__mark
) {
  color: var(--mail-theme-accent-text);
  background-color: var(--mail-theme-accent-soft);
  border-color: #3f5f96;
}

html[data-theme="dark"] .settings-tabs a.settings-tabs__admin-link {
  color: var(--mail-theme-accent-text);
  background-color: var(--mail-theme-accent-soft);
  border-color: #3f5f96;
}

html[data-theme="dark"] .settings-tabs__admin-badge {
  color: var(--mail-theme-accent-text);
  background-color: var(--mail-theme-surface-elevated);
  border-color: #5878b8;
}

html[data-theme="dark"] .settings-tabs a.settings-tabs__admin-link:hover,
html[data-theme="dark"] .settings-tabs a.settings-tabs__admin-link:focus-visible {
  color: var(--mail-theme-accent-text);
  background-color: var(--mail-theme-surface-selected);
  border-color: #5878b8;
}

html[data-theme="dark"] :where(
  .mail-navigation__branch ul::before,
  .mail-navigation__drop-indicator::before,
  .mail-navigation__count,
  .mail-list-selection-options__panel [role="separator"],
  .mail-context-menu__separator,
  .mail-action-overflow__separator,
  .mail-search__clear[aria-disabled="true" i],
  .mail-list-pagination > span[aria-disabled="true"],
  .settings-card.is-disabled,
  .group-settings-card--disabled,
  .account-index-table th,
  .account-index-table__actions,
  .mbox-upload-progress__track
) {
  color: var(--mail-theme-text-faint);
  background-color: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] :where(
  .mail-connection-warning,
  .mail-navigation__mapping-attention,
  .mail-navigation__source-warning,
  .mail-navigation__account-attention,
  .mail-search-index-status--pending,
  .mail-search-index-status--warning,
  .mail-sender-verification--partial,
  .mail-sender-verification--unverified,
  .mail-sender-verification--pending,
  .mail-sender-verification--notevaluated,
  .mail-sender-verification--outgoing,
  .mail-sender-verification--temporaryerror,
  .mail-auth-result--temporaryerror,
  .mail-remote-images-notice,
  .mail-block-dialog__warning,
  .compose-connection-action,
  .import-consequence-confirmation,
  .account-status-badge--warning,
  .dkim-warning
) {
  color: var(--mail-theme-warning-text);
  background-color: var(--mail-theme-warning-soft);
  border-color: var(--mail-theme-warning-border);
}

html[data-theme="dark"] :where(
  .mail-view-feedback[data-state="error"],
  .mail-search-index-status--error,
  .mail-sender-verification--failed,
  .mail-auth-result--fail,
  .mail-auth-result--softfail,
  .mail-auth-result--permanenterror,
  .mail-remote-images-notice[data-state="error"],
  .compose-validation ul,
  .account-status-badge--failed,
  .account-connection-state--failed,
  .account-sync-badge--failed,
  .account-sync-state--failed,
  .field-validation-error,
  .auth-validation,
  .auth-form > span,
  .error-state__eyebrow
) {
  color: var(--mail-theme-danger-text);
  background-color: var(--mail-theme-danger-soft);
  border-color: var(--mail-theme-danger-border);
}

html[data-theme="dark"] :where(
  .mail-sender-verification--verified,
  .mail-remote-images-notice[data-state="loaded"],
  .account-status-badge--ready,
  .account-connection-state--ready,
  .account-sync-badge--ready,
  .account-sync-state--ready
) {
  color: var(--mail-theme-success-text);
  background-color: var(--mail-theme-success-soft);
  border-color: var(--mail-theme-success-border);
}

html[data-theme="dark"] :where(
  .settings-status,
  .auth-status,
  .account-connection-result,
  .mail-view-feedback
) {
  color: var(--mail-theme-accent-text);
  background-color: var(--mail-theme-accent-soft);
  border-color: #3f5f96;
}

html[data-theme="dark"] .account-index-table tbody tr:hover {
  color: var(--mail-theme-text);
  background-color: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .account-index-table th a:hover,
html[data-theme="dark"] .account-index-table th a:focus-visible {
  color: var(--mail-theme-accent-text);
}

html[data-theme="dark"] .account-index-table th a:hover .account-sort-indicator,
html[data-theme="dark"] .account-index-table th a:focus-visible .account-sort-indicator {
  color: currentColor;
}

html[data-theme="dark"] .account-index-table tbody td.account-index-table__actions {
  border-bottom-color: #e7ebf2;
}

html[data-theme="dark"] .account-index-table tbody tr:hover > .account-index-table__actions {
  color: var(--mail-theme-text);
  background-color: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .account-index-table tbody tr:hover > .account-index-table__actions .button-link {
  color: var(--mail-theme-text-secondary);
  background-color: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .account-index-table tbody tr:hover > .account-index-table__actions .button-link:hover {
  color: var(--mail-theme-text);
  background-color: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .settings-page button:not(.account-create-action),
html[data-theme="dark"] .settings-page .button-link:not(.account-create-action) {
  color: var(--mail-theme-text-secondary);
  background-color: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .settings-page button:not(.account-create-action):hover,
html[data-theme="dark"] .settings-page .button-link:not(.account-create-action):hover {
  color: var(--mail-theme-text);
  background-color: var(--mail-theme-surface-hover);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .settings-page button.primary-button,
html[data-theme="dark"] .settings-page .button-link.primary-button,
html[data-theme="dark"] .settings-page .rule-builder__form > button,
html[data-theme="dark"] .settings-page .account-system-mapping-form button.is-dirty {
  color: #ffffff;
  background-color: var(--mail-theme-accent-fill);
  border-color: var(--mail-theme-accent-fill);
}

html[data-theme="dark"] .settings-page button.primary-button:hover,
html[data-theme="dark"] .settings-page .button-link.primary-button:hover,
html[data-theme="dark"] .settings-page .rule-builder__form > button:hover,
html[data-theme="dark"] .settings-page .account-system-mapping-form button.is-dirty:hover {
  color: #ffffff;
  background-color: var(--mail-theme-accent-fill-hover);
  border-color: var(--mail-theme-accent-fill-hover);
}

html[data-theme="dark"] .account-create-action--primary {
  color: #ffffff;
  background-color: var(--mail-theme-accent-fill);
  border-color: var(--mail-theme-accent-fill);
  box-shadow: 0 0.3rem 1rem rgb(77 124 230 / 26%);
}

html[data-theme="dark"] .account-create-action--primary:hover {
  color: #ffffff;
  background-color: var(--mail-theme-accent-fill-hover);
  border-color: var(--mail-theme-accent-fill-hover);
  box-shadow: 0 0.45rem 1.1rem rgb(77 124 230 / 34%);
}

html[data-theme="dark"] .account-create-action--provider {
  color: #172033;
  background-color: #f1f4fa;
  border-color: #a4afc2;
  box-shadow: 0 1px 2px rgb(0 0 0 / 24%);
}

html[data-theme="dark"] .account-create-action--provider:hover {
  color: #101828;
  background-color: #dce7fb;
  border-color: #8eaae0;
  box-shadow: 0 0.4rem 1rem rgb(0 0 0 / 30%);
}

html[data-theme="dark"] .settings-card button.danger-button {
  color: var(--mail-theme-danger-text);
  background-color: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-danger-border);
}

html[data-theme="dark"] .settings-card button.danger-button:hover {
  color: var(--mail-theme-danger-text);
  background-color: var(--mail-theme-danger-soft);
  border-color: var(--mail-theme-danger-border);
}

html[data-theme="dark"] .settings-card button.archive-delete-button {
  color: #ffffff;
  background-color: #a62d32;
  border-color: #8d252a;
}

html[data-theme="dark"] .settings-card button.archive-delete-button:hover {
  color: #ffffff;
  background-color: #8d252a;
  border-color: var(--mail-theme-danger-border);
}

html[data-theme="dark"] .settings-card .account-connection-save.is-test-failed,
html[data-theme="dark"] .settings-card .account-connection-save.is-test-failed:hover {
  color: var(--mail-theme-warning-text);
  background-color: var(--mail-theme-warning-soft);
  border-color: var(--mail-theme-warning-border);
}

html[data-theme="dark"] .settings-card .account-connection-save.is-test-failed:hover {
  background-color: #50411f;
}

html[data-theme="dark"] .settings-page button:disabled {
  color: var(--mail-theme-text-faint);
  background-color: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .settings-badge {
  color: var(--mail-theme-accent-text) !important;
}

html[data-theme="dark"] .account-edit-state-badge--disabled {
  color: var(--mail-theme-danger-text) !important;
  background-color: var(--mail-theme-danger-soft);
  border-color: var(--mail-theme-danger-border);
}

html[data-theme="dark"] .account-status-badge--neutral,
html[data-theme="dark"] .account-sync-badge--neutral {
  color: var(--mail-theme-text-secondary);
  background-color: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .account-sync-badge--neutral {
  color: var(--mail-theme-text-secondary) !important;
}

html[data-theme="dark"] .account-connection-state:not(.account-connection-state--ready):not(.account-connection-state--failed) {
  color: var(--mail-theme-warning-text) !important;
  background-color: var(--mail-theme-warning-soft);
  border-color: var(--mail-theme-warning-border);
}

html[data-theme="dark"] .account-sync-state:not(.account-sync-state--ready):not(.account-sync-state--failed),
html[data-theme="dark"] .account-system-mappings__header,
html[data-theme="dark"] .account-system-mapping-form__fixed-behavior,
html[data-theme="dark"] .mbox-upload-progress {
  color: var(--mail-theme-text-secondary);
  background-color: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .archive-card__transfer,
html[data-theme="dark"] .mbox-destination-picker label:has(input:checked) {
  color: var(--mail-theme-accent-text);
  background-color: var(--mail-theme-accent-soft);
  border-color: #3f5f96;
}

html[data-theme="dark"] .mail-navigation__level-controls {
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-navigation__row {
  color: var(--mail-theme-text-secondary);
}

html[data-theme="dark"] .mail-navigation__row:hover,
html[data-theme="dark"] .mail-navigation__row.is-context-open {
  color: var(--mail-theme-text);
  background: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-navigation__row.is-selected,
html[data-theme="dark"] .mail-navigation__row.is-selected:hover {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-accent-soft);
  box-shadow: inset 3px 0 var(--mail-theme-accent-text);
}

html[data-theme="dark"] .mail-navigation__row.is-disabled,
html[data-theme="dark"] .mail-navigation__row.is-disabled:hover {
  color: var(--mail-theme-text-faint);
  background: transparent;
}

html[data-theme="dark"] .mail-navigation__row[data-navigation-color="red"]
  > .mail-navigation__identity
  > .mail-navigation__label {
  color: #ff9c9c;
}

html[data-theme="dark"] .mail-navigation__row[data-navigation-color="orange"]
  > .mail-navigation__identity
  > .mail-navigation__label {
  color: #ffb86b;
}

html[data-theme="dark"] .mail-navigation__row[data-navigation-color="amber"]
  > .mail-navigation__identity
  > .mail-navigation__label {
  color: #f1ce7b;
}

html[data-theme="dark"] .mail-navigation__row[data-navigation-color="green"]
  > .mail-navigation__identity
  > .mail-navigation__label {
  color: #91dbad;
}

html[data-theme="dark"] .mail-navigation__row[data-navigation-color="teal"]
  > .mail-navigation__identity
  > .mail-navigation__label {
  color: #79d6cf;
}

html[data-theme="dark"] .mail-navigation__row[data-navigation-color="blue"]
  > .mail-navigation__identity
  > .mail-navigation__label {
  color: #91b1ff;
}

html[data-theme="dark"] .mail-navigation__row[data-navigation-color="purple"]
  > .mail-navigation__identity
  > .mail-navigation__label {
  color: #c5a7ff;
}

html[data-theme="dark"] .mail-navigation__row[data-navigation-color="pink"]
  > .mail-navigation__identity
  > .mail-navigation__label {
  color: #f5a3cc;
}

html[data-theme="dark"] .mail-navigation__row.is-disabled
  > .mail-navigation__identity
  > .mail-navigation__label {
  color: inherit;
}

html[data-theme="dark"] .mail-navigation-color-editor__description,
html[data-theme="dark"] .mail-navigation-color-editor__status {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-navigation-color-editor__choice {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-navigation-color-editor__choice:hover,
html[data-theme="dark"] .mail-navigation-color-editor__choice:has(input:checked) {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-accent-soft);
  border-color: #3f5f96;
}

html[data-theme="dark"]
  .mail-navigation-color-editor__choice[data-navigation-color-choice="red"] {
  --mail-navigation-choice-color: #ff9c9c;
}

html[data-theme="dark"]
  .mail-navigation-color-editor__choice[data-navigation-color-choice="orange"] {
  --mail-navigation-choice-color: #ffb86b;
}

html[data-theme="dark"]
  .mail-navigation-color-editor__choice[data-navigation-color-choice="amber"] {
  --mail-navigation-choice-color: #f1ce7b;
}

html[data-theme="dark"]
  .mail-navigation-color-editor__choice[data-navigation-color-choice="green"] {
  --mail-navigation-choice-color: #91dbad;
}

html[data-theme="dark"]
  .mail-navigation-color-editor__choice[data-navigation-color-choice="teal"] {
  --mail-navigation-choice-color: #79d6cf;
}

html[data-theme="dark"]
  .mail-navigation-color-editor__choice[data-navigation-color-choice="blue"] {
  --mail-navigation-choice-color: #91b1ff;
}

html[data-theme="dark"]
  .mail-navigation-color-editor__choice[data-navigation-color-choice="purple"] {
  --mail-navigation-choice-color: #c5a7ff;
}

html[data-theme="dark"]
  .mail-navigation-color-editor__choice[data-navigation-color-choice="pink"] {
  --mail-navigation-choice-color: #f5a3cc;
}

html[data-theme="dark"] .mail-navigation-color-editor__status.is-error {
  color: var(--mail-theme-danger-text);
}

html[data-theme="dark"] .mail-navigation__icon,
html[data-theme="dark"] .mail-navigation__secondary {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-navigation__row.is-selected .mail-navigation__icon,
html[data-theme="dark"] .mail-navigation__row.is-selected .mail-navigation__secondary {
  color: var(--mail-theme-accent-text);
}

html[data-theme="dark"] .mail-navigation__count {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-navigation__row.is-selected .mail-navigation__count {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-surface);
}

html[data-theme="dark"] .mail-navigation__branch:is([data-navigation-kind="account"], [data-navigation-kind="group"]):not([open]) > summary .mail-navigation__branch-toggle:hover,
html[data-theme="dark"] .mail-navigation__branch.is-drag-expand-target > summary {
  background: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-navigation__branch:is([data-navigation-kind="account"], [data-navigation-kind="group"]):not([open]) > summary .mail-navigation__branch-toggle:hover,
html[data-theme="dark"] .mail-navigation__branch:is([data-navigation-kind="account"], [data-navigation-kind="group"]):not([open]) > summary .mail-navigation__branch-toggle:hover .mail-navigation__icon {
  color: var(--mail-theme-text);
}

html[data-theme="dark"] .mail-navigation__drag-handle:hover,
html[data-theme="dark"] .mail-navigation__drag-handle:focus-visible {
  border-color: var(--mail-theme-border-strong);
  background-color: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-navigation__drop-indicator::before {
  background: var(--mail-theme-surface);
}

html[data-theme="dark"] .mail-navigation__unified {
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-panel-header {
  color: var(--mail-theme-text);
  background: rgb(17 26 43 / 96%);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-panel-header h1 {
  color: var(--mail-theme-text);
}

html[data-theme="dark"] .mail-panel-header__eyebrow {
  color: var(--mail-theme-accent-text);
}

html[data-theme="dark"] .mail-panel-header__context,
html[data-theme="dark"] .mail-panel-header__meta {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-panel-header__action button {
  color: var(--mail-theme-danger-text);
  background: var(--mail-theme-danger-soft);
  border-color: var(--mail-theme-danger-border);
}

html[data-theme="dark"] .mail-list-controls,
html[data-theme="dark"] .mail-list-selection-split {
  background: var(--mail-theme-surface);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-list-selection-toggle,
html[data-theme="dark"] .mail-list-selection-options-trigger {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-list-selection-options-trigger {
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-list-selection-toggle:hover,
html[data-theme="dark"] .mail-list-selection-options-trigger:hover {
  color: var(--mail-theme-text);
  background: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-list-selection-toggle[aria-pressed="true"] {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-accent-soft);
}

html[data-theme="dark"] .mail-search .mail-search__compact input[type="search"],
html[data-theme="dark"] .mail-search input[type="search"],
html[data-theme="dark"] .mail-search input[type="date"],
html[data-theme="dark"] .mail-search select {
  color: var(--mail-theme-text);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .mail-search__compact .mail-search__options-toggle,
html[data-theme="dark"] .mail-search button:not([type="submit"]),
html[data-theme="dark"] .mail-search__clear,
html[data-theme="dark"] .mail-list-selection-bar button {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .mail-search button[type="submit"] {
  color: #ffffff;
  background: var(--mail-theme-accent-fill);
  border-color: var(--mail-theme-accent-fill);
}

html[data-theme="dark"] .mail-search__options-toggle.has-active-options,
html[data-theme="dark"] .mail-search-filters__checks label:has(input:checked) {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-accent-soft);
  border-color: #3f5f96;
}

html[data-theme="dark"] .mail-search-filters__checks label {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-list__row,
html[data-theme="dark"] .mail-list__item {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-list__row.is-unread,
html[data-theme="dark"] .mail-list__item.is-unread {
  background: var(--mail-theme-surface-subtle);
}

html[data-theme="dark"] .mail-list__item:hover {
  color: var(--mail-theme-text);
  background: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-list__row.is-multiselected .mail-list__item,
html[data-theme="dark"] .mail-list__item.is-selected,
html[data-theme="dark"] .mail-list__item.is-selected:hover {
  color: var(--mail-theme-text);
  background: var(--mail-theme-accent-soft);
  box-shadow: inset 3px 0 var(--mail-theme-accent-text);
}

html[data-theme="dark"] .mail-list__item.is-unread .mail-list__sender,
html[data-theme="dark"] .mail-list__item.is-unread .mail-list__subject {
  color: var(--mail-theme-text);
}

html[data-theme="dark"] .mail-list__checkbox:hover,
html[data-theme="dark"] .mail-list__star:hover {
  color: var(--mail-theme-text-muted);
  background: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-list__star {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-list__thread-count {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-accent-soft);
}

html[data-theme="dark"] .mail-list__account,
html[data-theme="dark"] .mail-list__mailbox {
  color: var(--mail-theme-text-muted);
  background: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-detail-panel {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface);
}

html[data-theme="dark"] .mail-detail-toolbar {
  background: var(--mail-theme-surface);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-detail-actions button,
html[data-theme="dark"] .mail-detail-actions .button-link,
html[data-theme="dark"] .mail-action-overflow button,
html[data-theme="dark"] .mail-action-overflow select {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .mail-detail-actions button:hover,
html[data-theme="dark"] .mail-detail-actions .button-link:hover,
html[data-theme="dark"] .mail-action-overflow button:hover {
  color: var(--mail-theme-text);
  background: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-detail-actions .mail-detail-actions__primary-button {
  color: #ffffff;
  background: var(--mail-theme-accent-fill);
  border-color: var(--mail-theme-accent-fill);
}

html[data-theme="dark"] .mail-detail-actions .mail-detail-actions__primary-button:hover {
  color: #ffffff;
  background: var(--mail-theme-accent-fill-hover);
  border-color: var(--mail-theme-accent-fill-hover);
}

html[data-theme="dark"] .mail-detail-actions__primary .danger-button {
  color: var(--mail-theme-danger-text) !important;
  background: var(--mail-theme-danger-soft) !important;
  border-color: var(--mail-theme-danger-border) !important;
}

html[data-theme="dark"] .mail-action-overflow__trigger.flextip-open {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-accent-soft);
  border-color: #3f5f96;
}

html[data-theme="dark"] .mail-action-overflow__panel > button,
html[data-theme="dark"] .mail-action-overflow__panel > a {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-elevated);
}

html[data-theme="dark"] .mail-action-overflow__panel > button:hover,
html[data-theme="dark"] .mail-action-overflow__panel > a:hover {
  color: var(--mail-theme-text);
  background: var(--mail-theme-surface-hover);
}

html[data-theme="dark"] .mail-action-overflow__panel > .mail-action-overflow__unavailable:disabled {
  color: var(--mail-theme-text-faint);
  background: var(--mail-theme-surface-elevated);
}

html[data-theme="dark"] .mail-action-overflow__move {
  background: var(--mail-theme-surface-subtle);
}

html[data-theme="dark"] .mail-action-overflow__move label {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-action-overflow__separator {
  background: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-detail-subject {
  color: var(--mail-theme-text);
  background: var(--mail-theme-surface);
}

html[data-theme="dark"] .mail-detail-subject.is-body-boundary-stuck {
  box-shadow: inset 0 -1px var(--mail-theme-border);
}

html[data-theme="dark"] .mail-detail-subject .mail-panel-header__eyebrow {
  color: var(--mail-theme-accent-text);
}

html[data-theme="dark"] .mail-detail-subject h2 {
  color: var(--mail-theme-text);
}

html[data-theme="dark"] .mail-detail-header {
  color: var(--mail-theme-text-secondary);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-detail-header__sender strong {
  color: var(--mail-theme-text);
}

html[data-theme="dark"] .mail-detail-header__sender > span,
html[data-theme="dark"] .mail-detail-header dt,
html[data-theme="dark"] .mail-security-value__ip {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-detail-header dd {
  color: var(--mail-theme-text-secondary);
}

html[data-theme="dark"] .mail-sender-verification {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .mail-sender-verification p {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-sender-verification__toggle,
html[data-theme="dark"] .mail-auth-result {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-hover);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .mail-sender-verification__details {
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-sender-verification--verified {
  color: var(--mail-theme-success-text);
  background: var(--mail-theme-success-soft);
  border-color: var(--mail-theme-success-border);
}

html[data-theme="dark"] .mail-sender-verification--verified .mail-sender-verification__badge,
html[data-theme="dark"] .mail-sender-verification--verified .mail-sender-verification__toggle,
html[data-theme="dark"] .mail-auth-result--pass {
  color: var(--mail-theme-success-text);
  background: #28513a;
  border-color: var(--mail-theme-success-border);
}

html[data-theme="dark"] .mail-sender-verification--failed {
  color: var(--mail-theme-danger-text);
  background: var(--mail-theme-danger-soft);
  border-color: var(--mail-theme-danger-border);
}

html[data-theme="dark"] .mail-sender-verification--failed .mail-sender-verification__badge,
html[data-theme="dark"] .mail-sender-verification--failed .mail-sender-verification__toggle,
html[data-theme="dark"] .mail-auth-result--fail,
html[data-theme="dark"] .mail-auth-result--softfail,
html[data-theme="dark"] .mail-auth-result--permanenterror {
  color: var(--mail-theme-danger-text);
  background: #542934;
  border-color: var(--mail-theme-danger-border);
}

html[data-theme="dark"] .mail-sender-verification--partial,
html[data-theme="dark"] .mail-sender-verification--unverified,
html[data-theme="dark"] .mail-sender-verification--temporaryerror {
  color: var(--mail-theme-warning-text);
  background: var(--mail-theme-warning-soft);
  border-color: var(--mail-theme-warning-border);
}

html[data-theme="dark"] .mail-sender-verification--partial .mail-sender-verification__badge,
html[data-theme="dark"] .mail-sender-verification--partial .mail-sender-verification__toggle,
html[data-theme="dark"] .mail-sender-verification--unverified .mail-sender-verification__badge,
html[data-theme="dark"] .mail-sender-verification--unverified .mail-sender-verification__toggle,
html[data-theme="dark"] .mail-sender-verification--temporaryerror .mail-sender-verification__badge,
html[data-theme="dark"] .mail-sender-verification--temporaryerror .mail-sender-verification__toggle,
html[data-theme="dark"] .mail-auth-result--temporaryerror {
  color: var(--mail-theme-warning-text);
  background: #50411f;
  border-color: var(--mail-theme-warning-border);
}

html[data-theme="dark"] .mail-sender-verification--pending {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-accent-soft);
  border-color: #3f5f96;
}

html[data-theme="dark"] .mail-sender-verification--pending .mail-sender-verification__badge,
html[data-theme="dark"] .mail-sender-verification--pending .mail-sender-verification__toggle {
  color: var(--mail-theme-accent-text);
  background: #294675;
  border-color: #3f5f96;
}

html[data-theme="dark"] .mail-sender-verification--pending .mail-sender-verification__wait {
  color: var(--mail-theme-accent-text);
}

html[data-theme="dark"] .mail-sender-verification--notevaluated,
html[data-theme="dark"] .mail-sender-verification--outgoing {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .mail-sender-verification--notevaluated .mail-sender-verification__badge,
html[data-theme="dark"] .mail-sender-verification--notevaluated .mail-sender-verification__toggle,
html[data-theme="dark"] .mail-sender-verification--outgoing .mail-sender-verification__badge,
html[data-theme="dark"] .mail-sender-verification--outgoing .mail-sender-verification__toggle {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-hover);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .mail-sender-verification--notevaluated .mail-sender-verification__wait {
  color: var(--mail-theme-text-secondary);
}

html[data-theme="dark"] .mail-security-tip-trigger {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-security-tip-trigger:hover,
html[data-theme="dark"] .mail-security-tip-trigger.flextip-open {
  color: var(--mail-theme-accent-text);
  background: var(--mail-theme-accent-soft);
}

html[data-theme="dark"] .mail-security-help-tip__heading {
  color: var(--mail-theme-text);
}

html[data-theme="dark"] .mail-security-help-tip__context {
  color: var(--mail-theme-text-muted);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-detail-body--text {
  color: var(--mail-theme-text-secondary);
}

html[data-theme="dark"] .mail-message-body-loading__error {
  color: var(--mail-theme-danger-text);
}

html[data-theme="dark"] .mail-message-body-loading__actions button,
html[data-theme="dark"] .mail-message-body-loading__actions a {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .mail-remote-images-notice__actions button {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border-strong);
}

html[data-theme="dark"] .mail-remote-images-notice__actions button:first-child {
  color: #ffffff;
  background: var(--mail-theme-accent-fill);
  border-color: var(--mail-theme-accent-fill);
}

html[data-theme="dark"] .mail-remote-images-notice__status {
  color: var(--mail-theme-warning-text);
}

html[data-theme="dark"] .mail-attachments {
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-attachments h3 {
  color: var(--mail-theme-text);
}

html[data-theme="dark"] .mail-attachments li {
  color: var(--mail-theme-text-secondary);
  background: var(--mail-theme-surface-subtle);
  border-color: var(--mail-theme-border);
}

html[data-theme="dark"] .mail-attachments__meta {
  color: var(--mail-theme-text-muted);
}

html[data-theme="dark"] .mail-detail-body--html {
  padding: 1.25rem;
  color: #253047;
  background: #ffffff;
  border: 1px solid #dfe4ee;
  border-radius: 0.65rem;
}

html[data-theme="dark"] :where(
  .mail-workspace__navigation,
  .mail-list-panel,
  .mail-detail-panel
) {
  scrollbar-color: #40516a transparent;
}

html[data-theme="dark"] :where(
  .mail-workspace__navigation,
  .mail-list-panel,
  .mail-detail-panel
)::-webkit-scrollbar-thumb {
  background: #40516a;
}

html[data-theme="dark"] .site-footer__bottom {
  border-color: var(--mail-theme-border);
}

@media (max-width: 42rem) {
  html[data-theme="dark"] .compose-shell {
    background: var(--mail-theme-surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-menu-button__chevron {
    transition: none;
  }
}
