/* ==========================================================================
   Altın Takip — BX1 Design System
   Faz BX1 (ADR-012, ADR-017): finansal terminal stili token altyapısı.
   - Tüm renk/spacing/typography/radius/shadow CSS custom property
   - Tek tip palet: koyu zemin + altın aksanlar + semantic (success/danger/warn)
   - Tipografi: Inter (UI), JetBrains Mono (fiyat sütunları)
   - Eski class isimleri (.panel, .kpi, .seo-hero, .status-pill...) bilerek
     korundu; BX2-BX5 turlarında yeni ui-* utility'lerine kademeli göç.
   ========================================================================== */

/* ---------- 1. TOKENS ---------------------------------------------------- */
:root {
  /* Brand */
  --color-gold-100: #fbf3d3;
  --color-gold-200: #efd882;
  --color-gold-300: #e8d48b;     /* soft accent */
  --color-gold-400: #dcc05a;
  --color-gold-500: #d4af37;     /* primary gold */
  --color-gold-600: #b48f1f;
  --color-gold-700: #8a6c14;

  /* Semantic */
  --color-success: #49b87a;      /* alış / artış */
  --color-danger:  #e36b6b;      /* satış / düşüş */
  --color-warn:    #c98a40;      /* partial / uyarı */
  --color-info:    #6ea0d1;
  --color-buy:     #5fbc8a;      /* ticker alış vurgusu */
  --color-sell:    #e87b6c;      /* ticker satış vurgusu */

  /* Surface (dark) */
  --color-bg:        #0b0908;
  --color-surface-1: #141110;
  --color-surface-2: #1c1816;
  --color-surface-3: #0f0d0c;
  --color-line:      #2c2620;
  --color-line-soft: #1f1a15;

  /* Map specific */
  --color-map-province: #252018;
  --color-map-stroke:   #0d0b09;
  --color-map-empty:    #465066;
  --color-map-inactive: #303846;

  /* Text */
  --color-text:        #f2efe9;
  --color-text-muted:  #a89f92;
  --color-text-dim:    #756d63;

  /* Selection */
  --color-selection-bg:   #5a4818;
  --color-selection-text: #fffef6;

  /* Spacing scale (4px base) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  48px;

  /* Radius scale */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-pill: 999px;

  /* Shadow scale */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.28);

  /* Typography */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-xs:   11px;
  --text-sm:   12px;
  --text-base: 14px;
  --text-md:   16px;
  --text-lg:   20px;
  --text-xl:   22px;
  --text-2xl:  26px;
  --text-3xl:  32px;

  --leading-tight: 1.15;
  --leading-base:  1.45;

  /* Chart colors */
  --chart-buy:        #f5e6b8;
  --chart-sell:       var(--color-gold-500);
  --chart-secondary:  var(--color-warn);

  /* Legacy aliases — eski class'lar çalışmaya devam etsin */
  --bg:               var(--color-bg);
  --surface:          var(--color-surface-1);
  --surface-2:        var(--color-surface-2);
  --surface-3:        var(--color-surface-3);
  --line:             var(--color-line);
  --text:             var(--color-text);
  --muted:            var(--color-text-muted);
  --gold:             var(--color-gold-500);
  --gold-soft:        var(--color-gold-300);
  --chart-alis:       var(--chart-buy);
  --green:            var(--color-success);
  --red:              var(--color-danger);
  --orange:           var(--color-warn);
  --province-fill:    var(--color-map-province);
  --province-stroke:  var(--color-map-stroke);
  --selection-bg:     var(--color-selection-bg);
  --selection-text:   var(--color-selection-text);
  --shadow:           var(--shadow-lg);
  --radius:           var(--radius-md);
}

