:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8edf6;
  --muted: #a1aec1;
  --line: #303b4d;
  --bg: #111722;
  --blue: #84aaff;
  --navy: #e8edf6;
  --shadow: 0 12px 34px rgba(0, 0, 0, .2);
}

:root[data-theme="dark"] body {
  background: var(--bg);
  color: var(--ink);
}

:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .button,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .auth-modal,
:root[data-theme="dark"] .visual-card,
:root[data-theme="dark"] .step-item,
:root[data-theme="dark"] .benefit-card {
  background-color: #1a2331;
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .topbar h1,
:root[data-theme="dark"] .stat-value,
:root[data-theme="dark"] .card h2,
:root[data-theme="dark"] .card-heading h2,
:root[data-theme="dark"] td strong,
:root[data-theme="dark"] label,
:root[data-theme="dark"] .auth-modal h2,
:root[data-theme="dark"] .auth-card h1,
:root[data-theme="dark"] .section-intro h2,
:root[data-theme="dark"] .steps-section h2,
:root[data-theme="dark"] .benefit-card h3,
:root[data-theme="dark"] .step-item strong {
  color: var(--ink);
}

:root[data-theme="dark"] .brand span,
:root[data-theme="dark"] .landing-footer > button {
  color: #9bb9ff;
}

:root[data-theme="dark"] .brand-mark {
  background: #344c77;
  color: #fff;
}

:root[data-theme="dark"] .nav-link {
  color: #a1aec1;
}

:root[data-theme="dark"] .nav-link:hover,
:root[data-theme="dark"] .nav-link.active {
  background: #293750;
  color: #b4caff;
}

:root[data-theme="dark"] .avatar,
:root[data-theme="dark"] .stat-icon,
:root[data-theme="dark"] .topbar-page-icon,
:root[data-theme="dark"] .step-item > span {
  background: #293750;
  color: #b4caff;
}

:root[data-theme="dark"] .button:hover {
  background-color: #263247;
}

:root[data-theme="dark"] .button.primary {
  background: #3e6fcb;
  border-color: #3e6fcb;
  color: #fff;
}

:root[data-theme="dark"] .button.success {
  background: #167c69;
  border-color: #167c69;
  color: #fff;
}

:root[data-theme="dark"] .button.danger {
  background: #2b2028;
  border-color: #51313a;
  color: #ff9ba0;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background-color: #141c28;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #8795a9;
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] td {
  border-color: var(--line);
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] td,
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .topbar p,
:root[data-theme="dark"] .stat-head,
:root[data-theme="dark"] .stat-note,
:root[data-theme="dark"] .empty,
:root[data-theme="dark"] .footer-note,
:root[data-theme="dark"] .form-hint,
:root[data-theme="dark"] .profile-mini small,
:root[data-theme="dark"] .auth-modal [data-auth-panel] > p,
:root[data-theme="dark"] .auth-card > p,
:root[data-theme="dark"] .auth-foot {
  color: #a1aec1;
}

:root[data-theme="dark"] .badge {
  background: #303b4d;
  color: #d0d9e7;
}

:root[data-theme="dark"] .badge.queued,
:root[data-theme="dark"] .badge.waiting {
  background: #493923;
  color: #f4c976;
}

:root[data-theme="dark"] .badge.processing,
:root[data-theme="dark"] .badge.review {
  background: #263b59;
  color: #a9c9ff;
}

:root[data-theme="dark"] .badge.completed,
:root[data-theme="dark"] .badge.approved,
:root[data-theme="dark"] .badge.active {
  background: #1d4038;
  color: #8cdec3;
}

:root[data-theme="dark"] .badge.failed,
:root[data-theme="dark"] .badge.rejected,
:root[data-theme="dark"] .badge.disabled {
  background: #482a31;
  color: #ffabb0;
}

:root[data-theme="dark"] .alert.success {
  background: #1d4038;
  color: #a4e8d2;
}

:root[data-theme="dark"] .alert.error {
  background: #482a31;
  color: #ffabb0;
}

:root[data-theme="dark"] .alert.info {
  background: #263b59;
  color: #b4caff;
}

:root[data-theme="dark"] .code-reveal {
  background: #202c3e;
  color: var(--ink);
}

:root[data-theme="dark"] .landing {
  background: #111722;
  color: var(--ink);
}

:root[data-theme="dark"] .landing-nav,
:root[data-theme="dark"] .landing-footer {
  border-color: var(--line);
}

:root[data-theme="dark"] .landing-links a,
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .modal-eyebrow,
:root[data-theme="dark"] .hero-lead,
:root[data-theme="dark"] .hero-trust,
:root[data-theme="dark"] .section-intro p,
:root[data-theme="dark"] .benefit-card p,
:root[data-theme="dark"] .step-item small,
:root[data-theme="dark"] .landing-footer > span {
  color: #a1aec1;
}

:root[data-theme="dark"] .hero-copy h1,
:root[data-theme="dark"] .section-intro h2,
:root[data-theme="dark"] .steps-section h2 {
  color: var(--ink);
}

:root[data-theme="dark"] .benefits-section {
  background: #151d29;
}

:root[data-theme="dark"] .auth-overlay {
  background: rgba(5, 9, 16, .76);
}

:root[data-theme="dark"] .auth-close {
  color: #a1aec1;
}

:root[data-theme="dark"] .modal-security {
  border-color: var(--line);
  color: #a1aec1;
}

:root[data-theme="dark"] .visual-card {
  box-shadow: 0 22px 55px rgba(0, 0, 0, .28);
}

:root[data-theme="dark"] .benefit-icon,
:root[data-theme="dark"] .status-check,
:root[data-theme="dark"] .score-icon,
:root[data-theme="dark"] .visual-badge > span {
  background: #293750;
  color: #b4caff;
}

:root[data-theme="dark"] .hero-trust > span {
  color: #b4caff;
}

.theme-toggle {
  white-space: nowrap;
}

.theme-toggle .bi {
  font-size: 14px;
}

.benefit-icon,
.status-check,
.score-icon,
.visual-badge > span,
.hero-trust > span {
  color: #2764e7;
}

.benefit-icon,
.status-check,
.score-icon,
.visual-badge > span {
  background: #edf3ff;
}

.topbar-title {
  display: flex;
  gap: 12px;
  align-items: center;
}

@media (max-width: 650px) {
  .landing-actions .theme-toggle .theme-toggle-label {
    display: none;
  }

  .landing-actions .theme-toggle {
    width: 37px;
    height: 37px;
    padding: 8px;
  }

  .top-actions .theme-toggle .theme-toggle-label {
    display: none;
  }
}

@media (max-width: 700px) {
  :root[data-theme="dark"] .mobile-bottom-nav {
    border-color: var(--line);
    background: #151e2b;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .28);
  }

  :root[data-theme="dark"] .mobile-bottom-nav-link {
    color: #a1aec1;
  }

  :root[data-theme="dark"] .mobile-bottom-nav-link.active {
    background: #293750;
    color: #b4caff;
  }

  :root[data-theme="dark"] .mobile-chat-unread {
    border-color: #151e2b;
  }

  :root[data-theme="dark"] .mobile-profile-shortcuts .button {
    background: #1a2331;
    border-color: var(--line);
    color: var(--ink);
  }
}
