/* ui-pages.css: ui.css sonrasında yüklenir. Yalnız belirteçleri (--accent, --panel, --line ...) kullanın, sabit renk yazmayın.
   Kapsam: Borçlar (birleşik kartlar + tablolar), Takvim, Araçlar, Gelir ve giderler, Öneriler, Faiz maliyeti, Ayrıntılı pano. */

/* ---------- Ortak: sayfa başlığı, odak halkası, boşluk ritmi ---------- */
.main:focus, .main:focus-visible, #view:focus, #view:focus-visible { outline: 0; box-shadow: none; }
.page-head { align-items: flex-end; margin-bottom: 24px; }
.page-head p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; max-width: 62ch; }
.page-head .btn { flex: none; }
.main .panel { margin-bottom: 20px; }
.panel > header h2 { letter-spacing: -.015em; }
.panel > header p { margin-top: 3px; line-height: 1.45; }
.empty { color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.empty .btn { margin-top: 4px; }
.stat .k { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
.stat .s { line-height: 1.4; }
.note { line-height: 1.55; }
.chip { font-weight: 600; letter-spacing: 0; white-space: nowrap; }

/* Sekmeler: yatay, tek satır; dar ekranda iki sütunlu ızgara */
.tabs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -2px 20px; padding: 2px; scroll-snap-type: x proximity; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; scroll-snap-align: start; min-height: 44px; padding: 8px 16px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .18s, color .18s, border-color .18s; }
.tabs button[aria-selected="true"] { box-shadow: 0 6px 16px color-mix(in srgb, var(--text) 16%, transparent); }
@media (max-width: 560px) {
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; margin: 0 0 20px; padding: 0; }
  .tabs button { justify-content: center; text-align: center; white-space: normal; line-height: 1.25; min-height: 46px; padding: 8px 12px; font-size: 13.5px; }
}

/* ---------- Birleşik Borçlar: filtre çipleri ve modern kart ızgarası ---------- */
.debt-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px; margin: 0 -2px 18px;
}
.debt-filters::-webkit-scrollbar { display: none; }
.debt-filters button, .debt-filter {
  all: unset; box-sizing: border-box; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  font-size: 13.5px; font-weight: 650; color: var(--text2);
  background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow-sm);
  transition: background-color .18s, color .18s, border-color .18s, box-shadow .18s, transform .15s;
}
.debt-filters button:hover, .debt-filter:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line2)); color: var(--text); }
.debt-filters button:active, .debt-filter:active { transform: scale(.96); }
.debt-filters button:focus-visible, .debt-filter:focus-visible { box-shadow: var(--focus); }
.debt-filters button[aria-pressed="true"], .debt-filters button[aria-selected="true"],
.debt-filters button.on, .debt-filters button.active, .debt-filter.on, .debt-filter.active {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-glow);
}