/* Light theme override */
[data-theme="light"] {
  --color-gold-300: #b89426;
  --color-gold-500: #9a7616;
  --color-gold-600: #765a10;

  --color-bg:        #f6f4ef;
  --color-surface-1: #fffcf7;
  --color-surface-2: #f0ebe3;
  --color-surface-3: #e8e2d8;
  --color-line:      #d9d1c4;
  --color-line-soft: #ece6db;

  --color-map-province: #e5dfd4;
  --color-map-stroke:   #fffcf7;

  --color-text:       #1a1510;
  --color-text-muted: #635a4e;
  --color-text-dim:   #8b8175;

  --color-selection-bg:   #c4a035;
  --color-selection-text: #1a140a;

  --chart-buy: #6b4a0a;

  --shadow-sm: 0 1px 2px rgba(59, 48, 33, 0.05);
  --shadow-md: 0 4px 12px rgba(59, 48, 33, 0.07);
  --shadow-lg: 0 8px 24px rgba(59, 48, 33, 0.08);
}

/* ---------- 2. RESET / GLOBAL ------------------------------------------- */
* {
  box-sizing: border-box;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--color-gold-300);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- 3. TYPOGRAPHY UTILITIES -------------------------------------- */
.font-mono,
.tabular,
.num,
.makas,
.kpi strong,
.seo-facts strong,
.seo-link-list strong,
.metric strong,
.product-row .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

.muted,
.app-footer,
.brand-subtitle,
.panel-head p {
  color: var(--color-text-muted);
}

/* ---------- 4. COMPONENT UTILITIES (BX1, ui-* prefix) -------------------- */
.ui-card {
  background: var(--color-surface-1);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.ui-card--inset {
  background: var(--color-surface-2);
  box-shadow: none;
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  padding: 3px var(--space-2);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.ui-badge--ok   { color: var(--color-success); border-color: color-mix(in srgb, var(--color-success) 35%, var(--color-line)); }
.ui-badge--warn { color: var(--color-warn);    border-color: color-mix(in srgb, var(--color-warn)    35%, var(--color-line)); }
.ui-badge--err  { color: var(--color-danger);  border-color: color-mix(in srgb, var(--color-danger)  35%, var(--color-line)); }

/* BX2 ticker-row scaffold (gerçek bar BX2'de oluşturulacak) */
.ui-ticker-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-3);
  height: 32px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  white-space: nowrap;
  border-right: 1px solid var(--color-line-soft);
}

.ui-ticker-row__name {
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ui-ticker-row__price {
  color: var(--color-gold-300);
}

.ui-ticker-row__spread {
  color: var(--color-text-dim);
  font-size: var(--text-xs);
}

/* Reusable tooltip class (mevcut #tooltip ID stili korunuyor) */
.ui-tooltip {
  position: fixed;
  z-index: 100;
  max-width: 280px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  font-size: var(--text-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.ui-tooltip.is-open { opacity: 1; }
.ui-tooltip small  { display: block; color: var(--color-text-muted); margin-top: 3px; }

/* ---------- 5. HEADER & SHELL ------------------------------------------- */

/* sticky-top wraps header + ticker bar so both stick together */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: color-mix(in srgb, var(--color-surface-1) 92%, transparent);
  border-bottom: 1px solid var(--color-line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 220px;
  color: inherit;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-gold-500);
  color: #17110a;
  font-weight: 800;
}

.brand-title,
.brand-subtitle,
.panel-head h2,
.panel-head p {
  margin: 0;
}

.brand-title {
  display: block;
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  color: var(--color-gold-300);
  font-weight: 700;
}

.brand-subtitle {
  display: block;
  font-size: var(--text-sm);
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.toolbar label { display: grid; gap: var(--space-1); }
.toolbar span  { color: var(--color-text-muted); font-size: var(--text-xs); }

select,
.button {
  min-height: 36px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  padding: 7px var(--space-3);
  font: inherit;
}

option { background: var(--color-surface-1); color: var(--color-text); }
option:checked,
option:hover { background: var(--color-selection-bg); color: var(--color-selection-text); }

select { min-width: 150px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-width: 72px;
  text-decoration: none;
}

.button:hover,
select:hover { border-color: var(--color-gold-500); }
.button:hover { text-decoration: none; }
.button.subtle { background: transparent; }

.shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: var(--space-4);
}

/* ---------- 6. SEO HERO --------------------------------------------------- */
.seo-hero {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  padding: var(--space-5);
  background: var(--color-surface-1);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.breadcrumb span[aria-current="page"] { color: var(--color-text); }

.seo-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: end;
}

.seo-hero h1 {
  margin: 0;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  letter-spacing: 0;
}

.seo-hero p {
  max-width: 900px;
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
}

.seo-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.seo-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.seo-facts div {
  min-width: 0;
  padding: var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.seo-facts span,
.seo-note { color: var(--color-text-muted); font-size: var(--text-sm); }

.seo-facts strong {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-md);
  overflow-wrap: anywhere;
}

.seo-live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.36fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.seo-note { margin: 0; padding: var(--space-3) var(--space-4) 0; }
.seo-side-panel { align-self: start; }

.seo-link-list { display: grid; padding: var(--space-3) var(--space-4) var(--space-4); }

.seo-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-line);
}

