/*
 * ASR Pipeline — yagona navy matn palitrasi.
 * Barcha Tailwind text-* ranglari shu o‘zgaruvchilarga birlashtiriladi.
 */
:root,
html[data-theme="dark"] {
    --asr-navy: #a8bdd4;
    --asr-navy-muted: #7a94b0;
    --dashboard-text: var(--asr-navy);
}

html[data-theme="light"] {
    --asr-navy: #1e3a5f;
    --asr-navy-muted: #4a6280;
    --dashboard-text: var(--asr-navy);
}

/* Asosiy matn */
html body {
    color: var(--asr-navy) !important;
}

html body :where(
    p, span, a, label, h1, h2, h3, h4, h5, h6,
    li, td, th, dt, dd, summary, legend, small, strong, em, div,
    button, input, select, textarea, option, pre, code, kbd,
    .nav-link, .lang-btn, .module-card, .featured-card, .stat-pill,
    .step-active, .step-completed, .pipeline-phase-banner,
    #status-message, .arrow, .live-segment-text, .segment-preview-item,
    .activity-feed, .activity-feed li, .merger-toolbar, .glass-panel
) {
    color: var(--asr-navy) !important;
}

/* Barcha Tailwind matn ranglari → navy */
html body [class*="text-blue"],
html body [class*="text-indigo"],
html body [class*="text-violet"],
html body [class*="text-purple"],
html body [class*="text-fuchsia"],
html body [class*="text-pink"],
html body [class*="text-cyan"],
html body [class*="text-teal"],
html body [class*="text-emerald"],
html body [class*="text-green"],
html body [class*="text-sky"],
html body [class*="text-amber"],
html body [class*="text-yellow"],
html body [class*="text-orange"],
html body [class*="text-red"],
html body [class*="text-rose"],
html body [class*="text-lime"],
html body [class*="text-gray"],
html body [class*="text-grey"],
html body [class*="text-slate"],
html body [class*="text-white"],
html body [class*="text-zinc"],
html body [class*="text-neutral"],
html body [class*="text-stone"] {
    color: var(--asr-navy) !important;
}

/* Ikkinchi darajali matn (tavsiflar, placeholder uslubi) */
html body [class*="text-slate-4"],
html body [class*="text-slate-5"],
html body [class*="text-slate-6"],
html body [class*="text-gray-4"],
html body [class*="text-gray-5"],
html body [class*="text-gray-6"],
html body [class~="text-xs"][class*="text-slate"],
html body [class*="text-[10px]"][class*="text-slate"],
html body [class*="text-[11px]"][class*="text-slate"] {
    color: var(--asr-navy-muted) !important;
}

/* Sarlavha gradient → solid navy */
html body .bg-clip-text.text-transparent,
html body h1.bg-clip-text,
html body h2.bg-clip-text {
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: var(--asr-navy) !important;
    color: var(--asr-navy) !important;
}

html body .deepcore-brand.bg-clip-text {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

/* Log terminal — yashil saqlanadi */
html body .log-panel,
html body .log-panel * {
    color: #4ade80 !important;
}

html[data-theme="light"] body .log-panel,
html[data-theme="light"] body .log-panel * {
    color: #86efac !important;
}

html body .log-panel [class*="text-red"] {
    color: #f87171 !important;
}

html body #merge-log,
html body #validate-log,
html body #hf-upload-log {
    color: var(--asr-navy) !important;
}

/*
 * Tugmalar / CTA — navy qoidasidan mustasno.
 */
