/* LUMEN — ortak stil. Harici yazı tipi / CDN yok. */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #1d2433;
  --muted: #667085;
  --line: #e3e6ec;
  --soft: #f0f2f5;
  --accent: #0f6b6e;
  --accent-soft: #e2f1f1;
  --pos: #1b7f4c;
  --pos-soft: #e3f4ea;
  --neg: #b42318;
  --neg-soft: #fde9e7;
  --warn: #a15c07;
  --warn-soft: #fdf1dc;
  --bar-a: #0f6b6e;
  --bar-b: #c4661f;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151b; --panel: #1b2029; --ink: #e6e9ef; --muted: #98a2b3; --line: #2c3340; --soft: #232934;
    --accent: #4cb8bb; --accent-soft: #173638; --pos: #4cc38a; --pos-soft: #16352a; --neg: #f97066; --neg-soft: #3d1d1b;
    --warn: #f5b546; --warn-soft: #3b2e14; --bar-a: #4cb8bb; --bar-b: #e8914d; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151b; --panel: #1b2029; --ink: #e6e9ef; --muted: #98a2b3; --line: #2c3340; --soft: #232934;
  --accent: #4cb8bb; --accent-soft: #173638; --pos: #4cc38a; --pos-soft: #16352a; --neg: #f97066; --neg-soft: #3d1d1b;
  --warn: #f5b546; --warn-soft: #3b2e14; --bar-a: #4cb8bb; --bar-b: #e8914d; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