.seo-link-list a:last-child { border-bottom: 0; }
.seo-link-list strong { color: var(--color-gold-300); }

.seo-side-link { padding: 0 var(--space-4) var(--space-4); }
.seo-copy { margin-bottom: var(--space-3); padding: var(--space-4); }
.seo-copy p { max-width: 980px; margin: 0; color: var(--color-text-muted); }

tr.empty-data { color: var(--color-text-muted); }

/* ---------- 7. KPI / PANEL GRID ----------------------------------------- */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.kpi,
.panel {
  background: var(--color-surface-1);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.kpi { padding: var(--space-3); }

.kpi span {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.kpi strong {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xl);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.chart-grid,
.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.panel { min-width: 0; }

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-line);
}

.panel-head .bank-chart-picker {
  display: grid;
  gap: var(--space-1);
  justify-items: end;
  min-width: 200px;
}

.panel-head .bank-chart-picker span { font-size: var(--text-xs); }
.panel-head .bank-chart-picker select { min-width: 220px; }
.panel-head p { font-size: var(--text-sm); margin-top: 2px; }

/* ---------- 8. MAP ------------------------------------------------------- */
.map-canvas {
  position: relative;
  width: 100%;
  min-height: 420px;
  aspect-ratio: 5 / 3;
  padding: var(--space-2);
}

.map-canvas svg { width: 100%; height: 100%; display: block; }

.map-canvas svg path {
  fill: var(--color-map-province);
  stroke: var(--color-map-stroke);
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.16s ease, opacity 0.16s ease;
}

.map-canvas svg path.status-ok      { fill: var(--color-gold-500); }
.map-canvas svg path.status-partial { fill: var(--color-warn); }
.map-canvas svg path.status-empty,
.map-canvas svg path.status-fetch_error,
.map-canvas svg path.status-parse_empty { fill: var(--color-map-empty); }
.map-canvas svg path.status-no_source,
.map-canvas svg path.status-unknown { fill: var(--color-map-inactive); opacity: 0.62; }
.map-canvas svg path:hover,
.map-canvas svg path.active { fill: var(--color-gold-300); opacity: 1; }

.legend {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
}

