/**
 * app.css — 全局 CSS 变量与入口说明
 *
 * 布局骨架：wwwroot/css/layout-shell.css
 * Crud 表格：wwwroot/css/crud-table.css
 * 弹窗宽度：wwwroot/css/dialog-max-width.css
 * 弹窗滚动：wwwroot/css/dialog-scroll.css
 * NeoSelect：wwwroot/css/neo-select.css
 */

:root {
  --sidebar-width: 14rem;
  --sidebar-width-mobile: 16rem;
  --sidebar-width-icon: 3.5rem;

  /* NeoUI 未定义 --selection，拖选文字高亮会几乎看不见（跟随主色） */
  --selection: color-mix(in oklch, var(--primary) 30%, transparent);
  --selection-foreground: var(--foreground);

  /* destructive：Toast.Error、Button Destructive、Alert Destructive 等；分片主题未内置 */
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.985 0 0);

  /* Alert 语义色：NeoUI.Blazor 组件引用这些变量，但主题包未内置，需应用层补齐 */
  --alert-success: oklch(0.55 0.20 142);
  --alert-success-foreground: oklch(0.30 0.09 142);
  --alert-success-bg: oklch(0.993 0.003 142);
  --alert-info: oklch(0.50 0.20 255);
  --alert-info-foreground: oklch(0.30 0.10 255);
  --alert-info-bg: oklch(0.993 0.003 255);
  --alert-warning: oklch(0.68 0.18 55);
  --alert-warning-foreground: oklch(0.35 0.10 55);
  --alert-warning-bg: oklch(0.995 0.003 55);
  --alert-danger: oklch(0.55 0.22 27);
  --alert-danger-foreground: oklch(0.30 0.12 27);
  --alert-danger-bg: oklch(0.993 0.003 27);
}

/* 主题「主色 = Default」时不加载 primary-*.css，需补齐 focus ring 所用变量 */
:root:not([class*="primary-"]) {
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --ring: oklch(0.556 0 0);
}

:root:not([class*="primary-"]).dark {
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --ring: oklch(0.708 0 0);
}

.dark {
  --destructive: oklch(0.704 0.191 22.216);
  --destructive-foreground: oklch(0.985 0 0);

  --alert-success: oklch(0.60 0.18 142);
  --alert-success-foreground: oklch(0.90 0.06 142);
  --alert-success-bg: oklch(0.18 0.008 142);
  --alert-info: oklch(0.55 0.18 255);
  --alert-info-foreground: oklch(0.90 0.05 255);
  --alert-info-bg: oklch(0.18 0.008 255);
  --alert-warning: oklch(0.65 0.16 55);
  --alert-warning-foreground: oklch(0.92 0.06 55);
  --alert-warning-bg: oklch(0.19 0.008 55);
  --alert-danger: oklch(0.55 0.20 27);
  --alert-danger-foreground: oklch(0.90 0.06 27);
  --alert-danger-bg: oklch(0.18 0.008 27);
}


