/* Project Gaia — dark theme overlay. Scoped under html.dark; remaps the light
   utility palette to a dark surface system (page #0d1117, card #161b22). */

html.dark { color-scheme: dark; }
html.dark body { background-color: #0d1117; color: #e6edf3; }

/* Surfaces */
html.dark .bg-white { background-color: #161b22; }
html.dark .bg-gray-50 { background-color: #0d1117; }
html.dark .bg-gray-50\/75 { background-color: rgba(255, 255, 255, 0.04); }
html.dark .bg-gray-100 { background-color: #21262d; }
html.dark .bg-gray-200 { background-color: #30363d; }
html.dark .bg-gray-300 { background-color: #484f58; }
html.dark .bg-gray-900 { background-color: #21262d; box-shadow: inset 0 0 0 1px #30363d; }
html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-100:hover,
html.dark .hover\:bg-gray-50\/75:hover,
html.dark .hover\:bg-red-50:hover { background-color: rgba(255, 255, 255, 0.06); }
html.dark .hover\:bg-gray-700:hover { background-color: #30363d; }

/* Primary tints */
html.dark .bg-primary-50 { background-color: rgba(16, 185, 129, 0.15); }
html.dark .bg-primary-50\/40 { background-color: rgba(16, 185, 129, 0.08); }
html.dark .bg-primary-50\/60 { background-color: rgba(16, 185, 129, 0.12); }
html.dark .bg-primary-100 { background-color: rgba(16, 185, 129, 0.25); }

/* Status tints (badges, banners, chips) */
html.dark .bg-green-50 { background-color: rgba(34, 197, 94, 0.13); }
html.dark .bg-amber-50 { background-color: rgba(245, 158, 11, 0.13); }
html.dark .bg-red-50 { background-color: rgba(239, 68, 68, 0.13); }
html.dark .bg-blue-50 { background-color: rgba(59, 130, 246, 0.13); }
html.dark .bg-purple-50 { background-color: rgba(168, 85, 247, 0.13); }
html.dark .bg-teal-50 { background-color: rgba(20, 184, 166, 0.13); }

/* Text */
html.dark .text-gray-950, html.dark .text-gray-900 { color: #e6edf3; }
html.dark .text-gray-700 { color: #c9d1d9; }
html.dark .text-gray-600 { color: #9da7b3; }
html.dark .text-gray-500 { color: #8b949e; }
html.dark .text-gray-400 { color: #6e7681; }
html.dark .text-gray-300 { color: #484f58; }
html.dark .hover\:text-gray-700:hover, html.dark .hover\:text-gray-900:hover { color: #e6edf3; }
html.dark .text-primary-600, html.dark .text-primary-700, html.dark .text-primary-800 { color: #34d399; }
html.dark .text-primary-600\/70 { color: rgba(52, 211, 153, 0.7); }
html.dark .text-green-700 { color: #4ade80; }
html.dark .text-amber-700, html.dark .text-amber-800 { color: #fbbf24; }
html.dark .text-amber-900 { color: #fcd34d; }
html.dark .text-red-700 { color: #f87171; }
html.dark .text-red-900 { color: #fca5a5; }
html.dark .text-red-600, html.dark .text-red-500, html.dark .text-red-400 { color: #f87171; }
html.dark .text-blue-700 { color: #60a5fa; }
html.dark .text-blue-900 { color: #93c5fd; }
html.dark .text-purple-700 { color: #c084fc; }
html.dark .text-teal-700 { color: #2dd4bf; }
html.dark .text-white { color: #ffffff; }

/* Borders, dividers, rings */
html.dark .border-gray-100, html.dark .border-gray-200 { border-color: #21262d; }
html.dark .border-gray-300 { border-color: #30363d; }
html.dark .border-t, html.dark .border-b { border-color: #21262d; }
html.dark .divide-gray-50 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(255, 255, 255, 0.06); }
html.dark .ring-gray-950\/5 { --tw-ring-color: rgba(255, 255, 255, 0.09); }
html.dark .ring-gray-300 { --tw-ring-color: #30363d; }
html.dark .ring-gray-500\/10 { --tw-ring-color: rgba(255, 255, 255, 0.12); }

/* Forms */
html.dark input, html.dark select, html.dark textarea {
  background-color: #0d1117;
  border-color: #30363d;
  color: #e6edf3;
}
html.dark input::placeholder, html.dark textarea::placeholder { color: #6e7681; }
html.dark input[type="checkbox"] { background-color: #0d1117; border-color: #484f58; }
html.dark input[type="checkbox"]:checked { background-color: #059669; border-color: #059669; }

/* Theme switch segmented control */
[data-set-theme].theme-active { background: #ffffff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); color: #111827; }
html.dark [data-set-theme] { color: #8b949e; }
html.dark [data-set-theme].theme-active { background: #30363d; color: #f0f6fc; box-shadow: none; }

/* Shadows read too harsh on dark cards */
html.dark .shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
html.dark .shadow-lg, html.dark .shadow-2xl { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6); }
