/* Infit feed — dark theme (brand night + lime)
   Loaded after feed.css / profile.css / activity.css */

html.theme-dark {
  color-scheme: dark;
  --bg: #0c1210;
  --bg-soft: #0f1613;
  --surface: #141b18;
  --surface-2: #1a2420;
  --surface-3: #202c27;
  --border: #24352d;
  --border-strong: #31443b;
  --text: #f2f5f3;
  --text-muted: #93a099;
  --text-dim: #6b7871;
  --accent: #E2FF2D;
  --accent-text: #0c1210;
  --coral: #ff3b2f;
  --danger: #ff6b5a;
  --link: #9ad4ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

html.theme-dark,
html.theme-dark body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

/* Shell */
html.theme-dark .sidebar {
  background: var(--surface) !important;
  border-right-color: var(--border) !important;
}
html.theme-dark .nav-item { color: var(--text) !important; }
html.theme-dark .nav-item:hover,
html.theme-dark .nav-item.active { background: var(--surface-2) !important; }

/* Dark logo asset reads larger — match light theme visual size */
html.theme-dark .infit-logo-img {
  height: 17px !important;
}
html.theme-dark .sidebar-logo .infit-logo-img {
  height: 15px !important;
}
html.theme-dark .user-bar-brand .infit-logo-img {
  height: 15px !important;
}

html.theme-dark .feed-main { background: var(--bg); }

html.theme-dark .user-bar {
  background: rgba(12, 18, 16, 0.92) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
  backdrop-filter: blur(12px);
}
html.theme-dark .user-bar-name,
html.theme-dark .user-bar-login { color: var(--text) !important; }
html.theme-dark .user-bar-login:hover { color: var(--text-muted) !important; }

html.theme-dark .main-col,
html.theme-dark .feed-col,
html.theme-dark .profile-col {
  background: var(--bg-soft) !important;
  border-left-color: var(--border) !important;
  border-right-color: var(--border) !important;
}
html.theme-dark .feed-col {
  background: var(--bg) !important;
  border-left: none !important;
  border-right: none !important;
}

html.theme-dark .col-header,
html.theme-dark .feed-header {
  background: rgba(12, 18, 16, 0.92) !important;
  border-bottom-color: var(--border) !important;
  color: var(--text) !important;
}
html.theme-dark .feed-col .col-header,
html.theme-dark .feed-col .feed-header {
  background: rgba(20, 27, 24, 0.94) !important;
  border-color: var(--border) !important;
}

html.theme-dark .feed-tabs { background: var(--surface-2) !important; }
html.theme-dark .feed-tab { color: var(--text-muted) !important; }
html.theme-dark .feed-tab:hover { color: var(--text) !important; }
html.theme-dark .feed-tab.active {
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow) !important;
}

/* Posts / feed cards */
html.theme-dark .post {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text);
}
html.theme-dark .post:last-child { border-bottom-color: var(--border) !important; }
html.theme-dark .post-focus {
  box-shadow: 0 0 0 2px rgba(226, 255, 45, 0.92), 0 0 28px rgba(226, 255, 45, 0.24) !important;
}

html.theme-dark .username,
html.theme-dark .profile-name,
html.theme-dark .card-title,
html.theme-dark .edit-profile-title,
html.theme-dark .invite-block-title,
html.theme-dark .profile-progress-title,
html.theme-dark .workouts-month,
html.theme-dark .history-month {
  color: var(--text) !important;
}
html.theme-dark .username:hover { color: var(--accent) !important; }

html.theme-dark .handle,
html.theme-dark .meta,
html.theme-dark .time,
html.theme-dark .stat-label,
html.theme-dark .card-desc,
html.theme-dark .card-badge,
html.theme-dark .profile-handle,
html.theme-dark .profile-about,
html.theme-dark .invite-block-desc,
html.theme-dark .edit-hint,
html.theme-dark .edit-label,
html.theme-dark .edit-photo-label,
html.theme-dark .log-label,
html.theme-dark .stat-input-label,
html.theme-dark .empty,
html.theme-dark .empty-feed,
html.theme-dark .empty-feed p,
html.theme-dark .login-gate p,
html.theme-dark .comment-meta,
html.theme-dark .progress-hero-label,
html.theme-dark .progress-hero-range,
html.theme-dark .progress-summary-label,
html.theme-dark .workout-date,
html.theme-dark .workout-stat.is-empty,
html.theme-dark .hint,
html.theme-dark .auth-verify-hint {
  color: var(--text-muted) !important;
}

