/* ============================================================
   PosdaParam — Tasarım Sistemi (Design System)
   Kurumsal Lacivert + Altın Aksan
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Renk Sistemi */
  --primary: #1B304F;
  /* --primary'nin RGB bileşenleri: hex'ten CSS içinde alfa türetilemediği için
     rgba(var(--primary-rgb), X) kurgusunda kullanılır. Runtime'da _BrandStyle.cshtml ezer. */
  --primary-rgb: 27,48,79;
  --primary-2: #1E3A6F;
  --primary-3: #2C4D8C;
  --accent: #C9A961;
  --accent-2: #A88A48;
  --accent-3: #E8C97D;

  /* Nötr Tonlar */
  --bg: #F5F7FB;
  --bg-2: #FAFBFD;
  --card: #FFFFFF;
  --text: #1A1A1F;
  --text-2: #3D4555;
  --muted: #5A6478;
  --muted-2: #8A92A5;
  --border: #E2E5EC;
  --border-2: #EEF0F4;

  /* Semantik */
  --success: #2D7D46;
  --success-bg: #E8F5EC;
  --warning: #D17B0F;
  --warning-bg: #FEF3E5;
  --danger: #B12A2A;
  --danger-bg: #FBEAEA;
  --info: #1E3A6F;
  --info-bg: #E8EDF6;

  /* Gölgeler */
  --shadow-xs: 0 1px 2px rgba(var(--primary-rgb),0.05);
  --shadow-sm: 0 1px 3px rgba(var(--primary-rgb),0.06), 0 1px 2px rgba(var(--primary-rgb),0.04);
  --shadow-md: 0 4px 14px rgba(var(--primary-rgb),0.08);
  --shadow-lg: 0 12px 32px rgba(var(--primary-rgb),0.14);
  --shadow-xl: 0 24px 56px rgba(var(--primary-rgb),0.18);

  /* Radius */
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 100px;

  /* Spacing (4px grid) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;

  /* Tipografi */
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;
  --text-xs: 11.5px;
  --text-sm: 13px;
  --text-base: 14.5px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 48px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: var(--text-base);
  /* 🔴 M20 Faz E — `dvh` (dynamic viewport height): mobil tarayıcıda adres çubuğu görünürken `100vh`
     GÖRÜNEN alandan büyüktür ve sayfayı gereksiz yere kaydırılabilir yapar. `vh` satırı eski
     tarayıcılar için YEDEK olarak bırakılır; `dvh` destekleniyorsa ikinci satır kazanır. */
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

/* ============================================================
   TİPOGRAFİ
   ============================================================ */
.h1 { font-size: var(--text-3xl); font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; color: var(--primary); }
.h2 { font-size: var(--text-2xl); font-weight: 800; line-height: 1.2; letter-spacing: -0.3px; color: var(--primary); }
.h3 { font-size: var(--text-xl); font-weight: 700; line-height: 1.25; color: var(--primary); }
.h4 { font-size: var(--text-lg); font-weight: 700; color: var(--primary); }
.h5 { font-size: var(--text-md); font-weight: 700; color: var(--primary); }

.text-muted { color: var(--muted); }
.text-accent { color: var(--accent-2); }
.text-primary { color: var(--primary); }

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  text-transform: uppercase;
}

/* ============================================================
   LAYOUT — Container, Grid, Flex
   ============================================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--s-6); }

.grid { display: grid; gap: var(--s-5); }
/* 🔴 M20 Faz E — ızgara çocuğu içeriğinden DAHA DAR olabilmeli.
   Grid/flex çocuklarının varsayılan `min-width` değeri `auto`dur: kutu, içeriğinin doğal en küçük
   genişliğinin altına inemez. İçinde geniş tablo olan bir hücre bu yüzden kendi track'ini şişirip
   sayfayı yatay taşırıyordu (ölçüldü: /Banks 375px'te 446px, /Cash 553px — sarmalayıcı `.table-wrap`
   sıkışamadığı için içindeki tablo da kaydırılamıyordu).
   Bu satır olmadan `.table-wrap { overflow-x: auto }` yalnız EN DIŞTAKİ kolonda işe yarar;
   ızgara içine yerleşmiş her tablo aynı kusuru tekrar üretir. */
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