.status-dot.ok      { background: var(--color-success); }
.status-dot.partial { background: var(--color-warn); }
.status-dot.empty   { background: #657085; }

/* ---------- 9. CITY PANEL & PRODUCT LIST -------------------------------- */
.city-panel    { padding-bottom: var(--space-2); }
.city-summary  { padding: var(--space-3); }

.city-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.city-title h2 { margin: 0; font-size: var(--text-lg); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  padding: 3px var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.product-list {
  display: grid;
  gap: 6px;
  padding: 0 var(--space-3) var(--space-3);
}

.product-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(72px, auto));
  align-items: center;
  gap: var(--space-2);
  padding: 9px var(--space-2);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.product-row.header {
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.product-row.empty { opacity: 0.58; }

.num { text-align: right; }

.makas {
  color: var(--color-gold-300);
  font-weight: 700;
}

/* ---------- 10. CHARTS --------------------------------------------------- */
.chart { height: 280px; padding: var(--space-3); }
.chart svg { width: 100%; height: 100%; display: block; }

.chart .axis,
.chart .grid-line { stroke: color-mix(in srgb, var(--color-line) 80%, transparent); }

.chart .series-buy {
  fill: none;
  stroke: var(--chart-buy);
  stroke-width: 2.2;
}

.chart .series-sell,
.chart .bar-fill {
  fill: none;
  stroke: var(--color-gold-500);
  stroke-width: 2.2;
}

.chart .bar-fill      { fill: var(--color-gold-500); stroke: none; }
.chart .bar-secondary { fill: var(--color-warn); }

.chart text {
  fill: var(--color-text-muted);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  paint-order: stroke;
  stroke: var(--color-surface-1);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.empty-chart {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-md);
}

/* ---------- 11. METRICS -------------------------------------------------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  padding: var(--space-3);
}

.metric {
  padding: var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.metric span {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: var(--text-lg);
}

/* ---------- 12. TABLES --------------------------------------------------- */
.table-wrap { overflow: auto; max-height: 430px; }
.table-wrap.wide { max-height: 620px; }

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-surface-1);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

td.num,
th.num { text-align: right; }

tbody tr:hover {
  background: color-mix(in srgb, var(--color-gold-500) 8%, transparent);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  padding: 3px var(--space-2);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.status-pill.ok      { color: var(--color-success); }
.status-pill.partial { color: var(--color-warn); }
.status-pill.fetch_error,
.status-pill.parse_empty { color: var(--color-danger); }

/* ---------- 13. TOOLTIP (legacy id) ------------------------------------- */
#tooltip {
  position: fixed;
  z-index: 100;
  max-width: 280px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  padding: 9px var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--color-text);
  opacity: 0;
  transition: opacity 0.12s ease;
}

#tooltip.show { opacity: 1; }
#tooltip small { display: block; color: var(--color-text-muted); margin-top: 3px; }

/* ---------- 14. FOOTER --------------------------------------------------- */
.app-footer {
  max-width: 900px;
  margin: var(--space-4) auto 0;
  padding: var(--space-4);
  text-align: center;
  border-top: 1px solid var(--color-line);
}

.app-footer p { margin: 0 0 var(--space-2); }