html.theme-dark .post-text,
html.theme-dark .comment-text,
html.theme-dark .progress-hero-value,
html.theme-dark .progress-summary-val,
html.theme-dark .stat-val,
html.theme-dark .workout-type,
html.theme-dark .workout-stat {
  color: var(--text) !important;
}

html.theme-dark .avatar,
html.theme-dark .comment-avatar,
html.theme-dark .profile-avatar,
html.theme-dark .social-avatar,
html.theme-dark .discover-avatar {
  border-color: var(--border) !important;
}
/* Initials avatars: keep tinted bg + dark text (wins over `a { color: inherit }`) */
html.theme-dark .av-purple,
html.theme-dark a.av-purple {
  background: #3c3489 !important;
  color: #eeedfe !important;
}
html.theme-dark .av-teal,
html.theme-dark a.av-teal {
  background: #0d6b56 !important;
  color: #e1f5ee !important;
}
html.theme-dark .av-coral,
html.theme-dark a.av-coral {
  background: #a34428 !important;
  color: #faece7 !important;
}
html.theme-dark .av-blue,
html.theme-dark a.av-blue {
  background: #1a5f9e !important;
  color: #e6f1fb !important;
}
html.theme-dark .av-green,
html.theme-dark a.av-green {
  background: #3d6b1c !important;
  color: #eaf3de !important;
}
html.theme-dark .avatar-has-photo,
html.theme-dark a.avatar-has-photo {
  background: #2a2a2a !important;
  color: transparent !important;
}

html.theme-dark .action {
  color: var(--text-muted) !important;
}
html.theme-dark .action:hover,
html.theme-dark .action.is-liked,
html.theme-dark .action.liked {
  color: var(--text) !important;
}
html.theme-dark .action-like {
  background: var(--surface-2) !important;
}
html.theme-dark .action-like:hover {
  background: var(--surface-3) !important;
}
html.theme-dark .action-like.liked {
  background: rgba(252, 82, 0, 0.16) !important;
  color: #ff8a4c !important;
}
html.theme-dark .action-delete:hover { color: var(--danger) !important; }
html.theme-dark .actions,
html.theme-dark .activity-card-actions {
  border-top: none !important;
}

html.theme-dark .post-imgs,
html.theme-dark .post-img {
  border-color: var(--border) !important;
  background: var(--surface-2) !important;
}

html.theme-dark .post-route-map {
  border-color: var(--border) !important;
}

/* Comments */
html.theme-dark .comments,
html.theme-dark .comment,
html.theme-dark .comment-compose {
  border-color: var(--border) !important;
  background: transparent;
}
html.theme-dark .comment-input,
html.theme-dark .form-input,
html.theme-dark .edit-input,
html.theme-dark .edit-textarea,
html.theme-dark .edit-toggle {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html.theme-dark .edit-toggle-title {
  color: var(--text) !important;
}
html.theme-dark .edit-toggle-desc {
  color: var(--text-muted) !important;
}
html.theme-dark .log-note,
html.theme-dark .stat-input,
html.theme-dark .auth-modal input,
html.theme-dark .auth-modal textarea,
html.theme-dark .auth-modal select {
  background: var(--surface-2) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
}
html.theme-dark .comment-input:focus,
html.theme-dark .form-input:focus,
html.theme-dark .edit-input:focus,
html.theme-dark .edit-textarea:focus,
html.theme-dark .log-note:focus {
  border-color: var(--accent) !important;
  background: var(--surface-3) !important;
}
html.theme-dark .form-input::placeholder,
html.theme-dark .log-note::placeholder,
html.theme-dark .comment-input::placeholder,
html.theme-dark .edit-textarea::placeholder {
  color: var(--text-dim) !important;
}

/* Buttons */
html.theme-dark .btn-dark,
html.theme-dark .btn-sm-primary,
html.theme-dark .post-btn,
html.theme-dark .edit-save-btn,
html.theme-dark .invite-copy-btn {
  background: var(--accent) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent) !important;
}
html.theme-dark .btn-dark:hover,
html.theme-dark .post-btn:hover,
html.theme-dark .edit-save-btn:hover {
  filter: brightness(1.05);
  background: #edff6a !important;
}
html.theme-dark .btn-outline-sm,
html.theme-dark .btn-sm-outline,
html.theme-dark .edit-file-btn {
  background: transparent !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
}
html.theme-dark .btn-outline-sm:hover,
html.theme-dark .btn-sm-outline:hover {
  background: var(--surface-2) !important;
  border-color: var(--accent) !important;
}
html.theme-dark #profile-edit-btn.is-active {
  background: var(--accent) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent) !important;
}

