/* Berkay Deniz CRM — tasarım tokenları (kaynak: brand/crm-tasarim-promptu.md §3) */

:root {
  /* ---------- Marka (ham) ---------- */
  --bd-derin: #0A2540;
  --bd-dalga: #2ED3C6;
  --bd-dalga-metin: #0B6E68;
  --bd-akinti: #3F5B75;
  --bd-kopuk: #F6F8FA;

  --bd-akinti-50:#F6F8FA; --bd-akinti-100:#EDF1F5; --bd-akinti-200:#DCE3EA; --bd-akinti-300:#C2CEDA;
  --bd-akinti-400:#9FB3C8; --bd-akinti-500:#6C849C; --bd-akinti-600:#3F5B75; --bd-akinti-700:#2A4560;
  --bd-akinti-800:#123258; --bd-akinti-900:#0A2540; --bd-akinti-950:#061629;

  --bd-dalga-50:#E8FBF9; --bd-dalga-100:#C4F4EF; --bd-dalga-200:#8FE9E1; --bd-dalga-300:#5EDFD3;
  --bd-dalga-400:#2ED3C6; --bd-dalga-500:#1BB5A9; --bd-dalga-600:#0E8C83; --bd-dalga-700:#0B6E68;
  --bd-dalga-800:#0A5551; --bd-dalga-900:#083F3D;

  /* ---------- Semantik — AÇIK tema ---------- */
  --bg: #F6F8FA;
  --surface: #FFFFFF;
  --surface-2: #EDF1F5;
  --surface-3: #DCE3EA;
  --border: #DCE3EA;
  --border-strong: #6C849C;
  --text: #0A2540;
  --text-muted: #3F5B75;
  --text-subtle: #6C849C;
  --text-disabled: #9FB3C8;

  --accent: #2ED3C6;
  --accent-hover: #1BB5A9;
  --accent-active: #0E8C83;
  --accent-text: #0B6E68;
  --accent-subtle: #E8FBF9;
  --accent-subtle-hover: #C4F4EF;
  --on-accent: #0A2540;

  --inverse: #0A2540;
  --on-inverse: #F6F8FA;

  --success: #22A35A;  --success-bg: #E6F6EC; --success-text: #1A7F45;
  --warning: #E59A1A;  --warning-bg: #FDF1DC; --warning-text: #8A5300;
  --danger:  #E5484D;  --danger-bg:  #FDECEA; --danger-text:  #B42318;
  --danger-solid: #C93A3F;
  --danger-solid-hover: #B42318;
  --info:    #3A6FF0;  --info-bg:    #E9EFFE; --info-text:    #2550C8;

  --sidebar-bg: #0A2540;
  --sidebar-border: transparent;
  --sidebar-text: #C9D6E3;
  --sidebar-text-muted: #9FB3C8;
  --sidebar-text-active: #FFFFFF;
  --sidebar-item-hover: rgba(255, 255, 255, 0.06);
  --sidebar-item-active: rgba(46, 211, 198, 0.16);
  --sidebar-icon-active: #2ED3C6;

  --scrim: rgba(6, 22, 41, 0.55);

  --chart-1: #2ED3C6; --chart-2: #3A6FF0; --chart-3: #6C849C; --chart-4: #E59A1A; --chart-5: #0B6E68;
  --chart-grid: #EDF1F5; --chart-axis: #6C849C;

  /* ---------- Tipografi ---------- */
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* ---------- Boşluk ---------- */
  --space-0-5: 2px; --space-1: 4px; --space-1-5: 6px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;

  /* ---------- Köşe ---------- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* ---------- Gölge ---------- */
  --shadow-xs: 0 1px 2px rgba(10, 37, 64, 0.06);
  --shadow-pop: 0 8px 24px rgba(10, 37, 64, 0.12), 0 2px 6px rgba(10, 37, 64, 0.06);
  --shadow-modal: 0 24px 64px rgba(10, 37, 64, 0.24);
  --shadow-focus: 0 0 0 2px var(--bg), 0 0 0 4px #0B6E68;
  --shadow-focus-danger: 0 0 0 2px var(--bg), 0 0 0 4px #E5484D;

  /* ---------- Hareket ---------- */
  --duration-instant: 80ms;
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 260ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ---------- Katman ---------- */
  --z-sticky: 10; --z-sidebar: 20; --z-dropdown: 40; --z-drawer: 50; --z-modal: 60; --z-toast: 70; --z-tooltip: 80;

  /* ---------- Ölçüler ---------- */
  --control-h-sm: 32px; --control-h-md: 40px; --control-h-lg: 44px;
  --sidebar-w: 248px; --sidebar-w-collapsed: 72px; --topbar-h: 64px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #061629;
    --surface: #0A2540;
    --surface-2: #123258;
    --surface-3: #1E3E62;
    --border: #1E3E62;
    --border-strong: #6C849C;
    --text: #F6F8FA;
    --text-muted: #9FB3C8;
    --text-subtle: #6C849C;
    --text-disabled: #2A4560;

    --accent: #2ED3C6;
    --accent-hover: #5EDFD3;
    --accent-active: #8FE9E1;
    --accent-text: #5EDFD3;
    --accent-subtle: #0A5551;
    --accent-subtle-hover: #0B6E68;
    --on-accent: #0A2540;

    --inverse: #F6F8FA;
    --on-inverse: #0A2540;

    --success: #3CC277;  --success-bg: #0F3A26; --success-text: #6FD39A;
    --warning: #F0B040;  --warning-bg: #3D2B0A; --warning-text: #F2BE5C;
    --danger:  #F06A6E;  --danger-bg:  #401518; --danger-text:  #F38B8E;
    --danger-solid: #C93A3F;
    --danger-solid-hover: #B42318;
    --info:    #6E95FF;  --info-bg:    #14275A; --info-text:    #8FB0FF;

    --sidebar-bg: #061629;
    --sidebar-border: #1E3E62;

    --scrim: rgba(0, 0, 0, 0.6);
    --chart-grid: #123258; --chart-axis: #9FB3C8;
    --chart-2: #6E95FF; --chart-3: #9FB3C8; --chart-4: #F0B040; --chart-5: #5EDFD3;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px #1E3E62;
    --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px #1E3E62;
    --shadow-focus: 0 0 0 2px var(--bg), 0 0 0 4px #2ED3C6;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #061629;
  --surface: #0A2540;
  --surface-2: #123258;
  --surface-3: #1E3E62;
  --border: #1E3E62;
  --border-strong: #6C849C;
  --text: #F6F8FA;
  --text-muted: #9FB3C8;
  --text-subtle: #6C849C;
  --text-disabled: #2A4560;

  --accent: #2ED3C6;
  --accent-hover: #5EDFD3;
  --accent-active: #8FE9E1;
  --accent-text: #5EDFD3;
  --accent-subtle: #0A5551;
  --accent-subtle-hover: #0B6E68;
  --on-accent: #0A2540;

  --inverse: #F6F8FA;
  --on-inverse: #0A2540;

  --success: #3CC277;  --success-bg: #0F3A26; --success-text: #6FD39A;
  --warning: #F0B040;  --warning-bg: #3D2B0A; --warning-text: #F2BE5C;
  --danger:  #F06A6E;  --danger-bg:  #401518; --danger-text:  #F38B8E;
  --danger-solid: #C93A3F;
  --danger-solid-hover: #B42318;
  --info:    #6E95FF;  --info-bg:    #14275A; --info-text:    #8FB0FF;

  --sidebar-bg: #061629;
  --sidebar-border: #1E3E62;

  --scrim: rgba(0, 0, 0, 0.6);
  --chart-grid: #123258; --chart-axis: #9FB3C8;
  --chart-2: #6E95FF; --chart-3: #9FB3C8; --chart-4: #F0B040; --chart-5: #5EDFD3;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px #1E3E62;
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px #1E3E62;
  --shadow-focus: 0 0 0 2px var(--bg), 0 0 0 4px #2ED3C6;

  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