html[data-theme="dark"] body a[class*="bg-gradient-to-r"],
html[data-theme="dark"] body a[class*="bg-gradient-to-br"],
html[data-theme="dark"] body button[class*="bg-gradient-to-r"],
html[data-theme="dark"] body a[class*="bg-blue-5"],
html[data-theme="dark"] body a[class*="bg-blue-6"],
html[data-theme="dark"] body a[class*="bg-blue-7"],
html[data-theme="dark"] body a[class*="bg-blue-8"],
html[data-theme="dark"] body a[class*="bg-indigo-5"],
html[data-theme="dark"] body a[class*="bg-indigo-6"],
html[data-theme="dark"] body a[class*="bg-indigo-7"],
html[data-theme="dark"] body a[class*="bg-violet-5"],
html[data-theme="dark"] body a[class*="bg-violet-6"],
html[data-theme="dark"] body a[class*="bg-violet-7"],
html[data-theme="dark"] body a[class*="bg-teal-5"],
html[data-theme="dark"] body a[class*="bg-teal-6"],
html[data-theme="dark"] body a[class*="bg-teal-7"],
html[data-theme="dark"] body a[class*="bg-teal-8"],
html[data-theme="dark"] body a[class*="bg-emerald-5"],
html[data-theme="dark"] body a[class*="bg-emerald-6"],
html[data-theme="dark"] body a[class*="bg-emerald-7"],
html[data-theme="dark"] body a[class*="bg-emerald-8"],
html[data-theme="dark"] body a[class*="bg-amber-5"],
html[data-theme="dark"] body a[class*="bg-amber-6"],
html[data-theme="dark"] body a[class*="bg-amber-7"],
html[data-theme="dark"] body a[class*="bg-red-5"],
html[data-theme="dark"] body a[class*="bg-red-6"],
html[data-theme="dark"] body a[class*="bg-red-7"],
html[data-theme="dark"] body a[class*="bg-sky-5"],
html[data-theme="dark"] body a[class*="bg-sky-6"],
html[data-theme="dark"] body a[class*="bg-green-7"],
html[data-theme="dark"] body a[class*="bg-green-8"],
html[data-theme="dark"] body a[class*="bg-orange-5"],
html[data-theme="dark"] body a[class*="bg-orange-6"],
html[data-theme="dark"] body a[class*="bg-orange-7"],
html[data-theme="dark"] body button[class*="bg-blue-"],
html[data-theme="dark"] body button[class*="bg-indigo-"],
html[data-theme="dark"] body button[class*="bg-violet-"],
html[data-theme="dark"] body button[class*="bg-teal-"],
html[data-theme="dark"] body button[class*="bg-emerald-"],
html[data-theme="dark"] body button[class*="bg-amber-"],
html[data-theme="dark"] body button[class*="bg-red-"],
html[data-theme="dark"] body input[type="file"]::file-selector-button {
    color: #f8fafc !important;
}

html[data-theme="dark"] body a[class*="bg-slate-7"],
html[data-theme="dark"] body a[class*="bg-slate-8"],
html[data-theme="dark"] body a[class*="bg-slate-9"],
html[data-theme="dark"] body button[class*="bg-slate-7"],
html[data-theme="dark"] body button[class*="bg-slate-8"],
html[data-theme="dark"] body button[class*="bg-slate-9"] {
    color: #f8fafc !important;
}

html[data-theme="light"] body a[class*="bg-slate-"]:not(.nav-link),
html[data-theme="light"] body button[class*="bg-slate-"] {
    color: var(--asr-navy) !important;
}

