/* UYSA Kokpit v2 — AÇIK TEMA (CateringPro broşürü esinli).
   Beyaz kartlar, açık zemin, turuncu birincil renk, yumuşak gölge, yuvarlak köşe.
   Kendine yeten: Bootstrap grid'e bağımlı değil; sadece bootstrap-icons (dekoratif) CDN.
   Referans: vault/projeler/uysa-erp-v2/referans/cateringpro-brosur-1.jpg (sol mobil ekranlar). */
/* fable-034: GTO tasarım dili (Ömer onaylı mockup'lar). Lacivert üst bar + accent mavi,
   soft mavi-gri zemin (#eef2f8), beyaz 16px kartlar, koca 800-900 rakamlar. Token ADLARI
   korundu (DOM/CSS sözleşmesi) — sadece değerler GTO paletine taşındı. */
:root {
  --bg: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f6f8fc; /* GTO mini kutu / sayaç ucu */
  --surface-3: #eef1f7;
  --line: #e5e9f2;
  --line-2: #eef1f7;
  --text: #16233d; /* GTO ink */
  --muted: #64748b; /* GTO mut */

  /* GTO çekirdek: navy marka + accent mavi */
  --navy: #16306b;
  --navy2: #0f2350;
  --accent: #2563eb;
  --primary: #16306b; /* marka/birincil = navy (buton, aktif sekme, avatar) */
  --primary-600: #0f2350;
  --primary-tint: #e6edf9;
  --primary-tint-2: #cdd9f0;

  --green: #16a34a;
  --green-tint: #e8f7ee;
  --blue: #2563eb;
  --blue-tint: #e8f0fe;
  --amber: #f59e0b; /* GTO kararsiz */
  --amber-tint: #fdf1dd;
  --red: #dc2626; /* GTO rakip */
  --red-tint: #fef2f2;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow:
    0 1px 3px rgba(22, 48, 107, 0.06), 0 1px 2px rgba(22, 48, 107, 0.04);
  --shadow-sm: 0 1px 3px rgba(22, 48, 107, 0.05);
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  /* fable-016: yatay taşma koruması BODY'de değil BURADA olmalı. CSS'te overflow'un bir ekseni
     visible değilse diğeri otomatik auto olur → body{overflow-x:hidden} body'yi SCROLL KABINA
     çevirir; iOS momentum scroll'unda içindeki position:fixed alt bar geride kalıp yerine
     oturur ("bar oynuyor"). html scroll kabı zaten viewport olduğu için burada yan etki yok. */
  overflow-x: hidden;
  /* Kısa sayfada kaydırma çubuğu yok, uzun sayfada var → sayfa geçişinde içerik+bar 15px yana
     zıplıyordu (masaüstü). Yeri hep rezerve: geçişte kayma olmaz. Mobilde çubuk overlay, etkisiz. */
  scrollbar-gutter: stable;
}
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg); /* fable-034: GTO düz soft mavi-gri zemin */
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, Inter,
    "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* overflow-x: hidden BİLEREK YOK — html'e taşındı (fable-016; sebep yukarıda). */
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: 100%;
  max-width: 400px;
  min-height: 100vh;
  margin: 0 auto;
  /* fable-048e (Ömer: "bu seferde çok aşağıda oldu, tarihi göremiyorum"): üst boşluk
     18→4px. Çentik payı (inset) korunur ama üstüne eklenen pay minimuma indi. */
  padding: calc(4px + env(safe-area-inset-top)) 15px
    calc(122px + env(safe-area-inset-bottom));
  position: relative;
  overflow-x: hidden;
}

/* fable-021: Kokpit /m alt bar titremesine KALICI çözüm — Hikari sabit-kabuk deseni.
   Tarihçe zinciri: 011 (transform+blur yatay titreme → margin-ortalama) → 014 → 016 (yatay taşma
   koruması html'e; body scroll kabı OLMASIN, yoksa iOS momentum'da position:fixed bar geride kalır)
   → 021. Palyatif bitti: MÜŞTERİ sayfasında .bottom-tabs artık position:fixed DEĞİL, akışta.
   Body dikey flex kabuk (100dvh, overflow:hidden) → kayan TEK şey main.app-shell; bar en altta,
   momentum scroll'da geride kalacağı fixed katman kalmadı → titreme fiziksel olarak imkansız.
   KAPSAM SADECE body.customer-page; admin (masaüstü kabuk + FAB) position:fixed barını korur. */