.debt-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
  gap: 16px; margin-bottom: 24px;
}
.debt-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px;
  border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(.2, .85, .3, 1), border-color .2s, box-shadow .22s;
}
.debt-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line2));
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}
.debt-card.is-late {
  border-color: color-mix(in srgb, var(--bad) 50%, var(--line));
  box-shadow: inset 3px 0 0 var(--bad), var(--shadow-sm);
}
.debt-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.debt-card-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.debt-card-head > div { min-width: 0; }
.debt-card-head h3 { font-size: 17px; font-weight: 750; letter-spacing: -.02em; line-height: 1.3; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.debt-card-head .muted { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.debt-card-amt { display: flex; flex-direction: column; gap: 2px; }
.debt-card-amt strong { font-size: 24px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--text); }
.debt-card-amt small { font-size: 12.5px; font-weight: 550; color: var(--muted); }
.debt-prog { display: grid; gap: 6px; }
.debt-prog .meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.debt-prog .meter > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--ok)); transition: width .55s cubic-bezier(.2, .85, .3, 1); }
.debt-card.is-done .debt-prog .meter > i { background: linear-gradient(90deg, var(--ok), var(--gold)); }
.debt-prog span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.debt-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text2); padding-top: 8px; border-top: 1px solid var(--line); }
.debt-meta .i { width: 15px; height: 15px; color: var(--accent-text); flex: none; }
.debt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.debt-actions .btn { min-height: 44px; padding: 8px 16px; }
.today-list .body { padding: 4px 0 8px; }
.today-list .list.compact li { padding: 12px 20px; }
.today-expand { width: calc(100% - 32px); margin: 10px 16px 8px; justify-content: center; min-height: 44px; border-radius: 14px; }
.debt-type-tag {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.debt-type-tag.is-kmh { background: var(--gold-soft); color: var(--warn); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.debt-type-tag.is-loan { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.debt-type-tag.is-overdue { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.debt-card-title { font-size: 17px; font-weight: 750; letter-spacing: -.02em; line-height: 1.3; margin: 6px 0 2px; color: var(--text); overflow-wrap: anywhere; }
.debt-card-sub { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.4; }
.debt-card-prog { display: grid; gap: 6px; }
.debt-card-prog-lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--muted); }
.debt-card-prog-lbl b { color: var(--text2); font-variant-numeric: tabular-nums; }
.debt-card-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.debt-card-bar > i, .debt-card-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  transition: width .55s cubic-bezier(.2, .85, .3, 1);
}
.debt-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); }
.debt-card-amount { font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--text); }
.debt-card-amount small { display: block; font-size: 12px; font-weight: 550; color: var(--muted); letter-spacing: 0; margin-bottom: 2px; }
.debt-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.debt-card-actions .btn { min-height: 44px; padding: 8px 16px; }

/* Kapanmış borç onur kartı & altın/safir rozet */
.debt-card.is-done {
  border-color: color-mix(in srgb, var(--gold) 52%, var(--line));
  background: linear-gradient(155deg, var(--panel), color-mix(in srgb, var(--gold-soft) 36%, var(--panel)) 68%, color-mix(in srgb, var(--ok-soft) 32%, var(--panel)));
}
.debt-card.is-done .debt-card-bar > i, .debt-card.is-done .debt-card-bar > span {
  background: linear-gradient(90deg, var(--ok), var(--gold));
}
.debt-done-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 750; white-space: nowrap;
  background: linear-gradient(135deg, var(--gold-soft), var(--ok-soft));
  color: var(--ok); border: 1px solid color-mix(in srgb, var(--gold) 60%, var(--ok));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--gold) 22%, transparent);
}

/* ---------- Borçlar: kart / KMH hesapları ---------- */
.acc-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; margin-bottom: 24px; }
.acc { padding: 20px; border-radius: 20px; transition: border-color .18s, box-shadow .18s, transform .18s; }
.acc:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line2)); }
.acc .b { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.acc .t { font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; margin: 2px 0 12px; color: var(--text); }
.acc .row { padding: 5px 0; margin: 0; font-size: 13.5px; align-items: baseline; gap: 12px; }
.acc .row b { font-weight: 650; }
.acc .meter { margin-top: 14px; height: 6px; border-radius: 999px; overflow: hidden; }
.acc .meter > i { border-radius: 999px; }
.acc[aria-pressed="true"] .t { color: var(--accent-text); }
.meter > i.w { background: var(--gold); }

/* Ayrıntı satırları: Taksitler / Düzenle / Sil */
.loan-actions { white-space: nowrap; }
.loan-actions .btn + .btn { margin-left: 4px; }

/* Tablolar: sakin başlık, ferah satır, sayılar sağda */
.table-wrap table { font-size: 14px; }
.table-wrap th { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); background: transparent; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table-wrap td { padding: 14px 16px; border-bottom: 1px solid var(--line); line-height: 1.4; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap td b { font-weight: 650; }
.table-wrap td .muted, .table-wrap td small { font-size: 12.5px; }
.table-wrap td.n, .table-wrap th.n { font-variant-numeric: tabular-nums; }
.table-wrap tbody tr:hover td { background: var(--accent-soft2); }
.table-wrap tbody tr:has(.btn):hover td { background: var(--accent-soft2); }
.bad-t { color: var(--bad); } .ok-t { color: var(--ok); } .warn-t { color: var(--warn); }

/* Kredi listesi: dar ekranda kart satırları */
@media (max-width: 860px) {
  .table-wrap.loan-table tbody tr { gap: 10px 16px; padding: 18px 16px; }
  .table-wrap.loan-table table tbody td:first-child,
  .table-wrap.loan-table table tbody td.n.loan-actions { width: auto; padding: 0; }
  .table-wrap.loan-table table tbody td:first-child { font-size: 15px; line-height: 1.45; }
  .table-wrap.loan-table table tbody td:first-child b { font-size: 16px; letter-spacing: -.01em; }
  .table-wrap.loan-table table tbody td:first-child .info-t { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft2); color: var(--accent-text); line-height: 1.45; }
  .table-wrap.loan-table td[data-label] { font-size: 14.5px; font-variant-numeric: tabular-nums; }
  .table-wrap.loan-table td[data-label]::before { margin-bottom: 2px; font-size: 12px; font-weight: 500; }
  .table-wrap.loan-table td.n .muted { display: inline; margin-left: 6px; font-size: 12.5px; }
  .table-wrap.loan-table .loan-actions { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); gap: 8px; }
  .table-wrap.loan-table .loan-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; min-height: 44px; }
  .table-wrap.loan-table .loan-actions .btn.danger { flex: 0 0 auto; }
}

