/* Focused dark-theme polish for the local AnyModel demo. */
/* Beat .dark .console-theme from the compiled stylesheet (specificity + order). */
html:root,
html body .console-theme,
html.dark .console-theme,
html[class] body .console-theme.dark,
.console-theme.dark {
  color-scheme: dark !important;
  --color-brand-50: #f5f5f5 !important;
  --color-brand-100: #e8e8e8 !important;
  --color-brand-200: #d4d4d4 !important;
  --color-brand-300: #bcbcbc !important;
  --color-brand-400: #a3a3a3 !important;
  --color-brand-500: #8a8a8a !important;
  --color-brand-600: #6f6f6f !important;
  --color-brand-700: #565656 !important;
  --color-brand-800: #3d3d3d !important;
  --color-brand-900: #262626 !important;
  --color-danger: #d0d0d0 !important;
  --color-success: #d0d0d0 !important;
  --color-warning: #d0d0d0 !important;
  --color-info: #d0d0d0 !important;
  --shadow-soft: 0 1px 2px 0 rgb(0 0 0 / 45%) !important;
  --shadow-warm: 0 2px 14px -2px rgb(0 0 0 / 45%) !important;
  --shadow-elevated: 0 12px 28px -4px rgb(0 0 0 / 50%) !important;
  --shadow-elev: inset 0 1px 0 0 rgb(255 255 255 / 6%), 0 12px 36px -8px rgb(0 0 0 / 50%) !important;
  --shadow-focus: 0 0 0 2px rgb(255 255 255 / 16%) !important;
  --color-primary: #eeeeee !important;
  --color-primary-hover: #ffffff !important;
  --color-accent: #eeeeee !important;
  --color-bg: #101114 !important;
  --color-bg-alt: #15161a !important;
  --color-surface: #18191e !important;
  --color-surface-2: #1e1f25 !important;
  --color-surface-3: #26272e !important;
  --color-sidebar: #141519 !important;
  --color-border: #303139 !important;
  --color-border-subtle: #25262c !important;
  --ring: #eeeeee !important;
  --color-text: #f0eff3 !important;
  --color-text-main: #f0eff3 !important;
  --color-text-muted: #a4a2ad !important;
  --color-text-subtle: #777681 !important;
  background: #101114 !important;
  color: #f0eff3 !important;
}

html, body {
  min-height: 100%;
  background: #101114 !important;
  color: #f0eff3 !important;
  -webkit-font-smoothing: antialiased;
}
::selection,
.console-theme ::selection,
.dark .console-theme ::selection {
  background: rgb(255 255 255 / 22%) !important;
  color: #fff !important;
}