body.customer-page {
  height: 100vh; /* eski WebKit / iOS <15.4 fallback (dvh yok) */
  height: 100dvh; /* destekleyen ezer → iOS adres çubuğu daralınca bar dipte doğru oturur */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.customer-page main.app-shell {
  flex: 1 1 auto;
  min-height: 0; /* flex item'ın scroll kabı olabilmesi için şart (yoksa min-height:100vh taşırır, barı ekran dışına iter) */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain; /* zincir-scroll'u main'de tut; pull-to-refresh (push.js) main.scrollTop=0 iken tetiklenir */
  scroll-behavior: smooth; /* html'deki smooth artık kayan eleman main'e taşınır */
  /* Alt padding küçüldü: bar akışta yer kapladığı için eski fixed-bar payı (122px) gereksiz.
     safe-area-inset-bottom BAR'ın kendi padding'inde (.bottom-tabs, aşağıda). */
  padding-bottom: 22px;
}
body.customer-page .bottom-tabs {
  position: static;
  flex: 0 0 auto;
  /* Görünüm (yükseklik/gölge/blur/max-width ortalama) korunur — sadece konumlandırma değişti. */
}

/* fable-025: AYNI desen ADMIN'e (Ömer: "alt bar yine oynuyor" — bu sefer yönetim panelinde).
   021'de admin bilerek dışarıda bırakılmıştı ("işleyen düzeni bozma"); iPhone'da admin de
   titreyince aynı kanıtlı reçete uygulandı. FAB bar İÇİNDE (fab-slot absolute) olduğu için
   barla birlikte akışa geçer; fab-menu position:fixed kalır (bar görsel olarak viewport
   dibinde olduğundan menü konumu değişmez). kb-open gizlemesi display:none — statikte de işler. */
body.admin-page {
  height: 100vh; /* eski WebKit fallback */
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.admin-page main.app-shell {
  flex: 1 1 auto;
  min-height: 0; /* flex item'ın scroll kabı olabilmesi için şart */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  padding-bottom: 22px; /* fixed-bar payı (122px) gereksizleşti */
}
body.admin-page .bottom-tabs {
  position: static;
  flex: 0 0 auto;
}

/* fable-034: GTO lacivert üst bar — kabuk kenarına taşar (bleed), yapışkan.
   Ömer'in beğendiği kanıtlı örnek; KOYU TEMA değil, geri kalan her şey açık. */
/* fable-046: üst bar ÇENTİK/ön-kamera hizasından kesiliyordu (Ömer, iPhone). viewport-fit=cover
   olduğu için bar viewport'un en tepesine oturuyor ama safe-area payı YOKTU (sadece 14px).
   16px taban + env(safe-area-inset-top): çentiksiz cihazda (masaüstü/Android) sadece +2px büyür,
   çentikli iPhone'da marka+selamlama tamamen çentiğin altına iner. Bu kural partials/header.php
   (ve m/header_m.php) üzerinden TÜM ekranlarda ortak. */
/* fable-048g (Ömer: "bar sabit, sayfa kayıyor, barın yukarısında da sayfa görünüyor"):
   çentik/durum-çubuğu şeridi SABİT bir kapakla örtülür — sayfa oradan akıp görünmez.
   Yükseklik env(safe-area-inset-top) → çentiksiz cihazda 0 (kapak yok, hiçbir etkisi yok). */
body.admin-page::before,
body.customer-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top);
  background: var(--bg);
  z-index: 20; /* .topbar (15) ÜSTÜNDE — bar da bu şeridin altından geçer */
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin: -4px -15px 8px; /* fable-048e: kabuk üst boşluğuyla hizalı + alt nefes 14→10 */
  /* fable-048d (Ömer 2. kez: "mavisi yukarı doğru çok uzun"): çentik/durum-çubuğu payı artık
     MAVİ BARDA DEĞİL — kabuğun üstünde (sayfa zemini rengi). Bar sadece kendi içeriği kadar
     yer kaplar; sticky konumu da inset kadar aşağı kayar ki kaydırınca çentiğe girmesin. */
  padding: 8px 16px;
  background: linear-gradient(120deg, var(--navy), var(--navy2));
  color: #fff;
  /* fable-048g (Ömer: "hâlâ bardan tarihi göremiyorum, az daha yukarı"): bar artık AKIŞTA —
     sayfa kayınca yukarı gider, altındaki tarih kartını ÖRTMEZ. Çentik şeridini sabit kapak
     (body::before) örttüğü için bar yukarı kayarken de üstte içerik görünmez. */
  position: relative;
  z-index: 15;
}
.topbar .brand-copy .eyebrow:first-child {
  margin-bottom: 3px; /* selamlama üstteyken başlıkla arasına nefes */
}
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 900;
}
.brand-copy {
  min-width: 0;
}
.topbar h1 {
  color: #fff;
}
.topbar .eyebrow {
  color: #7cb2f0;
  font-weight: 600;
}
.topbar .icon-btn {
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: #fff;
  box-shadow: none;
}
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 2px;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.01em;
}
h2 {
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 780;
}
h3 {
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 750;
}

