/* ══════════════════════════════════════════════════════════════
   TRANSIFY — Tasarim Sistemi / Temel Katman
   Bu dosya app.css'ten ONCE yuklenir. Renk, boslulk, tipografi,
   yukseklik ve hareket icin tek dogruluk kaynagi burasidir.
   app.css icindeki sabit hex degerleri buradaki token'lara baglidir.
   ══════════════════════════════════════════════════════════════ */

/* ── Yazi tipleri (self-host: CDN bagimliligi yok) ────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  /* Turkce: g-breve, s-cedilla, I-dotless vb. bu aralikta */
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plex-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plex-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plex-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plex-latin-ext-500.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plex-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plex-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Token'lar ─────────────────────────────────────────────────── */
:root {
  /* Zemin ve yuzeyler — notr gri degil, hafif sicak gri: beyazin
     yaninda daha az steril duruyor ve metin kontrasti yumusuyor. */
  --bg:            #FFFFFF;
  --bg-sunken:     #FAFAF9;
  --bg-elevated:   #FFFFFFE6;
  --surface:       #FFFFFF;
  --surface-2:     #FAFAF9;
  --surface-3:     #F2F2F0;
  --surface-hover: #EFEFED;

  /* Kenarliklar — acik temada ayrim golgeyle degil cizgiyle kuruluyor */
  --border:        #E4E4E2;
  --border-soft:   #EDEDEB;
  --border-strong: #D2D2CE;
  --border-accent: #D8CEEE;

  /* Metin */
  --text:          #1A1A1A;
  --text-2:        #3A3A38;
  --text-3:        #76766F;
  --text-4:        #9A9A93;
  --text-on-accent:#FFFFFF;

  /* Marka moru — acik zeminde #7C3AED yeterli kontrast vermiyordu,
     ayni aileden koyu bir tona indirildi. Aksan artik yalnizca
     birincil eylem ve aktif durum icin: govde notr gri. */
  --accent:        #5B3BA8;
  --accent-bright: #6D4AC0;
  --accent-hover:  #4E3192;
  --accent-press:  #3F2777;
  --accent-text:   #5B3BA8;
  --accent-soft:   #F3F0FA;
  --accent-soft-2: #EAE4F6;
  --accent-border: #D8CEEE;
  --accent-glow:   rgba(91, 59, 168, 0.10);
  /* Gradyan kaldirildi: duz renk. Degisken adi korunuyor ki
     background: var(--accent-grad) yazan yerler bozulmasin. */
  --accent-grad:   #5B3BA8;

  /* Anlamsal renkler — acik zeminde okunacak koyulukta,
     yanlarinda kendi yumusak zeminleri ve kenarliklari var. */
  --ok:            #2E6B4F;
  --ok-text:       #2E6B4F;
  --ok-soft:       #EDF5F0;
  --ok-border:     #C6DED1;

  --warn:          #8A6410;
  --warn-text:     #8A6410;
  --warn-soft:     #FBF4E4;
  --warn-border:   #E8D8AE;

  --err:           #A32F2F;
  --err-text:      #A32F2F;
  --err-soft:      #FBEDEC;
  --err-border:    #EFC9C6;

  --info:          #2C5E96;
  --info-text:     #2C5E96;
  --info-soft:     #EDF2F9;
  --info-border:   #C9D9EC;

  /* Tipografi */
  /* Inter yedekte: sayfa Plex yuklenene kadar bos kalmasin. */
  --font: 'IBM Plex Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fs-2xs: 11px;
  --fs-xs:  12px;
  --fs-sm:  13px;
  --fs-md:  14px;
  --fs-base:15px;
  --fs-lg:  17px;
  --fs-xl:  20px;
  --fs-2xl: 24px;
  --fs-3xl: 30px;
  --fs-4xl: 38px;
  --fs-5xl: 48px;

  /* Bosluk olcegi (4px tabanli) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Kose yariciplari */
  --r-xs:  2px;
  --r-sm:  3px;
  --r-md:  4px;
  --r-lg:  6px;
  --r-xl:  8px;
  --r-2xl: 10px;
  --r-full:999px;

  /* Yukseklik — acik temada yukseklik once kenarlikla, sonra cok
     hafif golgeyle kuruluyor. Koyu temanin golgeleri beyaz zeminde
     kirli bir leke birakiyordu. */
  --sh-xs: 0 1px 2px rgba(26,26,26,.05);
  --sh-sm: 0 1px 3px rgba(26,26,26,.07), 0 1px 2px rgba(26,26,26,.04);
  --sh-md: 0 4px 12px -2px rgba(26,26,26,.09), 0 2px 4px rgba(26,26,26,.05);
  --sh-lg: 0 12px 28px -8px rgba(26,26,26,.12), 0 4px 8px rgba(26,26,26,.05);
  --sh-xl: 0 24px 56px -16px rgba(26,26,26,.16);
  --sh-glow: 0 2px 8px rgba(91,59,168,.12);
  /* Ustten ic parilti koyu temaya aitti; acik zeminde gorunmuyor.
     Degisken birakiliyor cunku box-shadow listelerinde kullaniliyor. */
  --inner-top: inset 0 0 0 0 transparent;

  /* Hareket */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 120ms var(--ease);
  --t: 180ms var(--ease);
  --t-slow: 320ms var(--ease-out);

  /* Duzen */
  /* Logo isareti paylasilan bir bilesen; kenar cubugu basligi --topbar-h
     ile sinirli oldugu icin boyut token'dan geliyor ve genel menu kendi
     degerini veriyor. */
  --logo-size: 30px;
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --container: 1180px;
  --container-wide: 1320px;
}

