/* ============================================================
   Page: hesaplar
   ============================================================ */

/* Tab bar — her hesap kategorisi bir sekme (dolgulu/segment tarzı:
   aktif = koyu zemin + beyaz yazı, pasif = açık zemin + koyu yazı) */
.acc-tabs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.acc-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px var(--space-3); cursor: pointer;
  background: var(--navy-tint); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: var(--fs-sm); font-weight: 600;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.acc-tab:hover { background: var(--border-strong); border-color: var(--navy-light); }
.acc-tab--active,
.acc-tab--active:hover { background: var(--text); border-color: var(--text); color: #fff; }
.acc-tab-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-full); font-size: 11px; font-weight: 700;
}
.acc-tab--active .acc-tab-count { background: rgba(255, 255, 255, .22); color: #fff; border-color: transparent; }

/* Boş tab içeriği */
.acc-empty {
  text-align: center; color: var(--text-muted); font-size: var(--fs-sm);
  padding: var(--space-8) var(--space-4);
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
}

/* Form içi ortak-limit info paneli + chip */
.cc-form-info {
  font-size: var(--fs-xs); color: var(--text); background: var(--surface-alt);
  border: 1px solid var(--border); padding: 8px var(--space-3);
  border-radius: var(--radius-sm); margin-bottom: var(--space-2); line-height: 1.5;
}
.cc-form-chip {
  display: inline-block; padding: 2px 8px; margin: 0 4px 2px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; color: var(--text-muted);
}

/* Hesap türü rozeti (Bireysel/Ticari) — banka kartlarında ve kredi kartı tablosunda */
.cc-tag {
  display: inline-block; padding: 1px 7px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700; line-height: 1.6;
  vertical-align: middle; margin-left: 4px;
}
.cc-tag--ticari   { background: rgba(53, 122, 189, .12); color: #2C6BB8; }
.cc-tag--bireysel { background: rgba(150, 110, 200, .14); color: #6B45A8; }
.cc-tag--ortak    { background: rgba(200, 82, 30, .12); color: var(--brand); }

/* Son ödeme yaklaştığında (≤5 gün) uyarı: S.Ödeme ve Ekstre Borcu verileri kırmızı.
   A.table.create'e taşındıktan sonra .cc-table sarmalayıcısı kalktı → genel sınıf
   (hem liste hücresinde hem kart görünümünde geçerli). */
.cc-cell--urgent,
.cc-cell--urgent .money { color: var(--red); font-weight: 700; }

/* ============================================================
   Hesaplar üst özeti — 4 stat-kart (Toplam Bakiye / KK Borcu /
   Toplam Hesap / Net Durum). Yeni tasarım token'ları + inline SVG.
   Kasa/banka/POS ve kredi kartı listeleri .data-table ile gösterilir;
   veresiye .acc-* kartlarıyla korunur.
   ============================================================ */
/* Üst özet ızgarası — DENGELİ responsive (4 → 2 → 1; asla 3+1 yetim kalmaz).
   Büyük KPI kartları (48px ikon + değer) için auto-fit orta genişlikte 3+1 yetim
   ürettiğinden, sabit-sayılı (4) panelde dengeli kırılım tercih edildi. Daha küçük
   .cs-stats kartları auto-fit ile akışkan (oradaki adaptif desen örneği). İleride
   karta yetki-kapısı eklenirse §8 "görünür-adet → kolon" sınıfı ile uyarlanır. */
.hs-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); margin-bottom: var(--space-5); }
.hs-stats--3 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) {
  .hs-stats   { grid-template-columns: repeat(4, 1fr); }
  .hs-stats--3 { grid-template-columns: repeat(3, 1fr); }   /* kasa 3 KPI tam-genişlik simetrik */
}
@media (max-width: 460px) {
  .hs-stats, .hs-stats--3 { grid-template-columns: 1fr; }   /* dar telefon: tek kolon */
}
.hs-stat-card {
  display: flex; align-items: center; gap: var(--space-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5); transition: box-shadow var(--transition);
}
.hs-stat-card:hover { box-shadow: var(--shadow-md); }
.hs-stat-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hs-stat-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hs-stat-icon.bg-green  { background: var(--green-soft); color: var(--green); }
.hs-stat-icon.bg-blue   { background: var(--blue-soft);  color: var(--blue); }
.hs-stat-icon.bg-red    { background: var(--red-soft);   color: var(--red); }
.hs-stat-icon.bg-orange { background: rgba(200, 82, 30, .12); color: var(--brand); }
.hs-stat-info { flex: 1; min-width: 0; }
.hs-stat-label { font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.hs-stat-value { font-size: var(--fs-lg); font-weight: 800; color: var(--navy); }
/* Hesap sahibi adı: diğer kartların başlık fontu gibi (ince, küçük) — bold değil. */
.hs-stat-value .hs-stat-owner { font-size: var(--fs-sm); font-weight: 400; color: var(--text-muted); }
/* IBAN uzun olduğundan kutucuğa sığması için: ince (bold değil), küçük, taşma kontrollü. */
.hs-stat-value .hs-stat-iban { font-size: var(--fs-sm); font-weight: 400; letter-spacing: .02em; word-break: break-all; }

/* Cari/ödünç hesap stat-kartlarında 2.satır: küçük ödeme(↑) / tahsilat(↓) kırılımı */
.hs-stat-sub { display: flex; gap: 10px; margin-top: 4px; font-size: 11px; font-weight: 600; }
.hs-stat-sub span { display: inline-flex; align-items: center; gap: 3px; }
.hs-stat-sub svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Döviz toplamı notu (Toplam Bakiye / Net Durum kartlarında) — muted */
.hs-stat-sub .hs-fxnote { color: var(--text-faint); font-weight: 600; }

/* Cins-bazlı döküm chip'leri (Toplam Bakiye altında: ₺ … · $ … · € …) */
.hs-cur-chip {
  display: inline-block; padding: 1px 7px; border-radius: var(--radius-full);
  background: var(--surface-alt); color: var(--text-muted);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ── Döviz Kurları kartı (Finans hub'ı) ──────────────────────────────── */
.hs-rates { margin: calc(-1 * var(--space-2)) 0 var(--space-4); }
.hs-rates-card {
  display: flex; align-items: center; gap: var(--space-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: var(--space-3) var(--space-4);
}
.hs-rates-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hs-rates-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hs-rates-body { flex: 1; min-width: 0; }
.hs-rates-head { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.hs-rates-title { font-weight: 800; color: var(--navy); font-size: var(--fs-sm); }
.hs-rates-meta { font-size: var(--fs-xs); color: var(--text-muted); }
.hs-rates-list { display: flex; gap: var(--space-5); margin-top: 4px; flex-wrap: wrap; }
.hs-rate { display: inline-flex; align-items: center; gap: 6px; }
.hs-rate-code { font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); }
.hs-rate-val { font-weight: 800; color: var(--navy); font-size: var(--fs-sm); }
.hs-rates-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
@media (max-width: 460px) {
  .hs-rates-card { flex-wrap: wrap; }
  .hs-rates-actions { width: 100%; }
  .hs-rates-actions .btn { flex: 1; justify-content: center; }
}

/* Döviz tutarlarının TRY-karşılığı (muted alt-değer) — sistem geneli (A.fx.withTRY) */
.fx-try { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); margin-top: 1px; }

/* — Kur geçmişi & trend modalı — */
.fx-hist-block { margin-bottom: var(--space-5); }
.fx-hist-block:last-of-type { margin-bottom: var(--space-2); }
.fx-hist-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.fx-hist-code { font-weight: 800; color: var(--navy); font-size: var(--fs-md); }
.fx-hist-now { font-weight: 800; color: var(--text); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.fx-spark { width: 100%; height: 44px; display: block; margin-bottom: var(--space-2);
  background: var(--surface-alt); border-radius: var(--radius-sm); }
.fx-spark polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.fx-spark circle { stroke: none; }
.fx-spark-up polyline, .fx-spark-up circle { stroke: var(--green); fill: var(--green); }
.fx-spark-down polyline, .fx-spark-down circle { stroke: var(--red); fill: var(--red); }
.fx-hist-table { font-size: var(--fs-sm); }
.fx-chg { font-weight: 700; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.fx-chg--up { color: var(--green); }
.fx-chg--down { color: var(--red); }
.fx-chg--flat { color: var(--text-muted); }

/* Media query gerekmez — auto-fit + minmax dar ekranda otomatik 1 kolona iner. */

/* Banka Adı altında IBAN (girilmişse) — küçük, soluk, monospace */
.hes-iban { font-size: 11px; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; margin-top: 2px; word-break: break-all; }