/* ---------- Takvim ---------- */
.calnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; padding: 6px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
.calnav .sp { display: none; }
.calnav > span:not(.sp) { flex: 1; min-width: 0; text-align: center; font-size: 14px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.calnav > span .muted { display: block; font-weight: 500; font-size: 12px; }
.calnav .btn { flex: none; min-height: 44px; min-width: 44px; padding-inline: 16px; }
.calnav .btn[disabled] { opacity: .4; cursor: default; }
.calgrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; margin-bottom: 20px; }
button.mcal { position: relative; align-items: center; gap: 12px; padding: 18px 18px 18px 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s, transform .18s; }
button.mcal::after { color: var(--muted); font-size: 22px; margin-left: 0; transition: transform .18s, color .18s; }
button.mcal:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line2)); box-shadow: var(--shadow); }
button.mcal:hover::after { color: var(--accent-text); transform: translateX(2px); }
button.mcal .ch b { font-size: 16.5px; font-weight: 700; letter-spacing: -.02em; }
button.mcal .ch .muted { margin-top: 3px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
button.mcal .ch .muted .i { width: 14px; height: 14px; vertical-align: -2px; color: var(--accent-text); }
button.mcal .ct { align-items: flex-end; gap: 2px; }
button.mcal .ct b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
button.mcal .ct small { font-size: 12px; font-weight: 500; white-space: nowrap; }
button.mcal.warn { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 5%, var(--panel)); }
button.mcal.warn .ch b { color: var(--bad); }

/* Takvim Altın Zafer Kurdelesi: o ay borç bitiyorsa parlayan altın hap */
.mcard-win, .mcal-win {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%;
  margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 750;
  background: linear-gradient(135deg, var(--gold), color-mix(in srgb, var(--gold) 72%, var(--gold-soft)));
  color: var(--gold-ink);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--gold) 40%, transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
button.mcal:has(.mcard-win), button.mcal:has(.mcal-win) {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: linear-gradient(155deg, var(--panel), color-mix(in srgb, var(--gold-soft) 32%, var(--panel)));
}

@media (max-width: 560px) {
  .calgrid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  button.mcal { padding: 16px 14px 16px 18px; }
  .calnav { padding: 6px; }
  .calnav .btn { padding-inline: 12px; }
}

