/* ============================================================
   Cloudream API — Gallery-Grade Monochrome Skin for new-api SPA
   Covers /pricing (模型广场), /dashboard (控制台), /sign-in, etc.
   Aligned with cloudream.app docs/design-system.md (OKLCH Zinc)
   ============================================================ */

html:root,
html.light,
html[data-theme-preset="default"],
html.light[data-theme-preset="default"] {
  color-scheme: light;
  --radius: 0.875rem;
  --font-ui-sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-body: var(--font-ui-sans);
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", Georgia, serif;

  --background: #f7f7f9;
  --foreground: #0b0b0e;
  --card: #ffffff;
  --card-foreground: #0b0b0e;
  --popover: #ffffff;
  --popover-foreground: #0b0b0e;

  --primary: #0f0f13;
  --primary-foreground: #fafafa;
  --secondary: #f1f1f4;
  --secondary-foreground: #141418;
  --muted: #f2f2f5;
  --muted-foreground: #5c5c66;
  --accent: #e9e9ef;
  --accent-foreground: #0b0b0e;

  --border: rgba(12, 12, 16, 0.055);
  --input: rgba(12, 12, 16, 0.085);
  --ring: rgba(12, 12, 16, 0.24);

  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --success: #16a34a;
  --success-foreground: #ffffff;
  --warning: #b45309;
  --warning-foreground: #ffffff;
  --info: #3f3f46;
  --info-foreground: #fafafa;
  --neutral: #52525b;
  --neutral-foreground: #fafafa;

  --sidebar: transparent;
  --sidebar-foreground: #111115;
  --sidebar-primary: #0f0f13;
  --sidebar-primary-foreground: #fafafa;
  --sidebar-accent: rgba(12, 12, 16, 0.065);
  --sidebar-accent-foreground: #0b0b0e;
  --sidebar-border: transparent;
  --sidebar-ring: rgba(12, 12, 16, 0.25);

  --chart-1: #18181b;
  --chart-2: #52525b;
  --chart-3: #8c8c96;
  --chart-4: #16a34a;
  --chart-5: #b45309;
  --overview-accent-1: #18181b;
  --overview-accent-2: #52525b;
  --overview-accent-3: #8c8c96;

  --skeleton-base: #ececf0;
  --skeleton-highlight: #f7f7fa;
}

html.dark,
html.dark[data-theme-preset="default"] {
  color-scheme: dark;
  --background: #08080a;
  --foreground: #f6f6f8;
  --card: #111115;
  --card-foreground: #f6f6f8;
  --popover: #16161b;
  --popover-foreground: #f6f6f8;

  --primary: #f4f4f6;
  --primary-foreground: #0a0a0d;
  --secondary: #1b1b21;
  --secondary-foreground: #ececef;
  --muted: #18181e;
  --muted-foreground: #9696a2;
  --accent: #22222a;
  --accent-foreground: #ffffff;

  --border: rgba(255, 255, 255, 0.048);
  --input: rgba(255, 255, 255, 0.085);
  --ring: rgba(255, 255, 255, 0.26);

  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --success: #4ade80;
  --success-foreground: #09090b;
  --warning: #e5a94c;
  --warning-foreground: #09090b;
  --info: #a1a1aa;
  --info-foreground: #09090b;
  --neutral: #a1a1aa;
  --neutral-foreground: #09090b;

  /* Fully transparent floating sidebar rail (seamless full-bleed cosmic sky) */
  --sidebar: transparent;
  --sidebar-foreground: #e8e8ec;
  --sidebar-primary: #f4f4f6;
  --sidebar-primary-foreground: #0a0a0d;
  --sidebar-accent: rgba(255, 255, 255, 0.09);
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: transparent;
  --sidebar-ring: rgba(255, 255, 255, 0.28);

  --chart-1: #f4f4f6;
  --chart-2: #a1a1aa;
  --chart-3: #63636e;
  --chart-4: #4ade80;
  --chart-5: #e5a94c;
  --overview-accent-1: #f4f4f6;
  --overview-accent-2: #a1a1aa;
  --overview-accent-3: #71717a;

  --skeleton-base: #191920;
  --skeleton-highlight: #24242d;
}

