/* FizyoPark Muhasebe — kendi stil dosyası.
 *
 * desk/styles.css'ten türetildi; ikisi aynı görünür ama birbirine bağlı değil
 * (birindeki değişiklik diğerini bozmasın). Ana panelin styles.css'i paylaşılmıyor.
 * Muhasebeye özel eklemeler dosyanın sonunda.
 */

:root {
  --ground: #0b1020;
  --surface: #141b30;
  --surface-2: #1b2440;
  --line: #26304d;
  --line-strong: #3a466b;

  --ink: #e7ecfb;
  --ink-2: #b9c3dd;
  --muted: #8d99b8;

  --brand: #3db84a;
  --brand-ink: #0b1020;
  --accent: #ff9500;
  --danger: #ef8873;

  --radius: 8px;
  --tap: 40px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

/* ─── Ortak öğeler ────────────────────────────────────────────────────────── */

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  padding: 0 16px;
  min-height: var(--tap);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--line); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled { opacity: .6; cursor: default; }

.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn--primary:hover { background: #46cc54; }

.btn--ghost { background: transparent; }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: 14px; }
.btn--block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; color: var(--muted); }

.field__input {
  width: 100%;
  min-height: var(--tap);
  padding: 0 12px;
  background: var(--ground);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
}
.field__input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
/* Tek satırlık kutular sabit yükseklikte: Safari <select>'i kendi küçük stiliyle çizip
   min-height'ı yok sayıyordu (yan yana kutular "bir büyük bir küçük" görünüyordu). */
input.field__input, select.field__input { height: var(--tap); box-sizing: border-box; }
select.field__input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238b93a7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  text-overflow: ellipsis;
}
.field__input--search { max-width: 280px; }
.field__hint { font-size: 12px; color: var(--muted); }
.field__hint--ok { color: var(--brand); }
.field__hint--warn { color: var(--accent); }
.field__opt { color: var(--muted); font-weight: 400; }

/* ─── Üye ekleme formu ────────────────────────────────────────────────────── */

.form-card {
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 160px; }

.form-actions { display: flex; gap: 10px; margin-top: 4px; }