/* ---------- 15. RESPONSIVE ---------------------------------------------- */
@media (max-width: 1100px) {
  .overview-grid,
  .chart-grid,
  .ops-grid,
  .seo-live-grid { grid-template-columns: 1fr; }

  .overview-grid { grid-template-columns: 1fr; }

  .metric-grid,
  .seo-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .seo-hero-main { grid-template-columns: 1fr; }
  .seo-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .app-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar { justify-content: stretch; }
  .toolbar label,
  .toolbar select,
  .button,
  .nav-button { width: 100%; }

  .shell { padding: var(--space-3); }

  .kpi-strip,
  .metric-grid,
  .seo-facts { grid-template-columns: 1fr; }

  .seo-hero { padding: var(--space-3); }
  .seo-hero h1 { font-size: var(--text-2xl); }
  .seo-actions { display: grid; grid-template-columns: 1fr; }

  .map-canvas { min-height: 300px; }
  .product-row { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   BX3 — Ana Sayfa Layout Yeniden Tasarımı
   Harita (sol, geniş) + şehir sütunu (sağ, dikey yığılmış) + sekmeli alt bölüm
   ========================================================================== */

/* ---------- BX3 main grid ------------------------------------------------ */
.bx3-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(340px, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  align-items: start;
}

/* Map panel: taller in the wider column */
.bx3-grid .map-panel .map-canvas {
  min-height: 480px;
  aspect-ratio: 5 / 3;
}

/* Right column: city panel + history charts stacked */
.bx3-city-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Compact chart height in right column so they fit without huge scroll */
.bx3-city-col .chart { height: 200px; }

/* ---------- BX3 tab bar -------------------------------------------------- */
.bx3-tabs-wrap {
  margin-bottom: var(--space-3);
}

.bx3-tabs {
  display: flex;
  border-bottom: 2px solid var(--color-line);
  margin-bottom: var(--space-3);
  gap: 0;
}

.bx3-tab {
  padding: var(--space-2) var(--space-5);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.bx3-tab:hover { color: var(--color-text); }

.bx3-tab[aria-selected="true"] {
  color: var(--color-gold-300);
  border-bottom-color: var(--color-gold-500);
  font-weight: 600;
}

.bx3-tabpanel { /* visible state — no extra style needed */ }
.bx3-tabpanel--hidden { display: none; }

/* ---------- Piyasa tab: spread table + 2 comparison charts --------------- */
/* BX4 override below (align-items: start, taller charts) */

/* ---------- Bankalar tab: bank reference table margin -------------------- */
.bx3-banks-table {
  margin-top: var(--space-3);
}

/* ---------- BX3 responsive ----------------------------------------------- */
@media (max-width: 1200px) {
  .bx3-grid {
    grid-template-columns: 1fr;
  }

  .bx3-grid .map-panel .map-canvas {
    min-height: 360px;
  }

  .bx3-piyasa-grid {
    grid-template-columns: 1fr;
  }

  .bx3-piyasa-table { grid-row: auto; }
}

@media (max-width: 640px) {
  .bx3-tabs { overflow-x: auto; }
  .bx3-tab  { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
}

/* ==========================================================================
   BX2 — Üst Ticker Bar
   ADR-013: REST polling (60s), CSS keyframes animation, pause on hover.
   ========================================================================== */

/* ---------- Ticker bar container ----------------------------------------- */
.ticker-bar {
  height: 48px;
  overflow: hidden;
  background: var(--color-surface-3);
  border-bottom: 1px solid var(--color-line-soft);
}

/* ---------- Scrolling track ---------------------------------------------- */
.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  animation: ticker-scroll var(--ticker-dur, 60s) linear infinite;
  will-change: transform;
  cursor: default;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Individual item ---------------------------------------------- */
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  height: 100%;
  color: inherit;
  text-decoration: none;
  border-right: 1px solid var(--color-line-soft);
  cursor: pointer;
  transition: background 0.1s;
}

.ticker-item:hover {
  background: var(--color-surface-2);
  text-decoration: none;
}

.ticker-item__name {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

.ticker-item__price {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-gold-300);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

.ticker-item__spread {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-dim);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

.ticker-item__age {
  font-size: var(--text-xs);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  background: var(--color-line);
  color: var(--color-text-dim);
}
.ticker-item__age--ok   { color: var(--color-success); }
.ticker-item__age--warn { color: var(--color-warn); }
.ticker-item__age--err  { color: var(--color-danger); }

.ticker-empty {
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-dim);
}

/* ---------- Mini hover panel (position: fixed via JS) -------------------- */
.ticker-mini-panel {
  position: fixed;
  z-index: 200;
  min-width: 240px;
  max-width: 300px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.ticker-mini-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ticker-mini__head {
  padding: var(--space-2) var(--space-3);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-gold-300);
  border-bottom: 1px solid var(--color-line);
}

.ticker-mini__loading {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.ticker-mini__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

.ticker-mini__label { color: var(--color-text-muted); }

.ticker-mini__val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
  color: var(--color-gold-200);
}

.ticker-mini__spread {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
  color: var(--color-text-dim);
}

.ticker-mini__foot {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-gold-400);
  border-top: 1px solid var(--color-line);
  text-align: right;
  text-decoration: none;
}

.ticker-mini__foot:hover {
  color: var(--color-gold-300);
  text-decoration: underline;
}

/* ---------- Responsive: mobile ------------------------------------------ */
@media (max-width: 640px) {
  .ticker-bar { height: 32px; }
  .ticker-item { padding: 0 var(--space-3); gap: var(--space-1); }
  .ticker-item__spread,
  .ticker-item__age { display: none; }
  .ticker-item__name { font-size: var(--text-xs); }
  .ticker-item__price { font-size: var(--text-xs); }
}

/* ==========================================================================
   BX4 — Interaction & Hover System
   ========================================================================== */

/* ---------- Navbar nav-links -------------------------------------------- */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  padding: 0 var(--space-2);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
  text-decoration: none;
}

.nav-link--soon {
  cursor: default;
  opacity: 0.6;
}

.nav-link--soon:hover {
  background: transparent;
  color: var(--color-text-muted);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-gold-500) 20%, var(--color-surface-2));
  border: 1px solid color-mix(in srgb, var(--color-gold-500) 35%, var(--color-line));
  color: var(--color-gold-400);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Map tooltip improvements ------------------------------------ */