/* ---------- Dark-mode Logo Swap (preserved) ---------- */
html.dark a:has(img[src*="logo-swap.png"]) {
  background: url("https://cloudream.pro/logo-clean.png?v=202611122117") left center / contain no-repeat !important;
}
html.dark a:has(img[src*="logo-swap.png"]) img[src*="logo-swap.png"] {
  opacity: 0 !important;
}

/* ---------- Base Canvas Atmosphere & Typography ---------- */
body {
  font-family: var(--font-ui-sans) !important;
  background-color: var(--background) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Serene Cloudream zenith skylight & cosmic stage across SPA pages */
body {
  position: relative;
}
#root {
  position: relative;
  z-index: 1;
}

/* Let the fixed Cloudream cosmic backdrop shine cleanly behind ALL SPA layout shells
   (pricing, dashboard, logs, tokens, channels, settings, auth) while keeping inputs/modals solid */
#root > div.bg-background,
#root > div > div.bg-background,
#root > div > div > div.bg-background,
#root main.bg-background,
#root [data-slot="sidebar-wrapper"],
#root [data-slot="sidebar-inset"],
#root [data-slot="sidebar-inset"] > main,
#root [data-slot="sidebar-inset"] > div.bg-background,
#root div.min-h-svh.bg-background,
#root div.min-h-screen.bg-background {
  background-color: transparent !important;
}

/* Keep inputs, buttons, badges, dialogs & sheets crisp */
input.bg-background,
textarea.bg-background,
select.bg-background,
[role="dialog"].bg-background,
[data-slot="dialog-content"],
[data-slot="sheet-content"],
[data-slot="popover-content"] {
  background-color: var(--popover) !important;
}

.cloudream-spa-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cloudream-spa-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cloudream-spa-bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.036) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.036) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(86% 58% at 52% 10%, #000 0%, rgba(0, 0, 0, 0.38) 56%, transparent 100%);
  mask-image: radial-gradient(86% 58% at 52% 10%, #000 0%, rgba(0, 0, 0, 0.38) 56%, transparent 100%);
}
html.light .cloudream-spa-bg__grid {
  background-image:
    linear-gradient(to right, rgba(12, 12, 16, 0.042) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(12, 12, 16, 0.042) 1px, transparent 1px);
}

.cloudream-spa-bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.034;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}

/* Ensure nested dashboard layout divs never paint an opaque wall over #cloudreamSpaBg */
html.cloudream-dashboard #root div.bg-background:not([role="dialog"]):not([data-slot="dialog-content"]):not([data-slot="popover-content"]):not([data-slot="sheet-content"]):not([data-slot="dropdown-menu-content"]):not([data-slot="tooltip-content"]),
html.cloudream-dashboard #root section.bg-background,
html.cloudream-dashboard #root main.bg-background {
  background-color: transparent !important;
}

/* Prevent outer inset sidebar-wrapper from double-painting a dark wall behind the sidebar */
html.cloudream-dashboard [data-slot="sidebar-wrapper"],
html.cloudream-dashboard .has-data-\[variant\=inset\]\:bg-sidebar {
  background-color: transparent !important;
}

/* Console topbar & fully transparent floating left sidebar rail */
html.dark.cloudream-dashboard header {
  background-color: rgba(8, 8, 10, 0.28) !important;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  border-bottom-color: rgba(255, 255, 255, 0.035) !important;
}
html.dark.cloudream-dashboard [data-sidebar="sidebar"],
html.dark.cloudream-dashboard [data-slot="sidebar"],
html.dark.cloudream-dashboard [data-slot="sidebar-container"],
html.dark.cloudream-dashboard aside[class*="bg-sidebar"],
html.dark.cloudream-dashboard div.bg-sidebar,
html.dark.cloudream-dashboard nav.bg-sidebar {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-right: 0 !important;
  box-shadow: none !important;
}
html.dark.cloudream-dashboard [data-sidebar="menu-button"][data-active="true"],
html.dark.cloudream-dashboard [data-slot="sidebar-menu-button"][data-active="true"] {
  background: rgba(255, 255, 255, 0.10) !important;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  color: #ffffff !important;
}
html.dark.cloudream-dashboard .bg-card:not([data-slot="dialog-content"]):not([data-slot="popover-content"]) {
  background-color: rgba(15, 15, 21, 0.70) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
html.light.cloudream-dashboard header {
  background-color: rgba(248, 248, 250, 0.42) !important;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  border-bottom-color: rgba(12, 12, 16, 0.045) !important;
}
html.light.cloudream-dashboard [data-sidebar="sidebar"],
html.light.cloudream-dashboard [data-slot="sidebar"],
html.light.cloudream-dashboard [data-slot="sidebar-container"],
html.light.cloudream-dashboard aside[class*="bg-sidebar"],
html.light.cloudream-dashboard div.bg-sidebar,
html.light.cloudream-dashboard nav.bg-sidebar {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-right: 0 !important;
  box-shadow: none !important;
}
html.light.cloudream-dashboard .bg-card:not([data-slot="dialog-content"]):not([data-slot="popover-content"]) {
  background-color: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

table,
td,
th,
code,
pre,
[data-slot="badge"],
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--foreground) 18%, transparent) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--foreground) 18%, transparent);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in oklab, var(--foreground) 34%, transparent);
}