html[data-theme="light"] body button[class*="bg-cyan-9"],
html[data-theme="light"] body button[class*="bg-emerald-9"],
html[data-theme="light"] body button[class*="bg-violet-9"],
html[data-theme="light"] body button[class*="bg-amber-9"],
html[data-theme="light"] body button[class*="bg-red-9"],
html[data-theme="light"] body button[class*="bg-teal-9"],
html[data-theme="light"] body button[class*="bg-sky-9"],
html[data-theme="light"] body button[class*="bg-indigo-9"],
html[data-theme="light"] body button[class*="bg-blue-9"],
html[data-theme="light"] body a[class*="bg-cyan-9"],
html[data-theme="light"] body a[class*="bg-emerald-9"],
html[data-theme="light"] body a[class*="bg-violet-9"],
html[data-theme="light"] body a[class*="bg-amber-9"],
html[data-theme="light"] body a[class*="bg-red-9"],
html[data-theme="light"] body a[class*="bg-teal-9"],
html[data-theme="light"] body a[class*="bg-sky-9"],
html[data-theme="light"] body a[class*="bg-indigo-9"],
html[data-theme="light"] body a[class*="bg-blue-9"] {
    color: var(--asr-navy) !important;
    background-color: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

/*
 * Yorug' rejim: to'q ko'k/indigo CTA (500–800) — fon to'q, matn oq.
 * 900-seriya qoidasidan keyin: bg-indigo-700 kabi klasslar bg-indigo-9 ga mos kelmaydi.
 */
html[data-theme="light"] body button[class~="bg-blue-500"],
html[data-theme="light"] body button[class~="bg-blue-600"],
html[data-theme="light"] body button[class~="bg-blue-700"],
html[data-theme="light"] body button[class*="bg-blue-500/"],
html[data-theme="light"] body button[class*="bg-blue-600/"],
html[data-theme="light"] body button[class~="bg-indigo-500"],
html[data-theme="light"] body button[class~="bg-indigo-600"],
html[data-theme="light"] body button[class~="bg-indigo-700"],
html[data-theme="light"] body button[class~="bg-indigo-800"],
html[data-theme="light"] body button[class~="bg-sky-600"],
html[data-theme="light"] body button[class~="bg-sky-700"],
html[data-theme="light"] body a[class~="bg-blue-500"],
html[data-theme="light"] body a[class~="bg-blue-600"],
html[data-theme="light"] body a[class~="bg-blue-700"],
html[data-theme="light"] body a[class*="bg-blue-500/"],
html[data-theme="light"] body a[class*="bg-blue-600/"],
html[data-theme="light"] body a[class~="bg-indigo-500"],
html[data-theme="light"] body a[class~="bg-indigo-600"],
html[data-theme="light"] body a[class~="bg-indigo-700"],
html[data-theme="light"] body a[class~="bg-indigo-800"] {
    color: #f8fafc !important;
    background-color: #2563eb !important;
    border-color: #1d4ed8 !important;
}

html[data-theme="light"] body button[class~="bg-indigo-500"],
html[data-theme="light"] body button[class~="bg-indigo-600"],
html[data-theme="light"] body button[class~="bg-indigo-700"],
html[data-theme="light"] body button[class~="bg-indigo-800"],
html[data-theme="light"] body a[class~="bg-indigo-500"],
html[data-theme="light"] body a[class~="bg-indigo-600"],
html[data-theme="light"] body a[class~="bg-indigo-700"],
html[data-theme="light"] body a[class~="bg-indigo-800"] {
    background-color: #4338ca !important;
    border-color: #3730a3 !important;
}

html[data-theme="light"] body button[class~="bg-blue-500"],
html[data-theme="light"] body button[class*="bg-blue-500/"],
html[data-theme="light"] body a[class~="bg-blue-500"],
html[data-theme="light"] body a[class*="bg-blue-500/"] {
    background-color: #3b82f6 !important;
    border-color: #2563eb !important;
}

html[data-theme="light"] body input[type="file"]::file-selector-button {
    color: #f8fafc !important;
    background-color: #2563eb !important;
}

html[data-theme="light"] body a[class*="bg-gradient-to-r"],
html[data-theme="light"] body a[class*="bg-gradient-to-br"],
html[data-theme="light"] body button[class*="bg-gradient-to-r"],
html[data-theme="light"] body button[class~="bg-violet-700"],
html[data-theme="light"] body button[class~="bg-violet-600"],
html[data-theme="light"] body button.tab-btn[class~="bg-violet-700"] {
    color: #f8fafc !important;
}

html body .step-num,
html body .step-num * {
    color: #ffffff !important;
}

html body .lang-btn.lang-active {
    color: #f8fafc !important;
}

/* Guide / Dashboard icon-wrap — unified matn qoidasidan ustun */
html body .icon-wrap,
html body .icon-wrap svg,
html body .section-icon,
html body .section-icon svg,
html body .step-icon svg,
html body .guide-cta-icon {
    color: #ffffff !important;
}
html body .icon-wrap.icon-brand img {
    color: inherit !important;
}
