/* ============================================================
   main.css — StokOS v2
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #F2F4F8;
  --white: #FFFFFF;
  --green: #00C17C;
  --green-d: #009960;
  --green-bg: #E6F9F2;
  --blue: #2563EB;
  --blue-bg: #EFF4FF;
  --red: #E53935;
  --red-bg: #FDECEA;
  --amber: #F59E0B;
  --amber-bg: #FFF8E6;
  --purple: #7C3AED;
  --purple-bg: #F5F3FF;
  --text: #0F1117;
  --text2: #3D4459;
  --muted: #8A94A6;
  --border: #E2E6F0;
  --r: 14px;
  --r-sm: 10px;
  --sh: 0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --sh-md: 0 4px 16px rgba(0,0,0,.08);
  --sh-lg: 0 8px 32px rgba(0,0,0,.12);
}

html, body {
  height: 100%;
  background: var(--bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  overflow-x: hidden;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ── SAYFA SİSTEMİ ── */
.sayfa { display: none; }
.sayfa.aktif { display: block; animation: fadeUp .18s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

#sayfa-giris, #sayfa-pin {
  position: fixed; inset: 0; z-index: 50;
  overflow-y: auto; background: var(--text);
}

/* ── HEADER ── */
.header {
  background: var(--text);
  padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-ikon { width: 30px; height: 30px; }
.logo-metin { font-size: 19px; font-weight: 900; color: #fff; letter-spacing: -.5px; }
.logo-metin span { color: var(--green); }
.header-sag { display: flex; align-items: center; gap: 8px; }
.kullanici-chip {
  background: rgba(255,255,255,.1); border: none;
  padding: 6px 12px; border-radius: 99px;
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.kullanici-chip:active { background: rgba(255,255,255,.18); }

/* ── GİRİŞ ── */
.giris-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 20px;
}
.giris-logo-alan { text-align: center; margin-bottom: 36px; }
.giris-logo-metin { font-size: 40px; font-weight: 900; color: #fff; letter-spacing: -1px; margin-top: 10px; }
.giris-logo-metin span { color: var(--green); }
.giris-alt { color: rgba(255,255,255,.4); font-size: 14px; margin-top: 4px; }
.giris-kart { background: #fff; border-radius: 20px; padding: 28px 24px; width: 100%; max-width: 380px; }
.giris-baslik { font-size: 20px; font-weight: 800; margin-bottom: 20px; }

/* ── PIN ── */
.pin-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 24px;
}
.pin-logo { text-align: center; margin-bottom: 28px; }
.pin-baslik { font-size: 22px; font-weight: 900; color: #fff; margin-top: 10px; }
.pin-alt { color: rgba(255,255,255,.45); font-size: 14px; margin-top: 4px; text-align: center; }
.pin-noktalar { display: flex; gap: 16px; margin: 28px 0; }
.pin-nokta { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.2); transition: all .15s; }
.pin-nokta.dolu { background: var(--green); transform: scale(1.1); }
.pin-tuslar { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; width: 100%; max-width: 280px; }
.pin-tus {
  padding: 18px; border-radius: 14px;
  background: rgba(255,255,255,.07); border: none;
  font-size: 22px; font-weight: 700; color: #fff;
  cursor: pointer; font-family: inherit; transition: background .1s;
}
.pin-tus:active { background: rgba(255,255,255,.18); }
.pin-hata { color: var(--red); font-size: 13px; font-weight: 600; margin-top: 14px; min-height: 20px; text-align: center; }
.pin-link { color: rgba(255,255,255,.35); font-size: 13px; margin-top: 20px; cursor: pointer; text-decoration: underline; }

/* ── FORM ── */
.form-grup { margin-bottom: 14px; }
.form-etiket { font-size: 11px; font-weight: 800; color: var(--text2); margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: .6px; }
.form-girdi, .form-secim, .form-alan {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: 15px; font-family: inherit; outline: none;
  background: #fff; color: var(--text); transition: border .15s;
}
.form-girdi:focus, .form-secim:focus, .form-alan:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,193,124,.1); }
.form-alan { resize: vertical; min-height: 80px; }
.form-hata { background: var(--red-bg); color: var(--red); padding: 10px 14px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; margin-top: 10px; display: none; }
.form-hata.goster { display: block; }

/* Autocomplete */
.autocomplete-wrap { position: relative; }
.autocomplete-liste {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  background: #fff; border: 1.5px solid var(--border);
  border-top: none; border-radius: 0 0 var(--r-sm) var(--r-sm);
  box-shadow: var(--sh-md); max-height: 180px; overflow-y: auto;
  display: none;
}
.autocomplete-liste.goster { display: block; }
.autocomplete-item {
  padding: 10px 14px; font-size: 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item:active { background: var(--green-bg); }

/* ── BUTONLAR ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px; border-radius: var(--r-sm);
  border: none; font-family: inherit; font-size: 14px;
  font-weight: 700; cursor: pointer; transition: all .14s;
}
.btn:active { transform: scale(.97); }
.btn-tam { width: 100%; }
.btn-yesil { background: var(--green); color: #fff; }
.btn-yesil:hover { background: var(--green-d); }
.btn-mavi { background: var(--blue); color: #fff; }
.btn-kirmizi { background: var(--red); color: #fff; }
.btn-koyu { background: #0F1117 !important; color: #fff !important; }
.btn-cerceve { background: transparent; border: 1.5px solid var(--border); color: var(--text2); }
.btn-cerceve:hover { border-color: #999; }
.btn-ghost { background: var(--bg); color: var(--text2); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-pasif { background: var(--border) !important; color: var(--muted) !important; cursor: not-allowed !important; box-shadow: none !important; }
.btn-pasif:active { transform: none !important; }

.btn-ekle {
  width: 100%; padding: 14px;
  background: transparent; border: 1.5px dashed var(--border);
  border-radius: var(--r-sm); font-size: 14px; font-weight: 700;
  color: var(--muted); cursor: pointer; font-family: inherit;
  margin-bottom: 10px; transition: all .15s;
}
.btn-ekle:hover { border-color: var(--green); color: var(--green); background: var(--green-bg); }

/* ── ANA WRAP ── */
.app-wrap { max-width: 480px; margin: 0 auto; padding-bottom: 85px; }

/* ── ANA EKRAN ── */
.ev-ust { padding: 20px 16px 14px; }
.merhaba { font-size: 13px; color: var(--muted); font-weight: 600; }
.kullanici-adi { font-size: 25px; font-weight: 900; letter-spacing: -.5px; line-height: 1.2; }

/* ── ALARM BANDI ── */
.alarm-bandi {
  margin: 0 16px 14px;
  background: var(--red-bg); border: 1.5px solid #FFBCBA;
  border-radius: 14px; padding: 12px 14px;
  display: none; align-items: center; gap: 10px; cursor: pointer;
  transition: opacity .15s;
}
.alarm-bandi.goster { display: flex; }
.alarm-bandi:active { opacity: .8; }
.alarm-bandi-ikon { font-size: 20px; }
.alarm-bandi-metin { flex: 1; }
.alarm-bandi-baslik { font-size: 13px; font-weight: 800; color: var(--red); }
.alarm-bandi-alt { font-size: 11px; color: var(--muted); margin-top: 2px; }
.alarm-bandi-ok { font-size: 20px; color: var(--red); font-weight: 700; }

/* ── AKSİYON KARTLARI ── */
.aksiyon-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 0 16px; margin-bottom: 16px;
}
.ak {
  border-radius: 18px; padding: 18px 14px 16px;
  cursor: pointer; border: none; text-align: left;
  font-family: inherit; display: flex; flex-direction: column;
  gap: 8px; min-height: 122px; transition: transform .12s;
  position: relative; overflow: hidden;
}
.ak::after {
  content: ''; position: absolute; bottom: -18px; right: -18px;
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.ak:active { transform: scale(.96); }
.ak.yesil { background: linear-gradient(140deg,#00C17C,#009960); color:#fff; }
.ak.mavi { background: linear-gradient(140deg,#2563EB,#1D4ED8); color:#fff; }
.ak.kirmizi { background: linear-gradient(140deg,#E53935,#C62828); color:#fff; }
.ak.koyu { background: linear-gradient(140deg,#252B3B,#0F1117); color:#fff; }
.ak svg { width: 26px; height: 26px; stroke: rgba(255,255,255,.9); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ak-etiket { font-size: 14px; font-weight: 800; line-height: 1.2; }
.ak-alt { font-size: 11px; opacity: .7; font-weight: 600; }

/* ── BÖLÜM BAŞLIĞI ── */
.b-baslik { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; padding: 0 20px; margin-bottom: 10px; }

/* ── SON İŞLEMLER ── */
.islem-liste { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.islem-kart {
  background: #fff; border-radius: var(--r); box-shadow: var(--sh);
  overflow: hidden; cursor: pointer;
}
.islem-ust {
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.islem-rozet {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.islem-rozet.giris { background: var(--green-bg); }
.islem-rozet.cikis { background: var(--red-bg); }
.islem-rozet.uretim { background: var(--blue-bg); }
.islem-rozet.fire { background: var(--amber-bg); }
.islem-govde { flex: 1; min-width: 0; }
.islem-baslik { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.islem-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.islem-deger { font-size: 13px; font-weight: 800; flex-shrink: 0; }
.islem-deger.arti { color: var(--green); }
.islem-deger.eksi { color: var(--red); }
.islem-detay { border-top: 1px solid var(--border); padding: 10px 14px; background: #FAFBFC; display: none; }
.islem-detay.acik { display: block; }
.islem-detay-satir { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
.islem-detay-satir:last-child { border-bottom: none; }
.ids-ad { color: var(--text2); font-weight: 600; }
.ids-miktar { font-weight: 700; }
.ids-miktar.eksi { color: var(--red); }
.ids-miktar.arti { color: var(--green); }

/* ── WİZARD HEADER ── */
.wiz-header {
  background: #fff; padding: 13px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 54px; z-index: 90;
}
.geri-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg); border: none; font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--text2);
}
.wiz-baslik { font-size: 16px; font-weight: 800; flex: 1; }
.wiz-alt { font-size: 11px; color: var(--muted); font-weight: 600; }

.icerik { padding: 14px 16px; }

/* ── SEÇİM KARTLARI ── */
.secim-liste { display: flex; flex-direction: column; gap: 8px; }
.s-kart {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 13px 14px;
  cursor: pointer; transition: all .14s; box-shadow: var(--sh);
}
.s-kart:active { transform: scale(.98); }
.s-kart.secili { border-color: var(--green); background: var(--green-bg); }
.s-kart-ust { display: flex; justify-content: space-between; align-items: center; }
.s-kart-ad { font-size: 14px; font-weight: 800; }
.s-kart-alt { font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 600; }

/* ── ROZET ── */
.rozet { padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; display: inline-block; }
.rozet.kritik { background: var(--red-bg); color: var(--red); }
.rozet.uyari { background: var(--amber-bg); color: var(--amber); }
.rozet.normal { background: var(--green-bg); color: var(--green-d); }
.rozet.mavi { background: var(--blue-bg); color: var(--blue); }
.rozet.mor { background: var(--purple-bg); color: var(--purple); }

/* ── NUMPAD ── */
.np-ekran {
  font-size: 34px; font-weight: 900; text-align: center;
  padding: 14px; background: #fff; border-radius: var(--r);
  margin-bottom: 10px; border: 1.5px solid var(--border);
  min-height: 68px; display: flex; align-items: center; justify-content: center;
  transition: border .15s;
}
.np-ekran.dolu { border-color: var(--green); color: var(--green); }
.numpad {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 8px; background: #fff; border-radius: var(--r);
  padding: 12px; margin-bottom: 10px;
}
.np-tus {
  padding: 14px; border-radius: var(--r-sm);
  background: var(--bg); border: none;
  font-size: 20px; font-weight: 800; cursor: pointer;
  font-family: inherit; transition: background .1s; color: var(--text);
}
.np-tus:active { background: var(--border); }
.big-girdi {
  width: 100%; padding: 14px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font-size: 18px; font-weight: 800; font-family: inherit;
  outline: none; transition: border .15s; background: #fff;
}
.big-girdi:focus { border-color: var(--green); }
.big-etiket { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; display: block; }

/* ── WAC KUTUSU ── */
.wac-kutu {
  background: linear-gradient(135deg, var(--green-bg), #F0FDF8);
  border: 1.5px solid #B3E8D4; border-radius: var(--r);
  padding: 14px 16px; margin: 10px 0; display: none;
}
.wac-kutu.goster { display: block; }
.wac-baslik { font-size: 10px; font-weight: 800; color: var(--green-d); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.wac-satir { display: flex; justify-content: space-between; margin-bottom: 4px; }
.wac-etiket { font-size: 12px; color: var(--muted); font-weight: 600; }
.wac-deger { font-size: 13px; font-weight: 800; }
.wac-yeni { font-size: 24px; font-weight: 900; color: var(--green); text-align: center; margin-top: 10px; }
.wac-yeni-etiket { font-size: 11px; color: var(--green-d); font-weight: 700; text-align: center; margin-top: 3px; }

/* ── SEPET ── */
.sepet-bos { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 14px; }
.sepet-bos-ikon { font-size: 36px; margin-bottom: 8px; }
.sepet-kalem {
  background: #fff; border-radius: var(--r-sm);
  padding: 12px 14px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--sh);
}
.sepet-bilgi { flex: 1; min-width: 0; }
.sepet-ad { font-size: 13px; font-weight: 800; }
.sepet-detay { font-size: 11px; color: var(--muted); margin-top: 2px; }
.adet-ctrl { display: flex; align-items: center; gap: 6px; }
.adet-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--bg); border: 1.5px solid var(--border);
  font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.adet-girdi {
  width: 48px; text-align: center;
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 4px; font-size: 14px; font-weight: 800;
  font-family: inherit; outline: none;
}
.adet-girdi:focus { border-color: var(--green); }
.sil-btn { background: none; border: none; font-size: 17px; cursor: pointer; color: var(--muted); padding: 4px; flex-shrink: 0; }
.sepet-toplam {
  background: var(--green-bg); border: 1.5px solid #B3E8D4;
  border-radius: var(--r-sm); padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.sepet-toplam-etiket { font-size: 12px; color: var(--green-d); font-weight: 700; }
.sepet-toplam-deger { font-size: 20px; font-weight: 900; color: var(--green); }

/* ── STOK LİSTESİ ── */
.arama-girdi {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font-size: 15px; font-family: inherit; outline: none;
  margin-bottom: 12px; background: #fff; transition: border .15s;
}
.arama-girdi:focus { border-color: var(--green); }
.stok-kalem {
  background: #fff; border-radius: var(--r);
  padding: 14px 16px; margin-bottom: 8px; box-shadow: var(--sh);
}
.stok-ust { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.stok-sol { flex: 1; }
.stok-ad { font-size: 14px; font-weight: 800; }
.stok-kod { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stok-miktar { font-size: 16px; font-weight: 900; }
.stok-bar-wrap { background: var(--bg); border-radius: 99px; height: 5px; overflow: hidden; margin-bottom: 7px; }
.stok-bar { height: 100%; border-radius: 99px; transition: width .3s; }
.stok-alt { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 600; flex-wrap: wrap; gap: 4px; }

/* ── ÖZET KART ── */
.ozet-kart { background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); margin-bottom: 10px; }
.ozet-baslik { padding: 13px 16px; font-size: 14px; font-weight: 800; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.ozet-satir { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; border-bottom: 1px solid #F2F4F8; }
.ozet-satir:last-child { border-bottom: none; }
.ozet-etiket { font-size: 12px; color: var(--muted); font-weight: 600; }
.ozet-deger { font-size: 13px; font-weight: 800; }

/* ── ÜRÜN KARTI ── */
.urun-kalem { background: #fff; border-radius: var(--r); margin-bottom: 10px; box-shadow: var(--sh); overflow: hidden; }
.urun-ust { padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.urun-ust:active { background: var(--bg); }
.urun-bilgi { flex: 1; min-width: 0; }
.urun-ad { font-size: 14px; font-weight: 800; }
.urun-alt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.urun-butonlar { display: flex; gap: 6px; flex-shrink: 0; }
.urun-recete { border-top: 1px solid var(--border); background: #FAFBFC; display: none; padding: 12px 16px; }
.urun-recete.acik { display: block; }
.urun-recete-baslik { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 8px; }
.urun-recete-satir { display: flex; justify-content: space-between; padding: 5px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
.urun-recete-satir:last-child { border-bottom: none; }
.urs-ad { color: var(--text2); font-weight: 600; }
.urs-miktar { font-weight: 700; color: var(--muted); }

/* ── BİLDİRİM ── */
.bildirim-filtre { display: flex; gap: 8px; margin-bottom: 12px; }
.bildirim-filtre-btn {
  padding: 7px 14px; border-radius: 99px;
  border: 1.5px solid var(--border); background: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.bildirim-filtre-btn.aktif { background: #0F1117 !important; color: #fff !important; border-color: var(--text); }
.bildirim-kart {
  background: #fff; border-radius: var(--r);
  border-left: 4px solid; padding: 13px 15px;
  margin-bottom: 9px; box-shadow: var(--sh);
}
.bildirim-kart.kritik { border-left-color: var(--red); }
.bildirim-kart.uyari { border-left-color: var(--amber); }
.bildirim-kart.bilgi { border-left-color: var(--blue); }
.bildirim-kart.basari { border-left-color: var(--green); }
.bildirim-kart.okunmus { opacity: .55; }
.bildirim-ust { display: flex; justify-content: space-between; margin-bottom: 5px; }
.bildirim-baslik { font-size: 13px; font-weight: 800; flex: 1; }
.bildirim-mesaj { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.bildirim-tarih { font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.okundu-btn { padding: 7px 12px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.okundu-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── RAPOR ── */
.rapor-tablar { display: flex; gap: 8px; padding: 0 16px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.rapor-tablar::-webkit-scrollbar { display: none; }
.rapor-tab { padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--border); background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: inherit; }
.rapor-tab.aktif { background: #0F1117 !important; color: #fff !important; border-color: var(--text); }
.rapor-kart { background: #fff; border-radius: var(--r); padding: 15px; margin-bottom: 10px; box-shadow: var(--sh); }
.rapor-kart-baslik { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px; }
.rapor-satir { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #F2F4F8; font-size: 13px; }
.rapor-satir:last-child { border-bottom: none; }
.rapor-etiket { color: var(--muted); font-weight: 600; }
.rapor-deger { font-weight: 800; }

/* ── BAŞARI EKRANI ── */
.basari-ekrani { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 24px; text-align: center; min-height: 60vh; }
.basari-daire { width: 88px; height: 88px; border-radius: 50%; background: var(--green-bg); display: flex; align-items: center; justify-content: center; font-size: 44px; margin-bottom: 20px; animation: popIn .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
.basari-baslik { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.basari-alt { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 24px; }
.basari-detay { background: #fff; border-radius: var(--r); padding: 14px 18px; width: 100%; max-width: 340px; margin-bottom: 20px; box-shadow: var(--sh-md); }
.basari-satir { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid #F2F4F8; }
.basari-satir:last-child { border-bottom: none; }
.basari-etiket { color: var(--muted); font-weight: 600; }
.basari-deger { font-weight: 800; }

/* ── ALT MENÜ ── */
.alt-menu {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--border);
  display: none; z-index: 99;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 16px rgba(0,0,0,.07);
}
.alt-menu.goster { display: block; }
.alt-menu-ic { max-width: 480px; margin: 0 auto; display: flex; }
.am-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 4px 12px; border: none; background: transparent;
  cursor: pointer; gap: 3px; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.am-btn:active { background: var(--bg); }
.am-btn.aktif::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 2.5px; background: var(--green); border-radius: 99px; }
.am-btn svg { width: 21px; height: 21px; stroke: var(--muted); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke .12s; }
.am-btn.aktif svg { stroke: var(--green); }
.am-etiket { font-size: 10px; color: var(--muted); font-weight: 600; transition: color .12s; }
.am-btn.aktif .am-etiket { color: var(--green); font-weight: 800; }
.am-notif { position: absolute; top: 7px; right: calc(50% - 15px); width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 1.5px solid #fff; display: none; }
.am-notif.goster { display: block; }

/* ── ALT BAR (İŞLEM) ── */
.alt-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 12px 16px 24px; background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  z-index: 100; display: none;
}
.alt-bar.goster { display: block; }
.alt-bar-ic { max-width: 480px; margin: 0 auto; }
.ana-btn {
  width: 100%; padding: 16px; border-radius: var(--r);
  border: none; font-family: inherit; font-size: 16px;
  font-weight: 900; cursor: pointer; transition: all .14s;
}
.ana-btn:active { transform: scale(.97); }
.ana-btn.yesil { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(0,193,124,.3); }
.ana-btn.pasif { background: var(--border); color: var(--muted); cursor: not-allowed; box-shadow: none; }
.ana-btn.pasif:active { transform: none; }

/* ── MODAL ── */
.modal-arka { position: fixed; inset: 0; background: rgba(0,0,0,.48); z-index: 200; display: none; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); }
.modal-arka.acik { display: flex; }
.modal { background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; animation: modalyukari .22s ease; }
@keyframes modalyukari { from { transform: translateY(100%); } to { transform: none; } }
.modal-baslik { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; z-index: 10; }
.modal-baslik-metin { font-size: 16px; font-weight: 900; }
.modal-kapat { width: 30px; height: 30px; border-radius: 8px; background: var(--bg); border: none; font-size: 17px; cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.modal-icerik { padding: 16px 20px 36px; }

/* ── YÜKLEME ── */
.yukleniyor { display: flex; align-items: center; justify-content: center; padding: 40px; flex-direction: column; gap: 12px; }
.spinner { width: 28px; height: 28px; border: 2.5px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: don .75s linear infinite; }
@keyframes don { to { transform: rotate(360deg); } }
.yukleniyor-metin { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ── BOŞ DURUM ── */
.bos { text-align: center; padding: 48px 24px; }
.bos-ikon { font-size: 40px; margin-bottom: 12px; }
.bos-baslik { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.bos-alt { font-size: 13px; color: var(--muted); }

/* ── UYARI KUTUSU ── */
.uyari-kutu { border-radius: var(--r-sm); padding: 11px 14px; font-size: 13px; font-weight: 600; display: flex; gap: 8px; margin: 10px 0; }
.uyari-kutu.bilgi { background: var(--blue-bg); border: 1.5px solid #BFD3FF; color: #1A4FC9; }
.uyari-kutu.tehlike { background: var(--red-bg); border: 1.5px solid #FFBCBA; color: var(--red); }
.uyari-kutu.basari { background: var(--green-bg); border: 1.5px solid #B3E8D4; color: var(--green-d); }
.uyari-kutu.uyari { background: var(--amber-bg); border: 1.5px solid #FFD9A0; color: #92650A; }

/* ── TOAST ── */
.toast-wrap { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: 90%; max-width: 400px; }
.toast { padding: 12px 18px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 10px; box-shadow: var(--sh-lg); animation: toastgir .22s ease; pointer-events: all; }
.toast.basari { background: var(--green); color: #fff; }
.toast.hata { background: var(--red); color: #fff; }
.toast.uyari { background: var(--amber); color: #fff; }
.toast.bilgi { background: #0F1117 !important; color: #fff !important; }
@keyframes toastgir { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.kategori-icerik { display: block; }
.kategori-icerik.kapali { display: none; }

/* ── AYARLAR PANELİ ── */
.ayarlar-arka {
  position: fixed; inset: 0; background: rgba(0,0,0,.48);
  z-index: 200; display: none; backdrop-filter: blur(3px);
}
.ayarlar-arka.acik { display: block; }
.ayarlar-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px; background: var(--white);
  z-index: 201; transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
}
.ayarlar-panel.acik { transform: translateX(0); }
.ayarlar-baslik {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center;
  background: #0F1117 !important; color: #fff !important;
}
.ayarlar-baslik-metin {
  font-size: 15px; font-weight: 800; color: #fff !important;
  display: flex; align-items: center; gap: 8px;
}
.ayarlar-baslik .modal-kapat { background: rgba(255,255,255,.15) !important; color: #fff !important; }
.ayarlar-icerik { flex: 1; overflow-y: auto; padding: 16px; }
.ayarlar-bolum { margin-bottom: 20px; }
.ayarlar-bolum-baslik {
  font-size: 10px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
}
.ayarlar-satir {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; background: var(--bg);
  border-radius: var(--r-sm); margin-bottom: 6px;
}
.ayarlar-etiket { font-size: 13px; color: var(--muted); font-weight: 600; }
.ayarlar-deger { font-size: 13px; font-weight: 800; }

/* Tema seçim */
.tema-secim { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tema-btn {
  border: 2px solid var(--border); border-radius: var(--r);
  padding: 10px; cursor: pointer; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; font-family: inherit;
  color: var(--text2); transition: all .15s;
}
.tema-btn.aktif { border-color: var(--green); background: var(--green-bg); color: var(--green-d); }
.tema-btn:active { transform: scale(.97); }
.tema-onizleme {
  width: 100%; height: 52px; border-radius: 6px;
  overflow: hidden; border: 1px solid var(--border);
}
.aydinlik-onizleme { background: #F2F4F8; }
.karanlik-onizleme { background: #1A1D27; }
.to-header { height: 14px; margin-bottom: 4px; }
.aydinlik-onizleme .to-header { background: #0F1117; }
.karanlik-onizleme .to-header { background: #0A0C14; }
.to-icerik { padding: 0 4px; display: flex; gap: 4px; }
.to-kart { flex: 1; height: 24px; border-radius: 3px; }
.aydinlik-onizleme .to-kart { background: #fff; }
.karanlik-onizleme .to-kart { background: #252836; }

/* ── KARANLIK MOD ── */
body.karanlik {
  --bg: #1A1D27;
  --white: #252836;
  --text: #F0F2F8;
  --text2: #B8BFCC;
  --muted: #6B7280;
  --border: #2E3347;
  --green-bg: #0D2B1F;
  --blue-bg: #0D1B3E;
  --red-bg: #2B0D0D;
  --amber-bg: #2B2000;
  --purple-bg: #1A0D3B;
}
/* Giriş ve PIN ekranları her zaman koyu, değişmesin */
body.karanlik #sayfa-giris,
body.karanlik #sayfa-pin {
  background: var(--text) !important;
}
body.karanlik #sayfa-giris .giris-kart {
  background: #fff !important;
  color: #0F1117 !important;
}
body.karanlik #sayfa-giris .form-girdi {
  background: #fff !important;
  color: #0F1117 !important;
  border-color: #E2E6F0 !important;
}
body.karanlik #sayfa-giris .giris-baslik { color: #0F1117 !important; }
body.karanlik #sayfa-giris .form-etiket { color: #8A94A6 !important; }
body.karanlik #sayfa-pin .pin-tus { background: rgba(255,255,255,.07); color: #fff; }

/* Uygulama alanı */
body.karanlik .header { background: #0F1117; }
body.karanlik .app-wrap { background: var(--bg); }
body.karanlik .ozet-kart,
body.karanlik .stok-kalem,
body.karanlik .urun-kalem,
body.karanlik .islem-kart,
body.karanlik .rapor-kart,
body.karanlik .bildirim-kart,
body.karanlik .s-kart,
body.karanlik .sepet-kalem,
body.karanlik .modal,
body.karanlik .wiz-header,
body.karanlik .alt-menu,
body.karanlik .alt-bar,
body.karanlik .numpad,
body.karanlik .np-ekran,
body.karanlik .form-girdi,
body.karanlik .form-secim,
body.karanlik .form-alan,
body.karanlik .arama-girdi,
body.karanlik .big-girdi,
body.karanlik .ayarlar-panel { 
  background: var(--white); 
  color: var(--text);
  border-color: var(--border);
}
body.karanlik .am-btn { background: transparent; }
body.karanlik .am-btn:active { background: var(--bg); }
body.karanlik .rapor-tab,
body.karanlik .bildirim-filtre-btn { background: var(--white); border-color: var(--border); color: var(--text2); }
body.karanlik .rapor-tab.aktif,
body.karanlik .bildirim-filtre-btn.aktif { background: var(--text); color: var(--white); }
body.karanlik .btn-ghost { background: var(--bg); color: var(--text2); }
body.karanlik .btn-cerceve { background: transparent; border-color: var(--border); color: var(--text2); }
body.karanlik .islem-detay { background: #1E2235; }
body.karanlik .urun-recete { background: #1E2235; }
body.karanlik .wac-kutu { background: var(--green-bg); }
body.karanlik .np-tus { background: var(--bg); color: var(--text); }
body.karanlik .modal-baslik { background: var(--white); border-color: var(--border); }
body.karanlik .modal-baslik-metin { color: var(--text); }
body.karanlik .modal-kapat { background: var(--bg); color: var(--text2); }
body.karanlik .modal-icerik { background: var(--white); color: var(--text); }
body.karanlik .form-etiket { color: var(--text2) !important; }
body.karanlik .uyari-kutu.bilgi { background: #0D1B3E; border-color: #1A3A7A; color: #7EB3FF; }
body.karanlik .uyari-kutu.uyari { background: #2B2000; border-color: #5C4400; color: #FFD166; }
body.karanlik .sepet-toplam { background: var(--green-bg); border-color: #1A5C3A; }
body.karanlik .wiz-alt { color: var(--muted); }
body.karanlik .ayarlar-satir { background: var(--bg); }
body.karanlik .tema-btn { background: var(--bg); border-color: var(--border); color: var(--text2); }

/* ── iOS TOGGLE ── */
.toggle-wrap { cursor: pointer; padding: 4px; }
.toggle-track {
  width: 51px; height: 31px; border-radius: 99px;
  background: #ccc; position: relative;
  transition: background .25s; flex-shrink: 0;
}
.toggle-track.acik { background: var(--green); }
.toggle-thumb {
  width: 27px; height: 27px; border-radius: 50%;
  background: #fff; position: absolute;
  top: 2px; left: 2px;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.toggle-track.acik .toggle-thumb { transform: translateX(20px); }

/* ── AYARLAR BAŞLIK DÜZELTME ── */
.ayarlar-baslik { background: var(--text) !important; }
.ayarlar-baslik .modal-kapat { background: rgba(255,255,255,.15) !important; color: #fff !important; }

/* ── PIN KARANLIK MOD MUAF ── */
body.karanlik #sayfa-pin { background: #0F1117 !important; }
body.karanlik #sayfa-pin * { 
  color: inherit;
}
body.karanlik #sayfa-pin .pin-wrap { background: transparent; }
body.karanlik #sayfa-pin .pin-tus { 
  background: rgba(255,255,255,.07) !important; 
  color: #fff !important;
  border: none;
}
body.karanlik #sayfa-pin .pin-nokta { background: rgba(255,255,255,.2); }
body.karanlik #sayfa-pin .pin-nokta.dolu { background: var(--green); }
body.karanlik #sayfa-pin .pin-baslik { color: #fff !important; }
body.karanlik #sayfa-pin .pin-alt { color: rgba(255,255,255,.45) !important; }
body.karanlik #sayfa-pin .pin-hata { color: var(--red) !important; }
body.karanlik #sayfa-pin .pin-link { color: rgba(255,255,255,.35) !important; }

/* ── GİRİŞ KARANLIK MOD MUAF ── */  
body.karanlik #sayfa-giris { background: #0F1117 !important; }
body.karanlik #sayfa-giris .giris-kart { background: #fff !important; }
body.karanlik #sayfa-giris .giris-kart * { color: #0F1117; }
body.karanlik #sayfa-giris .form-girdi { 
  background: #fff !important; 
  color: #0F1117 !important;
  border-color: #E2E6F0 !important;
}
body.karanlik #sayfa-giris .btn-yesil { color: #fff !important; }
.ayrac { height: 1px; background: var(--border); margin: 14px 0; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── GÜVENLİ ALAN ── */
@supports(padding: env(safe-area-inset-bottom)) {
  .alt-bar { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
