/* Coss/shadcn-inspired neutral palette.
   Class names preserved from Element-UI era — only token values changed. */
:root {
  /* Neutral foundation (oklch-equivalent in hex for compat) */
  --color-bg: #ffffff;
  --color-bg-muted: #fafafa;
  --color-bg-subtle: #f4f4f5;
  --color-fg: #09090b;
  --color-fg-muted: #52525b;
  --color-fg-subtle: #71717a;
  --color-border: #e4e4e7;
  --color-border-strong: #d4d4d8;
  --color-ring: #18181b;

  /* Accent — keep one cool tone for primary actions/links */
  --ea-primary: #18181b;
  --ea-primary-hover: #27272a;
  --ea-primary-active: #09090b;
  --ea-primary-bg: #f4f4f5;
  --ea-primary-light: #e4e4e7;

  /* Status — muted, not loud */
  --ea-success: #16a34a;
  --ea-success-bg: #f0fdf4;
  --ea-warning: #ca8a04;
  --ea-warning-bg: #fefce8;
  --ea-danger: #dc2626;
  --ea-danger-bg: #fef2f2;
  --ea-info: #64748b;
  --ea-info-bg: #f8fafc;

  /* Sidebar — LIGHT, not dark */
  --sidebar-bg: #ffffff;
  --sidebar-bg-dk: #f4f4f5;
  --sidebar-bg-hover: #f4f4f5;
  --sidebar-text: #52525b;
  --sidebar-text-active: #09090b;
  --sidebar-active-marker: #18181b;
  --sidebar-logo-bg: #ffffff;
  --sidebar-border: #e4e4e7;

  /* Topbar */
  --topbar-bg: #ffffff;
  --topbar-border: #e4e4e7;
  --topbar-shadow: none;

  /* Content + cards */
  --content-bg: #fafafa;
  --card-bg: #ffffff;
  --card-border: #e4e4e7;
  --card-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 4px 12px -2px rgba(0, 0, 0, 0.06);

  /* Text */
  --text-primary: #09090b;
  --text-regular: #3f3f46;
  --text-secondary: #71717a;
  --text-placeholder: #a1a1aa;

  /* Border aliases (legacy) */
  --border-base: #d4d4d8;
  --border-light: #e4e4e7;
  --border-lighter: #f4f4f5;
  --border-extra-light: #fafafa;

  /* Radius — softer/tighter */
  --radius-base: 6px;
  --radius-small: 4px;
  --radius-large: 10px;

  /* Typography */
  --font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 14px;
  --font-size-small: 12px;
  --font-size-medium: 15px;
  --font-size-large: 17px;
  --font-size-extra-large: 20px;

  /* Layout */
  --sidebar-width: 220px;
  --sidebar-width-collapsed: 64px;
  --topbar-height: 56px;
  --transition-base: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing scale (shadcn-style 4px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-regular);
  background: var(--content-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a {
  color: var(--ea-primary);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--ea-primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--ea-primary);
  color: #fff;
}

/* Subtle scrollbar */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--color-fg-subtle);
}
