:root {
  --bg: #f1f5f9; --panel: #ffffff; --line: #e2e8f0; --text: #0f172a; --muted: #64748b;
  --brand: #0f766e; --brand-2: #0d9488; --brand-soft: #ccfbf1; --danger: #b91c1c; --danger-soft: #fee2e2;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --info-soft: #dbeafe;
  --side: #0b1220; --side-text: #cbd5e1; --side-active: #14b8a6; --radius: 10px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 20px; margin: 0; } h2 { font-size: 16px; margin: 0 0 10px; } h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ---- Layout ---- */
.layout { display: flex; min-height: 100vh; }
.side { width: 232px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.side .logo { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; font-weight: 700; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side .logo i { width: 28px; height: 28px; border-radius: 7px; background: var(--brand); display: inline-grid; place-items: center; font-style: normal; font-size: 10.5px; letter-spacing: -.02em; flex-shrink: 0; }
.side nav { padding: 10px; flex: 1; overflow: auto; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--side-text); margin-bottom: 2px; }
.side nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.side nav a.active { background: rgba(20,184,166,.16); color: #fff; box-shadow: inset 3px 0 0 var(--side-active); }
.side nav a .ic { width: 20px; text-align: center; opacity: .8; }
.side .foot { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.side .foot b { color: #fff; display: block; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 56px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; gap: 12px; position: sticky; top: 0; z-index: 5; }
.top .firma { min-width: 0; } .top .firma b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .top .firma span { font-size: 12px; color: var(--muted); }
.top .user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.burger { display: none; }
.content { padding: 20px; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }

/* ---- Cards / grids ---- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; } /* ızgarada boşluğu gap verir; aksi hâlde kutular kayık dizilir */
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 14px 16px; } .stat .l { font-size: 12px; color: var(--muted); } .stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; } .stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; font-size: 13px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* ---- Tables ---- */
.tbl-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f8fafc; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.row { cursor: pointer; } tr.row:hover td { background: #f0fdfa; }
td.ellip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .btns { display: flex; gap: 6px; }

/* ---- Forms ---- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search] { min-width: 260px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(13,148,136,.15); }
.toolbar input, .toolbar select { width: auto; }
textarea { min-height: 70px; resize: vertical; }
.f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; } .f label { font-size: 12px; color: var(--muted); font-weight: 600; }
.f.chk { flex-direction: row; align-items: center; gap: 8px; } .f.chk input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; } .form-grid .span2 { grid-column: span 2; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; cursor: pointer; font-weight: 500; }
.btn:hover { background: #f8fafc; } .btn:disabled { opacity: .5; cursor: default; }
.btn.p { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.p:hover { background: var(--brand-2); }
.btn.d { color: var(--danger); border-color: #fecaca; } .btn.d:hover { background: var(--danger-soft); }
.btn.s { padding: 5px 10px; font-size: 12px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #e2e8f0; color: #334155; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.err { background: var(--danger-soft); color: var(--danger); } .badge.info { background: var(--info-soft); color: #1d4ed8; } .badge.brand { background: var(--brand-soft); color: var(--brand); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; } .tabs a.active { color: var(--brand); border-color: var(--brand); } .tabs a:hover { text-decoration: none; color: var(--text); }
.hint { font-size: 12px; color: var(--muted); }
.err-box { background: var(--danger-soft); color: var(--danger); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; }

/* ---- Picker (arama listesi) ---- */
.picker { position: relative; } .picker .list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); max-height: 240px; overflow: auto; }
.picker .list div { padding: 8px 10px; cursor: pointer; font-size: 13px; } .picker .list div:hover { background: #f0fdfa; } .picker .list small { color: var(--muted); }

/* ---- Modal / toast ---- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: min(720px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal .mh { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); } .modal .mb { padding: 18px; } .modal .mf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.modal.wide { width: min(1000px, 100%); }
#toast { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
#toast div { background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; animation: in .2s ease; } #toast div.err { background: var(--danger); } #toast div.ok { background: var(--ok); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Login ---- */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0b1220, #134e4a); padding: 16px; }
.login .box { background: #fff; padding: 32px; border-radius: 14px; width: min(400px, 100%); box-shadow: 0 30px 60px rgba(0,0,0,.35); }
@media (max-width: 480px) { .login .box { padding: 24px 18px; } .login .btn { min-height: 46px; } }
.login .box h1 { margin-bottom: 4px; } .login .box p { color: var(--muted); margin: 0 0 18px; }

/* ---- Satır tablosu (fatura/teklif) ---- */
.lines td { padding: 4px 4px; } .lines input, .lines select { padding: 6px 8px; } .lines .num input { text-align: right; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; justify-content: end; max-width: 380px; margin-left: auto; font-size: 13px; } .totals b { font-size: 15px; }

@media (max-width: 900px) {
  .side { position: fixed; left: -240px; transition: left .2s; z-index: 40; } .side.open { left: 0; }
  .burger { display: inline-flex; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; } .form-grid .span2 { grid-column: auto; }
  .content { padding: 12px; } .kv { grid-template-columns: 120px 1fr; }
}

/* ---- SaaS abonelik ---- */
.abo-ban { padding: 8px 16px; background: #ecfeff; border-bottom: 1px solid #a5f3fc; font-size: 13px; color: #0f172a; }
.abo-ban.warn { background: #fffbeb; border-color: #fcd34d; }
.abo-ban.err { background: #fef2f2; border-color: #fca5a5; }
.abo-ban a { font-weight: 600; margin-left: 8px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid.c3 { grid-template-columns: 1fr; } }
.plan { border: 2px solid transparent; display: flex; flex-direction: column; }
.plan.secili { border-color: #14b8a6; }
.plan h3 { margin: 0; }
.plan .fiyat { font-size: 26px; font-weight: 700; margin: 6px 0; }
.plan .fiyat small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.plan ul { padding-left: 18px; margin: 8px 0 12px; flex: 1; }
.plan li { margin: 3px 0; }
.yasal { max-width: 860px; margin: 24px auto; line-height: 1.6; }
.yasal h2 { margin-top: 0; } .yasal h3 { margin: 16px 0 6px; }
.login .box .f.chk { margin: 6px 0; }

/* ---- Pano grafikleri (grafik.js). Renk rolleri: referans dataviz paleti, beyaz kart üzerinde doğrulandı
   (mavi/turuncu: CVD ΔE 24.7, normal ΔE 33.6, ikisi de ≥3:1). Metin seri renginde yazılmaz. ---- */
.viz { position: relative; --seri-1: #2a78d6; --seri-2: #eb6834; --kritik: #d03b3b; --izgara: #e1e0d9; --taban: #c3c2b7; --eksen-yazi: #898781; }
.viz-bas { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.viz-lejant { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.viz-lejant i, .viz-ipucu i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.viz svg { display: block; max-width: 100%; font-family: inherit; overflow: visible; }
.viz .izgara { stroke: var(--izgara); stroke-width: 1; }
.viz .taban { stroke: var(--taban); stroke-width: 1; }
.viz .sinir { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.viz text { font-size: 11px; fill: var(--eksen-yazi); font-variant-numeric: tabular-nums; }
.viz text.etiket { fill: var(--text); font-size: 12px; }
.viz text.deger { fill: var(--muted); font-size: 12px; }
.viz .isabet { fill: transparent; cursor: default; outline: none; }
.viz .isabet.vurgu, .viz .isabet:focus-visible { fill: rgba(15, 23, 42, .04); }
.viz-ipucu { position: absolute; z-index: 5; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; line-height: 1.5; min-width: 150px; }
.hero { display: flex; flex-direction: column; justify-content: center; }
.hero .l { font-size: 13px; color: var(--muted); }
.hero .v { font-size: 48px; font-weight: 600; line-height: 1.1; margin: 4px 0; letter-spacing: -.5px; }
.hero .s { font-size: 12px; color: var(--muted); }
.pano-ust { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pano-ust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .pano-ust { grid-template-columns: 1fr; } .hero .v { font-size: 36px; } }

/* ---- Yazdırılabilir çıktılar (cikti.js): A4 çerçeve; araç çubuğu ve panel menüsü çıktıda gizli ---- */
.cikti-arac { max-width: 210mm; margin: 16px auto 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cikti-arac .uyari { flex: 1; font-size: 12px; color: var(--muted); }
.c-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; } .c-form input[type=date] { padding: 4px 6px; }
.a4 { max-width: 210mm; margin: 12px auto 32px; background: #fff; color: #0f172a; padding: 14mm 12mm; font-size: 13px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.a4 small { color: #64748b; }
.c-bas { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid #0f172a; padding-bottom: 12px; }
.c-bas h1 { font-size: 19px; margin: 0 0 2px; } .c-bas h2 { font-size: 16px; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .04em; } .c-bas p { margin: 0; font-size: 11.5px; color: #475569; } .c-bas .sag { text-align: right; flex-shrink: 0; } .c-bas .sag b { color: #0f172a; }
.c-alici { margin-top: 12px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 8px 10px; } .c-alici small { display: block; text-transform: uppercase; letter-spacing: .04em; font-size: 10.5px; } .c-alici p { margin: 0; font-size: 11.5px; color: #475569; }
.c-tablo { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; } .c-tablo th { background: #f1f5f9; border-top: 1px solid #94a3b8; border-bottom: 1px solid #94a3b8; text-align: left; padding: 5px 6px; font-weight: 600; } .c-tablo td { border-bottom: 1px solid #e2e8f0; padding: 5px 6px; vertical-align: top; } .c-tablo .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-tablo.kucuk { font-size: 11.5px; } .c-tablo tr.devir td { font-style: italic; color: #475569; } .c-tablo tr.son td { border-top: 2px solid #0f172a; font-weight: 700; }
.c-toplam { display: flex; justify-content: flex-end; margin-top: 8px; } .c-toplam table { width: auto; min-width: 42%; } .c-toplam td { padding: 2px 8px; font-size: 12px; color: #475569; } .c-toplam td.num { text-align: right; font-variant-numeric: tabular-nums; color: #0f172a; } .c-toplam tr.son td { border-top: 2px solid #0f172a; font-weight: 700; color: #0f172a; padding-top: 4px; }
.c-damga { border: 2px dashed #64748b; text-align: center; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; padding: 4px; margin: 0 0 10px; color: #334155; }
.c-not { margin-top: 12px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 8px 10px; font-size: 12px; } .c-not p { margin: 2px 0 0; white-space: pre-wrap; }
.c-imza { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 40px; text-align: center; font-size: 11px; color: #64748b; } .c-imza div { border-top: 1px solid #94a3b8; padding-top: 4px; }
.c-dip { font-size: 10.5px; color: #64748b; margin-top: 6px; }
.c-mutabakat { margin-top: 20px; font-size: 12.5px; line-height: 1.6; } .c-mut-imza { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 20px; } .c-mut-imza .kutu { border: 1px solid #94a3b8; border-radius: 4px; padding: 10px; } .c-mut-imza p { margin: 4px 0; } .c-mut-imza .cizgi { margin-top: 44px; border-top: 1px solid #94a3b8; padding-top: 4px; text-align: center; font-size: 11px; color: #64748b; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  .cikti-arac, #toast, #modal-root { display: none !important; }
  .a4 { max-width: none; margin: 0; padding: 0; box-shadow: none; }
  /* Panel ekranı basılırsa menü ve üst çubuk çıkmasın */
  .side, header.top, .page-head .actions, .burger { display: none !important; }
  .main { margin: 0 !important; } .content { padding: 0 !important; }
}

/* ---- Fatura kesme ekranı (fatura_editor.js): muhasebe fişi / Excel görünümü ---- */
.fe-gorunum { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.fe-gorunum .btn { border: 0; border-radius: 0; } .fe-gorunum .btn + .btn { border-left: 1px solid var(--line); }
.fe-ust { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.fe-ust .card + .card, .fe-alt .card + .card { margin-top: 0; }
.fe-alanlar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; } .fe-alanlar .f { margin: 0; }
.fe-doviz > div { display: flex; gap: 6px; } .fe-doviz select { width: 90px; } .fe-doviz input { flex: 1; min-width: 0; text-align: right; }
.fe-cari-kart { margin-top: 10px; font-size: 13px; } .fe-cari-kart .kv { margin: 0; }
.fe-satirlar { padding: 10px; overflow: hidden; }
.fe-ipucu { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.fe-alt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 16px; margin-top: 16px; }
.fe-alt textarea { width: 100%; resize: vertical; }
.fe-yazi { margin-top: 10px; font-size: 12.5px; font-style: italic; color: var(--muted); }
.fe-toplam table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fe-toplam td { padding: 5px 4px; border-bottom: 1px solid var(--line); } .fe-toplam td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fe-toplam tr.alt td { color: var(--muted); font-size: 12.5px; padding-left: 14px; }
.fe-toplam tr.genel td { border-top: 2px solid var(--text); border-bottom: 0; font-weight: 800; font-size: 16px; padding-top: 8px; }
.fe-eylem { position: sticky; bottom: 0; z-index: 3; display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 16px; padding: 10px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -4px 12px rgba(15,23,42,.06); }
.fe-eylem .hint { margin-right: auto; }
.fe-eylem kbd { font: 11px ui-monospace, monospace; padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(0,0,0,.2); opacity: .75; margin-left: 4px; }
.fe-secim { max-height: 360px; overflow: auto; } .fe-secim table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fe-secim th { text-align: left; position: sticky; top: 0; background: var(--panel); border-bottom: 1px solid var(--line); padding: 6px; }
.fe-secim td { padding: 6px; border-bottom: 1px solid var(--line); cursor: pointer; } .fe-secim tr.sec td, .fe-secim tr:hover td { background: var(--brand-soft); }
.fe-secim .num { text-align: right; }

/* Muhasebe fişi: yoğun, kenarlıklı satır tablosu; hücre içindeki girdi hücreyi doldurur */
.fe-klasik { overflow-x: auto; }
.fe-fis { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; min-width: 1040px; }
.fe-fis th { background: #eef2f6; color: #334155; font-weight: 600; font-size: 12px; padding: 7px 6px; border: 1px solid #cbd5e1; text-align: left; white-space: nowrap; }
.fe-fis th.num { text-align: right; } .fe-fis th.no, .fe-fis td.no { width: 36px; text-align: center; color: var(--muted); } .fe-fis th.islem { width: 74px; }
.fe-fis td { border: 1px solid #dbe2ea; padding: 0; height: 32px; }
.fe-fis td input { width: 100%; height: 31px; border: 0; border-radius: 0; padding: 0 7px; background: transparent; font: inherit; box-shadow: none; }
.fe-fis td.num input { text-align: right; font-variant-numeric: tabular-nums; }
.fe-fis td input:focus { outline: 2px solid var(--brand); outline-offset: -2px; background: #f0fdfa; }
.fe-fis td.hesap { background: #f8fafc; padding: 0 7px; text-align: right; font-variant-numeric: tabular-nums; color: #334155; }
.fe-fis td.islem { text-align: center; white-space: nowrap; padding: 0 4px; } .fe-fis td.islem .btn { padding: 2px 7px; }
.fe-fis tr:focus-within td { background-color: #f0fdfa; } .fe-fis tr.bos td.no { color: #cbd5e1; }

/* Excel görünümü */
.fe-excel { border: 1px solid #c8c8c8; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 13.5px; background: #fff; }
.fe-formul { display: flex; align-items: center; border-bottom: 1px solid #c8c8c8; background: #fff; height: 30px; }
.fe-formul .ad { width: 96px; padding: 0 8px; border-right: 1px solid #d4d4d4; font-size: 12.5px; height: 100%; display: flex; align-items: center; }
.fe-formul .fx { padding: 0 10px; color: #777; font-style: italic; border-right: 1px solid #d4d4d4; height: 100%; display: flex; align-items: center; }
.fe-formul input { flex: 1; border: 0; border-radius: 0; height: 100%; padding: 0 8px; font: inherit; box-shadow: none; } .fe-formul input:focus { outline: none; background: #fafafa; }
.fe-izgara { overflow: auto; max-height: 56vh; min-height: 260px; outline: none; background: #fff; cursor: cell; user-select: none; }
.fe-izgara table { border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 100%; }
.fe-izgara thead th { position: sticky; top: 0; z-index: 2; background: #f3f3f3; color: #444; font-weight: 400; font-size: 12px; border-right: 1px solid #d4d4d4; border-bottom: 1px solid #bdbdbd; padding: 2px 6px 3px; text-align: center; line-height: 1.25; }
.fe-izgara thead th .harf { display: block; font-size: 11px; color: #777; }
.fe-izgara thead th.vurgu { background: #d2d2d2; color: #0f5a2e; border-bottom: 2px solid #217346; }
.fe-izgara th.kose { left: 0; z-index: 3; }
.fe-izgara tbody th { position: sticky; left: 0; z-index: 1; background: #f3f3f3; color: #555; font-weight: 400; font-size: 12px; text-align: center; border-right: 1px solid #bdbdbd; border-bottom: 1px solid #d4d4d4; }
.fe-izgara tbody th.vurgu { background: #d2d2d2; color: #0f5a2e; border-right: 2px solid #217346; }
.fe-izgara tbody th { padding: 0 4px; height: 24px; line-height: 23px; }
.fe-izgara td { height: 24px; line-height: 23px; padding: 0 6px; border-right: 1px solid #e1e1e1; border-bottom: 1px solid #e1e1e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.fe-izgara td.num { text-align: right; font-variant-numeric: tabular-nums; }
.fe-izgara td.hesap { background: #fafafa; color: #555; }
.fe-izgara td.sec { background: #e6f2ea; } .fe-izgara td.hesap.sec { background: #dcebe1; }
.fe-izgara td.aktif { box-shadow: inset 0 0 0 2px #217346; background: #fff; }
.fe-girdi { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; padding: 0 5px; font: inherit; box-shadow: inset 0 0 0 2px #217346; background: #fff; outline: none; }
.fe-izgara td.num .fe-girdi { text-align: right; }
.fe-durum { display: flex; justify-content: space-between; align-items: center; height: 24px; padding: 0 10px; background: #217346; color: #fff; font-size: 12px; }
.fe-durum b { font-weight: 600; }

@media (max-width: 900px) { .fe-ust, .fe-alt { grid-template-columns: 1fr; } .fe-alanlar { grid-template-columns: 1fr; } }
@media print { .fe-eylem, .fe-gorunum, .fe-ipucu { display: none !important; } }

/* Ürün adı öneri listesi (fatura_editor.js feOneri) — hücrenin altında, sayfaya sabit konumlu */
.fe-oneri { position: fixed; z-index: 60; max-width: 640px; max-height: 340px; overflow: auto; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 10px 28px rgba(15,23,42,.18); font-size: 13px; }
.fe-oneri .o { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; padding: 7px 10px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.fe-oneri .o .ad { grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fe-oneri .o .ad b { background: #fef08a; font-weight: 700; }
.fe-oneri .o .kod { grid-column: 1; font-size: 11.5px; color: var(--muted); }
.fe-oneri .o .fiyat { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; color: #334155; white-space: nowrap; }
.fe-oneri .o:hover, .fe-oneri .o.sec { background: var(--brand-soft); }
.fe-oneri .bos { padding: 10px; color: var(--muted); }
.fe-oneri .alt { position: sticky; bottom: 0; padding: 5px 10px; font-size: 11px; color: var(--muted); background: #f8fafc; border-top: 1px solid var(--line); }

/* Fatura: ambalaj (adet / kutu / koli) */
.fe-fis td.ad { position: relative; } .fe-fis td.ad input { padding-right: 96px; }
.fe-fis .fe-adet { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--brand); background: var(--brand-soft); border-radius: 4px; padding: 1px 5px; pointer-events: none; white-space: nowrap; }
.fe-fis .fe-adet:empty { display: none; }
.fe-fis td.birim-sec select { width: 100%; height: 31px; border: 0; border-radius: 0; padding: 0 4px; background: #f0fdfa; font: inherit; font-weight: 600; color: #0f5a52; cursor: pointer; }
.fe-fis td.birim-sec select:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
.fe-birimler { min-width: 280px; }
/* Bayiler → Portal ayarları: kendi alan adı */
.aa-adresler { display: grid; gap: 8px; }
.aa-adres { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; background: #f8fafc; word-break: break-all; }
.aa-baslik { margin: 22px 0 6px; padding-top: 16px; border-top: 1px solid var(--line, #e2e8f0); }
.aa-adim { display: flex; gap: 12px; margin-top: 14px; }
.aa-no { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--brand, #0f766e); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.aa-govde { flex: 1; min-width: 0; }
.aa-secenekler { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 8px 0; }
.aa-secenek { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; cursor: pointer; }
.aa-secenek:has(input:checked) { border-color: var(--brand, #0f766e); background: var(--brand-soft, #ecfdf5); }
.aa-secenek small { display: block; margin-top: 4px; }
.aa-secenek code, .aa-tablo code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.aa-satir { display: flex; align-items: center; gap: 4px; max-width: 460px; }
.aa-satir input { flex: 1; min-width: 0; }
.aa-nokta { font-weight: 700; font-size: 18px; }
.aa-onizleme { margin-top: 8px; font-size: 13px; }
.aa-tablo { width: 100%; border-collapse: collapse; font-size: 13px; }
.aa-tablo th, .aa-tablo td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line, #e2e8f0); vertical-align: top; }
.aa-ipucu { margin-top: 10px; font-size: 13px; } .aa-ipucu summary { cursor: pointer; font-weight: 600; } .aa-ipucu li { margin: 4px 0; }
.aa-durum { margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.aa-durum.ok { background: var(--ok-soft); color: var(--ok); } .aa-durum.warn { background: var(--warn-soft); color: var(--warn); } .aa-durum.err { background: var(--danger-soft); color: var(--danger); } .aa-durum.info { background: var(--info-soft); color: #1d4ed8; }
.aa-kayitlar { display: grid; gap: 10px; }
.aa-kayit { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.aa-kayit-bas { padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.aa-alan { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.aa-alan:last-child { border-bottom: 0; }
.aa-etiket { font-weight: 600; color: var(--muted); } .aa-etiket small { display: block; font-weight: 400; font-size: 11px; }
.aa-deger { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; word-break: break-all; }
.aa-deger code { font-size: 14px; font-weight: 600; background: #f1f5f9; padding: 3px 8px; border-radius: 6px; color: var(--text); }
.aa-bekliyor { color: var(--muted); font-style: italic; }
@media (max-width: 600px) { .aa-alan { grid-template-columns: 1fr; gap: 4px; } }
/* iOS Safari 16px altındaki kutuya dokununca sayfayı yakınlaştırır; telefonda kutular 16px */
@media (max-width: 700px) {
  input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], select, textarea { font-size: 16px; }
}
