/*
  IDN CRM tasarim token'lari.
  TEK KAYNAK: bilesenlerde ham hex kod KULLANILMAZ, daima --c-* degiskenleri kullanilir.
  Acik tema varsayilandir; koyu tema hem sistem tercihiyle hem de
  data-theme="dark" ile calisir ve kullanici secimi sistem tercihini EZER.
*/
:root {
  /* Yuzeyler */
  --c-bg: #f4f6fa;
  --c-surface: #ffffff;
  --c-surface-muted: #f7f9fc;
  --c-surface-raised: #ffffff;
  --c-border: #e2e7ee;
  --c-border-strong: #cbd4e1;

  /* Metin */
  --c-text: #1f2933;
  --c-text-muted: #64748b;
  --c-text-subtle: #94a3b8;
  --c-text-inverse: #ffffff;

  /* Marka ve durumlar */
  --c-accent: #0b5fff;
  --c-accent-hover: #0a52dd;
  --c-accent-soft: #e8f0ff;
  --c-success: #16a34a;
  --c-success-soft: #e7f7ed;
  --c-warning: #d97706;
  --c-warning-soft: #fdf3e3;
  --c-danger: #dc2626;
  --c-danger-soft: #fdeaea;
  --c-info: #0891b2;
  --c-info-soft: #e4f6fa;

  /* Tipografi: panel veri-yogun oldugu icin taban 14px */
  --f-family: "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-xs: 12px;
  --f-sm: 13px;
  --f-base: 14px;
  --f-lg: 16px;
  --f-xl: 18px;
  --f-2xl: 24px;

  /* 4px tabanli aralik olcegi */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --sh-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --sh-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --sh-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --sidebar-w: 248px;
  --sidebar-w-collapsed: 68px;
  --topbar-h: 58px;
}

/* Koyu tema: sistem tercihi (kullanici acik temayi secmediyse) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #0f172a;
    --c-surface: #17203a;
    --c-surface-muted: #131c33;
    --c-surface-raised: #1d2844;
    --c-border: #263353;
    --c-border-strong: #35456b;

    --c-text: #e8edf7;
    --c-text-muted: #9fb0cc;
    --c-text-subtle: #7387a8;

    --c-accent: #4c8dff;
    --c-accent-hover: #6ba1ff;
    --c-accent-soft: #1c2d52;
    --c-success: #34d17f;
    --c-success-soft: #14331f;
    --c-warning: #f0b23c;
    --c-warning-soft: #33260f;
    --c-danger: #f87171;
    --c-danger-soft: #3a1a1a;
    --c-info: #38bdf8;
    --c-info-soft: #10293a;

    --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --sh-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --sh-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

/* Koyu tema: kullanicinin acik secimi (sistem tercihini ezer) */
:root[data-theme="dark"] {
  --c-bg: #0f172a;
  --c-surface: #17203a;
  --c-surface-muted: #131c33;
  --c-surface-raised: #1d2844;
  --c-border: #263353;
  --c-border-strong: #35456b;

  --c-text: #e8edf7;
  --c-text-muted: #9fb0cc;
  --c-text-subtle: #7387a8;

  --c-accent: #4c8dff;
  --c-accent-hover: #6ba1ff;
  --c-accent-soft: #1c2d52;
  --c-success: #34d17f;
  --c-success-soft: #14331f;
  --c-warning: #f0b23c;
  --c-warning-soft: #33260f;
  --c-danger: #f87171;
  --c-danger-soft: #3a1a1a;
  --c-info: #38bdf8;
  --c-info-soft: #10293a;

  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --sh-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}
