/* Kömür Fizibilite — arayüz. Dış kaynak yok (font/CDN yok). */
:root {
  --c-bg: #f3f5f9; --c-surface: #ffffff; --c-surface-2: #f8fafc; --c-line: #e2e8f0; --c-line-2: #cbd5e1;
  --c-text: #0f172a; --c-muted: #5b6678; --c-faint: #8a94a6;
  --c-top: #0a1630; --c-top-2: #12234a; --c-top-text: #e6ecf7;
  --c-primary: #1d4ed8; --c-primary-2: #1e40af; --c-primary-soft: #e8efff;
  --c-input: #fffbe6; --c-input-line: #ead68a;
  --c-ok: #15803d; --c-ok-soft: #e8f6ee; --c-warn: #b45309; --c-warn-soft: #fff5e6;
  --c-bad: #b91c1c; --c-bad-soft: #fdecec; --c-baz: #334155; --c-baz-soft: #eef2f7;
  --r: 8px; --r-lg: 12px; --sh: 0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.04);
  --sh-lg: 0 10px 30px rgba(15,23,42,.14);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--c-bg); color: var(--c-text); font: 14px/1.5 var(--font); }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- üst çubuk */
.top { position: sticky; top: 0; z-index: 40; height: 56px; display: flex; align-items: center; gap: 18px;
  padding: 0 20px; background: var(--c-top); color: var(--c-top-text); }