/* Ana içerik + yan sütun (2:1) — M20 Faz E.
   🔴 Bu düzen panelin 12 sayfasında `style="grid-template-columns: 2fr 1fr; gap: 24px"` olarak
   SATIR İÇİ yazılmıştı. Satır içi stil hiçbir medya sorgusuyla ezilemez: telefonda iki sütun
   yan yana kalıyor ve sayfayı YATAY TAŞIRIYORDU (ölçüldü: panel ana sayfası 375px'te 595px).
   Sınıfa alındı → ≤640px'te tek sütuna iner. `gap` bilerek 24px (satır içi değerin aynısı),
   `.grid`in 20px varsayılanı görünümü değiştirmesin. */
.grid--main-side { grid-template-columns: 2fr 1fr; gap: var(--s-6); }

.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.row--between { justify-content: space-between; }

/* ============================================================
   BUTONLAR
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
}

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-2); box-shadow: var(--shadow-md); }

.btn--accent { background: var(--accent); color: var(--primary); }
.btn--accent:hover { background: var(--accent-2); color: #fff; }

.btn--secondary { background: #fff; color: var(--primary); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--primary); background: var(--bg-2); }

.btn--ghost { background: transparent; color: var(--primary); }
.btn--ghost:hover { background: rgba(var(--primary-rgb),0.06); }

.btn--success { background: var(--success); color: #fff; }
.btn--success:hover { background: #246138; }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #921F1F; }

.btn--sm { padding: 6px 12px; font-size: var(--text-sm); }
.btn--lg { padding: 14px 24px; font-size: var(--text-md); }
.btn--block { width: 100%; }

/* ============================================================
   FORM ELEMANLARI
   ============================================================ */
.field { display: block; margin-bottom: var(--s-4); }
.field__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: var(--s-2);
}
.field__label--req::after {
  content: '*';
  color: var(--danger);
  margin-left: 4px;
}
.field__hint { display: block; font-size: var(--text-xs); color: var(--muted); margin-top: var(--s-1); }
.field__error { display: block; font-size: var(--text-xs); color: var(--danger); margin-top: var(--s-1); font-weight: 600; }

.input, .select, .textarea {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text);
  background: #fff;
  transition: all 0.15s;
}

.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,169,97,0.16);
}

.input::placeholder { color: var(--muted-2); }
.textarea { resize: vertical; min-height: 88px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

.input--error { border-color: var(--danger); }
.input--error:focus { box-shadow: 0 0 0 3px rgba(177,42,42,0.16); }

.input-group { display: flex; }
.input-group .input { border-radius: 0; border-right: 0; }
.input-group .input:first-child { border-top-left-radius: var(--r); border-bottom-left-radius: var(--r); }
.input-group .input:last-child { border-top-right-radius: var(--r); border-bottom-right-radius: var(--r); border-right: 1px solid var(--border); }
.input-group .btn { border-radius: 0; }
.input-group > :first-child { border-top-left-radius: var(--r) !important; border-bottom-left-radius: var(--r) !important; }
.input-group > :last-child { border-top-right-radius: var(--r) !important; border-bottom-right-radius: var(--r) !important; }

/* Checkbox / Radio */
.check {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-base);
  cursor: pointer;
  user-select: none;
}
.check__box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: all 0.15s;
  flex-shrink: 0;
}
.check__box--radio { border-radius: 50%; }
.check input[type="checkbox"], .check input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.check input:checked + .check__box {
  background: var(--accent);
  border-color: var(--accent);
}
.check input:checked + .check__box::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid var(--primary);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}
.check input:checked + .check__box--radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 0;
  margin: 0;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  background: var(--border);
  border-radius: 100px;
  transition: background 0.18s;
  cursor: pointer;
}
.switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.18s;
  box-shadow: var(--shadow-sm);
}
.switch--on { background: var(--accent); }
.switch--on::after { transform: translateX(18px); }

