/* ==========================================================================
   Khlus Forex — Design Tokens
   Binance tarafindaki algohil.css'in forex varyanti. Ayni "terminal at dusk"
   palette, ayni Barlow + JetBrains Mono typography. Tek fark: primary brand
   accent TEAL (forex global/ocean temali), kirmizi yalnizca negatif/kritik
   uyarilara rezerve.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* --------------------------------------------------------------------
     CORE PALETTE
     -------------------------------------------------------------------- */

  /* Forex brand accent — teal (binance'de bu ikincil pozitif renkti,
     forex'te ana aksana terfi). FX sembolu, "globe" teması ile uyumlu. */
  --fx-teal:           #17b29c;
  --fx-teal-bright:    #57cda5;
  --fx-teal-deep:      #0f8a7a;
  --fx-mint:           #89e7b1;

  /* Cream — dark-mode birincil metin */
  --fx-cream:          #e5e1d3;
  --fx-cream-soft:     #d2cec1;
  --fx-cream-dim:      #8a8678;

  /* Ink — arka plan, kart yuzeyleri */
  --fx-ink:            #1d1f22;
  --fx-ink-deep:       #131518;
  --fx-ink-raised:     #26282c;
  --fx-ink-border:     #2f3237;

  /* Navy — header strip, secondary yuzey */
  --fx-navy:           #142a3e;
  --fx-navy-raised:    #1e3a52;

  /* Red — SELL / SHORT / DOWN / kritik uyari (ikinci aksan) */
  --fx-red:            #ec4d3f;
  --fx-red-bright:     #ff5a4a;
  --fx-red-deep:       #c23a2f;

  /* Peach — warning / notification */
  --fx-peach:          #fec4a1;

  /* Gold — session overlap / high conviction (forex-ozgu vurgu) */
  --fx-gold:           #e0b457;

  /* --------------------------------------------------------------------
     SEMANTIC
     -------------------------------------------------------------------- */
  --bg:             var(--fx-ink);
  --bg-raised:      var(--fx-ink-raised);
  --bg-inset:       var(--fx-ink-deep);
  --surface-line:   var(--fx-ink-border);

  --fg-1:           var(--fx-cream);
  --fg-2:           var(--fx-cream-soft);
  --fg-3:           var(--fx-cream-dim);

  --accent:         var(--fx-teal);
  --accent-hover:   var(--fx-teal-bright);
  --accent-press:   var(--fx-teal-deep);

  --positive:       var(--fx-teal);
  --positive-bg:    color-mix(in oklab, var(--fx-teal) 14%, transparent);
  --negative:       var(--fx-red);
  --negative-bg:    color-mix(in oklab, var(--fx-red) 14%, transparent);
  --warning:        var(--fx-peach);

  --focus-ring:     color-mix(in oklab, var(--fx-teal) 60%, transparent);

  /* --------------------------------------------------------------------
     TYPE
     -------------------------------------------------------------------- */
  --font-display:   'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:      'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:      'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-display:     clamp(2.75rem, 5.6vw, 4.5rem);
  --fs-h1:          2.25rem;
  --fs-h2:          1.75rem;
  --fs-h3:          1.375rem;
  --fs-h4:          1.125rem;
  --fs-body:        0.9375rem;
  --fs-small:       0.8125rem;
  --fs-micro:       0.6875rem;

  --lh-tight:       1.05;
  --lh-snug:        1.25;
  --lh-normal:      1.5;
  --lh-loose:       1.7;

  /* spacing — 4px base grid */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* radii */
  --r-sm:  2px;
  --r-md:  4px;
  --r-lg:  8px;
  --r-pill: 999px;

  /* elevation */
  --shadow-1: 0 1px 0 rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-2: 0 2px 4px rgba(0,0,0,0.4), 0 8px 16px rgba(0,0,0,0.35);
  --shadow-3: 0 4px 8px rgba(0,0,0,0.45), 0 24px 48px rgba(0,0,0,0.5);
  --glow-teal: 0 0 0 1px rgba(23,178,156,0.35), 0 0 24px rgba(23,178,156,0.25);
  --glow-red:  0 0 0 1px rgba(236,77,63,0.35), 0 0 24px rgba(236,77,63,0.25);

  /* motion */
  --ease-out:   cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in:    cubic-bezier(0.6, 0, 0.8, 0.3);
  --ease-snap:  cubic-bezier(0.3, 1.4, 0.4, 1);
  --dur-fast:   120ms;
  --dur-med:    220ms;
  --dur-slow:   360ms;
}