.switch--block {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.switch__text--wide { min-width: 0; color: var(--ink-2); }

.chip-no {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ─── Giriş ekranı ────────────────────────────────────────────────────────── */

.login {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 520px at 18% -8%, rgba(61, 184, 74, .14), transparent 58%),
    radial-gradient(760px 480px at 108% 22%, rgba(255, 149, 0, .10), transparent 52%),
    var(--ground);
}

.login__card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login__title { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.login__subtitle { margin: -12px 0 4px; color: var(--muted); font-size: 14px; }
/* D şifresi kutusu: metin kutusu ama karakterler ● (şifre yöneticisi algılamasın) */
.input-secret { -webkit-text-security: disc; text-security: disc; font-family: inherit; letter-spacing: .1em; }
.login__hint { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
/* Giriş onayı: geçici kod kutusu */
.login__code { text-align: center; font-size: 22px; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
#approvalBox .login__subtitle { margin: -8px 0 0; line-height: 1.5; }

.login__error {
  margin: 0;
  padding: 10px 12px;
  background: rgba(239, 136, 115, .12);
  border: 1px solid rgba(239, 136, 115, .4);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 14px;
}

/* ─── Uygulama kabuğu ─────────────────────────────────────────────────────── */

.app { min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;   /* 20 → 14 (25.11.2026): Maaşlar sekmesiyle menü 1440 px'te tek satıra sığsın */
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.topbar__brand { display: flex; align-items: baseline; gap: 8px; }
.topbar__name { font-size: 18px; font-weight: 600; }
.topbar__sub { font-size: 13px; color: var(--muted); }

.tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
/* İşyeri | Şahsi defter geçişi (app.js setLedger) */
.ledger-switch { flex: 0 0 auto; }
/* Kayıtlı kişi (household) girişi: yalnız şahsi defter — geçiş, Panel bağlantısı ve yalnız-admin sekmeleri yok */
body.is-household #ledgerSwitch,
body.is-household .topbar__right .btn--link,
body.is-household .tab[data-admin-only] { display: none !important; }
/* İşlemler: açıklama kapalı kartta (telefon) kategorinin yanında; masaüstünde kendi sütununda */
.ptx-desc-m { display: none; }
.chip--muted { opacity: .55; }
/* Hesap › Kimler görsün: kişi başına bir işaret, yan yana sığdığı kadar */
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }

.tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  /* 10px (önce 14px): "Maaşlar" sekmesi eklenince (25.11.2026) 1440 px'te menü iki satıra taşıyordu */
  padding: 0 10px;
  min-height: 36px;
  border-radius: var(--radius);
  cursor: pointer;
}
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.tab--active {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
  font-weight: 600;
}

/* Yönetici sekmesi — desk hesabında hiç görünmez. */
.tab--admin { color: var(--accent); }
.tab--admin.tab--active { color: var(--accent); }

/* Üç çizgili menü düğmesi: yalnız telefonda (mobil katmanda açılır) */
.menu-btn { display: none; }

.topbar__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* Tutarları gizle / göster (gizle.js) */
.money-eye { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; line-height: 0; }
.money-eye.is-off { color: var(--warn, #f59e0b); border-color: currentColor; }
.topbar__user { font-size: 14px; color: var(--muted); }

.content { flex: 1; padding: 18px; }

.screen { display: flex; flex-direction: column; gap: 14px; }

.screen__head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.screen__title { margin: 0; font-size: 20px; font-weight: 600; }
/* Cari Hesap / Alacaklar: başlık = toplamları gizle/göster düğmesi */
.screen__title--toggle { cursor: pointer; user-select: none; }
.screen__title--toggle:hover { color: var(--brand); }

.screen__body { min-height: 120px; }

.daynav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.daynav__label { font-size: 15px; color: var(--ink-2); min-width: 220px; text-align: center; }

.empty {
  margin: 0;
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.empty--error { color: var(--danger); }

/* ─── Tablolar (6. adımda kullanılacak) ───────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

thead th {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr.is-clickable { cursor: pointer; }
tbody tr.is-clickable:hover { background: var(--surface-2); }
/* Ödemeler / Giderler: gün şeridi — gün değişince bir açık bir normal (app.js dayBands).
   background-image: telefondaki kart zemininin (background) üstüne biner, onu ezmez. */
.screen .table-wrap table.m-line tbody tr.row-day-alt { background-image: linear-gradient(rgba(255, 255, 255, .045), rgba(255, 255, 255, .045)); }

.cell-time { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.cell-muted { color: var(--muted); }
.cell-right { text-align: right; }
.cell-hint { font-size: 13px; white-space: nowrap; }

.cell-index {
  width: 1%;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-remaining { color: var(--brand); font-variant-numeric: tabular-nums; }

.subhead {
  margin: 18px 0 8px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.subhead:first-child { margin-top: 0; }

.subhead__count {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0;
}

/* ─── Günlük / Haftalık seçici ────────────────────────────────────────────── */

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  padding: 0 14px;
  min-height: 30px;
  border-radius: 5px;
  cursor: pointer;
}
.segmented__btn:hover { color: var(--ink); }
.segmented__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.segmented__btn--active {
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
}

.count { margin: 10px 2px 0; font-size: 13px; color: var(--muted); }
.count strong { color: var(--ink); }

/* Katılım durumu */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge--ok { background: rgba(61, 184, 74, .16); color: var(--brand); }
.badge--miss { background: rgba(239, 136, 115, .14); color: var(--danger); }
.badge--soon { background: rgba(255, 149, 0, .14); color: var(--accent); }

.row-upcoming td { background: rgba(255, 149, 0, .04); }

/* ─── Görünürlük anahtarı (yalnızca yönetici ekranı) ──────────────────────── */

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.switch input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.switch input:disabled { cursor: default; opacity: .5; }
.switch__text { font-size: 13px; color: var(--muted); min-width: 68px; }
.switch input:checked ~ .switch__text { color: var(--brand); font-weight: 600; }

/* ─── Paket kartı satırları ───────────────────────────────────────────────── */

.kv {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.kv:last-child { border-bottom: none; }
.kv__k { flex: 0 0 120px; color: var(--muted); font-size: 14px; }
.kv__v { flex: 1; }
.kv__strong { font-size: 18px; color: var(--brand); }

/* ─── Paket kartı ─────────────────────────────────────────────────────────── */

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 7, 16, .7); }

.modal__card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}

.modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.modal__title { margin: 0; font-size: 17px; font-weight: 600; flex: 1; }
.modal__body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }

.modal__foot {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.confirm-text { margin: 0; font-size: 15px; line-height: 1.55; }

.btn--danger { color: var(--danger); border-color: rgba(239, 136, 115, .45); }
.btn--danger:hover { background: rgba(239, 136, 115, .12); }
.btn--primary.btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #2a0f0a;
  font-weight: 600;
}
.btn--primary.btn--danger:hover { background: #f39683; }

/* Uzun randevu listeleri kartı taşırmasın. */
.table-wrap--scroll { max-height: 300px; overflow-y: auto; }
.table-wrap--scroll thead th { position: sticky; top: 0; z-index: 1; }
.empty--tight { padding: 14px 0; font-size: 14px; }

/* ─── Bildirim ────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  z-index: 200;   /* pencerenin (100) üstünde */
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  max-width: min(90vw, 460px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.toast--error { border-color: var(--danger); color: var(--danger); }

/* ─── Muhasebeye özel ─────────────────────────────────────────────────────── */

.btn--link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.field__input--date { max-width: 220px; color-scheme: dark; }

/* Bilgisayarda GG.AA.YYYY metin kutusu + takvim düğmesi; asıl tarih kutusu görünmez durur (app.js enhanceDateInputs) */
.date-mask { position: relative; display: block; max-width: 220px; }
.date-mask__text { width: 100%; padding-right: 36px; font-variant-numeric: tabular-nums; }
.date-mask__text.is-invalid { border-color: var(--danger); }
.date-mask__btn {
  position: absolute; top: 0; right: 0; bottom: 0; width: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--muted); pointer-events: none;
}
.date-mask:hover .date-mask__btn { color: inherit; }
/* Asıl tarih kutusu görünmez olarak takvim simgesinin üstünde durur: tıklama doğrudan ona gider.
 * Safari takvimi koddan (showPicker) açmıyor, gerçek tıklamayla açıyor; Chrome'da da aynı yol çalışır. */
.date-mask__native {
  position: absolute; top: 0; right: 0; bottom: 0; width: 34px; height: 100%; max-width: none;
  opacity: 0; padding: 0; border: 0; cursor: pointer;
}

/* Sekmedeki sayaç (örn. fiyat bekleyen paket sayısı) */
.tab__count {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}

/* Tutarlar: sağa yaslı, rakamlar alt alta hizalı */
.cell-money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money--due { color: var(--danger); font-weight: 600; }
.money--ok { color: var(--brand); }

/* Henüz yapılmamış ekranlar */
.placeholder {
  max-width: 560px;
  padding: 20px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-2);
}
.placeholder__title { margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.placeholder p { margin: 0; font-size: 14px; }

.badge--muted { background: var(--surface-2); color: var(--muted); }

.head-end { margin-left: auto; }
/* Cari Hesap › "Aktif üyeler": basılıyken yeşil */
#accActiveBtn { white-space: nowrap; flex: 0 0 auto; }
#accActiveBtn.btn--on { border-color: var(--brand); color: var(--brand); background: rgba(61, 184, 74, .12); }

tbody tr.row-warn td { background: rgba(239, 136, 115, .06); }

.warn-box {
  margin: 0;
  padding: 10px 12px;
  background: rgba(239, 136, 115, .1);
  border: 1px solid rgba(239, 136, 115, .4);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink);
}

/* Alacaklar: üye satırının altında açılan paket satırları */
.chev { display: inline-block; width: 12px; color: var(--muted); }
tbody tr.row-open td { background: var(--surface-2); border-bottom-color: transparent; }
tbody tr.row-sub td { background: rgba(255, 255, 255, .02); font-size: 14px; }
tbody tr.row-sub td:nth-child(2) { padding-left: 30px; }

.link { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
.link:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* Liste filtreleri */
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters .field { min-width: 150px; }

/* Sayfalama: ‹ Önceki 1 … 4 [5] 6 … 12 Sonraki › · 201–250 / 600 */
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 10px 0 4px; }
.pager__btn {
  min-width: 34px; height: 32px; padding: 0 10px;
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.pager__btn:hover:not(:disabled) { color: var(--ink); border-color: var(--line-strong); }
.pager__btn:disabled { opacity: .4; cursor: default; }
.pager__btn--active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.pager__gap { padding: 0 4px; color: var(--muted); }
.pager__size { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 13px; color: var(--muted); }
.pager__size select.field__input--sm { width: auto; height: 32px; min-height: 32px; padding: 0 28px 0 10px; }
.pager__info { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Ödemeler: dönem çubuğu (Günlük … Tarih aralığı) + ‹ etiket › */
.period-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.daynav--inline { margin-left: 0; }
.daynav--inline .daynav__label { min-width: 170px; font-weight: 600; color: var(--ink); }
.period-range { display: flex; align-items: center; gap: 8px; }
/* Ödemeler: tüm filtreler başlık satırında; sığmazsa düzenli şekilde alta kayar */
.pay-head { gap: 12px; margin-bottom: 12px; }
/* Özet / Ödemeler / Giderler: başlık sabit genişlikte, hemen yanında ‹ etiket › — üç ekranda tarih aynı yerde.
   Etiket sabit genişlik: gün değişince (Salı ↔ Cumartesi) ‹ › düğmeleri kaymasın; en uzunu "31.08.2026 Cumartesi" */
.pay-head > .screen__title { min-width: 6em; }
.pay-head .daynav__label {
  display: inline-block; box-sizing: border-box; width: 14em; min-width: 0;
  padding: 4px 10px; border: 1px solid transparent;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
/* Dönem etiketi = tarih seçici düğmesi (app.js openPeriodPicker) */
.daynav__pick { position: relative; display: inline-flex; }
.daynav__label--btn {
  background: transparent; border: 1px solid transparent; border-radius: var(--radius);
  padding: 4px 10px; font: inherit; font-size: 15px; cursor: pointer;
}
.daynav__label--btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.daynav__label--btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ppick {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 50;
  width: 264px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.ppick__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ppick__title { font-weight: 600; font-size: 14px; color: var(--ink); }
.ppick__nav {
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--ink-2); font: inherit; cursor: pointer;
}
.ppick__nav:hover { color: var(--ink); border-color: var(--line-strong); }
.ppick__months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ppick__dow, .ppick__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ppick__dow span { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.ppick__cell {
  height: 34px; border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.ppick__cell--day { height: 30px; }
.ppick__cell:hover { background: var(--surface-2); color: var(--ink); }
.ppick__cell--today { border-color: var(--line-strong); }
.ppick__cell--sel { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.ppick__cell--sel:hover { background: var(--brand); color: var(--brand-ink); }
.pay-head .switch--filter .switch__text { font-size: 13px; }
.period-bar__filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.period-bar__filters #payMethod { width: 150px; }
.period-bar__filters #payInvoice { width: 230px; }
.period-bar__filters #expFilterCategory { width: 220px; }
/* Şahsi defter › İşlemler: süzgeçler tek satırda sabit genişlik (Ödemeler gibi) */
.period-bar__filters #ptxSearch { width: 220px; }
.period-bar__filters #ptxKind, .period-bar__filters #ptxTag, .period-bar__filters #ptxPerson { width: 140px; }
.period-bar__filters #ptxAccount, .period-bar__filters #ptxCategory { width: 190px; }
.switch--filter { height: 36px; padding: 0 12px; box-sizing: border-box; white-space: nowrap; }
@media (max-width: 760px) {
  .period-bar .segmented { flex-wrap: wrap; }
  .period-bar__filters { margin-left: 0; width: 100%; }
  .period-bar__filters #payMethod, .period-bar__filters #payInvoice { flex: 1 1 140px; width: auto; }
}

.form-card--wide { max-width: 900px; }

/* Özet: kategori çubukları ve aylık tablo */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; min-width: 80px; }
.bar__fill { height: 100%; background: var(--accent); }
.bar__fill--ok { background: var(--brand); }   /* şahsi Özet › gelir kategorileri */
.stat--link { cursor: pointer; }
.stat--link:hover { border-color: var(--line-strong); background: var(--surface-2); }
.stat--link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Ayarlar: solda bölüm menüsü (sidebar), sağda içerik */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 12px; }
.side-nav {
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  position: sticky; top: 12px;
}
.side-nav__btn {
  appearance: none; border: 0; background: transparent; text-align: left;
  padding: 10px 12px; border-radius: calc(var(--radius) - 2px);
  color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer;
  border-left: 3px solid transparent;
}
.side-nav__btn:hover { background: var(--surface-2); color: var(--ink); }
.side-nav__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.side-nav__btn.is-active { background: var(--surface-2); color: var(--ink); font-weight: 600; border-left-color: var(--brand); }
.settings-main { min-width: 0; }
@media (max-width: 760px) {
  .settings-layout { grid-template-columns: 1fr; gap: 12px; }
  .side-nav { flex-direction: row; overflow-x: auto; position: static; }
  .side-nav__btn { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .side-nav__btn.is-active { border-bottom-color: var(--brand); }
}

/* Gider türü: personel seçimli (👤) */
.chip--person { border-color: var(--brand); }
.chip__btn--on { opacity: 1; filter: none; }
.chip__btn[data-cat-act="person"]:not(.chip__btn--on) { opacity: .35; filter: grayscale(1); }
/* Ayarlar › Personeller: ad + görev + ekle tek satır */
.add-box--inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.add-box--inline .field__input { flex: 1 1 200px; width: auto; }

/* Giderler: Toplam gider'in solundaki yeşil "+" kutusu (ana düğme rengi) — tam kare.
   İlk sütun sabit 84px, kutu 84×84; diğer kutular kalan genişliği paylaşır. */
.stats--exp { grid-template-columns: 84px repeat(auto-fit, minmax(160px, 1fr)); }
.stat.stat--add {
  width: 84px; height: 84px; padding: 0; align-self: center;
  display: flex; align-items: center; justify-content: center;
  font: inherit; font-size: 34px; font-weight: 400; line-height: 1;
  background: var(--brand); border-color: var(--brand); color: var(--brand-ink); cursor: pointer;
}
.stat.stat--add:hover:not(:disabled) { filter: brightness(1.08); }
.stat--add:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.stat--add:disabled { opacity: .4; cursor: not-allowed; }

/* Cari Hesap: göz düğmesi ve gizlenmiş rakam */
.btn--icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; }
.btn--icon[aria-pressed="true"] { color: var(--brand); border-color: var(--brand); }
/* Göz kapalı: kutuda yalnız başlık — tek satır, ortalı */
.stat--bare { display: flex; align-items: center; min-height: 0; }
.stat--bare .stat__label { margin: 0; font-size: 14px; color: var(--ink-2); }
/* Alacaklar: seçili filtre kutusu */
.stat--active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }

/* Geniş pencere: fiyatlandırma formu ve taksit tablosu sığsın */
.modal__card--wide { max-width: 720px; }

/* Üstte özet kutuları */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.stat__label { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.stat__value { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 12px; color: var(--muted); }

.note { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

/* Satır içi küçük düğme grubu */
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* Form ızgarası */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.field__input--money { text-align: right; font-variant-numeric: tabular-nums; }
.field__input--sm { min-height: 36px; padding: 0 10px; font-size: 14px; }
input.field__input--sm, select.field__input--sm { height: 36px; }
select.field__input--sm { padding-right: 30px; background-position: right 10px center; }

/* Fiyatlandırma: taksit planı kutusu */
.plan-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.plan-sum { margin: 0; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.plan-sum--bad { color: var(--danger); font-weight: 600; }
.plan-sum--ok { color: var(--brand); }

/* Gider ekle: Ödeme yöntemi seçimi + yanında "Taksit" onay kutusu */
.method-row { display: flex; align-items: center; gap: 10px; }
.method-row select { flex: 1 1 auto; min-width: 0; }
.inst-check {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  white-space: nowrap; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.inst-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }

.rows-table td, .rows-table th { padding: 6px 8px; }
.rows-table .field__input { min-width: 0; }

/* Cari kart › Hesap hareketleri başlığı + filtre (Tümü / Ödemeler / Paket satışları / Hizmetler) */
.ledger-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.ledger-head .subhead { margin: 0; }
.ledger-head .segmented { margin-left: auto; }
@media (max-width: 760px) {
  .ledger-head .segmented { margin-left: 0; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; }
  /* Düğmeler satırı iki yana yaslı doldurur (eşit pay) */
  .ledger-head .segmented__btn { flex: 1 1 0; justify-content: center; text-align: center; padding-left: 6px; padding-right: 6px; }
}


/* Fiyatlandır penceresi › Önceki fiyatlar */
.prev-prices .subhead { margin-top: 0; }
.prev-prices .table-wrap { max-height: 220px; overflow-y: auto; }
.prev-prices td, .prev-prices th { font-size: 13px; }
/* Uzun fiyat notu alt satıra kırılır; tek satırda kalınca tabloyu genişletip tutar sütununu dışarı itiyordu */
.prev-prices .cell-hint { white-space: normal; overflow-wrap: anywhere; }

/* Cari hesap */
.acc-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.acc-head__name { margin: 0; font-size: 20px; font-weight: 600; }
.acc-head__meta { font-size: 14px; color: var(--muted); }
.acc-head__right { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.pkg-list { display: flex; flex-direction: column; gap: 10px; }

/* Cari kart: durum satırı */
.acc-head__status { flex: 1; min-width: 220px; }
.subhead--row { display: flex; align-items: center; gap: 8px; }
.subhead__ok { margin-left: auto; color: var(--brand); display: inline-flex; }
.acc-head__title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.acc-head__dash { color: var(--muted); }
.acc-status { font-size: 18px; }
.acc-status--ok { color: var(--brand); font-weight: 600; }
.acc-status--due { color: var(--danger); }
.acc-status--due strong { font-weight: 700; }

/* Cari kart: paketler ve seanslar — her kalem tek satır */
.item-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 190px 110px minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.item-row:last-child { border-bottom: 0; }
.item-row__title { font-weight: 600; }
.item-row__meta { font-size: 13px; color: var(--muted); }
.item-row__date { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-row__amt { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.item-row__state { font-size: 14px; }
details.fold .item-list { margin-top: 6px; }

/* Cari kart: Paketler ve hizmetler | Ödenmiş / kapanmış — yan yana iki sütun */
.acc-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.acc-split .item-row { grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr) auto; gap: 10px; }
.acc-split .item-row__amt { min-width: 80px; }
details.fold--head { margin-top: 0; }
details.fold--head > summary.subhead { margin: 18px 0 8px; padding: 0; font-size: 12px; color: var(--muted); }
/* Özet › "Ekim 2026 giderleri ›": ok sağda, açıkken aşağı döner */
details.sum-exp > summary { list-style: none; display: flex; align-items: center; }
details.sum-exp > summary::-webkit-details-marker { display: none; }
details.sum-exp > summary::after { content: '›'; margin-left: auto; font-size: 20px; line-height: 1; transition: transform .15s ease; }
details.sum-exp[open] > summary::after { transform: rotate(90deg); }
@media (max-width: 1100px) {
  .acc-split { grid-template-columns: 1fr; gap: 0; }
}

/* Cari kart: hesap hareketleri */
/* Ödeme satırı yeşil, borç satırı kırmızı (masaüstü: açık zemin + sol çizgi; telefonda kartın kendisi) */
.ledger tbody tr.ledger__row--credit td { background: rgba(61, 184, 74, .08); }
.ledger tbody tr.ledger__row--debit td { background: rgba(239, 136, 115, .08); }
.ledger tbody tr.ledger__row--credit td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.ledger tbody tr.ledger__row--debit td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.ledger__kind { font-weight: 600; white-space: nowrap; }
.cell-nowrap { white-space: nowrap; }

@media (max-width: 760px) {
  .item-row__amt:empty { display: none; }   /* tutar = kalan ise yazılmaz; boş satır kalmasın */
}
.pkg-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pkg-card--due { border-color: rgba(239, 136, 115, .55); }
.pkg-card__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pkg-card__title { font-weight: 600; }
.pkg-card__dates { font-size: 13px; color: var(--muted); }
.pkg-card__nums { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.pkg-card__nums span { color: var(--muted); }
.pkg-card__nums strong { font-variant-numeric: tabular-nums; }

details.fold { margin-top: 12px; }
details.fold > summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; }

/* Üye arama sonuçları */
.results {
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.results__item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.results__item:last-child { border-bottom: 0; }
.results__item:hover, .results__item:focus-visible { background: var(--surface-2); outline: none; }
.results__meta { font-size: 13px; color: var(--muted); }
.results__head {
  margin: 0;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

/* Cari hesap listesi: tıklanarak sıralanan sütunlar */
.th-sort { cursor: pointer; user-select: none; }
.th-sort:hover { color: var(--ink); }
.th-sort--active { color: var(--brand); }

.back-row { margin: 0 0 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back-row__end { margin-left: auto; }
.m-filter-btn { display: none; }   /* yalnız telefonda (mobil katman açar) */
.m-total-toggle { display: none; }   /* Ödemeler "Toplam ›" — yalnız telefonda */

/* Ayarlar: gider türleri */
.add-box { display: flex; gap: 8px; align-items: flex-start; }
.add-box__input { flex: 1; min-height: 40px; padding: 8px 12px; resize: vertical; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px 2px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}
.chip__n { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--ground); color: var(--muted); font-size: 11px; }
.chip__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 2px 5px;
  border-radius: 999px;
}
.chip__btn:hover { color: var(--ink); background: var(--line); }
.chip__btn--del:hover { color: var(--danger); }

/* ═══ Telefon düzeni (≤ 760px) ═══════════════════════════════════════════════
   Masaüstü düzeni olduğu gibi kalır; bu katman yalnız dar ekranda devreye girer ve
   dosyanın sonunda olduğu için öncekileri ezer. Kurallar:
   - dokunma hedefi ≥ 40px, yazı kutuları 16px (iOS odakta sayfayı büyütmesin)
   - başlık satırları alt alta, tam genişlik; yatay düğme grupları kaydırılır
   - ekran tabloları KART: her satır bir kart, hücre "Başlık  değer" (data-label, app.js labelTables)
   - pencereler alttan açılan tam genişlik panel
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  /* Kabuk — sayfa yana hiç kaymasın (taşan bir öğe kalsa bile) */
  /* html'deki hidden ekrana geçer; body'de clip (hidden body'yi kaydırma kutusu yapıp yapışkan üst çubuğu bozardı) */
  html { overflow-x: hidden; overscroll-behavior-x: none; }
  body { max-width: 100%; overflow-x: clip; }
  .content { padding: 12px 12px 24px; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .topbar__user { display: none; }
  .topbar { position: sticky; top: 0; z-index: 40; }
  .topbar__brand { order: 1; }
  .topbar__right { display: none; }   /* Panel / Kilitle telefonda yok; kilit hareketsizlikte kendiliğinden */
  /* Sekmeler ☰ düğmesinin altında dikey liste; kapalıyken gizli */
  /* ☰ + ekran adı: marka ile aynı satırda, sağa yaslı ("Ödemeler ☰") */
  .menu-btn {
    order: 2; margin-left: auto; display: flex; flex-direction: row-reverse; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
  }
  .menu-btn[aria-expanded="true"] { border-color: var(--line-strong); }
  /* Defter geçişi telefonda marka + ☰ satırının altında, tam genişlik (iki eşit düğme) */
  .ledger-switch { order: 3; flex: 1 1 100%; }
  .ledger-switch .segmented__btn { flex: 1 1 0; justify-content: center; text-align: center; }
  .menu-btn__label { white-space: nowrap; }
  .tabs { order: 4; flex-basis: 100%; display: none; flex-direction: column; gap: 2px; }
  .tabs.tabs--open { display: flex; }
  .tab { min-height: 44px; text-align: left; display: flex; align-items: center; justify-content: space-between; }

  /* Yazı kutuları: 16px (iOS büyütmesin), dokunma yüksekliği 40px+ */
  input.field__input, select.field__input, textarea.field__input,
  input.field__input--sm, select.field__input--sm { font-size: 16px; }
  input.field__input--sm, select.field__input--sm, .switch--filter { height: 40px; min-height: 40px; }
  .btn, .btn--sm { min-height: 40px; }
  .field__input--date { max-width: none; }

  /* Başlık satırı: başlık üstte, sonra dönem, sonra filtreler — hepsi tam genişlik */
  .screen__head, .pay-head { gap: 10px; }
  .screen__head > .screen__title { display: none; }   /* ekran adı zaten ☰ düğmesinde yazıyor */
  .screen__head .segmented, .period-bar .segmented {
    flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none;
  }
  .screen__head .segmented::-webkit-scrollbar { display: none; }
  .segmented__btn { white-space: nowrap; min-height: 36px; }
  .daynav, .daynav--inline { flex: 1 1 100%; margin-left: 0; justify-content: space-between; }
  .daynav__label, .pay-head .daynav__label, .daynav--inline .daynav__label { min-width: 0; flex: 1; }
  .period-range { flex: 1 1 100%; }
  .period-range .field__input { flex: 1; }
  .period-bar__filters { flex: 1 1 100%; margin-left: 0; }
  .period-bar__filters > * { flex: 1 1 calc(50% - 5px); width: auto !important; }
  .period-bar__filters .switch--filter { justify-content: center; }
  .field__input--search { max-width: none; flex: 1 1 0; width: auto; min-width: 0; }
  .head-end { margin-left: 0; }
  /* Excel'e aktar telefonda yok (kullanıcı isteği) */
  #recvExport, #payExport, #expExport { display: none; }
  /* Cari Hesap: göz yerine filtre düğmesi; kutular yalnız düğmeyle açılır */
  .m-filter-btn:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; height: 40px; }
  .m-filter-btn.btn--on { border-color: var(--brand); color: var(--brand); }
  .acc-stats:not(.is-open), .m-filter-stats:not(.is-open) { display: none; }
  /* Ödemeler: görünür olan yalnız ‹ dönem › + (başka dönemdeyse) Bu ay + ≡; gerisi ≡ ile açılır */
  #payNav { flex: 1 1 0; min-width: 0; }
  /* Sıra: ‹ dönem › + ≡ hep en üstte; ≡ açılınca filtreler ALTINA gelir (üstüne değil) */
  #payNav { order: 1; }
  #payFilterBtn { order: 2; }
  #payRange { order: 3; }
  #payAllNote { order: 3; }
  #payPeriod { order: 4; }
  .screen[data-screen="payments"] .period-bar__filters { order: 5; }
  #payNow.is-current, #sumToday.is-current, #expNow.is-current,
  #ptxNow.is-current, #pSumToday.is-current { display: none; }
  #ptxNow, #pSumToday { white-space: nowrap; }
  /* Giderler: Ödemeler'le aynı — ‹ dönem › + Bu ay + ≡ üstte; dönem türü ve gider türü ≡ içinde */
  #expNav { flex: 1 1 0; min-width: 0; order: 1; }
  #expFilterBtn { order: 2; margin-left: auto; }
  #expRange { order: 3; }
  #expPeriod { order: 4; }
  .screen[data-screen="expenses"] .period-bar__filters { order: 5; }
  #expFilterCategory { flex-basis: 100%; }   /* Excel telefonda yok: gider türü tam genişlik */
  .screen[data-screen="expenses"]:not(.m-filters-open) #expPeriod,
  .screen[data-screen="expenses"]:not(.m-filters-open) .period-bar__filters { display: none; }
  /* Şahsi defter › İşlemler: Giderler'le aynı — ‹ dönem › + ≡ üstte; dönem türü ve süzgeçler ≡ içinde */
  #ptxNav { flex: 1 1 0; min-width: 0; order: 1; }
  #ptxFilterBtn { order: 2; margin-left: auto; }
  #ptxRange { order: 3; }
  #ptxPeriod { order: 4; }
  .screen[data-screen="p-transactions"] .period-bar__filters { order: 5; }
  #ptxSearch { flex-basis: 100% !important; }
  #ptxExport { display: none; }   /* Excel telefonda yok (diğer ekranlar gibi) */
  .screen[data-screen="p-transactions"]:not(.m-filters-open) #ptxPeriod,
  .screen[data-screen="p-transactions"]:not(.m-filters-open) .period-bar__filters { display: none; }
  .ptx-desc-m { display: inline; }
  /* Şahsi defter kutuları: tek sütun, satırda başlık solda tutar sağda, döküm (stat__sub) altta */
  .screen .stats.p-stats { grid-template-columns: 1fr; gap: 6px; }
  .screen .p-stats .stat:not(.stat--add) {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; padding: 10px 12px;
  }
  .screen .p-stats .stat__label { margin: 0; }
  .screen .p-stats .stat__value { margin: 0; font-size: 17px; white-space: nowrap; text-align: right; }
  .screen .p-stats .stat__sub { grid-column: 1 / -1; margin-top: 2px; }
  .screen .p-stats .stat--add { min-height: 48px; }
  /* Özet: Tahsilat / Gider / Net — her kart tam genişlik tek satır: başlık solda, tutar sağda; döküm yok */
  .screen .stats.sum-stats { grid-template-columns: 1fr; gap: 6px; }   /* display'e dokunma: ≡ kapalıyken gizli kalmalı */
  .screen .sum-stats .stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 12px; }
  .screen .sum-stats .stat__label { margin: 0; flex: 1 1 auto; min-width: 0; text-align: left; }
  .screen .sum-stats .stat__value { margin: 0; flex: 0 0 auto; font-size: 16px; white-space: nowrap; text-align: right; }
  .screen .sum-stats .stat__sub { display: none; }
  /* Özet › Bugün itibarıyla: her kart tek satır (başlık solda, değer sağda); Fatura bekleyen gizli */
  .screen .stats.today-stats { grid-template-columns: 1fr; gap: 6px; }
  .screen .today-stats .stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 12px; }
  .screen .today-stats .stat__label { margin: 0; flex: 1 1 auto; min-width: 0; text-align: left; }
  .screen .today-stats .stat__value { margin: 0; flex: 0 0 auto; font-size: 16px; white-space: nowrap; text-align: right; }
  .screen .today-stats .stat__sub { display: none; }
  .screen .today-stats .stat.m-hide-stat { display: none; }
  #payFilterBtn { margin-left: auto; }
  .screen[data-screen="payments"]:not(.m-filters-open) #payPeriod,
  .screen[data-screen="payments"]:not(.m-filters-open) .period-bar__filters { display: none; }
  /* Ödemeler › "Toplam ›" satırı: dokununca kutular açılır; her kutu tek satır (başlık solda, tutar sağda) */
  .m-total-toggle:not([hidden]) {
    display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 8px 12px;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
    color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left;
  }
  /* Ödemeler: dönem satırı ile "Toplam" arası sıkı (ekran boşluğu 14 + başlık altı 12 → 6) */
  .screen[data-screen="payments"] { gap: 6px; }
  .screen[data-screen="payments"] > .pay-head { margin-bottom: 0; }
  .screen[data-screen="summary"] > .pay-head { margin-bottom: 0; }   /* Özet telefonda eskisi gibi */
  .m-total-toggle::after { content: '›'; margin-left: auto; font-size: 18px; line-height: 1; color: var(--muted); transition: transform .15s ease; }
  .m-total-toggle.is-open::after { transform: rotate(90deg); color: var(--brand); }
  .screen .stats.pay-stats, .screen .stats.exp-stats { grid-template-columns: 1fr; gap: 6px; }
  .screen .pay-stats .stat, .screen .exp-stats .m-tot-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
  .screen .pay-stats .stat__label, .screen .exp-stats .m-tot-card .stat__label { margin: 0; flex: 1 1 auto; min-width: 0; }
  .screen .pay-stats .stat__value, .screen .exp-stats .m-tot-card .stat__value { margin: 0; flex: 0 0 auto; font-size: 16px; white-space: nowrap; }
  .screen .pay-stats .stat__sub, .screen .exp-stats .stat__sub { display: none; }
  /* Giderler: "+" tam satır, "Toplam ›" hep görünür; kutular yalnız açıkken */
  .screen .exp-stats:not(.is-open) .m-tot-card { display: none; }
  .screen .exp-stats .m-total-toggle { margin: 0; }
  /* Giderler "+": ekranın sağ altında sabit yuvarlak düğme (başparmak altında); liste altı ona yer bırakır */
  .screen .exp-stats .stat.stat--add {
    position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30;
    width: 56px; height: 56px; padding: 0; border-radius: 50%; font-size: 30px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  }
  .screen[data-screen="expenses"] { padding-bottom: 72px; }
  .screen[data-screen="expenses"] { gap: 6px; }
  .screen[data-screen="expenses"] > .pay-head { margin-bottom: 0; }

  /* Özet kutuları: iki sütun; gider "+" tam satır yeşil düğme */
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat__value { font-size: 18px; }
  .stats--exp { grid-template-columns: 1fr 1fr; }
  .stat.stat--add { grid-column: 1 / -1; width: 100%; height: 48px; font-size: 28px; }

  /* Ekran tabloları → kartlar (pencere içi tablolar hariç) */
  .screen .table-wrap { border: 0; background: transparent; overflow: visible; }
  .screen .table-wrap table, .screen .table-wrap tbody, .screen .table-wrap tfoot,
  .screen .table-wrap tr, .screen .table-wrap td { display: block; width: 100%; }
  /* Kartta başlık satırı yok (her hücre başlığını data-label ile taşır). "Görünmez ama yerinde" gizleme
     thead'de çalışmıyordu (table-header-group'ta overflow işlemez): başlıklar sağa taşıp sayfayı yana kaydırıyordu. */
  .screen .table-wrap thead { display: none; }
  .screen .table-wrap tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 8px 12px; margin-bottom: 8px;
  }
  .screen .table-wrap tr.is-clickable:active { background: var(--surface-2); }
  /* Etiket solda (float), değer + alt notu sağda alt alta — hücrede birden çok parça olsa da dağılmaz */
  .screen .table-wrap td {
    padding: 5px 0; border: 0; text-align: right; white-space: normal;
    overflow-wrap: anywhere; min-height: 26px;
  }
  .screen .table-wrap td::after { content: ''; display: block; clear: both; }
  .screen .table-wrap td::before {
    content: attr(data-label); float: left; max-width: 45%; margin-right: 12px;
    font-size: 12px; color: var(--muted); text-align: left; letter-spacing: .02em; line-height: 1.9;
  }
  .screen .table-wrap td[data-label=""]::before { content: none; }
  .screen .table-wrap td[data-label=""] { text-align: left; }
  /* İlk hücre (genelde üye / tarih) kartın başlığı gibi: kalın, etiketsiz, sola yaslı */
  .screen .table-wrap td:first-child { font-weight: 600; font-size: 15px; padding-top: 2px; text-align: left; }
  .screen .table-wrap td:first-child::before { content: none; }
  .screen .table-wrap td .cell-hint { display: block; }
  /* İşlem düğmeleri kartın altında, sola yaslı, dokunulabilir */
  .screen .table-wrap td .row-actions { justify-content: flex-start; width: 100%; margin-top: 4px; }
  .screen .table-wrap td .row-actions .btn { flex: 1 1 auto; }
  /* Boş "—" hücreleri kartta yer kaplamasın */
  .screen .table-wrap td:empty { display: none; }
  /* Açılır kart (≥5 sütunlu tablolar): kapalıyken başlık + ikinci hücre + ana tutar (m-key);
     dokununca hepsi (app.js). Sağdaki ▸ / ▾ durumu gösterir. */
  .screen table.m-collapse tbody tr { cursor: pointer; }
  .screen table td.m-hide { display: none !important; }   /* telefonda hiç gösterilmeyen hücre (örn. Cari: Anlaşılan/Ödenen) */
  .screen table.m-collapse tbody tr:not(.is-open) td:not(:first-child):not(:nth-child(2)):not(.m-key):not(.m-show) { display: none; }
  /* Cari Hesap listesi: tek satır sade kart — üye adı solda, kalan sağda; gerisi cari kartta */
  .screen .table-wrap tr.m-direct { display: flex; align-items: center; gap: 12px; padding: 12px; }
  .screen .table-wrap tr.m-direct td { display: none; }
  .screen .table-wrap tr.m-direct td:first-child { display: block; flex: 1 1 auto; min-width: 0; padding: 0; min-height: 0; }
  .screen .table-wrap tr.m-direct td:first-child::after { content: none; }
  .screen .table-wrap tr.m-direct td:first-child .badge { display: none; }
  .screen .table-wrap tr.m-direct td.m-acc-kalan { display: block; flex: 0 0 auto; width: auto; padding: 0; min-height: 0; font-weight: 600; white-space: nowrap; }
  .screen .table-wrap tr.m-direct td.m-acc-kalan::before, .screen .table-wrap tr.m-direct td.m-acc-kalan .cell-hint { display: none; }

  /* Alacaklar kapalı kart: 1. satır üye adı (›); 2. satır paket adı (etiketsiz, solda) + "Kalan: …" / "Fazla: …" (sağda) */
  .screen .table-wrap table.recv-table tbody tr:not(.is-open) { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
  .screen .table-wrap table.recv-table tbody tr:not(.is-open) td:first-child { flex: 1 1 100%; }
  .screen .table-wrap table.recv-table tbody tr:not(.is-open) td:nth-child(2) { flex: 1 1 0; width: auto; min-width: 0; text-align: left; }
  .screen .table-wrap table.recv-table tbody tr:not(.is-open) td:nth-child(2)::before { content: none; }
  .screen .table-wrap table.recv-table tbody tr:not(.is-open) td.m-key { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .screen .table-wrap table.recv-table tbody tr:not(.is-open) td.m-key::before {
    content: attr(data-label) ': '; float: none; margin-right: 2px; font-size: inherit; line-height: inherit; letter-spacing: 0;
  }
  /* Fiyat Bekleyen: aynı iki satırlı kart; önerilen tutar başlıksız. Üyenin altında açılan paket
     satırlarında üye hücresi boş — boş ilk satır olmasın diye gizlenir (paket | tarih | tutar). */
  .screen .table-wrap table.pend-table tbody tr:not(.is-open) td.m-key::before { content: none; }
  .screen .table-wrap table.pend-table tbody tr.row-sub:not(.is-open) td:first-child { display: none; }
  /* Alt paket satırı: paket adı (solda) · başlangıç (sağda) · önerilen — etiketsiz. Üçü sığarsa tek satır;
     sığmazsa tutar alt satıra, sola düşer (paket adı daralmaz: flex-basis auto). */
  .screen .table-wrap table.pend-table tbody tr.row-sub:not(.is-open) td:nth-child(2) { flex: 1 0 auto; max-width: 100%; padding-left: 0; }
  .screen .table-wrap table.pend-table tbody tr.row-sub:not(.is-open) td.m-show {
    flex: 0 0 auto; width: auto; font-weight: 400; color: var(--ink-2);
  }
  .screen .table-wrap table.pend-table tbody tr.row-sub:not(.is-open) td.m-show::before { content: none; }

  /* Tek satır kapalı kart (Ödemeler): Tarih | Üye | Tutar — etiketsiz; dokununca açılır, açıkken ok görünür */
  .screen .table-wrap table.m-line tbody tr:not(.is-open) { display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td { width: auto; padding: 0; min-height: 0; }
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td::before,
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td:first-child::after { content: none; }
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td:first-child { flex: 0 0 auto; font-size: 13px; font-weight: 400; color: var(--muted); white-space: nowrap; }
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td:nth-child(2) {
    flex: 1 1 auto; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td:nth-child(2) .exp-person,
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td:nth-child(2) .badge,
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td:first-child .badge { display: none; }
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td.m-key { flex: 0 0 auto; white-space: nowrap; }
  /* Tablo görünümü: satırlar bitişik, aralarında çizgi; bir satır koyu bir satır açık (zebra) */
  .screen .table-wrap table.m-line tbody { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .screen .table-wrap table.m-line tbody tr { margin: 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
  .screen .table-wrap table.m-line tbody tr:nth-child(even) { background: var(--surface-2); }
  .screen .table-wrap table.m-line tbody tr:last-child { border-bottom: 0; }
  .screen .table-wrap table.m-line tbody tr.is-open { box-shadow: inset 3px 0 0 var(--brand); }

  /* Ayarlar › Fiyat Listesi: kapalı kart tek satır — paket adı solda, fiyat sağda; tablo görünümü (zebra) */
  .screen .table-wrap table.m-pair tbody { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .screen .table-wrap table.m-pair tbody tr { margin: 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
  .screen .table-wrap table.m-pair tbody tr:nth-child(even) { background: var(--surface-2); }
  .screen .table-wrap table.m-pair tbody tr:last-child { border-bottom: 0; }
  .screen .table-wrap table.m-pair tbody tr.is-open { box-shadow: inset 3px 0 0 var(--brand); }
  .screen .table-wrap table.m-pair tbody tr:not(.is-open) { display: flex; align-items: center; gap: 12px; padding: 11px 12px; }
  .screen .table-wrap table.m-pair tbody tr:not(.is-open) td { width: auto; padding: 0; min-height: 0; }
  .screen .table-wrap table.m-pair tbody tr:not(.is-open) td::before,
  .screen .table-wrap table.m-pair tbody tr:not(.is-open) td:first-child::after,
  .screen .table-wrap table.m-pair tbody tr:not(.is-open) td:first-child .cell-hint { content: none; display: none; }
  .screen .table-wrap table.m-pair tbody tr:not(.is-open) td:first-child { flex: 1 1 auto; min-width: 0; }
  .screen .table-wrap table.m-pair tbody tr:not(.is-open) td:nth-child(2) { flex: 0 0 auto; white-space: nowrap; text-align: right; }
  /* Kapalı tek satır kartlarda en sağda › (açılır olduğu belli olsun); açıkken ok başlık hücresinde döner */
  .screen .table-wrap table.m-pair tbody tr:not(.is-open) td:nth-child(2)::after,
  .screen .table-wrap table.m-line tbody tr:not(.is-open) td.m-key::after {
    content: '›'; display: inline-block; clear: none; margin-left: 10px; color: var(--muted);
    font-weight: 400; font-size: 20px; line-height: 1; vertical-align: -1px;
  }

  /* Liste sonu toplam satırı (Ödemeler, telefonda sayfalama yerine) */
  .m-total {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 8px; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--surface-2); font-weight: 600;
  }

  /* Hesap hareketleri kartları: ödeme yeşil, borç kırmızı */
  .screen .table-wrap table.ledger tr.ledger__row--credit { background: rgba(61, 184, 74, .10); border-color: rgba(61, 184, 74, .45); }
  .screen .table-wrap table.ledger tr.ledger__row--debit { background: rgba(239, 136, 115, .10); border-color: rgba(239, 136, 115, .45); }
  .screen .table-wrap table.ledger tr td { background: transparent; box-shadow: none; }
  .screen table.m-collapse tbody tr td:first-child::after {
    content: '›'; display: inline-block; float: right; clear: none;
    color: var(--muted); font-weight: 400; font-size: 24px; line-height: 18px; margin-left: 8px;
    transition: transform .15s ease;
  }
  .screen table.m-collapse tbody tr.is-open td:first-child::after { transform: rotate(90deg); color: var(--brand); }
  .screen table.m-collapse tbody tr.is-open { border-color: var(--line-strong); }
  .screen table.m-collapse tbody tr:not(.is-open) .m-key { font-weight: 600; }

  /* Karta dönmeyen küçük tablolar (Özet: ay ay tablo, gider türleri): sıkı tablo olarak kalır */
  .screen .table-wrap.m-keep { border: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
  .screen .table-wrap.m-keep table { display: table; width: 100%; }
  .screen .table-wrap.m-keep thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .screen .table-wrap.m-keep tbody { display: table-row-group; }
  .screen .table-wrap.m-keep tfoot { display: table-footer-group; }
  .screen .table-wrap.m-keep tr { display: table-row; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
  .screen .table-wrap.m-keep tfoot tr { background: var(--surface-2); }
  .screen .table-wrap.m-keep th,
  .screen .table-wrap.m-keep td {
    display: table-cell; width: auto; min-height: 0; padding: 8px 4px; font-size: 12px; font-weight: 400;
    text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line);
  }
  .screen .table-wrap.m-keep th:first-child, .screen .table-wrap.m-keep td:first-child { padding-left: 10px; }
  .screen .table-wrap.m-keep th:last-child, .screen .table-wrap.m-keep td:last-child { padding-right: 10px; }
  .screen .table-wrap.m-keep td::before, .screen .table-wrap.m-keep td::after { content: none; }
  .screen .table-wrap.m-keep td.cell-money, .screen .table-wrap.m-keep th.cell-right { text-align: right; }
  .screen .table-wrap.m-keep td .cell-hint { display: inline; margin-left: 4px; }

  /* Alacaklar: açılan alt kalemler ana kartın içinde girintili */
  .screen .table-wrap tr.row-sub { margin: -4px 0 8px 14px; width: calc(100% - 14px); background: var(--surface-2); }
  .screen .table-wrap tfoot tr { background: var(--surface-2); }

  /* Cari kart başlığı ve kalem satırları */
  .acc-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .acc-head__right { margin-left: 0; }
  .acc-head__right > * { flex: 1 1 auto; }
  /* Kalem kartı: 1. satır paket adı + durum rozeti (tek satır, sığmazsa …) ve düğmeler sağda;
     2. satır tarih solda, tutar sağda; 3. satır kalan / durum sağda. */
  .item-row, .acc-split .item-row {
    grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 4px;
    grid-template-areas: "main actions" "date amt" "state state";
  }
  .item-row__main { grid-area: main; min-width: 0; align-self: center; }
  .item-row__head { display: flex; align-items: center; gap: 6px; min-width: 0; }
  .item-row__title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .item-row__head .badge { flex: 0 0 auto; }
  .item-row .row-actions { grid-area: actions; align-self: center; justify-content: flex-end; flex-wrap: nowrap; gap: 6px; }
  .item-row .row-actions .btn { min-height: 34px; padding: 0 10px; font-size: 14px; }
  .item-row__date { grid-area: date; align-self: center; }
  .item-row__amt { grid-area: amt; align-self: center; text-align: right; white-space: nowrap; }
  .item-row__state { grid-area: state; text-align: right; }

  /* Pencere: alttan açılan tam genişlik panel */
  .modal { padding: 0; align-items: flex-end; }
  .modal__card, .modal__card--wide { max-width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .modal__body { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.form-grid--keep { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .form-grid--keep .field__input { width: 100%; min-width: 0; }
  /* iOS Safari tarih kutusu kendi en küçük genişliğini dayatıp yan kutunun üstüne taşıyordu ve
     değeri ortalıyordu: görünümü sıfırla, genişliği hücreye bağla, değeri sola yasla. */
  input[type="date"].field__input {
    -webkit-appearance: none; appearance: none;
    display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; text-align: left;
    min-height: 40px; line-height: 1.2;   /* görünüm sıfırlanınca iOS'ta boş kutu basıklaşmasın */
  }
  input[type="date"].field__input::-webkit-date-and-time-value { text-align: left; margin: 0; }
  .field { min-width: 0; }
  .prev-prices th:nth-child(4), .prev-prices td:nth-child(4) { display: none; }   /* Şekil: dar ekranda yer yok */
  .modal__foot .form-actions { flex-wrap: wrap; }
  .modal__foot .form-actions .btn { flex: 1 1 auto; min-height: 44px; }

  /* Sayfalama ve dönem seçici */
  .pager { justify-content: center; }
  .pager__info { margin-left: 0; flex-basis: 100%; text-align: center; }
  .ppick { position: fixed; left: 50%; top: auto; bottom: 16px; transform: translateX(-50%); width: min(92vw, 320px); }

  /* Ayarlar */
  .add-box { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* IBAN / hesap no: sabit genişlikli rakamlar, satır ortasında bölünmesin */
.p-iban { font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-iban-old { font-size: 13px; line-height: 1.7; font-variant-numeric: tabular-nums; }

/* ─── Ekstre aktarımı (sahsi-ekstre.js) ─────────────────────────────────── */
.pim-file { display: inline-flex; cursor: pointer; }
.pim-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.pim-check { margin: 8px 0; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.pim-check--ok { background: rgba(61, 184, 74, .12); color: var(--brand); }
.pim-check--bad { background: rgba(239, 136, 115, .14); color: var(--danger); }
.pim-check--warn { background: rgba(255, 149, 0, .12); color: var(--accent); }
.pim-account { max-width: 520px; margin-top: 8px; }
.pim-toolbar { display: flex; align-items: center; gap: 16px; margin: 16px 0 8px; flex-wrap: wrap; }
.pim-table td { vertical-align: top; }
.pim-table select.field__input--sm { min-width: 118px; max-width: 190px; }
.pim-table tr.pim-off td { opacity: .5; }
.pim-table tr.pim-off td:first-child { opacity: 1; }
.pim-table tr.pim-bad td { background: rgba(239, 136, 115, .18); }
.pim-table tr.pim-hide { display: none; }
.pim-table tr.pim-done td { opacity: .55; }
.pim-table tr.pim-done td:nth-child(3) > div:first-child, .pim-table tr.pim-done td:nth-child(4) { text-decoration: line-through; }
.pim-relink { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: rgba(61, 184, 74, .08); }
.pim-done-info { color: var(--brand); }
.pim-table th.pim-th { cursor: pointer; user-select: none; white-space: nowrap; }
.pim-table th.pim-th:hover { color: var(--text, inherit); background: rgba(255, 255, 255, .04); }
.pim-th__caret { opacity: .45; font-size: .8em; }
.pim-th--on, .pim-th__dot { color: var(--accent, #6aa9ff); }
.pim-th__dot { font-size: .7em; }
.pim-pop { position: absolute; z-index: 60; min-width: 200px; max-width: min(320px, calc(100vw - 16px)); padding: 10px; border-radius: 10px;
  background: var(--surface, #1d2230); border: 1px solid var(--border, rgba(255, 255, 255, .12)); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); display: grid; gap: 8px; }
.pim-pop__sort { display: flex; gap: 8px; flex-wrap: wrap; }
.pim-pop__list { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.pim-pop__opt { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .92em; }
.pim-footer { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 12px 0; margin-top: 8px; background: var(--ground); border-top: 1px solid var(--line); }
.pim-footer #pimTotals { margin-right: auto; }

/* İşlem notu (sizin notunuz; açıklama bankadan geldiği gibi) */
.ptx-note { color: var(--accent); font-size: 13px; margin-top: 2px; }
.pim-note { margin-top: 6px; max-width: 420px; }
.pim-note-add { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.pim-note-add:hover { color: var(--ink); text-decoration: underline; }

/* Alacaklar kişi kişi (sahsi-alacak.js) */
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.link-btn:hover strong { text-decoration: underline; }
.pdebt-person { cursor: pointer; }
.pdebt-person:hover td { background: var(--surface-2); }
.pdebt-entries td { font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
.pdebt-entries td:first-child { padding-left: 28px; }
.pdebt-add { display: grid; grid-template-columns: 2fr 1fr 1.2fr 1fr; gap: 8px; align-items: end; margin-top: 12px; }
@media (max-width: 720px) { .pdebt-add { grid-template-columns: 1fr 1fr; } }

/* Bölünmüş satır parçaları (ekstre önizlemesi) */
.pim-table tr.pim-part td { border-top: 0; padding-top: 2px; padding-bottom: 4px; background: rgba(255, 255, 255, .02); }
.pim-split-btn { margin-left: 12px; }

/* Şahsi Özet — sade düzen: iki panel (bu ay / bakiyeler) + yıl tablosu (16.11.2026) */
.p-sum-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
@media (max-width: 900px) { .p-sum-grid { grid-template-columns: minmax(0, 1fr); } }
.p-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.p-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.p-panel__head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.p-panel__head > span { font-variant-numeric: tabular-nums; font-weight: 600; }
.p-panel__sub { display: flex; justify-content: space-between; margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.p-panel .table-wrap { border: 0; }
.p-bal__net { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.p-bal__net strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.p-bal-table tr.p-bal-scope td { font-weight: 600; font-size: 15px; padding-top: 14px; }
.p-bal-table tr.p-bal-group td { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding-top: 10px; }
.p-bal-table td.p-bal-acc { padding-left: 26px; }
.p-bal-table td { white-space: nowrap; }
.p-bal-table td:first-child { white-space: normal; }

/* İşyeri › Hesaplar › Kasa hareketleri penceresi (Faz 3.2): daha geniş, tutarlar tek satır */
@media (min-width: 761px) { .modal__card--wide:has(#bCashBox) { max-width: 980px; } }
#bCashBox .stat__value { font-size: 18px; white-space: nowrap; }
#bCashBox td:first-child, #bCashBox td.cell-money { white-space: nowrap; }

/* Kart kutusu + taksit yükü (Faz 2.3, kartlar.js) */
.kart-panel { margin-bottom: 14px; }
.kart-panel td.cell-nowrap .badge { margin-left: 4px; }
.kart-alert { margin: 0 0 10px; }
.kart-items { margin-top: 10px; }
.kart-items > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; }
.kart-months td { padding-top: 6px; padding-bottom: 6px; }

/* İşyeri ↔ Şahsi cari paneli (Faz 2.5, cari.js) */
.cari-panel { margin-bottom: 14px; }
.cari-month { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 16px; margin-bottom: 10px; font-size: 14px; }
.cari-month > div { display: flex; justify-content: space-between; gap: 8px; }
@media (min-width: 761px) { .modal__card--wide:has(#cariBox) { max-width: 980px; } }
#cariBox .stat__value { font-size: 18px; white-space: nowrap; }

/* Ekstre ↔ işyeri kayıtları eşleşmesi (Faz 2.3b, sahsi-ekstre.js) */
.pim-link { font-size: 12px; margin-top: 3px; max-width: 320px; }
.pim-link--ok { color: var(--brand); }
.pim-link--miss { color: var(--accent); }
.pim-recon { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; font-size: 14px; }
.pim-recon summary { cursor: pointer; color: var(--accent); margin-top: 6px; }
.pim-recon-list { margin: 2px 0 0 18px; padding: 0; font-size: 13px; }

/* Gün sonu kasa sayımı (2.3b-B3, isyeri-hesaplar.js) */
.cash-count { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; background: var(--surface); }
.cash-count__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cash-count__val { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 8px; white-space: nowrap; }
@media (max-width: 760px) { .cash-count__row { grid-template-columns: 1fr 1fr; } }

/* Tekrarlayan kayıtlar (Faz 4.1, sahsi-tekrar.js) */
.rec-due { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; }
.rec-due .rec-amt { width: 9em; }
.rec-warn { margin: 0 0 12px; }

/* Bütçe (Faz 4.2, sahsi-butce.js) */
.bud-panel { margin-bottom: 14px; }
.bud-actions { display: inline-flex; gap: 14px; }
.bud-bar .bar__fill.bud--ok { background: var(--brand); }
.bud-bar .bar__fill.bud--warn { background: #e5b400; }
.bud-bar .bar__fill.bud--over { background: var(--danger); }
.bud-warn-txt { color: #e5b400; }

/* İşyeri Özet › ortak (aile) ile para (Faz 5, cari.js) */
.owner-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.owner-stats .stat__value { font-size: 19px; }

/* Raporlar (Faz 6, sahsi-rapor.js) */
.rp-panel { margin-bottom: 14px; }
.rp-chart { width: 100%; height: auto; display: block; margin-bottom: 10px; }
.rp-chart .rp-pos { fill: var(--brand); }
.rp-chart .rp-neg { fill: var(--danger); }
.rp-chart .rp-zero { stroke: var(--line-strong); stroke-width: 1; }
.rp-chart .rp-ax { fill: var(--muted); font-size: 15px; }
.rp-spark { width: 132px; height: 26px; display: block; }
.rp-spark rect { fill: var(--accent); }
.rp-good { color: var(--brand); }
.rp-bad { color: var(--danger); }

/* İşyeri gider türü grupları (17.11.2026) */
.cat-group { border-top: 1px solid var(--line); padding: 10px 0 6px; }
.cat-group:first-of-type { border-top: 0; }
.cat-group__head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.sum-sub td { font-size: 13px; padding-top: 3px !important; padding-bottom: 3px !important; }
.sum-sub td:first-child { padding-left: 24px !important; }

/* Aile Bütçesi alt kategorileri (17.11.2026) */
.pcat-row { padding: 6px 0; border-top: 1px solid var(--line); }
.pcat-row:first-of-type { border-top: 0; }
.pcat-kids { margin: 4px 0 2px 18px; }
.chips--sub .chip { font-size: 12px; padding-top: 2px; padding-bottom: 2px; }
.pcat-addsub { margin-left: 18px; }
#catAddGroup { width: 13em; flex: 0 0 auto; align-self: flex-start; }

/* ─── Banka kartları (banka-kartlari.js, 17.11.2026) ───────────────────── */
.bkc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; margin: 16px 0 20px; }
/* Kart düzeni (kart-duzeni.js): kayıtlı düzende kartlar ızgara birimiyle serbest yerleşir; birbirini itmez */
.bkc-grid.bkc-board { display: block; position: relative; }
/* Yatay kaydırma YOK: süs dairesi (.bkc::after, sağ üstte -40 px) taşıyordu → yatay çubuk (20.11.2026). Dikeyde içerik
   kartı aşarsa ince çubukla kayar. Dar kartta başlık (banka adı + toplam) alt satıra geçer. */
.bkc-board > .bkc { position: absolute; overflow-x: hidden; overflow-y: auto; margin: 0;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; }
.bkc-board > .bkc::-webkit-scrollbar { width: 6px; height: 0; }
.bkc-board > .bkc::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .35); border-radius: 3px; }
.bkc-board > .bkc::-webkit-scrollbar-track { background: transparent; }
.bkc-board .bkc-head { flex-wrap: wrap; }
.bkc-board .bkc-tot { margin-left: auto; }
/* Dar kartta tutar sığmazsa adın ALTINA, sağa yaslı geçer (kırpılmasın; ölçüm: 247 px'te Yapı Kredi tutarları taşıyordu) */
.bkc-board .bkc-row { flex-wrap: wrap; row-gap: 2px; }
.bkc-board .bkc-row__main { flex: 1 1 130px; }
.bkc-board .bkc-amt { margin-left: auto; }
.bkc-editing > .bkc { cursor: move; touch-action: none; user-select: none; outline: 2px dashed rgba(255, 255, 255, .55); outline-offset: -2px;
  border-radius: 4px; }   /* düzenlerken köşe az yuvarlak: köşeden tutulabilsin (16px yuvarlakta köşe ucu kartın dışında kalıyordu) */
.bkc-editing > .bkc::after { content: ''; position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; pointer-events: none;
  border-right: 3px solid rgba(255, 255, 255, .8); border-bottom: 3px solid rgba(255, 255, 255, .8); border-radius: 0 0 3px 0; }
.bkc-editing > .bkc * { pointer-events: none; }
.bkc-editing { background-image: linear-gradient(to right, rgba(127, 127, 127, .08) 1px, transparent 1px),
  linear-gradient(to bottom, rgba(127, 127, 127, .08) 1px, transparent 1px); background-size: calc(100% / 24) 20px; border-radius: 12px; }
.bkc-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin: 12px 0 -6px; }
.bkc-tools--on { justify-content: space-between; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 8px; }
.bkc-tools__hint { color: var(--muted); font-size: 13px; margin-right: auto; }
/* Son ödeme uyarısı kartın kendi satırının altında (renkli zemin üstünde okunur) */
.bkc-alert { margin-top: 6px; padding: 5px 8px; border-radius: 8px; font-size: 12px; line-height: 1.4; color: #fff; background: rgba(245, 158, 11, .35); border: 1px solid rgba(255, 214, 102, .6); white-space: normal; }
.bkc-alert--bad { background: rgba(220, 38, 38, .45); border-color: rgba(255, 150, 150, .7); }
.bkc--dark .bkc-alert { color: #1a1300; }
/* Giderler: ekstre süzgeci (hepsi / eşleşen / eşleşmeyen) */
.exp-stmt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; }
.exp-stmt-bar .segmented__btn { font-size: 13px; }
/* Özet ekranlarında banka kartları (seçili ayın sonundaki bakiye) */
.bkc-sumhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.bkc-sumhead h3 { margin: 0; font-size: 15px; font-weight: 600; }
.bkc-sumhead + .bkc-grid { margin: 12px 0 4px; }
#pSumBanks { margin-top: 16px; }
/* Şahsi › Hesaplar: "İşyeri" kutusu seçiliyken işyeri kasa ve banka bölümü */
.p-biz-head { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; display: flex; gap: 10px; align-items: baseline; }
.sum-banks { margin: 4px 0 20px; }
.bkc { color: #fff; border-radius: 16px; padding: 16px 16px 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); min-width: 0; position: relative; overflow: hidden; }
.bkc::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none; }
.bkc--dark { color: #1d1d1d; }
.bkc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.bkc-bank { font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; }
/* Banka simgesi (23.11.2026): adın solunda küçük beyaz kare */
.bkc-bank--logo { display: flex; align-items: center; gap: 8px; }
.bkc-logo { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 3px;
  background: #fff; border-radius: 7px; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.bkc-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bkc-tot { text-align: right; }
.bkc-net { font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bkc-row { display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 9px 6px; margin: 0 -6px; width: calc(100% + 12px);
  border: 0; border-top: 1px solid rgba(255, 255, 255, .18); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.bkc-row:hover, .bkc-row:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.bkc--detail { padding-bottom: 14px; margin-bottom: 14px; flex-shrink: 0; }
.bkc-txn-box, .bkc-dl { flex-shrink: 0; }
.bkc-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 10px; }
.bkc-dl dt { color: var(--muted, #8a93a8); }
.bkc-dl dd { margin: 0; overflow-wrap: anywhere; }
.bkc--dark .bkc-row { border-top-color: rgba(0, 0, 0, .15); }
.bkc-row__main { min-width: 0; flex: 1; }
.bkc-name { font-weight: 600; overflow-wrap: anywhere; }
.bkc-sub { font-size: .8rem; opacity: .78; }
.bkc-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.bkc-amt--neg { color: #ffd2cc; }
.bkc--dark .bkc-amt--neg { color: #8a1206; }
.bkc-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .22); margin: 6px 0 3px; overflow: hidden; max-width: 220px; }
.bkc-bar span { display: block; height: 100%; background: #fff; border-radius: 3px; }
.bkc-txn-box { margin-bottom: 16px; }
.bkc-per { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bkc-per__t { text-align: center; }
.bkc-txn { max-height: 46vh; overflow: auto; }
.bkc-txn tfoot td { position: sticky; bottom: 0; background: var(--surface-2, #1b2440); }
.bkc-dgrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.bkc-dgrid .bkc-txn-box { margin-bottom: 0; }
.bkc-dgrid .bkc-txn { max-height: 60vh; }
@media (max-width: 760px) { .bkc-dgrid { grid-template-columns: minmax(0, 1fr); gap: 8px; } .bkc-dgrid .bkc-txn { max-height: none; } }
@media (min-width: 761px) { .modal__card--wide:has(.bkc-dgrid) { max-width: 1080px; } }
.bkc-tx--edit { cursor: pointer; }
.bkc-tx--edit:hover td { background: rgba(255, 255, 255, .03); }
.bkc-tx--on td { background: rgba(61, 184, 74, .1); }
.bkc-txbar td { border-top: 0; padding-top: 0; background: rgba(61, 184, 74, .1); }
.bkc-txbar .row-actions { justify-content: flex-end; }
/* Kart penceresi hareket listesi: dar sütunda taşmasın — bilgi yazısı kırılır, tablo sütuna sığar */
.bkc-txn { overflow-x: hidden; }
.bkc-txn table { width: 100%; min-width: 0; table-layout: auto; }
.bkc-txn td:nth-child(2) { width: 100%; }
.bkc-txn .cell-hint { white-space: normal; overflow-wrap: anywhere; }
.bkc-debt { margin-bottom: 14px; }
.bkc-debt .p-panel__sub { margin-top: 0; }
.kart-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.kart-fact { background: var(--surface-2, #1b2440); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.kart-fact__l { font-size: .78rem; color: var(--muted, #8a93a8); }
.kart-fact__v { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* Kredi kartı penceresi 3 sütun (geniş ekran) → 2 sütun (bilgi | borç üstte, hareketler altta) → telefonda tek sütun */
.bkc-dgrid--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "info debt" "info tx"; }
.bkc-dgrid--3 .bkc-dcol--info { grid-area: info; }
.bkc-dgrid--3 .bkc-dcol--debt { grid-area: debt; }
.bkc-dgrid--3 .bkc-dcol--tx { grid-area: tx; }
@media (min-width: 1280px) {
  .modal__card--wide:has(.bkc-dgrid--3) { max-width: 1480px; width: calc(100vw - 48px); }
  .bkc-dgrid--3 { grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 5fr); grid-template-areas: "info debt tx"; }
  .bkc-dgrid--3 .bkc-debt { margin-bottom: 0; }
}
@media (max-width: 760px) { .bkc-dgrid--3 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "info" "debt" "tx"; } }
/* Kart penceresinde taksitli alışverişler tablosu sütunu taşırmasın (telefon) */
.bkc-debt, .bkc-debt .kart-items { min-width: 0; max-width: 100%; }
.bkc-debt .table-wrap { overflow-x: auto; max-width: 100%; }
.bkc-dgrid .cell-hint { white-space: normal; }
/* Banka kartı içinde hesap ↔ kredi kartı ayrımı */
.bkc-sec { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin: 12px 0 2px; }
.bkc-row { align-items: flex-start; }
.bkc-ico { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); margin-top: 1px; }
.bkc--dark .bkc-ico { background: rgba(0, 0, 0, .1); }
.bkc-cards { display: grid; gap: 8px; margin: 6px 0 8px; }
.bkc-row.bkc-row--card { margin: 0; width: 100%; border-top: 0; padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, .24); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.bkc-row.bkc-row--card:hover, .bkc-row.bkc-row--card:focus-visible { background: rgba(0, 0, 0, .34); }
.bkc--dark .bkc-row.bkc-row--card { background: rgba(255, 255, 255, .35); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.bkc-row--card .bkc-ico { background: rgba(255, 255, 255, .2); }

/* ─── İşyeri ana sayfası (ana-sayfa.js, 20.11.2026) ─────────────────────────
   Bileşenler 24 sütun × 20 px ızgarada mutlak konumlu (kayıtlı / varsayılan düzen); telefonda alt alta. */
.ash-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 4px; }
.ash-bar__t { font-size: 13px; }
.ash-bar__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ash-hint { font-size: 13px; }
.ash-board { position: relative; }
.ash-w { position: absolute; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; }
.ash-w--bare { background: transparent; border-color: transparent; }
.ash-w__h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 14px 6px; flex: 0 0 auto; }
.ash-w__h h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ash-w__x { font-size: 14px; }
.ash-w__b { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px 14px 12px; }
.ash-w--bare .ash-w__b { padding: 0; overflow: visible; }
.ash-hide { display: none; position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); cursor: pointer; line-height: 1; }
.ash-editing .ash-hide { display: block; }
.ash-editing .ash-w { cursor: move; touch-action: none; user-select: none; outline: 2px dashed var(--brand); outline-offset: -2px; border-radius: 6px; }
.ash-editing .ash-w--bare { background: var(--surface); }
.ash-editing .ash-w__b, .ash-editing .ash-w__h { pointer-events: none; }
.ash-editing .ash-w::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 12px; height: 12px; pointer-events: none;
  border-right: 3px solid var(--brand); border-bottom: 3px solid var(--brand); }
.ash-editing { background-image: linear-gradient(to right, rgba(127, 127, 127, .07) 1px, transparent 1px),
  linear-gradient(to bottom, rgba(127, 127, 127, .07) 1px, transparent 1px); background-size: calc(100% / 24) 20px; border-radius: 12px; }
/* Telefon: alt alta, doğal yükseklik */
.ash-board--stack { display: grid; gap: 12px; height: auto !important; }
.ash-board--stack .ash-w { position: static; width: auto !important; height: auto !important; }
.ash-board--stack .ash-w__b { overflow: visible; }

.ash-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; height: 100%; }
/* Ana sayfalar (pano.js, 20.11.2026): hızlı işlemler + Düzenle ekranın başlık satırında — "Özet ‹ ay › Bu ay" ile tek satır */
.ash-headbar { display: flex; flex: 1 1 320px; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-width: 0; }
.ash-headbar .ash-quick { height: auto; }
.ash-calm { color: var(--muted); margin: 6px 0; }
.ash-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ash-task { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid transparent; color: var(--ink); font: inherit; }
.ash-task:hover { border-color: var(--line-strong); }
.ash-task i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--muted); }
.ash-task--due i { background: var(--danger); } .ash-task--warn i { background: var(--accent); } .ash-task--info i { background: var(--brand); }
.ash-task span { flex: 1 1 auto; min-width: 0; }
.ash-task b { white-space: nowrap; font-weight: 500; }
.ash-task--due b { color: var(--danger); }
.ash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; height: 100%; }
.ash-kpi { display: grid; align-content: start; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); font: inherit; cursor: pointer; min-width: 0; }
.ash-kpi:hover { border-color: var(--line-strong); }
.ash-kpi__l { font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.ash-kpi__v { font-size: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ash-kpi__s { font-size: 12px; color: var(--muted); }
.ash-delta--ok { color: var(--brand); } .ash-delta--due { color: var(--danger); }
.ash-flow { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 160px; }
.ash-flow__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ash-seg .segmented__btn { font-size: 13px; }
.ash-legend { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.ash-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.ash-dot--in { background: var(--brand); } .ash-dot--out { background: var(--danger); }
.ash-chart { flex: 1 1 auto; width: 100%; min-height: 80px; display: block; }
.ash-bar-in { fill: var(--brand); } .ash-bar-out { fill: var(--danger); opacity: .85; }
.ash-axis { stroke: var(--line-strong); stroke-width: 1; }
.ash-ticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); }
.ash-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ash-flow__sum { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.ash-split { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border: 0;
  border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ash-split small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ash-split--foot { cursor: default; color: var(--muted); }
.ash-split b { white-space: nowrap; font-weight: 600; }
.ash-stack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); margin: 4px 0; }
.ash-stack--ok { background: var(--brand); } .ash-stack--due { background: var(--danger); }
.ash-minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.ash-mini { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.ash-mini span { font-size: 12px; color: var(--muted); }
.ash-note { font-size: 12px; margin-top: 6px; }
.ash-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
/* Şahsi Özet › Giderler: beklenen taksitler (26.11.2026) — gerçekleşen giderden ayrı, soluk */
.ash-exp-inst__head { margin: 12px 0 4px; }
.ash-exp-inst td { color: var(--muted); }
.ash-tbl td, .ash-tbl th { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ash-tbl th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: left; }
.ash-tbl tfoot td { border-bottom: 0; }
.ash-tbl tr.is-clickable { cursor: pointer; }
.ash-tbl tr.ash-cur { background: var(--surface-2); }
.ash-r { text-align: right; white-space: nowrap; }
.ash-hbar { height: 5px; border-radius: 3px; background: var(--surface-2); margin-top: 4px; overflow: hidden; }
.ash-hbar span { display: block; height: 100%; background: var(--danger); opacity: .8; }
.ash-owner .subhead:first-child, .ash-banks .bkc-sumhead { margin-top: 0; }
.ash-owner { padding-top: 10px; }
.ash-banks .bkc-grid { margin-top: 8px; }
@media (max-width: 760px) { .ash-kpis { grid-template-columns: 1fr 1fr; } .ash-kpi__v { font-size: 18px; } }

/* Izgara önizlemesi (izgara.js): sürüklerken / boyutlandırırken kartın oturacağı hücre */
.grid-ghost { position: absolute; z-index: 0; border: 2px dashed var(--brand); border-radius: 10px; background: rgba(61, 184, 74, .10); pointer-events: none; }

/* ─── Ayarlar › Maaş & İzin (maas-ayar.js, 25.11.2026) ───────────────────── */
.ma-body { display: flex; flex-direction: column; gap: 14px; }
.ma-card { gap: 12px; }
.ma-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ma-table td, .ma-table th { vertical-align: middle; }
.ma-sub { font-size: 12px; margin-top: 2px; }
.ma-next { font-size: 12px; color: var(--accent); margin-top: 2px; }
.ma-act { white-space: nowrap; width: 1%; }
.ma-inline { display: flex; gap: 8px; align-items: center; }
.ma-inline .field__input { flex: 1 1 auto; width: auto; }
/* Tek satır form: kutular aynı yükseklikte, alttan hizalı */
.ma-form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.ma-form .field { flex: 0 0 auto; min-width: 150px; }
.ma-form .ma-form__grow { flex: 1 1 200px; }
.ma-form .btn { height: var(--tap); }
.ma-check { display: inline-flex; align-items: center; gap: 6px; height: var(--tap); font-size: 14px; color: var(--muted); white-space: nowrap; }
.ma-ibtn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; margin-left: 2px;
  background: none; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; vertical-align: middle; }
.ma-ibtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ma-ibtn:hover { background: var(--surface-2); color: var(--ink); }
.ma-ibtn--del:hover { color: var(--danger); }
.ma-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ma-year__h { font-weight: 600; margin-bottom: 4px; }
.ma-year ul { list-style: none; margin: 0; padding: 0; }
.ma-year li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.ma-year li .ma-ibtn { margin-left: auto; }
.ma-day { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 84px; }
.ma-past { opacity: .55; }
.ma-audit { font-size: 13px; }
.ma-audit summary { cursor: pointer; color: var(--muted); }
.ma-audit ul { margin: 6px 0 0; padding-left: 18px; }
.ma-danger { color: var(--danger); }
.ma-modal { display: flex; flex-direction: column; gap: 14px; }
.ma-sum { margin: 0; padding: 8px 12px; border-radius: var(--radius); background: var(--surface-2); font-size: 14px; }
.ma-hist { border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 760px) { .ma-grid { grid-template-columns: 1fr; } }

/* ─── İşyeri › Maaşlar (maaslar.js, 25.11.2026) ─────────────────────────── */
.pr-table td { vertical-align: top; }
.pr-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.pr-name:hover { color: var(--brand); text-decoration: underline; }
.pr-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pr-warn { color: var(--accent); }
.pr-amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.pr-btn { margin-top: 6px; }
.pr-undo { font-size: 12px; }
.pr-p { margin: 0; font-size: 14px; }
.pr-list { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.pr-lines { width: 100%; font-size: 14px; }
.pr-lines td { padding: 5px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pr-lines tfoot td { font-weight: 600; border-bottom: 0; }
.pr-lines .pr-total td { font-size: 16px; border-top: 2px solid var(--line-strong); }
.pr-box { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pr-undo, .pr-detail .link-btn { color: var(--brand); text-decoration: underline; }
.pr-unlinked { display: block; margin-top: 4px; font-size: 12px; color: var(--accent); text-decoration: underline; }
.pr-box--warn { border: 1px solid rgba(255, 149, 0, .45); border-radius: var(--radius); padding: 10px 12px; background: rgba(255, 149, 0, .06); }
.pr-detail .pr-del { color: var(--danger); }
.pr-list li { margin: 3px 0; }
.pr-list .btn--sm { min-height: 28px; padding: 0 8px; font-size: 13px; margin-left: 4px; }
/* Ayarlar › Maaş & İzin: bölüm düğmeleri (tek sayfa yerine) */
.ma-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ma-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; }
.ma-tab:hover { color: var(--ink); border-color: var(--line-strong); }
.ma-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ma-tab--on { background: var(--surface-2); border-color: var(--brand); color: var(--ink); font-weight: 600; }
.ma-tab__n { font-size: 12px; color: var(--muted); font-weight: 400; }

/* Özet › maaş günü hatırlatması (maaslar.js reminder, 25.11.2026) */
.pay-remind { margin: 0 0 14px; }
.pay-remind__main { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  padding: 12px 16px; border-radius: var(--radius); border: 1px solid rgba(255, 149, 0, .55); background: rgba(255, 149, 0, .10); position: relative; }
.pay-remind__main:hover { background: rgba(255, 149, 0, .16); }
.pay-remind--late .pay-remind__main { border-color: rgba(239, 68, 68, .65); background: rgba(239, 68, 68, .12); }
.pay-remind--late .pay-remind__main:hover { background: rgba(239, 68, 68, .18); }
.pay-remind__h { font-weight: 700; font-size: 15px; }
.pay-remind--late .pay-remind__h { color: #fca5a5; }
.pay-remind__n { font-size: 14px; color: var(--ink-2); }
.pay-remind__list { margin: 2px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.pay-remind__u { font-size: 13px; color: var(--accent); }
.pay-remind__go { position: absolute; right: 14px; top: 12px; font-size: 13px; color: var(--muted); }
/* Şahsi › Tekrarlayan kayıtlar (sahsi-tekrar.js): 7 sütunlu tablo 720 px'e sığmıyordu (Ad sütunu yana kayıyordu) */
@media (min-width: 761px) {
  .modal__card--wide:has(#recBox) { max-width: 1000px; }
  #recBox .row-actions { flex-wrap: nowrap; }
}

/* Giderler › alışveriş ayrıntısı (gider-detay.js, 26.11.2026) */
.exp-row { cursor: pointer; }
.exp-row:hover td { background: var(--surface-2); }
.exp-detail-btn { display: none; }
@media (max-width: 760px) { .exp-row { cursor: default; } .exp-detail-btn { display: inline-flex; } }
.gd-box { display: flex; flex-direction: column; gap: 14px; }
.gd-name { font-size: 18px; font-weight: 700; }
.gd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.gd-facts > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gd-facts span { font-size: 12px; color: var(--muted); }
.gd-facts strong { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gd-facts em { font-style: normal; font-size: 12px; color: var(--muted); }
.gd-facts .gd-left strong { color: var(--accent); font-size: 18px; }
.gd-warn { border: 1px solid rgba(239, 136, 115, .55); background: rgba(239, 136, 115, .10); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; }
.gd-warn ul { margin: 4px 0 0; padding-left: 18px; }
.gd-table td { vertical-align: top; }
.gd-table tr.gd-cur td { background: rgba(61, 184, 74, .08); }
.gd-exps { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 13px; }
.gd-exp--cur { font-weight: 600; }
/* Kullanıcı isteği (26.11.2026): ayrıntı penceresi geniş ve yüksek — veriler net okunsun */
@media (min-width: 761px) {
  .modal__card--wide:has(#gdBox) { max-width: min(1320px, calc(100vw - 48px)); width: calc(100vw - 48px); max-height: 94vh; }
  .gd-box .gd-facts { grid-template-columns: 2fr 1fr 1.2fr 1fr 1.2fr; }
  .gd-box .gd-facts strong { font-size: 17px; }
  .gd-box .gd-facts > div:first-child strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gd-table td, .gd-table th { padding-top: 8px; padding-bottom: 8px; }
  .gd-exps { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .gd-table td:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .gd-table td:last-child .gd-exps { margin-top: 0; }
}
.gd-off { font-size: 12px; color: var(--accent); }
/* İade (26.11.2026) ve kalan taksitleri ekle */
.gd-refund { border: 1px solid var(--brand); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; display: grid; gap: 4px; }
.gd-refund ul { margin: 2px 0; padding-left: 18px; }
.gd-plan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius); background: var(--surface-2); font-size: 14px; }
.pim-refund { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--brand); cursor: pointer; }
.pim-refund input { margin-top: 2px; }
.pim-refund--sub { color: inherit; margin-top: 4px; }
.gd-next { margin: 0; padding: 8px 12px; border-radius: var(--radius); background: var(--surface-2); font-size: 14px; }
.gd-del { font-size: 13px; color: var(--muted); }
.gd-del summary { cursor: pointer; }
.gd-del ul { margin: 4px 0 0; padding-left: 18px; }
@media (min-width: 761px) { .gd-table td:last-child { display: table-cell; } }
.gd-date { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.gd-date:hover { color: var(--brand); }