.icon-btn,
.chip,
.btn-action,
.step-btn,
.tab-item {
  min-height: 44px;
}
.icon-btn {
  width: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.screen-stack {
  display: grid;
  /* fable-046: sütun AÇIKÇA minmax(0,1fr). Örtük `auto` track, en geniş kartın min-content'ine
     göre büyüyordu (Bugün'de 3'lü buton satırı → track 462px, kabuk 345px) ve kartlar
     app-shell'in overflow-x:hidden'ı altında SAĞDAN KESİLİYORDU (Kaydet butonu, sayaç, 5.
     hızlı erişim kutusu). minmax(0,1fr) track'i kaba sabitler, içerik küçülerek sığar.
     Yatay taşma HEAD'de de vardı (kanıt: aynı ölçüm pristine kopyada); jitter reçetesine
     (fable-016/021/025) dokunulmadı — sadece track genişliği. */
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
}
.cardx {
  min-width: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-pad {
  padding: 16px;
}

/* ── Broşür "Panel" — 3 yumuşak renkli istatistik kartı ─────── */
.stat-stack {
  display: grid;
  gap: 11px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.stat-card .ico {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 21px;
  background: #fff;
}
.stat-card .txt {
  min-width: 0;
}
.stat-card .lbl {
  margin: 0 0 3px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
}
.stat-card .val {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.stat-green {
  background: var(--green-tint);
}
.stat-green .ico {
  color: var(--green);
}
.stat-green .val {
  color: #12813b;
}
.stat-orange {
  background: var(--primary-tint);
}
.stat-orange .ico {
  color: var(--primary);
}
.stat-orange .val {
  color: var(--primary-600);
}
.stat-blue {
  background: var(--blue-tint);
}
.stat-blue .ico {
  color: var(--blue);
}
.stat-blue .val {
  color: #1d4ed8;
}

/* ── Klasik özet kartları (finans/rapor/cari) — beyaz ──────── */
.summary-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.summary-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.summary-card.wide {
  grid-column: 1 / -1;
}
.summary-card.tint-green {
  background: var(--green-tint);
  border-color: transparent;
}
.summary-card.tint-orange {
  background: var(--primary-tint);
  border-color: transparent;
}
.summary-card.tint-blue {
  background: var(--blue-tint);
  border-color: transparent;
}
.label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.metric {
  margin: 0;
  font-size: clamp(19px, 5.1vw, 23px);
  line-height: 1.12;
  font-weight: 850;
  overflow-wrap: anywhere;
  word-break: break-word;
  letter-spacing: -0.01em;
}
.metric.small {
  font-size: 18px;
}
.metric.pos {
  color: var(--green);
}
.metric.neg {
  color: var(--red);
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}
.delta.warn {
  color: var(--amber);
}

.date-row,
.segmented,
.actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-row {
  justify-content: space-between;
}
.segmented {
  flex-wrap: wrap;
}
.date-pill,
.chip {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.date-pill {
  padding: 10px 13px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.date-pill input {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}
.chip {
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 48, 107, 0.28);
}
/* Tek-dokunuş "dünkü ile aynı" — sayı alanını doldurur (ios-011) */
.chip-fill {
  gap: 6px;
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
}

/* ── Bölüm başlığı (kart dışı) ─────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 2px -2px;
}
.section-head h2 {
  margin: 0;
}
.section-head .link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
}

.customer-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 118px);
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line-2);
}
.customer-row:first-child {
  border-top: 0;
  padding-top: 2px;
}
.customer-row.missing {
  background: linear-gradient(90deg, var(--amber-tint), transparent 72%);
  margin-inline: -16px;
  padding-inline: 16px;
}
.customer-row > div {
  min-width: 0;
}
.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.row-title strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 720;
}
.row-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  flex: 0 0 auto;
}
.status-dot.warn {
  background: var(--amber);
}

.counter {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  min-height: 44px;
  overflow: hidden;
  min-width: 0;
}
.step-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}
.count-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: center;
  font-size: clamp(16px, 4.5vw, 18px);
  font-weight: 850;
  outline: 0;
  -moz-appearance: textfield;
}
.count-input::-webkit-outer-spin-button,
.count-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-action {
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.btn-primaryx {
  background: linear-gradient(120deg, var(--navy), var(--navy2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 48, 107, 0.3);
}
.btn-secondaryx {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
.btn-full {
  width: 100%;
}

.hint-card {
  padding: 13px 14px;
  border: 1px solid var(--primary-tint-2);
  border-radius: var(--radius);
  background: var(--primary-tint);
  color: #0f2350;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.list-groupx {
  display: grid;
  gap: 9px;
}
.flow-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.flow-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--green-tint);
  color: var(--green);
}
.flow-icon.out {
  background: var(--red-tint);
  color: var(--red);
}
.amount {
  font-weight: 850;
  white-space: nowrap;
}
.amount.out {
  color: var(--red);
}
.amount.in {
  color: var(--green);
}

.badge-soft {
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}
.badge-ok {
  background: var(--green-tint);
  color: var(--green);
}
.badge-warn {
  background: var(--amber-tint);
  color: var(--amber);
}
.badge-blue {
  background: var(--blue-tint);
  color: var(--blue);
}
.badge-orange {
  background: var(--primary-tint);
  color: var(--primary-600);
}
.badge-neg {
  background: var(--red-tint);
  color: var(--red);
}

.fab-sheet {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  gap: 11px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.inputx,
.selectx,
.textareax {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 13px;
  font: inherit;
  width: 100%;
}
.inputx:focus,
.selectx:focus,
.textareax:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.textareax {
  min-height: 92px;
  resize: none;
}

.tablex {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tablex th,
.tablex td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tablex th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.tablex tr:last-child td {
  border-bottom: 0;
}
.tablex td.num,
.tablex th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tablex tr.is-total td {
  font-weight: 850;
  border-top: 2px solid var(--line);
  background: var(--surface-2);
}

/* ── Bar grafik (broşür "Bugün Sipariş Veren Firmalar") ─────── */
.barchart {
  display: grid;
  gap: 9px;
  margin-top: 4px;
}
.bar-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 9px;
}
.bar-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.bar-track {
  height: 12px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--navy));
  min-width: 4px;
}
.bar-val {
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* ── Drill-down (rapor müşteri günlük) ─────────────────────── */
.mini-cal {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.mini-cal th,
.mini-cal td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mini-cal th:first-child,
.mini-cal td:first-child {
  text-align: left;
}
.mini-cal th {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
}
.mini-cal tr.is-total td {
  font-weight: 850;
  border-top: 2px solid var(--line);
  background: var(--surface-2);
}
/* fable-020: haftalık ayraç + hafta ara-toplamı + eksik gün satırı */
.mini-cal tr.is-week td {
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: left;
  border-top: 1px solid var(--line);
}
.mini-cal tr.is-week td .wk-eksik {
  color: var(--red);
  text-transform: none;
}
.mini-cal tr.is-subtotal td {
  font-weight: 800;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.mini-cal tr.is-missing td {
  background: var(--red-tint);
}
.mini-cal tr.is-missing td:first-child {
  box-shadow: inset 3px 0 0 var(--red);
  font-weight: 700;
}
.eksik-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  vertical-align: middle;
  white-space: nowrap;
}
/* fable-022: Eksik rozeti artık link — tıkla → bugun.php o tarih + müşteri odaklı (derin bağlantı) */
a.eksik-badge {
  text-decoration: none;
  cursor: pointer;
}
a.eksik-badge:hover {
  filter: brightness(1.12);
}
.customer-row.is-focus {
  background: linear-gradient(90deg, var(--red-tint), transparent 72%);
  margin-inline: -16px;
  padding-inline: 16px;
  box-shadow: inset 3px 0 0 var(--red);
  scroll-margin-top: 90px;
}
.summary-card.tint-red {
  background: var(--red-tint);
  border-color: transparent;
}

.empty-state {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

/* ── Günün menüsü kartı (broşür yeşil tonu) ────────────────── */
.meal-card {
  padding: 15px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--green-tint);
  box-shadow: var(--shadow-sm);
}
.meal-card .label {
  color: #12813b;
}
.meal-card h2 {
  margin: 0;
  color: #0f6b32;
}

/* ── Talep mesaj dizisi (sohbet balonları) ─────────────────── */
.msg-thread {
  display: grid;
  gap: 9px;
  padding: 4px 0;
}
.msg {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.msg.mine {
  justify-self: end;
  background: var(--primary-tint);
  border: 1px solid var(--primary-tint-2);
  border-bottom-right-radius: 4px;
}
.msg.theirs {
  justify-self: start;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-bottom-left-radius: 4px;
}
.msg-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.msg-meta {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
}

/* Müşteri alt-nav 6 sekme (FAB yok) */
.customer .bottom-tabs,
body.customer-page .bottom-tabs {
  /* fable-009: Cari bardan kalktı (fable-001) → 5 sekme; 6 sütun kalınca bar kayık duruyordu */
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* ── Modül grid'i (broşür alt kartları: Stok, Reçete, Faturalar…) ─ */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.mod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
  min-height: 104px;
}
.mod-card .mico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--primary-tint);
  color: var(--primary);
}
.mod-card.i-green .mico {
  background: var(--green-tint);
  color: var(--green);
}
.mod-card.i-blue .mico {
  background: var(--blue-tint);
  color: var(--blue);
}
.mod-card.i-amber .mico {
  background: var(--amber-tint);
  color: var(--amber);
}
.mod-card .mt {
  font-weight: 780;
  font-size: 14px;
  line-height: 1.2;
}
.mod-card .md {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.3;
  margin-top: auto;
}
.mod-card.soon {
  opacity: 0.9;
}
.mod-card .soon-chip {
  position: absolute;
  top: 11px;
  right: 11px;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--amber-tint);
  color: var(--amber);
}

/* Placeholder ("yakında") ekran görseli */
.soon-hero {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 34px 20px;
  text-align: center;
}
.soon-hero .big-ico {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: var(--primary-tint);
  color: var(--primary);
}

/* ── Alt navigasyon + ortada turuncu (+) FAB ──────────────── */
.bottom-tabs {
  position: fixed;
  /* fable-011: transform'lu ortalama (translateX -50%) + blur, iOS'ta kaydırırken barı
     yatayda titretiyordu ("oynak"). Transformsuz margin-ortalama + kendi katmanı (translateZ)
     ile sabitlendi. */
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: 0;
  z-index: 20;
  width: 100%;
  max-width: 400px;
  display: grid;
  grid-template-columns: 1fr 1fr 68px 1fr 1fr;
  align-items: end;
  gap: 2px;
  padding: 8px 8px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 -6px 20px rgba(20, 40, 80, 0.06);
  transform: translateZ(0);
  backface-visibility: hidden;
}
.tab-item {
  min-width: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 2px;
  white-space: nowrap;
}
.tab-item i {
  font-size: 19px;
}
.tab-item.active {
  color: var(--primary);
}
.tab-item .soon {
  font-size: 9px;
  color: var(--amber);
}
/* fable-018: sekme ikonu + okunmadı rozeti (Akış) */
.tab-ico {
  position: relative;
  display: grid;
  place-items: center;
}
.tab-badge {
  position: absolute;
  top: -6px;
  left: 60%;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
/* fable-018: Akış / Daha liste satırı yuvarlak ikonu */
.feed-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--primary);
  font-size: 17px;
}
.fab-slot {
  position: relative;
  display: grid;
  place-items: center;
}
.fab {
  position: absolute;
  bottom: 4px;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--navy), var(--navy2));
  color: #fff;
  font-size: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(22, 48, 107, 0.42);
}
.fab i {
  font-size: 26px;
}

