/* Mailera design tokens — single source of truth for colour, type, spacing, radius, elevation and layout.
   Original design language inspired by modern commerce-admin products; no third-party branding or assets.
   Rule: components consume semantic tokens (--surface, --text, --brand …), never raw hex values. */
:root {
  /* ---- raw palette ---- */
  --green-700: #006e52; --green-600: #008060; --green-500: #1a9474; --green-100: #e5f3ef; --green-50: #f1f9f6;
  --gray-0: #ffffff; --gray-50: #f6f6f7; --gray-100: #f1f2f3; --gray-200: #e3e5e7; --gray-400: #8c9196; --gray-600: #616a75; --gray-900: #202223;
  --red-600: #d72c0d; --red-100: #fbeae5; --amber-600: #b98900; --amber-100: #fcf1cd; --blue-600: #2c6ecb; --blue-100: #eaf2fc;

  /* ---- semantic colour ---- */
  --brand: var(--green-600); --brand-hover: var(--green-700); --brand-soft: var(--green-100); --brand-contrast: #ffffff;
  --bg: var(--gray-50); --surface: var(--gray-0); --surface-2: var(--gray-50); --surface-3: var(--gray-100);
  --border: var(--gray-200); --border-strong: #c9cccf;
  --text: var(--gray-900); --muted: var(--gray-600); --subtle: var(--gray-400); --link: var(--blue-600);
  --success: var(--green-600); --success-bg: var(--green-100);
  --warning: var(--amber-600); --warning-text: #7a5a00; --warning-bg: var(--amber-100);
  --danger: var(--red-600); --danger-bg: var(--red-100);
  --info: var(--blue-600); --info-bg: var(--blue-100);
  --neutral: var(--gray-600); --neutral-bg: var(--gray-100);
  --focus: var(--blue-600); --overlay: rgba(32, 34, 35, .5);
  --shell-bg: var(--gray-900); --shell-fg: #ffffff; --shell-muted: #b5b9bd; --shell-field: #3a3d40;
  --hover: rgba(32, 34, 35, .05); --selected: var(--green-100);

  /* ---- typography ---- */
  --font: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs: .875rem; --fs-lg: 1rem; --fs-h2: 1.125rem; --fs-h1: 1.5rem; --fs-metric: 1.75rem;
  --lh: 1.5; --lh-tight: 1.25;

  /* ---- spacing (4px scale) ---- */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 2.5rem; --sp-8: 3rem;

  /* ---- shape & elevation ---- */
  --radius: .5rem; --radius-sm: .375rem; --radius-lg: .75rem; --radius-pill: 999px;
  --shadow: 0 1px 0 rgba(26, 26, 26, .07), 0 0 0 1px rgba(26, 26, 26, .05);
  --shadow-md: 0 3px 6px -3px rgba(23, 24, 24, .08), 0 8px 20px -4px rgba(23, 24, 24, .12);
  --shadow-lg: 0 8px 16px -4px rgba(23, 24, 24, .12), 0 18px 40px -8px rgba(23, 24, 24, .24);

  /* ---- layout ---- */
  --shell-h: 3.5rem; --side-w: 15rem; --side-w-collapsed: 4rem; --content-w: 90rem; --page-pad: var(--sp-5); --card-pad: var(--sp-4);
  --z-sticky: 20; --z-side: 30; --z-top: 40; --z-drop: 50; --z-overlay: 60; --z-toast: 80;
  --ease: cubic-bezier(.2, .8, .2, 1); --dur: .15s;
}
:root[data-theme="dark"] {
  --brand: #3dbd96; --brand-hover: #5ccfab; --brand-soft: #123a2e; --brand-contrast: #06231a;
  --bg: #111314; --surface: #1a1d1f; --surface-2: #202427; --surface-3: #272c2f;
  --border: #30363a; --border-strong: #454c52;
  --text: #ecedee; --muted: #a6adb4; --subtle: #7d858c; --link: #7fb3f5;
  --success: #3dbd96; --success-bg: #123a2e; --warning: #f0b429; --warning-text: #f0b429; --warning-bg: #3b2f0b;
  --danger: #ff7a62; --danger-bg: #44201a; --info: #7fb3f5; --info-bg: #14283f;
  --neutral: #a6adb4; --neutral-bg: #272c2f;
  --focus: #7fb3f5; --overlay: rgba(0, 0, 0, .65);
  --shell-bg: #0b0c0d; --shell-field: #25292c; --hover: rgba(255, 255, 255, .06); --selected: #123a2e;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06); --shadow-md: 0 8px 20px rgba(0, 0, 0, .45); --shadow-lg: 0 18px 40px rgba(0, 0, 0, .6);
}