#tooltip .tip-row {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  margin: 1px 0;
}

#tooltip .tip-label {
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  min-width: 42px;
}

/* ---------- Chart crosshair --------------------------------------------- */
.chart-crosshair {
  stroke: var(--color-gold-400);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.08s;
}

.chart-crosshair.is-visible { opacity: 0.7; }

/* ---------- Chart hover tooltip (.chart-tip) ------------------------------ */
.chart-tip {
  position: fixed;
  z-index: 150;
  min-width: 160px;
  max-width: 240px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--color-text);
  font-size: var(--text-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.chart-tip.is-open { opacity: 1; }

.chart-tip__time {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  margin-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-line-soft);
  padding-bottom: var(--space-1);
}

.chart-tip__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: 1px 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.chart-tip__row span { color: var(--color-text-muted); font-family: var(--font-sans); font-size: var(--text-xs); }
.chart-tip__buy  { color: var(--chart-buy) !important; }
.chart-tip__sell { color: var(--color-gold-300) !important; }

/* ---------- Sort indicators --------------------------------------------- */
th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover { color: var(--color-text); }

.sort-icon {
  display: inline-block;
  margin-left: 4px;
  color: var(--color-text-dim);
  font-size: 10px;
}

.sort-icon.active { color: var(--color-gold-400); }

/* ---------- Bar chart hover --------------------------------------------- */
.bar-fill--hover { opacity: 0.75; }

.bar-group { cursor: pointer; }

.bar-label {
  fill: var(--color-text-muted);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
}

.bar-value {
  fill: var(--color-text);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  paint-order: stroke;
  stroke: var(--color-surface-1);
  stroke-width: 3px;
  stroke-linejoin: round;
}

/* ---------- Bottom section improvements --------------------------------- */
.bx3-piyasa-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.5fr) repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: start;
}

.bx3-piyasa-table { grid-row: auto; }

.bx3-piyasa-grid .chart { height: 320px; }

/* ---------- Responsive: nav-links on small screens — handled by BX5 nav toggle -- */

@media (max-width: 760px) {
  .bx3-piyasa-grid { grid-template-columns: 1fr; }
  .bx3-piyasa-grid .chart { height: 240px; }
}

/* ---------- Fix: sticky header scrolls away on mobile ------------------- */
@media (max-width: 768px) {
  .sticky-top { position: static; }
}

/* ---------- History charts — full width, stacked vertically ------------- */
.history-charts-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.history-charts-row .chart { height: 280px; }

/* ---------- Homepage: Piyasa Özeti section ------------------------------- */
.home-market {
  margin-bottom: var(--space-5);
}

.home-market__header {
  margin-bottom: var(--space-4);
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}

.home-market__header h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-gold-300);
}

.home-market__header p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Stat cards — full width row, 6 cards */
.home-stat-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

@media (max-width: 1100px) {
  .home-stat-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .home-stat-cards { grid-template-columns: repeat(2, 1fr); }
}

.home-stat-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.home-stat-card__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.home-stat-card__value {
  font-size: var(--text-lg);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
  line-height: 1.2;
}

.home-stat-card__sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.home-stat-card--live {
  border-color: var(--color-gold-700);
}

.home-stat-card--live .home-stat-card__value {
  color: var(--color-gold-300);
  font-size: var(--text-xl);
}

.home-stat-card--soon {
  opacity: 0.55;
  pointer-events: none;
}

/* Bottom row: comparison + AI */
.home-bottom-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-3);
}

@media (max-width: 1000px) {
  .home-bottom-row { grid-template-columns: 1fr; }
}

.home-comparison {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  color: var(--color-text-muted);
}

.home-comparison__soon-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin: var(--space-2) 0 var(--space-1);
}