.top .marka { display: flex; align-items: center; gap: 12px; color: inherit; }
.top .marka:hover { text-decoration: none; }
.top .marka img { height: 34px; width: auto; border-radius: 4px; display: block; }
.top .marka b { font-size: 15px; font-weight: 600; letter-spacing: .2px; display: block; }
.top .marka small { display: block; font-size: 11px; color: #9fb0cf; }
.top nav { display: flex; gap: 4px; margin-left: 10px; }
.top nav a { color: #c9d4ea; padding: 7px 12px; border-radius: 6px; font-size: 13.5px; }
.top nav a:hover, .top nav a.on { background: var(--c-top-2); color: #fff; text-decoration: none; }
.top .sag { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.kim { font-size: 13px; color: #c9d4ea; text-align: right; line-height: 1.25; }
.kim small { display: block; color: #8b9cbf; font-size: 11px; }
.cikis { color: #c9d4ea; font-size: 12.5px; border: 1px solid #2a3b63; padding: 5px 10px; border-radius: 6px; }
.cikis:hover { background: var(--c-top-2); color: #fff; text-decoration: none; }

/* ---------- yerleşim */
.sayfa { max-width: 1480px; margin: 0 auto; padding: 22px 20px 70px; }
.sayfa.dar { max-width: 1100px; }
.sayfa-bas { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sayfa-bas h1 { font-size: 22px; font-weight: 650; }
.sayfa-bas p { margin: 4px 0 0; color: var(--c-muted); max-width: 820px; }
.kart { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--sh); }
.bolum { margin-top: 22px; }
.bolum > .bolum-bas { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; flex-wrap: wrap; }
.bolum > .bolum-bas h2 { font-size: 16.5px; font-weight: 650; }
.bolum > .bolum-bas p { margin: 2px 0 0; color: var(--c-muted); font-size: 13px; }
.ic { padding: 16px 18px; }
.ipucu { color: var(--c-muted); font-size: 12.5px; }

/* ---------- düğmeler */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--c-line-2); background: var(--c-surface);
  color: var(--c-text); padding: 7px 13px; border-radius: 7px; cursor: pointer; font-size: 13.5px; font-weight: 500;
  white-space: nowrap; }
.btn:hover { background: var(--c-surface-2); text-decoration: none; }
.btn.ana { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn.ana:hover { background: var(--c-primary-2); }
.btn.ana:disabled { background: #94a3b8; border-color: #94a3b8; cursor: default; }
.btn.tehlike { color: var(--c-bad); border-color: #f1b8b8; }
.btn.tehlike:hover { background: var(--c-bad-soft); }
.btn.kucuk { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.ikon-btn { border: 0; background: none; cursor: pointer; color: var(--c-muted); padding: 2px 5px; border-radius: 5px; font-size: 13px; line-height: 1; }
.ikon-btn:hover { background: var(--c-line); color: var(--c-text); }
.ikon-btn.sil:hover { background: var(--c-bad-soft); color: var(--c-bad); }

/* ---------- form */
.alan { display: flex; flex-direction: column; gap: 4px; }
.alan label, .e { font-size: 12px; color: var(--c-muted); font-weight: 600; }
input.g, select.g, textarea.g { border: 1px solid var(--c-line-2); background: #fff; border-radius: 7px; padding: 7px 10px; width: 100%; }
input.g:focus, select.g:focus, textarea.g:focus, .tablo input:focus, .tablo select:focus {
  outline: 2px solid #93b4ff; outline-offset: 0; border-color: var(--c-primary); }
.genel-izgara { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; }
.genel-izgara .genis { grid-column: span 2; }
.genel-izgara .tam { grid-column: 1 / -1; }

/* ---------- tablolar */
.tablo-kap { overflow-x: auto; }
.tablo { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.tablo th, .tablo td { padding: 5px 8px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.tablo thead th { position: sticky; top: 0; background: #17295a; color: #e6ecf7; font-weight: 600; font-size: 12px;
  text-align: center; line-height: 1.25; z-index: 2; }
.tablo thead th:first-child { border-top-left-radius: 8px; }
.tablo thead th:last-child { border-top-right-radius: 8px; }
.tablo thead th small { display: block; font-weight: 400; color: #a9b8d8; }
.tablo tbody tr:hover td { background: #fafcff; }
.tablo td.etiket { color: var(--c-text); white-space: nowrap; }
.tablo td.birim { color: var(--c-faint); font-size: 12px; white-space: nowrap; }
.tablo tr.ara td { background: var(--c-surface-2); font-weight: 650; color: #17295a; font-size: 12.5px; padding-top: 10px; }
.tablo tr.toplam td { font-weight: 650; }
.tablo td.hesap { color: #334155; }
.tablo td select { min-width: 104px; }
.tablo input, .tablo select { width: 100%; min-width: 70px; border: 1px solid var(--c-input-line); background: var(--c-input);
  border-radius: 5px; padding: 4px 7px; font-variant-numeric: tabular-nums; }
.tablo input.num { text-align: right; }
.tablo input.metin { background: #fff; border-color: var(--c-line-2); }
.tablo input[readonly] { background: #f1f5f9; border-color: var(--c-line); color: #475569; }
.tablo input.bos-ezme { background: #fff; border-style: dashed; border-color: var(--c-line-2); }
.tablo input.hata, input.g.hata { border-color: var(--c-bad); background: var(--c-bad-soft); }
.yan-yana { display: flex; gap: 4px; }
.yan-yana input { min-width: 64px; }
.kalan-ok { color: var(--c-ok); }
.kalan-kotu { color: var(--c-bad); }

/* senaryo matrisi */
.matris th.baz-kolon { background: #334155; }
.matris td.baz-kolon { background: #fbfcfe; }
.matris th .kolon-bas { display: flex; align-items: center; justify-content: center; gap: 4px; }
.matris th .kolon-bas .ikon-btn { color: #c9d4ea; }
.matris th .kolon-bas .ikon-btn:hover { background: #2a3b63; color: #fff; }
.matris td:first-child { min-width: 230px; }
.matris td { min-width: 150px; }
.matris textarea { width: 100%; min-height: 46px; border: 1px solid var(--c-line-2); border-radius: 5px; padding: 4px 7px; font-size: 12px; resize: vertical; }

/* ---------- sonuç kartları */
.sonuclar { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.sk { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--sh);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--c-line-2); }
.sk.uygun { border-top-color: var(--c-ok); }
.sk.uygunsuz { border-top-color: var(--c-bad); }
.sk.esit { border-top-color: #64748b; }
.sk.baz { border-top-color: var(--c-baz); background: #fbfcfe; }
.sk.hatali { border-top-color: var(--c-warn); }
.sk .ust { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.sk .ad { font-weight: 650; font-size: 14px; line-height: 1.3; }
.rozet { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.rozet.uygun { background: var(--c-ok-soft); color: var(--c-ok); }
.rozet.uygunsuz { background: var(--c-bad-soft); color: var(--c-bad); }
.rozet.esit { background: #eef2f7; color: #475569; }
.rozet.baz { background: var(--c-baz-soft); color: var(--c-baz); }
.rozet.hatali { background: var(--c-warn-soft); color: var(--c-warn); }
.sk .buyuk { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.sk .buyuk small { font-size: 12.5px; font-weight: 500; color: var(--c-muted); margin-left: 4px; }
.sk .fark { font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.sk .fark.arti { color: var(--c-bad); }
.sk .fark.eksi { color: var(--c-ok); }
.sk dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 2px 0 0; font-size: 12.5px; }
.sk dt { color: var(--c-muted); white-space: nowrap; }
.sk dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sk .neden { font-size: 12px; color: var(--c-bad); }
.sk .not { font-size: 12px; color: var(--c-muted); border-top: 1px dashed var(--c-line); padding-top: 6px; }
.hata-kutu { background: var(--c-warn-soft); border: 1px solid #f3d19e; color: #7c3a06; border-radius: var(--r); padding: 8px 12px; font-size: 13px; }

/* ---------- çalışma üst şeridi */
.cal-serit { position: sticky; top: 56px; z-index: 30; background: rgba(243,245,249,.96); backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--c-line); margin: -22px -20px 18px; padding: 10px 20px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cal-serit .ad-giris { font-size: 17px; font-weight: 650; border: 1px solid transparent; background: transparent; padding: 4px 8px;
  border-radius: 6px; min-width: 320px; flex: 1 1 380px; }
.cal-serit .ad-giris:hover { border-color: var(--c-line-2); background: #fff; }
.cal-serit .ad-giris:focus { border-color: var(--c-primary); background: #fff; outline: none; }
.durum-hap { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: #eef2f7; color: #475569; white-space: nowrap; }
.durum-hap.kirli { background: var(--c-warn-soft); color: var(--c-warn); font-weight: 600; }
.durum-hap.tamam { background: var(--c-ok-soft); color: var(--c-ok); }
.bolum-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.bolum-nav a { font-size: 12.5px; color: var(--c-muted); padding: 4px 9px; border-radius: 6px; }
.bolum-nav a:hover { background: #e7ecf4; color: var(--c-text); text-decoration: none; }

/* ---------- panel listesi */
.liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.lk { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.lk h3 { font-size: 15.5px; }
.lk h3 a { color: var(--c-text); }
.lk .meta { font-size: 12px; color: var(--c-muted); }
.lk table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.lk td { padding: 3px 0; border-bottom: 1px dashed var(--c-line); }
.lk .alt { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- modal & toast */
.modal-zemin { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal-zemin.acik { display: flex; }
.modal { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-lg); width: min(560px, 100%); max-height: 86vh; overflow: auto; }
.modal .bas { padding: 14px 18px; border-bottom: 1px solid var(--c-line); display: flex; justify-content: space-between; align-items: center; font-weight: 650; }
.modal .govde { padding: 14px 18px; }
#toast { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
#toast .t { background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--sh-lg); font-size: 13px; max-width: 420px; }
#toast .t.kotu { background: var(--c-bad); }
#toast .t.iyi { background: var(--c-ok); }

/* ---------- rehber */
.rehber h2 { font-size: 17px; margin: 26px 0 8px; }
.rehber h3 { font-size: 14.5px; margin: 16px 0 6px; }
.rehber p, .rehber li { color: #1e293b; }
.rehber code, .formul { font-family: var(--mono); font-size: 12.5px; background: #eef2f7; padding: 1px 5px; border-radius: 4px; }
.formul { display: block; padding: 8px 12px; margin: 6px 0; white-space: pre-wrap; line-height: 1.6; }
.bulgu { border-left: 4px solid var(--c-warn); background: var(--c-warn-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 10px 0; }
.bulgu.kritik { border-color: var(--c-bad); background: var(--c-bad-soft); }
.bulgu.bilgi { border-color: var(--c-primary); background: var(--c-primary-soft); }
.bulgu b:first-child { display: block; margin-bottom: 2px; }

/* ---------- giriş */
.giris-zemin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1200px 600px at 20% 0%, #1b2f5e 0%, #0a1630 60%); }
.giris-kart { width: min(440px, 100%); background: #fff; border-radius: 14px; box-shadow: var(--sh-lg); overflow: hidden; }
.giris-kart img { width: 100%; height: auto; display: block; }
.giris-kart form { padding: 20px 26px 8px; display: flex; flex-direction: column; gap: 12px; }
.giris-kart h1 { font-size: 20px; }
.giris-kart .alt { margin: -4px 0 4px; color: var(--c-muted); font-size: 13px; }
.giris-kart input { border: 1px solid var(--c-line-2); border-radius: 7px; padding: 9px 11px; }
.giris-kart .btn { justify-content: center; padding: 10px; }
.giris-uyari { background: var(--c-bad-soft); color: var(--c-bad); border-radius: 7px; padding: 8px 10px; font-size: 13px; }
.giris-dip { padding: 10px 26px 18px; color: var(--c-faint); font-size: 12px; }

@media (max-width: 900px) {
  .genel-izgara { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top nav { display: none; }
  .cal-serit .ad-giris { min-width: 0; }
  .liste { grid-template-columns: 1fr; }
  .cal-serit { position: static; }
  .top .marka small { display: none; }
}
@media print {
  .top, .cal-serit .btn, .bolum-nav, .ikon-btn, .yazdirma, #toast { display: none !important; }
  body { background: #fff; }
  .cal-serit { position: static; background: #fff; }
  .kart, .sk { box-shadow: none; }
  .tablo thead th { position: static; }
  .tablo input, .tablo select { border: 0; background: none; padding: 0; }
}
