/* Day / Night theme tokens and light-mode surface overrides */

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --theme-bg: #000000;
  --theme-bg-elevated: #111111;
  --theme-surface: rgba(255, 255, 255, 0.04);
  --theme-surface-strong: rgba(18, 18, 18, 0.96);
  --theme-text: #ffffff;
  --theme-text-muted: rgba(255, 255, 255, 0.7);
  --theme-border: rgba(255, 188, 0, 0.22);
  --theme-nav-bg: #000000;
  --theme-footer-bg: #050505;
  --theme-hero-frame-a: rgba(255, 193, 7, 0.18);
  --theme-hero-frame-b: rgba(18, 18, 18, 0.92);
  --theme-hero-frame-c: rgba(8, 8, 8, 0.94);
  --theme-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --mb-card: rgba(255, 255, 255, 0.04);
  --mb-card-border: rgba(255, 188, 0, 0.22);
  --mb-muted: rgba(255, 255, 255, 0.7);
  --mb-surface: #111;
}

html[data-theme="light"] {
  color-scheme: light;
  --color-secondary: #f4f5f7;
  --color-white: #121212;
  --color-text: #121212;
  --color-text-secondary: #5c5c5c;
  --color-border: rgba(0, 0, 0, 0.1);
  --theme-bg: #f3f4f6;
  --theme-bg-elevated: #ffffff;
  --theme-surface: #ffffff;
  --theme-surface-strong: #ffffff;
  --theme-text: #121212;
  --theme-text-muted: #5c5c5c;
  --theme-border: rgba(180, 130, 0, 0.35);
  --theme-nav-bg: rgba(255, 255, 255, 0.94);
  --theme-footer-bg: #eceef2;
  --theme-hero-frame-a: rgba(255, 193, 7, 0.12);
  --theme-hero-frame-b: #ffffff;
  --theme-hero-frame-c: #ffffff;
  --theme-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  --mb-card: #ffffff;
  --mb-card-border: rgba(180, 130, 0, 0.28);
  --mb-muted: #5c5c5c;
  --mb-surface: #ffffff;
}

html[data-theme="light"] body {
  background-color: var(--theme-bg);
  color: var(--theme-text);
}

html[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
}

html[data-theme="light"] .navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
}