/* ── Taban ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Basliklar: buyudukce harf araligi sikilasir — optik denge */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.021em;
  color: var(--text);
}
h1 { font-size: var(--fs-4xl); letter-spacing: -0.032em; }
h2 { font-size: var(--fs-3xl); letter-spacing: -0.028em; }
h3 { font-size: var(--fs-xl); letter-spacing: -0.02em; }
h4 { font-size: var(--fs-lg); }

p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }

code, pre, kbd, samp, .mono {
  font-family: var(--font-mono);
  font-feature-settings: 'zero' 1;
}

/* Sayilar tablolarda ve sayaclarda hizali dursun */
table, .data-table, .tabular,
.metric-value, .dash-stat-val, .plan-price,
.dash-hero-used, .dash-hero-total {
  font-variant-numeric: tabular-nums;
}

img, svg, video, canvas { display: block; max-width: 100%; }

/* ── Odak gorunurlugu (klavye erisilebilirligi) ────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

/* ── Secim ve kaydirma cubugu ──────────────────────────────────── */
::selection { background: var(--accent); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--r-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: padding-box; }

/* ── Hareket hassasiyeti ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Ikon sistemi (SVG sprite) ───────────────────────────────────
   Sprite sayfaya gomuluyor (_Icons.cshtml). Harici dosyadan
   <use> ile cekildiginde currentColor miras alinmiyor ve ikonlar
   siyah kaliyordu. */
.ico-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  /* img/svg icin verilen display:block kurali satir ici ikonlari alt
     satira dusuruyordu. */
  display: inline-block;
  width: 1em; height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.135em;
}
.ico-sm { width: 14px; height: 14px; }
.ico-md { width: 17px; height: 17px; }
.ico-lg { width: 20px; height: 20px; }
.ico-xl { width: 24px; height: 24px; }
.ico-fill { fill: currentColor; stroke: none; }

/* Kart/kutu icindeki yuvarlak ikon kabi */
.ico-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  flex-shrink: 0;
}
.ico-tile.lg { width: 46px; height: 46px; border-radius: var(--r-lg); }
.ico-tile.ok   { background: var(--ok-soft);   border-color: var(--ok-border);   color: var(--ok-text); }
.ico-tile.warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn-text); }
.ico-tile.err  { background: var(--err-soft);  border-color: var(--err-border);  color: var(--err-text); }
.ico-tile.info { background: var(--info-soft); border-color: var(--info-border); color: var(--info-text); }

/* ── Izgara yardimcilari ───────────────────────────────────────── */
.grid { display: grid; gap: var(--sp-4); }
.grid-2 { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: var(--sp-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: var(--sp-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ── Kucuk yardimci siniflar ───────────────────────────────────── */
.u-row   { display: flex; align-items: center; gap: var(--sp-2); }
.u-row-3 { display: flex; align-items: center; gap: var(--sp-3); }
.u-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.u-wrap  { flex-wrap: wrap; }
.u-grow  { flex: 1 1 auto; min-width: 0; }
.u-muted { color: var(--text-3); }
.u-dim   { color: var(--text-2); }
.u-mono  { font-family: var(--font-mono); }
.u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
