:root {
  --bg-image: url("../img/homeBackGround.png");
  --bg-base: #0E0D1A;
  --surface: #151428;
  --card: #1B1A33;
  --border: #2E2C55;
  --primary: #8B7CF6;
  --primary-strong: #6D5BE0;
  --glow: #4F46C8;
  --text-primary: #F2F1FA;
  --text-secondary: #B3B0D1;
  --text-on-primary: #0E0D1A;
  --shadow: rgba(7, 6, 20, 0.4);
  --soft-overlay: rgba(139, 124, 246, 0.16);
  --toggle-track: #2E2C55;
  --toggle-thumb: #F2F1FA;
  --app-dark-bg-image: url("../img/homeBackGroundDark.png");
  --login-dark-bg-image: url("../img/LoginBannerDark.png");
}

body {
  background-image: var(--bg-image);
  background-color: #f5f3f0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] {
  --bg-image: none;
  --bg: #0E0D1A;
  --surface: #151428;
  --card: #1B1A33;
  --border: #2E2C55;
  --primary: #8B7CF6;
  --primary-strong: #6D5BE0;
  --primary-strong-hover: color-mix(in srgb, var(--primary-strong) 96%, var(--bg) 4%);
  --glow: #4F46C8;
  --danger-solid: #D6003F;
  --danger-active: #A80032;
  --danger-fg: #FF5C85;
  --danger-on-solid: #FFFFFF;
  --success-fg: #6FE7A8;
  --warning-fg: #FFD166;
  --text: #F2F1FA;
  --text-2: #B3B0D1;
  --on-primary: var(--bg);
  --bg-base: var(--bg);
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --text-on-primary: var(--on-primary);
  --shadow: rgba(2, 2, 8, 0.12);
  --soft-overlay: rgba(139, 124, 246, 0.12);
  --toggle-track: var(--border);
  --toggle-thumb: var(--text);
  --workout-alert: #ff6b6b;
  --home-ink: var(--text);
  --home-muted: var(--text-2);
  --home-line: var(--border);
  --home-paper: var(--card);
  --home-accent: var(--primary);
  --home-accent-dark: var(--primary-strong);
  --home-soft: var(--surface);
  --muscle-ink: var(--text);
  --muscle-muted: var(--text-2);
  --muscle-line: var(--border);
  --muscle-accent: var(--primary-strong);
  --muscle-accent-hover: var(--primary);
  --muscle-soft: var(--card);
  --workout-ink: var(--text);
  --workout-muted: var(--text-2);
  --workout-line: var(--border);
  --workout-paper: var(--card);
  --workout-accent: var(--primary);
  --workout-accent-dark: var(--primary-strong);
  --workout-soft: var(--surface);
  --chart-series-1: #38BDF8;
  --chart-series-2: #FB7185;
  --chart-series-3: #34D399;
  --chart-series-4: #FBBF24;
  --chart-series-5: #A78BFA;
  --chart-series-6: #F97316;
  --chart-series-7: #2DD4BF;
  --chart-series-8: #E879F9;
  background-color: var(--bg-base);
  background-image: none;
  color: var(--text);
}

html[data-theme="dark"] body .initiative-achievements-page {
  --initiative-ranking-row-odd: var(--card);
  --initiative-ranking-row-even: var(--surface);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.7rem 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  background: var(--soft-overlay);
}

.theme-toggle:active {
  transform: scale(0.98);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.theme-toggle-track {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 28px;
  padding: 4px;
  border-radius: 999px;
  background: var(--toggle-track);
  border: 1px solid var(--border);
  box-sizing: border-box;
}

.theme-toggle-thumb {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--toggle-thumb);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transform: translateX(0);
  transition: transform 0.2s ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(24px);
}

.theme-toggle-label {
  font-size: 1rem;
  line-height: 1;
}

.nav-bar .theme-toggle {
  justify-self: end;
  margin-right: 1.5rem;
}

html[data-theme="dark"] .nav-bar,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .config-page,
html[data-theme="dark"] .config-bar,
html[data-theme="dark"] .config-help-center,
html[data-theme="dark"] .config-help-dialog,
html[data-theme="dark"] .config-alert-dialog,
html[data-theme="dark"] .deactivate-account-dialog,
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .home-section,
html[data-theme="dark"] .home-footer,
html[data-theme="dark"] .config-help-category,
html[data-theme="dark"] .admin-list-item,
html[data-theme="dark"] .config-form details,
html[data-theme="dark"] .config-form label,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .sidebar-content a,
html[data-theme="dark"] .sidebar-footer a {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text-primary);
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .nav-bar,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .config-page,
html[data-theme="dark"] .config-bar,
html[data-theme="dark"] .config-help-center,
html[data-theme="dark"] .home-section,
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .config-help-dialog,
html[data-theme="dark"] .config-alert-dialog,
html[data-theme="dark"] .deactivate-account-dialog,
html[data-theme="dark"] .admin-list-item,
html[data-theme="dark"] .notification-item {
  box-shadow: none;
}

html[data-theme="dark"] .sidebar-content a:hover,
html[data-theme="dark"] .sidebar-footer a:hover,
html[data-theme="dark"] .config-listItens:hover,
html[data-theme="dark"] .config-listItens.active,
html[data-theme="dark"] .notification-bell:hover,
html[data-theme="dark"] .notification-bell[aria-expanded="true"],
html[data-theme="dark"] .config-help-category:hover,
html[data-theme="dark"] .admin-actions-row button:hover,
html[data-theme="dark"] .admin-auditoria-tab:hover {
  background-color: var(--soft-overlay);
}

html[data-theme="dark"] .sidebar-linktext,
html[data-theme="dark"] .nav-bar a,
html[data-theme="dark"] .config-listLinks,
html[data-theme="dark"] .config-form h2,
html[data-theme="dark"] .config-overview h2,
html[data-theme="dark"] .config-help-center h1,
html[data-theme="dark"] .config-help-center h2,
html[data-theme="dark"] .home-section h2,
html[data-theme="dark"] .home-about-article-text h3,
html[data-theme="dark"] .notification-item h3,
html[data-theme="dark"] .notification-panel h2,
html[data-theme="dark"] .config-help-dialog h2,
html[data-theme="dark"] .config-alert-dialog h2,
html[data-theme="dark"] .deactivate-account-dialog h2,
html[data-theme="dark"] .config-form label,
html[data-theme="dark"] .home-link,
html[data-theme="dark"] .home-support-email-copy,
html[data-theme="dark"] .home-support-email-status,
html[data-theme="dark"] .notification-link,
html[data-theme="dark"] .notification-status,
html[data-theme="dark"] .admin-details,
html[data-theme="dark"] .admin-status,
html[data-theme="dark"] .config-form p,
html[data-theme="dark"] .config-overview p,
html[data-theme="dark"] .config-help-center p,
html[data-theme="dark"] .config-help-category p,
html[data-theme="dark"] .home-section p,
html[data-theme="dark"] .home-about-article-text p,
html[data-theme="dark"] .notification-empty,
html[data-theme="dark"] .notification-link p {
  color: var(--text-primary);
}

html[data-theme="dark"] .config-form input:not([type="radio"]):not([type="file"]),
html[data-theme="dark"] .admin-search-wrap input,
html[data-theme="dark"] .config-help-search input,
html[data-theme="dark"] .config-help-field input,
html[data-theme="dark"] .config-form textarea,
html[data-theme="dark"] .config-form select,
html[data-theme="dark"] .notification-panel input {
  background: var(--card);
  border-color: var(--border);
  color: var(--text-primary);
}

html[data-theme="dark"] .config-form input::placeholder,
html[data-theme="dark"] .config-help-search input::placeholder,
html[data-theme="dark"] .config-help-field input::placeholder {
  color: var(--text-secondary);
}

html[data-theme="dark"] .config-form > button,
html[data-theme="dark"] .config-help-button,
html[data-theme="dark"] .config-alert-action,
html[data-theme="dark"] .test-alert-button,
html[data-theme="dark"] .app-alert-button,
html[data-theme="dark"] .deactivate-account-confirm,
html[data-theme="dark"] .notification-accept,
html[data-theme="dark"] .config-help-copy,
html[data-theme="dark"] .home-cta a,
html[data-theme="dark"] #cadastro-link,
html[data-theme="dark"] #login-link,
html[data-theme="dark"] .admin-auditoria-tab.is-active {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: transparent;
}

html[data-theme="dark"] .config-form > button:hover,
html[data-theme="dark"] .config-help-button:hover,
html[data-theme="dark"] .config-alert-action:hover,
html[data-theme="dark"] .test-alert-button:hover,
html[data-theme="dark"] .app-alert-button:hover,
html[data-theme="dark"] .deactivate-account-confirm:hover,
html[data-theme="dark"] .notification-accept:hover,
html[data-theme="dark"] .config-help-copy:hover,
html[data-theme="dark"] .home-cta a:hover,
html[data-theme="dark"] #cadastro-link:hover,
html[data-theme="dark"] #login-link:hover,
html[data-theme="dark"] .admin-auditoria-tab.is-active:hover {
  background: var(--primary-strong-hover);
}

html[data-theme="dark"] .config-overview button,
html[data-theme="dark"] .deactivate-account-cancel,
html[data-theme="dark"] .notification-decline,
html[data-theme="dark"] .admin-actions-row button,
html[data-theme="dark"] .admin-link-btn,
html[data-theme="dark"] .admin-toggle-details,
html[data-theme="dark"] .config-alert-close,
html[data-theme="dark"] .config-help-close,
html[data-theme="dark"] .deactivate-account-close,
html[data-theme="dark"] .home-support-email-copy {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}

html[data-theme="dark"] .theme-toggle {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .theme-toggle-track {
  background: var(--toggle-track);
}

html[data-theme="dark"] .theme-toggle-thumb {
  background: var(--toggle-thumb);
}

html[data-theme="dark"] .notification-badge {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--bg-base);
}

html[data-theme="dark"] .notification-item.is-unread {
  border-left: 3px solid var(--primary);
  background: rgba(139, 124, 246, 0.08);
}

html[data-theme="dark"] .home-content {
  background: var(--bg-base);
}

html[data-theme="dark"] .home-section,
html[data-theme="dark"] .config-help-category,
html[data-theme="dark"] .config-help-dialog,
html[data-theme="dark"] .config-alert-dialog,
html[data-theme="dark"] .deactivate-account-dialog,
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .config-page,
html[data-theme="dark"] .config-help-center {
  background-color: var(--card);
}

html[data-theme="dark"] .home-footer,
html[data-theme="dark"] .nav-bar,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .config-bar,
html[data-theme="dark"] .sidebar {
  background-color: var(--surface);
}

html[data-theme="dark"] .theme-toggle:focus-visible,
html[data-theme="dark"] .notification-bell:focus-visible,
html[data-theme="dark"] .config-help-button:focus-visible,
html[data-theme="dark"] .config-form > button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

html[data-theme="dark"] *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html[data-theme="dark"] *::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--primary) 28%, transparent);
  border-radius: 10px;
  border: 2px solid var(--surface);
}

html[data-theme="dark"] *::-webkit-scrollbar-track {
  background: var(--surface);
}

html[data-theme="dark"] * {
  scrollbar-color: var(--primary) var(--surface);
}

html[data-theme="dark"] body {
  background-color: var(--bg-base);
  background-image: none;
  color: var(--text-2);
}