.home-comparison__assets {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.home-ai-comment {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.home-ai-comment__placeholder {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
  font-style: italic;
}

/* Coming soon badge */
.badge--soon {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--color-gold-700) 30%, transparent);
  border: 1px solid var(--color-gold-700);
  color: var(--color-gold-400);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ==========================================================================
   BX5 — Mobile Uyum
   Pinch-to-zoom harita, sticky tablo sütunu, touch target'lar, hamburger nav
   ========================================================================== */

/* ---------- BX5: Hamburger nav toggle button ----------------------------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  margin-left: auto;
  transition: background 0.1s, color 0.1s;
}
.nav-toggle:hover { color: var(--color-text); background: var(--color-surface-2); }

/* Nav-links header row (close button) — hidden on desktop */
.nav-links-header { display: none; }

/* Nav close button inside mobile menu */
.nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  transition: background 0.1s, color 0.1s;
}
.nav-close:hover { color: var(--color-text); background: var(--color-surface-2); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  /* Nav-links: hidden until toggled open, shown as fixed overlay */
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    flex-direction: column;
    gap: var(--space-1);
    background: var(--color-surface-1);
    border-bottom: 2px solid var(--color-gold-700);
    padding: var(--space-3) var(--space-4) var(--space-4);
    z-index: 300;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }

  .nav-links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-1);
    border-bottom: 1px solid var(--color-line-soft);
  }

  .nav-links .nav-link {
    min-height: 44px;
    padding: var(--space-3) var(--space-3);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
  }
}

/* ---------- BX5: Touch targets — minimum 44×44 px ----------------------- */
@media (hover: none), (pointer: coarse) {
  .button,
  .nav-link,
  .bx3-tab { min-height: 44px; }

  .bx3-tab { display: inline-flex; align-items: center; }

  /* Ticker items: touch area tall enough even at 32px bar (padding-block) */
  .ticker-item { padding-block: var(--space-2); }
}

/* ---------- BX5: Tablolar — mobilde yatay kaydırılabilir, sticky 1. sütun */
@media (max-width: 640px) {
  /* First column sticky so city/bank name is always visible while scrolling */
  .table-wrap table td:first-child,
  .table-wrap table th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--color-surface-1);
  }
  .table-wrap table th:first-child { z-index: 3; } /* above td sticky */

  /* Subtle right-shadow to hint there's more to scroll */
  .table-wrap table td:first-child::after,
  .table-wrap table th:first-child::after {
    content: "";
    position: absolute;
    top: 0; right: -6px; bottom: 0;
    width: 6px;
    background: linear-gradient(to right, var(--color-surface-1), transparent);
    pointer-events: none;
  }
  .table-wrap table td:first-child,
  .table-wrap table th:first-child { position: relative; }
  .table-wrap table td:first-child,
  .table-wrap table th:first-child { position: sticky; left: 0; }
}

/* ---------- BX5: Harita pinch-to-zoom — container overflow -------------- */
.map-zoom-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

#map svg {
  transition: transform 0.05s linear;
  touch-action: none; /* devredışı bırak, JS yönetiyor */
}

.map-zoom-reset {
  position: absolute;
  bottom: var(--space-2);
  right: var(--space-2);
  padding: var(--space-1) var(--space-3);
  min-height: 36px;
  background: color-mix(in srgb, var(--color-surface-2) 90%, transparent);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-family: var(--font-sans);
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: background 0.1s, color 0.1s;
}
.map-zoom-reset:hover { background: var(--color-surface-3); color: var(--color-text); }

/* ---------- BX5: Haberler tab placeholder ------------------------------- */
.haberler-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: 220px;
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-6) var(--space-4);
}

.haberler-placeholder__icon {
  font-size: 40px;
  opacity: 0.3;
  line-height: 1;
}

.haberler-placeholder__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.haberler-placeholder__desc {
  font-size: var(--text-sm);
  max-width: 440px;
  line-height: 1.7;
}

.haberler-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

@media (max-width: 900px) {
  .haberler-grid { grid-template-columns: 1fr; }
}

/* ---------- BX7: Responsive min-width fixes ----------------------------- */
@media (max-width: 600px) {
  .brand { min-width: 0; }
  .panel-head .bank-chart-picker { min-width: 0; }
  .panel-head .bank-chart-picker select { min-width: 0; width: 100%; }
}

