/**
 * Atelier Nusa — emergency high-contrast overlay (no rebuild required)
 * Loaded after Vite bundle so it always wins over stale builds.
 */
:root {
    color-scheme: dark;
}

body.studio-bg,
body.font-sans.studio-bg,
.studio-bg {
    color: #f1f5f9 !important;
}

/* Forms */
.studio-bg input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.studio-bg textarea,
.studio-bg select,
.studio-bg .form-input {
    color: #f8fafc !important;
    background-color: #1e293b !important;
    border: 1px solid #64748b !important;
    -webkit-text-fill-color: #f8fafc;
}

.studio-bg input::placeholder,
.studio-bg textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
    -webkit-text-fill-color: #94a3b8;
}

.studio-bg select option {
    background: #1e293b;
    color: #f8fafc;
}

.studio-bg .form-label,
.studio-bg label.form-label {
    color: #cbd5e1 !important;
}

/* Tables */
.studio-bg .table-dark,
.studio-bg .table-dark td,
.studio-bg table td {
    color: #f1f5f9 !important;
}

.studio-bg .table-dark th,
.studio-bg table th {
    color: #e2e8f0 !important;
}

/* Glass cards */
.studio-bg .glass-strong,
.studio-bg .glass {
    color: #f1f5f9 !important;
}

/* Buttons */
.studio-bg .btn-primary {
    color: #ffffff !important;
}

.studio-bg .btn-secondary,
.studio-bg .btn-ghost {
    color: #f1f5f9 !important;
}

/* Nav */
.studio-bg .nav-link {
    color: #cbd5e1 !important;
}

.studio-bg .nav-link-active {
    color: #ffffff !important;
}

/* KPI */
.studio-bg .kpi,
.studio-bg .kpi-value {
    color: #ffffff !important;
}

.studio-bg .kpi-label {
    color: rgba(255, 255, 255, 0.88) !important;
}

/* Defeat accidental black text utilities on dark UI */
.studio-bg .text-gray-800,
.studio-bg .text-gray-700,
.studio-bg .text-gray-900,
.studio-bg .text-black,
.studio-bg .text-slate-900 {
    color: #f8fafc !important;
}

.studio-bg .text-gray-500,
.studio-bg .text-gray-600 {
    color: #cbd5e1 !important;
}

/* Tab inactive text must stay visible */
.studio-bg button.text-slate-400 {
    color: #cbd5e1 !important;
}

/* Chips */
.studio-bg .chip-no {
    color: #e2e8f0 !important;
    background: #334155 !important;
}

.studio-bg .chip-yes {
    color: #6ee7b7 !important;
}

/* Flash */
.studio-bg .flash-ok {
    color: #a7f3d0 !important;
}

.studio-bg .flash-err {
    color: #fecdd3 !important;
}

/* Sidebar brand area */
.studio-bg aside {
    color: #f1f5f9;
}

/* Links inside dark cards */
.studio-bg .glass-strong a,
.studio-bg .glass a {
    color: #a5b4fc;
}

.studio-bg .glass-strong a:hover,
.studio-bg .glass a:hover {
    color: #c7d2fe;
}

/* Number inputs spinners keep light field */
.studio-bg input[type="number"] {
    color-scheme: dark;
}
