html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d12;
  --paper: #141820;
  --warm: rgba(16, 185, 129, 0.10);
  --ink: #e8eee9;
  --muted: #9aa8a2;
  --line: rgba(232, 238, 233, 0.10);
  --accent: #34d399;
  --accent-deep: #10b981;
  --brand3: #34d399;
  --ink-dark: #f3f6f4;
  --ok: #34d399;
  --danger: #f87171;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-deep: 0 24px 60px rgba(0, 0, 0, 0.36);
}
html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #0b0d12 !important;
  color: var(--ink) !important;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] .grain { opacity: 0.07; }

html[data-theme="dark"] .top {
  background: rgba(11, 13, 18, 0.78) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28) !important;
}
html[data-theme="dark"] .top.solid {
  background: #12151c !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .logo b,
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .display { color: #f3f6f4 !important; }
html[data-theme="dark"] .logo b span,
html[data-theme="dark"] .auth-hero .display span {
  background: linear-gradient(102deg, #6ee7b7 0%, #34d399 46%, #10b981 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: none;
}
html[data-theme="dark"] .hero h1 span {
  background: linear-gradient(110deg, #ecfdf5 0%, #6ee7b7 24%, #34d399 40%, #ffffff 54%, #10b981 78%, #059669 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 18px rgba(16, 185, 129, 0.28));
}
html[data-theme="dark"] .logo small { color: #9aa8a2 !important; }
html[data-theme="dark"] .nav-tools {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
html[data-theme="dark"] .theme-switch::before,
html[data-theme="dark"] .nav-tools .lang-btn + .theme-btn::before {
  background: rgba(255, 255, 255, 0.14);
}
html[data-theme="dark"] .lang-switch,
html[data-theme="dark"] .theme-switch {
  background: transparent !important;
  border: 0 !important;
}
html[data-theme="dark"] .menu,
html[data-theme="dark"] .nav {
  background: rgba(20, 24, 32, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
html[data-theme="dark"] .menu a,
html[data-theme="dark"] .nav a,
html[data-theme="dark"] .menu .who,
html[data-theme="dark"] .nav span { color: #cfd8d3 !important; }
html[data-theme="dark"] .menu a:hover,
html[data-theme="dark"] .nav a:hover {
  color: #fff !important;
  background: rgba(16, 185, 129, 0.14) !important;
}
html[data-theme="dark"] .menu a.on,
html[data-theme="dark"] .nav a.on {
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.16) !important;
}
html[data-theme="dark"] .lang-btn,
html[data-theme="dark"] .theme-btn { color: #9aa8a2; }
html[data-theme="dark"] .lang-btn.on,
html[data-theme="dark"] .lang-btn[aria-pressed="true"],
html[data-theme="dark"] .theme-btn.on,
html[data-theme="dark"] .theme-btn[aria-pressed="true"] {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #ecfdf5 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .menu-toggle {
  background: #171b24 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .menu-toggle span { background: #e8eee9 !important; }
html[data-theme="dark"] .menu-backdrop { background: rgba(0, 0, 0, 0.55) !important; }

html[data-theme="dark"] .btn,
html[data-theme="dark"] button.btn,
html[data-theme="dark"] button[type="submit"],
html[data-theme="dark"] button.primary,
html[data-theme="dark"] .menu .btn,
html[data-theme="dark"] .nav .btn {
  background: #10b981 !important;
  color: #052e22 !important;
}
html[data-theme="dark"] .btn:hover,
html[data-theme="dark"] button[type="submit"]:hover {
  background: #34d399 !important;
  color: #052e22 !important;
}
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] button.ghost {
  background: #171b24 !important;
  color: #e8eee9 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
html[data-theme="dark"] .btn.ghost:hover,
html[data-theme="dark"] button.ghost:hover {
  background: #1f2530 !important;
  color: #fff !important;
}

html[data-theme="dark"] .kicker,
html[data-theme="dark"] .kicker.light { color: #34d399 !important; }
html[data-theme="dark"] .hero-copy .kicker {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(52, 211, 153, 0.28) !important;
}
html[data-theme="dark"] .lead,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .hero-copy .lead,
html[data-theme="dark"] .auth-hero .lead { color: #9aa8a2 !important; }

html[data-theme="dark"] .composer {
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 16px 40px rgba(0, 0, 0, 0.18) !important;
  color: var(--ink) !important;
  backdrop-filter: blur(14px);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .order,
html[data-theme="dark"] .item,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .faq details,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .pick,
html[data-theme="dark"] .script,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .admin-user,
html[data-theme="dark"] .admin-order,
html[data-theme="dark"] .fact,
html[data-theme="dark"] .prompt-sheet,
html[data-theme="dark"] .google-slot,
html[data-theme="dark"] .email-suggest,
html[data-theme="dark"] .empty-board {
  background: rgba(255, 255, 255, 0.025) !important;
  border-color: rgba(255, 255, 255, 0.075) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
  color: var(--ink) !important;
  backdrop-filter: blur(14px);
}
html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .order:hover,
html[data-theme="dark"] .item:hover,
html[data-theme="dark"] .faq details:hover,
html[data-theme="dark"] .faq details[open],
html[data-theme="dark"] .fact:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
html[data-theme="dark"] #pane-tasks .admin-order {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
html[data-theme="dark"] #pane-tasks .pay-card {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(16, 185, 129, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)) !important;
  border-color: rgba(16, 185, 129, 0.24) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="dark"] .composer-label,
html[data-theme="dark"] .composer-field > span,
html[data-theme="dark"] #composer .composer-perks-line,
html[data-theme="dark"] .composer .hint { color: #9aa8a2 !important; }
html[data-theme="dark"] .composer .presets button,
html[data-theme="dark"] .presets.rich button,
html[data-theme="dark"] .composer-perks li {
  background: rgba(255, 255, 255, 0.025) !important;
  border-color: rgba(255, 255, 255, 0.085) !important;
  color: rgba(255, 255, 255, 0.68) !important;
}
html[data-theme="dark"] .composer .presets button em,
html[data-theme="dark"] .composer .presets button b,
html[data-theme="dark"] .presets.rich button em,
html[data-theme="dark"] .presets.rich button b { color: #e8eee9 !important; }
html[data-theme="dark"] .composer .presets button span,
html[data-theme="dark"] .presets.rich button span { color: #9aa8a2 !important; }
html[data-theme="dark"] .composer .presets button.on,
html[data-theme="dark"] .presets.rich button.on {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(52, 211, 153, 0.42) !important;
  color: #6ee7b7 !important;
}
html[data-theme="dark"] .composer .presets button.on em,
html[data-theme="dark"] .composer .presets button.on b,
html[data-theme="dark"] .composer .presets button.on span { color: #6ee7b7 !important; }
html[data-theme="dark"] .composer textarea,
html[data-theme="dark"] #composer textarea {
  background: rgba(7, 10, 16, 0.45) !important;
  color: #e8eee9 !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  caret-color: #34d399 !important;
}
html[data-theme="dark"] .composer textarea::placeholder { color: #7d8b85 !important; }
html[data-theme="dark"] .fact em { color: #34d399 !important; }
html[data-theme="dark"] .fact b { color: #f3f6f4 !important; }
html[data-theme="dark"] .fact span { color: #9aa8a2 !important; }

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .auth-card input,
html[data-theme="dark"] #login input,
html[data-theme="dark"] #register input,
html[data-theme="dark"] #auth-form input,
html[data-theme="dark"] #app .admin-toolbar input[type="search"] {
  background: rgba(7, 10, 16, 0.55) !important;
  color: #e8eee9 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7d8b85 !important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  background: #12171f !important;
  color: #f3f6f4 !important;
  border-color: #34d399 !important;
}

html[data-theme="dark"] .foot {
  background: #10141c !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .foot .lead,
html[data-theme="dark"] .foot p { color: #9aa8a2 !important; }
html[data-theme="dark"] .foot h2,
html[data-theme="dark"] .foot .kicker { color: #f3f6f4 !important; }
html[data-theme="dark"] .foot a:not(.btn),
html[data-theme="dark"] .guide-foot-links a,
html[data-theme="dark"] .guide .crumbs a,
html[data-theme="dark"] .guide-prose a,
html[data-theme="dark"] .guide-related a { color: #34d399 !important; }
html[data-theme="dark"] .foot .btn,
html[data-theme="dark"] .foot-cta {
  background: linear-gradient(180deg, #86efac 0%, #34d399 100%) !important;
  color: #06281d !important;
  border-color: rgba(167, 243, 208, 0.7) !important;
}
html[data-theme="dark"] .foot .btn:hover,
html[data-theme="dark"] .foot-cta:hover {
  background: linear-gradient(180deg, #bbf7d0 0%, #6ee7b7 100%) !important;
  color: #06281d !important;
}
html[data-theme="dark"] .guide-prose p,
html[data-theme="dark"] .guide-prose li,
html[data-theme="dark"] .guide-table td { color: #cfd8d3 !important; }
html[data-theme="dark"] .guide-table th { color: #f3f6f4 !important; }

html[data-theme="dark"] .auth-tabs,
html[data-theme="dark"] .tabs.auth-tabs {
  background: #0f131a !important;
}
html[data-theme="dark"] .auth-tabs button,
html[data-theme="dark"] .tabs button,
html[data-theme="dark"] .filters button {
  color: #cfd8d3 !important;
}
html[data-theme="dark"] .auth-tabs button.on,
html[data-theme="dark"] .tabs button.on,
html[data-theme="dark"] .filters button.on {
  background: #1a2030 !important;
  color: #6ee7b7 !important;
}
html[data-theme="dark"] #work-filters {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] #work-filters button {
  color: rgba(232, 238, 233, 0.56) !important;
}
html[data-theme="dark"] #work-filters button:hover {
  color: #e8eee9 !important;
}
html[data-theme="dark"] #work-filters button.on {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #6ee7b7 !important;
}
html[data-theme="dark"] .auth-points strong,
html[data-theme="dark"] .auth-tabs button.on,
html[data-theme="dark"] .google-continue,
html[data-theme="dark"] .prompt-sheet h3,
html[data-theme="dark"] .pay-amount,
html[data-theme="dark"] .order-now .wait-clock { color: #f3f6f4 !important; }
html[data-theme="dark"] .auth-points em { color: #9aa8a2 !important; }
html[data-theme="dark"] .auth-points b,
html[data-theme="dark"] #forgot { color: #34d399 !important; }
html[data-theme="dark"] .chip.ok,
html[data-theme="dark"] .chip.run { color: #34d399 !important; }
html[data-theme="dark"] .chip.wait {
  color: #9aa8a2 !important;
  background: #1a2030 !important;
}
html[data-theme="dark"] .chip.ghost,
html[data-theme="dark"] .order-time,
html[data-theme="dark"] .script-line { color: #cfd8d3 !important; }
html[data-theme="dark"] #app .script-version-tabs button,
html[data-theme="dark"] #app .chip.ghost,
html[data-theme="dark"] #app .stat,
html[data-theme="dark"] #app .order {
  color: #e8eee9 !important;
  background: rgba(255, 255, 255, 0.025) !important;
  border-color: rgba(255, 255, 255, 0.075) !important;
}
html[data-theme="dark"] #app .script-version-tabs button.on {
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.16) !important;
}
html[data-theme="dark"] #app .stat span,
html[data-theme="dark"] #pane-settings #price-hint { color: #9aa8a2 !important; }

html[data-theme="dark"] #kefu-root .kefu-launch,
html[data-theme="dark"] #kefu-root .kefu-toast,
html[data-theme="dark"] #kefu-root .kefu-panel {
  background: #141820;
  color: #e8eee9;
  border-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] #kefu-root .kefu-launch { color: #6ee7b7; }
html[data-theme="dark"] #kefu-root .kefu-panel header,
html[data-theme="dark"] #kefu-root .kefu-panel form {
  background: #141820;
  border-color: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] #kefu-root .kefu-panel header small,
html[data-theme="dark"] #kefu-root .kefu-close,
html[data-theme="dark"] #kefu-root .kefu-toast span { color: #8ea099; }
html[data-theme="dark"] #kefu-root .kefu-close:hover { background: rgba(255, 255, 255, 0.06); }
html[data-theme="dark"] #kefu-root .kefu-toast b { color: #6ee7b7; }
html[data-theme="dark"] #kefu-root .kefu-log {
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(16, 185, 129, 0.10), transparent 46%),
    #0e1218;
}
html[data-theme="dark"] #kefu-root .kefu-log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); background-clip: padding-box; }
html[data-theme="dark"] #kefu-root .kefu-log .theirs {
  background: #1c2430;
  color: #e8eee9;
  border-color: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] #kefu-root .kefu-log .mine {
  background: #059669;
  color: #fff;
}
html[data-theme="dark"] #kefu-root .kefu-panel textarea {
  background: #0e1218 !important;
  color: #e8eee9 !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
html[data-theme="dark"] #kefu-root .kefu-panel textarea::placeholder { color: #7d8b85 !important; }
html[data-theme="dark"] #kefu-root .kefu-panel form button {
  background: #059669;
  color: #fff;
}

@media (max-width: 1100px) {
  html[data-theme="dark"] .top { background: #12151c !important; }
  html[data-theme="dark"] .menu,
  html[data-theme="dark"] .top .nav {
    background: #161b24 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4) !important;
  }
}