/* ---------- BX7: Safe-area-inset for fixed elements (iPhone notch) ------- */
#tooltip,
.ui-tooltip,
.chart-tip {
  padding-bottom: max(var(--space-2), env(safe-area-inset-bottom));
}

.ticker-mini-panel {
  padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
}

@media (max-width: 900px) {
  .nav-links {
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* ========================================================================
   BX8: Haberler sekmesi — haber feed, AI yorum, ekonomik takvim
   ======================================================================== */

/* Ana layout: haber feed solda, AI sağda; takvim altta tam genişlik */
.haberler-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-3);
}

.haberler-feed-panel    { grid-column: 1; grid-row: 1; }
.haberler-ai-panel      { grid-column: 2; grid-row: 1; }
.haberler-calendar-panel { grid-column: 1 / -1; grid-row: 2; }

@media (max-width: 900px) {
  .haberler-layout {
    grid-template-columns: 1fr;
  }
  .haberler-feed-panel,
  .haberler-ai-panel,
  .haberler-calendar-panel {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ---------- Haber kartları ---------------------------------------------- */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 520px;
  overflow-y: auto;
  padding-right: var(--space-1);
}

.news-empty { padding: var(--space-4); text-align: center; }

.news-card {
  display: block;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s, border-color 0.15s;
}

.news-card:hover {
  background: var(--color-surface-3);
  border-color: var(--color-accent);
  text-decoration: none;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.news-card__flag { font-size: 14px; }
.news-card__source { font-weight: 500; }
.news-card__date { margin-left: auto; white-space: nowrap; }

.news-card__title {
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 var(--space-1);
}

.news-card__summary {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- AI Yorum paneli --------------------------------------------- */
.ai-commentary-content {
  font-size: var(--text-sm);
  line-height: 1.7;
  min-height: 120px;
}

.ai-commentary-content p { margin: 0 0 var(--space-3); }
.ai-commentary-content p:last-child { margin-bottom: 0; }

.ai-disclaimer {
  font-size: var(--text-xs);
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-line);
}

/* ---------- Ekonomik Takvim tablosu ------------------------------------- */
.calendar-table { width: 100%; border-collapse: collapse; }

.calendar-table th,
.calendar-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-line);
  white-space: nowrap;
}

.calendar-table th { color: var(--color-text-muted); font-weight: 500; }
.calendar-table tbody tr:hover { background: var(--color-surface-2); }

.cal-currency {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-accent) 15%, transparent);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-mono);
}

.cal-importance {
  font-size: 11px;
  letter-spacing: 1px;
}

.imp-3 { color: #ef4444; }
.imp-2 { color: #f59e0b; }
.imp-1 { color: var(--color-text-muted); }

.cal-actual--filled {
  color: var(--color-accent);
  font-weight: 600;
}

/* ---------- Sentiment badge (haber kartı) -------------------------------- */
.sentiment-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.sentiment--strong-buy  { background: #166534; color: #4ade80; }
.sentiment--buy         { background: #14532d; color: #86efac; }
.sentiment--hold        { background: #1c1917; color: #a8a29e; }
.sentiment--sell        { background: #4c0519; color: #fca5a5; }
.sentiment--strong-sell { background: #7f1d1d; color: #f87171; }

[data-theme="light"] .sentiment--strong-buy  { background: #dcfce7; color: #166534; }
[data-theme="light"] .sentiment--buy         { background: #f0fdf4; color: #15803d; }
[data-theme="light"] .sentiment--hold        { background: #f5f5f4; color: #57534e; }
[data-theme="light"] .sentiment--sell        { background: #fff1f2; color: #be123c; }
[data-theme="light"] .sentiment--strong-sell { background: #fee2e2; color: #991b1b; }

.news-card__analyzing {
  font-size: var(--text-xs);
  font-style: italic;
  margin: var(--space-1) 0 0;
}

/* BDDK/SPK uyarı notu (footer'da veya haberler panelinde) */
.sentiment-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-line);
}
