/*
 * Wxctf Ai console skin.
 * Loaded through the Nginx Link header so the upstream console bundle stays
 * untouched and can continue to receive upstream updates.
 */
body:has([data-slot="sidebar"]) {
  --background: #f8fafc;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --sidebar: #ffffff;
  --sidebar-foreground: #0f172a;
  --sidebar-accent: #eff6ff;
  --sidebar-accent-foreground: #1d4ed8;
  --success: #16a34a;
  color-scheme: light;
  background: var(--background);
  color: var(--foreground);
}

body:has([data-slot="sidebar"]) header.sticky {
  background: rgba(255, 255, 255, .88) !important;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  backdrop-filter: blur(18px);
}

body:has([data-slot="sidebar"]) [data-slot="sidebar"] {
  background: var(--sidebar) !important;
  border-right: 1px solid var(--border);
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-gap"] {
  background: var(--sidebar);
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-group-label"] {
  color: #94a3b8;
  letter-spacing: .12em;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-menu-button"] {
  min-height: 36px;
  border-radius: 10px;
  color: #475569;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-menu-button"]:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-menu-button"][data-active] {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  box-shadow: inset 3px 0 0 #2563eb;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] {
  background: var(--background) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] section {
  border-color: var(--border) !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] h2,
body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] h3 {
  color: #0f172a;
  letter-spacing: -.025em;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] button.bg-primary,
body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] a.bg-primary {
  background: #2563eb !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] button.bg-primary:hover,
body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] a.bg-primary:hover {
  background: #1d4ed8 !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] input,
body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] textarea,
body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] select {
  border-color: #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}

@media (max-width: 900px) {
  body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] {
    border-radius: 0 !important;
  }
}

/* Neutral navigation and a single white usage surface. Keep the blue only
   for actions and status, not as a persistent frame around the active item. */
body:has([data-slot="sidebar"]) [data-slot="sidebar-menu-button"][data-active] {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  box-shadow: none !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-menu-button"][data-active] svg {
  color: #2563eb !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] .bg-card {
  background: #ffffff !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] [class*="bg-[linear-gradient"] {
  /* Keep the balance block as a distinct panel, but use the same white
     surface as the usage overview instead of a competing blue field. */
  background: #ffffff !important;
  border-left: 0 !important;
  border-top: 0 !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] [class*="bg-[linear-gradient"] [class*="bg-background"] {
  /* The two balance facts remain grouped, with a quiet Apple-like keyline. */
  background: #f8fafc !important;
  border: 1px solid #dbe5f2 !important;
  border-color: #dbe5f2 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] [class*="bg-[linear-gradient"] .font-mono.text-xl {
  /* Make the balance the primary number without turning the whole panel blue. */
  display: inline-flex !important;
  width: max-content;
  align-items: center;
  padding: 6px 12px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 10px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
  letter-spacing: -.04em;
}

@media (min-width: 1280px) {
  body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] [class*="bg-[linear-gradient"] {
    border-left: 1px solid #e5e7eb !important;
  }
}

@media (max-width: 1279px) {
  body:has([data-slot="sidebar"]) [data-slot="sidebar-inset"] [class*="bg-[linear-gradient"] {
    border-top: 1px solid #e5e7eb !important;
  }
}

/* Wallet amount choices: one clear hierarchy per card instead of a dense
   grid of competing green labels. */
body:has([data-slot="sidebar"]) main button[data-slot="button"][class*="min-h-16"][class*="border-muted"] {
  min-height: 92px !important;
  padding: 15px 16px !important;
  border: 1px solid #dfe6ef !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}

body:has([data-slot="sidebar"]) main button[data-slot="button"][class*="min-h-16"][class*="border-muted"]:hover {
  border-color: #b9c9df !important;
  background: #f8fafc !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .06) !important;
  transform: translateY(-1px);
}

body:has([data-slot="sidebar"]) main button[data-slot="button"][class*="min-h-16"][class*="border-muted"] > div:first-child > div:first-child {
  color: #0f172a !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}

body:has([data-slot="sidebar"]) main button[data-slot="button"][class*="min-h-16"][class*="border-muted"] .text-green-600 {
  color: #2563eb !important;
}

body:has([data-slot="sidebar"]) main button[data-slot="button"][class*="min-h-16"][class*="border-muted"] > div:last-child {
  color: #64748b !important;
  line-height: 1.35;
}

body:has([data-slot="sidebar"]) main div.grid:has(> button[data-slot="button"][class*="min-h-16"][class*="border-muted"]) {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

@media (max-width: 900px) {
  body:has([data-slot="sidebar"]) main div.grid:has(> button[data-slot="button"][class*="min-h-16"][class*="border-muted"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