/* ============================================================
   BASE
   ============================================================ */

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, .h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.01em; line-height: var(--lh-tight); margin: 0; }
h2, .h2 { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.005em; line-height: var(--lh-snug); margin: 0; }
h3, .h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; line-height: var(--lh-snug); margin: 0; }
h4, .h4 { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 600; line-height: var(--lh-snug); margin: 0; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fx-cream);
}
.wordmark::before {
  content: "//";
  color: var(--fx-teal);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-right: 0.35em;
  font-style: italic;
}

p, .body { font-size: var(--fs-body); line-height: var(--lh-normal); margin: 0; text-wrap: pretty; }
.lead   { font-size: 1.0625rem; line-height: var(--lh-loose); color: var(--fg-2); }
.small  { font-size: var(--fs-small); }
.micro  {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--fg-3);
}

.mono, code, kbd, pre {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
code {
  background: var(--bg-raised);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-sm);
  padding: 1px 6px;
  font-size: 0.85em;
  color: var(--fx-teal-bright);
}

.numeric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.numeric--up   { color: var(--fx-teal); }
.numeric--down { color: var(--fx-red); }

a { color: var(--fx-teal-bright); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color var(--dur-fast) var(--ease-out); }
a:hover { border-bottom-color: currentColor; }

::selection { background: var(--fx-teal); color: var(--fx-ink-deep); }

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ============================================================
   COMPONENTS — minimal, tab-agnostik temel sinif seti
   ============================================================ */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
}
.card__title {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--fg-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: var(--s-2);
  display: flex; align-items: center; gap: var(--s-2);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--fg-2);
  letter-spacing: 0.06em;
}
.pill--up   { color: var(--fx-teal); border-color: color-mix(in oklab, var(--fx-teal) 40%, var(--surface-line)); background: var(--positive-bg); }
.pill--down { color: var(--fx-red);  border-color: color-mix(in oklab, var(--fx-red) 40%, var(--surface-line));  background: var(--negative-bg); }
.pill--warn { color: var(--fx-peach); border-color: color-mix(in oklab, var(--fx-peach) 40%, var(--surface-line)); }
.pill--mute { color: var(--fg-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  background: var(--bg-raised);
  color: var(--fg-1);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.btn:hover { background: var(--fx-ink-border); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--fx-teal);
  color: var(--fx-ink-deep);
  border-color: var(--fx-teal-deep);
  box-shadow: 0 4px 24px color-mix(in oklab, var(--fx-teal) 30%, transparent);
}
.btn--primary:hover { background: var(--fx-teal-bright); }
.btn--danger {
  background: transparent;
  color: var(--fx-red);
  border-color: color-mix(in oklab, var(--fx-red) 40%, var(--surface-line));
}
.btn--danger:hover { background: var(--negative-bg); }

.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fx-teal);
  box-shadow: 0 0 8px var(--fx-teal);
  animation: pulse 1.4s ease-in-out infinite;
}
.dot-red {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fx-red);
  box-shadow: 0 0 8px var(--fx-red);
  animation: pulse 1s ease-in-out infinite;
}
.dot-mute {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-3);
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes blink { 50% { opacity: 0.3; } }
@keyframes cursorBlink { 50% { opacity: 0; } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