/* Right column cards */
html.theme-dark .right-col .card,
html.theme-dark .card,
html.theme-dark .invite-card,
html.theme-dark .invite-block,
html.theme-dark .discover-invite,
html.theme-dark .session-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text);
}
html.theme-dark .card-badge,
html.theme-dark .discover-invite-badge {
  background: var(--surface-2) !important;
  color: var(--accent) !important;
}
html.theme-dark .discover-invite-title {
  color: var(--text) !important;
}
html.theme-dark .discover-invite-desc {
  color: var(--text-muted) !important;
}

/* Tabs */
html.theme-dark .tabs {
  border-bottom-color: var(--border) !important;
  background: transparent;
}
html.theme-dark .tab { color: var(--text-muted) !important; }
html.theme-dark .tab.active {
  color: var(--text) !important;
  border-bottom-color: var(--accent) !important;
}

/* Profile */
html.theme-dark .profile-progress {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text);
}
html.theme-dark .progress-hero,
html.theme-dark .progress-summary-item {
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text);
}
html.theme-dark .progress-summary {
  gap: 8px !important;
}
html.theme-dark .progress-summary-item {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
}
html.theme-dark .workouts-toolbar,
html.theme-dark .workout-cal,
html.theme-dark .workout-row,
html.theme-dark .social-user-row,
html.theme-dark .profile-more-dropdown {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text);
}
html.theme-dark .notif-item {
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text);
}
html.theme-dark .progress-period-tabs {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
}
html.theme-dark .progress-period-tab,
html.theme-dark .progress-pill,
html.theme-dark .workouts-view-btn {
  background: transparent !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}
html.theme-dark .progress-pill {
  background: var(--surface-2) !important;
}
html.theme-dark .progress-period-tab.active,
html.theme-dark .progress-pill.active,
html.theme-dark .workouts-view-btn.active {
  background: var(--accent) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent) !important;
  box-shadow: none !important;
}
html.theme-dark .progress-chart {
  border-bottom-color: var(--border) !important;
}
html.theme-dark .progress-bar-track { background: transparent !important; }
html.theme-dark .progress-bar-fill {
  background: var(--surface-3) !important;
}
html.theme-dark .progress-bar-col.has-value .progress-bar-fill {
  background: #ff6a3d !important;
}
html.theme-dark .progress-bar-col.is-selected .progress-bar-fill {
  background: var(--accent) !important;
}
html.theme-dark .progress-bar-label { color: var(--text-dim) !important; }
html.theme-dark .progress-bar-col.is-selected .progress-bar-label {
  color: var(--text) !important;
}
html.theme-dark .progress-hero-value {
  color: var(--text) !important;
}

html.theme-dark .metrics,
html.theme-dark .metrics-compact,
html.theme-dark .activity-card-metrics {
  border: none !important;
  gap: 8px !important;
}
html.theme-dark .metric,
html.theme-dark .metrics-compact .metric {
  background: var(--surface-2) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
}
html.theme-dark .metric-val,
html.theme-dark .metrics-compact .metric-val {
  color: var(--text) !important;
}
html.theme-dark .metric-label,
html.theme-dark .metrics-compact .metric-label {
  color: var(--text-muted) !important;
}