.navbar.is-scrolled {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .nav-links a,
html[data-theme="light"] .nav-more-btn,
html[data-theme="light"] .nav-logo-tag,
html[data-theme="light"] .mobile-menu-btn {
  color: #1a1a1a;
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-more-btn:hover,
html[data-theme="light"] .nav-more.is-open .nav-more-btn {
  color: var(--color-primary-dark);
}

html[data-theme="light"] .nav-logo svg path[fill="white"] {
  fill: #111111;
}

html[data-theme="light"] .lang-btn {
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .lang-btn.active,
html[data-theme="light"] .theme-toggle.is-night {
  background: var(--color-primary);
  color: #111;
  border-color: var(--color-primary);
}

html[data-theme="light"] .btn-outline {
  color: #1a1a1a;
  border-color: var(--color-primary);
}

html[data-theme="light"] .btn-outline:hover {
  background: var(--color-primary);
  color: #111;
}

html[data-theme="light"] .section,
html[data-theme="light"] .section-alt,
html[data-theme="light"] .managers-page,
html[data-theme="light"] .contact-page {
  background: var(--theme-bg);
}

html[data-theme="light"] .verdict-score {
  background: rgba(255, 193, 7, 0.12);
  border-color: rgba(180, 130, 0, 0.35);
  color: #121212;
}

html[data-theme="light"] .verdict-label {
  color: #5c5c5c;
}

html[data-theme="light"] .verdict-value {
  color: var(--color-primary-dark, #c99700);
}

html[data-theme="light"] .verdict-badge {
  color: #1a1a1a;
}

html[data-theme="light"] .verdict-body h3 {
  color: #121212;
}

html[data-theme="light"] .verdict-body p {
  color: #5c5c5c;
}

html[data-theme="light"][dir="rtl"] .verdict-score,
html[data-theme="light"][lang="ar"] .verdict-score {
  color: #121212;
}

html[data-theme="light"][dir="rtl"] .verdict-label,
html[data-theme="light"][lang="ar"] .verdict-label {
  color: #5c5c5c;
}

html[data-theme="light"][dir="rtl"] .verdict-badge,
html[data-theme="light"][lang="ar"] .verdict-badge {
  color: #1a1a1a;
}

html[data-theme="light"] .section-title h1,
html[data-theme="light"] .section-title h2,
html[data-theme="light"] .section-title h3,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] .stat-label,
html[data-theme="light"] .manager-expand-meta h2,
html[data-theme="light"] .manager-section-title,
html[data-theme="light"] .footer-heading,
html[data-theme="light"] .footer-copy,
html[data-theme="light"] .faq-question,
html[data-theme="light"] .review-name,
html[data-theme="light"] .card {
  color: var(--theme-text);
}

html[data-theme="light"] .faq .faq-answer,
html[data-theme="light"] .faq .faq-answer p {
  color: var(--theme-text-muted);
}

html[data-theme="light"] .stat-number {
  color: var(--color-primary);
}

html[data-theme="light"] .tool-card h3 {
  color: var(--color-primary);
}

html[data-theme="light"] .tool-card:hover,
html[data-theme="light"] .tool-card:focus-within {
  border-color: rgba(180, 130, 0, 0.45);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 188, 0, 0.16);
  background: #fff;
}

html[data-theme="light"] .tool-card:hover .tool-card-icon img,
html[data-theme="light"] .tool-card:focus-within .tool-card-icon img {
  filter: drop-shadow(0 12px 20px rgba(255, 188, 0, 0.28));
}

html[data-theme="light"] .section-title p,
html[data-theme="light"] p,
html[data-theme="light"] .stat-desc,
html[data-theme="light"] .manager-expand-meta p,
html[data-theme="light"] .manager-bio,
html[data-theme="light"] .footer-tagline,
html[data-theme="light"] .footer-responsible,
html[data-theme="light"] .managers-status,
html[data-theme="light"] .manager-empty {
  color: var(--theme-text-muted);
}

html[data-theme="light"] .card,
html[data-theme="light"] .manager-expand,
html[data-theme="light"] .manager-tip,
html[data-theme="light"] .manager-comment,
html[data-theme="light"] .faq-item,
html[data-theme="light"] .review-card,
html[data-theme="light"] .terms-glass,
html[data-theme="light"] .nav-more-menu {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
}

html[data-theme="light"] .terms-glass.is-active,
html[data-theme="light"] .terms-glass:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  box-shadow: var(--theme-shadow);
}

html[data-theme="light"] .manager-expand[open] {
  border-color: rgba(180, 130, 0, 0.45);
  background: #fffdf6;
}

html[data-theme="light"] .manager-expand-body {
  border-top-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .manager-expand-rating span {
  color: #6b6b6b;
}

html[data-theme="light"] .manager-tip p {
  color: #444;
}

html[data-theme="light"] .manager-review-form {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(180, 130, 0, 0.28);
}

html[data-theme="light"] .manager-review-form label {
  color: #333;
}

html[data-theme="light"] .manager-stars button {
  border-color: rgba(0, 0, 0, 0.14);
  background: #fff;
  color: rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] .manager-stars button.is-on {
  color: #8a6a00;
  border-color: rgba(180, 130, 0, 0.45);
  background: rgba(255, 193, 7, 0.14);
}

html[data-theme="light"] .manager-comment {
  background: #f7f7f8;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: none;
}

html[data-theme="light"] .manager-comment-head strong {
  color: #121212;
}

html[data-theme="light"] .manager-comment p {
  color: #333;
}

html[data-theme="light"] .manager-comment-date {
  color: #6b6b6b;
}

html[data-theme="light"] .manager-auth-logout {
  color: #5c5c5c;
}

html[data-theme="light"] .hero {
  background: var(--theme-bg) !important;
}

html[data-theme="light"] .hero-media {
  background: var(--theme-bg);
}

html[data-theme="light"] .hero-shade {
  background:
    linear-gradient(90deg, rgba(243, 244, 246, 0.55) 0%, rgba(243, 244, 246, 0.18) 42%, transparent 68%),
    linear-gradient(180deg, rgba(243, 244, 246, 0.2) 0%, transparent 28%, transparent 62%, var(--theme-bg) 100%);
}

html[data-theme="light"][dir="rtl"] .hero-shade {
  background:
    linear-gradient(270deg, rgba(243, 244, 246, 0.55) 0%, rgba(243, 244, 246, 0.18) 42%, transparent 68%),
    linear-gradient(180deg, rgba(243, 244, 246, 0.2) 0%, transparent 28%, transparent 62%, var(--theme-bg) 100%);
}

html[data-theme="light"] .hero-content {
  background: #ffffff;
  border-color: rgba(180, 130, 0, 0.28);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: none;
}

html[data-theme="light"] .hero h1 {
  color: #121212 !important;
}

html[data-theme="light"] .hero p.hero-desc {
  color: rgba(18, 18, 18, 0.72);
}

html[data-theme="light"] .hero-proof li {
  background: transparent;
  border: 0;
  color: #1a1a1a;
}

html[data-theme="light"] .hero .hero-logo {
  filter: drop-shadow(0 8px 20px rgba(255, 193, 7, 0.2));
}

html[data-theme="light"] .hero .hero-logo path[fill="white"] {
  fill: #111111;
}

html[data-theme="light"] .hero-earnings-cta {
  color: #111 !important;
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.2),
    0 10px 24px rgba(255, 193, 7, 0.35);
}

html[data-theme="light"] .footer {
  background: var(--theme-footer-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .footer-contact a,
html[data-theme="light"] .footer-nav a,
html[data-theme="light"] .footer-legal a,
html[data-theme="light"] .footer-brand-tag {
  color: #333;
}

html[data-theme="light"] .footer-contact a:hover,
html[data-theme="light"] .footer-legal a:hover {
  color: var(--color-primary-dark);
}

html[data-theme="light"] .footer-logo svg path[fill="white"] {
  fill: #111111;
}

html[data-theme="light"] .manager-review-form input,
html[data-theme="light"] .manager-review-form textarea,
html[data-theme="light"] .manager-auth-form input,
html[data-theme="light"] .contact-form input,
html[data-theme="light"] .contact-form textarea,
html[data-theme="light"] .contact-form select,
html[data-theme="light"] .contact-form .select-trigger,
html[data-theme="light"] .contact-form .form-group-phone .iti__tel-input,
html[data-theme="light"] .contact-form .form-group-phone .iti input[type="tel"] {
  background: #fff;
  color: #121212 !important;
  -webkit-text-fill-color: #121212;
  border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .contact-form input::placeholder,
html[data-theme="light"] .contact-form textarea::placeholder,
html[data-theme="light"] .contact-form .form-group-phone .iti__tel-input::placeholder {
  color: #6b7280 !important;
  -webkit-text-fill-color: #6b7280;
  opacity: 1;
}

html[data-theme="light"] .contact-form {
  background: #ffffff;
}

html[data-theme="light"] .contact-form .form-group label,
html[data-theme="light"][dir="rtl"] .contact-form .form-group label,
html[data-theme="light"][lang="ar"] .contact-form .form-group label {
  color: #1a1a1a !important;
}

html[data-theme="light"] .manager-auth-dialog {
  background: linear-gradient(180deg, #ffffff, #f7f7f8);
  border-color: rgba(180, 130, 0, 0.35);
}

html[data-theme="light"] .manager-auth-title,
html[data-theme="light"] .manager-auth-tab.is-active {
  color: #121212;
}

html[data-theme="light"] .manager-auth-desc,
html[data-theme="light"] .manager-auth-tab {
  color: #5c5c5c;
}

html[data-theme="light"] .manager-auth-tabs {
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .manager-auth-close {
  background: rgba(0, 0, 0, 0.05);
  color: #121212;
}

html[data-theme="light"] .manager-auth-form label {
  color: #333;
}

html[data-theme="light"] .manager-auth-msg {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(185, 28, 28, 0.28);
}

/* Review + Telegram popups */
html[data-theme="light"] .review-modal-dialog {
  background: #ffffff;
  border-color: rgba(180, 130, 0, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .review-modal-title {
  color: #121212;
}

html[data-theme="light"] .review-modal-close {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: #121212;
}

html[data-theme="light"] .review-modal-body {
  color: #333;
}

html[data-theme="light"] .telegram-modal-dialog {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .manager-assign-dialog {
  background: #ffffff;
  border-color: rgba(180, 130, 0, 0.28);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .manager-assign-close {
  background: rgba(0, 0, 0, 0.05);
  color: #5c5c5c;
}

html[data-theme="light"] .manager-assign-title,
html[data-theme="light"] .manager-assign-name {
  color: #121212;
}

html[data-theme="light"] .manager-assign-lead,
html[data-theme="light"] .manager-assign-bio,
html[data-theme="light"] .manager-assign-fallback {
  color: #5c5c5c;
}

html[data-theme="light"] .manager-assign-photo {
  background: #f3f4f6;
}

html[data-theme="light"] .telegram-modal-close {
  color: #5c5c5c;
}

html[data-theme="light"] .telegram-modal-icon {
  background: rgba(42, 171, 238, 0.14);
}

html[data-theme="light"] .telegram-modal-icon img {
  /* telegram.svg is white; recolor to brand blue on light surfaces */
  filter: brightness(0) saturate(100%) invert(52%) sepia(86%) saturate(1400%)
    hue-rotate(165deg) brightness(0.98) contrast(0.95);
}

html[data-theme="light"] .telegram-modal-title {
  color: #121212;
}

html[data-theme="light"] .telegram-modal-desc {
  color: #5c5c5c;
}

html[data-theme="light"] .telegram-option-channel {
  background: rgba(46, 160, 218, 0.1);
  border-color: rgba(46, 160, 218, 0.4);
}

html[data-theme="light"] .telegram-option-channel .telegram-option-title {
  color: #0b6fa8;
}

html[data-theme="light"] .telegram-option-channel .telegram-option-desc,
html[data-theme="light"] .telegram-option-manager .telegram-option-desc {
  color: #5c5c5c;
}

html[data-theme="light"] .telegram-option-manager {
  background: rgba(40, 160, 80, 0.1);
  border-color: rgba(40, 160, 80, 0.35);
}

html[data-theme="light"] .telegram-option-manager .telegram-option-title {
  color: #1b7a3a;
}

html[data-theme="light"] .nav-links.is-open {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(180, 130, 0, 0.28);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.04) inset;
}

html[data-theme="light"] .nav-links a {
  color: #1a1a1a;
}

html[data-theme="light"] .nav-more-menu a {
  color: #444;
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a:active,
html[data-theme="light"] .nav-links a:focus-visible {
  background: rgba(255, 193, 7, 0.16);
  color: #111;
}

html[data-theme="light"] .nav-backdrop {
  background: rgba(15, 15, 15, 0.35);
}

html[data-theme="light"] .mobile-menu-btn {
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.16);
  background: rgba(0, 0, 0, 0.04);
}

/* Regions table + filters (hardcoded white in structure.css) */
html[data-theme="light"] .regions-filters-label,
html[data-theme="light"] .regions-count,
html[data-theme="light"] .regions-showing,
html[data-theme="light"] .country-code {
  color: #5c5c5c;
}

html[data-theme="light"] .regions-filter,
html[data-theme="light"] .regions-page-btn,
html[data-theme="light"] .regions-page-num {
  color: #1a1a1a;
  border-color: rgba(180, 130, 0, 0.35);
  background: #fff;
}

html[data-theme="light"] .regions-filter.active,
html[data-theme="light"] .regions-filter:hover,
html[data-theme="light"] .regions-page-num.active,
html[data-theme="light"] .regions-page-btn:hover:not(:disabled),
html[data-theme="light"] .regions-page-num:hover {
  background: var(--color-primary);
  color: #111;
  border-color: var(--color-primary);
}

html[data-theme="light"] .regions-table-scroll {
  border-color: rgba(180, 130, 0, 0.28);
  background: #fff;
}

html[data-theme="light"] .regions-table thead th {
  background: #f0f1f4;
  color: #8a6a00;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .regions-table td {
  color: #1a1a1a;
  border-top-color: rgba(0, 0, 0, 0.07);
}

html[data-theme="light"] .regions-table tbody tr:hover {
  background: rgba(255, 193, 7, 0.12);
}

html[data-theme="light"] .country-name {
  color: #121212;
}

html[data-theme="light"] .region-pill {
  background: rgba(0, 0, 0, 0.06);
  color: #333;
}

html[data-theme="light"] .status-badge {
  color: #1b7a3a;
}

/* Commission payment table (hardcoded white in structure.css) */
html[data-theme="light"] .table-header {
  border-bottom-color: rgba(180, 130, 0, 0.28);
}

html[data-theme="light"] .table-header h3 {
  color: #121212;
}

html[data-theme="light"] .data-table th,
html[data-theme="light"] .data-table td {
  color: #1a1a1a;
  border-top-color: rgba(0, 0, 0, 0.07);
}

html[data-theme="light"] .data-table th {
  color: #8a6a00;
}

html[data-theme="light"] .data-table tbody tr:hover {
  background: rgba(255, 193, 7, 0.1);
}

@media (max-width: 900px) {
  html[data-theme="light"] .regions-table thead th {
    background: transparent;
    color: #6b6b6b;
    border-bottom-color: rgba(0, 0, 0, 0.1);
  }

  html[data-theme="light"] .country-name {
    color: #121212;
  }

  html[data-theme="light"] .country-code {
    color: #6b6b6b;
  }

  html[data-theme="light"] .status-badge,
  html[data-theme="light"] .status-badge .status-text {
    color: #1b7a3a;
  }

  html[data-theme="light"] .status-badge .status-check {
    color: var(--color-primary-dark, #c79100);
  }

  html[data-theme="light"] .regions-table tbody td {
    border-top-color: rgba(0, 0, 0, 0.08);
    color: #1a1a1a;
  }

  html[data-theme="light"] .data-table th,
  html[data-theme="light"] .data-table td {
    color: #1a1a1a;
    border-top-color: rgba(0, 0, 0, 0.08);
  }

  html[data-theme="light"] .data-table tbody td:first-child {
    color: #8a6a00;
  }
}

/* Theme toggle control */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  border: 2px solid rgba(255, 193, 7, 0.55);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(255, 193, 7, 0.14);
  color: var(--color-primary);
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

html[data-theme="light"] .theme-toggle {
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

@media (max-width: 768px) {
  .theme-toggle {
    width: 2.2rem;
    height: 2.2rem;
    order: 2;
  }
}

/* ===== Earnings calculator — always light surface in dark mode ===== */
html[data-theme="dark"] .terms-studio {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #111827;
}

html[data-theme="dark"] .terms-workspace {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  color: #111827;
}

html[data-theme="dark"] .terms-workspace-header h3,
html[data-theme="dark"] .terms-rate-value,
html[data-theme="dark"] .terms-summary-value,
html[data-theme="dark"] .terms-summary-yearly {
  color: #111827;
}

html[data-theme="dark"] .terms-workspace-kicker {
  color: #f59e0b;
}

html[data-theme="dark"] .terms-workspace-desc,
html[data-theme="dark"] .terms-earn-label,
html[data-theme="dark"] .terms-summary-kicker,
html[data-theme="dark"] .calc-label,
html[data-theme="dark"] .terms-rate-range {
  color: #6b7280;
}

html[data-theme="dark"] .calc-output {
  color: #d97706;
}

html[data-theme="dark"] .terms-rate-box,
html[data-theme="dark"] .terms-slider-field,
html[data-theme="dark"] .terms-rate-control-stack {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .terms-summary {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .terms-summary-main,
html[data-theme="dark"] .terms-summary-sub {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .terms-glass {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: #374151;
}

html[data-theme="dark"] .terms-glass h3 {
  color: #111827;
}

html[data-theme="dark"] .terms-glass p,
html[data-theme="dark"] .terms-glass .terms-glass-action,
html[data-theme="dark"] .terms-glass .terms-glass-badge {
  color: #6b7280;
}

html[data-theme="dark"] .terms-glass.is-active {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #111827;
}