/* ---------- Top Header Bar (Refined Floating Glass) ---------- */
body > #root > div > header {
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

html.dark header[class*="rounded-2xl"],
html.dark header[class*="rounded-full"],
html.dark header > div[class*="rounded-2xl"] {
  background: rgba(16, 16, 21, 0.78) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 40px -14px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(255, 255, 255, 0.09) !important;
}

/* Crisp notification bell count badge (fixes dim text on dark header) */
header button span[class*="bg-destructive"],
header button span[class*="bg-red"],
header button span[class*="bg-rose"],
header button span.absolute,
header a span[class*="bg-destructive"],
header a span[class*="bg-red"] {
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* Ecosystem nav link polish */
a.cloudream-main-nav {
  opacity: 0.92;
}
a.cloudream-main-nav::after {
  content: " ↗";
  font-size: 0.76em;
  opacity: 0.58;
}

/* ---------- Primary Buttons (Pressed Material §5) ---------- */
button.bg-primary,
a.bg-primary,
[data-slot="button"].bg-primary {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 0 rgba(0, 0, 0, 0.24),
    0 4px 12px -4px rgba(0, 0, 0, 0.24);
  transition: filter 150ms cubic-bezier(0.22, 1, 0.36, 1), transform 120ms cubic-bezier(0.22, 1, 0.36, 1), background-color 150ms ease;
}

html.dark button.bg-primary,
html.dark a.bg-primary,
html.dark [data-slot="button"].bg-primary {
  background-image: linear-gradient(180deg, #ffffff 0%, #e4e4e7 100%);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 1px 0 rgba(0, 0, 0, 0.45),
    0 8px 20px -8px rgba(0, 0, 0, 0.65);
}

button.bg-primary:hover:not(:disabled),
a.bg-primary:hover,
[data-slot="button"].bg-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}
html.dark button.bg-primary:hover:not(:disabled),
html.dark a.bg-primary:hover,
html.dark [data-slot="button"].bg-primary:hover:not(:disabled) {
  filter: brightness(0.94);
}
button.bg-primary:active:not(:disabled),
a.bg-primary:active,
[data-slot="button"].bg-primary:active:not(:disabled) {
  transform: scale(0.975);
}

/* ---------- Sculpted Gallery Cards (/pricing & /dashboard) ---------- */
[data-slot="card"] {
  border-radius: 18px !important;
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 240ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease;
}

html.dark [data-slot="card"] {
  background-color: rgba(17, 17, 22, 0.74) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background-image:
    radial-gradient(90% 60% at 10% -15%, rgba(255, 255, 255, 0.048), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.026) 0%, rgba(255, 255, 255, 0.006) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(255, 255, 255, 0.042),
    0 14px 36px -18px rgba(0, 0, 0, 0.72) !important;
}

html.light [data-slot="card"] {
  background-color: rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 1px rgba(12, 12, 16, 0.05),
    0 8px 24px -12px rgba(0, 0, 0, 0.07) !important;
}

/* Interactive lift on Model Plaza cards */
html.dark .group\/card[data-slot="card"]:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 0 0 1px rgba(255, 255, 255, 0.10),
    0 24px 48px -18px rgba(0, 0, 0, 0.88) !important;
}