/* FAB aksiyon menüsü (Cari/Menü dahil tüm hızlı işler) */
.fab-menu {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 25;
  width: min(92%, 372px);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  /* fable-004: menü uzadı (Operasyon grubu) — ekrana sığmazsa içi kaydırılır */
  max-height: calc(
    100vh - 84px - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 24px
  );
  max-height: calc(
    100dvh - 84px - env(safe-area-inset-bottom) - env(safe-area-inset-top) -
      24px
  );
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.fab-menu.open {
  display: grid;
  gap: 2px;
}
.quick-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 13px;
}
.q-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
  font-weight: 750;
  font-size: 13.5px;
  min-height: 44px;
}
.q-tile i {
  font-size: 19px;
  color: var(--primary);
  flex: 0 0 auto;
}
.q-tile:active {
  background: var(--surface-2);
}
.q-tile .q-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--red-tint);
  color: var(--red);
}
.fab-menu .fab-label {
  margin: 12px 6px 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.fab-menu .fab-label:first-child {
  margin-top: 2px;
}
.fab-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.fab-menu a:active {
  background: var(--surface-2);
}
.fab-menu a i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 17px;
}
.fab-backdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(16, 32, 51, 0.28);
  display: none;
}
.fab-backdrop.open {
  display: block;
}

.login-shell {
  min-height: 100vh;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  align-content: center;
}
.login-logo {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: linear-gradient(120deg, var(--navy), var(--navy2));
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(22, 48, 107, 0.34);
}

/* Flash / hata bildirimleri */
.flash {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}
.flash.ok {
  background: var(--green-tint);
  border: 1px solid rgba(22, 163, 74, 0.28);
  color: #12813b;
}
.flash.err {
  background: var(--red-tint);
  border: 1px solid rgba(229, 72, 77, 0.32);
  color: #b42318;
}

/* Küçük yardımcı sınıflar (Bootstrap yerine — kendine yeten) */
.d-flex {
  display: flex;
}
.align-items-center {
  align-items: center;
}
.align-items-end {
  align-items: end;
}
.justify-between {
  justify-content: space-between;
}
.gap-2 {
  gap: 8px;
}
.gap-3 {
  gap: 12px;
}
.flex-fill {
  flex: 1 1 auto;
}
.mt-1 {
  margin-top: 4px;
}
.mt-2 {
  margin-top: 8px;
}
.mt-3 {
  margin-top: 12px;
}
.mb-2 {
  margin-bottom: 8px;
}
.mb-3 {
  margin-bottom: 12px;
}
.mb-4 {
  margin-bottom: 18px;
}
.text-muted {
  color: var(--muted);
}

@media (min-width: 720px) {
  .app-shell,
  .login-shell {
    margin-inline: auto;
  }
  /* fable-011'deki titreme düzeltmesi burada da geçerli: translateX(-50%) ile ortalama,
     üstteki left:0/right:0/margin:0 auto kuralını ve translateZ(0) katmanını EZİYOR →
     kaydırırken bar yatayda oynuyordu. Ortalama zaten ana kuralda; burada sadece genişlik. */
  .app-shell,
  .login-shell,
  .bottom-tabs {
    max-width: 520px;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 400px) {
  body.customer-page .tab-item {
    font-size: 10px;
    padding-inline: 0;
  }
  .summary-card.wide {
    grid-column: auto;
  }
  .customer-row {
    grid-template-columns: minmax(0, 1fr) 104px;
  }
  .counter {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
  }
  .btn-action {
    padding-inline: 12px;
  }
  .bar-row {
    grid-template-columns: 72px minmax(0, 1fr) 40px;
  }
}

/* opus-010: menü hedef müşteri seçimi + malzeme talep/hakediş satırı */
.check-list {
  display: grid;
  gap: 0;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 2px 10px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 2px;
  border-top: 1px solid var(--line-2);
  font-size: 14px;
  cursor: pointer;
}
.check-row:first-child {
  border-top: 0;
}
.check-row input {
  width: 19px;
  height: 19px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}
.supply-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line-2);
}
.supply-row:first-child {
  border-top: 0;
}
.supply-row .s-name {
  min-width: 0;
  font-weight: 650;
  font-size: 14px;
}
.supply-row .s-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.qty-input {
  min-height: 42px;
  text-align: center;
  padding-inline: 6px;
}
.ent-tag {
  display: inline-block;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--green);
  background: var(--green-tint);
  border-radius: 999px;
  padding: 2px 9px;
}