/* ---------- Araçlar Kart Gridi ---------- */
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px; margin-bottom: 24px;
}
.tool-card {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 22px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  min-height: 140px; text-align: left;
  transition: transform .22s cubic-bezier(.2, .85, .3, 1), border-color .2s, box-shadow .22s, background-color .2s;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line2));
  background: linear-gradient(155deg, var(--panel), var(--accent-soft2));
  box-shadow: var(--shadow);
}
.tool-card:active { transform: scale(.98); }
.tool-card:focus-visible { box-shadow: var(--focus); }
.tool-card-ic, .tool-card .ic {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-size: 22px; flex: none;
}
.tool-card-ic .i, .tool-card .ic .i { width: 24px; height: 24px; vertical-align: 0; }
.tool-card b, .tool-card h3 { font-size: 16.5px; font-weight: 750; letter-spacing: -.015em; color: var(--text); margin: 0; }
.tool-card small, .tool-card p { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0; }

/* ---------- Gelir ve giderler + Ayrıntılı pano (dash) ---------- */
.main.dash-mode { height: auto; overflow: visible; max-width: 1120px; padding: 8px 28px calc(var(--dock-h) + 56px + env(safe-area-inset-bottom)); display: block; }
.main.dash-mode #view, .dash { height: auto; }
.dash { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.dash.tight { gap: 20px; }
.dash h1 { display: block; margin: 0; font-size: clamp(26px, 3.4vw, 34px); font-weight: 750; letter-spacing: -.035em; line-height: 1.15; }
.dash-head { align-items: flex-end; gap: 12px 20px; }
.dash-head .muted { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; }
.dash.tight .dash-head .muted { display: block; }
.dash .status { padding: 12px 18px; border-radius: 16px; font-size: 14px; line-height: 1.5; max-width: 100%; }
.dash .status b { font-weight: 700; font-variant-numeric: tabular-nums; }
.dash .status span { margin-left: 0; display: block; font-size: 13px; }
.dash.tight .status { padding: 12px 18px; font-size: 14px; }
.dash-cols, .dash-cols.c3b { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dash-cols.c3b { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr) minmax(0, 1fr); }
.dp { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.dp > header { padding: 16px 20px; border-bottom: 1px solid var(--line); min-height: 0; flex-wrap: wrap; }
.dp > header h2 { font-size: 16.5px; font-weight: 700; letter-spacing: -.015em; }
.dp > header .muted { font-size: 12.5px; line-height: 1.4; }
.dp .body { padding: 16px 20px; font-size: 14px; overflow: visible; }
.dp .pad { padding: 16px 20px; }
.dp .empty { padding: 32px 20px; font-size: 14px; }
.dp .sec { margin: 18px 0 8px; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.dp .sec:first-child { margin-top: 0; }
.dp .foot { padding: 14px 20px; gap: 6px 16px; font-size: 12.5px; line-height: 1.5; background: var(--panel2); }
.dp .foot span { display: inline-flex; align-items: center; gap: 5px; }
.dp .foot .i { width: 14px; height: 14px; vertical-align: 0; }
.dp .more { padding: 10px 20px 16px; }

/* Listeler ve 2px checkbox bug düzeltmesi (22x22 görünür kutu + 44x44 tıklama alanı + yaylı pop) */
.list li { gap: 12px; }
.list .grow b { font-weight: 600; line-height: 1.35; }
.list .grow small { margin-top: 2px; font-size: 12.5px; line-height: 1.4; }
.list .amt { font-size: 14.5px; font-weight: 650; }
.dp .list.compact li { padding: 12px 20px; gap: 10px 12px; }
.dp .grow b, .dp .grow small { white-space: normal; overflow: visible; text-overflow: clip; }
.dp .grow b .i { width: 15px; height: 15px; vertical-align: -2px; color: var(--muted); }
.dp .list li .btn.sm { padding: 8px 14px; min-height: 44px; min-width: 44px; }
.dp .list li .btn.danger { padding: 8px 12px; }
.dp .list li .btn.danger .i { width: 15px; height: 15px; vertical-align: -2px; }

.dp .list input[type="checkbox"] {
  flex: none;
  width: 44px !important; height: 44px !important; min-width: 44px; min-height: 44px !important;
  margin: -11px !important; padding: 0 !important;
  border: 11px solid transparent; border-radius: 17px;
  background-clip: padding-box; background-origin: padding-box; background-color: var(--field);
  box-shadow: inset 0 0 0 2px var(--line2);
  transition: background-color .18s, box-shadow .18s, transform .2s cubic-bezier(.2, 1.4, .4, 1);
}
.dp .list input[type="checkbox"]:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.dp .list input[type="checkbox"]:checked {
  background-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent);
  animation: kese-chk-pop .32s cubic-bezier(.2, 1.45, .4, 1);
}
@keyframes kese-chk-pop {
  0% { transform: scale(.84); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.list li.dim { opacity: .55; }
.dt { width: 44px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.chips { gap: 8px; }
.chips .btn.sm { padding: 8px 14px; min-height: 44px; font-weight: 550; }
.chips .btn.sm .i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }

/* Satır içi eklenen formlar */
.dp form { gap: 12px !important; }
.dp form label { font-size: 13px; font-weight: 550; color: var(--text2); }
.dp form .grid2 { gap: 12px; }
.dp form .btn.primary { justify-content: center; }
.dp .hint { font-size: 12.5px; line-height: 1.45; }

/* Ayrıntılı pano: göstergeler, ilerleme çubukları, öneri satırları */
.kpis { gap: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis .stat, .dash.tight .kpis .stat { padding: 16px 18px; }
.kpis .stat .v, .dash.tight .kpis .stat .v { font-size: 22px; font-weight: 750; letter-spacing: -.03em; line-height: 1.2; }
.kpis .stat .s, .dash.tight .kpis .stat .s { display: block; white-space: normal; font-size: 12px; margin-top: 4px; }
.dp.fc .body.fcrow { padding: 16px 20px; gap: 12px; }
.fcard { padding: 14px 16px; border-radius: 16px; background: var(--panel2); border-color: var(--line); }
.fcard.neg { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 5%, var(--panel)); }
.fcard .m { font-size: 12.5px; font-weight: 600; }
.fcard .big { font-size: 20px; font-weight: 700; letter-spacing: -.03em; margin: 2px 0 6px; }
.fcard .ln { font-size: 12.5px; padding: 2px 0; }
.fcard .ev { font-size: 12px; }
.fc.compact .fcard { padding: 14px 16px; }
.fc.compact .big { font-size: 20px; }
.legend2 .lg { padding: 6px 0; font-size: 13.5px; }
.legend2 .lg i { width: 10px; height: 10px; border-radius: 50%; }
.mini { padding: 6px 0; font-size: 13.5px; gap: 12px; }
.rc { gap: 12px; padding: 8px 0; line-height: 1.5; }
.rc .ic { width: 24px; height: 24px; }
.rc .ic .i { width: 14px; height: 14px; }
.steps2 { line-height: 1.55; }
.mini .meter, .meter { height: 6px; border-radius: 999px; overflow: hidden; }
.meter > i { border-radius: 999px; }

@media (max-width: 1000px) {
  .main.dash-mode { padding: 4px 16px calc(var(--dock-h) + 56px + env(safe-area-inset-bottom)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpis .stat, .dash.tight .kpis .stat { padding: 14px 16px; }
  .kpis .stat .v, .dash.tight .kpis .stat .v { font-size: 19px; }
  .dash-cols, .dash-cols.c3b { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dash { gap: 16px; }
  .dash .status { width: 100%; box-sizing: border-box; }
}
@media (max-width: 560px) {
  .dp { border-radius: 20px; }
  .dp > header { padding: 14px 16px; }
  .dp .body, .dp .pad { padding: 14px 16px; }
  .dp .foot { padding: 12px 16px; }
  .dp .list.compact li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 48px; align-items: center; padding: 12px 16px; gap: 10px; }
  .dp .list.compact li > input[type="checkbox"] { grid-column: 1; grid-row: 1; }
  .dp .list.compact li > .grow { grid-column: 2; grid-row: 1; }
  .dp .list.compact li > .amt { grid-column: 3 / 5; grid-row: 1; justify-self: end; }
  .dp .list.compact li > .btn { grid-row: 2; }
  .dp .list.compact li > .btn:nth-of-type(1) { grid-column: 1 / 4; justify-content: center; text-align: center; }
  .dp .list.compact li > .btn:nth-of-type(2) { grid-column: 4; justify-self: end; width: 48px; justify-content: center; padding-inline: 0; }
  .dp .list.compact li:not(:has(> input[type="checkbox"])) { grid-template-columns: minmax(0, 1fr) auto 48px; }
  .dp .list.compact li:not(:has(> input[type="checkbox"])) > .grow { grid-column: 1; }
  .dp .list.compact li:not(:has(> input[type="checkbox"])) > .amt { grid-column: 2 / 4; }
  .dp .list.compact li:not(:has(> input[type="checkbox"])) > .btn:nth-of-type(1) { grid-column: 1 / 3; }
  .dp .list.compact li:not(:has(> input[type="checkbox"])) > .btn:nth-of-type(2) { grid-column: 3; justify-self: end; width: 48px; justify-content: center; padding-inline: 0; }
  .dp .list.compact li:has(> .dt) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
  .dp .list.compact li:has(> .dt) > .grow { flex: 1 1 120px; min-width: 120px; }
  .dp .list.compact li:has(> .dt) > .amt { order: 3; }
  .dp .list.compact li:has(> .dt) > .chip, .dp .list.compact li:has(> .dt) > .btn { order: 4; }
  .dp .list.compact li .btn.sm { min-height: 44px; }
  .dp form .grid2 { grid-template-columns: minmax(0, 1fr); }
  .mini { grid-template-columns: minmax(0, 1fr) auto; }
  .mini .meter { grid-column: 1 / -1; order: 3; }
}

/* ---------- Öneriler ---------- */
.recogrid, .recogrid[style] { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)) !important; gap: 16px; margin-bottom: 20px; align-items: stretch; }
.reco { gap: 14px; padding: 18px 20px; }
.recogrid .reco { border-radius: 20px; padding: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.recogrid .reco > div:last-child { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.reco .ic { width: 32px; height: 32px; }
.reco .ic .i { width: 17px; height: 17px; }
.reco h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -.015em; line-height: 1.35; }
.reco p, .recogrid .reco p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.reco .btn.sm { margin-top: 14px; min-height: 44px; }
.recogrid .reco.kritik { box-shadow: inset 3px 0 0 var(--bad), var(--shadow-sm); }
.recogrid .reco.uyari { box-shadow: inset 3px 0 0 var(--gold), var(--shadow-sm); }
.recogrid .reco.bilgi { box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm); }
.recogrid + .note { padding: 4px 4px 0 !important; border: 0; font-size: 13px; max-width: 74ch; }
@media (max-width: 560px) {
  .recogrid .reco { padding: 16px; gap: 12px; }
  .reco .ic { width: 30px; height: 30px; }
}

/* ---------- Faiz maliyeti ---------- */
.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; margin-bottom: 24px; }
.cards .stat { padding: 18px 20px; display: flex; flex-direction: column; }
.cards .stat .v { font-size: 24px; margin-top: 6px; line-height: 1.15; }
.cards .stat .s { margin-top: auto; padding-top: 8px; font-size: 12.5px; }
.cards .stat .v[style*="var(--muted)"] { color: var(--muted) !important; }
.cols2 { gap: 20px; margin-bottom: 20px; }
.cols2 > .panel { margin-bottom: 0; }
.barrow { padding: 14px 20px 6px; }
.barrow:last-of-type { padding-bottom: 20px; }
.barrow .lbl { font-size: 13.5px; margin-bottom: 8px; color: var(--text2); }
.barrow .lbl b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.bar { height: 30px; border-radius: 999px; font-size: 12px; font-weight: 600; gap: 2px; background: var(--line); }
.bar .a { background: var(--accent); color: var(--accent-ink); }
.bar .f { background: var(--bad); color: var(--accent-ink); }
.bar > span { padding: 0 10px; text-overflow: ellipsis; justify-content: flex-start; }
.bar > span:last-child:not(:only-child) { justify-content: flex-end; }
@media (max-width: 560px) { .bar { font-size: 12px; letter-spacing: -.01em; } .bar > span { padding: 0 8px; } }
.bar > span:first-child { border-radius: 999px 0 0 999px; }
.bar > span:last-child { border-radius: 0 999px 999px 0; }
.bar > span:only-child { border-radius: 999px; }
.panel > header p .a-dot, .panel > header p b { font-weight: 600; }
.table-wrap td:first-child .chip { margin-left: 6px; vertical-align: 1px; }
.table-wrap td:first-child .muted { margin-top: 2px; }
@media (max-width: 860px) {
  .cols2 { gap: 16px; }
  .barrow { padding: 12px 16px 4px; }
  .table-wrap:not(.loan-table) { box-shadow: inset -14px 0 12px -14px color-mix(in srgb, var(--text) 14%, transparent); }
  .table-wrap:not(.loan-table) table:not(.mx):has(th:nth-child(6)) th,
  .table-wrap:not(.loan-table) table:not(.mx):has(th:nth-child(6)) td { padding-block: 13px; }
  .table-wrap:not(.loan-table) table:not(.mx):has(th:nth-child(6)) td:first-child { font-size: 14px; line-height: 1.4; }
  .panel:has(> .table-wrap:not(.loan-table) table:not(.mx):has(th:nth-child(6)))::after { padding: 10px 16px 14px; font-size: 12.5px; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
  .cards .stat { padding: 14px 14px 12px; }
  .cards .stat .v { font-size: 18px; }
  .cards .stat .k { font-size: 12px; }
  .cards .stat .s { font-size: 12px; }
  .cards .stat:first-child { grid-column: 1 / -1; }
}

/* ---------- Temiz semantik dağılım/çubuk sınıfları ---------- */
.seg-ok { background: var(--ok); color: var(--accent-ink); }
.seg-accent { background: var(--accent); color: var(--accent-ink); }
.seg-gold { background: var(--gold); color: var(--gold-ink); }
.seg-bad { background: var(--bad); color: var(--accent-ink); }
.seg-bad-2 { background: color-mix(in srgb, var(--bad) 72%, var(--panel)); color: var(--accent-ink); }
.seg-bad-3 { background: color-mix(in srgb, var(--bad) 48%, var(--panel)); color: var(--text); }
.seg-bad-4 { background: color-mix(in srgb, var(--bad) 26%, var(--panel)); color: var(--text); }
.seg-muted { background: var(--line2); color: var(--text2); }
.dp .bar { gap: 2px; border-radius: 999px; }
.dp .bar > span { min-width: 0; }
.dp .legend2 .lg i { border-radius: 50%; }

/* Ayrıntılı pano: "Şimdi yapılacaklar" satırı her genişlikte esnek */
.dp .list.compact li:has(> .dt) { flex-wrap: wrap; row-gap: 8px; }
.dp .list.compact li:has(> .dt) > .grow { flex: 1 1 120px; min-width: 120px; }
.dp .list.compact li:has(> .dt) > .amt { order: 3; }
.dp .list.compact li:has(> .dt) > .chip, .dp .list.compact li:has(> .dt) > .btn { order: 4; white-space: nowrap; }
.dp .grow b { overflow-wrap: anywhere; }

/* ---------- Hareket azaltma ---------- */
@media (prefers-reduced-motion: reduce) {
  .acc, button.mcal, button.mcal::after, .tabs button,
  .debt-filters button, .debt-filter, .debt-card, .debt-card-bar > i, .debt-card-bar > span,
  .tool-card, .dp .list input[type="checkbox"] { transition: none !important; }
  .dp .list input[type="checkbox"]:checked { animation: none !important; }
  button.mcal:hover::after, .debt-card:hover, .tool-card:hover,
  .debt-filters button:active, .tool-card:active { transform: none !important; }
}