/* ============================================================
   KARTLAR
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-xs);
}

.card--hover { transition: all 0.18s; }
.card--hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent); }

.card__head {
  padding-bottom: var(--s-4);
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.card__title { font-size: var(--text-md); font-weight: 700; color: var(--primary); }
.card__sub { font-size: var(--text-sm); color: var(--muted); margin-top: 2px; }

.kpi {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-radius: var(--r);
  padding: var(--s-5) var(--s-6);
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: '';
  position: absolute;
  right: -30px; bottom: -30px;
  width: 120px; height: 120px;
  background: rgba(201,169,97,0.12);
  border-radius: 50%;
}
.kpi__lbl { font-size: var(--text-xs); color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.kpi__val { font-size: var(--text-3xl); font-weight: 800; color: var(--accent); line-height: 1; margin-top: var(--s-2); }
.kpi__sub { font-size: var(--text-xs); color: rgba(255,255,255,0.6); margin-top: var(--s-2); }

/* ============================================================
   TABLOLAR
   ============================================================ */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r);
  /* 🔴 R-10 (M20 Faz E): eskiden `overflow: hidden` idi ve bu SESSİZ VERİ KAYBIYDI — geniş tablo dar
     ekranda kutudan taşınca kırpılıyordu; sayfa yatay TAŞMADIĞI için kimse fark etmiyordu, kullanıcı
     sağdaki sütunları (tutar, işlem butonları) hiç göremiyordu. `auto` ile kutu kaydırılabilir olur.
     ⚠️ `overflow: hidden` yalnız köşeleri yuvarlatmak için konmuştu; kırpma amaçlanmamıştı.
     ℹ️ overflow-y BİLEREK yazılmaz: tek eksen `auto` olunca diğeri de `auto`ya döner (CSS kuralı) ama
        sarmalayıcının yükseklik sınırı olmadığı için dikey çubuk oluşmaz. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}
.table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
.table thead { background: var(--primary); color: #fff; }
.table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.table td { padding: 12px 16px; border-top: 1px solid var(--border-2); }
.table tbody tr:nth-child(odd) { background: var(--bg-2); }
.table tbody tr:hover { background: rgba(201,169,97,0.05); }
.table .actions { display: flex; gap: var(--s-2); justify-content: flex-end; }
.table .num { font-variant-numeric: tabular-nums; text-align: right; }

/* ============================================================
   BADGES / ETİKETLER
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  background: rgba(201,169,97,0.14);
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--primary { background: rgba(30,58,111,0.12); color: var(--primary); }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warn { background: var(--warning-bg); color: var(--warning); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.badge--ghost::before { display: none; }

/* "Bu satır artık geçerli değil" ORTAK VURGUSU — TURUNCU işaretleyici (kullanıcı kararı 2026-07-30).
   İki semantik ad, TEK görünüm (sayfa başına kopyalanmaz — ortak UI yapıları kuralı):
     .acf-row-cancelled → geri alınan / iptal edilen / reddedilen kayıt
     .acf-row-inactive  → pasife alınmış tanım (POS, banka hesabı, kasa, gider tipi, kullanıcı, pos noktası)
   Kolon sırası ekrandan ekrana değiştiği için belirli bir hücreye üstü-çizili verilmez; satırın TAMAMI
   turuncu zemin + solda 3px turuncu şerit alır → hangi gridde olursa olsun aynı okunur.
   🔴 Soluklaştırma (opacity) BİLEREK YOK: pasif satırlar da okunabilir kalmalı, yalnız işaretlenmeli. */
.acf-row-cancelled > td,
.acf-row-inactive > td { background: rgba(209, 123, 15, .14); }
.acf-row-cancelled > td:first-child,
.acf-row-inactive > td:first-child { box-shadow: inset 3px 0 0 var(--warning); }

/* Tablo OLMAYAN listelerde (müşteri detayındaki banka hesabı / mobil kullanıcı kartları) aynı vurgu.
   :not(tr) ile ayrılır ki tablo satırında iki kural birden uygulanmasın. */
.acf-row-inactive:not(tr), .acf-row-cancelled:not(tr) {
  background: rgba(209, 123, 15, .14);
  box-shadow: inset 3px 0 0 var(--warning);
  padding-left: 12px;
}

/* ============================================================
   CALLOUT / ALERT
   ============================================================ */
