/* İzomobil İzolasyon · Çek Takip
   Renk dili: arduvaz mürekkep + taşyünü sarısı; aciliyet renkleri yalnızca vade için. */

:root {
  --murekkep: #1d2733;
  --murekkep-2: #4a5866;
  --soluk: #6b7785;
  --zemin: #e9edf1;
  --yuzey: #ffffff;
  --yuzey-2: #f5f7f9;
  --cizgi: #d3dae1;
  --marka: #233446;
  --vurgu: #e8b33a;

  --gecti: #b3261e;   --gecti-z: #fbe6e4;
  --bugun: #b85200;   --bugun-z: #ffe9d6;
  --acil:  #c77700;   --acil-z:  #fff1d6;
  --yakin: #8a6d00;   --yakin-z: #fbf3cf;
  --orta:  #2c6590;   --orta-z:  #e3eef7;
  --uzak:  #4f5d6b;   --uzak-z:  #edf0f3;

  --giris: #1d7349;
  --cikis: #a2392a;

  --yazi: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --dar:  "IBM Plex Sans Condensed", "Arial Narrow", "IBM Plex Sans", "Segoe UI", sans-serif;
  --r: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --murekkep: #e3e8ee; --murekkep-2: #b7c1cc; --soluk: #8c98a5;
    --zemin: #121a22; --yuzey: #1b2530; --yuzey-2: #22303d; --cizgi: #33424f;
    --marka: #0d141b;
    --gecti: #ff8a80; --gecti-z: #3a1c1b;
    --bugun: #ffab5e; --bugun-z: #3a2616;
    --acil:  #ffc062; --acil-z:  #372a14;
    --yakin: #e6cf6a; --yakin-z: #302b14;
    --orta:  #8cc0e8; --orta-z:  #182a38;
    --uzak:  #aab5c0; --uzak-z:  #232e38;
    --giris: #6fd39f; --cikis: #ff9580;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--yazi);
  color: var(--murekkep);
  background: var(--zemin);
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
h1, h2 { font-family: var(--dar); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: 1.75rem; margin: 0 0 .25rem; }
h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
small { font-size: .8rem; }
code, .kod { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .85em; }
.soluk { color: var(--soluk); }
.kirmizi { color: var(--gecti); }
:focus-visible { outline: 3px solid var(--vurgu); outline-offset: 2px; }

/* ---------- Üst bar ---------- */
.ust {
  background: var(--marka);
  color: #f2f5f8;
  border-bottom: 4px solid var(--vurgu);
  position: sticky; top: 0; z-index: 10;
}
.ust-ic {
  max-width: 1240px; margin: 0 auto; padding: .6rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.marka { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.marka-ad { font-family: var(--dar); font-weight: 700; font-size: 1.1rem; }
.marka-alt { font-size: .8rem; color: var(--vurgu); }
.menu { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
.menu a {
  text-decoration: none; padding: .45rem .7rem; border-radius: var(--r);
  color: #c9d3dd; font-weight: 500;
}
.menu a:hover { color: #fff; background: rgba(255,255,255,.07); }
.menu a.secili { color: #fff; box-shadow: inset 0 -2px 0 var(--vurgu); border-radius: 0; }
.menu .cikis { margin-left: auto; }
.ust .dugme.yeni-cek { background: var(--vurgu); color: #1d2733; border-color: var(--vurgu); }
.ust .dugme.yeni-cek:hover { background: #f2c65a; }

.icerik { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
body.yalin .icerik { padding-top: 8vh; }

/* ---------- Düğmeler ---------- */
.dugme {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 600 .9rem/1 var(--yazi);
  padding: .65rem 1rem; border-radius: var(--r);
  border: 1px solid var(--cizgi); background: var(--yuzey); color: var(--murekkep);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.dugme:hover { border-color: var(--murekkep-2); }
.dugme.ana { background: var(--marka); border-color: var(--marka); color: #fff; }
.dugme.ana:hover { background: #2f4760; }
.dugme.duz { background: transparent; border-color: transparent; color: var(--murekkep-2); text-decoration: underline; text-underline-offset: 3px; }
.dugme.kucuk { padding: .4rem .6rem; font-size: .8rem; }
.dugme.onay { border-color: var(--giris); color: var(--giris); }
.dugme.onay:hover { background: var(--giris); color: #fff; }
.dugme.tehlike { border-color: var(--gecti); color: var(--gecti); }
.dugme.tehlike:hover { background: var(--gecti); color: #fff; }
.dugme.genis { width: 100%; padding: .85rem; }
.dugme-satir { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.dugme-satir form { margin: 0; }

/* ---------- Bildirimler ---------- */
.bildirim {
  padding: .75rem 1rem; border-radius: var(--r); margin-bottom: 1rem;
  background: var(--orta-z); border-left: 4px solid var(--orta);
}
.bildirim.ok { background: color-mix(in srgb, var(--giris) 12%, var(--yuzey)); border-left-color: var(--giris); }
.bildirim.hata { background: var(--gecti-z); border-left-color: var(--gecti); }
.bildirim ul { margin: .5rem 0 0; padding-left: 1.2rem; }

/* ---------- Kutular ve formlar ---------- */
.kutu {
  background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--r);
  padding: 1.25rem 1.5rem;
}
.kutu.dar { max-width: 440px; margin: 0 auto; }
.giris-firma { font-family: var(--dar); font-weight: 700; color: var(--soluk); margin: 0; }
.giris h1 { font-size: 2.2rem; margin-bottom: 1.25rem; border-bottom: 4px solid var(--vurgu); padding-bottom: .5rem; display: inline-block; }

.form { display: grid; gap: .9rem; }
.form label { display: grid; gap: .3rem; font-weight: 500; font-size: .9rem; }
.form label > span:first-child { display: block; }
input, select, textarea {
  font: 400 1rem/1.3 var(--yazi); color: var(--murekkep);
  padding: .6rem .7rem; border: 1px solid var(--cizgi); border-radius: var(--r);
  background: var(--yuzey); width: 100%; min-width: 0;
}
input:focus, select:focus { border-color: var(--marka); outline: 2px solid var(--vurgu); outline-offset: 0; }
input.sayi { text-align: right; font-variant-numeric: tabular-nums; }
fieldset { border: 1px solid var(--cizgi); border-radius: var(--r); padding: 1rem; margin: 0; display: grid; gap: .8rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.onay-kutu { display: flex !important; grid-template-columns: none; align-items: center; gap: .5rem; font-weight: 400 !important; }
.onay-kutu input { width: auto; }
details summary { cursor: pointer; font-weight: 600; margin: .25rem 0 .75rem; }
details { display: grid; gap: .8rem; }

.kontrol-listesi { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .2rem; font-size: .9rem; }
.kontrol-listesi .tamam { color: var(--giris); }
.kontrol-listesi .eksik { color: var(--gecti); font-weight: 600; }

/* Çek formu */
.cek-form { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--r); padding: 1.5rem; }
.tur-sec { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; border: 0; padding: 0; }
.tur-sec legend { margin-bottom: .5rem; padding: 0; }
.tur-secenek { display: block !important; position: relative; cursor: pointer; }
.tur-secenek input { position: absolute; opacity: 0; }
.tur-secenek span {
  display: grid; gap: .1rem; padding: .85rem 1rem; border: 2px solid var(--cizgi);
  border-radius: var(--r); background: var(--yuzey-2);
}
.tur-secenek small { color: var(--soluk); font-weight: 400; }
.tur-secenek input:checked + span { border-color: var(--marka); background: var(--yuzey); box-shadow: inset 4px 0 0 var(--vurgu); }
.tur-secenek input:focus-visible + span { outline: 3px solid var(--vurgu); outline-offset: 2px; }
.izgara { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem 1rem; }
.genis-2 { grid-column: span 2; }
.vurgu input { border-width: 2px; border-color: var(--marka); font-weight: 600; }
.form-dugmeler { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .5rem; border-top: 1px solid var(--cizgi); margin-top: .25rem; }
.sil-form { margin-top: 1.5rem; text-align: right; }

/* ---------- Sayfa başlıkları ---------- */
.sayfa-bas { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sayfa-bas p { margin: 0; }

.ozet-bas h1 { font-size: 2rem; }
.ozet-bas { margin-bottom: 1.25rem; }

/* Özet rakamları: tek bant, kartlara bölünmez */
.rakamlar {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--r);
  margin-bottom: 2rem;
}
.rakam {
  display: grid; gap: .2rem; align-content: start; padding: 1rem 1.25rem;
  text-decoration: none; border-left: 1px solid var(--cizgi);
}
.rakam:first-child { border-left: 0; }
a.rakam:hover { background: var(--yuzey-2); }
.rakam-ad { font-size: .85rem; color: var(--soluk); font-weight: 500; }
.rakam-deger { font-family: var(--dar); font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.rakam-deger.kucuk-deger { font-size: 1.05rem; line-height: 1.5; }
.rakam-alt { font-size: .85rem; color: var(--murekkep-2); }

/* ---------- Bloklar ---------- */
.blok { margin-bottom: 2.25rem; }
.blok-bas { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.blok-bas p { margin: 0; font-size: .85rem; }
.uyari-blok .blok-bas h2 { color: var(--gecti); }
.bos { background: var(--yuzey); border: 1px dashed var(--cizgi); border-radius: var(--r); padding: 1.25rem; color: var(--murekkep-2); }

/* ---------- 14 günlük vade şeridi ---------- */
.serit-kap { overflow-x: auto; padding-bottom: .25rem; }
.serit {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(14, minmax(76px, 1fr));
  border: 1px solid var(--cizgi); border-radius: var(--r); background: var(--yuzey);
}
.gun { border-left: 1px solid var(--cizgi); min-height: 128px; }
.gun:first-child { border-left: 0; }
.gun a { display: flex; flex-direction: column; height: 100%; padding: .55rem .5rem .6rem; text-decoration: none; }
.gun a:hover { background: var(--yuzey-2); }
.gun.haftasonu { background: var(--yuzey-2); }
.gun-ad { font-size: .75rem; color: var(--soluk); }
.gun-no { font-family: var(--dar); font-size: 1.6rem; font-weight: 700; line-height: 1; }
.gun-ay { font-size: .75rem; color: var(--soluk); margin-bottom: .45rem; }
.gun.bugun { box-shadow: inset 0 4px 0 var(--vurgu); }
.gun.bugun .gun-ad, .gun.bugun .gun-ay { color: var(--murekkep); font-weight: 600; }
.gun-giris, .gun-cikis { display: flex; flex-direction: column; font-size: .78rem; font-weight: 600; min-height: 1.2em; }
.gun-giris i, .gun-cikis i { font-style: normal; white-space: nowrap; }
.gun-giris { color: var(--giris); }
.gun-cikis { color: var(--cikis); margin-top: auto; }

/* ---------- Tablolar ---------- */
.tablo-kap { overflow-x: auto; background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--r); }
.tablo { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tablo th {
  text-align: left; font-weight: 600; font-size: .8rem; color: var(--soluk);
  padding: .6rem .75rem; border-bottom: 1px solid var(--cizgi); background: var(--yuzey-2); white-space: nowrap;
}
.tablo td { padding: .55rem .75rem; border-bottom: 1px solid var(--cizgi); vertical-align: middle; }
.tablo tbody tr:last-child td { border-bottom: 0; }
.tablo tbody tr:hover { background: var(--yuzey-2); }
.tablo td small { display: block; }
.tablo .sayi { text-align: right; white-space: nowrap; font-weight: 600; }
.tablo .vade { font-weight: 600; white-space: nowrap; }
.satir.kapali { color: var(--soluk); }
.satir.kapali td { background: repeating-linear-gradient(-45deg, transparent 0 8px, color-mix(in srgb, var(--cizgi) 30%, transparent) 8px 9px); }
.satir td:first-child { width: 1%; padding-left: 0; }
.islemler { white-space: nowrap; text-align: right; }
.islemler form { display: inline; }
.durum-form select { padding: .35rem .5rem; font-size: .85rem; width: auto; max-width: 190px; }
.akis td a { font-weight: 600; }
.arti { color: var(--giris); }
.eksi { color: var(--cikis); }

.tur { font-size: .78rem; font-weight: 600; padding: .15rem .45rem; border-radius: 4px; white-space: nowrap; }
.tur.alinan { color: var(--giris); background: color-mix(in srgb, var(--giris) 12%, transparent); }
.tur.verilen { color: var(--cikis); background: color-mix(in srgb, var(--cikis) 12%, transparent); }

/* Kalan gün bloğu: satırın sol kenarındaki renkli "koçan" */
.kalan {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  width: 74px; min-height: 52px; padding: .3rem .25rem;
  border-left: 5px solid currentColor; line-height: 1.05; text-align: center;
}
.kalan b { font-family: var(--dar); font-size: 1.45rem; font-weight: 700; }
.kalan small { font-size: .68rem; font-weight: 600; }
.kalan.gecti { color: var(--gecti); background: var(--gecti-z); }
.kalan.bugun { color: var(--bugun); background: var(--bugun-z); }
.kalan.bugun b { font-size: 1.05rem; }
.kalan.acil  { color: var(--acil);  background: var(--acil-z); }
.kalan.yakin { color: var(--yakin); background: var(--yakin-z); }
.kalan.orta  { color: var(--orta);  background: var(--orta-z); }
.kalan.uzak  { color: var(--uzak);  background: var(--uzak-z); }
.kalan.kapali { color: var(--cizgi); background: transparent; }

/* Filtre */
.filtre {
  display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr auto; gap: .75rem; align-items: end;
  background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--r);
  padding: 1rem; margin-bottom: 1rem;
}
.filtre label { display: grid; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--murekkep-2); }
.filtre-dugmeler { display: flex; gap: .25rem; }
.liste-toplam { display: flex; flex-wrap: wrap; gap: .5rem 2rem; padding: .9rem .25rem; font-size: .95rem; }

/* Ayarlar */
.ayar-izgara { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.genis-kutu { grid-column: 1 / -1; }
.iki-sutun { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.iki-sutun.sik { gap: .75rem; }
.etiket { font-weight: 600; margin: .75rem 0 .25rem; }
.kod {
  background: var(--yuzey-2); border: 1px solid var(--cizgi); border-radius: var(--r);
  padding: .6rem .75rem; overflow-x: auto; white-space: pre; margin: 0 0 .5rem; user-select: all;
}
.adimlar { margin: 0; padding-left: 1.2rem; font-size: .88rem; color: var(--murekkep-2); display: grid; gap: .3rem; }
.kullanici-listesi { list-style: none; padding: 0; margin: 0 0 1rem; }
.kullanici-listesi li { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--cizgi); }
.kullanici-listesi form { margin: 0; }

/* ---------- Mobil ---------- */
@media (max-width: 960px) {
  .filtre { grid-template-columns: 1fr 1fr; }
  .filtre label:first-of-type { grid-column: 1 / -1; }
  .izgara { grid-template-columns: 1fr 1fr; }
  .ayar-izgara, .iki-sutun { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .ust { position: static; }
  .ust-ic { gap: .6rem; padding: .6rem 1rem; }
  .menu { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .menu a { white-space: nowrap; }
  .yeni-cek { margin-left: auto; }
  .icerik { padding: 1rem .75rem 3rem; }
  h1, .ozet-bas h1 { font-size: 1.5rem; }
  .rakamlar { grid-template-columns: 1fr; }
  .rakam { border-left: 0; border-top: 1px solid var(--cizgi); }
  .rakam:first-child { border-top: 0; }
  .izgara { grid-template-columns: 1fr; }
  .genis-2 { grid-column: auto; }
  .tur-sec { grid-template-columns: 1fr; }
  .cek-form, .kutu { padding: 1rem; }

  /* Tablolar kart görünümüne geçer */
  .tablo-kap { background: transparent; border: 0; overflow: visible; }
  .tablo thead { display: none; }
  .tablo, .tablo tbody, .tablo td { display: block; width: 100%; }
  .tablo tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .75rem; align-items: start;
    background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--r);
    margin-bottom: .6rem; position: relative; padding: .5rem .75rem .6rem 92px; min-height: 90px;
  }
  .tablo tbody tr:hover { background: var(--yuzey); }
  .tablo td { border: 0; padding: .2rem 0; text-align: left !important; }
  .tablo td[data-etiket]::before { content: attr(data-etiket); display: block; font-size: .7rem; color: var(--soluk); }
  .satir td:first-child { position: absolute; left: 0; top: 0; bottom: 0; width: 80px; padding: 0; }
  .satir td:first-child::before { display: none; }
  .satir .kalan { width: 80px; height: 100%; border-radius: var(--r) 0 0 var(--r); }
  .islemler, .tablo td[data-etiket="Firma"], .tablo td[data-etiket="Durum"] { grid-column: 1 / -1; }
  .tablo td[data-etiket="Firma"] { order: -1; font-size: 1rem; }
  .tablo td[data-etiket="Firma"]::before { display: none; }
  .islemler { padding-top: .35rem !important; display: flex !important; gap: .4rem; }
  .islemler form, .islemler .dugme { flex: 1; }
  .islemler form .dugme { width: 100%; }
  .akis tr { padding-left: .75rem; min-height: 0; }
  .durum-form select { max-width: 100%; width: 100%; }
}

@media print {
  .ust, .filtre, .islemler, .durum-form, .dugme { display: none !important; }
  body { background: #fff; }
}
