/* ==========================================================================
   ÇÖZÜM DATA — TEMEL KATMAN
   Tasarım belirteçleri (token), sıfırlama ve tipografi.
   Bu dosyaya bileşen stili yazma; onlar panel.css içinde.
   ========================================================================== */

:root {
  /* ---- ÖLÇEK: yazı ------------------------------------------------------ */
  --text-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm:   clamp(0.875rem, 0.84rem + 0.18vw, 0.9375rem);
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl:   clamp(1.5rem, 1.3rem + 0.9vw, 2rem);

  /* ---- ÖLÇEK: boşluk (4px tabanlı) ------------------------------------- */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem;  --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;

  /* ---- KÖŞE ------------------------------------------------------------- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.125rem;
  --radius-full: 9999px;

  /* ---- HAREKET ---------------------------------------------------------- */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-interactive: 180ms var(--ease-out);

  /* ---- YAZI TİPİ -------------------------------------------------------- */
  --font-display: 'Cabinet Grotesk', 'Satoshi', 'Segoe UI', sans-serif;
  --font-body:    'Satoshi', 'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* ---- GENİŞLİK --------------------------------------------------------- */
  --kenar: 15.5rem;          /* sol raf */
  --kenar-kapali: 4.25rem;
  --icerik-genis: 84rem;
}

/* ==========================================================================
   RENK — KOYU (asıl tema)
   Telefon şebekesi çağrışımı: neredeyse siyah, hafif mavi dökümlü yüzeyler
   üzerinde "sinyal" turkuazı. Durum renkleri yalnızca veri için.
   ========================================================================== */
[data-tema='koyu'] {
  --color-bg:             #06080b;
  --color-bg-2:           #090c11;
  --color-surface:        #0b0f15;
  --color-surface-2:      #10151d;
  --color-surface-3:      #151b25;
  --color-surface-cam:    rgba(16, 21, 29, 0.72);
  --color-divider:        #141a23;
  --color-border:         #1e2632;
  --color-border-parlak:  #2b3543;

  --color-text:           #dfe7f2;
  --color-text-muted:     #7d8a9c;
  --color-text-faint:     #4b5665;
  --color-text-inverse:   #06080b;

  --color-primary:        #24d8bd;
  --color-primary-hover:  #58f0da;
  --color-primary-active: #14a894;
  --color-primary-soft:   rgba(36, 216, 189, 0.12);
  --color-primary-line:   rgba(36, 216, 189, 0.32);

  --color-success:        #46cf7c;
  --color-success-soft:   rgba(70, 207, 124, 0.13);
  --color-success-line:   rgba(70, 207, 124, 0.34);
  --color-warning:        #f0b544;
  --color-warning-soft:   rgba(240, 181, 68, 0.13);
  --color-warning-line:   rgba(240, 181, 68, 0.34);
  --color-error:          #ff5f7a;
  --color-error-soft:     rgba(255, 95, 122, 0.13);
  --color-error-line:     rgba(255, 95, 122, 0.34);
  --color-blue:           #5590f7;
  --color-blue-soft:      rgba(85, 144, 247, 0.13);
  --color-purple:         #a385f7;

  --izgara:               rgba(140, 170, 205, 0.055);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --parlama:   0 0 0 1px var(--color-primary-line), 0 0 28px -6px rgba(36, 216, 189, 0.35);
  color-scheme: dark;
}

/* ==========================================================================
   RENK — AÇIK
   Aynı yapı, gündüz vardiyası için. Turkuaz koyulaştırıldı ki beyaz
   üzerinde WCAG AA (4.5:1) tutsun.
   ========================================================================== */
[data-tema='acik'] {
  --color-bg:             #f4f6f9;
  --color-bg-2:           #eef1f6;
  --color-surface:        #ffffff;
  --color-surface-2:      #f8fafc;
  --color-surface-3:      #eef2f7;
  --color-surface-cam:    rgba(255, 255, 255, 0.82);
  --color-divider:        #e4e9f0;
  --color-border:         #d7dee8;
  --color-border-parlak:  #c2ccda;

  --color-text:           #101822;
  --color-text-muted:     #5d6a7a;
  --color-text-faint:     #94a1b1;
  --color-text-inverse:   #ffffff;

  --color-primary:        #0a7d6e;
  --color-primary-hover:  #096a5e;
  --color-primary-active: #075549;
  --color-primary-soft:   rgba(10, 125, 110, 0.09);
  --color-primary-line:   rgba(10, 125, 110, 0.26);

  --color-success:        #1b7f45;
  --color-success-soft:   rgba(27, 127, 69, 0.1);
  --color-success-line:   rgba(27, 127, 69, 0.28);
  --color-warning:        #96620a;
  --color-warning-soft:   rgba(150, 98, 10, 0.1);
  --color-warning-line:   rgba(150, 98, 10, 0.28);
  --color-error:          #c02a48;
  --color-error-soft:     rgba(192, 42, 72, 0.1);
  --color-error-line:     rgba(192, 42, 72, 0.28);
  --color-blue:           #1d5fc4;
  --color-blue-soft:      rgba(29, 95, 196, 0.1);
  --color-purple:         #6841c4;

  --izgara:               rgba(30, 60, 100, 0.05);
  --shadow-sm: 0 1px 2px rgba(15, 30, 50, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 30, 50, 0.09);
  --shadow-lg: 0 24px 60px rgba(15, 30, 50, 0.14);
  --parlama:   0 0 0 1px var(--color-primary-line), 0 0 24px -8px rgba(10, 125, 110, 0.3);
  color-scheme: light;
}

/* ==========================================================================
   SIFIRLAMA
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }
ul[role='list'], ol[role='list'] { list-style: none; }

h1, h2, h3, h4 { text-wrap: balance; line-height: 1.18; font-family: var(--font-display); font-weight: 700; }
p { text-wrap: pretty; }

::selection { background: var(--color-primary-soft); color: var(--color-text); }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

a, button, [role='button'], input, textarea, select {
  transition: color var(--transition-interactive),
              background var(--transition-interactive),
              border-color var(--transition-interactive),
              box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
}

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* Kaydırma çubuğu — koyu yüzeyle uyumlu, ince */
* { scrollbar-width: thin; scrollbar-color: var(--color-border-parlak) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--color-border-parlak);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: content-box;
}

/* ==========================================================================
   TİPOGRAFİ YARDIMCILARI
   ========================================================================== */
.baslik-sayfa { font-size: var(--text-xl); letter-spacing: -0.02em; }
.baslik-bolum { font-size: var(--text-lg); letter-spacing: -0.01em; }

.etiket {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.sayi {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.solgun { color: var(--color-text-muted); }
.cok-solgun { color: var(--color-text-faint); }

/* ==========================================================================
   HAREKETİ AZALT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
