:root {
  color-scheme: light;
}

:root.theme-dark {
  color-scheme: dark;
}

:root.theme-dark body,
:root.theme-dark .bg-white,
:root.theme-dark .bg-gray-50,
:root.theme-dark .bg-gray-100 {
  background-color: #0f1720 !important;
  color: #e7eef4 !important;
}

:root.theme-dark header.bg-white,
:root.theme-dark aside.bg-white,
:root.theme-dark form.bg-white,
:root.theme-dark section.bg-white,
:root.theme-dark div.bg-white,
:root.theme-dark article.bg-white,
:root.theme-dark .bg-gray-50 {
  background-color: #151f2a !important;
}

:root.theme-dark .text-brand-teal,
:root.theme-dark .text-gray-900,
:root.theme-dark .text-gray-800,
:root.theme-dark .text-gray-700 {
  color: #d9f5ff !important;
}

:root.theme-dark .text-gray-600,
:root.theme-dark .text-gray-500,
:root.theme-dark .text-gray-400 {
  color: #aebdcc !important;
}

:root.theme-dark .border-gray-100,
:root.theme-dark .border-gray-200,
:root.theme-dark .border-gray-300,
:root.theme-dark .border-gray-500,
:root.theme-dark .border-t,
:root.theme-dark .border-b,
:root.theme-dark .border-r {
  border-color: #2b3a49 !important;
}

:root.theme-dark .shadow-md,
:root.theme-dark .shadow-lg,
:root.theme-dark .shadow-xl,
:root.theme-dark .shadow-2xl {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35) !important;
}

:root.theme-dark input,
:root.theme-dark select,
:root.theme-dark textarea {
  background-color: #0f1720 !important;
  border-color: #38495b !important;
  color: #f4f8fb !important;
}

:root.theme-dark input::placeholder,
:root.theme-dark textarea::placeholder {
  color: #7f91a4 !important;
}

:root.theme-dark .bg-blue-50,
:root.theme-dark .bg-green-50,
:root.theme-dark .bg-yellow-50,
:root.theme-dark .bg-red-50 {
  background-color: rgba(46, 196, 241, 0.12) !important;
}

:root.theme-dark .text-green-700,
:root.theme-dark .text-green-800 {
  color: #82e6ad !important;
}

:root.theme-dark .text-yellow-700,
:root.theme-dark .text-yellow-800 {
  color: #ffe27a !important;
}

:root.theme-dark .text-red-700,
:root.theme-dark .text-red-800 {
  color: #ff9c9c !important;
}

:root.theme-dark .module-link.is-active {
  background: #2ec4f1 !important;
  border-color: #2ec4f1 !important;
  color: #003c4d !important;
}

.theme-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #003c4d;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 700;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.theme-toggle:hover {
  border-color: #2ec4f1;
  color: #2ec4f1;
}

:root.theme-dark .theme-toggle {
  background: #0f1720;
  border-color: #38495b;
  color: #d9f5ff;
}

:root.theme-dark .theme-toggle:hover {
  border-color: #2ec4f1;
  color: #2ec4f1;
}

@media (max-width: 420px) {
  .theme-toggle span {
    display: none;
  }
}
