/* Programin gorunumu. Renkler ve yazi boyutlari burada ayarlanir. */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 15px;
  color: #1f2430;
  background: #f2f4f7;
}

/* --- Program kapandi uyarisi --- */
.baglanti-uyarisi {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #8d241a;
  color: #fff;
  border-bottom: 4px solid #5e1710;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.baglanti-ic {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 20px;
  line-height: 1.6;
}
.baglanti-baslik { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.baglanti-yapilacak {
  margin-top: 10px;
  background: rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 10px 14px;
}
.baglanti-not { margin-top: 10px; font-size: 14px; color: #f4d5d1; }
/* Uyari acikken sayfa icerigi uyarinin altinda kalmasin.
   Bosluk miktarini JavaScript olcup ayarliyor. */

/* --- Ust bant --- */
.ust-bant {
  background: #1f3a5f;
  color: #fff;
  padding: 10px 20px 8px;
}
.ust-satir {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.baslik { font-size: 20px; font-weight: 700; }
.menu { display: flex; gap: 8px; flex-wrap: wrap; }

/* Defter secici: her an gorunur, secili defterin renginde */
.defter-secici-kutu { display: flex; align-items: center; gap: 8px; }
.defter-secici-kutu label { font-weight: 600; color: #d7e2f0; }
#defter-secici {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 8px;
  padding: 7px 12px;
  min-width: 200px;
  cursor: pointer;
}
#defter-secici option { background: #fff; color: #1f2430; font-weight: 500; }

.kullanici-alani { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kullanici-adi { font-weight: 600; margin-right: 4px; }
.ust-dugme {
  font-family: inherit;
  font-size: 13px;
  background: transparent;
  color: #fff;
  border: 1px solid #8fa7c6;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.ust-dugme:hover { background: #2c4d79; }

/* Secili defterin renginde serit */
:root { --defter-renk: #1f5fa8; }
.defter-seridi {
  background: var(--defter-renk);
  color: #fff;
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.defter-seridi .bugun { color: #fff; opacity: .9; font-weight: 500; }
.menu-dugme {
  background: transparent;
  color: #d7e2f0;
  border: 1px solid transparent;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}
.menu-dugme:hover { background: #2c4d79; color: #fff; }
.menu-dugme.secili { background: #fff; color: #1f3a5f; font-weight: 600; }
.bugun { margin-left: auto; color: #cfdcec; font-size: 14px; }

main { padding: 20px; max-width: 1400px; margin: 0 auto; }
.sayfa.gizli, .gizli { display: none !important; }

h2 { font-size: 19px; margin: 24px 0 12px; }
h2:first-child { margin-top: 0; }
h3 { font-size: 16px; margin: 0 0 10px; }
h4 { font-size: 15px; margin: 18px 0 8px; }

/* --- Bildirim serisi --- */
.bildirim {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 60;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.bildirim.basarili { background: #1d7a44; color: #fff; }
.bildirim.hatali   { background: #b3261e; color: #fff; }

/* --- Uyari kutulari --- */
.uyari-kutu {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-left: 8px solid #ccc;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.uyari-kutu.kirmizi { border-left-color: #c0392b; }
.uyari-kutu.turuncu { border-left-color: #e07b16; }
.uyari-kutu.sari    { border-left-color: #d9b018; }

.rozet {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  background: #e6e9ef;
  color: #2b3446;
  border-radius: 12px;
  padding: 1px 9px;
  font-size: 13px;
  margin-left: 6px;
}
.kirmizi .rozet { background: #c0392b; color: #fff; }
.turuncu .rozet { background: #e07b16; color: #fff; }
.sari .rozet    { background: #d9b018; color: #40340a; }

.uyari-satir {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid #eef0f4;
}
.uyari-satir:first-child { border-top: none; }
.uyari-kim { font-weight: 600; min-width: 190px; }
.uyari-tutar { font-weight: 700; min-width: 130px; text-align: right; }
.uyari-aciklama { color: #5a6376; flex: 1; min-width: 160px; }
.uyari-gun { font-size: 13px; padding: 2px 8px; border-radius: 10px; background: #eef0f4; }
.uyari-gun.gec { background: #fbe3e0; color: #8d241a; font-weight: 600; }
.uyari-yon { font-size: 13px; color: #5a6376; }

.bos-mesaj { color: #1d7a44; font-weight: 600; padding: 4px 0; }
.bos-mesaj.notr { color: #5a6376; font-weight: 500; }

/* --- Tekrarlayan kayit bildirimi --- */
.tekrar-bildirimi {
  background: #eaf3ff;
  border-left: 8px solid #3d6ea8;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.tekrar-baslik {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tekrar-baslik button { margin-left: auto; }
.tekrar-satir {
  padding: 6px 0;
  border-top: 1px solid #d3e2f5;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.tekrar-satir .kalem-adi { font-weight: 600; min-width: 170px; }
.tekrar-satir .kalem-tutar { font-weight: 700; min-width: 120px; text-align: right; }

.genis-ipucu { max-width: 860px; line-height: 1.6; margin-top: -4px; }

/* Durdurulmus tekrarlayan kalemler soluk gorunur */
tr.pasif-satir { opacity: .55; background: #f7f8fa; }
tr.pasif-satir td { font-style: italic; }
.etiket.aktif { background: #e2f3e9; color: #146637; }
.etiket.durduruldu { background: #e6e9ef; color: #3a4257; }

/* --- Ozet kartlari --- */
.kart-satiri { display: flex; gap: 14px; flex-wrap: wrap; }
.kart {
  flex: 1;
  min-width: 220px;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  border-top: 5px solid #ccc;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.kart.yesil { border-top-color: #1d7a44; }
.kart.kirmizi-kart { border-top-color: #c0392b; }
.kart.mavi { border-top-color: #1f3a5f; }
.kart-etiket { color: #5a6376; font-size: 14px; margin-bottom: 6px; }
.kart-deger { font-size: 25px; font-weight: 700; }
.kart-deger.eksi { color: #c0392b; }
.kart-deger.arti { color: #1d7a44; }

/* --- Filtreler --- */
.filtre-kutu {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.filtre-alan { display: flex; flex-direction: column; gap: 4px; }
.filtre-alan.genis { flex: 1; min-width: 220px; }
.filtre-alan.dugmeler { flex-direction: row; gap: 8px; }
.filtre-alan label { font-size: 13px; color: #5a6376; }

/* --- Form ogeleri --- */
input[type="text"], input[type="date"], input[type="password"], input[type="number"],
select, textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 9px 10px;
  border: 1px solid #c3cad6;
  border-radius: 6px;
  background: #fff;
  color: #1f2430;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #3d6ea8;
  border-color: #3d6ea8;
}
textarea { resize: vertical; }

.form {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  max-width: 860px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.form-satir { display: flex; gap: 16px; flex-wrap: wrap; }
.form-alan { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 240px; margin-bottom: 14px; }
.form-alan label { font-weight: 600; font-size: 14px; }
.zorunlu { color: #c0392b; }
.ipucu { font-size: 13px; color: #5a6376; }
.form-dugmeler { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* --- Dugmeler --- */
.dugme {
  font-family: inherit;
  font-size: 15px;
  padding: 9px 16px;
  border: 1px solid #c3cad6;
  background: #fff;
  color: #1f2430;
  border-radius: 6px;
  cursor: pointer;
}
.dugme:hover { background: #eef1f6; }
.dugme.birincil { background: #1f3a5f; border-color: #1f3a5f; color: #fff; }
.dugme.birincil:hover { background: #2c4d79; }
.dugme.buyuk { padding: 12px 26px; font-size: 16px; }
.dugme.kucuk { padding: 5px 10px; font-size: 13px; }
.dugme.tehlike { border-color: #c0392b; color: #c0392b; }
.dugme.tehlike:hover { background: #fbe3e0; }
/* Excel'e Aktar: Excel'in yesili */
.dugme.excel { border-color: #1d7a44; color: #146637; font-weight: 600; }
.dugme.excel:hover { background: #e2f3e9; }
.dugme[disabled] { opacity: .55; cursor: default; }
.dugme[disabled]:hover { background: #fff; }

/* --- Tablo --- */
.tablo-sarmal {
  background: #fff;
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
table.liste { width: 100%; border-collapse: collapse; font-size: 14px; }
table.liste th, table.liste td {
  padding: 9px 10px;
  border-bottom: 1px solid #eef0f4;
  text-align: left;
  vertical-align: top;
}
table.liste th { background: #eef1f6; font-size: 13px; color: #40485c; white-space: nowrap; }
table.liste td.sag, table.liste th.sag { text-align: right; white-space: nowrap; }
table.liste tr.gecikmis-satir { background: #fdf1ef; }
table.liste td.bos { text-align: center; padding: 26px; color: #5a6376; }
/* Tarih sutunlari ve islem sutunu alt alta bolunmesin */
table.liste td:nth-child(-n+3) { white-space: nowrap; }
table.liste th:last-child, table.liste td:last-child { white-space: nowrap; width: 1px; }

.etiket { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.etiket.giren { background: #e2f3e9; color: #146637; }
.etiket.cikan { background: #fbe3e0; color: #8d241a; }
.etiket.bekliyor { background: #e6e9ef; color: #3a4257; }
.etiket.kismi { background: #fdf0d2; color: #6b520a; }
.etiket.tamamlandi { background: #e2f3e9; color: #146637; }
.etiket.gecikti { background: #c0392b; color: #fff; }
.etiket.gecikmis-ek { background: #c0392b; color: #fff; margin-left: 4px; }

.islem-dugmeleri { display: flex; gap: 5px; flex-wrap: nowrap; }

.toplam-kutu {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 12px;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.toplam-oge { display: flex; flex-direction: column; }
.toplam-oge .etiket-yazi { font-size: 13px; color: #5a6376; }
.toplam-oge .deger { font-size: 18px; font-weight: 700; }

/* --- Raporlar ekrani --- */
.dugme.word { border-color: #1f3a5f; color: #1f3a5f; font-weight: 600; }
.dugme.word:hover { background: #eaf1fa; }

.rapor-bolum { margin-bottom: 18px; }
.rapor-bolum h3 { margin-bottom: 8px; }
.rapor-sutunlar { display: flex; gap: 14px; flex-wrap: wrap; }
.rapor-sutunlar > div { flex: 1; min-width: 340px; }

table.rapor-tablo {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  font-size: 14px;
}
table.rapor-tablo th {
  background: #1f3a5f;
  color: #fff;
  padding: 9px 10px;
  text-align: left;
  font-size: 13px;
}
table.rapor-tablo td { padding: 8px 10px; border-bottom: 1px solid #eef0f4; }
table.rapor-tablo td.sag, table.rapor-tablo th.sag { text-align: right; }
table.rapor-tablo tr.giren-satir td { background: #f2faf5; }
table.rapor-tablo tr.cikan-satir td { background: #fdf5f4; }
table.rapor-tablo tr.toplam-satir td {
  font-weight: 700;
  border-top: 2px solid #1f3a5f;
  background: #fff;
}
.pay-cubugu {
  display: inline-block;
  height: 8px;
  border-radius: 4px;
  background: #3d6ea8;
  vertical-align: middle;
  margin-right: 6px;
}
.rapor-bos {
  background: #fff;
  border-radius: 10px;
  padding: 26px;
  text-align: center;
  color: #5a6376;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* --- Ayarlar ekrani --- */
.ayar-kutu {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.ayar-kutu h4 { margin-top: 0; }
.satir-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.satir-form .form-alan { margin-bottom: 0; }
.satir-form .form-alan.genis { flex: 1; min-width: 240px; }

.kat-sutunlar { display: flex; gap: 14px; flex-wrap: wrap; }
.kat-sutunlar .ayar-kutu { flex: 1; min-width: 320px; }

.kat-satir {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #eef0f4;
}
.kat-satir:first-of-type { border-top: none; }
.kat-satir .kat-adi { flex: 1; }
.kat-satir .kat-sayi { font-size: 13px; color: #5a6376; white-space: nowrap; }
.kat-satir input[type="text"] { flex: 1; }

.bilgi-tablo { width: 100%; border-collapse: collapse; font-size: 14px; }
.bilgi-tablo td { padding: 7px 8px; border-bottom: 1px solid #eef0f4; }
.bilgi-tablo td:first-child { color: #5a6376; width: 230px; }
.bilgi-tablo td.yol {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  word-break: break-all;
}

.geridon-ozet {
  background: #eef1f6;
  border-radius: 8px;
  padding: 14px 16px;
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: 15px;
}
.geridon-ozet .vurgu { font-weight: 700; }
.geridon-uyari {
  background: #fbe3e0;
  border: 1px solid #e8b4ad;
  color: #8d241a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-weight: 600;
}
.geridon-uyari.iyi {
  background: #e2f3e9;
  border-color: #b7dfc7;
  color: #146637;
  font-weight: 500;
}

/* --- Hata kutusu --- */
.hata-kutu {
  background: #fbe3e0;
  border: 1px solid #e8b4ad;
  color: #8d241a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
  max-width: 860px;
}
.hata-kutu ul { margin: 6px 0 0; padding-left: 20px; }

/* --- Odeme penceresi --- */
.perde {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 38, .55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 50;
}
.pencere {
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.odeme-ozet {
  background: #eef1f6;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  line-height: 1.7;
}
.odeme-ozet .vurgu { font-weight: 700; }

table.odeme-tablo { width: 100%; border-collapse: collapse; font-size: 14px; }
table.odeme-tablo th, table.odeme-tablo td {
  padding: 7px 8px;
  border-bottom: 1px solid #eef0f4;
  text-align: left;
}
table.odeme-tablo td.sag, table.odeme-tablo th.sag { text-align: right; white-space: nowrap; }

/* ================================================================
   Kullanici girisi, yetkiler, defterler, aktarimlar
   ================================================================ */

/* Defter sutunu sadece "Tum defterler" seciliyken gorunur */
.defter-sutunu { display: none; }
body.tum-defterler .defter-sutunu { display: table-cell; }

/* Asistan patron bolumlerini hic gormez */
body.asistan .sadece-patron { display: none !important; }

.defter-etiketi {
  display: inline-block;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
  white-space: nowrap;
  vertical-align: middle;
}

/* Yeni kayit: sekmeler */
.sekmeler { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.sekme {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 18px;
  border: 1px solid #c3cad6;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.sekme.secili { background: #1f3a5f; border-color: #1f3a5f; color: #fff; font-weight: 600; }

/* Formdaki defter secimi: renkli cerceve, karismasin */
.defter-alani {
  border: 3px solid #c3cad6;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafbfd;
}
.defter-alani select { font-weight: 700; }
.defter-uyari { font-size: 14px; }

.aktarim-ok {
  flex: 0 0 auto;
  min-width: 0;
  font-size: 28px;
  align-self: center;
  color: #5a6376;
}
.aktarim-onizleme {
  background: #eef1f6;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.8;
  min-height: 20px;
}
.uyari-yazi { color: #8d241a; font-weight: 600; }

.etiket.aktarim { background: #e8e0f5; color: #4b2a7a; }
table.liste tr.aktarim-satir { background: #f7f4fc; }
.kim-sutunu { font-size: 13px; min-width: 110px; }
table.liste td.aciklama-sutunu { min-width: 170px; }
.toplam-not {
  flex-basis: 100%;
  font-size: 13px;
  color: #4b2a7a;
  background: #f7f4fc;
  border-radius: 6px;
  padding: 8px 10px;
}

.aktarim-ozet-kutu {
  background: #fff;
  border-left: 8px solid #7d5ab5;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  line-height: 1.8;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.aktarim-net { font-size: 16px; margin-top: 4px; }

.rapor-defter {
  display: inline-block;
  background: var(--defter-renk);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  padding: 5px 12px;
  margin-bottom: 8px;
}
.iyi-yazi { color: #1d7a44 !important; font-weight: 600; }
/* Raporda hangi filtrelerle alindigi */
.rapor-filtre {
  margin-top: 6px; font-size: 14px; color: #5a6376;
  overflow-wrap: anywhere;
}
.rapor-filtre.etkin {
  display: inline-block; max-width: 100%;
  background: #fff4e0; color: #8a4b08; font-weight: 600;
  border: 1px solid #f3c98b; border-radius: 8px; padding: 4px 10px;
}

/* Ayarlar: defterler */
.defter-satir {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #eef0f4;
  flex-wrap: wrap;
}
.defter-satir:first-child { border-top: none; }
.defter-satir.arsivli { opacity: .7; }
.defter-satir .defter-adi { font-weight: 700; min-width: 160px; }
.defter-satir .islem-dugmeleri { margin-left: auto; flex-wrap: wrap; }
.defter-satir input[type="text"] { flex: 1; min-width: 180px; }
.renk-kare { width: 22px; height: 22px; border-radius: 6px; display: inline-block; }

/* Ayarlar: kullanicilar */
.kullanici-kart {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.kullanici-ust { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.kullanici-isim { font-size: 16px; font-weight: 700; }
.etiket.rol { background: #eaf1fa; color: #1f3a5f; }
.kullanici-dugmeleri { margin: 10px 0; flex-wrap: wrap; }
.kullanici-duzen { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
table.yetki-tablo { border-collapse: collapse; font-size: 14px; margin-top: 6px; }
table.yetki-tablo th, table.yetki-tablo td {
  padding: 7px 12px;
  border-bottom: 1px solid #eef0f4;
  text-align: left;
}
table.yetki-tablo th { background: #eef1f6; font-size: 13px; }
table.yetki-tablo td.orta { text-align: center; }
table.yetki-tablo input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

/* Ayarlar: islem gecmisi */
table.gecmis-tablo td { white-space: normal !important; }
table.gecmis-tablo td.tarih-sutunu { white-space: nowrap !important; }
table.gecmis-tablo th:last-child, table.gecmis-tablo td:last-child { width: 55%; }
details summary { cursor: pointer; color: #1f3a5f; font-size: 13px; margin-top: 4px; }
.ayrinti-baslik { font-weight: 700; margin-top: 6px; }
.sayfalama { display: flex; gap: 12px; align-items: center; margin: 10px 0 20px; }

/* ---------- Giris ekrani ---------- */
body.giris-govde {
  background: #1f3a5f;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}
.giris-kutu {
  background: #fff;
  border-radius: 14px;
  padding: 26px 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.giris-baslik { font-size: 22px; font-weight: 700; color: #1f3a5f; margin-bottom: 14px; }
.giris-kutu .form { padding: 0; box-shadow: none; }
.giris-kutu .form-alan { min-width: 0; }
.giris-kutu .dugme.buyuk { width: 100%; }

/* ---------- Genel yardimcilar ---------- */
.menu-simge, .kisa { display: none; }
.buyuk-uyari {
  background: #b3261e;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(179, 38, 30, .35);
}
.kirmizi-yazi { color: #b3261e; font-weight: 700; }
body.uzaktan .sadece-yerel { display: none !important; }
body:not(.uzaktan) .sadece-uzaktan { display: none !important; }
.hesap-satiri { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.hesap-satiri strong { margin-right: auto; font-size: 16px; }
.cevrimdisi { text-align: center; }
.cevrimdisi img { border-radius: 16px; margin-bottom: 8px; }
.cevrimdisi .dugme { display: inline-block; text-decoration: none; margin: 10px 0; }

/* ---------- Tarih alanlari: gg.aa.yyyy yazi kutusu + takvim dugmesi ----------
   (uygulama.js: tarihAlaniniHazirla). Asil <input type="date"> takvim
   dugmesinin icinde gorunmez durur; ona dokununca telefonun takvimi acilir. */
.tarih-kutu { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.tarih-kutu .tarih-yazi { flex: 1 1 auto; width: 8.5em; min-width: 0; letter-spacing: .3px; }
.tarih-takvim {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c3cad6;
  border-radius: 6px;
  background: #f5f7fa;
  color: #1f3a5f;
  cursor: pointer;
  overflow: hidden;
}
.tarih-takvim:hover { background: #eaf1fa; }
.tarih-takvim input[type="date"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0;
  opacity: 0; cursor: pointer; font-size: 16px;
  -webkit-appearance: none; appearance: none;
}
.tarih-takvim input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer;
}
.tarih-kutu.hatali .tarih-yazi { border-color: #c0392b; background: #fff7f6; }
.tarih-uyari { color: #8d241a; font-size: 13px; font-weight: 600; margin-top: 3px; line-height: 1.4; }
.vade-satiri .tarih-kutu { flex: 1 1 180px; }

/* ---------- Kimden / Kime onerileri ---------- */
.oneri-kutu { position: relative; display: flex; flex-direction: column; }
.oneri-listesi {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  margin-top: 2px; max-height: 264px; overflow-y: auto;
  background: #fff; border: 1px solid #c3cad6; border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
}
.oneri {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 15px;
  color: #1f2430; background: none; border: 0; border-top: 1px solid #eef0f4;
  padding: 10px 12px; cursor: pointer; overflow-wrap: anywhere;
}
.oneri:first-child { border-top: 0; }
.oneri:hover, .oneri.secili { background: #eaf1fa; }

/* Formun hemen altindaki baslik yapismasin ("Tanımlı kalemler") */
.form + h3 { margin-top: 22px; }

/* Dugme yazilari iki satira bolunmesin ("Excel'e Aktar") */
.filtre-alan.dugmeler .dugme { white-space: nowrap; }

/* ---------- Telefon ve dar ekranlar ---------- */
@media (max-width: 760px) {
  body {
    font-size: 16px;
    /* Alttaki menu ve iPhone'un alt cizgisi icerigi ortmesin */
    /* Menunun yuksekligini uygulama.js olcer (--alt-menu-yukseklik);
       olculemezse tahmini deger. Sonuna ferahlik payi. */
    padding-bottom: calc(var(--alt-menu-yukseklik, calc(84px + env(safe-area-inset-bottom))) + 18px);
  }

  /* Ust bant: ekranin tepesine yapisik; defter secici HER AN gorunur */
  .ust-bant {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: calc(6px + env(safe-area-inset-top)) 12px 8px;
  }
  .ust-satir { gap: 6px 10px; margin-bottom: 0; }
  .baslik { font-size: 17px; flex: 1; }
  .kullanici-alani { margin-left: auto; width: auto; }
  .kullanici-adi, #sifre-degistir-ac { display: none; }  /* Ayarlar > Hesabim'da */
  .ust-dugme { padding: 8px 12px; font-size: 14px; }
  .defter-secici-kutu { width: 100%; order: 3; }
  .defter-secici-kutu label { display: none; }
  #defter-secici { flex: 1; min-width: 0; font-size: 17px; min-height: 46px; }
  .defter-seridi { padding: 6px 12px; font-size: 13px; }

  /* Alt menu: parmakla basilacak buyuklukte, "Yeni" ortada ve belirgin */
  .menu {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 45;
    background: #1f3a5f;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0,0,0,.25);
  }
  .menu-dugme {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 6px 0; min-height: 56px; font-size: 12px; border-radius: 10px;
    color: #d7e2f0;
  }
  .menu-dugme .uzun { display: none; }
  .menu-dugme .kisa, .menu-dugme .menu-simge { display: block; }
  .menu-simge { font-size: 20px; line-height: 1; }
  .menu-dugme.secili { background: #2c4d79; color: #fff; }
  .menu-yeni .menu-simge {
    background: #e3b23c; color: #1f3a5f; font-weight: 700; font-size: 26px;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
  }
  .menu-yeni { color: #fff; font-weight: 700; }

  main { padding: 12px; }
  h2 { font-size: 18px; margin: 18px 0 10px; }

  /* Form alanlari ve dugmeler: parmak icin buyuk; yazi 16px (iPhone yakinlastirmasin) */
  input[type="text"], input[type="date"], input[type="password"], input[type="number"],
  select, textarea { font-size: 16px; min-height: 46px; width: 100%; }
  .dugme { min-height: 46px; font-size: 16px; }
  .dugme.kucuk { min-height: 40px; font-size: 14px; padding: 6px 12px; }
  .dugme.buyuk { width: 100%; }
  .form { padding: 14px; }
  .form-satir { gap: 0; }
  .form-alan { min-width: 100%; }
  .form-dugmeler .dugme { flex: 1 1 auto; }

  /* Ana ekran: once uyarilar, sonra bu ayin ozeti (sikisik) */
  .uyari-kutu { padding: 12px; }
  .uyari-satir { gap: 4px 10px; }
  .uyari-kim { min-width: 0; flex: 1 1 60%; }
  .uyari-tutar { min-width: 0; }
  .uyari-aciklama { flex-basis: 100%; min-width: 0; }
  .kart-satiri { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .kart { min-width: 0; padding: 12px; }
  .kart.mavi { grid-column: span 2; }
  .kart-deger { font-size: 20px; white-space: nowrap; overflow: hidden; }
  .kart-etiket { font-size: 13px; }

  /* Filtreler: ikiserli izgara; hicbir kutu yana tasmaz, etiketler hizali */
  .filtre-kutu {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 10px; padding: 12px; align-items: start;
  }
  .filtre-alan { min-width: 0; }
  .filtre-alan > * { max-width: 100%; }
  .filtre-alan.genis, .filtre-alan.dugmeler, .filtre-alan.tel-genis { grid-column: 1 / -1; min-width: 0; }
  .filtre-alan.dugmeler { flex-wrap: wrap; }
  .filtre-alan.dugmeler .dugme { flex: 1 1 30%; padding-left: 8px; padding-right: 8px; }
  .filtre-alan.dugmeler .dugme.excel, .filtre-alan.dugmeler .dugme.word { flex-basis: 40%; }
  .tarih-kutu .tarih-yazi { width: 100%; padding-left: 8px; padding-right: 6px; }
  .tarih-takvim { width: 44px; }
  .oneri { font-size: 16px; padding: 12px; }

  /* TABLOLAR -> KARTLAR: yana tasma yok */
  .tablo-sarmal { background: transparent; box-shadow: none; overflow: visible; }
  table.liste, table.liste tbody { display: block; width: 100%; }
  table.liste thead { display: none; }
  table.liste tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
  }
  table.liste tr.gecikmis-satir { background: #fdf1ef; border-left: 6px solid #c0392b; }
  table.liste tr.aktarim-satir { background: #f7f4fc; border-left: 6px solid #7d5ab5; }
  table.liste td, table.liste th {
    display: block; padding: 2px 0; border: none; white-space: normal !important;
    text-align: left !important; width: auto !important; min-width: 0 !important;
  }
  table.liste td[data-etiket]::before {
    content: attr(data-etiket);
    display: block;
    font-size: 11px;
    color: #6b7487;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
  }
  table.liste td.bos { grid-column: 1 / -1; text-align: center !important; padding: 18px 0; }
  table.liste td.k-kim { grid-column: 1 / -1; order: -2; font-size: 18px; font-weight: 700; }
  table.liste td.k-kim::before { display: none; }
  table.liste td.k-tutar { order: -1; font-size: 18px; font-weight: 700; }
  table.liste td.k-genis, table.liste td.k-islem, table.liste td:last-child { grid-column: 1 / -1; }
  body:not(.tum-defterler) table.liste td.defter-sutunu { display: none; }
  body.tum-defterler table.liste td.defter-sutunu { display: block; grid-column: 1 / -1; order: -3; }
  table.liste td:last-child::before { display: none; }
  .islem-dugmeleri { flex-wrap: wrap; gap: 8px; }
  .islem-dugmeleri .dugme { flex: 1 1 auto; }
  table.gecmis-tablo th:last-child, table.gecmis-tablo td:last-child { width: auto !important; }

  table.rapor-tablo { display: block; border-radius: 10px; }
  table.rapor-tablo thead { display: none; }
  table.rapor-tablo tbody { display: block; }
  table.rapor-tablo tr { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 10px 12px; border-bottom: 1px solid #eef0f4; }
  table.rapor-tablo td { display: block; border: none; padding: 0; text-align: left !important; }
  table.rapor-tablo td:first-child { flex-basis: 100%; font-weight: 700; }
  table.rapor-tablo td { background: transparent !important; }
  table.rapor-tablo td:empty { display: none; }
  table.rapor-tablo tr.giren-satir { background: #f2faf5; }
  table.rapor-tablo tr.cikan-satir { background: #fdf5f4; }
  table.rapor-tablo tr.toplam-satir { border-top: 2px solid #1f3a5f; }
  table.rapor-tablo tr.toplam-satir td { border-top: none; }
  table.rapor-tablo td[data-etiket]:not(:first-child)::before {
    content: attr(data-etiket) ": "; color: #6b7487; font-size: 13px;
  }
  table.yetki-tablo { font-size: 13px; width: 100%; }
  table.yetki-tablo th, table.yetki-tablo td { padding: 6px 4px; }
  table.odeme-tablo td[data-etiket]::before { content: none; }

  /* Liste toplamlari: iki sutun, etiket ustte, deger buyuk */
  .toplam-kutu {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px; padding: 10px;
  }
  .toplam-oge { background: #f5f7fa; border-radius: 8px; padding: 8px 10px; min-width: 0; gap: 2px; }
  .toplam-oge .etiket-yazi { font-size: 12px; font-weight: 600; color: #5a6376; }
  .toplam-oge .deger { font-size: 17px; line-height: 1.25; white-space: nowrap; overflow: hidden; }
  .toplam-not { grid-column: 1 / -1; }
  .rapor-sutunlar > div { min-width: 100%; }
  .kat-sutunlar .ayar-kutu { min-width: 100%; }
  .kat-satir { flex-wrap: wrap; }
  .aktarim-ok { display: none; }
  .bildirim { left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); z-index: 95; }
  .perde { padding: 12px; }
  .pencere { padding: 16px; }
  .sekme { flex: 1 1 45%; min-height: 46px; }
  .bilgi-tablo td:first-child { width: 42%; }
  .kod-buyuk { font-size: 23px; letter-spacing: 1px; white-space: nowrap; word-break: normal; padding: 12px 4px; }
}

/* ---------- Kurtarma kodu ekrani ---------- */
.kod-perde { z-index: 90; background: rgba(20, 26, 38, .8); }
.kod-pencere { max-width: 520px; text-align: center; }
.kod-kagidi { border: 2px dashed #9aa6b8; border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.kod-program { font-size: 20px; font-weight: 700; color: #1f3a5f; margin-bottom: 6px; }
.kod-satir { font-size: 16px; margin: 8px 0; }
.kod-buyuk {
  font-family: Consolas, "Courier New", monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 3px;
  background: #eef1f6;
  border-radius: 10px;
  padding: 14px 8px;
  margin: 12px 0;
  word-break: break-all;
  user-select: all;
}
.kod-aciklama { font-size: 15px; line-height: 1.6; margin: 8px 0 0; }
.dugme.cok-buyuk { font-size: 20px; padding: 14px 34px; margin: 6px 0; width: 100%; }
.kod-onay {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; margin: 16px 0; cursor: pointer; text-align: left;
}
.kod-onay input { width: 24px; height: 24px; flex: 0 0 auto; }
#kod-devam { width: 100%; }
.kod-girisi { font-family: Consolas, "Courier New", monospace; font-size: 18px !important; letter-spacing: 2px; text-transform: uppercase; }
.giris-alt { text-align: center; margin: 14px 0 4px; }
.buyuk-baglanti { font-size: 16px; color: #1f5fa8; font-weight: 600; }

/* Yazdirirken: SADECE kod kagidi basilir */
@media print {
  body * { visibility: hidden !important; }
  body { background: #fff !important; padding: 0 !important; }
  .kod-kagidi, .kod-kagidi * { visibility: visible !important; }
  .kod-perde { position: static !important; background: none !important; padding: 0 !important; }
  .kod-kagidi { position: absolute; left: 0; top: 0; width: 100%; border: 2px solid #000; color: #000; }
  .kod-buyuk { background: none !important; border: 1px solid #000; font-size: 36px; }
  .yazdirma-disi { display: none !important; }
}

/* ---------- Vade tarihi (istege bagli): "Vade tarihi ekle" dugmesi ---------- */
.vade-blok { margin: -2px 0 14px; }
.vade-blok .form-alan { margin-bottom: 4px; }
.vade-satiri { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vade-satiri input[type="date"] { flex: 1 1 180px; }
.dugme.vade-ekle {
  border: 2px solid #1f3a5f; color: #1f3a5f; background: #eef3fa; font-weight: 700;
}
.dugme.vade-ekle:hover { background: #dfe8f5; }
#k-vade-bilgi { margin-top: 4px; }
#k-vade-bilgi:empty { display: none; }
@media (max-width: 760px) {
  .dugme.vade-ekle { width: 100%; }
  .vade-satiri .dugme.kucuk { flex: 0 0 auto; }
}

/* ---------- Giris ve guvenlik ---------- */
.bekleme-yazi { font-size: 16px; line-height: 1.6; margin: 6px 0 14px; }
.orta-yazi { text-align: center; }
/* Ana ekran: "olagandisi giris" seridi */
.guvenlik-serit {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
  font-size: 17px; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.guvenlik-serit.olagandisi-serit { background: #b3261e; color: #fff; }
.guvenlik-serit .serit-yazi { flex: 1 1 60%; }
.guvenlik-serit .dugme { font-weight: 700; }
@media (max-width: 560px) {
  .guvenlik-serit { font-size: 16px; }
  .guvenlik-serit .dugme { width: 100%; }
}

@media print {
  /* Ofis yazicisi, A4, TEK sayfa: kagit disindaki her sey yer de kaplamasin */
  @page { size: A4 portrait; margin: 15mm; }
  body.kod-acik > *:not(.kod-perde), body.kod-acik > .kod-perde.gizli { display: none !important; }
  body.kod-acik .kod-pencere { max-width: none !important; box-shadow: none !important;
                               padding: 0 !important; max-height: none !important; overflow: visible !important; }
  body.kod-acik .kod-kagidi { position: static !important; break-inside: avoid; page-break-inside: avoid; }
}

/* =====================================================================
   Ayarlar ekrani: sade, katlanir bolumler ve sayfalama.
   Butun seciciler #sayfa-ayarlar ile baslar; baska ekranlari etkilemez.
   ===================================================================== */
#sayfa-ayarlar { max-width: 1100px; }
#sayfa-ayarlar .ayar-giris { margin: -4px 0 12px; }
#sayfa-ayarlar .ayar-grup-baslik {
  font-size: 15px; font-weight: 700; color: #5a6376; margin: 20px 2px 8px;
}
#sayfa-ayarlar details.ayar-bolum {
  background: #fff; border-radius: 12px; margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1); scroll-margin-top: 12px;
}
#sayfa-ayarlar details.ayar-bolum > summary {
  display: flex; align-items: center; gap: 12px; list-style: none;
  cursor: pointer; padding: 14px 16px; min-height: 60px; box-sizing: border-box;
  margin: 0; font-size: 17px; font-weight: 700; color: #1f3a5f;
  border-radius: 12px; -webkit-tap-highlight-color: transparent; user-select: none;
}
#sayfa-ayarlar details.ayar-bolum > summary::-webkit-details-marker { display: none; }
#sayfa-ayarlar details.ayar-bolum > summary::marker { content: ""; }
#sayfa-ayarlar details.ayar-bolum > summary:hover { background: #f4f6fa; }
#sayfa-ayarlar details.ayar-bolum > summary::after {
  content: "\203A"; margin-left: auto; font-size: 28px; line-height: 1; color: #7a8497;
  transition: transform .15s; flex: 0 0 auto;
}
#sayfa-ayarlar details.ayar-bolum[open] > summary::after { transform: rotate(90deg); }
#sayfa-ayarlar details.ayar-bolum[open] > summary {
  border-bottom: 1px solid #e6e9ef; border-radius: 12px 12px 0 0;
}
#sayfa-ayarlar .ayar-simge { font-size: 22px; width: 30px; text-align: center; flex: 0 0 auto; }
#sayfa-ayarlar .ayar-baslik { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
#sayfa-ayarlar .ayar-baslik small {
  font-size: 13px; font-weight: 400; color: #5a6376; margin-top: 2px;
}
#sayfa-ayarlar .ayar-rozet {
  flex: 0 0 auto; background: #e3b23c; color: #1f3a5f; font-size: 13px; font-weight: 700;
  border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
#sayfa-ayarlar .ayar-rozet.kirmizi { background: #b3261e; color: #fff; }
#sayfa-ayarlar .ayar-bolum-ic { padding: 14px 16px 6px; background: #f7f8fb; border-radius: 0 0 12px 12px; }
#sayfa-ayarlar .ayar-bolum-ic .ayar-kutu { box-shadow: 0 1px 2px rgba(0,0,0,.08); }
#sayfa-ayarlar .ayar-alt-bolum { scroll-margin-top: 12px; }
#sayfa-ayarlar .ayar-alt-bolum + .ayar-alt-bolum { border-top: 1px solid #e0e4eb; padding-top: 4px; }
#sayfa-ayarlar .ayar-alt-bolum h3 { margin-top: 10px; }

/* Sayfalama: "Sayfa 2 / 14", buyuk ve kolay basilir dugmeler */
#sayfa-ayarlar .ayar-sayfalama { justify-content: space-between; flex-wrap: wrap; margin: 12px 0 14px; }
#sayfa-ayarlar .ayar-sayfalama .dugme { min-height: 44px; min-width: 120px; font-size: 15px; font-weight: 600; }
#sayfa-ayarlar .ayar-sayfa-bilgi { color: #40485c; font-size: 14px; text-align: center; flex: 1 1 auto; }
#sayfa-ayarlar table.yedek-tablo td:nth-child(-n+3) { white-space: nowrap; }

@media (max-width: 760px) {
  #sayfa-ayarlar details.ayar-bolum,
  #sayfa-ayarlar .ayar-alt-bolum { scroll-margin-top: 130px; }
  #sayfa-ayarlar details.ayar-bolum > summary { padding: 12px; gap: 10px; }
  #sayfa-ayarlar .ayar-bolum-ic { padding: 12px 10px 4px; }
  #sayfa-ayarlar .ayar-sayfalama { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #sayfa-ayarlar .ayar-sayfalama .ayar-sayfa-bilgi { grid-column: 1 / -1; grid-row: 1; }
  #sayfa-ayarlar .ayar-sayfalama .dugme { min-width: 0; min-height: 50px; width: 100%; }
  /* Gecmis kartinda uzun ayrinti yaziyi tasirmasin */
  #sayfa-ayarlar table.gecmis-tablo td { overflow-wrap: anywhere; }
}

/* Ayarlar -> Sifremi degistir: dar, alt alta form; altinda kucuk hesap satiri */
#sayfa-ayarlar .ayar-form { max-width: 420px; }
#sayfa-ayarlar .ayar-form .dugme { min-height: 48px; min-width: 140px; }
#sayfa-ayarlar .hesap-alt {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 18px 0 8px; padding-top: 12px; border-top: 1px solid #e0e4eb; color: #40485c;
}
#sayfa-ayarlar .hesap-alt span { flex: 1 1 100%; font-size: 14px; }
#sayfa-ayarlar .hesap-alt .dugme { min-height: 44px; }
#sayfa-ayarlar .ayar-baslik { font-size: 18px; }
#sayfa-ayarlar details.ayar-gelismis > summary { color: #5a6376; font-weight: 600; }

/* Yeni surum hazir seridi (yarim form varken otomatik yenilenmez) */
.yeni-surum {
  position: fixed; left: 50%; transform: translateX(-50%); top: 10px; z-index: 200;
  background: #1f3a5f; color: #fff; font-weight: 700; font-size: 16px;
  padding: 12px 20px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); max-width: calc(100% - 24px); text-align: center;
}