/* Profile “Лента” activity cards (profile.css hardcodes light surfaces) */
html.theme-dark .activity-feed {
  background: var(--bg) !important;
}
html.theme-dark .activity-card,
html.theme-dark .profile-post {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
html.theme-dark .activity-card-emoji {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
}
html.theme-dark .activity-card-title,
html.theme-dark a.activity-card-title {
  color: var(--text) !important;
}
html.theme-dark .activity-card-title:hover,
html.theme-dark a.activity-card-title:hover {
  color: var(--accent) !important;
}
html.theme-dark .activity-card-date,
html.theme-dark .profile-post-meta,
html.theme-dark .profile-post-link {
  color: var(--text-muted) !important;
}
html.theme-dark .activity-card-text,
html.theme-dark .profile-post-text {
  color: var(--text) !important;
}
html.theme-dark .activity-badge {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html.theme-dark .workouts-month,
html.theme-dark .workouts-list,
html.theme-dark .workouts-view-toggle {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}
html.theme-dark .workouts-view-toggle {
  background: var(--surface-2) !important;
}

html.theme-dark .workout-cal-cell {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
html.theme-dark .workout-cal-cell.is-other { color: var(--text-dim) !important; opacity: 0.55; }
html.theme-dark .workout-cal-cell.is-today { border-color: var(--accent) !important; }
html.theme-dark .workout-cal-cell.is-selected,
html.theme-dark .workout-cal-cell.has-workouts.is-selected {
  background: rgba(226, 255, 45, 0.16) !important;
  border-color: var(--accent) !important;
}
html.theme-dark .workout-cal-nav-btn {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
html.theme-dark .workout-cal-cell.has-workouts {
  background: var(--surface-3) !important;
}
html.theme-dark .workout-cal-emoji {
  background: #2a3a32 !important;
  box-shadow: inset 0 0 0 1px var(--border-strong) !important;
  filter: saturate(1.3) contrast(1.2) brightness(1.15);
}
html.theme-dark .workout-cal-emoji.sport-running {
  background: #3a4a14 !important;
  box-shadow: inset 0 0 0 1px #6f8a20 !important;
}
html.theme-dark .workout-cal-emoji.sport-cycling {
  background: var(--accent) !important;
  color: var(--accent-text) !important;
  box-shadow: none !important;
  filter: none !important;
}
html.theme-dark .workout-emoji.sport-cycling {
  background: var(--accent) !important;
  color: var(--accent-text) !important;
  box-shadow: none !important;
  filter: none !important;
}
html.theme-dark .workout-cal-emoji.sport-walking {
  background: #2f3833 !important;
  box-shadow: inset 0 0 0 1px #5a6860 !important;
}
html.theme-dark .workout-cal-emoji.sport-swimming {
  background: #164844 !important;
  box-shadow: inset 0 0 0 1px #2f8a82 !important;
}
html.theme-dark .workout-cal-emoji.sport-strength {
  background: #4a2a16 !important;
  box-shadow: inset 0 0 0 1px #a85a28 !important;
}
html.theme-dark .workout-cal-emoji.sport-cardio {
  background: #4a1e2c !important;
  box-shadow: inset 0 0 0 1px #a84868 !important;
}
html.theme-dark .workout-cal-emoji.sport-mobility,
html.theme-dark .workout-cal-emoji.sport-meditation {
  background: #2e2450 !important;
  box-shadow: inset 0 0 0 1px #6a58b0 !important;
}
html.theme-dark .workout-cal-emoji.sport-martial_arts {
  background: #4a3210 !important;
  box-shadow: inset 0 0 0 1px #a87820 !important;
}
html.theme-dark .workout-cal-emoji.sport-sport,
html.theme-dark .workout-cal-emoji.sport-other {
  background: #2f4018 !important;
  box-shadow: inset 0 0 0 1px #6a8a28 !important;
}
html.theme-dark .workout-cal-more {
  color: var(--text-muted) !important;
}

html.theme-dark .workout-row:hover,
html.theme-dark .social-user-row:hover,
html.theme-dark .notif-item:hover {
  background: var(--surface-2) !important;
}

html.theme-dark .profile-more-btn {
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
  background: transparent !important;
}
html.theme-dark .profile-more-item {
  color: var(--text) !important;
}
html.theme-dark .profile-more-item:hover {
  background: var(--surface-2) !important;
}

html.theme-dark .post-more-btn {
  color: var(--text-muted) !important;
  background: transparent !important;
}
html.theme-dark .post-more-btn:hover {
  background: var(--surface-2) !important;
  color: var(--text) !important;
}
html.theme-dark .post-more-dropdown {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow) !important;
}
html.theme-dark .post-more-item {
  color: var(--text) !important;
}
html.theme-dark .post-more-item:hover {
  background: var(--surface-2) !important;
}
html.theme-dark .post-more-danger {
  color: var(--danger) !important;
}
html.theme-dark .post-more-danger:hover {
  background: rgba(255, 107, 90, 0.12) !important;
}

html.theme-dark .stats-row {
  border-top-color: var(--border) !important;
  border-bottom-color: var(--border) !important;
  gap: 10px !important;
  padding: 12px 0 !important;
}
html.theme-dark .stats-row .stat,
html.theme-dark .stats-row .stat-clickable {
  color: var(--text) !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 12px 8px !important;
}
html.theme-dark .stats-row .stat-val {
  color: var(--text) !important;
}
html.theme-dark .stats-row .stat-label {
  color: var(--text-muted) !important;
}
html.theme-dark .stat-clickable:hover {
  background: var(--surface-2) !important;
  border-color: var(--border-strong) !important;
}
html.theme-dark .stat-clickable:hover .stat-val {
  color: var(--accent) !important;
}

html.theme-dark .edit-profile-form,
html.theme-dark #tab-edit {
  background: var(--bg-soft);
  border-color: var(--border) !important;
}
html.theme-dark .edit-error,
html.theme-dark .auth-error {
  color: var(--danger) !important;
}

/* Activity log */
html.theme-dark .chip,
html.theme-dark .mood-btn,
html.theme-dark .visibility-btn {
  background: var(--surface) !important;
  border-color: var(--border-strong) !important;
  color: var(--text-muted) !important;
}
html.theme-dark .chip:hover,
html.theme-dark .mood-btn:hover,
html.theme-dark .visibility-btn:hover {
  border-color: var(--accent) !important;
  color: var(--text) !important;
}
html.theme-dark .chip.selected,
html.theme-dark .mood-btn.selected,
html.theme-dark .visibility-btn.selected {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--accent-text) !important;
}
html.theme-dark .mood-btn.selected span,
html.theme-dark .visibility-btn.selected span {
  color: var(--accent-text) !important;
}
html.theme-dark .stat-input-wrap {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
}
html.theme-dark .stat-input-wrap:focus-within {
  border-color: var(--accent) !important;
  background: var(--surface-3) !important;
}
html.theme-dark .media-thumb {
  border-color: var(--border) !important;
  background: var(--surface-2) !important;
}

/* Modals / overlays */
html.theme-dark .modal-overlay,
html.theme-dark .social-modal-overlay,
html.theme-dark .photo-viewer-overlay,
html.theme-dark .share-sheet-overlay {
  background: rgba(0, 0, 0, 0.72) !important;
}
html.theme-dark .modal,
html.theme-dark .social-modal,
html.theme-dark .share-sheet,
html.theme-dark .auth-modal .modal,
html.theme-dark #auth-modal .modal,
html.theme-dark #edit-post-modal .modal {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
html.theme-dark .modal-header,
html.theme-dark .social-modal-header,
html.theme-dark .share-sheet-header {
  border-bottom-color: var(--border) !important;
  color: var(--text) !important;
}
html.theme-dark .modal-close {
  color: var(--text-muted) !important;
}
html.theme-dark .modal-close:hover { color: var(--text) !important; }

html.theme-dark .auth-tabs,
html.theme-dark .auth-tab {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border);
}
html.theme-dark .auth-tab.active {
  background: var(--surface) !important;
  color: var(--text) !important;
}
html.theme-dark .auth-verify-note {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

html.theme-dark .edit-post-photo,
html.theme-dark .edit-post-existing {
  border-color: var(--border) !important;
}
html.theme-dark .edit-post-photo-remove {
  background: rgba(0, 0, 0, 0.7) !important;
  color: #fff !important;
}

/* Notifications / discover leftovers */
html.theme-dark .notif-item {
  background: transparent !important;
  border-bottom-color: var(--border) !important;
  color: var(--text) !important;
}
html.theme-dark .notif-item:hover {
  background: var(--surface-2) !important;
}
html.theme-dark .notif-item.notif-unread {
  background: rgba(226, 255, 45, 0.06) !important;
}
html.theme-dark .notif-item.notif-unread:hover {
  background: rgba(226, 255, 45, 0.1) !important;
}
html.theme-dark .notif-text {
  color: var(--text) !important;
}
html.theme-dark .notif-link {
  color: var(--accent) !important;
}
html.theme-dark .notif-link:hover {
  color: #edff6a !important;
}
html.theme-dark .notif-time {
  color: var(--text-muted) !important;
}
html.theme-dark .page-notifications .col-header span,
html.theme-dark .page-notifications .login-gate p,
html.theme-dark .page-notifications .empty-feed p {
  color: var(--text) !important;
}
html.theme-dark .page-notifications .login-gate p,
html.theme-dark .page-notifications .empty-feed p {
  color: var(--text-muted) !important;
}

html.theme-dark .discover-card,
html.theme-dark .discover-user {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html.theme-dark .discover-name { color: var(--text) !important; }
html.theme-dark .discover-name:hover { color: var(--accent) !important; }
html.theme-dark .discover-meta,
html.theme-dark .discover-desc { color: var(--text-muted) !important; }
html.theme-dark .discover-follow-btn.is-following {
  background: transparent !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
}

/* Bottom nav */
html.theme-dark .bottom-nav {
  background: rgba(12, 18, 16, 0.94) !important;
  border-top-color: var(--border) !important;
}
html.theme-dark .bottom-nav .nav-item { color: var(--text) !important; }
html.theme-dark .bottom-nav .nav-item.active,
html.theme-dark .bottom-nav .nav-item:hover {
  background: var(--surface-2) !important;
}

/* Toast */
html.theme-dark .toast {
  background: var(--surface-3) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

/* Lang switcher */
html.theme-dark .lang-switch,
html.theme-dark .lang-opt {
  color: var(--text-muted) !important;
}
html.theme-dark .lang-opt.active {
  color: var(--accent) !important;
}

/* Invite / banners */
html.theme-dark .invite-banner {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* Empty states / misc white panels */
html.theme-dark .empty-feed,
html.theme-dark .empty,
html.theme-dark .login-gate,
html.theme-dark .profile-preview-card,
html.theme-dark .profile-train-empty,
html.theme-dark .verify-card,
html.theme-dark .verify-page,
html.theme-dark .share-sheet-panel,
html.theme-dark .share-sheet-preview-wrap,
html.theme-dark .comment-box,
html.theme-dark .comments-panel,
html.theme-dark .stats-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html.theme-dark .stats-card-title {
  color: var(--text) !important;
}
html.theme-dark .stats-tile {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
}
html.theme-dark .stats-tile-val,
html.theme-dark .profile-stats-col .stats-tile-val,
html.theme-dark .profile-stats-col .stats-card-title,
html.theme-dark .profile-stats-col .stats-top-count {
  color: var(--text) !important;
}
html.theme-dark .stats-tile-label,
html.theme-dark .stats-top-types,
html.theme-dark .stats-top-row,
html.theme-dark .activity-history-link,
html.theme-dark .profile-stats-col .stats-tile-label,
html.theme-dark .profile-stats-col .stats-top-types {
  color: var(--text-muted) !important;
}

html.theme-dark .activity-gate {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

html.theme-dark .share-sheet-btn {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html.theme-dark .share-sheet-btn:hover {
  border-color: var(--accent) !important;
}
html.theme-dark .share-sheet-thumb {
  border-color: var(--border) !important;
  background: var(--surface-2) !important;
}
html.theme-dark .share-sheet-thumb.active {
  border-color: var(--accent) !important;
}

html.theme-dark .verify-card--ok,
html.theme-dark .verify-card--invalid {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}
html.theme-dark .verify-badge {
  background: rgba(226, 255, 45, 0.12) !important;
  color: var(--accent) !important;
}

/* Profile preview popover */
html.theme-dark .profile-preview-loading,
html.theme-dark .profile-preview-card {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
html.theme-dark .profile-preview-backdrop {
  background: rgba(0, 0, 0, 0.55) !important;
}
html.theme-dark .profile-preview-name,
html.theme-dark a.profile-preview-meta .profile-preview-name,
html.theme-dark .profile-preview-stats strong {
  color: var(--text) !important;
}
html.theme-dark .profile-preview-handle,
html.theme-dark .profile-preview-stats,
html.theme-dark .profile-preview-about,
html.theme-dark .profile-preview-loading {
  color: var(--text-muted) !important;
}
html.theme-dark .profile-preview-btn-primary {
  background: var(--accent) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent) !important;
}
html.theme-dark .profile-preview-btn-outline,
html.theme-dark .profile-preview-btn.profile-preview-open {
  background: transparent !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
}
html.theme-dark .profile-preview-btn-outline:hover,
html.theme-dark .profile-preview-btn.profile-preview-open:hover {
  background: var(--surface-2) !important;
  border-color: var(--accent) !important;
}
html.theme-dark .profile-preview-avatar-initials {
  border-color: var(--border) !important;
}

/* Soft tinted chips that were cream/pink on light theme */
html.theme-dark .visibility-public-hint,
html.theme-dark .invite-count {
  color: var(--accent) !important;
}

/* Links inside content */
html.theme-dark a { color: inherit; }
html.theme-dark .post-text a,
html.theme-dark .comment-text a {
  color: var(--link) !important;
}

/* Scrollbars (webkit) */
html.theme-dark *::-webkit-scrollbar { width: 10px; height: 10px; }
html.theme-dark *::-webkit-scrollbar-track { background: var(--bg); }
html.theme-dark *::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 8px;
}

html.theme-dark .workout-emoji {
  background: #2a3a32 !important;
  box-shadow: inset 0 0 0 1px var(--border-strong) !important;
  filter: saturate(1.25) contrast(1.15) brightness(1.12);
}
html.theme-dark .workout-emoji.sport-running {
  background: #3a4a14 !important;
  box-shadow: inset 0 0 0 1px #6f8a20 !important;
}
html.theme-dark .workout-emoji.sport-cycling {
  background: #1a3558 !important;
  box-shadow: inset 0 0 0 1px #3d6fa8 !important;
}
html.theme-dark .workout-emoji.sport-walking {
  background: #2f3833 !important;
  box-shadow: inset 0 0 0 1px #5a6860 !important;
}
html.theme-dark .workout-emoji.sport-swimming {
  background: #164844 !important;
  box-shadow: inset 0 0 0 1px #2f8a82 !important;
}
html.theme-dark .workout-emoji.sport-strength {
  background: #4a2a16 !important;
  box-shadow: inset 0 0 0 1px #a85a28 !important;
}
html.theme-dark .workout-emoji.sport-cardio {
  background: #4a1e2c !important;
  box-shadow: inset 0 0 0 1px #a84868 !important;
}
html.theme-dark .workout-emoji.sport-mobility,
html.theme-dark .workout-emoji.sport-meditation {
  background: #2e2450 !important;
  box-shadow: inset 0 0 0 1px #6a58b0 !important;
}
html.theme-dark .workout-emoji.sport-martial_arts {
  background: #4a3210 !important;
  box-shadow: inset 0 0 0 1px #a87820 !important;
}
html.theme-dark .workout-emoji.sport-sport,
html.theme-dark .workout-emoji.sport-other {
  background: #2f4018 !important;
  box-shadow: inset 0 0 0 1px #6a8a28 !important;
}

/* Profile Overview */
html.theme-dark .overview-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}
html.theme-dark .overview-card-title,
html.theme-dark .overview-metric-val,
html.theme-dark .overview-sport-name,
html.theme-dark .overview-pr-val,
html.theme-dark .overview-week-val {
  color: var(--text) !important;
}
html.theme-dark .overview-card-sub,
html.theme-dark .overview-metric-label,
html.theme-dark .overview-sport-summary,
html.theme-dark .overview-pr-label,
html.theme-dark .overview-week-sub,
html.theme-dark .overview-week-sep,
html.theme-dark .overview-heat-day-label {
  color: var(--text-muted) !important;
}
html.theme-dark .overview-heat-day {
  background: var(--surface-3) !important;
}
html.theme-dark .overview-heat-day.is-future {
  background: transparent !important;
  border-color: var(--border) !important;
}
html.theme-dark .overview-heat-day.sport-running,
html.theme-dark .overview-sport-bar-fill.sport-running,
html.theme-dark .overview-week-bar-fill {
  background: var(--accent) !important;
}
html.theme-dark .overview-heat-day.sport-cycling,
html.theme-dark .overview-sport-bar-fill.sport-cycling { background: #5b9dff !important; }
html.theme-dark .overview-heat-day.sport-walking,
html.theme-dark .overview-sport-bar-fill.sport-walking { background: #6b7871 !important; }
html.theme-dark .overview-heat-day.is-active:not([class*="sport-"]) { background: var(--accent) !important; }
html.theme-dark .overview-sport-bar,
html.theme-dark .overview-week-bar {
  background: var(--surface-3) !important;
}
html.theme-dark .overview-pr {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
}
html.theme-dark .overview-sport-bar-fill {
  background: var(--accent) !important;
}