/* ---------- kabuk ---------- */
.ust {
  position: sticky; top: 0; z-index: 20;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.ust-ic {
  max-width: 1440px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 22px; min-height: 56px; flex-wrap: wrap;
}
.logo { font-weight: 700; letter-spacing: .14em; color: var(--accent); font-size: 15px; white-space: nowrap; }
.logo small { display: block; font-weight: 500; letter-spacing: 0; color: var(--muted); font-size: 11px; }
.menu { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.menu a {
  color: var(--muted); padding: 7px 11px; border-radius: 7px; font-weight: 500; white-space: nowrap;
}
.menu a:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.menu a.aktif { background: var(--accent-soft); color: var(--accent); }
.ust-sag { display: flex; align-items: center; gap: 8px; }

main { max-width: 1440px; margin: 0 auto; padding: 22px 20px 48px; }
.baslik { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.baslik p { margin: 4px 0 0; color: var(--muted); }
.alt { max-width: 1440px; margin: 0 auto; padding: 0 20px 28px; color: var(--muted); font-size: 12px; }

/* ---------- form ---------- */
input, select, button { font: inherit; color: inherit; }
input[type="date"], input[type="search"], input[type="text"], select {
  background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; min-height: 34px;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dugme {
  background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; min-height: 34px;
  cursor: pointer; font-weight: 500; white-space: nowrap;
}
.dugme:hover { background: var(--soft); }
.dugme.ana { background: var(--accent); border-color: var(--accent); color: #fff; }
.dugme.ana:hover { filter: brightness(1.08); }
.dugme.kucuk { min-height: 28px; padding: 3px 9px; font-size: 12px; }
.tema-dugme { width: 36px; padding: 0; font-size: 16px; line-height: 1; }
.filtre { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filtre label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.secim { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.secim button { border: 0; background: none; padding: 6px 13px; cursor: pointer; color: var(--muted); font-weight: 500; }
.secim button.aktif { background: var(--accent); color: #fff; }

/* ---------- kartlar ---------- */
.izgara { display: grid; gap: 14px; }
.kpi-izgara { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.iki { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; min-width: 0;
}
.panel-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-bas p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.bolum { margin-top: 18px; }

.kpi { display: flex; flex-direction: column; gap: 4px; cursor: default; position: relative; }
.kpi.tik { cursor: pointer; }
.kpi.tik:hover { border-color: var(--accent); }
.kpi .ad { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .deger { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .ek { color: var(--muted); font-size: 12.5px; }
.kpi .ek b { color: var(--ink); font-weight: 600; }
.kpi .satir { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.kpi .satir b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi .rozet { position: absolute; top: 12px; right: 12px; }

.rozet { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.rozet.pos { background: var(--pos-soft); color: var(--pos); }
.rozet.neg { background: var(--neg-soft); color: var(--neg); }
.rozet.uyari { background: var(--warn-soft); color: var(--warn); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.sessiz { color: var(--muted); }

/* ---------- içgörü ---------- */
.icgoru { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 14px; }
.icgoru div {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 10px 13px; font-size: 13.5px;
}
.icgoru div.neg { border-left-color: var(--neg); color: inherit; }
.icgoru div.pos { border-left-color: var(--pos); color: inherit; }
.icgoru div.uyari { border-left-color: var(--warn); }

.not {
  background: var(--warn-soft); color: var(--ink); border: 1px solid transparent; border-radius: 8px;
  padding: 10px 13px; font-size: 13px; margin-bottom: 14px;
}
.not b { color: var(--warn); }
.not ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- tablo ---------- */
.tablo-arac { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; }
.tablo-arac .bilgi { color: var(--muted); font-size: 12px; }
.tablo-kap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; max-height: 70vh; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th {
  position: sticky; top: 0; z-index: 1; background: var(--soft); font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; user-select: none;
}
th.sirali::after { content: " ▲"; font-size: 9px; }
th.sirali.azalan::after { content: " ▼"; }
td.sag, th.sag { text-align: right; }
td.kod { font-family: var(--mono); font-size: 12.5px; }
td.uzun { white-space: normal; min-width: 220px; max-width: 420px; }
tbody tr:hover td { background: var(--soft); }
tbody tr.tik { cursor: pointer; }
tfoot td { font-weight: 650; background: var(--soft); position: sticky; bottom: 0; }
.bos { padding: 26px; text-align: center; color: var(--muted); }

/* ---------- grafik ---------- */
.cubuklar { display: flex; flex-direction: column; gap: 7px; }
.cubuk { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.cubuk .e { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cubuk .yol { background: var(--soft); border-radius: 4px; height: 14px; overflow: hidden; }
.cubuk .dol { height: 100%; background: var(--bar-a); border-radius: 4px; min-width: 2px; }
.cubuk .d { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 92px; text-align: right; }
.cubuk.tik { cursor: pointer; }
.cubuk.tik:hover .e { color: var(--accent); }

.cift { display: flex; flex-direction: column; gap: 9px; }
.cift-satir { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 10px; align-items: center; font-size: 12.5px; }
.cift-satir .yol { height: 18px; background: var(--soft); border-radius: 4px; position: relative; overflow: hidden; }
.cift-satir .dol { height: 100%; border-radius: 4px; }
.cift-satir .yol span { position: absolute; left: 8px; top: 0; line-height: 18px; font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--ink); }
.cift-satir.bas { color: var(--muted); font-size: 12px; font-weight: 600; }
.cift-satir.tik { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.cift-satir.tik:hover { background: var(--soft); }
.cift-satir.tik:hover > div:first-child { color: var(--accent); }
tbody tr.tik td:first-child { position: relative; }
.lejant { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.lejant i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

.sutun-bilgi {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px;
  background: var(--soft); border-radius: 7px; padding: 4px 6px 4px 10px; margin-bottom: 8px; font-size: 13px;
}
.sutun-bilgi b { font-variant-numeric: tabular-nums; }
.sutunlar { display: flex; align-items: stretch; gap: 2px; height: 150px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.sutunlar .k { flex: 1; min-width: 4px; display: flex; align-items: flex-end; cursor: pointer; border-radius: 3px 3px 0 0; }
.sutunlar .k:hover { background: var(--soft); }
.sutunlar .s { width: 100%; background: var(--bar-a); border-radius: 3px 3px 0 0; opacity: .8; }
.sutunlar .k:hover .s { opacity: 1; }
.sutunlar .k.sec .s { background: var(--bar-b); opacity: 1; }
.sutunlar .k.sec { background: var(--warn-soft); }
.sutun-alt { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 4px; }

/* ---------- sekme ---------- */
.sekmeler { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.sekmeler button {
  border: 0; background: none; padding: 8px 12px; cursor: pointer; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.sekmeler button.aktif { color: var(--accent); border-bottom-color: var(--accent); }
.sekmeler button .rozet { margin-left: 4px; }

/* ---------- durum ---------- */
.yukleniyor { color: var(--muted); padding: 18px 4px; }
.yukleniyor::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: don .8s linear infinite;
}
@keyframes don { to { transform: rotate(360deg); } }
.hata { background: var(--neg-soft); color: var(--neg); border-radius: 8px; padding: 10px 13px; font-size: 13px; }

/* ---------- pencere ---------- */
.ortu { position: fixed; inset: 0; background: rgba(15, 20, 30, .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; }
.pencere { background: var(--panel); border-radius: 12px; width: min(1100px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.pencere-bas { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 12px; }
.pencere-ic { padding: 16px 18px; overflow: auto; }
.kapat { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.pencere.genis { width: min(1500px, 100%); }
.ara-baslik { margin: 18px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.alanlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1px; padding: 1px; border-radius: 8px; overflow: hidden; }
.alanlar > div { background: var(--panel); outline: 1px solid var(--line); padding: 8px 11px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alanlar > div > span { font-size: 11.5px; color: var(--muted); }
.alanlar > div > b { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pencere .tablo-kap { max-height: 58vh; }

/* ---------- pencere üst bilgisi: solda bilgi listesi, sağda tutar kutusu ---------- */
.belge-bas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); gap: 18px; align-items: start; }
.belge-bas.ekstre { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.bilgi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; font-size: 13px; }
.bilgi > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.bilgi dt { color: var(--muted); font-size: 12px; padding-top: 1px; }
.bilgi dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.tutar-kutu { background: var(--soft); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.tutar-kutu > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.tutar-kutu span { color: var(--muted); }
.tutar-kutu b { font-weight: 600; white-space: nowrap; }
.tutar-kutu .son { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 7px; }
.tutar-kutu .son span { color: var(--ink); font-weight: 600; }
.tutar-kutu .son b { font-size: 16px; }
.mini-kartlar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.mini { background: var(--soft); border-radius: 8px; padding: 8px 11px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mini > span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.mini > b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini > i, .mini > em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.mini > em.neg { color: var(--neg); font-size: 13px; }
.mini.tik { cursor: pointer; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .12s, background .12s; }
.mini.tik:hover, .mini.tik:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); outline: none; }
.mini > span small { font-size: 14px; line-height: 0; font-weight: 700; color: var(--accent); }
@media (max-width: 900px) {
  .belge-bas, .belge-bas.ekstre { grid-template-columns: 1fr; }
  .mini-kartlar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bilgi { grid-template-columns: 1fr; }
}

/* ---------- çek/senet gruplama çipleri ---------- */
.cipler { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cip { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.cip b { font-variant-numeric: tabular-nums; margin-left: 4px; }
.cip small { color: var(--muted); margin-left: 3px; }
.cip:hover { border-color: var(--accent); }
.cip.aktif { background: var(--accent); border-color: var(--accent); color: #fff; }
.cip.aktif small { color: rgba(255, 255, 255, .8); }
.bolme td.uzun { min-width: 150px; max-width: 260px; }
.bolmeler { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.bolme { min-width: 0; }
.bolme-bas { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 6px; margin-bottom: 8px; border-bottom: 2px solid var(--pos); }
.bolme.cikis .bolme-bas { border-bottom-color: var(--neg); }
.bolme-bas b { font-size: 17px; font-variant-numeric: tabular-nums; }
.bolme-ozet { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 20px; }
@media (max-width: 960px) { .bolmeler { grid-template-columns: 1fr; } }

@media (max-width: 720px) {
  .ust-ic { padding: 8px 16px; gap: 8px; }
  main { padding: 16px 16px 40px; }
  .iki { grid-template-columns: 1fr; }
  .kpi .deger { font-size: 21px; }
  .cift-satir { grid-template-columns: 84px 1fr 1fr; }
}
@media print {
  .ust, .tablo-arac, .filtre, .dugme { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; break-inside: avoid; }
  .tablo-kap { max-height: none; overflow: visible; }
}
.ekstre-ust { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 6px; }
.ekstre-ust p { margin: 0; font-size: 12px; }
.kpi .ek .proje-kirilim { font-size: 12px; }
/* Sayfa altı hesaplama açıklaması */
.hesap-alt { margin-top: 22px; padding: 16px 2px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.hesap-alt h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hesap-alt dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.hesap-alt dl > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 10px; }
.hesap-alt dt { color: var(--ink); font-weight: 600; }
.hesap-alt dd { margin: 0; }
@media (max-width: 900px) { .hesap-alt dl { grid-template-columns: 1fr; } .hesap-alt dl > div { grid-template-columns: 1fr; gap: 0; } }
.stok-link { color: var(--accent); text-decoration: none; border-bottom: 1px dotted currentColor; }
/* Gösterge paneli: en önemli rozet — yaklaşan çek/senet ödemesi */
.icgoru a.kritik {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink);
  background: var(--warn-soft); border: 1px solid var(--warn); border-left: 6px solid var(--warn); border-radius: 10px;
  padding: 12px 16px; font-size: 14.5px; box-shadow: var(--shadow);
}
.icgoru a.kritik:hover { filter: brightness(.98); }
.kritik-ikon { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--warn); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.kritik-metin { flex: 1; min-width: 0; }
.kritik-baslik { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--warn); margin-bottom: 2px; }
.kritik-tutar { flex: none; text-align: right; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--warn); line-height: 1.1; }
.kritik-tutar small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
@media (max-width: 600px) { .icgoru a.kritik { flex-wrap: wrap; } .kritik-tutar { text-align: left; } }
.kpi-git { color: var(--accent); font-weight: 700; }
/* Kolon filtresi (başlığın altında) */
th .th-ad { display: block; }
th input.ff { display: block; width: 100%; min-width: 56px; margin-top: 4px; padding: 3px 6px; font: inherit; font-size: 11.5px; font-weight: 400;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
th.sag input.ff { text-align: right; }
th input.ff::placeholder { color: var(--muted); opacity: .6; }
th input.ff:focus { outline: none; border-color: var(--accent); }
th input.ff.dolu { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.filtre-kapali th input.ff { display: none; }
@media print { th input.ff { display: none !important; } }

/* ---------- oturum: giriş sayfası ---------- */
[hidden] { display: none !important; }
input[type="password"], input[type="email"] {
  background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; min-height: 34px;
}
.giris-govde { min-height: 100vh; display: flex; }
.giris-kap { margin: auto; width: 100%; max-width: 420px; padding: 40px 16px; }
.giris-kart { padding: 26px 26px 22px; }
.giris-logo { font-size: 20px; margin-bottom: 20px; }
.giris-logo small { font-size: 12px; margin-top: 2px; }
.giris-form { display: flex; flex-direction: column; gap: 12px; }
.giris-form h1 { font-size: 18px; }
.giris-form p { margin: 0; font-size: 13px; }
.giris-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.giris-form label input { font-weight: 400; color: var(--ink); min-height: 40px; font-size: 15px; }
.giris-form .dugme { min-height: 40px; }
.giris-ipucu { color: var(--muted); font-size: 12px !important; }
.giris-mesaj { border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; background: var(--soft); }
.giris-mesaj.neg { background: var(--neg-soft); color: var(--neg); }
.giris-mesaj.pos { background: var(--pos-soft); color: var(--pos); }
.giris-alt { text-align: center; color: var(--muted); font-size: 12px; margin-top: 14px; }
.kod-giris { letter-spacing: .3em; font-family: var(--mono); text-align: center; font-size: 20px !important; }
.karekod { align-self: center; background: #fff; padding: 6px; border-radius: 8px; line-height: 0; }
.karekod svg { width: 196px; height: 196px; display: block; }
.anahtar { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; user-select: all; overflow-wrap: anywhere; color: var(--ink); }

/* ---------- oturum: üst bardaki kullanıcı düğmesi ve hesap penceresi ---------- */
.kullanici-dugme { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.pencere.dar { width: min(560px, 100%); }
.hesap-bolum { border-top: 1px solid var(--line); padding: 14px 0; }
.hesap-bolum:first-child { border-top: 0; padding-top: 0; }
.hesap-bolum h3 { margin-bottom: 8px; }
.hesap-bolum p { margin: 0 0 10px; font-size: 13px; }
.form-satir { display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.form-satir label, .yon-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.form-satir label input, .yon-form label input[type="text"] { font-weight: 400; color: var(--ink); }
.form-sonuc { font-size: 13px; min-height: 0; }
.form-sonuc.neg { color: var(--neg); }
.form-sonuc.pos { color: var(--pos); }
.yetki-yok { padding: 22px; text-align: center; color: var(--muted); }

/* ---------- yönetim sayfası ---------- */
.yon-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.onay { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; color: var(--ink) !important; font-size: 13px !important; cursor: pointer; }
.onay input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.yetki-agac { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.yetki-grup { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.yetki-grup > .onay { font-weight: 650 !important; }
.yetki-alt { margin: 6px 0 0 24px; display: flex; flex-direction: column; gap: 5px; }
.yetki-alt.kapali { opacity: .45; }
.gecici-kutu { background: var(--warn-soft); border-radius: 8px; padding: 12px 14px; margin: 10px 0; font-size: 13px; }
.gecici-kutu code { font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: .06em; user-select: all; display: inline-block; margin: 4px 8px 4px 0; color: var(--ink); }
.islemler { display: flex; flex-wrap: wrap; gap: 8px; }
.dugme.tehlike { color: var(--neg); border-color: var(--neg); }
.dugme.tehlike.emin { background: var(--neg); color: #fff; }
.pencere-alt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }

/* ---------- yönetim: gruplar, yetki etiketleri, kapsam seçimi ---------- */
.yetki-etiket { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 99px; margin-left: 2px; letter-spacing: .02em; vertical-align: 1px; }
.yetki-etiket.grup { background: var(--accent-soft); color: var(--accent); }
.yetki-etiket.ek { background: var(--pos-soft); color: var(--pos); }
.yetki-etiket.cikar { background: var(--neg-soft); color: var(--neg); text-decoration: line-through; }
.kod-secim { display: flex; flex-wrap: wrap; gap: 6px; }
.kod-cip { border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; background: var(--panel); }
.kod-cip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.kod-secim-bas { margin-bottom: 6px; font-size: 13px; }
.kod-diger { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 8px; max-width: 320px; }
.kod-diger input { font-weight: 400; color: var(--ink); }
.kapsam-izgara { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.kapsam-izgara > div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.kapsam-rozet { max-width: 260px; overflow: hidden; text-overflow: ellipsis; cursor: help; }

/* ---------- iç içe tablo (ör. sipariş → sipariş kalemleri) ---------- */
.ac-kapa-th, .ac-kapa-td { width: 30px; padding-left: 6px !important; padding-right: 0 !important; }
.ac-kapa { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13px; width: 22px; height: 22px; border-radius: 5px; padding: 0; line-height: 1; }
.ac-kapa:hover { background: var(--soft); color: var(--ink); }
tr.ust-satir.acik > td { background: var(--accent-soft); border-bottom-color: transparent; }
tr.ust-satir.acik .ac-kapa { color: var(--accent); }
tr.alt-satir > td { background: var(--soft); padding: 6px 10px 12px !important; }
tr.alt-satir:hover > td { background: var(--soft); }
.ic-tablo { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 12.5px; }
.ic-tablo th { position: static; background: var(--panel); font-size: 11px; padding: 6px 9px; border-bottom: 1px solid var(--line); }
.ic-tablo td { padding: 5px 9px; border-bottom: 1px solid var(--line); }
.ic-tablo tr:last-child td { border-bottom: 0; }
.ic-tablo tr.eslesen td { background: var(--warn-soft); }
.ic-tablo tr.soluk td { opacity: .55; }
.ic-not { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
@media print { .ac-kapa-th, .ac-kapa-td { display: none; } }

/* ---------- KDV durumu ---------- */
tr.ara-toplam td { background: var(--soft); font-weight: 600; }
tr.genel-toplam td { border-top: 2px solid var(--line); font-size: 15px; font-weight: 700; }
tr.genel-toplam.neg td:last-child { color: var(--neg); }
tr.genel-toplam.pos td:last-child { color: var(--pos); }

/* ---------- tablo: kart görünümü (telefonda varsayılan, L.tablo ayar.kart) ---------- */
.tablo-kap.kart-mod { border: 0; border-radius: 0; overflow: visible; max-height: none; }
.tablo-kap.kart-mod > table { display: none; }
.kart-liste { display: flex; flex-direction: column; gap: 8px; }
.tkart { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.tkart.tik { cursor: pointer; }
.tkart.tik:active, .tkart.tik:focus-visible { background: var(--soft); outline: none; border-color: var(--accent); }
.tkart.toplam { background: var(--soft); }
.tkart-bas { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tkart-ad { font-weight: 600; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.tkart-ad .rozet { margin-left: 4px; vertical-align: 1px; }
.tkart-sag { flex: none; text-align: right; font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.3; }
.tkart-sag small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.tkart-alt { color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.tkart-alanlar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); }
.tkart-alanlar > div { display: flex; flex-direction: column; min-width: 0; }
.tkart-alanlar dt { font-size: 11px; color: var(--muted); }
.tkart-alanlar dd { margin: 0; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kart-sira { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kart-sira select { min-height: 30px; padding: 3px 6px; max-width: 160px; }

/* ---------- kabuk: telefon menüsü (masaüstünde gizli) ---------- */
.menu-dugme, .menu-ek { display: none; }
.menu-ek-dugme { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 11px 12px; border-radius: 7px; cursor: pointer; color: var(--ink); font-weight: 500; font-size: 15px; }
.menu-ek-dugme:hover { background: var(--soft); }
.menu-ek-kapsam { padding: 8px 12px; font-size: 13px; color: var(--muted); }
.yenile-ikon { display: none; }

/* ---------- telefon (≤720 px) ---------- */
@media (max-width: 720px) {
  /* Üst çubuk: tek satır — LUMEN · tarih · yenile · ☰ */
  .ust-ic { flex-wrap: nowrap; gap: 8px; padding: 6px 12px; min-height: 52px; position: relative; }
  .logo { font-size: 14px; flex: none; }
  .logo small { display: none; }
  .ust-sag { margin-left: auto; gap: 6px; min-width: 0; }
  .ust-sag .tema-dugme, .ust-sag .kullanici-dugme, .ust-sag .kapsam-rozet { display: none; }
  .menu-dugme { display: inline-flex; align-items: center; justify-content: center; width: 40px; padding: 0; font-size: 18px; flex: none; }
  .yenile-dugme { width: 38px; padding: 0; }
  .yenile-ikon { display: inline; font-size: 18px; line-height: 1; }
  .yenile-metin { display: none; }
  #genel-tarih { width: 142px; min-width: 0; }
  .menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px;
    background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(16, 24, 40, .14);
    padding: 8px 12px 12px; max-height: calc(100vh - 52px); overflow-y: auto;
  }
  .ust.menu-acik .menu { display: flex; }
  .menu a { padding: 11px 12px; font-size: 15px; }
  .menu-ek { display: block; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

  /* Sayfa */
  main { padding: 12px 12px 32px; }
  .alt { padding: 0 12px 24px; }
  h1 { font-size: 19px; }
  .baslik { margin-bottom: 12px; gap: 10px; }
  .izgara { gap: 10px; }
  .panel { padding: 12px; }
  .bolum { margin-top: 12px; }
  .kpi-izgara { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 11px 12px; }
  .kpi .ad { font-size: 10.5px; letter-spacing: .02em; }
  .kpi .deger { font-size: 19px; }
  .kpi .ek, .kpi .satir { font-size: 11.5px; }
  .kpi .rozet { position: static; align-self: flex-start; }
  .icgoru { grid-template-columns: 1fr; }

  /* Form: iOS yazarken yakınlaştırmasın (16 px), alanlar satırı doldursun */
  input[type="date"], input[type="search"], input[type="text"], input[type="password"], input[type="email"], input[type="number"], select { font-size: 16px; }
  .filtre { gap: 8px; }
  .filtre label { flex: 1 1 140px; min-width: 0; }
  .filtre label input, .filtre label select { width: 100%; }
  .secim { max-width: 100%; overflow-x: auto; }
  .secim button { white-space: nowrap; }

  /* Tablo: sayfanın içinde ikinci bir dikey kaydırma olmasın; yatayda kendi içinde kayar */
  .tablo-kap { max-height: none; }
  .tablo-arac > .filtre:first-child { flex: 1 1 100%; }
  .tablo-arac input[type="search"] { min-width: 0 !important; flex: 1 1 100%; }
  .tablo-arac > .filtre:last-child { flex: 1 1 100%; align-items: center; gap: 6px; }
  .tablo-arac > .filtre:last-child .bilgi { margin-right: auto; }
  .filtre label.kart-sira { flex: 0 1 auto; flex-direction: row; align-items: center; gap: 5px; }
  .kart-sira select { max-width: 130px; }
  th, td { padding: 7px 8px; }
  td.uzun { min-width: 160px; }
  .cubuk { grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 8px; }
  .cubuk .d { min-width: 70px; font-size: 12px; }

  /* Pencere: tam ekran */
  .ortu { padding: 0; align-items: stretch; }
  .pencere, .pencere.genis, .pencere.dar { width: 100%; max-height: none; height: 100%; border-radius: 0; }
  .pencere-bas { padding: 10px 12px; }
  .pencere-bas h2 { font-size: 15px; }
  .pencere-ic { padding: 12px; }
  .pencere .tablo-kap { max-height: none; }
  .mini > b { font-size: 15px; }
  .ekstre-ust { flex-wrap: wrap; }
}
