/* Dark mode overrides — порт из design-shablon/src/index.css */

* {
    transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html.dark,
html.dark body,
html.dark #root,
html.dark #app-root {
    color-scheme: dark;
    background-color: #0b0f19 !important;
    color: #f1f5f9 !important;
}

html.dark .bg-white,
html.dark [class*="bg-white"],
html.dark [class*="bg-[#FAFAFA]"],
html.dark [class*="bg-[#fafafa]"],
html.dark [class*="bg-[#F9FAFB]"],
html.dark [class*="bg-[#f9fafb]"],
html.dark [class*="bg-[#F8FAFC]"],
html.dark [class*="bg-[#f8fafc]"],
html.dark [class*="bg-[#ffffff]"],
html.dark [class*="bg-[#fff]"] {
    background-color: #161e2e !important;
}

html.dark .bg-gray-50,
html.dark [class*="bg-gray-50"],
html.dark .bg-slate-50,
html.dark [class*="bg-slate-50"],
html.dark .bg-zinc-50,
html.dark [class*="bg-zinc-50"] {
    background-color: #0f172a !important;
}

html.dark .bg-gray-100,
html.dark [class*="bg-gray-100"],
html.dark .bg-slate-100,
html.dark [class*="bg-slate-100"],
html.dark .bg-zinc-100,
html.dark [class*="bg-zinc-100"] {
    background-color: #1e293b !important;
}

html.dark .bg-gray-200,
html.dark [class*="bg-gray-200"],
html.dark .bg-slate-200,
html.dark [class*="bg-slate-200"] {
    background-color: #334155 !important;
}

html.dark .bg-blue-50,
html.dark [class*="bg-blue-50"] {
    background-color: #1e293b !important;
}

html.dark .bg-emerald-50,
html.dark [class*="bg-emerald-50"] {
    background-color: #064e3b40 !important;
}

html.dark .bg-purple-50,
html.dark [class*="bg-purple-50"] {
    background-color: #581c8740 !important;
}

html.dark .bg-indigo-50,
html.dark [class*="bg-indigo-50"] {
    background-color: #312e8140 !important;
}

html.dark .bg-amber-50,
html.dark [class*="bg-amber-50"] {
    background-color: #78350f40 !important;
}

html.dark .bg-cyan-50,
html.dark [class*="bg-cyan-50"] {
    background-color: #164e6340 !important;
}

html.dark .bg-rose-50,
html.dark [class*="bg-rose-50"] {
    background-color: #88133740 !important;
}

/* Text colors in dark mode */
html.dark .text-gray-900,
html.dark .text-slate-900,
html.dark .text-black {
    color: #f8fafc !important;
}

html.dark .text-gray-800,
html.dark .text-slate-800 {
    color: #f1f5f9 !important;
}

html.dark .text-gray-700,
html.dark .text-slate-700 {
    color: #e2e8f0 !important;
}

html.dark .text-gray-600,
html.dark .text-slate-600 {
    color: #cbd5e1 !important;
}

html.dark .text-gray-500,
html.dark .text-gray-400,
html.dark .text-slate-500,
html.dark .text-slate-400 {
    color: #94a3b8 !important;
}

html.dark .text-blue-900,
html.dark .text-blue-800,
html.dark .text-blue-700 {
    color: #93c5fd !important;
}

html.dark .text-purple-900,
html.dark .text-purple-800,
html.dark .text-purple-700 {
    color: #d8b4fe !important;
}

html.dark .text-indigo-900,
html.dark .text-indigo-800,
html.dark .text-indigo-700 {
    color: #a5b4fc !important;
}

html.dark .text-emerald-900,
html.dark .text-emerald-800,
html.dark .text-emerald-700 {
    color: #6ee7b7 !important;
}

html.dark .text-amber-900,
html.dark .text-amber-800,
html.dark .text-amber-700 {
    color: #fcd34d !important;
}

html.dark .text-cyan-900,
html.dark .text-cyan-800,
html.dark .text-cyan-700 {
    color: #67e8f9 !important;
}

html.dark .text-rose-900,
html.dark .text-rose-800,
html.dark .text-rose-700 {
    color: #fda4af !important;
}

/* Логотип в тёмном режиме — подсветка, чтобы не сливался */
html.dark .logo-img {
    filter: brightness(1.15) drop-shadow(0 0 10px rgba(255, 255, 255, 0.75));
    transition: filter 0.2s ease-out;
}

/* Borders & dividers */
html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-gray-300,
html.dark [class*="border-gray-"],
html.dark [class*="border-slate-"] {
    border-color: #2a364f !important;
}

html.dark [class*="divide-gray"] > * + *,
html.dark [class*="divide-slate"] > * + * {
    border-color: #2a364f !important;
}

/* Forms */
html.dark input,
html.dark select,
html.dark textarea {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}

html.dark table,
html.dark th,
html.dark td {
    border-color: #2a364f !important;
}

html.dark th {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
}

/* Fixed headers, nav bars & modals */
html.dark header,
html.dark nav,
html.dark .sticky,
html.dark [role="dialog"],
html.dark .modal-content {
    background-color: #161e2e !important;
    border-color: #2a364f !important;
}

/* Modals backdrop */
html.dark .bg-black\/50,
html.dark .bg-black\/60,
html.dark .bg-gray-900\/50,
html.dark .bg-gray-900\/60,
html.dark .bg-black-50,
html.dark .bg-black-60 {
    background-color: rgba(0, 0, 0, 0.75) !important;
}

/* Scrollbars in dark mode */
html.dark ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
html.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}
html.dark ::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
html.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}
