/*
 * Kareta web dark theme component overrides.
 *
 * Keep this file grouped by product area. The palette itself lives in main.css
 * as --theme-* tokens mirrored from Flutter AppColors. Light mode stays driven
 * by the existing component styles; only explicit dark variants belong here.
 */

/* =========================================================
 * Stage 1: Foundation and shared primitives
 * ======================================================= */
html[data-theme="dark"],
html[data-theme="dark"] body {
  background: var(--theme-page) !important;
  color: var(--theme-text);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .popover {
  background-color: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
html[data-theme="dark"] select {
  background-color: var(--theme-input);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] input::placeholder {
  color: var(--theme-text-muted);
  opacity: 1;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="dark"] select:focus {
  background-color: var(--theme-input);
  color: var(--theme-text);
  border-color: var(--theme-border);
  outline: none !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-body,
html[data-theme="dark"] .text-body-emphasis {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .form-text {
  color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .border,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-end,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-start {
  border-color: var(--theme-border) !important;
}

html[data-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--theme-text);
  --bs-table-border-color: var(--theme-border);
  color: var(--theme-text);
}

/* =========================================================
 * Stage 2: Header, navigation and global search
 * ======================================================= */
html[data-theme="dark"] .header,
html[data-theme="dark"] .header__shell,
html[data-theme="dark"] .header__one-column,
html[data-theme="dark"] .floating-header {
  color: var(--theme-text);
}

html[data-theme="dark"] .header__one-column,
html[data-theme="dark"] .header--desktop.header--sticky-active .header__two-column,
html[data-theme="dark"] body.header-search-overlay-active .header--desktop .header__two-column,
html[data-theme="dark"] body.header-search-overlay-active .header--desktop:not(.header--sticky-active) .header__shell {
  background-color: var(--theme-header);
}

html[data-theme="dark"] .header--desktop .header__two-column {
  background-color: var(--theme-header-secondary);
}

html[data-theme="dark"] .header-mobile {
  color: var(--theme-text);
}

html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .header-notifications__toggle,
html[data-theme="dark"] .header__autirization-name,
html[data-theme="dark"] .header-mobile__login-link {
  color: var(--theme-text);
}

html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .header-notifications__toggle:hover {
  background: rgba(147, 197, 253, 0.10);
}

html[data-theme="dark"] .header-notifications__dot {
  box-shadow: 0 0 0 0.2rem var(--theme-header);
}

html[data-theme="dark"] .header__dropdown-wrapper,
html[data-theme="dark"] .header-notifications__dropdown,
html[data-theme="dark"] .header-search__results,
html[data-theme="dark"] #search-results {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .header-notifications__empty,
html[data-theme="dark"] .header__badge,
html[data-theme="dark"] .my-lk__count {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .header-search__form__input-wrapper,
html[data-theme="dark"] .header-search-form__field,
html[data-theme="dark"] .header-search-form__dropdown,
html[data-theme="dark"] .header-search-form__dropdown .header-search-form-dropdown__select2 {
  background-color: var(--theme-input);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .header-region-dropdown {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  box-shadow: var(--theme-shadow) !important;
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .header__userimage-wrapper {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

/* =========================================================
 * Stage 3: Home, catalog and advertisement surfaces
 * ======================================================= */
html[data-theme="dark"] .karetad,
html[data-theme="dark"] .karetad.karetad--premium,
html[data-theme="dark"] .karetad--premium {
  background: var(--theme-surface);
}

html[data-theme="dark"] .karetad.karetad--premium.karetad--inactive,
html[data-theme="dark"] .karetad--premium.karetad--inactive {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .karetad:active,
html[data-theme="dark"] .karetad:focus-within,
html[data-theme="dark"] .karetad:hover {
  background: var(--theme-soft-blue);
}

html[data-theme="dark"] .karetad:has(.karetad__management-panel:hover) {
  background: var(--theme-surface);
}

html[data-theme="dark"] .karetad__content__title,
html[data-theme="dark"] .karetad__content__price,
html[data-theme="dark"] .karetad__content__spec-value {
  color: var(--theme-text);
}

html[data-theme="dark"] .karetad__content__city,
html[data-theme="dark"] .karetad__content__date,
html[data-theme="dark"] .karetad__content__meta-line,
html[data-theme="dark"] .karetad__content__spec-label {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .karetad__link {
  background: transparent !important;
  color: inherit;
}

html[data-theme="dark"] .karetad__content__spec-chip,
html[data-theme="dark"] .karetad__image--placeholder,
html[data-theme="dark"] .media-skeleton-shell,
html[data-theme="dark"] .media-skeleton-shell::before {
  background: var(--theme-surface-high);
}

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

html[data-theme="dark"] .karetads-param,
html[data-theme="dark"] .characteristic-block__wrapper,
html[data-theme="dark"] .description-block__wrapper {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .karetads-param__price-note,
html[data-theme="dark"] .karetads-param__price-convert,
html[data-theme="dark"] .karetads-param__price-convert:hover,
html[data-theme="dark"] .karetads-param__price-convert:focus,
html[data-theme="dark"] .karetads-param__views,
html[data-theme="dark"] .karetads-param__views-info,
html[data-theme="dark"] .karetads-param__city,
html[data-theme="dark"] .characteristic-block-item__title {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .karetads-param-city__value,
html[data-theme="dark"] .karetads-param-seller-1__date,
html[data-theme="dark"] .karetads-param-seller-1-date__param,
html[data-theme="dark"] .characteristic-block-item__value,
html[data-theme="dark"] .description-block-desc {
  color: var(--theme-text);
}

html[data-theme="dark"] .karetads-param__seller {
  border-color: var(--theme-border);
}

html[data-theme="dark"] .karetads-param__seller:hover {
  background: var(--theme-soft-blue);
}

html[data-theme="dark"] .karetads-param-seller-2__img-wrapper,
html[data-theme="dark"] .karetads-thumbs-grid__item {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .characteristic-block__item::before {
  border-bottom-color: var(--theme-border);
}

html[data-theme="dark"] .category-list__item,
html[data-theme="dark"] .brand__logo__link {
  color: var(--theme-text);
}

html[data-theme="dark"] .category-list__item:hover,
html[data-theme="dark"] .category-list__item:focus-visible {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .archive-filters,
html[data-theme="dark"] .archive-filters-root,
html[data-theme="dark"] .karetad-modal__panel {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .karetad-modal__header {
  background: var(--theme-surface);
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .karetad-modal__back,
html[data-theme="dark"] .karetad-modal__close {
  color: var(--theme-text);
}

html[data-theme="dark"] .karetad-modal__overlay {
  background: var(--theme-overlay);
}

/* =========================================================
 * Stage 4: Social feed, stories, comments and social modals
 * ======================================================= */
html[data-theme="dark"] .social-feed-page,
html[data-theme="dark"] .social-feed-topbar {
  background: var(--theme-page);
  color: var(--theme-text);
}

html[data-theme="dark"] .community-header,
html[data-theme="dark"] .social-recommended,
html[data-theme="dark"] .social-directory-teaser__card,
html[data-theme="dark"] .social-compose-modal__panel,
html[data-theme="dark"] .social-post-stats-modal__panel,
html[data-theme="dark"] .social-post-location-modal__panel,
html[data-theme="dark"] .social-post-report-modal__panel,
html[data-theme="dark"] .social-author-preview,
html[data-theme="dark"] .social-reaction-preview,
html[data-theme="dark"] .social-hover-card {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .community-header__tagline,
html[data-theme="dark"] .community-header__tagline-line:first-child,
html[data-theme="dark"] .social-rail__item,
html[data-theme="dark"] .social-rail__icon,
html[data-theme="dark"] .social-page-heading__title,
html[data-theme="dark"] .social-recommended__name,
html[data-theme="dark"] .social-directory-teaser__headline,
html[data-theme="dark"] .social-publish-modal__option,
html[data-theme="dark"] .social-compose-modal__close,
html[data-theme="dark"] .social-compose-modal__title,
html[data-theme="dark"] .social-compose-form__identity strong,
html[data-theme="dark"] .social-feed-composer .social-compose-form__textarea,
html[data-theme="dark"] .social-card__author,
html[data-theme="dark"] .social-comment__author,
html[data-theme="dark"] .social-card__text,
html[data-theme="dark"] .social-comment__text,
html[data-theme="dark"] .social-post-poll__question,
html[data-theme="dark"] .social-post-poll__option,
html[data-theme="dark"] .social-post-poll__option-label,
html[data-theme="dark"] .social-post-menu__item,
html[data-theme="dark"] .social-search-panel__title,
html[data-theme="dark"] .social-search-form__input,
html[data-theme="dark"] .social-account-card__name,
html[data-theme="dark"] .social-reaction-preview-card__name,
html[data-theme="dark"] .social-hover-card__name {
  color: var(--theme-text);
}

html[data-theme="dark"] .community-header__tagline-line:last-child,
html[data-theme="dark"] .social-side-note,
html[data-theme="dark"] .social-recommended__stats,
html[data-theme="dark"] .social-recommended__empty,
html[data-theme="dark"] .social-directory-teaser__meta,
html[data-theme="dark"] .social-directory-teaser__tag,
html[data-theme="dark"] .social-publish-modal__subtitle,
html[data-theme="dark"] .social-publish-modal__option-text,
html[data-theme="dark"] .social-feed-launcher__title,
html[data-theme="dark"] .social-story-tile__meta,
html[data-theme="dark"] .social-card__date,
html[data-theme="dark"] .social-card__pinned-label,
html[data-theme="dark"] .social-comment__date,
html[data-theme="dark"] .social-stat,
html[data-theme="dark"] .social-post-poll__votes,
html[data-theme="dark"] .social-post-poll__option-meta,
html[data-theme="dark"] .social-post-poll__option-voted,
html[data-theme="dark"] .social-compose-form__identity > span:not(.social-card__verified-badge),
html[data-theme="dark"] .social-compose-form__toolbar,
html[data-theme="dark"] .social-post-stats-modal__note,
html[data-theme="dark"] .social-search-panel__text,
html[data-theme="dark"] .social-search-summary,
html[data-theme="dark"] .social-search-empty__text,
html[data-theme="dark"] .social-account-card__stats,
html[data-theme="dark"] .social-reaction-preview-card__time,
html[data-theme="dark"] .social-hover-card__meta {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-rail__item.is-active,
html[data-theme="dark"] .social-rail__item:hover,
html[data-theme="dark"] .social-action-button:hover,
html[data-theme="dark"] .social-compose-form__tool-button:hover,
html[data-theme="dark"] .social-post-menu__item:hover,
html[data-theme="dark"] .social-post-menu__item:focus-visible {
  background: var(--theme-surface-high);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-post-menu__item--danger {
  color: #f87171;
}

html[data-theme="dark"] .social-post-menu__item--danger:hover,
html[data-theme="dark"] .social-post-menu__item--danger:focus-visible {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
}

html[data-theme="dark"] .social-recommended__follow.is-active,
html[data-theme="dark"] .social-recommended__follow.is-active:hover,
html[data-theme="dark"] .social-recommended__follow.is-active:focus-visible {
  background: var(--theme-soft-blue);
  border-color: var(--theme-border);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

html[data-theme="dark"] .social-recommended__item,
html[data-theme="dark"] .social-directory-teaser__preview,
html[data-theme="dark"] .social-compose-form__emoji-panel,
html[data-theme="dark"] .social-card__quote,
html[data-theme="dark"] .social-card__quote-unavailable,
html[data-theme="dark"] .social-post-poll,
html[data-theme="dark"] .social-post-poll__option,
html[data-theme="dark"] .social-compose-form__poll-panel,
html[data-theme="dark"] .social-compose-form__location-picker,
html[data-theme="dark"] .social-post-report-modal__context,
html[data-theme="dark"] .social-search-form__field,
html[data-theme="dark"] .social-account-card,
html[data-theme="dark"] .social-reaction-preview-card {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .social-directory-teaser__tag,
html[data-theme="dark"] .social-directory-teaser__overlay,
html[data-theme="dark"] .social-compose-form__emoji {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .author-post-feed .social-feed-page__shell--empty .social-feed-launcher {
  background: var(--theme-surface);
}

html[data-theme="dark"] .social-card::before,
html[data-theme="dark"] .social-feed-launcher,
html[data-theme="dark"] .social-tabs,
html[data-theme="dark"] .social-compose-modal__head,
html[data-theme="dark"] .social-compose-form__footer,
html[data-theme="dark"] .social-post-location-modal__head,
html[data-theme="dark"] .social-post-report-modal__head {
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .social-post-menu__dropdown {
  background: color-mix(in srgb, var(--theme-surface) 98%, transparent);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .social-post-poll__option-bar {
  background: rgba(55, 118, 229, 0.22);
}

html[data-theme="dark"] .social-comment__author-badge {
  background: rgba(55, 118, 229, 0.18);
  color: #93C5FD;
}

html[data-theme="dark"] .social-feed-composer .social-compose-form__textarea::placeholder,
html[data-theme="dark"] .social-feed-composer .social-compose-form__reply::placeholder,
html[data-theme="dark"] .social-search-form__input::placeholder {
  color: var(--theme-text-muted);
}

/* Keep the post composer hierarchy as clean in dark mode as it is in light mode. */
html[data-theme="dark"] .social-compose-modal__panel {
  border: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
  box-shadow: 0 2.4rem 5rem rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .social-post-rules-modal__intro {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-post-rules-modal__list {
  color: var(--theme-text);
}

html[data-theme="dark"] .social-compose-modal__close:hover,
html[data-theme="dark"] .social-compose-modal__close:focus-visible,
html[data-theme="dark"] .social-compose-form__tool-button:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .social-compose-form__tool-button.is-active {
  color: #93C5FD;
  background: rgba(59, 130, 246, 0.12);
}

html[data-theme="dark"] .social-text-counter,
html[data-theme="dark"] .social-feed-form__status {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-text-counter [data-social-text-counter-current] {
  color: var(--theme-text);
}

html[data-theme="dark"] .social-compose-form__submit:not(.is-ready) {
  background: var(--theme-control-disabled);
  border-color: var(--theme-divider);
  color: #6B7280;
}

html[data-theme="dark"] .social-compose-modal,
html[data-theme="dark"] .social-post-location-modal,
html[data-theme="dark"] .social-post-report-modal,
html[data-theme="dark"] .social-post-stats-modal,
html[data-theme="dark"] .social-story-compose-modal {
  --social-modal-backdrop: rgba(0, 0, 0, 0.82);
}

html[data-theme="dark"] .social-story-compose-modal__panel {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .social-story-compose-modal__head {
  border-bottom-color: var(--theme-divider);
}

html[data-theme="dark"] .social-story-compose-modal__title,
html[data-theme="dark"] .social-story-compose__zoom-icon,
html[data-theme="dark"] .social-story-compose__progress-label {
  color: var(--theme-text);
}

html[data-theme="dark"] .social-story-compose__status,
html[data-theme="dark"] .social-story-compose__field-label,
html[data-theme="dark"] .social-story-compose__character-counter,
html[data-theme="dark"] .social-story-compose__mention-message {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-story-compose__tool,
html[data-theme="dark"] .social-story-compose__toolbar .social-story-compose__tool {
  background: rgba(29, 37, 46, 0.86);
  border-color: rgba(156, 163, 175, 0.28);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-story-compose__toolbar .social-story-compose__tool > span:first-child {
  color: var(--theme-text);
}

html[data-theme="dark"] .social-story-compose__sticker-popover {
  background: color-mix(in srgb, var(--theme-surface) 94%, transparent);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .social-story-compose__sticker-popover-close,
html[data-theme="dark"] .social-story-compose__sticker-popover input,
html[data-theme="dark"] .social-story-compose__sticker-popover textarea {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

/* =========================================================
 * Stage 5: Chat and realtime messaging
 * ======================================================= */
html[data-theme="dark"] .kareta-chat-overlay__backdrop {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .kareta-chat-panel,
html[data-theme="dark"] .kareta-chat-panel__list,
html[data-theme="dark"] .kareta-chat-panel__chat,
html[data-theme="dark"] .kareta-chat-modal__composer {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-panel__header,
html[data-theme="dark"] .kareta-chat-panel__list,
html[data-theme="dark"] .kareta-chat-panel__list-item,
html[data-theme="dark"] .kareta-chat-view__main {
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .kareta-chat-panel__title,
html[data-theme="dark"] .kareta-chat-panel__list-title,
html[data-theme="dark"] .kareta-chat-panel__ad-title,
html[data-theme="dark"] .kareta-chat-panel__price,
html[data-theme="dark"] .kareta-chat-view__title,
html[data-theme="dark"] .kareta-chat-ad-card__title,
html[data-theme="dark"] .kareta-chat-reply__author,
html[data-theme="dark"] .kareta-chat-block,
html[data-theme="dark"] .kareta-chat-view__menu-item {
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-panel__loader,
html[data-theme="dark"] .kareta-chat-panel__empty,
html[data-theme="dark"] .kareta-chat-panel__meta,
html[data-theme="dark"] .kareta-chat-panel__list-subtitle,
html[data-theme="dark"] .kareta-chat-view__status,
html[data-theme="dark"] .kareta-chat-ad-card__price,
html[data-theme="dark"] .kareta-chat-modal__loader,
html[data-theme="dark"] .kareta-chat-modal__day,
html[data-theme="dark"] .kareta-chat-suggestions__title,
html[data-theme="dark"] .kareta-chat-modal__empty,
html[data-theme="dark"] .kareta-chat-modal__meta,
html[data-theme="dark"] .kareta-chat-modal__reply-action,
html[data-theme="dark"] .kareta-chat-modal__typing,
html[data-theme="dark"] .kareta-chat-reply__text,
html[data-theme="dark"] .kareta-chat-attach {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .kareta-chat-panel__list-item:hover,
html[data-theme="dark"] .kareta-chat-panel__list-item.is-unread,
html[data-theme="dark"] .kareta-chat-view__more:hover,
html[data-theme="dark"] .kareta-chat-view__menu-item:hover,
html[data-theme="dark"] .kareta-chat-attach:hover,
html[data-theme="dark"] .kareta-chat-modal__reply-action:hover {
  background: var(--theme-surface-high);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-panel__list-item.is-active,
html[data-theme="dark"] .kareta-chat-suggestions__item,
html[data-theme="dark"] .kareta-chat-modal__message[data-mine="1"] {
  background: var(--theme-soft-blue);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-panel__avatar,
html[data-theme="dark"] .kareta-chat-panel__cover,
html[data-theme="dark"] .kareta-chat-panel__mini-avatar span,
html[data-theme="dark"] .kareta-chat-view__avatar,
html[data-theme="dark"] .kareta-chat-ad-card__thumb,
html[data-theme="dark"] .kareta-chat-attachments__item,
html[data-theme="dark"] .kareta-chat-modal__image,
html[data-theme="dark"] .kareta-chat-modal__day,
html[data-theme="dark"] .kareta-chat-modal__message,
html[data-theme="dark"] .kareta-chat-modal__typing,
html[data-theme="dark"] .kareta-chat-reply,
html[data-theme="dark"] .kareta-chat-block,
html[data-theme="dark"] .kareta-chat-ad-card {
  background: var(--theme-surface-high);
}

.kareta-chat-panel__avatar-wrap {
  position: relative;
  width: 4rem;
  height: 4rem;
  flex: 0 0 4rem;
}

.kareta-chat-panel__online-dot {
  position: absolute;
  right: -0.05rem;
  bottom: -0.05rem;
  width: 1rem;
  height: 1rem;
  box-sizing: border-box;
  border: 0.2rem solid var(--theme-surface, #fff);
  border-radius: 50%;
  background: #3b9f68;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 140ms ease, transform 140ms ease;
  pointer-events: none;
}

.kareta-chat-panel__online-dot.is-online {
  opacity: 1;
  transform: scale(1);
}

.kareta-chat-panel__avatar.kareta-chat-panel__avatar--story {
  border: 0;
  padding: 0.22rem;
  background: linear-gradient(135deg, #ff9a3c 0%, #ff4f79 48%, #6f7bff 100%);
  cursor: pointer;
}

.kareta-chat-panel__avatar.kareta-chat-panel__avatar--story img {
  border-radius: 50%;
  border: 0.18rem solid var(--theme-surface, #fff);
  background: var(--theme-surface, #fff);
}

.kareta-chat-view__avatar.kareta-chat-view__avatar--story {
  box-sizing: border-box;
  padding: 0.22rem;
  background: linear-gradient(135deg, #ff9a3c 0%, #ff4f79 48%, #6f7bff 100%);
  cursor: pointer;
}

.kareta-chat-view__avatar.kareta-chat-view__avatar--story img {
  border: 0.18rem solid var(--theme-surface, #fff);
  background: var(--theme-surface, #fff);
}

html[data-theme="dark"] .kareta-chat-panel__avatar.kareta-chat-panel__avatar--story,
html[data-theme="dark"] .kareta-chat-view__avatar.kareta-chat-view__avatar--story {
  background: linear-gradient(135deg, #ff9a3c 0%, #ff4f79 48%, #6f7bff 100%);
}

html[data-theme="dark"] .kareta-chat-panel__mini-avatar,
html[data-theme="dark"] .kareta-chat-view__more,
html[data-theme="dark"] .kareta-chat-view__menu {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-view__menu {
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .kareta-chat-modal__composer input {
  background: var(--theme-control);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-modal__composer input:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .kareta-chat-modal__composer input:focus {
  background: var(--theme-input);
}

html[data-theme="dark"] .kareta-chat-modal__composer input::placeholder {
  color: var(--theme-text-muted);
}

.kareta-chat-attach:disabled {
  opacity: 0.45;
  cursor: default;
  background: transparent;
}

.kareta-chat-voice-recording {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 4.4rem;
}

.kareta-chat-voice-recording.is-hidden {
  display: none;
}

.kareta-chat-modal__composer.is-voice-recording .kareta-chat-modal__composer-row {
  display: none;
}

.kareta-chat-voice-recording__send {
  margin-left: auto;
}

.kareta-chat-voice-recording__dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999rem;
  background: #ef4444;
  flex: 0 0 auto;
  animation: kareta-voice-recording-pulse 1.15s ease-in-out infinite;
}

@keyframes kareta-voice-recording-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1); }
}

.kareta-chat-voice-recording__level {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 2.4rem;
  flex: 1 1 auto;
  min-width: 7rem;
  overflow: hidden;
}

.kareta-chat-voice-recording__level i {
  display: block;
  width: 0.25rem;
  height: 100%;
  border-radius: 99rem;
  background: currentColor;
  opacity: 0.2;
  transform-origin: center;
  transform: scaleY(0.38);
  transition: transform 90ms ease-out, opacity 90ms ease-out;
}

.kareta-chat-voice-recording__level i.is-active {
  opacity: 0.8;
}

.kareta-chat-voice-recording__timer {
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  min-width: 3.6rem;
  text-align: right;
}

.kareta-chat-modal__message.is-deleted-message,
.kareta-chat-modal__message[data-mine="1"].is-deleted-message {
  background: transparent;
  border: 0.1rem solid color-mix(in srgb, currentColor 18%, transparent);
  color: var(--theme-text-muted, #94a3b8);
}

.kareta-chat-modal__text.is-deleted {
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 500;
  font-style: italic;
  opacity: 0.92;
}

html[data-theme="dark"] .kareta-chat-modal__message.is-deleted-message,
html[data-theme="dark"] .kareta-chat-modal__message[data-mine="1"].is-deleted-message {
  background: transparent;
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
}

.kareta-chat-modal__message.is-voice-message {
  padding: 0.9rem 1.2rem 1rem;
}

.kareta-chat-modal__message.is-voice-message .kareta-chat-modal__meta {
  right: 1.2rem;
  bottom: 1rem;
}

.kareta-chat-modal__message.is-voice-message .kareta-chat-modal__voice-footer {
  padding-right: 6.2rem;
}

.kareta-chat-modal__voice {
  display: grid;
  grid-template-columns: 5rem minmax(14rem, 1fr);
  align-items: center;
  gap: 0.9rem;
  width: min(29rem, 74vw);
  min-height: 5.4rem;
}

.kareta-chat-modal__voice-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.kareta-chat-modal__voice-play,
.kareta-chat-modal__voice-speed {
  appearance: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.kareta-chat-modal__voice-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999rem;
  background: color-mix(in srgb, currentColor 13%, transparent);
  transition: transform 120ms ease, background 120ms ease;
}

.kareta-chat-modal__voice-play:hover {
  background: color-mix(in srgb, currentColor 18%, transparent);
}

.kareta-chat-modal__voice-play:active {
  transform: scale(0.94);
}

.kareta-chat-modal__voice-play svg {
  width: 2.7rem;
  height: 2.7rem;
}

.kareta-chat-modal__voice.is-loading .kareta-chat-modal__voice-play svg {
  opacity: 0;
}

.kareta-chat-modal__voice.is-loading .kareta-chat-modal__voice-play::after {
  content: '';
  position: absolute;
  width: 2rem;
  height: 2rem;
  border: 0.2rem solid currentColor;
  border-right-color: transparent;
  border-radius: 999rem;
  animation: kareta-voice-spin 0.7s linear infinite;
}

@keyframes kareta-voice-spin {
  to { transform: rotate(360deg); }
}

.kareta-chat-modal__voice-body {
  min-width: 0;
}

.kareta-chat-modal__voice-waveform {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  height: 3rem;
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
  outline: none;
}

.kareta-chat-modal__voice-waveform:focus-visible {
  border-radius: 0.6rem;
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, currentColor 22%, transparent);
}

.kareta-chat-modal__voice-waveform i {
  display: block;
  flex: 1 1 0;
  min-width: 0.15rem;
  max-width: 0.26rem;
  height: calc(0.6rem + (2.4rem * var(--voice-bar, 0.5)));
  border-radius: 999rem;
  background: currentColor;
  opacity: 0.46;
  transition: opacity 90ms ease;
}

.kareta-chat-modal__voice-waveform i.is-active {
  opacity: 1;
}

.kareta-chat-modal__voice-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.15rem;
  min-height: 1.8rem;
  font-size: 1.15rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.kareta-chat-modal__voice-speed {
  min-width: 3.2rem;
  padding: 0.25rem 0.45rem;
  border-radius: 999rem;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 700;
  opacity: 0.75;
  transition: opacity 120ms ease, background 120ms ease;
}

.kareta-chat-modal__voice-speed[aria-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}

.kareta-chat-modal__voice-speed:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
  opacity: 1;
}

.kareta-chat-modal__voice.is-pending {
  opacity: 0.72;
}

.kareta-chat-panel__list-title,
.kareta-chat-view__title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.kareta-chat-panel__list-title > span,
.kareta-chat-view__title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kareta-chat-verified-badge.user-identity-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 1.45rem;
  margin-left: 0.35rem;
  color: #3776e5;
  line-height: 1;
  filter: drop-shadow(0 0.08rem 0.22rem rgba(0, 0, 0, 0.12));
}

.kareta-chat-verified-badge.user-identity-star svg {
  width: 1.45rem;
  height: 1.45rem;
}

.kareta-chat-modal__message-date.is-pending {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.kareta-chat-modal__message-date.is-pending::before {
  content: '';
  width: 0.8rem;
  height: 0.8rem;
  border: 0.15rem solid currentColor;
  border-right-color: transparent;
  border-radius: 999rem;
  animation: kareta-voice-spin 0.7s linear infinite;
}

.kareta-chat-modal__message-date.is-pending.is-failed {
  color: var(--theme-danger, #dc2626);
}

.kareta-chat-modal__message-date.is-pending.is-failed::before {
  display: none;
}

.kareta-chat-modal__delivery-action {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin: -0.45rem 0;
  padding: 0;
  border: 0;
  border-radius: 999rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.kareta-chat-modal__delivery-action:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.kareta-chat-modal__delivery-action svg {
  width: 1.55rem;
  height: 1.55rem;
}

html[data-theme="dark"] .kareta-chat-reply__close {
  background: var(--theme-control-hover);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-panel__tabs {
  background: var(--theme-surface);
  border-bottom-color: var(--theme-divider);
}

html[data-theme="dark"] .kareta-chat-panel__tab {
  background: var(--theme-surface-high);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .kareta-chat-panel__tab:hover {
  background: var(--theme-control-hover);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-panel__tab.is-active {
  background: var(--theme-soft-blue);
  color: var(--theme-text);
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.18);
}

html[data-theme="dark"] .kareta-chat-view__status.is-online {
  background: rgba(34, 197, 94, 0.16);
  color: #86EFAC;
}

html[data-theme="dark"] .kareta-chat-modal__image.is-loading::before {
  background: linear-gradient(110deg, #1D252E 8%, #2A313B 18%, #1D252E 33%);
  background-size: 200% 100%;
}

html[data-theme="dark"] .kareta-chat-entity,
html[data-theme="dark"] .kareta-chat-entity:hover {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-panel__list-item.is-support {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .kareta-chat-panel__list-item.is-support:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .kareta-chat-panel__unread-dot {
  box-shadow: 0 0 0 0.2rem var(--theme-surface);
}

html[data-theme="dark"] .kareta-chat-panel__avatar,
html[data-theme="dark"] .kareta-chat-panel__cover-fallback,
html[data-theme="dark"] .kareta-chat-view__avatar {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .kareta-chat-modal__message[data-mine="1"] .kareta-chat-modal__meta {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .kareta-chat-modal__reply {
  border-left-color: rgba(147, 197, 253, 0.38);
}

html[data-theme="dark"] .kareta-chat-share {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .kareta-chat-share__sheet,
html[data-theme="dark"] .kareta-chat-share__footer {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-share__close,
html[data-theme="dark"] .kareta-chat-share__entity,
html[data-theme="dark"] .kareta-chat-share__search,
html[data-theme="dark"] .kareta-chat-share__avatar {
  background: var(--theme-surface-high);
  color: var(--theme-text-muted);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .kareta-chat-share__search {
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-chat-share__search:focus {
  background: var(--theme-input);
}

html[data-theme="dark"] .kareta-chat-share__row:hover {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .kareta-chat-share__row.is-selected {
  background: var(--theme-soft-blue);
  border-color: rgba(147, 197, 253, 0.2);
}

html[data-theme="dark"] .kareta-chat-share__footer {
  border-top-color: var(--theme-divider);
}

/* =========================================================
 * Stage 6: Profile, settings, notifications and footer
 * ======================================================= */
html[data-theme="dark"] .profile-content,
html[data-theme="dark"] .profile-email-card,
html[data-theme="dark"] .profile-password-card,
html[data-theme="dark"] .profile-name-card,
html[data-theme="dark"] .profile-avatar-card,
html[data-theme="dark"] .profile-email-form,
html[data-theme="dark"] .profile-password-form,
html[data-theme="dark"] .profile-name-form,
html[data-theme="dark"] .profile-avatar-form,
html[data-theme="dark"] .profile-confirm-modal__panel,
html[data-theme="dark"] .notifications-list,
html[data-theme="dark"] .notifications-detail,
html[data-theme="dark"] .notifications-modal__panel {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .profile-email-card__value,
html[data-theme="dark"] .profile-password-card__value,
html[data-theme="dark"] .profile-name-card__value,
html[data-theme="dark"] .profile-confirm-modal__title,
html[data-theme="dark"] .profile-confirm-modal__text,
html[data-theme="dark"] .notifications-list__title,
html[data-theme="dark"] .notifications-detail__title,
html[data-theme="dark"] .notifications-modal__title,
html[data-theme="dark"] .notifications-modal__body {
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-email-card__label,
html[data-theme="dark"] .profile-password-card__label,
html[data-theme="dark"] .profile-name-card__label,
html[data-theme="dark"] .profile-avatar-card__label,
html[data-theme="dark"] .profile-password-card__hint,
html[data-theme="dark"] .profile-name-card__hint,
html[data-theme="dark"] .profile-avatar-card__hint,
html[data-theme="dark"] .profile-avatar-card__meta,
html[data-theme="dark"] .notifications-list__meta,
html[data-theme="dark"] .notifications-list__date,
html[data-theme="dark"] .notifications-list__preview,
html[data-theme="dark"] .notifications-list__empty,
html[data-theme="dark"] .notifications-modal__meta {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .notifications-list__item {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .notifications-list__item:hover,
html[data-theme="dark"] .notifications-list__item.is-active {
  background: var(--theme-soft-blue);
}

html[data-theme="dark"] .notifications-modal {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .notifications-modal__close {
  background: var(--theme-surface-high);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .profile-tabs__tab:not(.active) {
  background: var(--theme-surface-high);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .profile-tabs__tab:not(.active):hover {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .site-footer-v2 {
  --footer-v2-surface: var(--theme-surface);
  --footer-v2-strip: var(--theme-surface-high);
  --footer-v2-border: var(--theme-border);
  --footer-v2-title: var(--theme-text);
  --footer-v2-text: var(--theme-text-muted);
  --footer-v2-text-strong: var(--theme-text);
  --footer-v2-bottom: #111820;
}

html[data-theme="dark"] .site-footer-v2__social {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

/* =========================================================
 * Stage 7: Organizations and directory
 * ======================================================= */
html[data-theme="dark"] .organization-page {
  background: var(--theme-page);
  color: var(--theme-text);
}

html[data-theme="dark"] .organization-page .organization-page__card,
html[data-theme="dark"] .organization-page .organization-page__share-menu,
html[data-theme="dark"] .organization-page .organization-page__route-menu {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .organization-page .organization-page__card {
  box-shadow: none;
}

html[data-theme="dark"] .organization-page .organization-page__title,
html[data-theme="dark"] .organization-page .organization-page__description,
html[data-theme="dark"] .organization-page .organization-page__section-title,
html[data-theme="dark"] .organization-page .organization-page__info-row,
html[data-theme="dark"] .organization-page .ad-share-menu__item,
html[data-theme="dark"] .organization-page .organization-page__route-button,
html[data-theme="dark"] .organization-page .organization-page__route-option {
  color: var(--theme-text);
}

html[data-theme="dark"] .organization-page .organization-page__meta,
html[data-theme="dark"] .organization-page .organization-page__info-label,
html[data-theme="dark"] .organization-page .organization-page__map-info,
html[data-theme="dark"] .organization-page .organization-page__status-helper,
html[data-theme="dark"] .organization-page .organization-page__route-option-action,
html[data-theme="dark"] .organization-page .organization-location-map__fallback {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .organization-page .organization-page__section {
  border-top-color: var(--theme-divider);
}

html[data-theme="dark"] .organization-page .organization-page__logo,
html[data-theme="dark"] .organization-page .organization-gallery__item,
html[data-theme="dark"] .organization-page .organization-page__route-icon,
html[data-theme="dark"] .organization-page .organization-location-map__fallback {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .organization-page .organization-page__tag,
html[data-theme="dark"] .organization-page .organization-page__social {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .organization-page .organization-page__social:hover,
html[data-theme="dark"] .organization-page .ad-share-menu__item:hover,
html[data-theme="dark"] .organization-page .organization-page__route-option:hover,
html[data-theme="dark"] .organization-page .organization-page__route-button:hover {
  background: var(--theme-control-hover);
  color: var(--color-primary-muted);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .organization-page .organization-page__route-button {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .organization-page .organization-page__status-notice {
  background: #3A2327;
  border-color: rgba(255, 180, 180, 0.28);
  color: #FFB4B4;
}

html[data-theme="dark"] .organization-map-hero__title,
html[data-theme="dark"] .kareta-map-sidepanel,
html[data-theme="dark"] .kareta-map-listpanel,
html[data-theme="dark"] .kareta-map-sidepanel__empty,
html[data-theme="dark"] .kareta-map-sidepanel__card,
html[data-theme="dark"] .kareta-map-sidepanel__card--list,
html[data-theme="dark"] .kareta-map-sidepanel__share-menu,
html[data-theme="dark"] .kareta-map-sidepanel__route-menu {
  background: color-mix(in srgb, var(--theme-surface) 97%, transparent);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .advert-cabinet__title,
html[data-theme="dark"] .kareta-map-sidepanel__name,
html[data-theme="dark"] .kareta-map-sidepanel__section-title,
html[data-theme="dark"] .kareta-map-sidepanel__list-title,
html[data-theme="dark"] .kareta-map-category-button,
html[data-theme="dark"] .kareta-map-sidepanel .ad-share-menu__item,
html[data-theme="dark"] .kareta-map-sidepanel__route-button,
html[data-theme="dark"] .kareta-map-sidepanel__route-option,
html[data-theme="dark"] .kareta-map-sidepanel__list-item {
  color: var(--theme-text);
}

html[data-theme="dark"] .advert-empty,
html[data-theme="dark"] .kareta-map-sidepanel__info-row,
html[data-theme="dark"] .kareta-map-sidepanel__address,
html[data-theme="dark"] .kareta-map-sidepanel__phone,
html[data-theme="dark"] .kareta-map-sidepanel__description,
html[data-theme="dark"] .kareta-map-filter-heading,
html[data-theme="dark"] .kareta-map-category-button__count,
html[data-theme="dark"] .kareta-map-sidepanel__list-meta,
html[data-theme="dark"] .kareta-map-sidepanel__list-title-count {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .advert-empty,
html[data-theme="dark"] .kareta-map-sidepanel__action-button,
html[data-theme="dark"] .kareta-map-sidepanel__close,
html[data-theme="dark"] .kareta-map-sidepanel__route-button,
html[data-theme="dark"] .kareta-map-sidepanel__list-item,
html[data-theme="dark"] .kareta-map-sidepanel__filter-select,
html[data-theme="dark"] .kareta-map-filter-select .select2-selection,
html[data-theme="dark"] .kareta-map-filter-select .ts-control,
html[data-theme="dark"] .kareta-map-sidepanel__logo,
html[data-theme="dark"] .kareta-map-sidepanel__list-logo {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-map-sidepanel__action-button:hover,
html[data-theme="dark"] .kareta-map-sidepanel__close:hover,
html[data-theme="dark"] .kareta-map-sidepanel__route-button:hover,
html[data-theme="dark"] .kareta-map-sidepanel__route-option:hover,
html[data-theme="dark"] .kareta-map-sidepanel .ad-share-menu__item:hover,
html[data-theme="dark"] .kareta-map-sidepanel__list-item:hover {
  background: var(--theme-control-hover);
  border-color: var(--theme-border);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .advert-cabinet__button--secondary {
  background: var(--theme-surface);
  border-color: var(--color-primary);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .kareta-map-sidepanel__tag,
html[data-theme="dark"] .kareta-map-sidepanel__social-link,
html[data-theme="dark"] .kareta-map-sidepanel__list-tag,
html[data-theme="dark"] .kareta-map-filter-heading__icon {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
}

/* =========================================================
 * Stage 8: Administration surfaces
 * ======================================================= */
html[data-theme="dark"] .admin-dashboard__title,
html[data-theme="dark"] .admin-dashboard__metric-value,
html[data-theme="dark"] .admin-dashboard__metric-label,
html[data-theme="dark"] .admin-dashboard__card-title,
html[data-theme="dark"] .admin-dashboard__list-item,
html[data-theme="dark"] .admin-dashboard__list-value,
html[data-theme="dark"] .admin-dashboard__text {
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-dashboard__hint,
html[data-theme="dark"] .admin-dashboard__subtext {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .admin-dashboard__card {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-dashboard__card--accent {
  border-color: rgba(55, 118, 229, 0.72);
  box-shadow: 0 0.8rem 2.4rem rgba(55, 118, 229, 0.10);
}

html[data-theme="dark"] .admin-dashboard__card--warning {
  border-color: rgba(245, 160, 0, 0.55);
  box-shadow: 0 0.8rem 2.4rem rgba(245, 160, 0, 0.08);
}

html[data-theme="dark"] .admin-dashboard__badge {
  background: rgba(55, 118, 229, 0.18);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .admin-table,
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td {
  color: var(--theme-text);
  border-color: var(--theme-border);
}

/* =========================================================
 * Stage 9: Authorization and account entry
 * ======================================================= */
html[data-theme="dark"] #login-register-password {
  color: var(--theme-text);
}

html[data-theme="dark"] .login-panel__login-form-wrapper {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .login__title,
html[data-theme="dark"] .login-username label,
html[data-theme="dark"] .login-password label,
html[data-theme="dark"] .login-remember label,
html[data-theme="dark"] .login-panel__text,
html[data-theme="dark"] .login-panel__text strong,
html[data-theme="dark"] .active_login .tabs-login__title,
html[data-theme="dark"] .tabs-login__tab.active_login:hover .tabs-login__title {
  color: var(--theme-text);
}

html[data-theme="dark"] .login-panel__text--muted {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .login-username input,
html[data-theme="dark"] .login-password input {
  background: var(--theme-control);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .login-username input:hover,
html[data-theme="dark"] .login-password input:hover,
html[data-theme="dark"] .login-username input:focus,
html[data-theme="dark"] .login-password input:focus {
  background: var(--theme-control-hover);
  color: var(--theme-text);
}

html[data-theme="dark"] .login-panel__notice {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .login-username__prefix {
  color: var(--theme-text-muted);
  border-right-color: var(--theme-border);
}

html[data-theme="dark"] input[type="submit"].login-submit.is-disabled {
  background: var(--theme-control-disabled);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .login-panel__registration-button {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
}

/* =========================================================
 * Stage 10: Account settings and wallet
 * ======================================================= */
html[data-theme="dark"] .verification-banner__card {
  background: #32291B;
  border-color: rgba(245, 160, 0, 0.34);
}

html[data-theme="dark"] .verification-banner__heading,
html[data-theme="dark"] .verification-banner__text {
  color: #F5C878;
}

html[data-theme="dark"] .social-feed-page--account .social-rail__divider {
  background: var(--theme-divider);
}

html[data-theme="dark"] .social-feed-page[data-social-page-mode='thread'] .social-comments {
  border-top-color: var(--theme-divider);
}

html[data-theme="dark"] .social-feed-page--account .social-rail__wallet.is-active .header-wallet-pill {
  background: var(--theme-soft-blue);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .my_settings_wrapper,
html[data-theme="dark"] .profile-push-settings__item {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-push-settings__item {
  border: 1px solid var(--theme-border);
}

html[data-theme="dark"] .my_settings__value,
html[data-theme="dark"] .my_settings__label,
html[data-theme="dark"] .my_settings__label-second,
html[data-theme="dark"] .profile-push-settings__title,
html[data-theme="dark"] .profile-avatar-form__file,
html[data-theme="dark"] .phone-manager__prefix,
html[data-theme="dark"] .phone-manager__item strong {
  color: var(--theme-text);
}

html[data-theme="dark"] .my_settings__label-count,
html[data-theme="dark"] .my_settings__input-comment,
html[data-theme="dark"] .profile-push-settings__intro,
html[data-theme="dark"] .profile-push-settings__description,
html[data-theme="dark"] .phone-manager__alert,
html[data-theme="dark"] .phone-manager__status {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .my_settings__input,
html[data-theme="dark"] .phone-manager__input-group,
html[data-theme="dark"] .phone-manager__input {
  background: var(--theme-control);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .phone-manager {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .phone-manager__input-group .phone-manager__input {
  border-left-color: var(--theme-border);
}

html[data-theme="dark"] .phone-manager__input::placeholder {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .phone-manager__item,
html[data-theme="dark"] .profile-avatar-card__preview {
  background: var(--theme-surface-high);
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .phone-manager__add-more {
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .phone-manager__add-more:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .profile-email-card--pending {
  background: #32291B;
  border-color: rgba(245, 160, 0, 0.34);
}

html[data-theme="dark"] .profile-push-settings__track {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .profile-push-settings__track::after {
  background: #E3E6EC;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .profile-push-settings__switch input:checked + .profile-push-settings__track {
  background: rgba(55, 118, 229, 0.45);
}

html[data-theme="dark"] .profile-push-settings__switch input:checked + .profile-push-settings__track::after {
  background: #F5F6F8;
}

html[data-theme="dark"] .author-public-section--settings .phone-manager__btn--danger {
  background: #3A2327;
  border-color: transparent;
  color: #FFB4B4;
}

html[data-theme="dark"] .author-public-section--settings .phone-manager__btn--danger:hover:not(:disabled),
html[data-theme="dark"] .author-public-section--settings .phone-manager__btn--danger:focus-visible {
  background: #472A2F;
  color: #FFB4B4;
  opacity: 1;
}

html[data-theme="dark"] .header-wallet-pill,
html[data-theme="dark"] .profile-balance-pill {
  background: var(--theme-soft-blue);
  border-color: var(--theme-border);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .header-wallet-pill:hover,
html[data-theme="dark"] .profile-balance-pill:hover {
  background: var(--theme-control-hover);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .header-wallet-pill__value,
html[data-theme="dark"] .profile-balance-pill__value,
html[data-theme="dark"] .profile-balance-grid__card h3,
html[data-theme="dark"] .profile-balance-card__section h4,
html[data-theme="dark"] .profile-promo-card__label,
html[data-theme="dark"] .profile-referral-stats strong {
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-balance__subtitle,
html[data-theme="dark"] .profile-balance-grid__card p,
html[data-theme="dark"] .profile-balance-grid__note,
html[data-theme="dark"] .profile-balance-form__label,
html[data-theme="dark"] .profile-balance-form__hint,
html[data-theme="dark"] .profile-promo-card__hint,
html[data-theme="dark"] .profile-balance-quick-amounts__label,
html[data-theme="dark"] .profile-referral-stats,
html[data-theme="dark"] .profile-balance-history__table th,
html[data-theme="dark"] .profile-balance-history__empty,
html[data-theme="dark"] .profile-balance-history__table td::before {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .profile-balance-grid__card,
html[data-theme="dark"] .profile-balance-history,
html[data-theme="dark"] .profile-balance-methods__item {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .profile-balance-grid__card--muted,
html[data-theme="dark"] .profile-balance-grid__card--referral {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .profile-balance-card__section,
html[data-theme="dark"] .profile-balance-history__table th,
html[data-theme="dark"] .profile-balance-history__table td {
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .profile-balance-history__table td,
html[data-theme="dark"] .profile-balance-methods__item,
html[data-theme="dark"] .profile-balance-methods__item strong,
html[data-theme="dark"] .profile-referral-link-row .default-input {
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-balance-quick-amounts__button {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-balance-quick-amounts__button:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .profile-balance-quick-amounts__button.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

html[data-theme="dark"] .profile-alert,
html[data-theme="dark"] .profile-alert--info {
  background: var(--theme-soft-blue);
  border-color: rgba(147, 197, 253, 0.24);
  color: var(--theme-text);
}

@media (max-width: 767px) {
  html[data-theme="dark"] .profile-balance-history__table tr {
    background: var(--theme-surface-high);
    border-color: var(--theme-border);
  }
}

html[data-theme="dark"] .ad-social-post-picker__counter,
html[data-theme="dark"] .ad-social-post-picker__thumb,
html[data-theme="dark"] .ad-social-post-picker__remove,
html[data-theme="dark"] .ad-social-post-picker__close {
  background: var(--theme-surface-high);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .ad-social-post-picker__empty,
html[data-theme="dark"] .ad-social-post-picker__selected-card,
html[data-theme="dark"] .ad-social-post-picker__open,
html[data-theme="dark"] .ad-social-post-picker__more,
html[data-theme="dark"] .ad-social-post-picker__dialog,
html[data-theme="dark"] .ad-social-post-picker__option,
html[data-theme="dark"] .ad-social-post-picker__dialog-footer {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .ad-social-post-picker__empty {
  background: var(--theme-surface-high);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .ad-social-post-picker__option:hover,
html[data-theme="dark"] .ad-social-post-picker__open:hover,
html[data-theme="dark"] .ad-social-post-picker__more:hover,
html[data-theme="dark"] .ad-social-post-picker__remove:hover,
html[data-theme="dark"] .ad-social-post-picker__close:hover {
  background: var(--theme-control-hover);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .ad-social-post-picker__option.is-selected {
  background: var(--theme-soft-blue);
  border-color: var(--color-primary);
}

html[data-theme="dark"] .ad-social-post-picker__backdrop {
  background: var(--theme-overlay);
}

/* =========================================================
 * Stage 11: Home and app-install surfaces
 * ======================================================= */
html[data-theme="dark"] .home-fuel-teaser--directory-card,
html[data-theme="dark"] .home-fuel-teaser--directory-card:hover,
html[data-theme="dark"] .news__wrapper--social {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .home-fuel-teaser--directory-card .home-fuel-teaser__title,
html[data-theme="dark"] .news-social__author,
html[data-theme="dark"] .news-social__text {
  color: var(--theme-text);
}

html[data-theme="dark"] .home-fuel-teaser--directory-card .home-fuel-teaser__meta,
html[data-theme="dark"] .news-social__date,
html[data-theme="dark"] .social-author-preview__loading {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .home-fuel-teaser--directory-card .home-fuel-teaser__arrow,
html[data-theme="dark"] .news-social__avatar {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .mobile-install-banner {
  background: var(--theme-surface);
  color: var(--theme-text);
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .mobile-install-banner__logo-wrap {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .mobile-install-banner__title,
html[data-theme="dark"] .mobile-install-banner__text,
html[data-theme="dark"] .mobile-install-banner__close {
  color: var(--theme-text);
}

html[data-theme="dark"] .mobile-install-banner__close:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .install-links-page,
html[data-theme="dark"] .install-links-page__shell,
html[data-theme="dark"] .install-benefits {
  background: var(--theme-page);
  color: var(--theme-text);
}

html[data-theme="dark"] .install-links-page__shell {
  background: var(--theme-page);
}

html[data-theme="dark"] .install-links-page__title,
html[data-theme="dark"] .install-benefits__item h2 {
  color: var(--theme-text);
}

html[data-theme="dark"] .install-benefits__item {
  background: var(--theme-surface-high);
  border: 0;
}

html[data-theme="dark"] .install-benefits__item p {
  color: var(--theme-text-muted);
}

/* =========================================================
 * Stage 12: Fuel prices and utility data panels
 * ======================================================= */
html[data-theme="dark"] .pmr-fuel-page {
  color: var(--theme-text);
}

html[data-theme="dark"] .pmr-fuel-subscription,
html[data-theme="dark"] .pmr-fuel-meta,
html[data-theme="dark"] .pmr-fuel-table-wrapper {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .pmr-fuel-subscription {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .pmr-fuel-subscription__title,
html[data-theme="dark"] .pmr-fuel-sidebar__title,
html[data-theme="dark"] .pmr-fuel-section-title,
html[data-theme="dark"] .pmr-fuel-meta__value {
  color: var(--theme-text);
}

html[data-theme="dark"] .pmr-fuel-subscription__desc,
html[data-theme="dark"] .pmr-fuel-section-desc,
html[data-theme="dark"] .pmr-fuel-sidebar__desc,
html[data-theme="dark"] .pmr-fuel-meta__label {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .pmr-fuel-table tbody td {
  background: var(--theme-surface-high);
  color: var(--theme-text);
  border-bottom-color: var(--theme-divider);
}

html[data-theme="dark"] .pmr-fuel-sidebar__link {
  background: var(--theme-soft-blue);
  border-color: var(--theme-border);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .pmr-fuel-sidebar__link:hover {
  background: var(--theme-control-hover);
  border-color: var(--theme-border);
  color: var(--color-primary-muted);
}

/* =========================================================
 * Stage 13: Car-wash timing utility
 * ======================================================= */
html[data-theme="dark"] .car-wash-page {
  --cw-bg-top: #162637;
  --cw-bg-mid: #101a24;
  --cw-bg-bottom: var(--theme-page);
  background: linear-gradient(180deg, rgba(11, 16, 21, 0.18) 0%, rgba(11, 16, 21, 0.72) 34%, var(--theme-page) 100%);
  color: var(--theme-text);
}

html[data-theme="dark"] .car-wash-page::before {
  background: var(--theme-page);
}

html[data-theme="dark"] .car-wash-page .title,
html[data-theme="dark"] .car-wash-page .breadcrumbs__link,
html[data-theme="dark"] .car-wash-page .breadcrumbs__link--active,
html[data-theme="dark"] .car-wash-page .desc {
  color: var(--theme-text);
  text-shadow: none;
}

html[data-theme="dark"] .car-wash-page .breadcrumbs__item::before {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .car-wash-city-picker {
  background: var(--theme-surface);
  box-shadow: none;
}

html[data-theme="dark"] .car-wash-city-picker__label {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .car-wash-city-picker__select {
  color: var(--theme-text);
}

html[data-theme="dark"] .car-wash-city-picker__select option,
html[data-theme="dark"] .car-wash-city-picker__select optgroup {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .car-wash-summary__item,
html[data-theme="dark"] .car-wash-score-panel,
html[data-theme="dark"] .car-wash-sidebar-note,
html[data-theme="dark"] .car-wash-compact-day,
html[data-theme="dark"] .car-wash-sidebar-note__meta-item,
html[data-theme="dark"] .car-wash-today-card__metric-card,
html[data-theme="dark"] .car-wash-today-card__reason-box,
html[data-theme="dark"] .car-wash-reason-inline {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .car-wash-sidebar-note__meta-item,
html[data-theme="dark"] .car-wash-today-card__metric-card,
html[data-theme="dark"] .car-wash-today-card__reason-box,
html[data-theme="dark"] .car-wash-reason-inline {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .car-wash-best-window-card {
  background: linear-gradient(180deg, var(--theme-surface-high) 0%, var(--theme-surface) 100%);
  border-color: var(--theme-border);
  box-shadow: none;
}

html[data-theme="dark"] .car-wash-summary__value,
html[data-theme="dark"] .car-wash-score-panel__status,
html[data-theme="dark"] .car-wash-score-panel__value,
html[data-theme="dark"] .car-wash-sidebar-note__title,
html[data-theme="dark"] .car-wash-sidebar-note__meta-value,
html[data-theme="dark"] .car-wash-best-window-card__value,
html[data-theme="dark"] .car-wash-best-window-card__date,
html[data-theme="dark"] .car-wash-best-window-card__fact strong,
html[data-theme="dark"] .car-wash-today-card__details summary,
html[data-theme="dark"] .car-wash-factor-card__value,
html[data-theme="dark"] .car-wash-day-card__date,
html[data-theme="dark"] .car-wash-day-card__metric-value {
  color: var(--theme-text);
}

html[data-theme="dark"] .car-wash-summary__label,
html[data-theme="dark"] .car-wash-summary__text,
html[data-theme="dark"] .car-wash-score-panel__caption,
html[data-theme="dark"] .car-wash-sidebar-note__meta-label,
html[data-theme="dark"] .car-wash-today-card__caption,
html[data-theme="dark"] .car-wash-best-window-card__label,
html[data-theme="dark"] .car-wash-best-window-card__meta,
html[data-theme="dark"] .car-wash-best-window-card__weather,
html[data-theme="dark"] .car-wash-best-window-card__summary,
html[data-theme="dark"] .car-wash-best-window-card__fact,
html[data-theme="dark"] .car-wash-today-card__reason-box-title,
html[data-theme="dark"] .car-wash-day-card__meta,
html[data-theme="dark"] .car-wash-compact-day__subline,
html[data-theme="dark"] .car-wash-day-card__metric-label {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .car-wash-best-window-card__facts,
html[data-theme="dark"] .car-wash-today-card__details {
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .car-wash-metric-help {
  background: var(--theme-soft-blue);
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .car-wash-metric-help:hover,
html[data-theme="dark"] .car-wash-metric-help:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
}

/* Shared content panels still used by utility/contact pages. */
html[data-theme="dark"] .contacts-section,
html[data-theme="dark"] .content-panel,
html[data-theme="dark"] .help-card {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .help-card .title-3,
html[data-theme="dark"] .content-panel .title,
html[data-theme="dark"] .contacts-section .title,
html[data-theme="dark"] .contacts-section .title-2 {
  color: var(--theme-text);
}

html[data-theme="dark"] .content-panel .desc {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .site-footer-v2__main {
  background: var(--footer-v2-surface);
}

html[data-theme="dark"] .social-feed-page__shell,
html[data-theme="dark"] .news__wrapper {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-feed-page__shell.social-feed-page__shell--plain,
html[data-theme="dark"] .social-feed-page__shell.social-feed-page__shell--empty {
  background: transparent;
}

html[data-theme="dark"] .news_title {
  color: var(--theme-text);
}

html[data-theme="dark"] .news-item__date {
  color: var(--theme-text-muted);
}

/* =========================================================
 * Stage 14: Shared legacy typography, breadcrumbs and header menus
 * ======================================================= */
html[data-theme="dark"] .title,
html[data-theme="dark"] .title-2,
html[data-theme="dark"] .brand__link,
html[data-theme="dark"] .header-dropdown-profile-card__name {
  color: var(--theme-text);
}

html[data-theme="dark"] .desc,
html[data-theme="dark"] .brand__des,
html[data-theme="dark"] .breadcrumbs__link,
html[data-theme="dark"] .breadcrumbs__link--active,
html[data-theme="dark"] .footer-content__text {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .breadcrumbs__item + li::before {
  background-color: var(--theme-text-muted);
}

html[data-theme="dark"] .breadcrumbs__link:hover,
html[data-theme="dark"] .breadcrumbs__link:focus-visible,
html[data-theme="dark"] .car-wash-page .breadcrumbs__link:hover,
html[data-theme="dark"] .car-wash-page .breadcrumbs__link:focus-visible {
  color: var(--theme-text-muted);
  opacity: 0.7;
}

html[data-theme="dark"] .header-dropdown-profile-card::after,
html[data-theme="dark"] .header__dropdown-item--wallet::before,
html[data-theme="dark"] .header__dropdown-item:last-child::before {
  background: var(--theme-divider);
}

html[data-theme="dark"] .header-dropdown-profile-card__avatar {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .header-dropdown-link:not(.header-dropdown-link--support):not(.header-dropdown-link--admin):not(.header-dropdown-link--wallet):hover,
html[data-theme="dark"] .header-dropdown-link--logout:hover,
html[data-theme="dark"] .header-dropdown-link--logout:focus-visible,
html[data-theme="dark"] button.header-dropdown-link.header-dropdown-link--logout:hover,
html[data-theme="dark"] button.header-dropdown-link.header-dropdown-link--logout:focus-visible {
  background: var(--theme-control-hover) !important;
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .header__userwrapper:hover .header__autirization-name,
html[data-theme="dark"] .header__userwrapper.is-open .header__autirization-name,
html[data-theme="dark"] .header__userwrapper:hover .header__autirization-name svg path,
html[data-theme="dark"] .header__userwrapper.is-open .header__autirization-name svg path {
  color: var(--theme-text);
  stroke: currentColor;
}

html[data-theme="dark"] .footer__bottom {
  background: #111820;
}

/* =========================================================
 * Stage 15: Help, contacts and informational pages
 * ======================================================= */
html[data-theme="dark"] .help-section,
html[data-theme="dark"] .help-card,
html[data-theme="dark"] .contacts-section,
html[data-theme="dark"] .contacts-card,
html[data-theme="dark"] .content-panel {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
  box-shadow: none;
}

html[data-theme="dark"] .help-section .title-2,
html[data-theme="dark"] .help-card .title-3,
html[data-theme="dark"] .contacts-section .title-2,
html[data-theme="dark"] .contacts-card .title-3,
html[data-theme="dark"] .help-accordion__trigger,
html[data-theme="dark"] .help-accordion__content,
html[data-theme="dark"] .help-info-list__item,
html[data-theme="dark"] .help-info-list__item strong,
html[data-theme="dark"] .contacts-list__item,
html[data-theme="dark"] .contacts-list__item strong {
  color: var(--theme-text);
}

html[data-theme="dark"] .content-panel .desc,
html[data-theme="dark"] .contacts-list__meta {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .help-accordion__item {
  background: var(--theme-surface);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .help-accordion__trigger:hover,
html[data-theme="dark"] .help-accordion__trigger:focus-visible,
html[data-theme="dark"] .help-accordion__item.is-open .help-accordion__trigger,
html[data-theme="dark"] .help-info-list__item,
html[data-theme="dark"] .contacts-list__item {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .line {
  background: var(--theme-divider);
}

html[data-theme="dark"] .centered-text-p {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .alert-danger {
  --bs-alert-color: #FFB4B4;
  --bs-alert-bg: #3A2327;
  --bs-alert-border-color: rgba(255, 180, 180, 0.24);
}

html[data-theme="dark"] .alert-success {
  --bs-alert-color: #A7F3D0;
  --bs-alert-bg: #163428;
  --bs-alert-border-color: rgba(52, 211, 153, 0.24);
}

/* =========================================================
 * Stage 16: Public author profile
 * ======================================================= */
html[data-theme="dark"] .author-profile-hero,
html[data-theme="dark"] .author-profile-hero__share-menu,
html[data-theme="dark"] .profile-share-modal__option {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .author-profile-hero__name,
html[data-theme="dark"] .author-profile-hero__handle,
html[data-theme="dark"] .author-profile-hero__description,
html[data-theme="dark"] .author-profile-hero .author-public-card__social-stats,
html[data-theme="dark"] .author-profile-hero .author-public-card__social-stat-value,
html[data-theme="dark"] .author-profile-hero .author-public-card__social-stat-label,
html[data-theme="dark"] .author-profile-hero .ad-share-menu__item,
html[data-theme="dark"] .profile-share-modal__option-title {
  color: var(--theme-text);
}

html[data-theme="dark"] .author-profile-hero__meta,
html[data-theme="dark"] .author-profile-tabs .profile-content__count,
html[data-theme="dark"] .profile-share-modal__option-text,
html[data-theme="dark"] .profile-share-modal__url {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .author-profile-hero .ad-share-menu__item:hover,
html[data-theme="dark"] .author-profile-hero .ad-share-menu__item:focus-visible,
html[data-theme="dark"] .profile-share-modal__option:hover,
html[data-theme="dark"] .profile-share-modal__option:focus-visible {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .profile-share-modal__qr {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .author-profile-blocked-notice {
  background: #3A2327;
  color: #FFB4B4;
}

html[data-theme="dark"] .profile-organizations-infinite__spinner {
  border-color: var(--theme-border);
  border-top-color: var(--color-primary);
}

/* =========================================================
 * Stage 17: Advertising cabinet and managed placements
 * ======================================================= */
html[data-theme="dark"] .advert-cabinet__section,
html[data-theme="dark"] .advert-card {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
  box-shadow: none;
}

html[data-theme="dark"] .advert-cabinet__section-title,
html[data-theme="dark"] .advert-card__title,
html[data-theme="dark"] .advert-manage-stats__row strong {
  color: var(--theme-text);
}

html[data-theme="dark"] .advert-cabinet__section-text,
html[data-theme="dark"] .advert-card__text,
html[data-theme="dark"] .advert-card__meta,
html[data-theme="dark"] .advert-manage-stats__row,
html[data-theme="dark"] .advert-manage-stats__row--head {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .advert-card__image,
html[data-theme="dark"] .advert-card__image--logo,
html[data-theme="dark"] .advert-empty {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .advert-empty {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .advert-cabinet__button--secondary {
  background: var(--theme-soft-blue);
  color: var(--theme-secondary-button-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .advert-card__social,
html[data-theme="dark"] .advert-card__type,
html[data-theme="dark"] .advert-card__tag {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .advert-cabinet__button--secondary:hover {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .advert-card__social:hover,
html[data-theme="dark"] .advert-card__controls .karetad__mobile-manage-trigger:not(:disabled):hover {
  background: var(--theme-control-hover);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .advert-cabinet__button--disabled,
html[data-theme="dark"] .advert-cabinet__button--disabled:hover {
  background: var(--theme-control-disabled);
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .advert-card__type--organization,
html[data-theme="dark"] .advert-card__status.advert-card__status--active,
html[data-theme="dark"] .advert-card__status.advert-card__status--published {
  background: rgba(52, 211, 153, 0.14);
  color: #6EE7B7;
}

html[data-theme="dark"] .advert-card__status,
html[data-theme="dark"] .advert-card__status--pending {
  background: rgba(245, 160, 0, 0.14);
  color: #F5C878;
}

html[data-theme="dark"] .advert-card__status--paused {
  background: var(--theme-surface-high);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .advert-card__status.advert-card__status--expired,
html[data-theme="dark"] .profile-karetad-panel__status-badge.profile-karetad-panel__status-badge--expired {
  background: rgba(239, 68, 68, 0.14);
  color: #F87171;
}

html[data-theme="dark"] .advert-manage-stats__row {
  border-bottom-color: var(--theme-divider);
}

/* =========================================================
 * Stage 18: Journal and news cards
 * ======================================================= */
html[data-theme="dark"] .news__wrapper,
html[data-theme="dark"] .single-journal__wrapper {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .news_title,
html[data-theme="dark"] .news_title a,
html[data-theme="dark"] .archive-news__title,
html[data-theme="dark"] .single-journal__title,
html[data-theme="dark"] .single-journal__wrapper p,
html[data-theme="dark"] .single-journal__wrapper li {
  color: var(--theme-text);
}

html[data-theme="dark"] .news_description,
html[data-theme="dark"] .news-item__date,
html[data-theme="dark"] .single-journal__date {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .news__img__wrapper,
html[data-theme="dark"] .archive-news__news-img-wrapper {
  background: var(--theme-surface-high);
}

/* =========================================================
 * Stage 19: Shared form controls, Select2/TomSelect and ad editor
 * ======================================================= */
html[data-theme="dark"] .create-karetad-form__group,
html[data-theme="dark"] .default-form__button-group {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .create-karetad-form__group-title,
html[data-theme="dark"] .default-label-for-input,
html[data-theme="dark"] .default-label-for-checkbox,
html[data-theme="dark"] .default-checkbox,
html[data-theme="dark"] .profile-email-form__label {
  color: var(--theme-text);
}

html[data-theme="dark"] .counter,
html[data-theme="dark"] .profile-email-form__hint,
html[data-theme="dark"] .profile-password-strength,
html[data-theme="dark"] .select2-option-with-count__count {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .default-select,
html[data-theme="dark"] .default-form-group__select-wrapper .select2-selection--single,
html[data-theme="dark"] .default-select-input .select2-selection--single,
html[data-theme="dark"] .default-select:not(.header-search-form-dropdown__select2) + .select2-container .select2-selection--single,
html[data-theme="dark"] .default-form-group__price-currency,
html[data-theme="dark"] .default-form-group__price-index,
html[data-theme="dark"] .default-form-group__price-index-left,
html[data-theme="dark"] .profile-email-form__input {
  background-color: var(--theme-control) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}

html[data-theme="dark"] .default-form-group__select-wrapper .select2-selection__rendered,
html[data-theme="dark"] .default-select-input .select2-selection__rendered,
html[data-theme="dark"] .default-select:not(.header-search-form-dropdown__select2) + .select2-container .select2-selection__rendered {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .ts-wrapper.select2-container .ts-control,
html[data-theme="dark"] .default-form-group__select-wrapper .ts-wrapper.select2-container .ts-control,
html[data-theme="dark"] .default-select-input + .ts-wrapper.select2-container .ts-control,
html[data-theme="dark"] .default-select:not(.header-search-form-dropdown__select2) + .ts-wrapper.select2-container .ts-control {
  background: var(--theme-control) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}

html[data-theme="dark"] .ts-wrapper.select2-container .ts-control > .item,
html[data-theme="dark"] .ts-wrapper.select2-container .ts-control > .items-placeholder,
html[data-theme="dark"] .ts-wrapper.select2-container .ts-control > input,
html[data-theme="dark"] .header-search-form__dropdown .ts-wrapper.select2-container .ts-control > .item,
html[data-theme="dark"] .header-search-form__dropdown .ts-wrapper.select2-container .ts-control > .items-placeholder,
html[data-theme="dark"] .header-search-form__dropdown .ts-wrapper.select2-container .ts-control > input {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .ts-wrapper.select2-container .ts-dropdown,
html[data-theme="dark"] .select2-dropdown {
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  box-shadow: var(--theme-shadow) !important;
}

html[data-theme="dark"] .ts-wrapper.select2-container .ts-dropdown .option,
html[data-theme="dark"] .ts-wrapper.select2-container .ts-dropdown .optgroup-header,
html[data-theme="dark"] .select2-results__option {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .ts-wrapper.select2-container .ts-dropdown .option.active,
html[data-theme="dark"] .ts-wrapper.select2-container .ts-dropdown .option.selected {
  background: var(--theme-surface-high) !important;
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .field-file__label,
html[data-theme="dark"] .filepond--drop-label {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .filepond--panel-root {
  background-color: var(--theme-surface-high) !important;
}

/* Comment uploads already sit on an elevated composer surface. Avoid drawing
 * a second full-width FilePond slab behind one thumbnail. */
html[data-theme="dark"] .social-comment-form .filepond--panel-root {
  background-color: transparent !important;
}

/* Post composer: keep the picker and uploaded thumbnails as separate surfaces,
 * matching the lighter visual hierarchy instead of one full-width dark slab. */
html[data-theme="dark"] .social-compose-form .filepond--panel-root {
  background-color: transparent !important;
}

html[data-theme="dark"] .social-compose-form .filepond--drop-label {
  box-sizing: border-box;
  min-height: 7.2rem;
  border: 1px dashed color-mix(in srgb, var(--theme-border) 88%, transparent);
  border-radius: 1.6rem;
  background: color-mix(in srgb, var(--theme-surface-high) 84%, var(--theme-surface));
  color: var(--theme-text-muted);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

html[data-theme="dark"] .social-compose-form .filepond--drop-label:hover {
  border-color: #64748B;
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .social-compose-form .filepond--label-action {
  color: #60A5FA;
  text-decoration-color: rgba(96, 165, 250, 0.45);
}

html[data-theme="dark"] .social-compose-form .filepond--list-scroller {
  background: transparent;
}

html[data-theme="dark"] .social-compose-form .filepond--item-panel,
html[data-theme="dark"] .social-compose-form .filepond--image-preview-wrapper {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .social-compose-form .filepond--file-action-button {
  background: rgba(11, 16, 21, 0.78);
  color: #F3F4F6;
}

html[data-theme="dark"] .social-comment-form .filepond--item {
  width: 13.6rem !important;
  height: 17rem !important;
}

html[data-theme="dark"] .social-comment-form__reply-state {
  background: var(--theme-surface-high);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-comment-form__reply-label strong {
  color: var(--color-primary);
}

html[data-theme="dark"] .social-comment-form__reply-cancel {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-comment-form__reply-cancel:hover,
html[data-theme="dark"] .social-comment-form__reply-cancel:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-comment__gallery.social-card__gallery--single,
html[data-theme="dark"] .social-comment__gallery.social-card__gallery--single.is-portrait,
html[data-theme="dark"] .social-comment__gallery.social-card__gallery--single.is-narrow-source {
  width: min(22rem, 100%);
  max-width: 22rem;
}

html[data-theme="dark"] .social-comment__gallery.social-card__gallery--single .social-card__gallery-item,
html[data-theme="dark"] .social-comment__gallery.social-card__gallery--single.is-portrait .social-card__gallery-item,
html[data-theme="dark"] .social-comment__gallery.social-card__gallery--single.is-narrow-source .social-card__gallery-item {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-height: none;
  aspect-ratio: 4 / 5;
}

html[data-theme="dark"] label.error {
  color: #FFB4B4;
}

/* =========================================================
 * Stage 20: Catalog filter drawer and result controls
 * ======================================================= */
html[data-theme="dark"] .catalog-results-summary,
html[data-theme="dark"] .catalog-filter-overlay__header {
  color: var(--theme-text);
}

html[data-theme="dark"] .catalog-results-summary__count,
html[data-theme="dark"] .catalog-filter-overlay__close {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .catalog-filter-overlay__panel,
html[data-theme="dark"] .catalog-filter-overlay__footer {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .catalog-filter-overlay__header,
html[data-theme="dark"] .catalog-filter-overlay__footer {
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .catalog-filter-overlay__backdrop {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .catalog-filter-overlay__close:hover {
  color: var(--theme-text);
}

html[data-theme="dark"] .view-toggle button svg rect:first-child {
  fill: var(--theme-surface) !important;
  stroke: var(--theme-border) !important;
}

html[data-theme="dark"] .view-toggle button svg rect + rect {
  fill: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .view-toggle button.active svg rect + rect,
html[data-theme="dark"] .view-toggle button:hover svg rect + rect {
  fill: var(--theme-text) !important;
}

/* =========================================================
 * Stage 21: Header notifications overlay
 * ======================================================= */
html[data-theme="dark"] .notifications-overlay__panel {
  background: var(--theme-page);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .notifications-overlay__backdrop {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .notifications-overlay__header,
html[data-theme="dark"] .notifications-overlay__list,
html[data-theme="dark"] .notifications-overlay__item {
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .notifications-overlay__title-text,
html[data-theme="dark"] .notifications-overlay__group-title,
html[data-theme="dark"] .notifications-overlay__item-title,
html[data-theme="dark"] .notifications-overlay__detail-title,
html[data-theme="dark"] .notifications-overlay__detail-body,
html[data-theme="dark"] .notifications-overlay__detail-social-names,
html[data-theme="dark"] .notifications-overlay__loader {
  color: var(--theme-text);
}

html[data-theme="dark"] .notifications-overlay__title-count,
html[data-theme="dark"] .notifications-overlay__item-meta,
html[data-theme="dark"] .notifications-overlay__detail-empty,
html[data-theme="dark"] .notifications-overlay__detail-meta,
html[data-theme="dark"] .notifications-overlay__detail-social-caption,
html[data-theme="dark"] .notifications-overlay__empty,
html[data-theme="dark"] .notifications-overlay__load-more {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .notifications-overlay__group-title {
  background: transparent;
}

html[data-theme="dark"] .notifications-overlay__item.is-unread {
  background: var(--theme-soft-blue);
}

html[data-theme="dark"] .notifications-overlay__item:hover:not(.is-active) {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .notifications-overlay__item.is-unread:hover:not(.is-active) {
  background: color-mix(in srgb, var(--theme-soft-blue) 88%, var(--theme-text) 12%);
}

html[data-theme="dark"] .notifications-overlay__item.is-active,
html[data-theme="dark"] .notifications-overlay__detail-mark {
  background: var(--theme-soft-blue);
  border-color: var(--theme-border);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .notifications-overlay__detail-social-entity {
  background: #3472E0;
  border-color: transparent;
  color: #FFFFFF !important;
}

html[data-theme="dark"] .notifications-overlay__detail-social-entity:hover {
  background: #2F69CF;
  color: #FFFFFF !important;
}

html[data-theme="dark"] .notifications-overlay__detail-social-entity.is-compact {
  background: transparent;
  border-color: var(--theme-divider);
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .notifications-overlay__detail-social-entity.is-compact:hover {
  background: var(--theme-control-hover);
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .notifications-overlay__detail-mark:hover:not(:disabled),
html[data-theme="dark"] .notifications-overlay__detail-back:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .notifications-overlay__mark-all:hover:not(:disabled) {
  background: #2F69CF;
}

html[data-theme="dark"] .notifications-overlay__close:hover {
  color: var(--theme-text);
}

html[data-theme="dark"] .notifications-overlay__item-dot {
  box-shadow: 0 0 0 0.15rem var(--theme-surface);
}

html[data-theme="dark"] .notifications-overlay__detail-social-avatar-link {
  border-color: var(--theme-surface-high);
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .notifications-overlay__detail-social-avatar {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .notifications-noscript-alert {
  background: #32291B;
  border-color: rgba(245, 160, 0, 0.35);
  color: #F5C878;
}

/* =========================================================
 * Stage 22: Profile selectors and recommended ads cleanup
 * ======================================================= */
html[data-theme="dark"] .profile-tabs__select {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .recommended-karetads-swiper .karetad.karetad--premium,
html[data-theme="dark"] .recommended-karetads-swiper .karetad--premium,
html[data-theme="dark"] .archive-recommended-karetads-swiper .karetad.karetad--premium,
html[data-theme="dark"] .archive-recommended-karetads-swiper .karetad--premium,
html[data-theme="dark"] .archive-recommended-karetads {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .archive-recommended-karetads__title,
html[data-theme="dark"] .recommended-karetads-swiper .karetad .karetad__content__title,
html[data-theme="dark"] .archive-recommended-karetads-swiper .karetad .karetad__content__title {
  color: var(--theme-text);
}

html[data-theme="dark"] .recommended-karetads__info-trigger {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .similar-karetads-slider .similar-karetads-slide .favoriteButton {
  background: rgba(255, 255, 255, 0.96);
  border-color: transparent;
  color: #374054;
}

html[data-theme="dark"] .similar-karetads-slider .similar-karetads-slide .favoriteButton.favoriteButton--active,
html[data-theme="dark"] .similar-karetads-slider .similar-karetads-slide .favoriteButton.favoriteButton--active:hover,
html[data-theme="dark"] .similar-karetads-slider .similar-karetads-slide .favoriteButton.favoriteButton--active:focus-visible {
  color: #E55637;
}

html[data-theme="dark"] .recommended-karetads__info-trigger:hover {
  background: var(--theme-control-hover);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

/* =========================================================
 * Stage 23: Legacy profile shell and mobile brand expansion
 * ======================================================= */
html[data-theme="dark"] .my-lk__wrapper,
html[data-theme="dark"] .my-lk__menu-toggle,
html[data-theme="dark"] .profile-karetad-panel__manage-summary-meta,
html[data-theme="dark"] .brand-section__lists.brand-section__lists--mobile-expanded {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .my-lk__name-user,
html[data-theme="dark"] .my-lk__menu-toggle,
html[data-theme="dark"] .my-lk__menu-item.current .my-lk__menu-link,
html[data-theme="dark"] .profile-karetad-panel__manage-summary-name,
html[data-theme="dark"] .profile-karetad-panel__manage-summary-meta-label {
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-karetad-panel__manage-summary-stats {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .my-lk__image-wrapper {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .brand-section__lists.brand-section__lists--mobile-expanded .brand__list + .brand__list {
  border-top-color: var(--theme-divider);
}

/* =========================================================
 * Stage 24: Social tabs and secondary navigation
 * ======================================================= */
html[data-theme="dark"] .social-tabs {
  background: var(--theme-surface);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .social-tabs__item {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-tabs__item.is-active {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-tabs__item:not(.is-active):hover {
  background: var(--theme-control-hover);
  color: var(--theme-text);
}

/* =========================================================
 * Stage 25: Share menus and embedded map controls
 * ======================================================= */
html[data-theme="dark"] .title-section__share-menu {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .title-section__share-menu .ad-share-menu__item {
  color: var(--theme-text);
}

html[data-theme="dark"] .title-section__share-menu .ad-share-menu__item:hover {
  background: var(--theme-control-hover);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .maplibregl-ctrl-attrib,
html[data-theme="dark"] .maplibregl-ctrl-attrib.maplibregl-compact,
html[data-theme="dark"] .maplibregl-ctrl-attrib.maplibregl-compact.maplibregl-compact-show {
  background: color-mix(in srgb, var(--theme-surface) 94%, transparent) !important;
  color: var(--theme-text-muted) !important;
  border-color: var(--theme-border) !important;
}

html[data-theme="dark"] .maplibregl-ctrl-attrib a {
  color: var(--color-primary-muted) !important;
}

html[data-theme="dark"] .maplibregl-ctrl-group {
  background: var(--theme-surface-high) !important;
  box-shadow: 0 0 0 1px var(--theme-border) !important;
}

html[data-theme="dark"] .maplibregl-ctrl-group button {
  background-color: transparent !important;
  border-color: var(--theme-divider) !important;
}

html[data-theme="dark"] .maplibregl-ctrl-group button:hover,
html[data-theme="dark"] .maplibregl-ctrl-group button:focus-visible {
  background-color: var(--theme-control-hover) !important;
}

html[data-theme="dark"] .maplibregl-ctrl-group .maplibregl-ctrl-icon {
  filter: invert(0.86) saturate(0.3);
}

/* =========================================================
 * Stage 25b: Social secondary states and authenticated tools
 * ======================================================= */
html[data-theme="dark"] .social-stories__skeleton-ring,
html[data-theme="dark"] .social-stories__skeleton-line,
html[data-theme="dark"] .social-comments__skeleton-avatar,
html[data-theme="dark"] .social-comments__skeleton-line {
  background: var(--theme-skeleton-base);
}

html[data-theme="dark"] .social-recommended__avatar,
html[data-theme="dark"] .social-account-card__avatar,
html[data-theme="dark"] .social-reaction-preview-card__avatar,
html[data-theme="dark"] .social-compose-form__avatar,
html[data-theme="dark"] .social-compose-form__reply-avatar,
html[data-theme="dark"] .social-compose-form__location-map,
html[data-theme="dark"] .social-post-location__map,
html[data-theme="dark"] .social-post-location-modal__map {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .social-stories__skeleton-ring::after,
html[data-theme="dark"] .social-stories__skeleton-line::after {
  background: linear-gradient(90deg, transparent 0%, var(--theme-skeleton-highlight) 50%, transparent 100%);
}

html[data-theme="dark"] .social-comments__skeleton-avatar,
html[data-theme="dark"] .social-comments__skeleton-line {
  background: linear-gradient(90deg, var(--theme-skeleton-base) 0%, var(--theme-skeleton-highlight) 50%, var(--theme-skeleton-base) 100%);
  background-size: 200% 100%;
}

html[data-theme="dark"] .social-stories__nav {
  background: color-mix(in srgb, var(--theme-surface) 96%, transparent);
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .social-stories__nav:hover,
html[data-theme="dark"] .social-stories__nav:focus-visible,
html[data-theme="dark"] .social-story-tile:hover,
html[data-theme="dark"] .social-search-form__clear:hover,
html[data-theme="dark"] .social-reaction-preview-card__item:hover,
html[data-theme="dark"] .social-reaction-preview-card__item:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-story-tile__avatar {
  background: var(--theme-surface-high);
  border-color: var(--theme-surface);
}

html[data-theme="dark"] .social-story-tile__plus {
  border-color: var(--theme-surface);
}

html[data-theme="dark"] .social-story-tile__label,
html[data-theme="dark"] .social-thread-head__back,
html[data-theme="dark"] .social-search-empty__title,
html[data-theme="dark"] .social-reaction-preview-card__head strong,
html[data-theme="dark"] .social-reaction-preview-card__item,
html[data-theme="dark"] .social-compose-form__repost-card .social-card__text,
html[data-theme="dark"] .social-publish-modal__option-title,
html[data-theme="dark"] .social-statistics-page__title,
html[data-theme="dark"] .social-statistics-section__title,
html[data-theme="dark"] .social-statistics-summary-card__value,
html[data-theme="dark"] .social-statistics-metric__value,
html[data-theme="dark"] .social-statistics-metric__week-total strong,
html[data-theme="dark"] .social-mention-picker__item,
html[data-theme="dark"] .social-mention-picker__copy strong,
html[data-theme="dark"] .social-post-stats-modal__summary-value,
html[data-theme="dark"] .social-post-stats-modal__section-head h3,
html[data-theme="dark"] .social-post-stats-modal__metric-value,
html[data-theme="dark"] .social-video-field__meta strong,
html[data-theme="dark"] .social-compose-form__poll-title,
html[data-theme="dark"] .social-compose-form__poll-label span,
html[data-theme="dark"] .social-compose-form__location-title,
html[data-theme="dark"] .social-feed-composer__title,
html[data-theme="dark"] .social-text-counter [data-social-text-counter-current],
html[data-theme="dark"] .social-post-location__label,
html[data-theme="dark"] .social-post-location-modal__title,
html[data-theme="dark"] .social-post-report-modal__title,
html[data-theme="dark"] .social-post-report-modal__close {
  color: var(--theme-text);
}

html[data-theme="dark"] .social-stories__status,
html[data-theme="dark"] .social-reaction-preview__loading,
html[data-theme="dark"] .social-reaction-preview-card__head,
html[data-theme="dark"] .social-reaction-preview-card__empty,
html[data-theme="dark"] .social-reaction-preview-card__loading,
html[data-theme="dark"] .social-statistics-page__subtitle,
html[data-theme="dark"] .social-statistics-section__description,
html[data-theme="dark"] .social-statistics-summary-card__label,
html[data-theme="dark"] .social-statistics-summary-card__hint,
html[data-theme="dark"] .social-statistics-chart__value,
html[data-theme="dark"] .social-statistics-chart__label,
html[data-theme="dark"] .social-statistics-chart__comparison,
html[data-theme="dark"] .social-statistics-metric__label,
html[data-theme="dark"] .social-statistics-metric__period-label,
html[data-theme="dark"] .social-statistics-page__note,
html[data-theme="dark"] .social-mention-picker__copy span,
html[data-theme="dark"] .social-mention-picker__empty,
html[data-theme="dark"] .social-post-stats-modal__subtitle,
html[data-theme="dark"] .social-post-stats-modal__loading,
html[data-theme="dark"] .social-post-stats-modal__summary-label,
html[data-theme="dark"] .social-post-stats-modal__rate span,
html[data-theme="dark"] .social-post-stats-modal__section-head p,
html[data-theme="dark"] .social-post-stats-modal__metric-label,
html[data-theme="dark"] .social-video-field__meta p,
html[data-theme="dark"] .social-video-field__progress-label,
html[data-theme="dark"] .social-compose-form__poll-text,
html[data-theme="dark"] .social-compose-form__location-text,
html[data-theme="dark"] .social-feed-composer__subtitle,
html[data-theme="dark"] .social-text-counter,
html[data-theme="dark"] .social-post-location__meta {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-publish-modal__option,
html[data-theme="dark"] .social-compose-form__repost .social-card,
html[data-theme="dark"] .social-compose-form__repost .social-card--quoted,
html[data-theme="dark"] .social-statistics-page,
html[data-theme="dark"] .social-statistics-page__hero,
html[data-theme="dark"] .social-statistics-section,
html[data-theme="dark"] .social-mention-picker,
html[data-theme="dark"] .social-post-location-modal__panel,
html[data-theme="dark"] .social-post-report-modal__panel {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-publish-modal__option:hover,
html[data-theme="dark"] .social-publish-modal__option:focus-visible,
html[data-theme="dark"] .social-mention-picker__item:hover,
html[data-theme="dark"] .social-mention-picker__item:focus-visible,
html[data-theme="dark"] .social-mention-picker__item.is-active,
html[data-theme="dark"] .social-compose-modal__close:hover,
html[data-theme="dark"] .social-compose-modal__close:focus-visible,
html[data-theme="dark"] .social-post-report-modal__close:hover,
html[data-theme="dark"] .social-post-report-modal__close:focus-visible {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .social-statistics-summary-card,
html[data-theme="dark"] .social-statistics-chart,
html[data-theme="dark"] .social-statistics-metric,
html[data-theme="dark"] .social-statistics-metric__week-total,
html[data-theme="dark"] .social-post-stats-modal__metric,
html[data-theme="dark"] .social-post-stats-modal__summary-icon,
html[data-theme="dark"] .social-video-field__panel,
html[data-theme="dark"] .social-compose-form__poll-panel,
html[data-theme="dark"] .social-compose-form__location-summary,
html[data-theme="dark"] .social-compose-form__location-picker,
html[data-theme="dark"] .social-post-location {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .social-statistics-page__hero,
html[data-theme="dark"] .social-statistics-section,
html[data-theme="dark"] .social-compose-form__repost,
html[data-theme="dark"] .social-compose-form__footer,
html[data-theme="dark"] .social-post-location-modal__head,
html[data-theme="dark"] .social-post-report-modal__head {
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .social-statistics-page__note {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .social-compose-form__poll-input,
html[data-theme="dark"] .social-comment-form textarea,
html[data-theme="dark"] .social-share-form textarea {
  background: var(--theme-input);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-video-field__progress-bar {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .social-compose-form__submit:disabled:not(.is-loading),
html[data-theme="dark"] .social-compose-form__submit:not(.is-ready):not(.is-loading) {
  background: var(--theme-control-disabled);
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-post-location-modal__close {
  background: var(--theme-surface-high);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-post-location-modal__close:hover {
  background: var(--theme-control-hover);
}

/* =========================================================
 * Stage 26: Story owner activity
 * ======================================================= */
html[data-theme="dark"] .social-story-activity__stats,
html[data-theme="dark"] .social-story-activity__body {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-story-activity__stat {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-story-activity__stat strong,
html[data-theme="dark"] .social-story-activity__item,
html[data-theme="dark"] .social-story-activity__name {
  color: var(--theme-text);
}

html[data-theme="dark"] .social-story-activity__heading p,
html[data-theme="dark"] .social-story-activity__status,
html[data-theme="dark"] .social-story-activity__loader,
html[data-theme="dark"] .social-story-activity__username {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-story-activity__item {
  border-top-color: var(--theme-divider);
}

html[data-theme="dark"] .social-story-activity__item:hover {
  background: var(--theme-surface-high);
  color: var(--theme-text);
}

/* =========================================================
 * Stage 27: Social statistics
 * ======================================================= */
html[data-theme="dark"] body .social-statistics-metric {
  background: var(--theme-surface-high) !important;
  border-color: var(--theme-border) !important;
}

html[data-theme="dark"] body .social-statistics-metric__value {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] body .social-statistics-metric__period-label {
  color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] body .social-statistics-metric__today-primary .social-statistics-metric__period-label {
  color: var(--color-primary-muted) !important;
}

html[data-theme="dark"] body .social-statistics-metric__week-total {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

html[data-theme="dark"] body .social-statistics-metric__week-total strong {
  color: var(--theme-text) !important;
}

/* =========================================================
 * Stage 28: Account warning summary
 * ======================================================= */
html[data-theme="dark"] .account-warning-summary {
  background: #32291B;
  border-color: rgba(245, 160, 0, 0.28);
  color: #F5C878;
}

html[data-theme="dark"] .account-warning-summary__heading strong,
html[data-theme="dark"] .account-warning-summary__item-title strong,
html[data-theme="dark"] .account-warning-summary__item p {
  color: #F4D8AD;
}

html[data-theme="dark"] .account-warning-summary__heading span:not(.account-warning-summary__icon),
html[data-theme="dark"] .account-warning-summary__item-title span {
  color: #D8B986;
}

html[data-theme="dark"] .account-warning-summary__count,
html[data-theme="dark"] .account-warning-summary__item {
  background: rgba(21, 27, 34, 0.78);
  color: #F5C878;
}

/* =========================================================
 * Stage 29: Administration controls and tables
 * ======================================================= */
html[data-theme="dark"] .admin-seo-tabs,
html[data-theme="dark"] .admin-filters,
html[data-theme="dark"] .admin-order-button {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-seo-tabs__item {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .admin-seo-tabs__item:hover,
html[data-theme="dark"] .admin-order-button:hover {
  background: var(--theme-control-hover);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-seo-tabs__item.is-active,
html[data-theme="dark"] .admin-order-button:active,
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table__media {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-table__avatar,
html[data-theme="dark"] .admin-user-profile__avatar-img {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .admin-panel-card__meta,
html[data-theme="dark"] .admin-table__empty,
html[data-theme="dark"] .admin-user-karetads-panel__loader {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .footer-socials-admin__row,
html[data-theme="dark"] .social-recommended-admin__row,
html[data-theme="dark"] .directory-categories-admin__row {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .directory-categories-admin__row.is-dragging {
  background: var(--theme-soft-blue);
  border-color: rgba(147, 197, 253, 0.4);
}

html[data-theme="dark"] .directory-categories-admin__drag {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .directory-categories-admin__hint {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .schema-builder__checks label,
html[data-theme="dark"] .schema-builder .admin-dashboard__label {
  color: var(--theme-text);
}

html[data-theme="dark"] .schema-builder__drag-handle,
html[data-theme="dark"] .schema-builder__accordion {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .schema-builder__accordion-button {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .schema-builder__accordion-button.is-open {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .schema-builder__accordion-pane {
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .brand-order-panel {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .brand-order-list--columns {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .brand-order-list-title,
html[data-theme="dark"] .brand-order-card__name,
html[data-theme="dark"] .brand-order-file-path strong {
  color: var(--theme-text);
}

html[data-theme="dark"] .brand-order-panel__note,
html[data-theme="dark"] .brand-order-card__handle,
html[data-theme="dark"] .brand-order-card__meta,
html[data-theme="dark"] .brand-order-field__label,
html[data-theme="dark"] .brand-order-file-path {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .brand-order-list--columns .brand-order-card:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .brand-order-card.is-dragging {
  background: var(--theme-soft-blue);
}

html[data-theme="dark"] .brand-order-card__logo,
html[data-theme="dark"] .brand-order-preview {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

/* =========================================================
 * Stage 30: Shared empty and loading states
 * ======================================================= */
html[data-theme="dark"] .none-info__wrapper {
  background: var(--theme-surface);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .author-ads-results .karetads__preloader {
  background: rgba(11, 16, 21, 0.76);
}

/* =========================================================
 * Stage 31: Residual bright surfaces and media placeholders
 * ======================================================= */
html[data-theme="dark"] .site-footer-v2__locations {
  background: var(--footer-v2-strip);
}

html[data-theme="dark"] .home-fuel-teaser:not(.home-fuel-teaser--wash):not(.home-fuel-teaser--directory):not(.home-fuel-teaser--directory-card) {
  background: #4A3828;
  color: #FFFFFF;
}

html[data-theme="dark"] .home-fuel-teaser:not(.home-fuel-teaser--wash):not(.home-fuel-teaser--directory):not(.home-fuel-teaser--directory-card):hover {
  background: #4A3828;
  color: #FFFFFF;
}

html[data-theme="dark"] .home-fuel-teaser:not(.home-fuel-teaser--wash):not(.home-fuel-teaser--directory):not(.home-fuel-teaser--directory-card) .home-fuel-teaser__icon {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(231, 176, 125, 0.55);
}

html[data-theme="dark"] .home-fuel-teaser:not(.home-fuel-teaser--wash):not(.home-fuel-teaser--directory):not(.home-fuel-teaser--directory-card) .home-fuel-teaser__title {
  color: #FFFFFF;
}

html[data-theme="dark"] .home-fuel-teaser:not(.home-fuel-teaser--wash):not(.home-fuel-teaser--directory):not(.home-fuel-teaser--directory-card) .home-fuel-teaser__meta {
  color: rgba(255, 255, 255, 0.80);
}

html[data-theme="dark"] .home-fuel-teaser:not(.home-fuel-teaser--wash):not(.home-fuel-teaser--directory):not(.home-fuel-teaser--directory-card) .home-fuel-teaser__arrow {
  color: rgba(255, 255, 255, 0.80);
}

html[data-theme="dark"] .home-fuel-teaser--wash {
  background: #2C3950;
  color: #FFFFFF;
}

html[data-theme="dark"] .home-fuel-teaser--wash:hover {
  background: #2C3950;
  color: #FFFFFF;
}

html[data-theme="dark"] .home-fuel-teaser--wash .home-fuel-teaser__icon,
html[data-theme="dark"] .home-fuel-teaser--directory .home-fuel-teaser__icon,
html[data-theme="dark"] .home-fuel-teaser--directory-card .home-fuel-teaser__arrow,
html[data-theme="dark"] .home-fuel-teaser__eyebrow,
html[data-theme="dark"] .home-fuel-teaser__tag {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .home-fuel-teaser--wash .home-fuel-teaser__icon {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(137, 169, 214, 0.55);
}

html[data-theme="dark"] .home-fuel-teaser--wash .home-fuel-teaser__title {
  color: #FFFFFF;
}

html[data-theme="dark"] .home-fuel-teaser--wash .home-fuel-teaser__meta,
html[data-theme="dark"] .home-fuel-teaser--wash .home-fuel-teaser__arrow {
  color: rgba(255, 255, 255, 0.80);
}

html[data-theme="dark"] .home-fuel-teaser__eyebrow,
html[data-theme="dark"] .home-fuel-teaser__tag {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .home-fuel-teaser__map-preview,
html[data-theme="dark"] .home-fuel-teaser__map-surface {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .home-fuel-teaser__map-surface::after {
  background: linear-gradient(180deg, rgba(229, 231, 235, 0.03) 0%, rgba(229, 231, 235, 0) 24%, rgba(11, 16, 21, 0.16) 100%);
}

html[data-theme="dark"] .home-fuel-teaser__map-image,
html[data-theme="dark"] .social-directory-teaser__image {
  content: url("/images/map_for_dark_mode.webp");
  filter: none;
}

html[data-theme="dark"] .home-fuel-teaser__map-legend,
html[data-theme="dark"] .home-fuel-teaser__map-toolbar {
  background: rgba(21, 27, 34, 0.92);
  color: var(--theme-text);
}

html[data-theme="dark"] .home-fuel-teaser__map-legend-title,
html[data-theme="dark"] .home-fuel-teaser__map-card-title {
  color: var(--theme-text);
}

html[data-theme="dark"] .home-fuel-teaser__map-legend-text,
html[data-theme="dark"] .home-fuel-teaser__map-legend-description,
html[data-theme="dark"] .home-fuel-teaser__map-card-meta {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .home-fuel-teaser__map-footer {
  background: linear-gradient(0deg, rgba(21, 27, 34, 0.98) 0%, rgba(21, 27, 34, 0.92) 100%);
  color: var(--theme-text);
}

html[data-theme="dark"] .mySwiper2 .swiper-slide,
html[data-theme="dark"] .social-card__gallery-item,
html[data-theme="dark"] .social-card__gallery--single:not(.is-ratio-ready) .social-card__gallery-item,
html[data-theme="dark"] .social-card__gallery--single.is-portrait .social-card__gallery-item,
html[data-theme="dark"] .social-card__gallery--single.is-narrow-source .social-card__gallery-item {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .mySwiper2 .swiper-nav-button:hover,
html[data-theme="dark"] .mySwiper2 .swiper-nav-button:focus-visible {
  background: transparent;
}

html[data-theme="dark"] .mySwiper2 .swiper-nav-button svg {
  transition: opacity 0.2s ease;
}

html[data-theme="dark"] .mySwiper2 .swiper-nav-button:hover svg {
  opacity: 0.7;
}

html[data-theme="dark"] .social-card__gallery-item::after {
  background: linear-gradient(90deg, transparent 0%, rgba(229, 231, 235, 0.08) 50%, transparent 100%);
}

html[data-theme="dark"] .kareta-map-wrap,
html[data-theme="dark"] .organization-map-hero .kareta-map-wrap {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .kareta-map-mobile-sheet-toggle {
  background: color-mix(in srgb, var(--theme-surface) 98%, transparent);
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-map-mobile-sheet-toggle::before {
  background: #52606F;
}

html[data-theme="dark"] .kareta-map-mobile-sheet-toggle__meta {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .kareta-map-mobile-sheet-toggle__chevron {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .kareta-map-sidepanel.is-mobile-expanded .kareta-map-mobile-sheet-toggle__chevron {
  background: var(--theme-control-hover);
}

/* =========================================================
 * Stage 32: Follow lists and publish modal details
 * ======================================================= */
html[data-theme="dark"] .author-follow-modal__backdrop {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .author-follow-modal__dialog {
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .author-follow-modal__title,
html[data-theme="dark"] .author-follow-modal__name,
html[data-theme="dark"] .author-follow-modal__stats strong {
  color: var(--theme-text);
}

html[data-theme="dark"] .author-follow-modal__subtitle,
html[data-theme="dark"] .author-follow-modal__loading,
html[data-theme="dark"] .author-follow-modal__empty,
html[data-theme="dark"] .author-follow-modal__meta,
html[data-theme="dark"] .author-follow-modal__stats {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .author-follow-modal__close,
html[data-theme="dark"] .author-follow-modal__item,
html[data-theme="dark"] .author-follow-modal__avatar-wrap {
  background: var(--theme-surface-high);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .author-follow-modal__close:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .author-follow-modal__follow-button.is-active,
html[data-theme="dark"] .author-follow-modal__follow-button.is-active:visited,
html[data-theme="dark"] .author-follow-modal__follow-button.is-active:hover,
html[data-theme="dark"] .author-follow-modal__follow-button.is-active:active {
  background: var(--theme-soft-blue);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-publish-modal__separator {
  background: var(--theme-divider);
}

html[data-theme="dark"] .social-publish-modal__option-arrow {
  color: var(--theme-text-muted);
}

/* =========================================================
 * Stage 33: Shared confirmation and premium dialogs
 * ======================================================= */
html[data-theme="dark"] .profile-confirm-modal__backdrop {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .profile-confirm-modal__description,
html[data-theme="dark"] .profile-confirm-modal__info-paragraph,
html[data-theme="dark"] .profile-confirm-modal__perks-item {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .profile-confirm-modal__info-paragraph strong,
html[data-theme="dark"] .profile-confirm-modal__perks-title {
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-confirm-modal__perks {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .profile-confirm-modal__close {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .profile-confirm-modal__close:hover {
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-confirm-modal__button--secondary:hover {
  background: var(--theme-control-hover);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .profile-confirm-modal__button--premium {
  background: #3B2C1D;
  color: #F5C878;
}

html[data-theme="dark"] .profile-confirm-modal__button--premium:hover {
  background: #493522;
  color: #FCD89A;
}

html[data-theme="dark"] .profile-confirm-modal__button--danger {
  background: #3A2327;
  color: #FFB4B4;
}

html[data-theme="dark"] .profile-confirm-modal__button--danger:hover {
  background: #492A2F;
  color: #FFD0D0;
}

/* =========================================================
 * Stage 34: Payment result states
 * ======================================================= */
html[data-theme="dark"] .payment-result-panel__meta-label {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .payment-result-panel__meta-value {
  color: var(--theme-text);
}

html[data-theme="dark"] .payment-result-panel__badge--paid {
  background: #163428;
  color: #A7F3D0;
}

html[data-theme="dark"] .payment-result-panel__badge--expired,
html[data-theme="dark"] .payment-result-panel__badge--failed {
  background: #3B2C1D;
  color: #F5C878;
}

html[data-theme="dark"] .payment-result-panel__badge--pending {
  background: var(--theme-soft-blue);
  color: #BFDBFE;
}

/* =========================================================
 * Stage 35: Attached social posts on advertisement pages
 * ======================================================= */
html[data-theme="dark"] .ad-attached-posts {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .ad-attached-posts__head > span {
  background: var(--theme-surface-high);
  color: var(--theme-text-muted);
}

/* =========================================================
 * Stage 36: Public profile editor modal
 * ======================================================= */
html[data-theme="dark"] .profile-edit-modal__backdrop {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .profile-edit-modal__dialog {
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .profile-edit-modal__title,
html[data-theme="dark"] .profile-edit-modal__label,
html[data-theme="dark"] .profile-edit-modal__close {
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-edit-modal__subtitle,
html[data-theme="dark"] .profile-edit-modal__hint,
html[data-theme="dark"] .profile-edit-modal__file-name,
html[data-theme="dark"] .profile-edit-modal__username-prefix {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .profile-edit-modal__avatar-preview,
html[data-theme="dark"] .profile-edit-modal__upload,
html[data-theme="dark"] .profile-edit-modal__secondary {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-edit-modal__avatar-preview {
  box-shadow: inset 0 0 0 1px var(--theme-border);
}

html[data-theme="dark"] .profile-edit-modal__input,
html[data-theme="dark"] .profile-edit-modal__textarea,
html[data-theme="dark"] .profile-edit-modal__username-input-wrap {
  background: var(--theme-input);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .profile-edit-modal__username-prefix {
  background: var(--theme-surface-high);
  border-right-color: var(--theme-border);
}

html[data-theme="dark"] .profile-edit-modal__input::placeholder,
html[data-theme="dark"] .profile-edit-modal__textarea::placeholder {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .profile-edit-modal__upload:hover,
html[data-theme="dark"] .profile-edit-modal__secondary:hover,
html[data-theme="dark"] .profile-edit-modal__close:hover,
html[data-theme="dark"] .profile-edit-modal__close:focus-visible {
  background: var(--theme-control-hover);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

/* =========================================================
 * Stage 37: Organization create and edit forms
 * ======================================================= */
html[data-theme="dark"] .organization-category-option,
html[data-theme="dark"] .organization-phone-repeater__remove,
html[data-theme="dark"] .organization-phone-repeater__add {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .organization-category-option__price,
html[data-theme="dark"] .organization-switch-notice,
html[data-theme="dark"] .organization-category-price {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .organization-category-option:has(input:checked) {
  background: var(--theme-soft-blue);
  border-color: var(--color-primary);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .organization-category-price {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .organization-category-price__value {
  color: var(--theme-text);
}

html[data-theme="dark"] .organization-map-picker__map {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .organization-map-picker__coords .default-input {
  background: var(--theme-input);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .organization-phone-repeater__remove {
  color: #FF9A7A;
}

html[data-theme="dark"] .organization-phone-repeater__add {
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .organization-phone-repeater__remove:hover,
html[data-theme="dark"] .organization-phone-repeater__add:hover {
  background: var(--theme-control-hover);
}

/* =========================================================
 * Stage 38: Favorite organization cards in community header
 * ======================================================= */
html[data-theme="dark"] .kareta-org-favorites-card {
  background: var(--theme-surface-high);
  color: var(--theme-text);
  border-radius: 1.6rem;
  overflow: hidden;
}

html[data-theme="dark"] .kareta-org-favorites-card:hover {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .kareta-org-favorites-card-wrap {
  background: transparent;
}

html[data-theme="dark"] .kareta-org-favorites-card__logo {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .kareta-org-favorites-card__name {
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-org-favorites-card__tag {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .kareta-org-favorites-card__address,
html[data-theme="dark"] .kareta-org-favorites-card__description {
  color: var(--theme-text-muted);
}

.kareta-org-favorites-card__status.is-open {
  color: #2f9e44;
}

.kareta-org-favorites-card__status.is-closed {
  color: #e55637;
}

.kareta-org-favorites-card__status.is-neutral {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .kareta-org-favorites-card__remove,
html[data-theme="dark"] .kareta-org-favorites-card__remove:hover {
  background: color-mix(in srgb, var(--theme-surface-high) 94%, transparent);
  color: #FF9A7A;
}

/* =========================================================
 * Stage 39: Directory map loading, empty and popup states
 * ======================================================= */
html[data-theme="dark"] .kareta-map__loader {
  background: rgba(21, 27, 34, 0.88);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .kareta-map-empty-state,
html[data-theme="dark"] .kmap-hover-popup .maplibregl-popup-content {
  background: color-mix(in srgb, var(--theme-surface) 97%, transparent);
  color: var(--theme-text);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .kareta-map-empty-state__title,
html[data-theme="dark"] .kmap-hover-popup__title {
  color: var(--theme-text);
}

html[data-theme="dark"] .kareta-map-empty-state__text,
html[data-theme="dark"] .kmap-hover-popup__line {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .kmap-hover-popup__tag {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
}

html[data-theme="dark"] .kmap-hover-popup .maplibregl-popup-tip {
  border-top-color: var(--theme-surface);
}

html[data-theme="dark"] .kmap-marker-button.is-active .kmap-marker-icon {
  box-shadow: 0 0 0 4px var(--theme-surface), 0 12px 28px rgba(0, 0, 0, 0.38);
}

@media (max-width: 767.98px) {
  html[data-theme="dark"] .kareta-map-sidepanel {
    background: color-mix(in srgb, var(--theme-surface) 98%, transparent);
    box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.34);
  }
}

/* =========================================================
 * Stage 40: Social share popup
 * ======================================================= */
html[data-theme="dark"] .social-share-menu {
  background: color-mix(in srgb, var(--theme-surface) 98%, transparent);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-share-menu__item {
  color: var(--theme-text);
}

html[data-theme="dark"] .social-share-menu__item:hover,
html[data-theme="dark"] .social-share-menu__item:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
  opacity: 1;
}

/* Story composer mention suggestions use a separate UI from post mentions. */
html[data-theme="dark"] .social-story-compose__mention-result {
  background: color-mix(in srgb, var(--theme-surface-high) 92%, transparent);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-story-compose__mention-result:hover {
  background: var(--theme-control-hover);
  box-shadow: none;
}

html[data-theme="dark"] .social-story-compose__mention-result small {
  color: var(--theme-text-muted);
}

/* =========================================================
 * Stage 41: Contrast, focus, disabled controls and scrollbars
 * ======================================================= */
html[data-theme="dark"] .karetad__content__description,
html[data-theme="dark"] .karetads__grid.karetads__row .karetad .karetad__link .karetad__content .row .karetad__content__description {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .default-button-target {
  background: var(--theme-action-primary);
  color: #FFFFFF;
}

html[data-theme="dark"] .default-button-target:hover,
html[data-theme="dark"] .default-button-target:focus-visible {
  background: #3269D1;
  color: #FFFFFF;
  opacity: 1;
}

html[data-theme="dark"] .default-button,
html[data-theme="dark"] .admin-button--secondary,
html[data-theme="dark"] .author-public-card__follow-button--secondary,
html[data-theme="dark"] .author-public-card__follow-button--secondary:visited,
html[data-theme="dark"] .author-public-card__follow-button--secondary:hover,
html[data-theme="dark"] .author-public-card__follow-button--secondary:active,
html[data-theme="dark"] .kareta-map-sidepanel__message-button {
  background: var(--theme-soft-blue);
  border-color: transparent;
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] #login-register-password .default-button {
  background: var(--theme-soft-blue);
  border: 1px solid rgba(147, 197, 253, 0.20);
  color: #BFDBFE;
}

html[data-theme="dark"] #login-register-password .default-button:hover,
html[data-theme="dark"] #login-register-password .default-button:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
  opacity: 1;
}

html[data-theme="dark"] :where(a, button, [role="button"], [tabindex], input, select, textarea):focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] button:disabled,
html[data-theme="dark"] .default-button:disabled,
html[data-theme="dark"] .default-button-target:disabled,
html[data-theme="dark"] input:disabled:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled {
  background-color: var(--theme-control-disabled) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text-muted) !important;
  cursor: not-allowed;
  opacity: 1;
}

html[data-theme="dark"] .mySwiper2 .swiper-nav-button:disabled,
html[data-theme="dark"] .mySwiper2 .swiper-nav-button.swiper-button-disabled {
  background-color: transparent !important;
  border-color: transparent !important;
  cursor: default;
  opacity: 0.35 !important;
}

html[data-theme="dark"] .select2-selection__placeholder,
html[data-theme="dark"] .ts-control .items-placeholder,
html[data-theme="dark"] .ts-dropdown .no-results {
  color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field,
html[data-theme="dark"] .ts-dropdown input {
  background: var(--theme-input) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected],
html[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"],
html[data-theme="dark"] .ts-dropdown .option.active,
html[data-theme="dark"] .ts-dropdown .option.selected {
  background: var(--theme-control-hover) !important;
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .filepond--drop-label,
html[data-theme="dark"] .filepond--label-action {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] {
  color-scheme: dark;
  scrollbar-color: #52606F var(--theme-page);
}

html[data-theme="dark"] * {
  scrollbar-color: #52606F transparent;
}

html[data-theme="dark"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
  background: transparent;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #52606F;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #657586;
  border: 2px solid transparent;
  background-clip: padding-box;
}

html[data-theme="dark"] .car-wash-compact-day__date {
  color: var(--theme-text);
}

/* =========================================================
 * Stage 42: AA contrast for interactive and secondary text
 * ======================================================= */
html[data-theme="dark"] {
  --theme-action-primary: var(--color-primary-action);
  --theme-link: var(--color-primary-muted);
}

html[data-theme="dark"] .social-button--secondary {
  background: var(--theme-soft-blue);
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .social-button--secondary:hover,
html[data-theme="dark"] .social-button--secondary:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

html[data-theme="dark"] .header__place-button,
html[data-theme="dark"] .header-mobile__add-button,
html[data-theme="dark"] .karetads-param__button:not(.news_list_button),
html[data-theme="dark"] .social-button:not(.social-button--secondary),
html[data-theme="dark"] .social-compose-form__submit.is-ready,
html[data-theme="dark"] .install-links-page__site-link,
html[data-theme="dark"] .profile-balance-quick-amounts__button.is-active,
html[data-theme="dark"] .pmr-fuel-currency-tabs__button.is-active,
html[data-theme="dark"] .pmr-fuel-sidebar__bottom-link,
html[data-theme="dark"] .advert-cabinet__button:not(.advert-cabinet__button--secondary):not(.advert-cabinet__button--disabled),
html[data-theme="dark"] .organization-map-hero__button,
html[data-theme="dark"] .kareta-map-sidepanel__details-link,
html[data-theme="dark"] .kareta-map-empty-state__button {
  background: var(--theme-action-primary);
  border-color: var(--theme-action-primary);
  color: #FFFFFF;
}

html[data-theme="dark"] .header__place-button *,
html[data-theme="dark"] .header-mobile__add-button *,
html[data-theme="dark"] .karetads-param__button:not(.news_list_button) *,
html[data-theme="dark"] .pmr-fuel-sidebar__bottom-link * {
  color: #FFFFFF;
}

html[data-theme="dark"] .button-link,
html[data-theme="dark"] .forgot-pass-wrapper__link,
html[data-theme="dark"] .login-panel__line-link,
html[data-theme="dark"] .contacts-list__item a,
html[data-theme="dark"] .content-panel a:not(.default-button):not(.default-button-target),
html[data-theme="dark"] .desc a,
html[data-theme="dark"] .karetads-param-seller-1__link .user-identity-line__name,
html[data-theme="dark"] .social-link-button {
  color: var(--theme-link);
}

html[data-theme="dark"] .news-social__body,
html[data-theme="dark"] .social-feed-guest__text,
html[data-theme="dark"] .social-action-count,
html[data-theme="dark"] .share-buttons__text,
html[data-theme="dark"] .pmr-fuel-sidebar__link-meta,
html[data-theme="dark"] .car-wash-weather-label__temp,
html[data-theme="dark"] .car-wash-compact-day__metric-chip {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .karetads__grid .karetad .karetad__content__title,
html[data-theme="dark"] .karetads__grid.karetads__row .karetad .karetad__content__title {
  color: var(--theme-text);
}

html[data-theme="dark"] .social-button:not(.social-button--secondary):hover,
html[data-theme="dark"] .social-button:not(.social-button--secondary):focus-visible,
html[data-theme="dark"] .header__place-button:hover,
html[data-theme="dark"] .header__place-button:focus-visible,
html[data-theme="dark"] .install-links-page__site-link:hover,
html[data-theme="dark"] .install-links-page__site-link:focus-visible {
  background: #2F66C4;
  color: #FFFFFF;
  opacity: 1;
}

/* =========================================================
 * Stage 43: Utility status contrast
 * ======================================================= */
html[data-theme="dark"] .pmr-fuel-digit-separator {
  color: var(--theme-link);
}

html[data-theme="dark"] .pmr-fuel-price-caption {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .pmr-fuel-price-change--up {
  color: #FF8A91;
  background: rgba(255, 138, 145, 0.12);
}

html[data-theme="dark"] .pmr-fuel-price-change--down {
  color: #6EE7A2;
  background: rgba(110, 231, 162, 0.12);
}

html[data-theme="dark"] .pmr-fuel-badge--green {
  color: #A7F3D0;
}

html[data-theme="dark"] .pmr-fuel-badge--red {
  color: #FF8A91;
}

html[data-theme="dark"] .pmr-fuel-badge--blue {
  color: #93C5FD;
}

html[data-theme="dark"] .pmr-fuel-badge--black {
  color: var(--theme-text);
}

html[data-theme="dark"] .car-wash-today-card__score--good,
html[data-theme="dark"] .car-wash-best-window-card__score--good,
html[data-theme="dark"] .car-wash-compact-day__score--good {
  background: #1F7A37;
  color: #FFFFFF;
}

html[data-theme="dark"] .car-wash-today-card__score--warning,
html[data-theme="dark"] .car-wash-best-window-card__score--warning,
html[data-theme="dark"] .car-wash-compact-day__score--warning {
  background: #9A6A12;
  color: #FFFFFF;
}

html[data-theme="dark"] .car-wash-today-card__score--bad,
html[data-theme="dark"] .car-wash-best-window-card__score--bad,
html[data-theme="dark"] .car-wash-compact-day__score--bad {
  background: #B72E24;
  color: #FFFFFF;
}

html[data-theme="dark"] .car-wash-best-window-card__status--good {
  background: #163428;
  color: #A7F3D0;
}

html[data-theme="dark"] .car-wash-best-window-card__status--warning {
  background: #3B2C1D;
  color: #F5C878;
}

html[data-theme="dark"] .car-wash-best-window-card__status--bad {
  background: #3A2327;
  color: #FFB4B4;
}

html[data-theme="dark"] .car-wash-compact-day__label--bad {
  color: #FF9A7A;
}

html[data-theme="dark"] .social-hover-card__stat strong {
  color: var(--theme-text);
}

html[data-theme="dark"] .social-hover-card__stat span {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .catalog-filter-toggle.is-open,
html[data-theme="dark"] .catalog-filter-toggle.is-active {
  background: var(--theme-action-primary);
  color: #FFFFFF;
}

html[data-theme="dark"] .author-profile-hero__link {
  color: var(--theme-link);
}

html[data-theme="dark"] .author-profile-hero__link:hover,
html[data-theme="dark"] .author-profile-hero__link:focus-visible {
  color: #BFDBFE;
}

/* Stage 44: Flutter palette parity for remaining home/feed surfaces. */
html[data-theme="dark"] .category-list__item {
  background: var(--theme-soft-blue);
}

html[data-theme="dark"] .category-list__item-title {
  color: #FFFFFF;
}

html[data-theme="dark"] .brand__logo__link {
  background: var(--theme-soft-blue);
  color: var(--theme-text);
}

/* =========================================================
 * Stage 45: Visual parity audit — social surfaces
 * ======================================================= */
html[data-theme="dark"] .social-card::before,
html[data-theme="dark"] .social-account-card::before {
  background: var(--theme-divider);
}

html[data-theme="dark"] .social-feed-launcher,
html[data-theme="dark"] .default-form-group__filter {
  border-color: var(--theme-divider);
}

html[data-theme="dark"] .social-account-card {
  background: transparent;
  border-color: transparent;
  transition: background-color 0.2s ease;
}

html[data-theme="dark"] .social-account-card:hover,
html[data-theme="dark"] .social-account-card:focus-within {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .social-account-card__cta.is-active,
html[data-theme="dark"] .social-account-card__cta.is-active:visited {
  background: var(--theme-soft-blue);
  border-color: transparent;
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

html[data-theme="dark"] .social-account-card__cta.is-active:hover,
html[data-theme="dark"] .social-account-card__cta.is-active:focus-visible,
html[data-theme="dark"] .social-recommended__follow.is-active:hover,
html[data-theme="dark"] .social-recommended__follow.is-active:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

html[data-theme="dark"] .social-search-form__clear:hover,
html[data-theme="dark"] .social-search-form__clear:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-feed-composer .social-compose-form__textarea,
html[data-theme="dark"] .social-feed-composer .social-compose-form__reply,
html[data-theme="dark"] .social-feed-composer .social-compose-form__textarea:focus,
html[data-theme="dark"] .social-feed-composer .social-compose-form__reply:focus {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: var(--theme-text);
}

html[data-theme="dark"] .social-compose-modal__close:hover,
html[data-theme="dark"] .social-compose-modal__close:focus-visible,
html[data-theme="dark"] .social-compose-form__location-link:hover,
html[data-theme="dark"] .social-compose-form__location-link:focus-visible,
html[data-theme="dark"] .social-compose-form__poll-add:hover,
html[data-theme="dark"] .social-compose-form__poll-add:focus-visible,
html[data-theme="dark"] .social-compose-form__poll-remove:hover,
html[data-theme="dark"] .social-compose-form__poll-remove:focus-visible,
html[data-theme="dark"] .social-link-button:hover,
html[data-theme="dark"] .social-link-button:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
  opacity: 1;
}

/* Catalog filters keep the same geometry as light mode; only theme colors. */
html[data-theme="dark"] .catalog-filter-overlay__body {
  background: var(--theme-surface);
  color: var(--theme-text);
}

html[data-theme="dark"] .default-label-for-input__filter {
  color: var(--theme-text);
}

html[data-theme="dark"] .default-label-for-input__filter .arrow-icon path {
  stroke: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .default-filter-icon svg path {
  fill: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .default-label-for-input__filter:hover,
html[data-theme="dark"] .default-label-for-input__filter:focus-within {
  opacity: 0.7;
}

html[data-theme="dark"] .default-filter-reset {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .default-filter-reset:hover,
html[data-theme="dark"] .default-filter-reset:focus-visible {
  color: var(--theme-text);
}

html[data-theme="dark"] .catalog-filter-toggle:not(.is-active):not(.is-open) {
  background: var(--theme-soft-blue);
  border-color: transparent;
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .catalog-filter-toggle:not(.is-active):not(.is-open):hover,
html[data-theme="dark"] .catalog-filter-toggle:not(.is-active):not(.is-open):focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
}

/* Admin surfaces: theme both the filter rail and the principal content. */
html[data-theme="dark"] .admin-panel-card,
html[data-theme="dark"] .admin-dashboard__card,
html[data-theme="dark"] .admin-table-wrapper {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td {
  border-bottom-color: var(--theme-divider);
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-table td {
  background: var(--theme-surface);
  transition: background-color 0.18s ease;
}

html[data-theme="dark"] .admin-table tbody tr:hover td {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .admin-review-complaints__status--warning {
  background: #352B20;
  color: #FFD28A;
}

html[data-theme="dark"] .admin-review-complaints__status--danger {
  background: #3A2327;
  color: #FFB4B4;
}

html[data-theme="dark"] .admin-review-complaints__status--success {
  background: #0F3A28;
  color: #34D399;
}

html[data-theme="dark"] .admin-filters__label,
html[data-theme="dark"] .admin-dashboard__title,
html[data-theme="dark"] .admin-dashboard__metric-value,
html[data-theme="dark"] .admin-dashboard__metric-label,
html[data-theme="dark"] .admin-dashboard__card-title,
html[data-theme="dark"] .admin-dashboard__list-item,
html[data-theme="dark"] .admin-dashboard__list-value,
html[data-theme="dark"] .admin-dashboard__text {
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-dashboard__hint,
html[data-theme="dark"] .admin-dashboard__subtext {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .admin-table__link,
html[data-theme="dark"] .admin-inline-button:not(.admin-inline-button--danger):not(.admin-inline-button--success) {
  color: var(--theme-link);
}

html[data-theme="dark"] .admin-table__link:hover,
html[data-theme="dark"] .admin-table__link:focus-visible,
html[data-theme="dark"] .admin-inline-button:not(.admin-inline-button--danger):not(.admin-inline-button--success):hover,
html[data-theme="dark"] .admin-inline-button:not(.admin-inline-button--danger):not(.admin-inline-button--success):focus-visible {
  color: #BFDBFE;
}

html[data-theme="dark"] .admin-context-bar,
html[data-theme="dark"] .admin-context-actions__menu {
  background: var(--theme-surface);
  border-color: var(--theme-divider);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .admin-context-bar__link,
html[data-theme="dark"] .admin-context-bar__link:visited,
html[data-theme="dark"] .admin-context-bar__action-button {
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-context-bar__link--nav:hover,
html[data-theme="dark"] .admin-context-bar__link--nav.is-active {
  color: var(--color-primary-muted);
  opacity: 1;
}

html[data-theme="dark"] .admin-context-bar__link--action {
  background: var(--theme-soft-blue);
}

html[data-theme="dark"] .admin-context-bar__link--action:hover,
html[data-theme="dark"] .admin-context-actions__item:hover,
html[data-theme="dark"] .admin-context-actions__item:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
  opacity: 1;
}

/* Secondary controls need a visible hover instead of repeating their rest state. */
html[data-theme="dark"] .default-button:hover,
html[data-theme="dark"] .default-button:focus-visible,
html[data-theme="dark"] .admin-button--secondary:hover,
html[data-theme="dark"] .admin-button--secondary:focus-visible,
html[data-theme="dark"] .author-public-card__follow-button--secondary:hover,
html[data-theme="dark"] .author-public-card__follow-button--secondary:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

/* Flutter's car-wash screen uses a flat dark scaffold; hide light weather art. */
html[data-theme="dark"] .car-wash-page {
  background: var(--theme-page);
  color: var(--theme-text);
}

html[data-theme="dark"] .car-wash-weather-fx {
  display: none;
}

html[data-theme="dark"] .car-wash-page .desc {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .car-wash-best-window-card {
  background: color-mix(in srgb, var(--color-primary) 18%, var(--theme-surface));
  border-color: var(--theme-border);
}

/* Remaining shared/admin overlays found by the white-surface audit. */
html[data-theme="dark"] .price-tooltip {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .price-tooltip__line--meta {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .admin-delete-dialog__backdrop {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .admin-delete-dialog__panel {
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .admin-delete-dialog__title,
html[data-theme="dark"] .admin-delete-dialog__label,
html[data-theme="dark"] .admin-delete-dialog__checkbox,
html[data-theme="dark"] .admin-form__label {
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-delete-dialog__subtitle,
html[data-theme="dark"] .admin-delete-dialog__hint,
html[data-theme="dark"] .admin-delete-dialog__close,
html[data-theme="dark"] .admin-form__help,
html[data-theme="dark"] .admin-form__image-placeholder {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .admin-delete-dialog__close:hover,
html[data-theme="dark"] .admin-delete-dialog__close:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
}

html[data-theme="dark"] .admin-form__image-preview,
html[data-theme="dark"] .admin-form__image-preview.is-placeholder {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  box-shadow: none;
}

html[data-theme="dark"] .admin-info-block__content code {
  background: var(--theme-soft-blue);
  color: var(--color-primary-muted);
}

/* Own-profile ad rows intentionally use a transparent outer .karetad.
 * Keep the clickable card itself on a real surface in dark mode so it
 * preserves the same card/page separation as the light theme. */
html[data-theme="dark"] .author-public-section--my-ads .karetads__grid.karetads__row .karetad .karetad__link {
  background: var(--theme-surface) !important;
}

html[data-theme="dark"] .author-public-section--my-ads .karetads__grid.karetads__row .karetad .karetad__actions .karetad__mobile-manage-trigger {
  background: var(--theme-soft-blue) !important;
  color: var(--theme-secondary-button-text) !important;
}

html[data-theme="dark"] .author-public-section--my-ads .karetads__grid.karetads__row .karetad .karetad__actions .karetad__mobile-manage-trigger:not(:disabled):hover,
html[data-theme="dark"] .author-public-section--my-ads .karetads__grid.karetads__row .karetad .karetad__actions .karetad__mobile-manage-trigger:focus-visible {
  background: var(--theme-control-hover) !important;
  color: var(--theme-secondary-button-text) !important;
}

html[data-theme="dark"] .author-public-section--my-ads .karetads__grid.karetads__row .karetad .favoriteButton {
  background: var(--theme-surface-high) !important;
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .author-public-section--my-ads .karetads__grid.karetads__row .karetad .favoriteButton--active {
  color: #E55637;
}

/* Favorites ads live inside a surface-colored social column. Elevate every
 * saved ad one level so the grid keeps visible card boundaries in dark mode. */
html[data-theme="dark"] .social-favorites-ads__list .karetads__grid > .karetad {
  background: var(--theme-surface-high);
}

html[data-theme="dark"] .social-favorites-ads__list .karetads__grid > .karetad:hover,
html[data-theme="dark"] .social-favorites-ads__list .karetads__grid > .karetad:focus-within {
  background: var(--theme-control-hover);
}

html[data-theme="dark"] .social-favorites-ads__list .karetads__grid > .karetad .favoriteButton {
  background: var(--theme-control);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-favorites-ads__list .karetads__grid > .karetad .favoriteButton:hover,
html[data-theme="dark"] .social-favorites-ads__list .karetads__grid > .karetad .favoriteButton:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
}

html[data-theme="dark"] .social-favorites-ads__list .karetads__grid > .karetad .favoriteButton--active,
html[data-theme="dark"] .social-favorites-ads__list .karetads__grid > .karetad .favoriteButton--active:hover,
html[data-theme="dark"] .social-favorites-ads__list .karetads__grid > .karetad .favoriteButton--active:focus-visible {
  color: #E55637;
}

@media (max-width: 991px) {
  html[data-theme="dark"] .karetads__grid.karetads__row .karetad .karetad__link,
  html[data-theme="dark"] .author-public-section--my-ads .karetads__grid.karetads__row .karetad .karetad__link {
    background: var(--theme-surface) !important;
  }

  html[data-theme="dark"] .karetads__grid.karetads__row .karetad .favoriteButton {
    color: var(--theme-text-muted);
  }

  html[data-theme="dark"] .karetad__mobile-manage-trigger,
  html[data-theme="dark"] .author-public-section--my-ads .karetad__mobile-manage-trigger {
    background: var(--theme-soft-blue);
    color: var(--theme-secondary-button-text);
  }

  html[data-theme="dark"] .karetad__mobile-manage-trigger:hover,
  html[data-theme="dark"] .karetad__mobile-manage-trigger:focus-visible {
    background: var(--theme-control-hover);
    color: var(--theme-secondary-button-text);
  }
}

html[data-theme="dark"] .karetad-modal__overlay {
  background: var(--theme-overlay);
}

html[data-theme="dark"] .karetad-modal__panel,
html[data-theme="dark"] .karetad-modal__body {
  background: var(--theme-page);
  color: var(--theme-text);
}

html[data-theme="dark"] .karetad-modal__header {
  background: var(--theme-surface);
  border-bottom-color: var(--theme-divider);
}

html[data-theme="dark"] .karetad-modal__loader,
html[data-theme="dark"] .karetad-modal__views .karetads-param__views {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .karetad-modal__error {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .karetad-modal__back,
html[data-theme="dark"] .karetad-modal__close {
  background: var(--theme-soft-blue);
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .karetad-modal__back:hover,
html[data-theme="dark"] .karetad-modal__back:focus-visible,
html[data-theme="dark"] .karetad-modal__close:hover,
html[data-theme="dark"] .karetad-modal__close:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .karetad-modal__error-link:hover,
html[data-theme="dark"] .karetad-modal__error-link:focus-visible {
  background: var(--theme-soft-blue);
  color: var(--theme-text);
}

html[data-theme="dark"] .news-social__badge {
  background: var(--theme-surface-high);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .news-social__badge-icon {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .community-header__actions .header__autirization-button {
  background: transparent;
  color: var(--theme-text);
}

html[data-theme="dark"] .community-header__actions .header__autirization-button:hover,
html[data-theme="dark"] .community-header__actions .header__autirization-button:focus-visible {
  background: transparent;
  color: var(--theme-text);
  opacity: 0.7;
}

@media (max-width: 991.98px) {
  html[data-theme="dark"] .community-header__actions .header__autirization-button {
    background: var(--theme-soft-blue);
    color: var(--theme-secondary-button-text);
  }

  html[data-theme="dark"] .community-header__actions .header__autirization-button:hover,
  html[data-theme="dark"] .community-header__actions .header__autirization-button:focus-visible {
    background: var(--theme-control-hover);
    color: var(--theme-secondary-button-text);
    opacity: 1;
  }
}

html[data-theme="dark"] .header-search__region-control {
  border-left-color: var(--theme-divider);
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .header-search__region-control:hover,
html[data-theme="dark"] .header-search__region-control:focus-visible {
  background: var(--theme-control-hover);
  border-left-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .car-wash-compact-day__metrics {
  border-top-color: var(--theme-divider);
}

@media (min-width: 992px) {
  html[data-theme="dark"] .brand__logo__item::after {
    background: var(--theme-surface-high);
    border-color: var(--theme-border);
    box-shadow: var(--theme-shadow);
    color: var(--theme-text);
  }
}

/* =========================================================
 * Stage 46: Light/dark interaction and geometry parity fixes
 * ======================================================= */
/* The desktop search input owns the rounded left edge. A dark background on
 * its square wrapper leaks through the radius and makes the outline look bent. */
html[data-theme="dark"] .header--desktop .header-search__form__input-wrapper {
  background: transparent;
  border-color: transparent;
}

html[data-theme="dark"] .header--desktop .header-search-form__field:focus {
  border-color: transparent;
  box-shadow: none;
  outline: none;
}

/* Text links keep their base theme color and use opacity for hover/focus. */
html[data-theme="dark"] .button-link:hover,
html[data-theme="dark"] .button-link:focus-visible,
html[data-theme="dark"] .brand__link:hover,
html[data-theme="dark"] .brand__link:focus-visible {
  color: var(--theme-text);
  opacity: 0.7;
}

/* Keep the rounded filter card visually separate from the page/overlay. */
html[data-theme="dark"] .archive-filters-root,
html[data-theme="dark"] .catalog-filter-overlay__body .archive-filters-root {
  background: transparent;
  color: inherit;
}

html[data-theme="dark"] .archive-filters {
  background: var(--theme-surface);
}

/* Inactive reset controls are disabled by JS. The generic dark disabled rule
 * must not force these intentionally hidden controls back to opacity: 1. */
html[data-theme="dark"] .default-filter-reset:not(.is-visible) {
  background: transparent !important;
  border-color: transparent !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html[data-theme="dark"] .default-filter-reset.is-visible {
  background: transparent !important;
  border-color: transparent !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Match the presence pills used by Flutter chat_thread_screen.dart. */
html[data-theme="dark"] .kareta-chat-view__status {
  background: #1F2A36;
  color: #B5C3D1;
}

html[data-theme="dark"] .kareta-chat-view__status.is-online {
  background: #0F3A28;
  color: #5FE0A0;
}

/* Advertisement title actions are secondary actions, not primary-blue chips. */
html[data-theme="dark"] .title-section__action-button {
  background: var(--theme-soft-blue);
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .title-section__action-button:hover,
html[data-theme="dark"] .title-section__action-button:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

html[data-theme="dark"] .title-section__action-button--favorite.favoriteButton--active,
html[data-theme="dark"] .title-section__action-button--favorite.favoriteButton--active:hover,
html[data-theme="dark"] .title-section__action-button--favorite.favoriteButton--active:focus-visible {
  color: #E55637;
}

/* profile-content is a page layout container, not a card. */
html[data-theme="dark"] .profile-content {
  background: transparent;
  color: var(--theme-text);
}

/* Neutral post actions mirror the muted Flutter icon treatment. */
html[data-theme="dark"] .social-card__actions .social-action-button,
html[data-theme="dark"] .social-card__actions .social-link-button {
  background: transparent;
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-card__actions .social-action-button:hover,
html[data-theme="dark"] .social-card__actions .social-action-button:focus-visible,
html[data-theme="dark"] .social-card__actions .social-link-button:not(.social-link-button--disabled):hover,
html[data-theme="dark"] .social-card__actions .social-link-button:not(.social-link-button--disabled):focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-text);
  opacity: 1;
}

html[data-theme="dark"] .social-card__actions .social-action-button.is-active,
html[data-theme="dark"] .social-card__actions .social-link-button.is-active,
html[data-theme="dark"] .social-card__actions .social-action-button.is-active:hover,
html[data-theme="dark"] .social-card__actions .social-action-button.is-active:focus-visible,
html[data-theme="dark"] .social-card__actions .social-link-button.is-active:hover,
html[data-theme="dark"] .social-card__actions .social-link-button.is-active:focus-visible {
  color: #E55637;
}

html[data-theme="dark"] .social-card__actions .social-link-button--disabled {
  color: color-mix(in srgb, var(--theme-text-muted) 58%, transparent);
}

/* Hover previews keep the light-theme geometry but use a dark, subtle edge. */
html[data-theme="dark"] .social-author-preview,
html[data-theme="dark"] .social-reaction-preview {
  border-color: var(--theme-divider);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .social-hover-card__link {
  background: var(--theme-soft-blue);
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .social-hover-card__link:hover,
html[data-theme="dark"] .social-hover-card__link:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

html[data-theme="dark"] .social-hover-card__follow.is-active,
html[data-theme="dark"] .social-hover-card__follow.is-active:visited {
  background: var(--theme-soft-blue);
  border-color: transparent;
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .social-hover-card__follow.is-active:hover,
html[data-theme="dark"] .social-hover-card__follow.is-active:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

/* =========================================================
 * Stage 47: Canonical Flutter secondary actions
 * ======================================================= */
html[data-theme="dark"] .profile-confirm-modal__button--secondary,
html[data-theme="dark"] .news_list_button,
html[data-theme="dark"] .karetads__more-button__link,
html[data-theme="dark"] .karetads-param__button.news_list_button,
html[data-theme="dark"] .kareta-map-sidepanel__message-button,
html[data-theme="dark"] .my_settings__submit,
html[data-theme="dark"] .login-panel__registration-button,
html[data-theme="dark"] .profile-tabs__tab:not(.active),
html[data-theme="dark"] .default-button,
html[data-theme="dark"] .admin-button--secondary,
html[data-theme="dark"] .catalog-filter-toggle:not(.is-active):not(.is-open) {
  background: var(--theme-soft-blue);
  border-color: transparent;
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .notifications-overlay__detail-back,
html[data-theme="dark"] .paginate-number,
html[data-theme="dark"] .paginate-arrow:not(.paginate-arrow--disabled),
html[data-theme="dark"] .paginate-ellipsis,
html[data-theme="dark"] .profile-karetad-panel__mobile-manage,
html[data-theme="dark"] .error-page__button--secondary,
html[data-theme="dark"] .karetad-modal__back,
html[data-theme="dark"] .karetad-modal__close {
  background: var(--theme-soft-blue);
  border-color: transparent;
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .organization-page__icon-button,
html[data-theme="dark"] .organization-page__back,
html[data-theme="dark"] .author-profile-hero__share-button,
html[data-theme="dark"] .author-public-card__follow-button--secondary,
html[data-theme="dark"] .social-compose-modal__back,
html[data-theme="dark"] .social-post-report-modal__button--cancel,
html[data-theme="dark"] .social-button--secondary,
html[data-theme="dark"] .advert-cabinet__button--secondary,
html[data-theme="dark"] .advert-card__controls .karetad__mobile-manage-trigger,
html[data-theme="dark"] .profile-edit-modal__secondary,
html[data-theme="dark"] .profile-karetad-panel__pill:not(.profile-karetad-panel__pill--premium):not(.profile-karetad-panel__pill--red),
html[data-theme="dark"] .pmr-fuel-sidebar__link,
html[data-theme="dark"] .pmr-fuel-currency-tabs__button:not(.is-active),
html[data-theme="dark"] .car-wash-metric-help {
  background: var(--theme-soft-blue);
  border-color: transparent;
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .pmr-fuel-sidebar__link .pmr-fuel-sidebar__link-label {
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .news_list_button:hover,
html[data-theme="dark"] .news_list_button:focus-visible,
html[data-theme="dark"] .karetads__more-button__link:hover,
html[data-theme="dark"] .karetads__more-button__link:focus-visible,
html[data-theme="dark"] .karetads-param__button.news_list_button:hover,
html[data-theme="dark"] .karetads-param__button.news_list_button:focus-visible,
html[data-theme="dark"] .kareta-map-sidepanel__message-button:hover,
html[data-theme="dark"] .kareta-map-sidepanel__message-button:focus-visible,
html[data-theme="dark"] .my_settings__submit:hover,
html[data-theme="dark"] .my_settings__submit:focus-visible,
html[data-theme="dark"] .login-panel__registration-button:hover,
html[data-theme="dark"] .login-panel__registration-button:focus-visible,
html[data-theme="dark"] .author-profile-hero__share-button:hover,
html[data-theme="dark"] .author-profile-hero__share-button:focus-visible,
html[data-theme="dark"] .social-compose-modal__back:hover,
html[data-theme="dark"] .social-compose-modal__back:focus-visible,
html[data-theme="dark"] .social-post-report-modal__button--cancel:hover,
html[data-theme="dark"] .social-post-report-modal__button--cancel:focus-visible,
html[data-theme="dark"] .profile-karetad-panel__pill:not(.profile-karetad-panel__pill--premium):not(.profile-karetad-panel__pill--red):hover,
html[data-theme="dark"] .profile-karetad-panel__pill:not(.profile-karetad-panel__pill--premium):not(.profile-karetad-panel__pill--red):focus-visible,
html[data-theme="dark"] .pmr-fuel-currency-tabs__button:not(.is-active):hover,
html[data-theme="dark"] .pmr-fuel-currency-tabs__button:not(.is-active):focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

/* Slider arrows use the same secondary-action color as "Show more". */
html[data-theme="dark"] .similar-karetads-slider__nav {
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .similar-karetads-slider__nav:hover:not(.swiper-button-disabled),
html[data-theme="dark"] .similar-karetads-slider__nav:focus-visible:not(.swiper-button-disabled) {
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

html[data-theme="dark"] .brand-logos-slider__controls .similar-karetads-slider__nav,
html[data-theme="dark"] .brand-logos-slider__controls .similar-karetads-slider__nav:hover:not(.swiper-button-disabled),
html[data-theme="dark"] .brand-logos-slider__controls .similar-karetads-slider__nav:focus-visible:not(.swiper-button-disabled) {
  color: var(--color-primary);
}

/* Pagination follows the same secondary-action contract as Flutter. */
html[data-theme="dark"] .navigation .page-numbers:not(.current),
html[data-theme="dark"] .paginate-number,
html[data-theme="dark"] .paginate-arrow:not(.paginate-arrow--disabled),
html[data-theme="dark"] .paginate-ellipsis {
  background: var(--theme-soft-blue);
  border-color: transparent;
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

html[data-theme="dark"] .navigation .page-numbers:not(.current):hover,
html[data-theme="dark"] .navigation .page-numbers:not(.current):focus-visible,
html[data-theme="dark"] .paginate-number:hover,
html[data-theme="dark"] .paginate-number:focus-visible,
html[data-theme="dark"] .paginate-arrow:not(.paginate-arrow--disabled):hover,
html[data-theme="dark"] .paginate-arrow:not(.paginate-arrow--disabled):focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

html[data-theme="dark"] .navigation .page-numbers.current,
html[data-theme="dark"] .paginate-number__active {
  background: var(--theme-action-primary) !important;
  border-color: var(--theme-action-primary) !important;
  color: #FFFFFF;
  opacity: 1;
}

html[data-theme="dark"] .paginate-arrow--disabled {
  background: var(--theme-control-disabled);
  border-color: transparent;
  color: var(--theme-text-muted);
  opacity: 1;
}

html[data-theme="dark"] .paginate-arrow svg path {
  stroke: currentColor;
}

/* =========================================================
 * Stage 48: Remaining dark-theme parity fixes
 * ======================================================= */
/* Social separators stay flat in both themes; dark mode only swaps the token. */
html[data-theme="dark"] .social-rail__divider,
html[data-theme="dark"] .community-header__tagline::before {
  background: var(--theme-divider);
}

/* Reset is an explicit catalog action rather than a neutral secondary control. */
html[data-theme="dark"] .default-filter-reset,
html[data-theme="dark"] .default-filter-reset.is-visible {
  color: var(--theme-link) !important;
}

html[data-theme="dark"] .default-filter-reset:hover,
html[data-theme="dark"] .default-filter-reset:focus-visible {
  color: #7DB5FF !important;
}

html[data-theme="dark"] .archive-filters-root .default-form__button-group .default-button-target,
html[data-theme="dark"] .catalog-filter-overlay__footer .default-form__button-group .default-button-target {
  background: var(--theme-action-primary);
  color: #FFFFFF;
}

html[data-theme="dark"] .archive-filters-root .default-form__button-group .default-button-target:hover,
html[data-theme="dark"] .archive-filters-root .default-form__button-group .default-button-target:focus-visible,
html[data-theme="dark"] .catalog-filter-overlay__footer .default-form__button-group .default-button-target:hover,
html[data-theme="dark"] .catalog-filter-overlay__footer .default-form__button-group .default-button-target:focus-visible {
  background: #3269D1;
  color: #FFFFFF;
  opacity: 1;
}

html[data-theme="dark"] .archive-filters-root .default-form__button-group .default-button,
html[data-theme="dark"] .catalog-filter-overlay__footer .default-form__button-group .default-button {
  background: var(--theme-soft-blue);
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .archive-filters-root .default-form__button-group .default-button:hover,
html[data-theme="dark"] .archive-filters-root .default-form__button-group .default-button:focus-visible,
html[data-theme="dark"] .catalog-filter-overlay__footer .default-form__button-group .default-button:hover,
html[data-theme="dark"] .catalog-filter-overlay__footer .default-form__button-group .default-button:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

/* The filter card already has its own edge; the first filter must not draw an extra line at the top. */
html[data-theme="dark"] .archive-filters .default-form-group__filter:first-of-type {
  border-top-color: transparent;
}

html[data-theme="dark"] .archive-preloader {
  background: rgba(11, 16, 21, 0.48);
}

html[data-theme="dark"] .archive-preloader--initial {
  background: transparent;
}

html[data-theme="dark"] .archive-karetads.is-catalog-loading .catalog-results-region .archive-preloader {
  background: rgba(11, 16, 21, 0.64);
  backdrop-filter: blur(1.5px);
}

html[data-theme="dark"] .archive-karetads.is-catalog-loading .catalog-results-region > .karetads__grid {
  opacity: 0.52;
  filter: saturate(0.9);
}

/* Placement packages were still using their light cards. */
html[data-theme="dark"] .package-option {
  background: var(--theme-surface-high);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html[data-theme="dark"] .package-option:hover,
html[data-theme="dark"] .package-option:focus-within {
  background: var(--theme-control-hover);
  opacity: 1;
}

html[data-theme="dark"] .package-option.is-active {
  border-color: var(--color-primary);
}

html[data-theme="dark"] .package-option--accent,
html[data-theme="dark"] .package-option--accent:hover,
html[data-theme="dark"] .package-option--accent:focus-within {
  background: #2D241D;
  border-color: #6A4A32;
}

html[data-theme="dark"] .package-option__title,
html[data-theme="dark"] .package-option__price-value,
html[data-theme="dark"] .package-option__features,
html[data-theme="dark"] .package-option__control-text {
  color: var(--theme-text);
}

html[data-theme="dark"] .package-option__tagline,
html[data-theme="dark"] .package-option__price-suffix,
html[data-theme="dark"] .package-option__price-old,
html[data-theme="dark"] .package-options__hint,
html[data-theme="dark"] .auto-bump-inline__meta,
html[data-theme="dark"] .auto-bump-inline__description,
html[data-theme="dark"] .auto-bump-inline__panel-text {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .package-option__control {
  border-top-color: var(--theme-divider);
}

html[data-theme="dark"] .package-option--disabled {
  background: var(--theme-control-disabled);
}

html[data-theme="dark"] .package-option__control input[type="radio"] {
  appearance: none;
  width: 1.8rem;
  height: 1.8rem;
  border: 0.2rem solid var(--theme-text-muted);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .package-option__control input[type="radio"]:checked {
  border-color: var(--color-primary);
  background: radial-gradient(circle, var(--color-primary) 0 42%, transparent 46%);
}

/* Bootstrap switches now use the same dark track treatment as Flutter switches. */
html[data-theme="dark"] .form-switch .form-check-input {
  background-color: var(--theme-surface-high);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23E3E6EC'/%3e%3c/svg%3e");
  border-color: var(--theme-border);
  box-shadow: none !important;
  opacity: 1;
}

html[data-theme="dark"] .form-switch .form-check-input:hover {
  opacity: 1;
}

html[data-theme="dark"] .form-switch .form-check-input:checked {
  background-color: rgba(55, 118, 229, 0.45);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23F5F6F8'/%3e%3c/svg%3e");
  border-color: rgba(55, 118, 229, 0.72);
}

html[data-theme="dark"] .form-switch .form-check-input:focus,
html[data-theme="dark"] .form-switch .form-check-input:focus-visible {
  box-shadow: none !important;
  outline: none !important;
}

/* Referral/promo inputs need one more surface step so they do not merge into their cards. */
html[data-theme="dark"] .profile-balance-grid__card--referral .default-input,
html[data-theme="dark"] .profile-balance-grid__card--promo .default-input {
  background-color: var(--theme-soft-blue) !important;
  color: var(--theme-text);
}

/* Reaction preview has no nested card surface in the light theme either. */
html[data-theme="dark"] .social-reaction-preview-card {
  background: transparent;
  border-color: transparent;
}

/* QR download is a secondary action, not the old dark-blue light-theme token. */
html[data-theme="dark"] .profile-share-modal__download {
  background: var(--theme-soft-blue);
  border-color: transparent;
  color: var(--theme-secondary-button-text);
}

html[data-theme="dark"] .profile-share-modal__download:hover,
html[data-theme="dark"] .profile-share-modal__download:focus-visible {
  background: var(--theme-control-hover);
  color: var(--theme-secondary-button-text);
  opacity: 1;
}

/* File upload guidance/status must remain readable on the compose surface. */
html[data-theme="dark"] .filepond--drop-label {
  color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .filepond--label-action {
  color: var(--color-primary) !important;
}

html[data-theme="dark"] .social-feed-form__status {
  color: var(--theme-text-muted);
}

html[data-theme="dark"] .social-feed-form__status.is-error {
  color: #FFB4B4;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):focus,
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):focus-visible,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] textarea:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Chat presence pill follows the same geometry and palette as Flutter. */
html .kareta-chat-view__status {
  line-height: 1;
  font-weight: 500;
  padding: 0.5rem 1rem;
}

html:not([data-theme="dark"]) .kareta-chat-view__status {
  color: rgb(108, 122, 137);
  background: rgb(239, 243, 247);
}

html:not([data-theme="dark"]) .kareta-chat-view__status.is-online {
  color: rgb(27, 170, 88);
  background: rgb(217, 249, 228);
}

/* Message actions stay compact like Telegram: reply plus an optional destructive action. */
.kareta-chat-modal__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.kareta-chat-modal__actions.is-mine.has-delete {
  left: -6.1rem;
}

.kareta-chat-modal__delete-action {
  color: #dc2626;
}

.kareta-chat-modal__delete-action:hover {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.1);
}

html[data-theme="dark"] .kareta-chat-modal__delete-action {
  color: #f87171;
}

html[data-theme="dark"] .kareta-chat-modal__delete-action:hover {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.14);
}

/* Social likes: fast Instagram-style pop on like, softer release on unlike. */
[data-social-like-button].is-like-pop .social-action-icon--heart {
  animation: kareta-social-like-pop 360ms cubic-bezier(0.2, 0.9, 0.25, 1.18);
  transform-origin: center;
}

[data-social-like-button].is-unlike-pop .social-action-icon--heart {
  animation: kareta-social-unlike-pop 260ms ease-out;
  transform-origin: center;
}

@keyframes kareta-social-like-pop {
  0% { transform: scale(1); }
  42% { transform: scale(1.28); }
  72% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

@keyframes kareta-social-unlike-pop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.84); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  [data-social-like-button].is-like-pop .social-action-icon--heart,
  [data-social-like-button].is-unlike-pop .social-action-icon--heart {
    animation: none;
  }
}

/* Follow/unfollow feedback shared by profile, recommendations, hover cards and follow lists. */
[data-follow-toggle-button] {
  transform-origin: center;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

[data-follow-toggle-button].is-follow-tap {
  animation: kareta-follow-tap 170ms ease-out;
}

[data-follow-toggle-button].is-follow-state-pop {
  animation: kareta-follow-state-pop 340ms cubic-bezier(0.2, 0.9, 0.25, 1.12);
}

[data-follow-toggle-button].is-follow-state-off {
  animation: kareta-follow-state-off 300ms ease-out;
}

@keyframes kareta-follow-tap {
  0% { transform: scale(1); }
  42% { transform: scale(0.90); }
  72% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes kareta-follow-state-pop {
  0% { transform: scale(1); opacity: 1; }
  20% { transform: scale(0.86); opacity: 0.90; }
  48% { transform: scale(1.14); opacity: 1; }
  72% { transform: scale(0.97); opacity: 1; }
  86% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes kareta-follow-state-off {
  0% { transform: scale(1); opacity: 1; }
  38% { transform: scale(0.84); opacity: 0.78; }
  70% { transform: scale(1.07); opacity: 1; }
  86% { transform: scale(0.98); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  [data-follow-toggle-button].is-follow-tap,
  [data-follow-toggle-button].is-follow-state-pop,
  [data-follow-toggle-button].is-follow-state-off {
    animation: none;
  }
}