/* iOS/WKWebView: klavye açıkken fixed alt bar ekran ortasında asılı kalıyor →
   app.js body'ye .kb-open basar, bar+FAB gizlenir; klavye kapanınca geri gelir. */
body.kb-open .bottom-tabs,
body.kb-open .fab-menu,
body.kb-open .fab-backdrop {
  display: none;
}

/* Çevrimdışı şeridi (app.js netBanner) */
.net-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 10px 14px calc(10px + env(safe-area-inset-top) * 0.3);
  padding-top: calc(10px + env(safe-area-inset-top));
  background: #b91c1c;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

/* Native app köprüsü: login tonu, pull-to-refresh ve foreground push bildirimi. */
html.native-app [data-web-only] {
  display: none !important;
}
.native-login-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}
.native-login-note[hidden] {
  display: none !important;
}
.native-login-note i {
  color: var(--primary);
  font-size: 18px;
  line-height: 1.2;
}
.pull-refresh {
  position: fixed;
  left: 50%;
  top: calc(8px + env(safe-area-inset-top));
  z-index: 55;
  min-width: 112px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%, -58px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  pointer-events: none;
}
.pull-refresh.active {
  opacity: 1;
  transition: none;
}
.pull-refresh.armed {
  color: var(--primary);
}
.pull-refresh.refreshing i {
  animation: native-spin 700ms linear infinite;
}
.native-push-toast {
  appearance: none;
  position: fixed;
  left: 50%;
  top: calc(10px + env(safe-area-inset-top));
  z-index: 65;
  width: min(calc(100% - 24px), 372px);
  min-height: 58px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(20, 40, 80, 0.18);
  text-align: left;
  opacity: 0;
  transform: translate(-50%, -18px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}
.native-push-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.native-push-toast > i {
  color: var(--primary);
  font-size: 20px;
  text-align: center;
}
.native-push-toast span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.native-push-toast strong,
.native-push-toast small {
  display: block;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}
.native-push-toast strong {
  font-size: 13px;
}
.native-push-toast small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}
@keyframes native-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pull-refresh,
  .native-push-toast {
    transition: none;
  }
  .pull-refresh.refreshing i {
    animation: none;
  }
}

/* ── fable-001: haftalık şerit (Pzt–Cmt kendi sayıları) — müşteri panel + sayı bildir ── */
.week-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  min-width: 0;
}
.week-day .wd-name {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.week-day .wd-date {
  font-size: 10px;
  color: var(--muted);
}
.week-day .wd-count {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.week-day.today {
  background: var(--primary-tint);
  border-color: var(--primary-tint-2);
}
.week-day.today .wd-name {
  color: var(--primary);
}
a.week-day.selected {
  background: var(--primary);
  border-color: var(--primary);
}
a.week-day.selected .wd-name,
a.week-day.selected .wd-date,
a.week-day.selected .wd-count {
  color: #fff;
}
a.week-day.locked {
  opacity: 0.55;
}
/* Menü akışında bugün kartı vurgusu */
.meal-card.today-card {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
}

/* ── fable-001: admin haftalık cetvel (müşteri × gün) ── */
.cetvel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.cetvel-table th,
.cetvel-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cetvel-table th:first-child,
.cetvel-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--surface);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cetvel-table thead th {
  color: var(--muted);
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cetvel-table thead th span {
  font-weight: 500;
  font-size: 10px;
}
.cetvel-table th.today,
.cetvel-table td.today {
  background: var(--primary-tint);
}
.cetvel-table .total-row td {
  border-top: 2px solid var(--line);
  font-weight: 700;
}

/* ── fable-012: dokunulabilir Gelir/Gider özet kartları ── */
.tap-card {
  cursor: pointer;
  position: relative;
}
.tap-card .chev {
  font-size: 11px;
  opacity: 0.6;
  transition: transform 0.18s ease;
}
.tap-card.open .chev {
  transform: rotate(180deg);
}
.tap-card:active {
  transform: translateY(1px);
}
.fin-detay {
  margin-top: -4px;
}

/* ── fable-023a: öğün kırılımı (müşteri adı → küçük pencere) ── */
.row-name-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.row-name-btn strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 720;
  border-bottom: 1px dashed var(--line);
}
.row-name-btn i {
  font-size: 12px;
  color: var(--primary);
  flex: 0 0 auto;
}
.row-name-btn:active {
  opacity: 0.7;
}
.meal-split {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--primary-tint);
  color: var(--primary-600);
  font-size: 11px;
  font-weight: 750;
}
.meal-split[hidden] {
  display: none;
}
/* fable-051: alt firma bölüşümü — SALT GÖSTERİM (düzenleme yeri Fatura Kes penceresi) */
.alt-split {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.alt-split[hidden] {
  display: none;
}

.meal-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.meal-modal[hidden] {
  display: none;
}
.meal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 36, 0.44);
}
.meal-card {
  position: relative;
  width: min(420px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(10, 22, 36, 0.28);
  padding: 16px;
}
.meal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.meal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.meal-sub {
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.meal-fields {
  display: grid;
  gap: 10px;
}
.meal-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: center;
  gap: 10px;
}
.meal-field > span {
  font-size: 14px;
  font-weight: 700;
}
/* iOS otomatik zoom olmasın: ≥16px */
.meal-input {
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  min-height: 48px;
  -moz-appearance: textfield;
}
.meal-input::-webkit-outer-spin-button,
.meal-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.meal-total {
  margin: 12px 0 2px;
  font-size: 14px;
  font-weight: 700;
}
.meal-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
body.meal-open {
  overflow: hidden;
}

/* ── fable-023b: İrsaliyelendir (Paraşüt e-İrsaliye) ── */
.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.head-row h2 {
  margin: 0;
}
.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.btn-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.irs-card {
  width: min(520px, 100%);
}
.irs-badge {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--amber-tint);
  color: #8a5a00;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.irs-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.irs-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.irs-list {
  max-height: 46vh;
  overflow: auto;
  display: grid;
}
.irs-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.irs-row > input {
  width: 18px;
  height: 18px;
  grid-column: 1;
  grid-row: 1 / span 5;
  align-self: start;
  margin-top: 2px;
}
/* Metin/aksiyon hücreleri DAİMA 2. sütunda kalsın (kutucuk sütununa taşmasın) */
.irs-row > span {
  grid-column: 2;
}
.irs-row.is-off {
  opacity: 0.62;
  cursor: not-allowed;
}
.irs-name {
  font-size: 14px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.irs-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.irs-why {
  font-size: 12px;
  font-weight: 700;
  color: #a35400;
  overflow-wrap: anywhere;
}
.irs-sum {
  margin: 2px 0 10px;
  font-size: 14px;
  font-weight: 750;
}
.irs-res {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  border-left: 3px solid var(--line);
  background: var(--surface-2);
}
.irs-res.ok {
  border-left-color: var(--green);
}
.irs-res.warn {
  border-left-color: #e08b00;
}
.irs-res.err {
  border-left-color: var(--red);
}
/* fable-027: Bugün ekranı 3'lü buton sırası — dar ekranda taşmasın, ekran büyümesin */
.actions-uc {
  gap: 8px;
}
.actions-uc .btn-action {
  padding-inline: 8px;
  font-size: 13px;
  white-space: nowrap;
}
@media (max-width: 400px) {
  .actions-uc .btn-action {
    font-size: 12px;
  }
  .actions-uc .btn-action i {
    display: none; /* çok dar ekranda ikonlar gizlenir, metin sığar */
  }
}

/* fable-029: sistem kontrolleri + dönem kısayolları */
.ftr-kisayol {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ftr-kisayol .chip {
  min-height: 36px;
  text-decoration: none;
}
.ftr-kontrol {
  margin: 6px 0 8px;
  display: grid;
  gap: 4px;
}
.ftr-kontrol-satir {
  font-size: 12px;
  line-height: 1.45;
  padding: 5px 9px;
  border-radius: 8px;
}
.ftr-kontrol-satir.ok {
  background: var(--green-tint);
  color: #12813b;
}
.ftr-kontrol-satir.warn {
  background: var(--amber-tint);
  color: #8a5a00;
  font-weight: 700;
}

/* fable-028b: belge görünümlü fatura önizlemesi */
.ftr-belge-wrap {
  margin-top: 8px;
}
.ftr-belge-wrap summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
}
.ftr-belge {
  margin-top: 6px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--surface);
}
.ftr-belge-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.03em;
}
.ftr-belge-tag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--amber-tint);
  color: var(--amber);
}
.ftr-belge-meta {
  margin: 6px 0 8px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}