html.light .group\/card[data-slot="card"]:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 0 0 1px rgba(12, 12, 16, 0.11),
    0 20px 40px -16px rgba(0, 0, 0, 0.12) !important;
}

/* ---------- Model Plaza (/pricing) — Gallery Art Polish ---------- */

/* Remove jarring stock cool-blue/teal radial banner behind 模型广场 hero */
html.cloudream-pricing #root div.relative > div[aria-hidden="true"],
html.cloudream-pricing #root div.relative > div.pointer-events-none[class*="bg-"] {
  opacity: 0 !important;
}

/* Sculpted editorial headline on /pricing */
html.cloudream-pricing header.text-center h1 {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
}
html.dark.cloudream-pricing header.text-center h1 {
  background: linear-gradient(180deg, #ffffff 18%, #d4d4d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Elevated Cloudream glass search bar (⌘K) */
html.cloudream-pricing input[aria-label="搜索模型"] {
  height: 46px !important;
  border-radius: 15px !important;
  font-size: 14px !important;
  transition: border-color 200ms ease, box-shadow 220ms ease, background-color 200ms ease;
}
html.dark.cloudream-pricing input[aria-label="搜索模型"] {
  background: rgba(20, 20, 26, 0.80) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 36px -14px rgba(0, 0, 0, 0.76) !important;
}
html.dark.cloudream-pricing input[aria-label="搜索模型"]:focus {
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 3px rgba(255, 255, 255, 0.05),
    0 16px 40px -14px rgba(0, 0, 0, 0.85) !important;
}
html.light.cloudream-pricing input[aria-label="搜索模型"] {
  background: #ffffff !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 8px 24px -10px rgba(0, 0, 0, 0.10) !important;
}

/* Filter sidebar refined glass panel (surface contrast instead of harsh borders) */
html.cloudream-pricing aside.bg-card {
  border-radius: 20px !important;
  padding: 16px !important;
  border-color: transparent !important;
}
html.dark.cloudream-pricing aside.bg-card {
  background: rgba(17, 17, 22, 0.74) !important;
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    0 0 0 1px rgba(255, 255, 255, 0.038),
    0 18px 42px -18px rgba(0, 0, 0, 0.78);
}

/* Filter pills — borderless soft surface fill + crisp monochrome inverted active state */
html.cloudream-pricing aside [data-slot="collapsible-content"] button[data-slot="button"] {
  border-radius: 999px !important;
  border-color: transparent !important;
  font-size: 12px !important;
  transition: background-color 150ms ease, color 150ms ease, transform 140ms ease;
}
html.dark.cloudream-pricing aside [data-slot="collapsible-content"] button[data-slot="button"][aria-pressed="false"] {
  background: rgba(255, 255, 255, 0.045) !important;
}
html.dark.cloudream-pricing aside [data-slot="collapsible-content"] button[data-slot="button"][aria-pressed="false"]:hover {
  background: rgba(255, 255, 255, 0.085) !important;
}
html.light.cloudream-pricing aside [data-slot="collapsible-content"] button[data-slot="button"][aria-pressed="false"] {
  background: rgba(12, 12, 16, 0.04) !important;
}
html.light.cloudream-pricing aside [data-slot="collapsible-content"] button[data-slot="button"][aria-pressed="false"]:hover {
  background: rgba(12, 12, 16, 0.075) !important;
}
html.cloudream-pricing aside [data-slot="collapsible-content"] button[data-slot="button"][aria-pressed="true"] {
  background: var(--primary) !important;
  color: var(--primary-foreground) !important;
  border-color: transparent !important;
  font-weight: 600 !important;
}
html.cloudream-pricing aside [data-slot="collapsible-content"] button[data-slot="button"][aria-pressed="true"] * {
  color: var(--primary-foreground) !important;
}
html.dark.cloudream-pricing aside [data-slot="collapsible-content"] button[data-slot="button"][aria-pressed="true"] span[class*="bg-"] {
  background: rgba(10, 10, 14, 0.14) !important;
  color: #0a0a0d !important;
}
html.light.cloudream-pricing aside [data-slot="collapsible-content"] button[data-slot="button"][aria-pressed="true"] span[class*="bg-"] {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fafafa !important;
}

/* Toolbar bar above model grid */
html.cloudream-pricing main > div:first-child {
  border-radius: 18px !important;
  padding: 12px 16px !important;
  border-color: transparent !important;
}
html.dark.cloudream-pricing main > div:first-child {
  background: rgba(17, 17, 22, 0.74) !important;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065), 0 0 0 1px rgba(255, 255, 255, 0.038);
}

/* Recessed segmented toggle-group (§4.5 — borderless track) */
[data-slot="toggle-group"] {
  border-radius: 11px !important;
  padding: 2px !important;
  background: var(--muted) !important;
  border: 0 !important;
}
[data-slot="toggle-group-item"] {
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
[data-slot="toggle-group-item"][aria-pressed="true"],
[data-slot="toggle-group-item"][data-state="on"] {
  background: var(--card) !important;
  color: var(--foreground) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

/* Provider icon well inside model card */
html.cloudream-pricing [data-slot="card-header"] div.size-10 {
  border-radius: 12px !important;
}
html.dark.cloudream-pricing [data-slot="card-header"] div.size-10 {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.025) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

/* Recessed glass pricing spec plate inside each model card (no inner box border!) */
html.cloudream-pricing div[role="group"][aria-label="定价"] {
  border-radius: 13px !important;
  padding: 11px 13px !important;
  border: 0 !important;
}
html.dark.cloudream-pricing div[role="group"][aria-label="定价"] {
  background: rgba(0, 0, 0, 0.26) !important;
  box-shadow: none;
}
html.light.cloudream-pricing div[role="group"][aria-label="定价"] {
  background: rgba(12, 12, 16, 0.028) !important;
}

/* Neutralize loud orange `动态计费` text into borderless refined monochrome pill */
html.cloudream-pricing div[role="group"][aria-label="定价"] [data-slot="status-badge"] {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
  color: var(--foreground) !important;
  background: color-mix(in oklab, var(--foreground) 8%, transparent) !important;
  border: 0 !important;
  margin-bottom: 6px;
}

/* ---------- Console / Dashboard (/dashboard & admin views) — App Sheet & Tables ---------- */

/* Sidebar polish */
[data-sidebar="sidebar"],
aside[class*="bg-sidebar"] {
  border-color: var(--sidebar-border) !important;
}

/* Dashboard inset stays transparent so cosmic canvas shines through */
@media (min-width: 1024px) {
  [data-slot="sidebar-inset"] {
    background-color: transparent !important;
  }
}

/* Refined Tables (Logs, Tokens, Pricing Table View, Channels) */
[data-slot="table-container"] {
  border-radius: 16px !important;
  border: 1px solid var(--border) !important;
  background: color-mix(in oklab, var(--card) 74%, transparent) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}
[data-slot="table-header"] th,
[data-slot="table"] thead th {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: var(--muted-foreground) !important;
  background: color-mix(in oklab, var(--muted) 75%, transparent) !important;
  border-bottom: 1px solid var(--border) !important;
}
[data-slot="table"] tbody tr {
  border-color: var(--border) !important;
  transition: background-color 140ms ease;
}
[data-slot="table"] tbody tr:hover {
  background: color-mix(in oklab, var(--accent) 55%, transparent) !important;
}

/* Modals, Popovers & Dropdown Menus (Frosted Obsidian Glass) */
[data-slot="dialog-content"],
[data-slot="dropdown-menu-content"],
[data-slot="popover-content"],
[data-slot="select-content"] {
  border-radius: 16px !important;
  border-color: var(--border) !important;
  backdrop-filter: blur(22px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
}
html.dark [data-slot="dialog-content"],
html.dark [data-slot="dropdown-menu-content"],
html.dark [data-slot="popover-content"] {
  background: rgba(18, 18, 23, 0.90) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 60px -16px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* Inputs & Select triggers */
input[data-slot="input"],
textarea[data-slot="textarea"],
[data-slot="select-trigger"] {
  border-radius: 11px !important;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

/* Neutralize stray stock blue/purple gradient headings if old SPA home ever renders */
section h1 [class*="bg-gradient"],
section h1 .bg-clip-text {
  background-image: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--foreground) !important;
}