html[data-theme="dark"] body.app-shell-body {
  background-color: var(--bg-base);
  background-image: var(--app-dark-bg-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

html[data-theme="dark"] :is(
  .feed-post-menu,
  .profile-actions-dropdown,
  .conversation-menu,
  .config-help-dialog,
  .admin-toggle-details,
  .admin-config-page .audit-item .audit-field,
  .admin-config-page .audit-item .audit-detail-field,
  .admin-user-head img,
  .admin-post-media-wrap img,
  .admin-post-media-wrap video,
  .app-alert-dialog,
  .app-alert-button.secondary,
  .suspension-notice,
  .blocked-function-dialog,
  .banned-account-dialog,
  .admin-actions-row button,
  .admin-link-btn,
  .admin-auditoria-tab,
  .deactivate-account-dialog,
  .config-alert-dialog,
  .deactivate-account-dialog input[type="password"],
  .tips-search input,
  .article-not-found,
  .feed-post,
  .goal-form input,
  .body-data-dialog input,
  .training-chart-panel,
  .training-chart-filter,
  .body-data-dialog,
  .goal-edit-dialog,
  .reactivate-account-dialog,
  .initiative-redeem-code,
  .initiative-list-avatar,
  .initiative-list-type,
  .initiative-summary-image,
  .initiative-actions-menu-content,
  .initiative-room .initiative-actions-menu-content,
  .initiative-details .initiative-actions-menu-content,
  .initiative-room .initiative-actions-menu-content a,
  .initiative-room .initiative-actions-menu-content button,
  .initiative-details .initiative-actions-menu-content a,
  .initiative-details .initiative-actions-menu-content button,
  .initiative-actions-menu-content a,
  .initiative-actions-menu-content button,
  .initiative-room .initiative-actions-menu-content button.initiative-action-danger,
  .initiative-details .initiative-actions-menu-content button.initiative-action-danger,
  .initiative-actions-menu-content .initiative-action-danger,
  .initiative-invite-dialog,
  .initiative-invite-dialog-header button,
  .initiative-invite-results li,
  .initiative-chat-panel,
  .initiative-chat-header button,
  .initiative-chat-message,
  .initiative-chat-compose,
  .initiative-room-header-link > img,
  .initiative-room-avatar,
  .initiative-challenges-manage,
  .initiative-challenge-manage-actions a,
  .initiative-challenge-manage-actions button,
  .initiative-challenge-card-icon,
  .initiative-challenge-completed,
  .initiative-challenge-ranking-item,
  .initiative-challenge-ranking-item.is-first,
  .initiative-challenge-ranking-avatar,
  .initiative-achievements-link,
  .initiative-achievements-back-button,
  .initiative-achievements-table thead th,
  .initiative-achievements-table tbody tr.is-selected,
  .initiative-achievements-total,
  .initiative-achievement-category,
  .initiative-challenges-tabs,
  .initiative-achievement-medal-card,
  .initiative-medal-dialog,
  .initiative-medal-dialog-close,
  .initiative-medal-dialog-status,
  .initiative-medal-dialog-status.is-locked,
  .initiative-checkin-submit,
  .initiative-checkin-form .initiative-field input[type="file"],
  .initiative-checkin-form .initiative-field input[type="file"]::file-selector-button,
  .initiative-checkin-card,
  .initiative-checkin-image-link,
  .initiative-fixed-challenge-card,
  .initiative-challenge-form,
  .initiative-challenge-form .initiative-challenge-points-field input[type="number"],
  .initiative-challenge-management-heading > span,
  .initiative-challenge-manage-card,
  .initiative-challenge-manage-actions button,
  .initiative-details-image,
  .initiative-details-back,
  .initiative-form-error,
  .initiative-success-message,
  .initiative-type-option,
  .initiative-field input,
  .initiative-field textarea,
  .initiative-field select,
  .initiative-dates input,
  .initiative-cancel,
  .notification-item,
  .notification-empty,
  .notification-item.is-unread,
  .notification-actions button,
  .message-conversation,
  .conversation-header,
  .message-bubble.is-theirs,
  .message-compose,
  .blocked-conversation-notice,
  .message-compose textarea,
  .image-message-dialog textarea,
  .nickname-dialog input,
  .emoji-picker,
  .profile-nickname-dialog,
  .profile-nickname-cancel,
  .profile-top,
  .profile-avatar,
  .profile-follow-btn,
  .profile-tabs,
  .profile-workout-card,
  .profile-post-card,
  .profile-post-media,
  .profile-tag,
  .profile-dialog,
  .profile-user-item img,
  .profile-hidden-state,
  .image-message-dialog,
  .nickname-dialog,
  .config-form details,
  .config-form label,
  .admin-status,
  .admin-status-desativada,
  .admin-status-em-aberto,
  .admin-status-em-analise,
  .admin-status-concluida,
  .admin-action-success,
  .admin-action-error,
  .notification-toggle span,
  .app-alert-icon,
  .app-alert-close,
  .initiative-achievement-medal-card,
  .initiative-challenge-completed,
  .initiative-type-option:has(input:checked),
  .initiative-form-error,
  .fixed-workout-form-field input,
  .fixed-workout-form-field select,
  .fixed-workout-exercise-row input,
  .fixed-workout-exercise-suggestions,
  .fixed-workout-exercise-suggestion,
  .fixed-workout-edit-button,
  .fixed-workout-delete-button,
  .active-workout-card,
  .day-association-card,
  .planilha-settings input,
  .planilha-settings select,
  .planilha-settings textarea,
  .filter-panel input,
  .filter-panel select,
  .filter-panel .exercise-search,
  .group-filter-button,
  .group-filter-options,
  .exercise-card,
  .exercise-card.is-selected,
  .exercise-select,
  .share-dialog,
  .share-field,
  .scroll-picker-fields select,
  .session-exercise,
  .rest-dialog
) {
  background-color: var(--card);
  border-color: var(--border);
  color: var(--text-primary);
}

html[data-theme="dark"] :is(
  .feed-post-menu button:hover,
  .feed-post-menu a:hover,
  .profile-actions-dropdown button:hover,
  .profile-actions-dropdown a:hover,
  .conversation-menu button:hover:not(:disabled),
  .conversation-menu a:hover,
  .initiative-list-item:hover,
  .initiative-actions-menu > summary:hover,
  .initiative-actions-menu[open] > summary,
  .initiative-room .initiative-conversation-header > .initiative-actions-menu > summary,
  .initiative-details .initiative-details-header > .initiative-details-actions-menu > summary,
  .initiative-room .initiative-actions-menu-content a:hover,
  .initiative-room .initiative-actions-menu-content button:hover,
  .initiative-details .initiative-actions-menu-content a:hover,
  .initiative-details .initiative-actions-menu-content button:hover,
  .initiative-actions-menu-content a:hover,
  .initiative-actions-menu-content button:hover,
  .initiative-room .initiative-actions-menu-content button.initiative-action-danger:hover,
  .initiative-details .initiative-actions-menu-content button.initiative-action-danger:hover,
  .initiative-room .initiative-conversation-header > .initiative-actions-menu > summary:hover,
  .initiative-room .initiative-actions-menu[open] > summary,
  .initiative-details .initiative-details-header > .initiative-details-actions-menu > summary:hover,
  .initiative-details .initiative-details-actions-menu[open] > summary,
  .initiative-achievements-link:hover,
  .initiative-achievements-link:focus-visible,
  .initiative-achievements-back-button:hover,
  .initiative-achievements-back-button:focus-visible,
  .initiative-achievements-table tbody tr:hover,
  .initiative-challenge-back:hover,
  .initiative-challenge-back:focus-visible,
  .initiative-challenges-back:hover,
  .initiative-challenges-back:focus-visible,
  .initiative-challenges-manage:hover,
  .initiative-challenge-manage-actions a:hover,
  .initiative-challenge-manage-actions button:hover,
  .initiative-type-option:has(input:checked),
  .notification-item.is-unread,
  .profile-actions-button:hover,
  .profile-actions-dropdown button:hover,
  .profile-user-item:hover
) {
  background-color: var(--soft-overlay);
}

html[data-theme="dark"] :is(
  .config-form input,
  .config-form textarea,
  .config-form select,
  .tips-search input,
  .goal-form input,
  .body-data-dialog input,
  .training-chart-filter,
  .initiative-field input,
  .initiative-field textarea,
  .initiative-field select,
  .initiative-dates input,
  .message-compose textarea,
  .image-message-dialog textarea,
  .nickname-dialog input,
  .fixed-workout-form-field input,
  .fixed-workout-form-field select,
  .fixed-workout-exercise-row input,
  .planilha-settings input,
  .planilha-settings select,
  .planilha-settings textarea,
  .filter-panel input,
  .filter-panel select,
  .filter-panel .exercise-search,
  .exercise-select,
  .scroll-picker-fields select
)::placeholder {
  color: var(--text-secondary);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  accent-color: var(--primary);
}

html[data-theme="dark"] .toggle-switch::after {
  background-color: var(--toggle-thumb);
}

html[data-theme="dark"] .initiative-checkin-form .initiative-field input[type="file"]::file-selector-button {
  background-color: var(--card);
  border-color: var(--border);
  color: var(--text-primary);
}

html[data-theme="dark"] .login-page {
  background-color: var(--bg-base);
  background-image: var(--login-dark-bg-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

html[data-theme="dark"] body.public-help-body {
  background-color: var(--bg-base);
  background-image: none;
}

html[data-theme="dark"] .login-container {
  background: linear-gradient(90deg, transparent 0 50%, rgba(14, 13, 26, 0.7) 50% 100%);
  border-color: var(--border);
  color: var(--text-primary);
}

html[data-theme="dark"] .login-rdisplay,
html[data-theme="dark"] .input-group {
  background-color: var(--card);
  border-color: var(--border);
  color: var(--text-primary);
}

html[data-theme="dark"] .login-title,
html[data-theme="dark"] .form-label {
  color: var(--text-primary);
}

html[data-theme="dark"] .login-subtitle,
html[data-theme="dark"] .login-footer p,
html[data-theme="dark"] .form-link,
html[data-theme="dark"] .input-show {
  color: var(--text-secondary);
}

html[data-theme="dark"] .login-footer a {
  color: var(--primary);
}

html[data-theme="dark"] .form-input {
  background-color: var(--card);
  border-color: var(--border);
  color: var(--text-primary);
}

html[data-theme="dark"] .form-input::placeholder {
  color: var(--text-secondary);
}

html[data-theme="dark"] .form-button {
  background: var(--primary);
  color: var(--text-on-primary);
}

html[data-theme="dark"] .form-button:hover {
  background: var(--primary-strong-hover);
}

html[data-theme="dark"] .input-group:has(.invalido),
html[data-theme="dark"] .input-group:has(#emailUsuario.invalido),
html[data-theme="dark"] .input-group:has(#nomeUsuario.invalido),
html[data-theme="dark"] .input-group:has(#senhaUsuario.invalido) {
  border-color: var(--primary);
}

html[data-theme="dark"] .error-message,
html[data-theme="dark"] .input-group:has(.invalido) svg path {
  color: var(--primary);
  stroke: var(--primary);
  fill: var(--primary);
}

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary) !important;
}

html[data-theme="dark"] .public-help-body {
  color: var(--text-primary);
}

html[data-theme="dark"] .config-help-center,
html[data-theme="dark"] .config-help-article {
  --cfg-text: var(--text-primary);
  --cfg-muted: var(--text-secondary);
  --cfg-accent: var(--primary);
  --cfg-accent-hover: var(--primary-strong);
  --cfg-soft: var(--card);
  --cfg-border: var(--border);
  --cfg-surface: var(--card);
}

html[data-theme="dark"] .navbar,
html[data-theme="dark"] .nav-bar {
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .theme-toggle-thumb {
  box-shadow: 0 3px 10px var(--shadow);
}

html[data-theme="dark"] .sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: none;
}

html[data-theme="dark"] .sidebar-content a,
html[data-theme="dark"] .sidebar-footer a {
  background: transparent;
  color: var(--text);
}

html[data-theme="dark"] .sidebar-content a:hover,
html[data-theme="dark"] .sidebar-footer a:hover,
html[data-theme="dark"] .sidebar-content a.active,
html[data-theme="dark"] .sidebar-footer a.active {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .sidebar-linktext,
html[data-theme="dark"] .notification-bell {
  color: var(--text);
}

html[data-theme="dark"] .sidebar-icon {
  filter: brightness(0) invert(1);
}

.sidebar-icon-tips-dark {
  display: none;
}

html:not([data-theme="dark"]) .sidebar-content a.active[href="index.php?action=dicas"] {
  background: #e3ddf3;
  color: #230b49;
}

html[data-theme="dark"] .sidebar-icon-tips-dark {
  display: none;
}

html[data-theme="dark"] .sidebar-content a.active[href="index.php?action=dicas"] .sidebar-icon-tips-light {
  display: none;
}

html[data-theme="dark"] .sidebar-content a.active[href="index.php?action=dicas"] .sidebar-icon-tips-dark {
  display: block;
}

html[data-theme="dark"] .sidebar-content a.active[href="index.php?action=dicas"] .sidebar-icon {
  filter: none;
}

html[data-theme="dark"] .tips-search-icon {
  border-color: var(--primary);
}

html[data-theme="dark"] .tips-search-icon::after {
  background-color: var(--primary);
}

html[data-theme="dark"] :is(.article-back-link img, .exercise-search-icon, .planilha-back) {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] .principal-button {
  background-color: var(--text);
  background-image: none;
  -webkit-mask: url("../img/icons/star.png") center / 20px no-repeat;
  mask: url("../img/icons/star.png") center / 20px no-repeat;
}

html[data-theme="dark"] .fixed-workout-add {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .notification-bell svg {
  fill: currentColor;
  color: var(--text);
}

html[data-theme="dark"] .app-layout,
html[data-theme="dark"] .main-content {
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .home-content {
  background: var(--bg);
  box-shadow: none;
}

html[data-theme="dark"] :is(h1, h2, h3, h4, h5, h6),
html[data-theme="dark"] :is(.feed-post-header strong, .conversation-header, .profile-name) {
  color: var(--text);
}

html[data-theme="dark"] :is(
  .home-eyebrow,
  .workouts-eyebrow,
  .section-kicker,
  .config-eyebrow,
  .article-professional,
  .article-exercise-details dt
) {
  color: var(--primary);
}

html[data-theme="dark"] :is(
  .home-page,
  .workouts-page,
  .planilha-page,
  .day-association-page,
  .create-post-page,
  .feed-page,
  .article-page,
  .tips-page
) {
  color: var(--text-2);
}

html[data-theme="dark"] .create-post-page {
  --create-ink: var(--text);
  --create-muted: var(--text-2);
  --create-accent: var(--primary);
  --create-accent-hover: var(--primary-strong);
  --create-soft: var(--surface);
  --create-border: var(--border);
  --create-input-bg: var(--surface);
}

html[data-theme="dark"] .feed-page,
html[data-theme="dark"] .share-post-modal {
  --feed-ink: var(--text);
  --feed-muted: var(--text-2);
  --feed-accent: var(--primary);
  --feed-soft: var(--surface);
  --feed-border: var(--border);
}

html[data-theme="dark"] :is(
  .recent-workouts-tab,
  .goals-panel,
  .weight-panel,
  .training-chart-panel,
  .fixed-workouts-panel,
  .fixed-workout-card,
  .fixed-workout-exercises,
  .weekly-organization,
  .weekly-day,
  .workouts-empty-state,
  .workout-plan-card,
  .recent-workouts-empty,
  .recent-workout-item,
  .recent-workouts-back,
  .active-workout-card,
  .day-association-column,
  .day-association-card,
  .planilha-settings,
  .filter-panel,
  .filter-panel .exercise-search,
  .exercise-card,
  .exercise-sport-filter,
  .create-post-form,
  .upload-box,
  .media-preview-item,
  .form-grid input,
  .form-grid textarea,
  .tag-input,
  .tag-chip,
  .feed-post,
  .feed-comment-item,
  .feed-comment-form input,
  .feed-page .feed-post-menu,
  .share-post-dialog,
  .share-post-friend,
  .feed-empty,
  .article-content,
  .tips-search input,
  .config-page,
  .config-bar,
  .theme-toggle-box,
  .share-dialog,
  .body-data-dialog,
  .goal-edit-dialog,
  .reactivate-account-dialog,
  .fixed-workout-dialog,
  .workout-detail-dialog,
  .workout-share-dialog,
  .workout-import-dialog,
  .share-post-modal .share-post-dialog,
  .article-not-found
) {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]),
  textarea,
  select
) {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]),
  textarea,
  select
)::placeholder {
  color: var(--text-2);
}

html[data-theme="dark"] select option {
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] button,
html[data-theme="dark"] a {
  color: var(--text);
}

html[data-theme="dark"] :is(
  .home-section,
  .sidebar,
  .navbar,
  .config-page,
  .config-bar,
  .notification-panel,
  .notification-item,
  .admin-list-item,
  .recent-workouts-tab,
  .goals-panel,
  .weight-panel,
  .training-chart-panel,
  .fixed-workouts-panel,
  .fixed-workout-card,
  .weekly-organization,
  .weekly-day,
  .workouts-empty-state,
  .workout-plan-card,
  .active-workout-card,
  .day-association-column,
  .day-association-card,
  .create-post-form,
  .feed-post,
  .share-post-dialog,
  .article-content,
  .config-help-dialog,
  .config-alert-dialog,
  .deactivate-account-dialog,
  .reactivate-account-dialog
) {
  box-shadow: none;
}

html[data-theme="dark"] :is(
  .weekly-day,
  .day-association-column,
  .planilha-settings,
  .filter-panel,
  .filter-panel .exercise-search,
  .upload-box,
  .form-grid input,
  .form-grid textarea,
  .tag-input,
  .feed-comment-item,
  .feed-comment-form input,
  .share-post-friend,
  .tips-search input,
  .config-bar,
  .theme-toggle-box
) {
  background: var(--surface);
}

html[data-theme="dark"] :is(
  .goal-form input,
  .body-data-dialog input,
  .goal-edit-dialog input,
  .training-chart-filter,
  .fixed-workout-form-field input,
  .fixed-workout-form-field select,
  .fixed-workout-exercise-row input,
  .planilha-settings input,
  .planilha-settings select,
  .planilha-settings textarea,
  .filter-panel input,
  .filter-panel select,
  .filter-panel .exercise-search,
  .group-filter-button,
  .group-filter-options,
  .exercise-search input,
  .exercise-select,
  .workout-import-form input,
  .workout-import-form textarea,
  .workout-import-form select,
  .fixed-workout-form input,
  .fixed-workout-form textarea,
  .fixed-workout-form select
) {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(
  .fixed-workout-card details,
  .fixed-workout-card summary,
  .fixed-workout-open-hint,
  .workout-plan-details,
  .workout-plan-details summary,
  .weekly-day strong,
  .weekly-settings-button,
  .workouts-import-button,
  .workouts-secondary-button,
  .exercise-search,
  .filter-button,
  .exercise-sport-filter,
  .workout-plan-card small,
  .workout-plan-card p,
  .workouts-heading p,
  .workouts-empty-state p,
  .fixed-workout-professional,
  .fixed-workout-count,
  .fixed-workout-empty
) {
  color: var(--text-2);
}

html[data-theme="dark"] :is(
  .fixed-workout-category:hover,
  .fixed-workout-category.is-active,
  .exercise-sport-filter:hover,
  .exercise-sport-filter.is-active,
  .training-chart-filter[aria-pressed="true"],
  .workouts-create-button,
  .workouts-secondary-button:hover
) {
  background: var(--primary-strong-hover);
  border-color: var(--primary);
  color: var(--text);
}

html[data-theme="dark"] .workouts-import-button {
  border-color: var(--primary);
  color: var(--primary);
}

html[data-theme="dark"] .workouts-import-button:hover {
  background: var(--soft-overlay);
  color: var(--text);
}

html[data-theme="dark"] .fixed-workout-card details {
  border-color: var(--border);
}

html[data-theme="dark"] .workout-detail-page .workout-order-item {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .workout-detail-page .workout-order-copy span,
html[data-theme="dark"] .workout-detail-page .drag-handle {
  color: var(--text-2);
}

html[data-theme="dark"] .fixed-workout-add {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] :is(.fixed-workout-card summary, .workout-plan-details summary, .weekly-day strong, .weekly-settings-button, .fixed-workout-open-hint) {
  color: var(--primary);
}

html[data-theme="dark"] .workouts-secondary-button {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .create-post-form {
  background: var(--card);
  border-color: var(--border);
}

html[data-theme="dark"] .upload-box {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] :is(.primary-btn, .feed-comment-form button, .recent-workouts-button, .chart-edit-button, .body-data-submit, .goal-form button, .goal-edit-submit, .reactivate-account-back, .reactivate-account-dialog > button[type="submit"]) {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] :is(.primary-btn, .feed-comment-form button, .recent-workouts-button, .chart-edit-button, .body-data-submit, .goal-form button, .goal-edit-submit, .reactivate-account-back, .reactivate-account-dialog > button[type="submit"]):hover {
  background: var(--primary-strong-hover);
  color: var(--text);
}

html[data-theme="dark"] :is(.secondary-btn, .goal-edit-cancel, .feed-post-carousel-button, .feed-post-tag, .tag-chip, .exercise-sport-filter) {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .feed-post-buttons .feed-action-btn {
  color: var(--primary);
}

html[data-theme="dark"] :is(.feed-post-actions, .feed-comments, .feed-post-meta, .feed-comment-list) {
  color: var(--text-2);
}

html[data-theme="dark"] .feed-action-icon {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] .feed-post-carousel-button {
  border-color: var(--border);
}

html[data-theme="dark"] .feed-post-carousel-button:hover,
html[data-theme="dark"] .feed-action-btn:hover,
html[data-theme="dark"] .feed-action-btn.is-liked,
html[data-theme="dark"] .feed-action-btn.is-active {
  background: var(--soft-overlay);
}

html[data-theme="dark"] :is(.tips-heading, .tips-result a, .article-header h1, .article-introduction h2, .article-exercises > h2, .article-references h2, .article-exercise h3) {
  color: var(--text);
}

html[data-theme="dark"] :is(.tips-result-count, .tips-empty, .article-introduction p, .article-exercises-context, .article-exercise-image figcaption, .article-image-unavailable, .article-exercise-details dd, .article-not-found) {
  color: var(--text-2);
}

html[data-theme="dark"] :is(.tips-result a:hover, .tips-result a:focus-visible, .article-back-link, .article-references a) {
  color: var(--primary);
}

html[data-theme="dark"] :is(.tips-result, .tips-result:first-child) {
  border-color: var(--border);
}

html[data-theme="dark"] .tips-result a:hover,
html[data-theme="dark"] .tips-result a:focus-visible {
  background: var(--soft-overlay);
}

html[data-theme="dark"] :is(.tips-search input, .form-grid input, .form-grid textarea, .tag-input input, .feed-comment-form input, .share-post-friend, .exercise-search input, .planilha-settings input, .planilha-settings select, .planilha-settings textarea, .filter-panel input, .filter-panel select) {
  color: var(--text);
}

html[data-theme="dark"] :is(.tips-search input, .form-grid input, .form-grid textarea, .feed-comment-form input, .goal-form input, .body-data-dialog input, .goal-edit-dialog input, .share-field, .exercise-search input, .planilha-settings input, .planilha-settings select, .planilha-settings textarea, .filter-panel input, .filter-panel select)::placeholder {
  color: var(--text-2);
}

html[data-theme="dark"] .create-post-page .form-grid input[name="nomePost"]:focus,
html[data-theme="dark"] .create-post-page .form-grid input[name="nomePost"]:hover,
html[data-theme="dark"] .create-post-page .form-grid input[name="nomePost"]:active,
html[data-theme="dark"] .create-post-page .form-grid input[name="nomePost"]:-webkit-autofill,
html[data-theme="dark"] .create-post-page .form-grid input[name="nomePost"]:-webkit-autofill:hover,
html[data-theme="dark"] .create-post-page .form-grid input[name="nomePost"]:-webkit-autofill:focus,
html[data-theme="dark"] .create-post-page .form-grid input[name="nomePost"]:-webkit-autofill:active {
  background-color: var(--create-input-bg) !important;
  color: var(--create-ink) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--create-input-bg) inset !important;
  -webkit-text-fill-color: var(--create-ink) !important;
}

html[data-theme="dark"] :is(.config-form summary, .config-help-article-item summary) {
  appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

html[data-theme="dark"] .config-form details > label {
  background: transparent;
}

html[data-theme="dark"] :is(.config-form summary, .config-help-article-item summary):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

html[data-theme="dark"] .config-form details {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .theme-toggle-box {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(.config-page, .config-bar, .config-form, .config-overview) {
  color: var(--text);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] :is(.config-listItens:hover, .config-listItens.active) {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(.home-header h1, .home-page h2, .chart-summary strong, .volume-chart-label, .volume-chart-group .volume-chart-label > strong:first-child) {
  color: var(--text);
}

html[data-theme="dark"] .empty-goals {
  color: var(--text-2);
}

html[data-theme="dark"] :is(.empty-goals, .chart-info, .recent-workout-item span, .recent-workouts-empty) {
  color: var(--text-2);
}

html[data-theme="dark"] .muscle-avatar-base {
  mix-blend-mode: screen;
}

html[data-theme="dark"] .muscle-avatar-layer {
  mix-blend-mode: normal;
}

html[data-theme="dark"] .chart-axis {
  stroke: var(--border);
}

html[data-theme="dark"] #weightPoints circle,
html[data-theme="dark"] .training-load-point {
  fill: var(--primary);
  stroke: var(--card);
}

html[data-theme="dark"] .training-load-series-1 {
  fill: var(--chart-series-1);
  stroke: var(--chart-series-1);
}

html[data-theme="dark"] .training-load-series-2 {
  fill: var(--chart-series-2);
  stroke: var(--chart-series-2);
}

html[data-theme="dark"] .training-load-series-3 {
  fill: var(--chart-series-3);
  stroke: var(--chart-series-3);
}

html[data-theme="dark"] .training-load-series-4 {
  fill: var(--chart-series-4);
  stroke: var(--chart-series-4);
}

html[data-theme="dark"] .training-load-series-5 {
  fill: var(--chart-series-5);
  stroke: var(--chart-series-5);
}

html[data-theme="dark"] .training-load-series-6 {
  fill: var(--chart-series-6);
  stroke: var(--chart-series-6);
}

html[data-theme="dark"] .training-load-series-7 {
  fill: var(--chart-series-7);
  stroke: var(--chart-series-7);
}

html[data-theme="dark"] .training-load-series-8 {
  fill: var(--chart-series-8);
  stroke: var(--chart-series-8);
}

html[data-theme="dark"] .training-load-line {
  fill: none;
}

html[data-theme="dark"] .training-chart-axis-label,
html[data-theme="dark"] .training-chart-legend-item {
  color: var(--text-2);
  fill: var(--text-2);
}

html[data-theme="dark"] .volume-chart-track {
  background: var(--surface);
}

html[data-theme="dark"] .volume-chart-track span,
html[data-theme="dark"] .volume-chart-subgroup .volume-chart-track span {
  background: var(--primary);
}

html[data-theme="dark"] :is(.training-chart-filter, .goal-form input, .body-data-dialog input, .goal-edit-dialog input, .fixed-workout-form-field input, .fixed-workout-form-field select, .fixed-workout-exercise-row input, .planilha-settings input, .planilha-settings select, .planilha-settings textarea, .filter-panel input, .filter-panel select, .exercise-select, .workout-import-form input, .workout-import-form textarea, .workout-import-form select) {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .training-chart-filter[aria-pressed="true"] {
  background: var(--primary-strong-hover);
  border-color: var(--primary-strong-hover);
  color: var(--text);
}

html[data-theme="dark"] :is(.body-data-modal, .goal-edit-modal, .share-post-modal, .deactivated-account-overlay) {
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .reactivate-account-dialog .home-eyebrow {
  color: var(--primary);
}

html[data-theme="dark"] :is(.reactivate-account-dialog h2, .reactivate-account-dialog p, .reactivate-account-dialog label, .reactivate-account-dialog input, .reactivate-account-dialog .home-eyebrow) {
  color: var(--text);
}

html[data-theme="dark"] .reactivate-account-dialog input {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .reactivate-error {
  color: var(--primary);
}

html[data-theme="dark"] .workouts-page .workouts-import-button {
  color: var(--primary);
}

html[data-theme="dark"] .workouts-page .workouts-import-button:hover {
  color: var(--text);
}

html[data-theme="dark"] .feed-action-btn {
  color: var(--primary);
}

html[data-theme="dark"] .workouts-page .workouts-create-button {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .workouts-page .workouts-create-button:hover {
  background: var(--primary-strong-hover);
  color: var(--text);
}

html[data-theme="dark"] :is(
  .config-form > button:hover,
  .config-help-button:hover,
  .config-alert-action:hover,
  .test-alert-button:hover,
  .app-alert-button:hover,
  .deactivate-account-confirm:hover,
  .notification-accept:hover,
  .config-help-copy:hover,
  .home-cta a:hover,
  #cadastro-link:hover,
  #login-link:hover,
  .admin-auditoria-tab.is-active:hover
) {
  color: var(--text);
}

html[data-theme="dark"] {
  --message-ink: var(--text);
  --message-muted: var(--text-2);
  --message-line: var(--border);
  --message-accent: var(--primary);
  --message-send: var(--primary);
  --message-soft: var(--border);
}

html[data-theme="dark"] :is(
  .profile-shell,
  .messages-page,
  .initiative-list-page
) {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] :is(
  .profile-top,
  .messages-sidebar
) {
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] :is(
  .profile-tabs,
  .profile-content,
  .profile-workout-card,
  .profile-post-card,
  .profile-dialog,
  .profile-nickname-dialog,
  .messages-search,
  .message-conversation,
  .conversation-menu,
  .message-search-results,
  .image-message-dialog,
  .nickname-dialog,
  .initiative-redeem-code,
  .initiative-summary,
  .initiative-room,
  .initiative-details,
  .initiative-destination,
  .initiative-not-found,
  .initiative-invite-dialog,
  .initiative-chat-panel,
  .initiative-fixed-challenge-category,
  .initiative-challenge-manage-card
) {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] :is(
  .profile-content,
  .profile-tabs,
  .messages-page,
  .messages-search,
  .message-conversation,
  .initiative-list-page,
  .initiative-redeem-code
) {
  border-color: var(--border);
}

html[data-theme="dark"] .profile-tabs {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .profile-tabs a {
  color: var(--text-2);
}

html[data-theme="dark"] .profile-tabs a:hover {
  color: var(--text);
}

html[data-theme="dark"] .profile-tabs a.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

html[data-theme="dark"] :is(
  .profile-name,
  .profile-stat,
  .profile-post-body h3,
  .profile-workout-card h2,
  .profile-hidden-state h1,
  .profile-dialog h3,
  .profile-nickname-dialog h2,
  .messages-placeholder h2,
  .conversation-header-copy a,
  .conversation-name-link,
  .initiative-list-header h1,
  .initiative-list-copy strong,
  .initiative-list-empty strong,
  .initiative-summary-name,
  .initiative-summary-content h1,
  .initiative-conversation-header,
  .initiative-invite-dialog h2
) {
  color: var(--text);
}

html[data-theme="dark"] :is(
  .profile-post-body p,
  .profile-workout-card p,
  .profile-workout-card small,
  .profile-empty-state,
  .profile-hidden-state,
  .profile-nickname-dialog p,
  .conversation-copy small,
  .conversation-header-copy span,
  .conversation-muted,
  .messages-empty-sidebar,
  .messages-placeholder,
  .messages-placeholder p,
  .message-length,
  .message-bubble.is-theirs time,
  .message-bubble.is-mine time,
  .initiative-list-header p,
  .initiative-list-copy small,
  .initiative-list-empty p,
  .initiative-summary-dates,
  .initiative-fixed-challenge-card p,
  .initiative-fixed-challenges-empty
) {
  color: var(--text-2);
}

html[data-theme="dark"] .profile-workout-card {
  --profile-workout-alert: #ff6b6b;
}

html[data-theme="dark"] :is(
  .profile-post-card,
  .profile-workout-card,
  .profile-dialog,
  .profile-nickname-dialog
) {
  border: 1px solid var(--border);
}

html[data-theme="dark"] .profile-avatar-edit {
  border-color: var(--card);
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .profile-avatar-edit:hover {
  background: var(--primary-strong-hover);
  color: var(--text);
}

html[data-theme="dark"] .profile-avatar {
  border-color: var(--border);
  background: var(--surface);
}

html[data-theme="dark"] :is(
  .profile-actions-dropdown,
  .profile-actions-dropdown button:hover,
  .profile-actions-button:hover,
  .profile-user-item,
  .profile-nickname-cancel
) {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .profile-actions-dropdown button:hover,
html[data-theme="dark"] .profile-user-item:hover {
  background: var(--border);
}

html[data-theme="dark"] .profile-empty-state :is(svg, i) {
  color: var(--primary);
}

html[data-theme="dark"] .profile-message-btn,
html[data-theme="dark"] .profile-follow-btn.following {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .profile-message-btn:hover,
html[data-theme="dark"] .profile-follow-btn.following:hover {
  background: var(--primary-strong-hover);
  border-color: var(--primary);
  color: var(--text);
}

html[data-theme="dark"] .profile-follow-btn:not(.following) {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .profile-follow-btn:not(.following):hover {
  background: var(--border);
}

html[data-theme="dark"] .messages-search {
  border: 1px solid var(--border);
  color: var(--text-2);
}

html[data-theme="dark"] .messages-search:focus-within {
  border-color: var(--primary);
  background: var(--surface);
}

html[data-theme="dark"] .messages-search input {
  background: transparent;
  color: var(--text);
}

html[data-theme="dark"] .messages-search input::placeholder {
  color: var(--text-2);
}

html[data-theme="dark"] .conversation-list {
  background: transparent;
  border-color: var(--border);
}

html[data-theme="dark"] :is(
  .conversation-item,
  .message-search-results a
) {
  background: transparent;
  border-color: transparent;
  color: var(--text);
}

html[data-theme="dark"] :is(
  .conversation-item:hover,
  .conversation-item.is-active,
  .message-search-results a:hover
) {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .conversation-header {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}

html[data-theme="dark"] .message-bubble.is-mine {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .message-bubble.is-mine time {
  color: var(--on-primary);
}

html[data-theme="dark"] .message-bubble.is-theirs {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

html[data-theme="dark"] .message-bubble.is-theirs time {
  color: var(--text-2);
}

html[data-theme="dark"] .shared-post-message {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .shared-post-message span {
  color: var(--text-2);
}

html[data-theme="dark"] .shared-post-message strong {
  color: var(--primary);
}

html[data-theme="dark"] .message-compose {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(
  .message-compose textarea,
  .image-message-dialog textarea,
  .nickname-dialog input,
  .profile-nickname-dialog input
) {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .message-compose textarea {
  background: transparent !important;
  border-color: transparent;
}

html[data-theme="dark"] :is(
  .message-compose textarea,
  .image-message-dialog textarea,
  .nickname-dialog input,
  .profile-nickname-dialog input
)::placeholder {
  color: var(--text-2);
}

html[data-theme="dark"] :is(
  .conversation-menu button,
  .conversation-menu a,
  .image-message-dialog-header button
) {
  color: var(--text);
}

html[data-theme="dark"] .conversation-menu :is(button:hover:not(:disabled), a:hover) {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .conversation-menu button:disabled {
  color: color-mix(in srgb, var(--text-2) 60%, transparent);
}

html[data-theme="dark"] .send-message-button,
html[data-theme="dark"] .image-send-button,
html[data-theme="dark"] .compose-icon-button {
  background: #3e1e76;
  color: #fff;
}

html[data-theme="dark"] :is(.send-message-button, .image-send-button, .compose-icon-button):hover {
  background: #30165d;
  color: #fff;
}

html[data-theme="dark"] .blocked-conversation-notice {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

html[data-theme="dark"] :is(
  .image-message-modal,
  .nickname-modal,
  .profile-nickname-modal
) {
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .initiative-invite-dialog::backdrop {
  background: color-mix(in srgb, var(--bg) 76%, transparent);
}

html[data-theme="dark"] .messages-placeholder-icon {
  display: none;
}

.messages-placeholder-icon-svg {
  display: none;
}

html[data-theme="dark"] .messages-placeholder-icon-svg {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  color: var(--primary);
}

html[data-theme="dark"] .messages-placeholder h2 {
  color: var(--text);
}

html[data-theme="dark"] .initiative-list-page {
  border: 1px solid var(--border);
}

html[data-theme="dark"] .initiative-list-header .initiative-create-link {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .initiative-list-header .initiative-create-link:hover {
  background: var(--border);
}

html[data-theme="dark"] .initiative-list-header .initiative-create-plus {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .initiative-redeem-code {
  border: 1px solid var(--border);
}

html[data-theme="dark"] .initiative-redeem-code .config-eyebrow {
  color: var(--primary);
  font-weight: 700;
}

html[data-theme="dark"] .initiative-redeem-code .initiative-field input {
  background: var(--bg) !important;
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-redeem-code .initiative-field input::placeholder {
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-redeem-code .initiative-field input:focus {
  border-color: var(--primary);
  outline-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

html[data-theme="dark"] .initiative-list {
  border-color: var(--border);
  background: transparent;
}

html[data-theme="dark"] .initiative-list-item {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

html[data-theme="dark"] .initiative-list-item:hover {
  background: var(--border);
}

html[data-theme="dark"] .initiative-list-type {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-list-avatar {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(
  .initiative-summary-image,
  .initiative-fixed-challenge-difficulty,
  .initiative-fixed-challenge-card,
  .initiative-fixed-challenge-actions > strong,
  .initiative-fixed-challenges-empty,
  .initiative-type-option,
  .initiative-challenge-card,
  .initiative-checkin-card,
  .initiative-checkin-image-link,
  .initiative-challenge-ranking-item
) {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .initiative-fixed-challenge-category > h2::before {
  background: var(--primary);
}

html[data-theme="dark"] .initiative-fixed-challenge-difficulty h3 {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-fixed-challenge-actions > strong {
  color: var(--primary);
}

html[data-theme="dark"] .initiative-fixed-challenge-actions button,
html[data-theme="dark"] .initiative-submit {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] :is(
  .initiative-fixed-challenge-actions button:hover,
  .initiative-submit:hover
) {
  background: var(--primary-strong-hover);
  color: var(--text);
}

html[data-theme="dark"] .initiative-cancel {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-challenge-card p:not(.initiative-challenge-card-category),
html[data-theme="dark"] .initiative-checkin-card p {
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-type-option:has(input:checked),
html[data-theme="dark"] .initiative-challenge-ranking-item.is-first {
  background: var(--border);
  border-color: var(--primary);
}

html[data-theme="dark"] :is(.initiative-room, .initiative-details, .initiative-list-page) :is(a, button, input, textarea, select):focus-visible {
  outline-color: var(--primary);
}

html[data-theme="dark"] .config-page {
  --cfg-text: var(--text);
  --cfg-muted: var(--text-2);
  --cfg-accent: var(--primary);
  --cfg-accent-hover: var(--primary-strong-hover);
  --cfg-soft: color-mix(in srgb, var(--primary) 22%, transparent);
  --cfg-border: var(--border);
  --cfg-danger: var(--danger-fg);
  --cfg-surface: var(--card);
}

html[data-theme="dark"] .config-page .config-form :is(
  input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
  textarea,
  select
) {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .config-page .config-form :is(input, textarea, select)::placeholder {
  color: var(--text-2);
}

html[data-theme="dark"] .config-page .config-form :is(input, textarea, select):focus-visible {
  border-color: var(--primary);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--cfg-soft);
}

html[data-theme="dark"] .config-page .config-listItens:hover,
html[data-theme="dark"] .config-page .config-listItens.active,
html[data-theme="dark"] .config-page .config-listItens:focus-within {
  background: var(--border);
  color: var(--text);
  transform: scale(1.02);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

html[data-theme="dark"] .config-page .config-listItens:active {
  background: var(--border);
  transform: scale(0.99);
  transition: transform 0.1s ease;
}

html[data-theme="dark"] .config-page .config-listLinks {
  color: var(--text);
}

html[data-theme="dark"] .config-page .config-listLinks:focus-visible {
  border-radius: inherit;
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

html[data-theme="dark"] .config-page .config-form summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html[data-theme="dark"] .config-page .config-form details > label {
  background: transparent;
  color: var(--text);
}

html[data-theme="dark"] .config-page .notification-row {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

html[data-theme="dark"] .config-page .notification-row strong {
  color: var(--text);
  font-weight: 700;
}

html[data-theme="dark"] .config-page .notification-row p {
  color: var(--text-2);
}

html[data-theme="dark"] .config-page .notification-toggle {
  box-sizing: border-box;
  border: 1px solid var(--text-2);
  background: var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

html[data-theme="dark"] .config-page .notification-toggle span {
  background: var(--text-2);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

html[data-theme="dark"] body .config-page .config-form .notification-row .notification-toggle.notification-toggle:not(.is-on) span {
  background: var(--text-2);
}

html[data-theme="dark"] .config-page .notification-toggle.is-on,
html[data-theme="dark"] .config-page .notification-toggle[aria-checked="true"] {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

html[data-theme="dark"] .config-page .notification-toggle.is-on span,
html[data-theme="dark"] .config-page .notification-toggle[aria-checked="true"] span {
  background: var(--text);
}

html[data-theme="dark"] .config-page .notification-toggle:hover {
  background: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
}

html[data-theme="dark"] .config-page .notification-toggle.is-on:hover,
html[data-theme="dark"] .config-page .notification-toggle[aria-checked="true"]:hover {
  background: color-mix(in srgb, var(--primary-strong) 90%, var(--text) 10%);
}

html[data-theme="dark"] .config-page .notification-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html[data-theme="dark"] .config-page .notification-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .config-page .blocked-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--text-2);
}

html[data-theme="dark"] .config-page .blocked-account-item {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .config-page .blocked-account-item a,
html[data-theme="dark"] .config-page .blocked-account-item strong {
  color: var(--text);
}

html[data-theme="dark"] .config-page .blocked-account-item a:hover {
  color: var(--primary);
}

html[data-theme="dark"] .config-page .unblock-account {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
  transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] .config-page .unblock-account:hover,
html[data-theme="dark"] .config-page .unblock-account:active {
  border-color: var(--border);
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .config-page :is(.logout-button, .deactivate-account-trigger) {
  justify-content: center;
  align-items: center;
  background: transparent;
  border: 1px solid var(--danger-fg);
  color: var(--danger-fg);
  transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] .config-page :is(.logout-button, .deactivate-account-trigger) svg {
  color: currentColor;
  stroke: currentColor;
}

html[data-theme="dark"] .config-page .logout-button img {
  display: none;
}

html[data-theme="dark"] .config-page .logout-button .logout-theme-icon {
  display: block;
}

.logout-theme-icon {
  display: none;
}

html[data-theme="dark"] .config-page :is(.logout-button, .deactivate-account-trigger):hover {
  background: var(--danger-solid);
  border-color: var(--danger-solid);
  color: var(--danger-on-solid);
}

html[data-theme="dark"] .config-page :is(.logout-button, .deactivate-account-trigger):active {
  background: var(--danger-active);
  border-color: var(--danger-active);
  color: var(--danger-on-solid);
}

html[data-theme="dark"] .config-page :is(.logout-button, .deactivate-account-trigger):focus-visible {
  outline: 2px solid var(--danger-fg);
  outline-offset: 2px;
}

html[data-theme="dark"] .config-page :is(.logout-button, .deactivate-account-trigger):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .config-page .config-overview .deactivate-account-trigger {
  width: clamp(50px, 100%, 180px);
}

html[data-theme="dark"] .config-page :is(.config-form > button:not(.notification-toggle), .config-help-button, .test-alert-button, .config-alert-action, .config-help-copy) {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .config-page :is(.config-form > button:not(.notification-toggle), .config-help-button, .test-alert-button, .config-alert-action, .config-help-copy):hover {
  background: var(--primary-strong-hover);
  border-color: var(--primary-strong-hover);
  color: var(--text);
}

html[data-theme="dark"] .config-page :is(.config-form > button:not(.notification-toggle), .config-help-button, .test-alert-button, .config-alert-action, .config-help-copy):active {
  transform: scale(0.97);
}

html[data-theme="dark"] .config-page :is(
  .config-form > button:not(.notification-toggle),
  .config-help-button,
  .test-alert-button,
  .config-alert-action,
  .config-help-copy,
  .unblock-account
):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html[data-theme="dark"] .config-page :is(a, button, summary):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html[data-theme="dark"] .config-page :is(input, textarea, select, button):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .config-page :is(.config-form > button, .config-help-button, .test-alert-button, .config-alert-action):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .config-page .config-social-error,
html[data-theme="dark"] .config-page [role="alert"][data-alert-type="error"] {
  color: var(--danger-fg);
}

html[data-theme="dark"] :is(.deactivate-account-modal, .config-alert-modal, .config-help-modal) {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] :is(.deactivate-account-dialog, .config-alert-dialog, .config-help-dialog) {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(.deactivate-account-dialog p, .config-alert-dialog p, .config-help-dialog p) {
  color: var(--text-2);
}

html[data-theme="dark"] .deactivate-account-dialog input[type="password"] {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .deactivate-account-dialog input[type="password"]::placeholder {
  color: var(--text-2);
}

html[data-theme="dark"] :is(.deactivate-account-close, .config-alert-close, .config-help-close) {
  background: transparent;
  color: var(--text-2);
  transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] :is(.deactivate-account-close, .config-alert-close, .config-help-close):hover {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .deactivate-account-cancel {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .deactivate-account-cancel:hover {
  background: var(--border);
}

html[data-theme="dark"] .deactivate-account-confirm {
  background: var(--danger-solid);
  border-color: var(--danger-solid);
  color: var(--danger-on-solid);
  transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] .deactivate-account-confirm:hover {
  background: var(--danger-active);
  border-color: var(--danger-active);
}

html[data-theme="dark"] .deactivate-account-confirm:focus-visible {
  outline: 2px solid var(--danger-fg);
  outline-offset: 2px;
}

html[data-theme="dark"] :is(.deactivate-account-confirm, .deactivate-account-cancel):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .app-alert-dialog[data-type="error"] .app-alert-icon {
  background: color-mix(in srgb, var(--danger-solid) 18%, var(--card));
  border-color: var(--danger-fg);
  color: var(--danger-fg);
}

html[data-theme="dark"] .app-alert-dialog[data-type="warning"] .app-alert-icon {
  background: color-mix(in srgb, var(--warning-fg) 14%, var(--card));
  border-color: var(--warning-fg);
  color: var(--warning-fg);
}

html[data-theme="dark"] .app-alert-dialog[data-type="success"] .app-alert-icon {
  background: color-mix(in srgb, var(--success-fg) 14%, var(--card));
  border-color: var(--success-fg);
  color: var(--success-fg);
}

html[data-theme="dark"] .app-alert-dialog :is(.app-alert-message, .app-alert-title) {
  color: var(--text-2);
}

html[data-theme="dark"] .app-alert-dialog .app-alert-title {
  color: var(--text);
}

html[data-theme="dark"] .app-alert-dialog .app-alert-button {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .app-alert-dialog .app-alert-button:hover {
  background: var(--primary-strong-hover);
  color: var(--text);
}

html[data-theme="dark"] .app-alert-dialog .app-alert-button.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .app-alert-dialog .app-alert-button.secondary:hover {
  background: var(--border);
}

html[data-theme="dark"] .public-help-page {
  background: transparent;
}

html[data-theme="dark"] body.public-help-body .config-help-center {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .config-help-center,
html[data-theme="dark"] .config-help-article {
  --cfg-text: var(--text);
  --cfg-muted: var(--text-2);
  --cfg-accent: var(--primary);
  --cfg-accent-hover: var(--primary-strong);
  --cfg-soft: var(--surface);
  --cfg-border: var(--border);
  --cfg-surface: var(--card);
}

html[data-theme="dark"] .config-help-center-header > p,
html[data-theme="dark"] .config-help-category p,
html[data-theme="dark"] .config-help-article-header p,
html[data-theme="dark"] .config-help-search-context,
html[data-theme="dark"] .config-help-no-results {
  color: var(--text-2);
}

html[data-theme="dark"] .config-help-search {
  background: var(--card);
  border-color: var(--border);
  color: var(--text-2);
  box-shadow: none;
}

html[data-theme="dark"] .config-help-search input {
  background: transparent;
  color: var(--text);
}

html[data-theme="dark"] .config-help-center .config-help-search input {
  background: transparent !important;
}

html[data-theme="dark"] .config-help-search input::placeholder {
  color: var(--text-2);
}

html[data-theme="dark"] .config-help-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--soft-overlay);
}

html[data-theme="dark"] .config-help-category {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .config-help-article-item {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .config-help-article-item summary,
html[data-theme="dark"] .config-help-article-item .config-help-answer {
  color: var(--text);
}

html[data-theme="dark"] .config-help-article-item .config-help-answer {
  color: var(--text-2);
}

html[data-theme="dark"] .config-help-category:hover,
html[data-theme="dark"] .config-help-category:focus-visible {
  border-color: var(--primary);
  box-shadow: none;
}

html[data-theme="dark"] .config-help-category h2,
html[data-theme="dark"] .config-help-search-result h2 {
  color: var(--text);
}

html[data-theme="dark"] .config-help-search-result {
  background: var(--card);
  border-color: var(--border);
  box-shadow: none;
}

html[data-theme="dark"] .config-help-back {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .config-help-back:hover {
  background: var(--primary-strong-hover);
  color: var(--text);
}

html[data-theme="dark"] .config-help-back img {
  filter: brightness(0);
}

html[data-theme="dark"] body .profile-shell .profile-tabs a.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

html[data-theme="dark"] body .profile-shell .profile-tabs a:not(.active) {
  color: var(--text-2);
}

html[data-theme="dark"] body .profile-shell .profile-avatar-wrapper .profile-avatar-edit {
  border-color: var(--card);
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] body .profile-shell .profile-avatar-wrapper .profile-avatar-edit:hover {
  background: var(--primary-strong-hover);
  color: var(--text);
}

html[data-theme="dark"] body .messages-page .message-conversation {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .messages-page.messages-page .message-conversation {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .messages-page .message-conversation .conversation-header {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .messages-page .message-conversation .message-bubble.is-theirs {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .messages-page .message-conversation .message-compose {
  background: var(--bg);
  border-color: var(--border);
}

html[data-theme="dark"] body .messages-page .conversation-list .conversation-item.is-active,
html[data-theme="dark"] body .messages-page .conversation-list .conversation-item:hover {
  background: var(--border);
  border-color: var(--border);
}

html[data-theme="dark"] body .initiative-list-page .initiative-redeem-code {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] body .initiative-list-page .initiative-redeem-code.initiative-redeem-code {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] body .profile-shell .profile-tabs.profile-tabs {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] body.public-help-body .public-help-page .config-help-center.config-help-center {
  background: transparent;
  border: 0;
  box-shadow: none;
}

html[data-theme="dark"] :is(input, textarea, select):focus {
  border-color: var(--primary);
}

html[data-theme="dark"] :is(input, textarea, select, button, a):focus-visible {
  outline-color: var(--primary);
}

html[data-theme="dark"] :is(input, textarea, select, button):disabled {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

html[data-theme="dark"] :is(
  .initiative-room,
  .initiative-details,
  .initiative-list-page
) :is(a, button, input, textarea, select):focus-visible {
  outline-color: var(--primary);
}

html[data-theme="dark"] :is(.initiative-destination, .initiative-room, .initiative-details) .config-eyebrow {
  color: var(--primary);
}

html[data-theme="dark"] :is(
  .initiative-form-header h1,
  .initiative-type-option strong,
  .initiative-details-header h1,
  .initiative-details-row strong,
  .initiative-challenges-header h2,
  .initiative-challenge-management-heading h2,
  .initiative-challenge-ranking-header h2,
  .initiative-challenge-card h3,
  .initiative-challenge-manage-card h3,
  .initiative-challenge-page-header h1,
  .initiative-checkin-submit h2,
  .initiative-checkin-history h2,
  .initiative-checkin-card-copy strong,
  .initiative-challenges-page-header h1,
  .initiative-fixed-challenge-category > h2,
  .initiative-fixed-challenge-card h4,
  .initiative-challenge-form h2,
  .initiative-invitation h1,
  .initiative-not-found h1,
  .initiative-achievements-header h1,
  .initiative-achievements-scoreboard h2,
  .initiative-achievements-member-header h2,
  .initiative-achievement-category h3,
  .initiative-medal-dialog-content h2,
  .initiative-invite-dialog-header h2
) {
  color: var(--text);
}

html[data-theme="dark"] :is(
  .initiative-form-header p,
  .initiative-type-option small,
  .initiative-image-upload small,
  .initiative-dates label > span > span,
  .initiative-field > span small,
  .initiative-details-row,
  .initiative-details-row > span,
  .initiative-details-back,
  .initiative-challenges-empty,
  .initiative-challenge-no-description,
  .initiative-challenge-card p:not(.initiative-challenge-card-category),
  .initiative-challenge-manage-card p,
  .initiative-challenge-open,
  .initiative-challenge-ranking-header p,
  .initiative-challenge-ranking-position,
  .initiative-challenge-ranking-count,
  .initiative-challenge-ranking-count small,
  .initiative-challenge-reward-breakdown,
  .initiative-challenge-reward-breakdown strong,
  .initiative-challenge-page-header > p,
  .initiative-checkin-submit > div > p,
  .initiative-checkin-form .initiative-field small,
  .initiative-checkin-card-copy time,
  .initiative-checkin-card-copy p,
  .initiative-checkin-card-copy > span,
  .initiative-challenges-page-header p,
  .initiative-fixed-challenge-card p,
  .initiative-fixed-challenges-empty,
  .initiative-challenge-points-hint,
  .initiative-challenge-points-hint strong,
  .initiative-actions-note,
  .initiative-actions-menu-content .initiative-field > span,
  .initiative-invite-feedback,
  .initiative-email-invite-form + p,
  .initiative-share-link > small,
  .initiative-chat-header span,
  .initiative-chat-empty,
  .initiative-chat-status,
  .initiative-achievements-header p,
  .initiative-achievements-table thead th,
  .initiative-achievement-category > header > span,
  .initiative-achievement-medal-card > span:not(.initiative-achievement-medal-frame),
  .initiative-achievement-medal-card > small,
  .initiative-medal-dialog-content p
) {
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-form-header .config-eyebrow,
html[data-theme="dark"] .initiative-achievements-header .config-eyebrow,
html[data-theme="dark"] .initiative-achievements-scoreboard .config-eyebrow,
html[data-theme="dark"] .initiative-achievements-member-header .config-eyebrow {
  color: var(--primary);
}

html[data-theme="dark"] .initiative-type legend,
html[data-theme="dark"] .initiative-field > span,
html[data-theme="dark"] .initiative-dates label > span {
  color: var(--text);
}

html[data-theme="dark"] :is(
  .initiative-field input,
  .initiative-field textarea,
  .initiative-field select,
  .initiative-dates input,
  .initiative-challenge-form .initiative-challenge-points-field input[type="number"],
  .initiative-checkin-form .initiative-field input[type="file"],
  .initiative-chat-compose textarea,
  .initiative-actions-menu-content .initiative-field select
) {
  color-scheme: dark;
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(
  .initiative-field input,
  .initiative-field textarea,
  .initiative-field select,
  .initiative-dates input,
  .initiative-challenge-form .initiative-challenge-points-field input[type="number"],
  .initiative-checkin-form .initiative-field input[type="file"],
  .initiative-chat-compose textarea,
  .initiative-actions-menu-content .initiative-field select
)::placeholder {
  color: var(--text-2);
}

html[data-theme="dark"] :is(
  .initiative-field input,
  .initiative-field textarea,
  .initiative-field select,
  .initiative-dates input,
  .initiative-challenge-form .initiative-challenge-points-field input[type="number"],
  .initiative-checkin-form .initiative-field input[type="file"],
  .initiative-chat-compose textarea,
  .initiative-actions-menu-content .initiative-field select
):focus-visible {
  border-color: var(--primary);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: none;
}

html[data-theme="dark"] .initiative-type-option {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

html[data-theme="dark"] .initiative-type-option:hover {
  border-color: var(--text-2);
}

html[data-theme="dark"] .initiative-type-option:has(input:checked) {
  background: var(--border);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 24%, transparent);
}

html[data-theme="dark"] .initiative-type-option input {
  color-scheme: dark;
  accent-color: var(--primary);
}

html[data-theme="dark"] .initiative-type-option:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html[data-theme="dark"] .initiative-image-upload {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: none;
}

html[data-theme="dark"] .initiative-image-upload:hover {
  border-color: var(--text-2);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--glow) 18%, transparent);
}

html[data-theme="dark"] .initiative-image-upload label {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .initiative-image-upload label:hover {
  background: var(--primary-strong);
  color: var(--text);
}

html[data-theme="dark"] .initiative-image-upload:focus-within label {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

html[data-theme="dark"] .initiative-upload-icon {
  background: var(--on-primary);
  color: var(--primary);
}

html[data-theme="dark"] .initiative-image-upload img {
  border-color: var(--border);
}

html[data-theme="dark"] :is(.initiative-cancel, .initiative-challenges-manage, .initiative-details-back, .initiative-challenge-manage-actions a) {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

html[data-theme="dark"] :is(
  .initiative-cancel:hover,
  .initiative-challenges-manage:hover,
  .initiative-details-back:hover,
  .initiative-challenge-manage-actions a:hover
) {
  background: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
  border-color: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
  color: var(--text);
  text-decoration: none;
}

html[data-theme="dark"] .initiative-submit {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] .initiative-submit:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  color: var(--text);
}

html[data-theme="dark"] .initiative-submit:active {
  background: var(--primary-strong);
  color: var(--text);
}

html[data-theme="dark"] :is(.initiative-submit, .initiative-cancel, .initiative-challenges-manage, .initiative-details-back):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .initiative-destination a,
html[data-theme="dark"] .initiative-room a,
html[data-theme="dark"] .initiative-details a {
  color: var(--text);
}

html[data-theme="dark"] .initiative-room-back {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .initiative-room-back::before {
  position: absolute;
  width: 28px;
  height: 28px;
  background: currentColor;
  content: "";
  -webkit-mask: url("../img/icons/back.png") center / contain no-repeat;
  mask: url("../img/icons/back.png") center / contain no-repeat;
}

html[data-theme="dark"] .initiative-room-back:hover {
  background: var(--border);
  opacity: 1;
}

html[data-theme="dark"] .initiative-room-header-link {
  color: var(--text);
}

html[data-theme="dark"] .initiative-room-header-link .conversation-header-copy strong,
html[data-theme="dark"] .initiative-room-header-link:hover .conversation-header-copy strong {
  color: var(--text);
}

html[data-theme="dark"] .initiative-room-header-link .conversation-header-copy > span {
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-room-avatar,
html[data-theme="dark"] .initiative-challenge-ranking-avatar {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-room .initiative-conversation-header > .initiative-actions-menu > summary,
html[data-theme="dark"] .initiative-details .initiative-details-header > .initiative-details-actions-menu > summary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .initiative-room .initiative-conversation-header > .initiative-actions-menu > summary:hover,
html[data-theme="dark"] .initiative-room .initiative-conversation-header > .initiative-actions-menu[open] > summary,
html[data-theme="dark"] .initiative-details .initiative-details-header > .initiative-details-actions-menu > summary:hover,
html[data-theme="dark"] .initiative-details .initiative-details-header > .initiative-details-actions-menu[open] > summary {
  border-color: var(--border);
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-actions-menu-content,
html[data-theme="dark"] .initiative-room .initiative-actions-menu-content,
html[data-theme="dark"] .initiative-details .initiative-actions-menu-content {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--glow) 14%, transparent);
}

html[data-theme="dark"] .initiative-actions-menu-content a,
html[data-theme="dark"] .initiative-actions-menu-content button,
html[data-theme="dark"] .initiative-room .initiative-actions-menu-content a,
html[data-theme="dark"] .initiative-room .initiative-actions-menu-content button,
html[data-theme="dark"] .initiative-details .initiative-actions-menu-content a,
html[data-theme="dark"] .initiative-details .initiative-actions-menu-content button {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

html[data-theme="dark"] .initiative-actions-menu-content a:hover,
html[data-theme="dark"] .initiative-actions-menu-content button:hover,
html[data-theme="dark"] .initiative-room .initiative-actions-menu-content a:hover,
html[data-theme="dark"] .initiative-room .initiative-actions-menu-content button:hover,
html[data-theme="dark"] .initiative-details .initiative-actions-menu-content a:hover,
html[data-theme="dark"] .initiative-details .initiative-actions-menu-content button:hover {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-actions-menu-content .initiative-action-danger,
html[data-theme="dark"] .initiative-room .initiative-actions-menu-content button.initiative-action-danger,
html[data-theme="dark"] .initiative-details .initiative-actions-menu-content button.initiative-action-danger {
  background: transparent;
  border-color: var(--danger-fg);
  color: var(--danger-fg);
}

html[data-theme="dark"] .initiative-actions-menu-content .initiative-action-danger:hover,
html[data-theme="dark"] .initiative-room .initiative-actions-menu-content button.initiative-action-danger:hover,
html[data-theme="dark"] .initiative-details .initiative-actions-menu-content button.initiative-action-danger:hover {
  background: var(--danger-solid);
  border-color: var(--danger-solid);
  color: var(--danger-on-solid);
}

html[data-theme="dark"] .initiative-actions-menu-content .initiative-action-danger:active,
html[data-theme="dark"] .initiative-room .initiative-actions-menu-content button.initiative-action-danger:active,
html[data-theme="dark"] .initiative-details .initiative-actions-menu-content button.initiative-action-danger:active {
  background: var(--danger-active);
  border-color: var(--danger-active);
  color: var(--danger-on-solid);
}

html[data-theme="dark"] :is(
  .initiative-room,
  .initiative-details,
  .initiative-achievements-page,
  .initiative-destination
) :is(.initiative-actions-menu > summary, .initiative-actions-menu-content a, .initiative-actions-menu-content button):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html[data-theme="dark"] .initiative-room,
html[data-theme="dark"] .initiative-details {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] :is(.initiative-conversation-header, .initiative-details-header) {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(.initiative-details-row, .initiative-challenge-ranking, .initiative-share-link, .initiative-challenge-page-header) {
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-details-image {
  background: var(--border);
  box-shadow: none;
}

html[data-theme="dark"] .initiative-details-header > .config-eyebrow {
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-details-back {
  border: 1px solid var(--border);
}

html[data-theme="dark"] :is(.initiative-challenges-empty, .initiative-fixed-challenges-empty) {
  background: transparent;
  border-color: var(--border);
}

html[data-theme="dark"] :is(
  .initiative-challenge-card,
  .initiative-challenge-manage-card,
  .initiative-checkin-submit,
  .initiative-checkin-card,
  .initiative-challenge-form,
  .initiative-fixed-challenge-card
) {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .initiative-challenge-card:hover,
html[data-theme="dark"] .initiative-checkin-card:hover,
html[data-theme="dark"] .initiative-fixed-challenge-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--glow) 16%, transparent);
}

html[data-theme="dark"] .initiative-challenge-card-icon,
html[data-theme="dark"] .initiative-challenge-management-heading > span,
html[data-theme="dark"] .initiative-challenge-completed,
html[data-theme="dark"] .initiative-challenge-reward {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-challenge-card-category,
html[data-theme="dark"] .initiative-challenge-open,
html[data-theme="dark"] .initiative-challenge-reward-summary {
  color: var(--primary);
}

html[data-theme="dark"] .initiative-challenge-card h3,
html[data-theme="dark"] .initiative-challenge-reward-summary strong {
  color: var(--text);
}

html[data-theme="dark"] .initiative-challenge-ranking-item {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-challenge-ranking-item.is-first {
  background: var(--border);
  border-color: var(--primary);
}

html[data-theme="dark"] .initiative-challenge-ranking-item.is-last {
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-challenge-ranking-name {
  color: var(--text);
}

html[data-theme="dark"] .initiative-challenge-ranking-name a:hover {
  color: var(--primary);
}

html[data-theme="dark"] .initiative-challenge-ranking-avatar:focus-visible,
html[data-theme="dark"] .initiative-challenge-ranking-name a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

html[data-theme="dark"] :is(.initiative-challenges-manage, .initiative-challenge-manage-actions a, .initiative-challenge-manage-actions button) {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(.initiative-challenges-manage:hover, .initiative-challenge-manage-actions a:hover, .initiative-challenge-manage-actions button:hover) {
  background: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
  border-color: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
  color: var(--text);
}

html[data-theme="dark"] .initiative-challenge-manage-actions button {
  background: transparent;
  border-color: var(--danger-fg);
  color: var(--danger-fg);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

html[data-theme="dark"] .initiative-challenge-manage-actions button:hover {
  background: var(--danger-solid);
  border-color: var(--danger-solid);
  color: var(--danger-on-solid);
}

html[data-theme="dark"] .initiative-challenge-manage-actions button:active {
  background: var(--danger-active);
  border-color: var(--danger-active);
  color: var(--danger-on-solid);
}

html[data-theme="dark"] .initiative-checkin-form .initiative-field:has(input[type="file"]) {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-checkin-form .initiative-field input[type="file"]::file-selector-button {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-checkin-form .initiative-field input[type="file"]::file-selector-button:hover {
  background: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
}

html[data-theme="dark"] :is(.initiative-challenges-tabs, .initiative-challenges-tabs a.is-active) {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-destination .initiative-challenges-tabs a {
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-destination .initiative-challenges-tabs a:hover,
html[data-theme="dark"] .initiative-destination .initiative-challenges-tabs a:focus-visible,
html[data-theme="dark"] .initiative-destination .initiative-challenges-tabs a.is-active {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .initiative-destination .initiative-challenges-tabs a:hover {
  background: var(--primary-strong);
  color: var(--text);
}

html[data-theme="dark"] .initiative-fixed-challenge-category {
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-fixed-challenge-difficulty h3,
html[data-theme="dark"] .initiative-fixed-challenge-card strong {
  color: var(--primary);
}

html[data-theme="dark"] .initiative-challenge-form .initiative-challenge-points-field input[type="number"] {
  border-width: 1px;
  box-shadow: none;
}

html[data-theme="dark"] :is(.initiative-invite-dialog, .initiative-medal-dialog) {
  color-scheme: dark;
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--glow) 18%, transparent);
}

html[data-theme="dark"] :is(.initiative-invite-dialog, .initiative-medal-dialog)::backdrop {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .initiative-invite-dialog-header button,
html[data-theme="dark"] .initiative-chat-header button,
html[data-theme="dark"] .initiative-medal-dialog-close {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] :is(.initiative-invite-dialog-header button:hover, .initiative-chat-header button:hover, .initiative-medal-dialog-close:hover) {
  background: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
  color: var(--text);
}

html[data-theme="dark"] .initiative-invite-results li {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-invite-results button {
  background: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .initiative-invite-results button:hover:not(:disabled) {
  background: var(--primary-strong);
  color: var(--text);
}

html[data-theme="dark"] .initiative-invite-results button:disabled,
html[data-theme="dark"] .initiative-chat-compose > button:disabled,
html[data-theme="dark"] .initiative-invite-dialog :is(input, button):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .initiative-email-invite-form + p,
html[data-theme="dark"] .initiative-invite-dialog > p {
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-chat-toggle {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--glow) 22%, transparent);
}

html[data-theme="dark"] .initiative-chat-toggle:hover {
  background: var(--primary-strong);
  color: #fff;
}

html[data-theme="dark"] .initiative-chat-toggle:focus-visible,
html[data-theme="dark"] .initiative-chat button:focus-visible,
html[data-theme="dark"] .initiative-chat textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

html[data-theme="dark"] .initiative-chat-panel {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 16px 44px color-mix(in srgb, var(--glow) 18%, transparent);
}

html[data-theme="dark"] .initiative-chat-header,
html[data-theme="dark"] .initiative-chat-compose {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-chat-header strong {
  color: var(--text);
}

html[data-theme="dark"] .initiative-chat-messages {
  background: var(--bg);
}

html[data-theme="dark"] .initiative-chat-message {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-chat-message.is-mine {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .initiative-chat-message > strong {
  color: var(--primary);
}

html[data-theme="dark"] .initiative-chat-message.is-mine > strong {
  color: var(--on-primary);
}

html[data-theme="dark"] .initiative-chat-compose > button {
  background: var(--primary);
  color: #fff;
}

html[data-theme="dark"] .initiative-chat-compose > button:hover:not(:disabled) {
  background: var(--primary-strong);
  color: #fff;
}

html[data-theme="dark"] .initiative-chat-status {
  color: var(--danger-fg);
}

html[data-theme="dark"] .initiative-achievements-page {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] :is(.initiative-achievements-scoreboard, .initiative-achievements-detail) {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .initiative-achievements-table {
  color: var(--text);
}

html[data-theme="dark"] .initiative-achievements-table th,
html[data-theme="dark"] .initiative-achievements-table td {
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-achievements-table thead th {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-achievements-table tbody tr {
  background: transparent;
  color: var(--text);
}

html[data-theme="dark"] .initiative-achievements-table tbody tr:hover {
  background: var(--surface);
}

html[data-theme="dark"] .initiative-achievements-table tbody tr.is-selected {
  background: var(--border);
}

html[data-theme="dark"] .initiative-achievements-table tbody th > a {
  color: var(--primary);
  font-weight: 700;
}

html[data-theme="dark"] .initiative-achievements-table tbody td,
html[data-theme="dark"] .initiative-achievements-table tbody td strong {
  color: var(--text);
}

html[data-theme="dark"] .initiative-achievements-table tbody td strong {
  font-weight: 800;
}

html[data-theme="dark"] .initiative-achievements-total {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-achievement-category {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-achievement-medal-card {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-achievement-medal-card > strong {
  color: var(--text);
  font-weight: 700;
}

html[data-theme="dark"] .initiative-achievement-medal-card.is-locked {
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-achievement-medal-card:hover,
html[data-theme="dark"] .initiative-achievement-medal-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 6px 15px color-mix(in srgb, var(--glow) 18%, transparent);
}

html[data-theme="dark"] .initiative-achievement-medal-frame,
html[data-theme="dark"] .initiative-achievement-ouro.is-unlocked .initiative-achievement-medal-frame,
html[data-theme="dark"] .initiative-achievement-prata.is-unlocked .initiative-achievement-medal-frame,
html[data-theme="dark"] .initiative-achievement-diamante.is-unlocked .initiative-achievement-medal-frame {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-medal-dialog-content {
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] .initiative-medal-dialog-status,
html[data-theme="dark"] .initiative-medal-dialog-status.is-locked {
  background: var(--border);
  color: var(--text-2);
}

html[data-theme="dark"] .initiative-achievements-back-button {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-achievements-back-button:hover,
html[data-theme="dark"] .initiative-achievements-back-button:focus-visible {
  background: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
  border-color: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
  color: var(--text);
}

html[data-theme="dark"] .initiative-achievements-link {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .initiative-achievements-link:hover,
html[data-theme="dark"] .initiative-achievements-link:focus-visible {
  background: var(--border);
  border-color: var(--border);
}

html[data-theme="dark"] :is(.initiative-achievements-back-button, .initiative-achievement-medal-card, .initiative-ranking-medal):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

html[data-theme="dark"] .initiative-form-error,
html[data-theme="dark"] .initiative-actions-menu-content .initiative-action-danger {
  color: var(--danger-fg);
}

html[data-theme="dark"] .initiative-form-error {
  background: color-mix(in srgb, var(--danger-solid) 16%, var(--card));
  border: 1px solid var(--danger-fg);
}

html[data-theme="dark"] .initiative-success-message {
  background: var(--surface);
  border-color: var(--border);
  color: var(--success-fg);
}

html[data-theme="dark"] .initiative-destination :is(input, textarea, select, button):disabled,
html[data-theme="dark"] .initiative-room :is(input, textarea, select, button):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .config-page .blocked-empty {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

html[data-theme="dark"] .config-page .blocked-account-item {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .config-page .unblock-account {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

html[data-theme="dark"] .config-page .unblock-account:hover,
html[data-theme="dark"] .config-page .unblock-account:active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] .config-page .unblock-account:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html[data-theme="dark"] body .initiative-destination .initiative-type-options .initiative-type-option {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-destination .initiative-type-options .initiative-type-option:has(input:checked) {
  background: var(--border);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 24%, transparent);
}

html[data-theme="dark"] body .initiative-destination .initiative-type-options .initiative-type-option small {
  color: var(--text-2);
}

html[data-theme="dark"] body .initiative-room .initiative-room-content .initiative-challenge-grid .initiative-challenge-card .initiative-challenge-completed {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-room .initiative-room-content .initiative-challenge-ranking .initiative-challenge-ranking-list .initiative-challenge-ranking-item {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] body .initiative-room .initiative-room-content .initiative-challenge-ranking .initiative-challenge-ranking-list .initiative-challenge-ranking-item.is-first {
  background: var(--border);
  border-color: var(--primary);
}

html[data-theme="dark"] body .initiative-room .initiative-room-content .initiative-challenge-ranking .initiative-challenge-ranking-list .initiative-challenge-ranking-item .initiative-challenge-ranking-count {
  color: var(--text);
}

html[data-theme="dark"] body .initiative-room .initiative-room-content .initiative-challenge-ranking .initiative-challenge-ranking-list .initiative-challenge-ranking-item .initiative-challenge-ranking-count small {
  color: var(--text-2);
}

html[data-theme="dark"] body .initiative-room .initiative-chat .initiative-chat-panel .initiative-chat-messages .initiative-chat-message {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-room .initiative-chat .initiative-chat-panel .initiative-chat-messages .initiative-chat-message.is-mine {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

html[data-theme="dark"] body .initiative-room .initiative-chat .initiative-chat-panel .initiative-chat-messages .initiative-chat-message.is-mine > strong {
  color: var(--on-primary);
}

html[data-theme="dark"] body .initiative-room .initiative-chat .initiative-chat-panel .initiative-chat-compose {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] body .initiative-room .initiative-chat .initiative-chat-panel .initiative-chat-compose textarea {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-header .initiative-achievements-back-button {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-scoreboard .initiative-achievements-table thead th {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-scoreboard .initiative-achievements-table tbody tr {
  background: transparent;
  color: var(--text);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-scoreboard .initiative-achievements-table tbody tr:nth-child(odd) {
  background: var(--initiative-ranking-row-odd);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-scoreboard .initiative-achievements-table tbody tr:nth-child(even) {
  background: var(--initiative-ranking-row-even);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-scoreboard .initiative-achievements-table tbody tr:hover {
  background: var(--surface);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-scoreboard .initiative-achievements-table tbody tr.is-selected {
  background: var(--border);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-detail .initiative-achievements-member-header .initiative-achievements-total {
  background: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-detail .initiative-achievement-category {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-detail .initiative-achievement-category .initiative-achievement-medals .initiative-achievement-medal-card {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-detail .initiative-achievement-category .initiative-achievement-medals .initiative-achievement-medal-card > strong {
  color: var(--text);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-detail .initiative-achievement-category .initiative-achievement-medals .initiative-achievement-medal-card.is-locked {
  color: var(--text-2);
}

html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-detail .initiative-achievement-category .initiative-achievement-medals .initiative-achievement-medal-card:hover,
html[data-theme="dark"] body .initiative-achievements-page .initiative-achievements-detail .initiative-achievement-category .initiative-achievement-medals .initiative-achievement-medal-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 6px 15px color-mix(in srgb, var(--glow) 18%, transparent);
}

html[data-theme="dark"] body .initiative-room .initiative-challenges .initiative-challenges-header .initiative-challenges-manage,
html[data-theme="dark"] body .initiative-details .initiative-details-footer .initiative-details-back {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-room .initiative-challenges .initiative-challenges-header .initiative-challenges-manage:hover,
html[data-theme="dark"] body .initiative-details .initiative-details-footer .initiative-details-back:hover {
  background: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
  border-color: color-mix(in srgb, var(--border) 84%, var(--text) 16%);
  color: var(--text);
}

html[data-theme="dark"] body .initiative-destination .initiative-form .initiative-form-actions a.initiative-cancel,
html[data-theme="dark"] body .initiative-destination .initiative-challenge-form .initiative-form-actions a.initiative-cancel,
html[data-theme="dark"] body .initiative-challenges-page .initiative-challenges-page-header a.initiative-cancel {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .initiative-destination .initiative-invitation-link {
  background: var(--primary);
  color: var(--on-primary) !important;
}

html[data-theme="dark"] .initiative-fixed-challenges-page .initiative-challenges-back {
  background-color: #fff;
}

html[data-theme="dark"] .initiative-fixed-challenges-page .initiative-challenges-back::before {
  background-color: #3e1e76;
}

html[data-theme="dark"] .initiative-fixed-challenges-page .initiative-challenges-back:hover,
html[data-theme="dark"] .initiative-fixed-challenges-page .initiative-challenges-back:focus-visible {
  background-color: #e3ddf3;
}

html[data-theme="dark"] .initiative-challenges-page:not(.initiative-fixed-challenges-page) > .initiative-challenges-back {
  position: relative;
  background-color: #fff;
  background-image: none;
}

html[data-theme="dark"] .initiative-challenges-page:not(.initiative-fixed-challenges-page) > .initiative-challenges-back::before {
  width: 24px;
  height: 24px;
  background-color: #3e1e76;
  content: "";
  -webkit-mask: url("../img/icons/back.png") center / contain no-repeat;
  mask: url("../img/icons/back.png") center / contain no-repeat;
}

html[data-theme="dark"] .initiative-challenges-page:not(.initiative-fixed-challenges-page) > .initiative-challenges-back:hover,
html[data-theme="dark"] .initiative-challenges-page:not(.initiative-fixed-challenges-page) > .initiative-challenges-back:focus-visible {
  background-color: #e3ddf3;
}

html[data-theme="dark"] .initiative-challenge-back {
  background-color: #fff;
}

html[data-theme="dark"] .initiative-challenge-back::before {
  background-color: #230b49;
}

html[data-theme="dark"] .initiative-challenge-back:hover,
html[data-theme="dark"] .initiative-challenge-back:focus-visible {
  background-color: var(--border);
}

html[data-theme="dark"] :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="color"]):not([type="range"]),
  textarea,
  select
),
html[data-theme="dark"] :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="color"]):not([type="range"]),
  textarea,
  select
):is(:hover, :focus, :active, :autofill):not(:where(.create-post-page .form-grid input[name="nomePost"])) {
  background-color: var(--surface) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
}

html[data-theme="dark"] :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="color"]):not([type="range"]),
  textarea,
  select
)::placeholder {
  color: var(--text-2) !important;
  -webkit-text-fill-color: var(--text-2) !important;
  opacity: 1;
}

html[data-theme="dark"] :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="color"]):not([type="range"]),
  textarea
):is(:autofill, :-webkit-autofill, :-webkit-autofill:hover, :-webkit-autofill:focus):not(:where(.create-post-page .form-grid input[name="nomePost"])) {
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset !important;
}

html[data-theme="dark"] select option {
  background-color: var(--surface);
  color: var(--text);
}
