/* Hangul shell — dark default, light via html[data-theme="light"]. */
:root {
  --vocat-bg: #12141a;
  --vocat-surface: #1c1f28;
  --vocat-surface-2: #262a35;
  --vocat-border: #3a3f4d;
  --vocat-accent: #f5c518;
  --vocat-text: #f2f2f7;
  --vocat-muted: #9ca3af;
  --vocat-input: #2a2e3a;
  --vocat-on-accent: #12141a;
  color-scheme: dark;
}

html[data-theme="light"] {
  --vocat-bg: #f4f5f7;
  --vocat-surface: #ffffff;
  --vocat-surface-2: #eceef2;
  --vocat-border: #d0d4dc;
  --vocat-accent: #c9a006;
  --vocat-text: #12141a;
  --vocat-muted: #667085;
  --vocat-input: #ffffff;
  --vocat-on-accent: #12141a;
  --color-vocat-bg: #f4f5f7;
  --color-vocat-surface: #ffffff;
  --color-vocat-surface-2: #eceef2;
  --color-vocat-border: #d0d4dc;
  --color-vocat-accent: #c9a006;
  --color-vocat-muted: #667085;
  --color-vocat-input: #ffffff;
  color-scheme: light;
}

html,
body {
  background-color: var(--vocat-bg) !important;
  color: var(--vocat-text);
}

/* Force form controls to follow theme tokens */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]),
textarea,
select {
  background-color: var(--vocat-input) !important;
  color: var(--vocat-text) !important;
  border-color: var(--vocat-border) !important;
  border-radius: 0.75rem;
}

input::placeholder,
textarea::placeholder {
  color: var(--vocat-muted) !important;
  opacity: 1;
}

option {
  background-color: var(--vocat-surface);
  color: var(--vocat-text);
}

/* Soft remap of leftover light utility cards when they appear on dark body */
.bg-white {
  background-color: var(--vocat-surface) !important;
  color: var(--vocat-text);
}

.bg-slate-50,
.bg-slate-100,
.hover\:bg-slate-50:hover,
.hover\:bg-slate-100:hover,
.hover\:bg-indigo-50:hover {
  background-color: var(--vocat-surface-2) !important;
}

.text-slate-900,
.text-slate-800,
.text-slate-700,
.text-gray-900 {
  color: var(--vocat-text) !important;
}

.border-slate-100,
.border-slate-200,
.border-slate-300 {
  border-color: var(--vocat-border) !important;
}

.shadow-sm {
  box-shadow: none;
}

/* Flash on dark */
.bg-emerald-50 {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

.bg-amber-50 {
  background-color: rgba(245, 197, 24, 0.12) !important;
  color: #fde68a !important;
  border-color: rgba(245, 197, 24, 0.35) !important;
}

/* Light theme: invert slate text used as on-dark chrome */
html[data-theme="light"] .text-slate-100,
html[data-theme="light"] .hover\:text-slate-100:hover {
  color: #12141a !important;
}

html[data-theme="light"] .text-slate-200 {
  color: #1f2937 !important;
}

html[data-theme="light"] .text-slate-300 {
  color: #374151 !important;
}

html[data-theme="light"] .text-slate-400,
html[data-theme="light"] .disabled\:text-slate-300:disabled {
  color: #667085 !important;
}

html[data-theme="light"] .text-slate-500 {
  color: #7a8499 !important;
}

html[data-theme="light"] .text-vocat-bg {
  color: var(--vocat-on-accent) !important;
}

html[data-theme="light"] .bg-emerald-50 {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
  border-color: #a7f3d0 !important;
}

html[data-theme="light"] .bg-amber-50 {
  background-color: #fffbeb !important;
  color: #92400e !important;
  border-color: #fde68a !important;
}