/* Repair light theme utilities without flattening intentionally distinct surfaces. */
.bg-white, [class~="bg-white"], .bg-card, [class~="bg-card"], .bg-surface, [class~="bg-surface"] {
  background-color: #191a1f !important;
  color: #f0eff3 !important;
  border-color: #303139 !important;
}
.bg-gray-50, .bg-gray-100, .bg-zinc-50, .bg-neutral-50 {
  background-color: #202127 !important;
}
.text-black, .text-gray-900, .text-zinc-900, .text-neutral-900,
[class*="text-gray-9"], [class*="text-zinc-9"], [class*="text-neutral-9"], [class*="text-foreground"] {
  color: #f0eff3 !important;
}
.text-gray-500, .text-gray-600, .text-gray-700, .text-zinc-500, .text-zinc-600,
[class*="text-muted"] { color: #a4a2ad !important; }
.text-gray-400, .text-zinc-400 { color: #85838e !important; }
.text-primary-foreground { color: #111111 !important; }

header { background: rgb(16 17 20 / 88%) !important; border-color: #292a30 !important; }
nav, aside, footer, [class*="sidebar"], [class*="navbar"] { border-color: #303139 !important; }
nav a, aside a, header a { color: #c7c5ce !important; }
nav a:hover, aside a:hover, header a:hover { color: #fff !important; }

/* Give only explicit primary actions the accent treatment. */
a[class~="bg-primary"], button[class~="bg-primary"], .demo-btn:not(.secondary) {
  border-color: #eeeeee !important;
  border-radius: 6px !important;
  background: #eeeeee !important;
  color: #111111 !important;
  box-shadow: none !important;
  transition: background-color .16s ease, border-color .16s ease !important;
}
a[class~="bg-primary"]:hover, button[class~="bg-primary"]:hover, .demo-btn:not(.secondary):hover {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #111111 !important;
  transform: none !important;
}
button[class*="outline"], button[class*="ghost"], button[class*="secondary"],
a[class*="border"], a[class*="outline"], .demo-btn.secondary {
  background: #191a1f !important;
  color: #d7d5de !important;
  border-color: #3a3b43 !important;
}
button[class*="outline"]:hover, button[class*="ghost"]:hover, .demo-btn.secondary:hover {
  background: #25262c !important;
  border-color: #555660 !important;
}

input, textarea, select {
  background: #15161a !important;
  color: #f0eff3 !important;
  border-color: #3a3b43 !important;
  border-radius: 6px !important;
  caret-color: #eeeeee !important;
}
input::placeholder, textarea::placeholder { color: #777681 !important; }
input:focus, textarea:focus, select:focus {
  border-color: #eeeeee !important;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 16%) !important;
  outline: none !important;
}

/* Keep the background strictly monochrome and remove decorative texture. */
.console-grain, .console-aurora, .console-glow, [class*="blob-"] { display: none !important; }
body::before, body::after { background: none !important; }

/* Strictly monochrome: desaturate every image and replace the colored inline
   glow filters (violet/amber/cyan/emerald drop-shadows) with a neutral one. */
img, video, svg { filter: grayscale(1) !important; }
[style*="drop-shadow"] {
  filter: grayscale(1) drop-shadow(0 16px 46px rgb(255 255 255 / 9%)) !important;
}

/* Glass panels: dark translucent surface, neutral shadow, no saturation boost. */
.console-theme .glass,
.dark .console-theme .glass,
.console-theme .glass-strong,
.dark .console-theme .glass-strong {
  background: rgb(24 25 30 / 0.55) !important;
  border-color: #303139 !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: inset 0 1px 0 0 rgb(255 255 255 / 5%), 0 12px 36px -8px rgb(0 0 0 / 40%) !important;
}

/* Neutral scrollbars in case the compiled thumb color is used elsewhere. */
.console-theme .custom-scrollbar::-webkit-scrollbar-thumb,
.console-theme .custom-scrollbar::-webkit-scrollbar-thumb:hover,
.console-theme .scroll-thin-x::-webkit-scrollbar-thumb { background-color: #555 !important; }
.console-theme .scroll-thin-x { scrollbar-color: #555 transparent !important; }

.demo-login-modal { background: rgb(0 0 0 / 68%) !important; backdrop-filter: blur(4px); }
.demo-login-box {
  background: #191a1f !important;
  color: #f0eff3 !important;
  border: 1px solid #36373f !important;
  border-radius: 8px !important;
  box-shadow: 0 18px 54px rgb(0 0 0 / 45%) !important;
}
.demo-login-box p, .demo-cabinet p { color: #a4a2ad !important; }
.demo-login-box label { color: #c7c5ce !important; }
.demo-login-box input { background: #15161a !important; color: #f0eff3 !important; border-color: #3a3b43 !important; }
.demo-cabinet { max-width: 1180px !important; color: #f0eff3 !important; }
.demo-cabinet h1 { font-weight: 700 !important; }
.demo-cabinet-brand { color: #f0eff3 !important; }
.demo-cabinet-brand img, .mellowik-brand img { border-radius: 6px !important; box-shadow: none !important; }
.demo-note { background: #202127 !important; color: #c7c5ce !important; border: 1px solid #36373f !important; border-left: 3px solid #eeeeee !important; border-radius: 5px !important; }
.demo-grid { gap: 12px !important; }
.demo-card { background: #191a1f !important; color: #a4a2ad !important; border: 1px solid #303139 !important; border-radius: 6px !important; box-shadow: none !important; }
.demo-card strong { color: #f0eff3 !important; font-weight: 700 !important; }
.demo-nav a { background: #191a1f !important; color: #d7d5de !important; border: 1px solid #303139 !important; border-radius: 5px !important; }
.demo-nav a:hover { border-color: #555660 !important; background: #25262c !important; }
.demo-toast { background: #25262c !important; color: #f0eff3 !important; border-color: #3a3b43 !important; border-radius: 6px !important; }
.demo-error { color: #d0d0d0 !important; }
img, video { max-width: 100%; }
@media (max-width: 720px) {
  .demo-cabinet { padding: 36px 16px 64px !important; }
  .demo-cabinet h1 { font-size: 36px !important; }
  .demo-actions { align-items: stretch; }
  .demo-actions .demo-btn { flex: 1 1 100%; }
}

/* The demo login does not use an external challenge widget. */
.demo-login-box [class*="captcha" i], .demo-login-box [id*="captcha" i], .demo-login-box [data-sitekey],
.demo-login-box .g-recaptcha, .demo-login-box .h-captcha, .demo-login-box .cf-turnstile { display: none !important; }