.alert {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r);
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, rgba(201,169,97,0.06), rgba(201,169,97,0.02));
  font-size: var(--text-base);
}
.alert__icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 12px;
}
.alert__title { font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.alert--info { border-left-color: var(--info); background: linear-gradient(90deg, var(--info-bg), transparent); }
.alert--info .alert__icon { background: var(--info); color: #fff; }
.alert--success { border-left-color: var(--success); background: linear-gradient(90deg, var(--success-bg), transparent); }
.alert--success .alert__icon { background: var(--success); color: #fff; }
.alert--warn { border-left-color: var(--warning); background: linear-gradient(90deg, var(--warning-bg), transparent); }
.alert--warn .alert__icon { background: var(--warning); color: #fff; }
.alert--danger { border-left-color: var(--danger); background: linear-gradient(90deg, var(--danger-bg), transparent); }
.alert--danger .alert__icon { background: var(--danger); color: #fff; }

/* ============================================================
   ETİKET CHIPLERİ
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
}
.chip::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ============================================================
   TAB BAR
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.tabs__btn {
  padding: 12px 18px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.tabs__btn--active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(var(--primary-rgb),0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  /* 🔴 M20 Faz E — uzun modal telefonda EKRANI TAŞIRIYORDU: maske `inset: 0` ile ekran boyundaydı ve
     kaydırma yoktu → modalın alt kısmı (Kaydet/Vazgeç butonları) erişilemez kalıyordu. Maske artık
     kendi içinde dikey kayar; iç boşluk çentik/home-indicator güvenli alanını da hesaba katar. */
  padding: calc(var(--s-4) + env(safe-area-inset-top)) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.modal {
  background: #fff;
  border-radius: var(--r-lg);
  width: 480px;
  max-width: 90%;
  box-shadow: var(--shadow-xl);
  /* ⚠️ `margin: auto` ŞART (yalnız `align-items: center` YETMEZ): flex kutusunda içerik kutudan
     uzunsa ortalama TAŞMAYI YUKARI da taşırır ve modalın ÜST kısmı kaydırılarak erişilemez olur.
     `margin: auto` bu bilinen flex tuzağını kapatır. */
  margin: auto;
}
.modal__head {
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal__title { font-size: var(--text-lg); font-weight: 700; color: var(--primary); }
.modal__body { padding: var(--s-6); }
.modal__foot { padding: var(--s-4) var(--s-6); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: var(--s-3); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; gap: 4px; }
.pagination__btn {
  min-width: 36px; height: 36px; padding: 0 10px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font); font-size: var(--text-sm); font-weight: 600;
  color: var(--primary); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.pagination__btn:hover { border-color: var(--accent); }
.pagination__btn--active { background: var(--primary); color: var(--accent); border-color: var(--primary); }
.pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   WEB PANEL LAYOUT
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.sidebar {
  background: var(--primary);
  color: #fff;
  padding: var(--s-5) var(--s-3);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  margin-bottom: var(--s-6);
}
.sidebar__brand img { height: 40px; }

.sidebar__group { margin-bottom: var(--s-5); }
.sidebar__group-lbl {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
  padding: 0 var(--s-3);
  margin-bottom: var(--s-2);
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px var(--s-3);
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-radius: var(--r);
  font-size: var(--text-base);
  font-weight: 500;
  transition: all 0.15s;
}
.sidebar__item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar__item--active {
  background: rgba(201,169,97,0.15);
  color: var(--accent);
  font-weight: 600;
}
.sidebar__item-icon {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sidebar__item-count {
  margin-left: auto;
  background: var(--accent);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: var(--r-pill);
}

.content {
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* 🔴🔴 R-10'UN ASIL DÜĞÜMÜ (M20 Faz E, A/B ölçümüyle bulundu) — `min-width: 0`.
     ------------------------------------------------------------------------------------------
     Bu öğe `.app` ızgarasının (grid) çocuğudur ve ızgara/flex çocuklarının varsayılan
     `min-width` değeri `auto`dur: yani kutu, İÇERİĞİNİN doğal en küçük genişliğinin ALTINA
     inemez. Panelin geniş tabloları bu yüzden kolonu kendi genişliğine ŞİŞİRİYORDU:
     375px'lik ekranda `.content` 607px, `/Users` sayfasında 1213px oluyor; üst bar, alt bilgi
     ve tüm sayfa onunla birlikte uzayıp EKRANI YATAY TAŞIRIYORDU (ölçüldü: 13 panel sayfasının
     11'inde, 1440px'te bile).
     🎯 Bu satır olmadan `.table-wrap { overflow-x: auto }` ATILDIR: sarmalayıcı hiçbir zaman
        sıkışmadığı için içinde kaydırılacak bir taşma da oluşmaz. A/B ölçümü bunu gösterdi —
        yalnız `overflow-x` değiştirildiğinde panel taşması 33'ten 33'e, yani HİÇ değişmedi.
     İkisi birlikte: kolon ekrana sığar, geniş tablo KENDİ KUTUSUNDA yatay kayar. */
  min-width: 0;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px var(--s-7);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar__title { font-size: var(--text-lg); font-weight: 700; color: var(--primary); }
.topbar__crumb {
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 2px;
}
.topbar__actions { display: flex; align-items: center; gap: var(--s-3); }
.topbar__left { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.topbar__menu-btn {
  display: none;            /* yalnız küçük ekranda görünür (media query) */
  align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: #fff; color: var(--primary);
  cursor: pointer; flex-shrink: 0;
}
.topbar__menu-btn:hover { background: var(--bg); }
.sidebar-backdrop { display: none; }   /* masaüstünde yok; mobilde media query açar */

.user-badge {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 4px var(--s-3) 4px 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: var(--text-sm);
}

.page { padding: var(--s-7); flex: 1 0 auto; }
.page__head { margin-bottom: var(--s-6); }

/* Ortak alt bilgi (footer) — _Footer.cshtml partial'ı ile tek yerden render edilir. */
.app-footer {
  margin-top: auto;
  padding: var(--s-4) var(--s-7);
  border-top: 1px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); flex-wrap: wrap;
  font-size: var(--text-xs); color: var(--muted);
}
.app-footer__brand b { color: var(--primary); font-weight: 700; }
.app-footer__meta { display: flex; align-items: center; gap: var(--s-4); }
.app-footer a { color: var(--muted); text-decoration: none; }
.app-footer a:hover { color: var(--accent); }
.app-footer__ver { font-weight: 700; letter-spacing: 0.04em; }
/* Login (koyu zemin) varyantı: şeffaf, ortalı, açık renkli. */
.app-footer--login {
  margin-top: var(--s-5);
  padding: var(--s-3) 0 0;
  background: transparent; border-top: none;
  justify-content: center;
  color: rgba(255,255,255,0.7);
}
.app-footer--login .app-footer__brand b { color: #fff; }

/* ============================================================
   MOBILE PHONE MOCKUP
   ============================================================ */
.phone {
  width: 340px;
  background: #fff;
  border: 12px solid #1a1a1f;
  border-radius: 44px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
  flex-shrink: 0;
}

.phone__notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 24px;
  background: #1a1a1f;
  border-radius: 0 0 16px 16px;
  z-index: 10;
}

.phone__screen {
  background: var(--bg);
  height: 660px;
  position: relative;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.phone__statusbar {
  height: 36px;
  padding: 10px 24px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}
.phone__statusbar .right { display: flex; gap: 4px; align-items: center; }

.phone__appbar {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.phone__appbar img { height: 24px; }
.phone__appbar-title { font-size: var(--text-md); font-weight: 700; flex: 1; }
.phone__appbar-action {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 18px;
  border-radius: var(--r);
}

.phone__body {
  flex: 1;
  padding: var(--s-4);
  overflow-y: auto;
}

.phone__bottom-nav {
  background: #fff;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 0;
}
.phone__nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 600;
}
.phone__nav-item--active { color: var(--accent-2); }
.phone__nav-icon {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}

/* Mobile list items */
.m-list { background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-xs); }
.m-list__item {
  padding: 14px var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  border-bottom: 1px solid var(--border-2);
}
.m-list__item:last-child { border-bottom: 0; }
.m-list__item-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.m-list__body { flex: 1; min-width: 0; }
.m-list__title { font-size: var(--text-base); font-weight: 700; color: var(--primary); }
.m-list__sub { font-size: var(--text-xs); color: var(--muted); margin-top: 1px; }
.m-list__right { text-align: right; }
.m-list__amount { font-size: var(--text-md); font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.m-list__time { font-size: var(--text-xs); color: var(--muted); }

/* FAB (Floating Action Button) */
.fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  font-weight: 800;
  box-shadow: var(--shadow-lg);
  position: absolute;
  right: var(--s-4); bottom: 80px;
  border: 0; cursor: pointer;
}

/* ============================================================
   ICON STYLE — Inline SVG kullanılır.
   ============================================================ */
.icon { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ============================================================
   MOBİL SAYFA ÖNİZLEME (her ekran tek HTML)
   ============================================================ */
body.m-preview {
  background: linear-gradient(135deg, #12223E, var(--primary));
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.pg-bar {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.pg-bar a { color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 600; }
.pg-bar h1 { color: #fff; font-size: 18px; font-weight: 700; flex: 1; margin: 0; }
.pg-tag {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ============================================================
   YARDIMCI SINIFLAR
   ============================================================ */
.divider { height: 1px; background: var(--border); margin: var(--s-5) 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex-1 { flex: 1; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }

/* ============================================================
   ÇOKLU SEÇİM KUTUSU (.acf-pick) — _CustomerMultiSelect partial'ı — Faz 3b
   ------------------------------------------------------------
   Native <details> üzerine kurulu; CDN yok, Bootstrap yok (ölçüldü: panelde
   Bootstrap CSS/JS hiçbir sayfaya dâhil değil).
   ⚠️ Bileşeni `.table-wrap` (overflow-x:auto) İÇİNE koymayın — panel sessizce kırpılır.
   ============================================================ */
.acf-pick { position: relative; min-width: 0; width: 240px; }
.acf-pick__wrap { position: relative; }

.acf-pick__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  cursor: pointer;
  list-style: none;               /* Firefox: native üçgeni kaldırır */
  user-select: none;
}
.acf-pick__toggle::-webkit-details-marker { display: none; }  /* WebKit/Blink karşılığı */
.acf-pick__caret { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.acf-pick__wrap[open] .acf-pick__caret { transform: rotate(180deg); }

.acf-pick__disabled { color: var(--muted); background: var(--border); cursor: not-allowed; }

.acf-pick__panel {
  position: absolute;
  z-index: 30;                    /* .acf-combo__list ile AYNI ölçülmüş değer.
                                     .topbar=10, .sidebar=60, .modal-mask=100 → doğru katman. */
  left: 0; right: 0;
  top: calc(100% + 4px);
  min-width: 260px;
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 12px 28px rgba(0,0,0,.16);
  padding: var(--s-3);
}
.acf-pick__search { margin-bottom: var(--s-2); }
.acf-pick__actions { display: flex; gap: var(--s-2); margin-bottom: var(--s-2); }

.acf-pick__list { max-height: 320px; overflow-y: auto; }

.acf-pick__row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  padding: 6px 4px;
  /* 🔴 ZORUNLU — 2026-08-14'te tarayıcıda ÖLÇÜLDÜ, varsayılmadı.
     `.check input[type=checkbox]` (bu dosyada sat. ~276) `position:absolute; opacity:0`dır.
     Satıra konum verilmezse gizli input'un KAPSAYAN BLOĞU `.acf-pick__panel` olur; panel ise
     kaydırıcının (`.acf-pick__list`, `overflow-y:auto`) ATASIDIR → kaydırma kutusu bu input'ları
     NE KIRPAR NE KAYDIRIR. Sonuç: görünür alanın altında kalan satırların görünmez ama
     TIKLANABİLİR kutuları panelin dışına, müşteri tablosunun üzerine düşer (ölçüm: 49 seçenekte
     39'u dışarı taştı; `elementFromPoint(48,920)` → `INPUT#cust-25`; gerçek tıklama seçimi 0→1
     yaptı). Kullanıcı tabloya tıklayıp farkında olmadan müşteri seçer ve ALT TOPLAM yanlış kümeyi
     gösterir — para ekranında sessiz hata.
     ⚠️ Bu satırın önceki sürümünde "position:relative VERİLMEZ, tıklama hedefi kayar" yazıyordu;
     A/B ölçümü bunu ÇÜRÜTTÜ: ofsetler (top/left/…) `auto` olduğu için kutu statik konumunda kalır,
     geometri birebir aynıdır — yalnız kırpma doğru çalışır. */
  position: relative;
}
/* 🔴 ŞART: `hidden` özniteliği yalnız UA stil sayfasında `display:none`dur ve `.check`in
   `display:inline-flex` kuralı onu EZER → arama HİÇBİR satırı gizleyemez. Bu tam olarak
   2026-07-30'da Transactions/New'de ölçülen kusurdur ("49 kayıttan 49'u görünür kalıyordu").
   Öznitelik seçici daha yüksek özgüllükte olduğu için `!important` gerekmez. */
.acf-pick__row[hidden] { display: none; }
.acf-pick__row:hover { background: rgba(var(--primary-rgb), .06); border-radius: 4px; }
.acf-pick__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acf-pick__code { font-size: 12px; color: var(--muted); font-family: var(--font-mono, monospace); flex-shrink: 0; }
.acf-pick__empty { padding: 8px 4px; color: var(--muted); font-size: var(--text-sm); }

@media (max-width: 1024px) {
  .grid-3, .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .app { grid-template-columns: 1fr; }

  /* Sidebar → soldan açılan off-canvas drawer (varsayılan gizli) */
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 248px; max-width: 82vw;
    height: 100vh;
    height: 100dvh;
    /* 🔴 M20 Faz E — çentik/home-indicator emniyeti: bu çekmece EKRANA sabitlenir, yani menünün
       en üst satırı çentiğin, en alt satırı iPhone home indicator'ın ALTINDA kalabilir ve
       tıklanamaz olur. Güvenli alan kadar EK iç boşluk verilir.
       ⚠️ `calc()` ŞART: düz `padding-top: env(...)` yazmak taban `padding: var(--s-5) var(--s-3)`
          değerini EZER ve çentiksiz cihazda (env = 0) menünün üst/alt boşluğu tamamen kaybolur. */
    padding-top: calc(var(--s-5) + env(safe-area-inset-top));
    padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom));
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 60;
    box-shadow: 0 0 40px rgba(0,0,0,0.35);
  }
  .sidebar.is-open { transform: translateX(0); }

  .sidebar-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 55;
  }
  .sidebar-backdrop.is-visible { opacity: 1; visibility: visible; }

  .topbar__menu-btn { display: inline-flex; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-6, .grid--main-side { grid-template-columns: 1fr; }
}

/* ============================================================
   DAR TELEFON (≤480px) — M20 Faz E
   ------------------------------------------------------------
   Bu breakpoint tasarım sisteminde HİÇ YOKTU: 480px'in altında da masaüstü iç boşlukları
   (.page 32px, .card 24px) ve masaüstü başlık boyutları (.h1 36px) kullanılıyordu. Sonuç:
   375px'lik bir ekranda içeriğe kalan genişlik ~300px'e düşüyor, tablolar ve uzun başlıklar
   gereksiz yere sıkışıyordu. Burada YALNIZ boşluk ve tipografi ölçeklenir — hiçbir bileşenin
   yapısı, rengi ya da davranışı değişmez.
   ============================================================ */
@media (max-width: 480px) {
  .page { padding: var(--s-4) var(--s-3); }
  .container { padding: 0 var(--s-3); }
  .card { padding: var(--s-4); }
  .topbar { padding: 12px var(--s-3); }
  .app-footer { padding: var(--s-4) var(--s-3); }

  /* Masaüstü başlık ölçeği dar ekranda satırı kırıyordu; bir kademe küçültülür. */
  .h1 { font-size: var(--text-2xl); }
  .h2 { font-size: var(--text-xl); }
  .h3 { font-size: var(--text-lg); }

  /* Tablo hücresi: yatay dolgu azalır → aynı genişlikte daha çok sütun görünür.
     ⚠️ Dikey dolgu 10px'in altına İNMEZ; satır yüksekliği dokunma hedefini bozmamalı. */
  .table th, .table td { padding: 10px var(--s-3); }

  .modal { max-width: 100%; }
  .modal__head, .modal__body { padding: var(--s-4); }
  .modal__foot { padding: var(--s-3) var(--s-4); }
}

/* ============================================================
   DOKUNMATİK GİRDİ — en az 44px dokunma hedefi (WCAG 2.5.5 / Apple HIG) — M20 Faz E
   ------------------------------------------------------------
   🔴 Ölçülen borç: `.btn` ~40px, `.btn--sm` ~30px, `.pagination__btn` 36px, `.check__box` 18px —
   hepsi eşiğin ALTINDA. Parmakla kullanılan bir ekranda bu, yanlış satırın onaylanması demektir.
   `pointer: coarse` YALNIZ dokunmatik girdide devreye girer → masaüstü panelin yoğun tabloları
   ve fare hedefleri OLDUĞU GİBİ kalır (regresyon yüzeyi bilerek dar tutuldu).
   ℹ️ Pos Noktası kabuğunda (pospoint.css) bunun kopyası vardı; tek kaynak burası olduğu için
      oradan KALDIRILDI.
   ============================================================ */
@media (pointer: coarse) {
  .btn,
  .btn--sm,
  .input,
  .select,
  .textarea,
  .pagination__btn { min-height: 44px; }

  /* Kutunun kendisi 18px kalır (görsel), tıklama alanı satırla birlikte 44px'e çıkar. */
  .check { min-height: 44px; align-items: center; }
}
