/*
  Belirteç sistemi — UI-1 / UI-1b / UI-1c / UI-1d (29–30 Eylül 2026; tasarım sistemi v1.1,
  bölüm 3; UI-1b'de açık tema "Canlı Mavi" paletine, UI-1c'de "Google tarzı içerik +
  lacivert menü" paletine geçti).
  Kaynak: `docs/ui/TASARIM_SISTEMI.html`. Fiyat motorunun panel temasından
  (14 Eylül 2026) türedi; açık tema ERP için yeniden ayarlandı.

  Bileşen kuralları (`app.css`) ham renk yazmaz; renkler yalnız burada.

  VARSAYILAN AÇIK. Sunucu çerezsiz isteğe `data-theme="light"` basar
  (`apps/core/views.py` `DEFAULT_THEME`). Kök (`:root`) koyu paleti taşır; açık
  değerler iki kez yazılı: bir `prefers-color-scheme: light` içinde (öznitelik
  yokken, "Sistem" seçimi), bir `[data-theme="light"]` içinde. İkisi aynı
  kalmalı; `tests/test_core.py` karşılaştırıyor.

  Katmanlar: koyu menü (`--rail-*`, iki temada da koyu) · açık gri zemin `--bg` ·
  beyaz panel `--surface` · beyaz panel başlık şeridi `--head` (alt çizgi `--line`) ·
  tablo başlık satırı `--thead`.

  KONTRAST: metin belirteçleri kullanıldıkları zeminlere göre en az 4,5:1
  (WCAG AA). UI-1d'de açık tema tek lacivert ailesi: `--accent` #0f2a47
  (= `--rail-bg`, yalnız birincil düğme zemini; beyaz yazı 14,6), `--accent-hover`
  #1b3d63 (11,1), `--accent-deep` #174ea6 (bağlantı, ikincil ve metin düğmesi yazısı,
  seçili sekme yazısı ve çizgisi, seçili satır kenarı; beyazda 7,85, `--bg`'de 7,05,
  `--select`'te 6,85), `--focus` #2563c4 (odak halkası, lacivert düğme çevresinde de
  görünür), `--rail-active` #2563c4 (menüde seçili hap; beyaz yazı 5,74). `--accent`
  yazı rengi olarak hiçbir yerde kullanılmaz. Koyuda en düşük `--ink-3`/`--select`
  4,70; koyu vurgu #8ab4f8 değişmedi. `tests/test_ui1.py` çiftleri ölçer; değer
  değiştiren testi de günceller.

  YAZI TİPİ: Roboto (arayüz) ve Roboto Mono (rakam, kod) — `fonts/` altında,
  kendimiz sunuyoruz (SIL OFL). Google Fonts'a hiçbir istek gitmez.
*/

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/roboto-400.e825e2da51af.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/roboto-500.476f914310e3.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/roboto-700.7ef1b9e49210.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/roboto-mono-400.38c11498611a.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/roboto-mono-500.cdbf0882bc16.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* --- renk: katmanlar (koyu) --- */
  --bg: #1a1d21;
  --surface: #22262b;
  --surface-2: #282d33;
  --head: #282e34;
  --thead: #282e34;
  --head-ink: #e7ebef;
  --line: #2f353b;
  --line-2: #262b31;
  --hover: #2b3440;
  --select: #1d3550;

  /* --- renk: metin --- */
  --ink: #e7ebef;
  --ink-2: #a6b0ba;
  --ink-3: #95a0aa;

  /* --- renk: vurgu (Google koyu mavisi) --- */
  --accent: #8ab4f8;
  --accent-ink: #202124;
  --accent-hover: #aecbfa;
  --accent-soft: #1a2c40;
  --accent-deep: #8ab4f8;
  --attn: #d9be7e;
  --attn-soft: #2e2a1c;
  --bad: #d99e96;
  --bad-soft: #31211f;
  --good: #8fc2a6;
  --good-soft: #1c2c24;
  --focus: #8ab4f8;

  /* --- renk: sol menü (iki temada da koyu) --- */
  --rail-bg: #15181b;
  --rail-ink: #d4e2f1;
  --rail-ink-2: #8fa6bf;
  --rail-ink-hi: #ffffff;
  --rail-active: #2563c4;
  --rail-mark: #7cc0ff;
  --rail-hover: #20262d;
  --rail-line: rgba(255, 255, 255, 0.1);

  /* --- gölge ve biçim (Material köşeleri) --- */
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.45);
  --sh-2: 0 1px 3px rgba(0, 0, 0, 0.55), 0 10px 24px -12px rgba(0, 0, 0, 0.85);
  --r-panel: 8px;
  --r-ctl: 4px;
  --r-pill: 999px;

  /* --- tipografi --- */
  --font-sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Roboto Mono'da ₺ yok: bir sonraki aile Roboto, sistem yazı tipi değil. */
  --font-mono: "Roboto Mono", "Roboto", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --text-2xs: 11px; /* yalnız menü grup başlığı ve küçük büyük harf etiketler */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --weight-title: 700; /* başlıklar: sayfa, panel, kart, tablo sütunu, seçili sekme */

  /* --- boşluk ve ölçü --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --rail-width: 224px;
  --row-h: 34px;
  --ctl-h: 36px;
  --touch: 48px;
  --topbar-h: 48px; /* üst şerit; donmuş tablo başlığının sayfadaki üst boşluğu (P1.15e) */
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f1f3f4;
    --surface: #ffffff;
    --surface-2: #f8f9fa;
    --head: #ffffff;
    --thead: #f8f9fa;
    --head-ink: #202124;
    --line: #dadce0;
    --line-2: #e8eaed;
    --hover: #f1f3f4;
    --select: #e8f0fe;
    --ink: #202124;
    --ink-2: #3c4043;
    --ink-3: #5f6368;
    --accent: #0f2a47;
    --accent-ink: #ffffff;
    --accent-hover: #1b3d63;
    --accent-soft: #e8f0fe;
    --accent-deep: #174ea6;
    --attn: #8f4f00;
    --attn-soft: #fef7e0;
    --bad: #c5221f;
    --bad-soft: #fce8e6;
    --good: #137333;
    --good-soft: #e6f4ea;
    --focus: #2563c4;
    --rail-bg: #0f2a47;
    --rail-hover: #183a5e;
    --sh-1: 0 1px 2px rgba(23, 32, 42, 0.06);
    --sh-2: 0 1px 3px rgba(23, 32, 42, 0.08), 0 8px 20px -10px rgba(23, 32, 42, 0.2);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f3f4;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --head: #ffffff;
  --thead: #f8f9fa;
  --head-ink: #202124;
  --line: #dadce0;
  --line-2: #e8eaed;
  --hover: #f1f3f4;
  --select: #e8f0fe;
  --ink: #202124;
  --ink-2: #3c4043;
  --ink-3: #5f6368;
  --accent: #0f2a47;
  --accent-ink: #ffffff;
  --accent-hover: #1b3d63;
  --accent-soft: #e8f0fe;
  --accent-deep: #174ea6;
  --attn: #8f4f00;
  --attn-soft: #fef7e0;
  --bad: #c5221f;
  --bad-soft: #fce8e6;
  --good: #137333;
  --good-soft: #e6f4ea;
  --focus: #2563c4;
  --rail-bg: #0f2a47;
  --rail-hover: #183a5e;
  --sh-1: 0 1px 2px rgba(23, 32, 42, 0.06);
  --sh-2: 0 1px 3px rgba(23, 32, 42, 0.08), 0 8px 20px -10px rgba(23, 32, 42, 0.2);
}