.ftr-belge-alt {
  margin-top: 8px;
  display: grid;
  gap: 3px;
  justify-items: end;
  font-size: 12px;
  color: var(--muted);
}
.ftr-belge-alt strong {
  color: var(--text);
  margin-left: 8px;
}
.ftr-belge-genel {
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

/* fable-028: fatura onayında gün gün döküm (netleştirme tablosu) */
.ftr-gunler {
  margin-top: 8px;
}
.ftr-gunler summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
}
.ftr-gunler .mini-cal {
  margin-top: 6px;
}
.ftr-irsno {
  font-size: 10px;
  color: var(--muted);
  display: inline-block;
  margin-left: 4px;
}

/* fable-026: canlı ilerleme — bekleyen soluk, işlenen "nefes alır" (kesim sürüyor hissi).
   Aynı desen fatura sonuç satırlarında (.ftr-res) da kullanılır. */
.irs-res.wait,
.ftr-res.wait {
  opacity: 0.55;
}
.irs-res.wait.busy,
.ftr-res.wait.busy {
  opacity: 1;
  border-left-color: var(--primary);
  animation: irsNefes 1.1s ease-in-out infinite;
}
@keyframes irsNefes {
  0%,
  100% {
    background: var(--surface-2);
  }
  50% {
    background: var(--primary-tint);
  }
}
.irs-warn {
  margin: 10px 0 6px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  color: #a12a2a;
}
.irs-json summary {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  cursor: pointer;
}
.irs-json pre {
  max-height: 30vh;
  overflow: auto;
  font-size: 11px;
  line-height: 1.4;
  background: #0f1b2a;
  color: #d8e6f2;
  padding: 10px;
  border-radius: 10px;
}
.irs-fix {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.btn-mini {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.btn-mini:disabled {
  opacity: 0.5;
}

/* fable-024 — Fatura Kes ekranı */
.ftr-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
  margin: 4px 0 10px;
  cursor: pointer;
}
.ftr-list {
  display: grid;
  gap: 8px;
}
.ftr-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
}
.ftr-row.disabled {
  opacity: 0.6;
}
.ftr-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  cursor: pointer;
}
.ftr-head input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.ftr-name {
  font-size: 14px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.ftr-meta {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin: 6px 0 0 26px;
}
.ftr-why {
  font-size: 12px;
  font-weight: 700;
  color: #a35400;
  margin: 6px 0 0 26px;
  overflow-wrap: anywhere;
}
.ftr-why.warn,
.ftr-bol-uyari.warn {
  color: var(--red);
}
.ftr-bolusum {
  margin: 8px 0 0 26px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  display: grid;
  gap: 6px;
}
.ftr-bol-head {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
}
.ftr-bol-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 650;
}
.ftr-bol-in {
  width: 110px;
  min-height: 34px;
  font-size: 16px;
  text-align: right;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
}
.ftr-bol-uyari {
  font-size: 12px;
  font-weight: 750;
  color: var(--red);
}
/* fable-051: bölüşüm desenden geldi bilgisi — rakamın nereden çıktığı gizlenmez */
.ftr-bol-not {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.ftr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.ftr-res {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  margin-bottom: 7px;
  border-radius: 10px;
  border-left: 3px solid var(--line);
  background: var(--surface-2);
}
.ftr-res.ok {
  border-left-color: var(--green);
}
.ftr-res.warn {
  border-left-color: #e08b00;
}
.ftr-res.err {
  border-left-color: var(--red);
}
.ftr-lines {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.ftr-calc {
  font-size: 12.5px;
  font-weight: 650;
}
.ftr-irs,
.ftr-meta.small {
  font-size: 11px;
  color: var(--muted);
}
.ftr-sum {
  margin: 2px 0 10px;
  font-size: 14px;
  font-weight: 750;
}
.ftr-uyari {
  margin: 10px 0 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #a12a2a;
  line-height: 1.45;
}
.ftr-govde-wrap summary {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  cursor: pointer;
}
.ftr-govde {
  max-height: 34vh;
  overflow: auto;
  font-size: 11px;
  line-height: 1.4;
  background: #0f1b2a;
  color: #d8e6f2;
  padding: 10px;
  border-radius: 10px;
  margin-top: 8px;
}

/* ══════════════════════════════════════════════════════════════
   fable-034: GTO tasarım dili yardımcıları (Ömer onaylı mockup'lar)
   Yeni kompozisyon parçaları — mevcut sınıf adlarıyla çakışmasın diye gt- önekli.
   Bugün / Kâr-Zarar / Finans ekranlarında referanslara birebir uyum için.
   ══════════════════════════════════════════════════════════════ */

/* Kart mikro başlığı: 12px UPPERCASE 800, gri, accent ikon; sağda opsiyonel link */
.gt-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.gt-h i {
  color: var(--accent);
  font-size: 14px;
}
.gt-h .gt-hr {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0;
  text-transform: none;
}

/* Tarih şeridi (kart içi ‹ orta › ) */
.gt-date {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gt-date button,
.gt-date .nav {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 11px;
  font-size: 16px;
  color: var(--navy);
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.gt-date .dt {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.gt-date .dt b {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--navy);
}
.gt-date .dt span {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}
.gt-date .dt input[type="date"],
.gt-date .dt input[type="month"] {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  width: 100%;
}

/* NABIZ: tek koca metrik + alt açıklama */
.gt-pulse {
  text-align: center;
  padding: 4px 0 2px;
}
.gt-pulse-n {
  font-size: 44px;
  font-weight: 900;
  line-height: 0.95;
  color: var(--navy);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.gt-pulse-n.ok {
  color: var(--green);
}
.gt-pulse-n.bad {
  color: var(--red);
}
.gt-pulse-l {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 5px;
}

/* İlerleme çubuğu (sayı girişi) */
.gt-prog {
  margin: 15px 0 4px;
}
.gt-prog-top {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.gt-prog-top b {
  color: var(--text);
  font-size: 13.5px;
}
.gt-track {
  height: 15px;
  background: var(--surface-3);
  border-radius: 8px;
  overflow: hidden;
}
.gt-track.deficit {
  background: #fee2e2;
}
.gt-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #1d4ed8, #16a34a);
}
.gt-fill.left {
  border-radius: 8px 0 0 8px;
  background: linear-gradient(90deg, #15803d, #16a34a);
}

/* 3'lü mini stat kutuları */
.gt-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 14px;
}
.gt-mini > div {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 11px 8px;
  text-align: center;
  min-width: 0;
}
.gt-mn {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  word-break: keep-all;
}
.gt-mn.ok {
  color: var(--green);
}
.gt-mn.bad {
  color: var(--red);
}
.gt-ml {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 600;
}

/* fable-046: Bugün ekranındaki GÜNÜN NABZI kartının KOMPAKT sürümü (Ömer: "çok yer kaplıyor").
   SADECE .gt-nabiz-sm taşıyan karta iner — kar-analizi/finans nabız kartları aynen kalır.
   Rakam hâlâ 34px (okunaklı); kazanç dikey boşluklardan ve mini kutu padding'lerinden. */
.cardx.card-pad.gt-nabiz-sm {
  padding: 11px 14px 12px;
}
.gt-nabiz-sm .gt-h {
  margin-bottom: 6px;
}
.gt-nabiz-sm .gt-pulse {
  padding: 0;
}
.gt-nabiz-sm .gt-pulse-n {
  font-size: 34px;
  letter-spacing: -0.6px;
}
.gt-nabiz-sm .gt-pulse-l {
  font-size: 12px;
  margin-top: 2px;
}
.gt-nabiz-sm .gt-prog {
  margin: 9px 0 0;
}
.gt-nabiz-sm .gt-prog-top {
  font-size: 12px;
  margin-bottom: 4px;
}
.gt-nabiz-sm .gt-prog-top b {
  font-size: 12.5px;
}
.gt-nabiz-sm .gt-track {
  height: 10px;
  border-radius: 6px;
}
.gt-nabiz-sm .gt-fill {
  border-radius: 6px;
}
.gt-nabiz-sm .gt-mini {
  margin-top: 9px;
  gap: 8px;
}
.gt-nabiz-sm .gt-mini > div {
  padding: 7px 6px;
  border-radius: 10px;
}
.gt-nabiz-sm .gt-mn {
  font-size: 16px;
}
.gt-nabiz-sm .gt-ml {
  font-size: 10.5px;
  margin-top: 2px;
}

/* Gelir-gider terazi çubuğu */
.gt-scale {
  margin-top: 14px;
}
.gt-scale .row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
}
.gt-scale .gl {
  color: var(--green);
}
.gt-scale .gd {
  color: var(--red);
}

/* Karne satırı: avatar + ad + değer + ince bar */
.gt-kr {
  border-top: 1px solid var(--line-2);
  padding: 11px 2px;
}
.gt-kr:first-child {
  border-top: none;
}
.gt-kr-head {
  display: flex;
  align-items: center;
  gap: 11px;
}
.gt-rank {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gt-kr.warn .gt-rank {
  background: var(--red-tint);
  color: var(--red);
}
.gt-kr-firm {
  flex: 1;
  min-width: 0;
}
.gt-kr-ad {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gt-kr-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
  font-weight: 600;
}
.gt-kr.warn .gt-kr-sub {
  color: var(--red);
}
.gt-kr-val {
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.gt-kr-val.ok {
  color: var(--green);
}
.gt-kr-val.bad {
  color: var(--red);
}
.gt-kr-val small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}
.gt-bar {
  margin-top: 7px;
  height: 9px;
  background: var(--surface-3);
  border-radius: 5px;
  overflow: hidden;
}
.gt-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--green);
}
.gt-bar i.bad {
  background: var(--red);
}
.gt-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* İşlem (para hareketi) satırı */
.gt-day {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 4px 0 2px;
  padding-top: 8px;
}
.gt-tx {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 2px;
  border-top: 1px solid var(--line-2);
}
.gt-tx-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.gt-tx-ic.in {
  background: var(--green-tint);
  color: var(--green);
}
.gt-tx-ic.out {
  background: var(--red-tint);
  color: var(--red);
}
.gt-tn {
  flex: 1;
  min-width: 0;
}
.gt-tn b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gt-tn span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.gt-tv {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.gt-tv.in {
  color: var(--green);
}
.gt-tv.out {
  color: var(--red);
}

/* fable-034: Bugün müşteri satırı — GTO avatar düzeni (mockup). customer-row grid'i
   flex'e çevrilir; JS closest/querySelector kullandığı için sütun düzeni bağımlılığı yok. */
.customer-row {
  display: flex;
  align-items: center;
  gap: 11px;
  grid-template-columns: none;
}
.customer-row .cr-firm {
  flex: 1 1 auto;
  min-width: 0;
}
.customer-row .counter {
  flex: 0 0 116px;
  width: 116px;
}
.customer-row.missing .gt-rank {
  background: var(--red-tint);
  color: var(--red);
}
.customer-row.missing {
  background: linear-gradient(90deg, var(--red-tint), transparent 72%);
}
.customer-row.missing .row-meta .row-amt {
  color: var(--red);
  font-weight: 700;
}
@media (max-width: 400px) {
  .customer-row {
    grid-template-columns: none;
  }
}

/* fable-034b (denetim): HIZLI ERİŞİM — mockup KOMPAKT 4'lü grid (.g-mods/.g-mod).
   Küçük kutu: accent ikon + tek satır etiket; rozet köşe noktası. */
.gt-mods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.gt-mod {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 4px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gt-mod i {
  display: block;
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 5px;
}
.gt-mod-dot {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
/* fable-046: 5. kutu (Fatura Kes — yalnız admin) tek başına öksüz satır bırakmasın; son sıraya
   tam genişlikte otursun. Admin olmayanda 4 kutu kalır, kural devreye girmez. */
.gt-mods > :nth-child(5):last-child {
  grid-column: 1 / -1;
}
@media (max-width: 380px) {
  .gt-mods {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── fable-046: "önce ÖZET, tıklayınca liste/detay" katmanı ───────────────────
   Native <details>/<summary> (JS yok, personel.php avans deseninin aynısı).
   Kullanıcı: Müşteriler (Üretim/Taşıma özeti) + Cari (tedarikçi/müşteri satırı). */
.gt-katman > summary {
  display: block; /* varsayılan list-item üçgenini kaldır */
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.gt-katman > summary::-webkit-details-marker {
  display: none;
}
.gt-katman-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gt-katman-chev {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}
.gt-katman-chev i {
  font-size: 13px;
  transition: transform 140ms ease;
}
.gt-katman[open] .gt-katman-chev i {
  transform: rotate(180deg);
}
.gt-katman-chev .kap,
.gt-katman[open] .gt-katman-chev .ac {
  display: none;
}
.gt-katman[open] .gt-katman-chev .kap {
  display: inline;
}
.gt-katman-liste {
  margin-top: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--line-2);
}

/* Cari: satır = özet (kapalı) → detay + form (açık). Karne satırı (.gt-kr) summary'nin içinde
   yaşadığı için kendi :first-child border kuralı her satırda tetiklenir → çizgi .gt-satir'a taşındı. */
.gt-satir {
  border-top: 1px solid var(--line-2);
}
.gt-satir:first-of-type {
  border-top: none;
}
.gt-satir > summary {
  display: block;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.gt-satir > summary::-webkit-details-marker {
  display: none;
}
.gt-satir > summary > .gt-kr {
  border-top: none;
}
.gt-satir[open] > summary > .gt-kr {
  background: var(--surface-2);
  border-radius: 10px;
}
.gt-satir-detay {
  padding: 2px 2px 14px;
}
.gt-satir-detay .gt-h {
  margin: 14px 0 8px;
}
.gt-satir-detay .tablex {
  font-size: 13px;
}
.gt-satir-detay .form-grid {
  gap: 8px;
}

/* ── fable-051: müşteri kartı → ALT FİRMALAR (fatura bölüşüm deseni) ── */
.af-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.af-row.af-pasif {
  opacity: 0.6;
}
.af-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.af-grid .field span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 3px;
}
.af-grid .inputx {
  font-size: 16px; /* iOS otomatik zoom eşiği */
  width: 100%;
}
.af-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
}

/* fable-054: fatura dönemi bugünü aşınca çıkan planlı-üretim uyarısı + ikincil üretim adedi */
.uyari-kutu {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #a35400;
  font-size: 13px;
  line-height: 1.45;
}
.uyari-kutu i {
  flex-shrink: 0;
  margin-top: 1px;
}
.ftr-uretim {
  color: var(--muted);
}
/* fable-065: sabit kalem açıklaması tutar satırına yapışmasın (kendi satırına insin) */
.ftr-not {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

/* fable-056: Bugün ekranı kırılım penceresinde FİRMA dağılımı (CANTAŞ/Marmara) */
.firm-split {
  margin: 4px 0 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
}
.firm-split-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.firm-split-row:first-child {
  border-top: none;
}
.firm-split-row strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.firm-split-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* fable-058: firma kırılımı penceresi tek başına gösterilir (öğün alanları gizli) */
.firm-hint {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
/* .btn-action gibi display:flex kuralları [hidden] özniteliğini eziyordu — pencere
   içindeki her gizli öğe gerçekten gizlenir (Kaydet butonu görünür kalmıştı). */
.meal-card [hidden],
.firm-split[hidden] {
  display: none !important;
}

/* ── fable-059: firma kırılımına ELLE giriş (istisna günler) ──
   390px'te tam sığar: ad esner (minmax 0 1fr), kutu 92px sabit. iOS zoom olmasın → 17px. */
.firm-split-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.firm-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.firm-badge.is-elle {
  background: #fff4d6;
  border-color: #e8c777;
  color: #8a5a06;
}
.firm-split .firm-split-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.firm-split .firm-split-row > span {
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.firm-in {
  width: 100%;
  min-height: 44px;
  padding: 8px 6px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  -moz-appearance: textfield;
}
.firm-in::-webkit-outer-spin-button,
.firm-in::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.firm-in.is-bad {
  border-color: var(--red);
  background: var(--red-tint);
}
.firm-total {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.firm-total.bad {
  color: var(--red);
}
.firm-warn {
  margin: 4px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--red);
}
.firm-oto {
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
/* Satırda elle girilmiş gün göze çarpsın (renk tek başına anlam taşımasın diye title da var) */
.alt-split.is-elle {
  font-weight: 800;
}
/* Kaydet pasifken TIKLANABİLİR görünmesin (toplam hedefe eşit değilken kapalı) */
.btn-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
/* Resmi tatil rozeti — hedefin neden 70 değil 36 olduğu pencerede yazsın */
.firm-tatil {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--red-tint);
  color: var(--red);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
}

/* fable-071: kişi başı maliyet kartlarında rakam girişte gizli — karta dokununca açılır */
.gt-pulse-n.gizli {
  filter: blur(10px);
  opacity: 0.35;
  user-select: none;
  transition: filter .18s ease, opacity .18s ease;
}
