:root {
  --ink: #1e1c1a;
  --paper: #ebe6de;
  --card: #ffffff;
  --line: #d8d1c6;
  --muted: #6d665d;
  --accent: #c8703f;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; color: inherit; }

/* Üst bar */
.top { background: var(--ink); color: #f3efe8; display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 54px; }
.top .brand { font-weight: 700; letter-spacing: .08em; font-size: 14px; white-space: nowrap; }
.top .brand b { color: var(--accent); }
.tabs { display: flex; gap: 4px; height: 100%; }
.tabs button { background: none; border: 0; color: #cfc8bd; padding: 0 16px; cursor: pointer; border-bottom: 3px solid transparent; font-weight: 600; }
.tabs button.on { color: #fff; border-bottom-color: var(--accent); }

/* Araç çubuğu */
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 20px; background: #f5f1ea; border-bottom: 1px solid var(--line); }
.bar select { min-width: 240px; max-width: 420px; }
.bar .sp { flex: 1; }
.btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.btn.danger { color: #a3321f; }
.btn.sm { padding: 3px 8px; font-size: 12px; }

/* Çalışma alanı */
.work { display: grid; grid-template-columns: minmax(420px, 44%) 1fr; height: calc(100vh - 54px - 53px); }
.form { overflow: auto; padding: 16px 20px 60px; border-right: 1px solid var(--line); }
.prev { overflow: auto; padding: 20px; background: #cfc8bd; }
.only { max-width: 860px; margin: 0 auto; padding: 20px 20px 60px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card h3 .sp { flex: 1; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid .full { grid-column: 1 / -1; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
label.f { display: block; font-size: 12px; color: var(--muted); }
label.f input, label.f select, label.f textarea { display: block; width: 100%; margin-top: 3px; }
input, select, textarea { border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; min-height: 60px; }
label.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

table.rows { width: 100%; border-collapse: collapse; }
table.rows th { font-size: 11px; text-align: left; color: var(--muted); font-weight: 600; padding: 0 3px 4px; }
table.rows td { padding: 2px 3px; vertical-align: top; }
table.rows input, table.rows textarea { width: 100%; padding: 5px 6px; }
table.rows textarea { min-height: 31px; height: 31px; }
table.rows .n { text-align: right; }
table.rows td.tot { text-align: right; white-space: nowrap; padding-top: 7px; font-variant-numeric: tabular-nums; }
table.rows td.ops { white-space: nowrap; width: 1%; padding-top: 4px; }
.ico { border: 0; background: none; cursor: pointer; padding: 3px 5px; color: var(--muted); border-radius: 4px; }
.ico:hover { background: #eee7dc; color: var(--ink); }
.grp { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; background: #fbf9f5; }
.grp-head { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.grp-head input { flex: 1; font-weight: 600; }
.grp-head .gt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.logo-box { display: flex; align-items: center; gap: 14px; }
.logo-box img { max-height: 70px; max-width: 220px; border: 1px dashed var(--line); padding: 4px; background: #fff; }

/* Veri girişi: ağaç + hızlı giriş tablosu */
.work.noprev { grid-template-columns: 1fr; }
.work.noprev .prev { display: none; }
.form.split { display: grid; grid-template-columns: 280px 1fr; padding: 0; overflow: hidden; }
.tree { overflow: auto; padding: 12px 10px 40px; border-right: 1px solid var(--line); background: #f5f1ea; }
.ed { overflow: auto; padding: 16px 20px 60px; }
.tree .tn, .tree .tl { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.tree .tn { font-weight: 600; margin: 2px 0; }
.tree .ta, .tree .tb { display: flex; align-items: center; border-radius: 6px; }
.tree .ta { font-weight: 600; margin-top: 4px; }
.tree .tb { padding-left: 22px; font-size: 13px; }
.tree .tl span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tree .tl b { font-weight: 600; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.tree .tl small { color: var(--muted); white-space: nowrap; }
.tree .tn:hover, .tree .ta:hover, .tree .tb:hover { background: #e9e2d6; }
.tree .tn.on, .tree .ta.on, .tree .tb.on { background: var(--ink); color: #fff; }
.tree .on .tl, .tree .on .ico, .tree .on .tl b, .tree .on .tl small { color: #fff; }
.tree .tadd { margin: 4px 0 6px 28px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 13px; }
.tools .sp { flex: 1; } .tools .vr { width: 1px; height: 20px; background: var(--line); }
.tools #topInd { width: 64px; margin-left: 4px; }
table.rows td.cb { width: 1%; padding-top: 8px; }
table.rows tr.off td:not(.cb):not(.ops) { opacity: .45; }
#katSonuc { margin-top: 6px; }
#katSonuc .hit { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px dashed var(--line); background: none; padding: 7px 4px; cursor: pointer; }
#katSonuc .hit:hover { background: #f5f1ea; }
#katSonuc .hit span { flex: 1; } #katSonuc .hit small { display: block; color: var(--muted); }
#katSonuc .hit i { font-style: normal; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Müşteriler */
.musrow { display: flex; gap: 8px; margin-top: 3px; } .musrow select { flex: 1; margin: 0 !important; } .musrow .btn { white-space: nowrap; }
input.ro { background: #f1ece4; color: var(--muted); }
.only.wide { max-width: 1180px; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { text-align: left; font-size: 11px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 7px 8px; border-bottom: 1px solid #ece6dc; vertical-align: middle; }
table.list td.mono { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
table.list td.ops { white-space: nowrap; text-align: right; }
.top .brand { font-size: 16px; }
/* Veri girişi ekleri */
label.chk.pick { padding: 6px 4px; border-bottom: 1px dashed var(--line); }
label.chk.pick span { flex: 1; }
label.chk.pick b { font-variant-numeric: tabular-nums; }
.sec { border-top: 1px dashed var(--line); padding: 8px 0; }
.scroll { overflow-x: auto; }
table.rows.wide { min-width: 760px; }
.note { display: grid; grid-template-columns: 150px 1fr auto; gap: 6px; margin-bottom: 8px; align-items: start; }
.note input { font-weight: 600; }
.logo-box img.dark { background: #000; }

/* ---------- A4 çıktı sayfaları (KA format dosyalarının düzeni) ---------- */
.sheet { zoom: var(--z, 1); width: 210mm; min-height: 297mm; margin: 0 auto 20px; background: #fff; color: #000; box-shadow: 0 4px 24px rgba(0,0,0,.25); --s: 1; --bd: .6pt dotted #000; }
.sheet table.g { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sheet table.g td, .sheet table.g th { border: var(--bd); padding: 0 calc(4pt * var(--s)); text-align: center; vertical-align: middle; font-weight: 400; overflow-wrap: anywhere; }
.sheet .hd > *, .sheet .gr > * { background: #d9d9d9; }
.sheet table.g .hd th { font-weight: 700; }
.sheet .l { text-align: left !important; } .sheet .r { text-align: right !important; }
.sheet .b { font-weight: 700 !important; } .sheet .it { font-style: italic; }
.sheet .acc { display: flex; justify-content: space-between; gap: 4px; white-space: nowrap; }
.sheet .acc i { font-style: normal; } .sheet .acc b { font-weight: inherit; }
.sheet .f11 { font-size: calc(11pt * var(--s)); } .sheet .f12 { font-size: calc(12pt * var(--s)); } .sheet .f14 { font-size: calc(14pt * var(--s)); }
.sheet .f16 { font-size: calc(16pt * var(--s)); } .sheet .f18 { font-size: calc(18pt * var(--s)); } .sheet .f26 { font-size: calc(26pt * var(--s)); }
.sheet .f28 { font-size: calc(28pt * var(--s)); } .sheet .f36 { font-size: calc(36pt * var(--s)); } .sheet .f48 { font-size: calc(44pt * var(--s)); }
.sheet .h30 > * { height: calc(30pt * var(--s)); } .sheet .h35 > * { height: calc(35pt * var(--s)); }
.sheet table.g tr { break-inside: avoid; }

/* Teklif */
.tk { --s: .77; padding: 28mm 21mm 15mm; font-family: Arial, Helvetica, sans-serif; font-size: calc(11pt * var(--s)); }
.tk-head { display: grid; grid-template-columns: 31.6fr 50fr 35.8fr; align-items: end; margin-bottom: calc(10pt * var(--s)); }
.tk-head img { height: calc(145pt * var(--s)); margin-left: 14%; display: block; }
.tk-title { font-size: calc(28pt * var(--s)); font-weight: 700; text-decoration: underline; text-align: center; padding-bottom: calc(22pt * var(--s)); white-space: nowrap; }
.tk-meta { margin-left: auto; border-collapse: collapse; font-size: calc(12pt * var(--s)); font-weight: 700; }
.tk-meta td { padding: 0 0 0 calc(10pt * var(--s)); height: calc(20pt * var(--s)); text-align: right; white-space: nowrap; }
.sheet .tk-tab th { height: calc(30pt * var(--s)); text-decoration: underline; padding: 0; white-space: nowrap; }
.sheet .tk-tab .itm td { height: calc(50pt * var(--s)); }
.sheet .tk-tab.dense .itm td { height: calc(32pt * var(--s)); }
.sheet .tk-tab .itm td:last-child { font-weight: 700; }
.sheet .tk-tab .itm.alt td { background: #f2f2f2; }
.sheet .tk-tab .itm td.d { text-align: left; white-space: pre-line; }
.sheet .tk-tab .bt td { height: calc(25pt * var(--s)); font-weight: 700; }
.sheet .tk-tab .sm td { height: calc(20pt * var(--s)); }
.sheet .tk-tab .sm.gr td { font-size: calc(10.2pt * var(--s)); white-space: nowrap; padding: 0 1pt; }
.sheet .tk-tab .bu { font-weight: 700; text-decoration: underline; }
.sheet .tk-tab td.lb { text-align: right; background: #d9d9d9; }
.sheet .tk-tab td.val { text-align: right; font-style: italic; }
.sheet .tk-tab td.nt { text-align: left; font-weight: 400; }
.sheet .tk-tab td.iban { font-size: calc(12pt * var(--s)); white-space: nowrap; padding: 0; }
.sheet .tk-tab td.web { font-size: calc(14pt * var(--s)); white-space: nowrap; padding: 0; }
.tk-sign { display: flex; justify-content: space-between; padding: calc(6pt * var(--s)) 4% 0; }
.tk-sign div { text-align: right; line-height: 1.5; }

/* İcmal ana sayfa */
.ic { --s: .6; padding: 22mm 0; font-family: Calibri, Carlito, "Segoe UI", sans-serif; }
.ic-in { width: 140mm; margin: 0 auto; }
.ic table.g + table.g { margin-top: calc(14pt * var(--s)); }
.ic .logo, .dt .logo { background: #000 !important; padding: 0 !important; }
.ic .logo img, .dt .logo img { width: 100%; display: block; }
.ic-h th { line-height: 1.15; }
.ic-h tr:first-child th { height: calc(56pt * var(--s)); }
.ic-h th.ref { line-height: 1.3; }
.ic-m td, .ic-m th { padding: 0 calc(8pt * var(--s)) !important; }
.ic-n td.note { display: table-cell; padding: calc(5pt * var(--s)) calc(4pt * var(--s)) !important; line-height: 1.25; }
.ic-n th { height: calc(35pt * var(--s)); }
.ic-n .u { text-decoration: underline; }

/* İcmal döküm sayfaları */
.dt { --s: .5; padding: 10mm 9mm; font-family: Calibri, Carlito, "Segoe UI", sans-serif; }
.dt table.g + table.g { margin-top: calc(10pt * var(--s)); }
.dt-h th { line-height: 1.1; } .dt-h .mh { height: calc(29pt * var(--s)); } .dt-h .band { height: calc(28pt * var(--s)); }
.dt-h + table.g { margin-top: calc(10pt * var(--s)); }
.dt-s td { line-height: 1.1; }
.pb { break-before: page; }

@media (max-width: 1100px) {
  .work { grid-template-columns: 1fr; height: auto; }
  .form { border-right: 0; }
  .form.split { display: block; overflow: visible; }
  .tree { max-height: 42vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .prev { padding: 10px; }
  .top { gap: 10px; padding: 0 10px; }
  .top .brand { font-size: 11px; white-space: normal; }
}

@page { size: A4; margin: 0; }
@media print {
  html, body { height: auto; background: #fff; }
  .no-print { display: none !important; }
  .work { display: block; height: auto; }
  .prev, .work.noprev .prev { display: block; padding: 0; background: #fff; overflow: visible; }
  .sheet { zoom: 1; min-height: 0; margin: 0; box-shadow: none; }
  .sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dt-s { break-inside: avoid; }
}
/* Üst bar: KTT logosu + ürün adı */
.top .brand { display: flex; align-items: center; gap: 10px; }
.top .brand img { height: 36px; width: auto; display: block; }
/* Üst menü: açılır başlıklar */
.tabs .menu { position: relative; height: 100%; display: flex; }
.tabs .menu > button .car { font-size: 10px; opacity: .7; }
.tabs .dd { display: none; position: absolute; top: 100%; left: 0; min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 8px 8px; box-shadow: 0 10px 28px rgba(0,0,0,.22); padding: 6px; z-index: 50; }
.tabs .menu.open .dd { display: block; }
.tabs .dd button { display: block; width: 100%; height: auto; text-align: left; color: var(--ink); padding: 9px 12px; border: 0; border-radius: 6px; font-weight: 500; }
.tabs .dd button:hover { background: #f1ece4; }
.tabs .dd button.on { background: var(--ink); color: #fff; border-bottom-color: transparent; }
.tabs .dd button.soon { color: var(--muted); }
/* Projeler */
.grid3 .full3 { grid-column: 1 / -1; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fbf9f5; }
.tile span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.tile b { display: block; font-size: 17px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile.good b { color: #1f7a3d; } .tile.bad b { color: #a3321f; }
.tile b i { font-style: normal; }
.late { color: #a3321f !important; }
.pbar { height: 10px; border-radius: 6px; background: #e6dfd3; margin: 12px 0 0; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--accent); }
.pbar.bad i { background: #a3321f; }
.addrow { display: grid; grid-template-columns: 150px 1fr 140px 170px auto; gap: 8px; margin-bottom: 10px; }
table.list th.n, table.list td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.list tr.plan td { color: var(--muted); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #eee7dc; color: var(--muted); white-space: nowrap; }
.tag.ok { background: #dcefe1; color: #1f7a3d; } .tag.late { background: #f6dcd6; }
.bar > b { font-size: 15px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, 1fr); } .addrow { grid-template-columns: 1fr 1fr; } }
.addrow.new { grid-template-columns: 1fr 200px auto auto; margin: 0; }
.addrow.masraf { grid-template-columns: 150px 170px 170px 1fr; }
.addrow.masraf .wide { grid-column: 1 / -1; }
.addrow.masraf .btn { grid-column: 1 / -1; justify-self: start; }
.addrow [hidden] { display: none; }
.addrow input, .addrow select { min-width: 0; width: 100%; }
/* ---------- Kullanıcı girişi, profil, yönetici paneli ---------- */
.top .sp { flex: 1; }
.who { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.who button { border: 0; background: none; color: #cfc8bd; cursor: pointer; padding: 6px 10px; border-radius: 6px; }
.who .me { font-weight: 600; color: #fff; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.who .out { border: 1px solid #55504a; }
.who button:hover { background: #33302c; color: #fff; }
.net { font-size: 12px; color: #ffb3a3; white-space: nowrap; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 26px 26px 22px; box-shadow: 0 12px 40px rgba(0,0,0,.12); display: grid; gap: 12px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .08em; font-size: 18px; }
.auth-brand img { height: 44px; } .auth-brand b { color: var(--accent); }
.auth-card h2 { margin: 4px 0 0; font-size: 18px; }
.auth-card .hint { margin: 0; }
.btn.big { padding: 10px 14px; font-size: 15px; }
.lnk { border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 2px; justify-self: start; }
.note { margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.note.ok { background: #dcefe1; color: #1f5f33; } .note.bad { background: #f6dcd6; color: #8a2a19; }
.auth-card .note { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--card); padding: 8px 16px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; font-weight: 600; }
.addrow.user { grid-template-columns: 1fr 1fr 150px auto; margin: 0; }
.linkbox { border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------- Koyu tema (çıktı sayfaları beyaz kalır) ---------- */
html[data-theme="dark"] { --ink: #ece7df; --paper: #161514; --card: #211f1d; --line: #3a3632; --muted: #a39b90; color-scheme: dark; }
html[data-theme="dark"] .top { background: #0e0d0c; }
html[data-theme="dark"] .bar, html[data-theme="dark"] .tree, html[data-theme="dark"] .grp, html[data-theme="dark"] .tile { background: #1b1a18; }
html[data-theme="dark"] .btn { background: #2a2725; color: var(--ink); }
html[data-theme="dark"] .btn.pri { background: var(--accent); color: #fff; }
html[data-theme="dark"] .btn.dark { background: #ece7df; border-color: #ece7df; color: #161514; }
html[data-theme="dark"] .btn.danger, html[data-theme="dark"] .late { color: #f0a394 !important; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #1a1917; color: var(--ink); }
html[data-theme="dark"] input.ro { background: #2a2725; color: var(--muted); }
html[data-theme="dark"] .prev { background: #0e0d0c; }
html[data-theme="dark"] .ico:hover, html[data-theme="dark"] .tree .tn:hover, html[data-theme="dark"] .tree .ta:hover, html[data-theme="dark"] .tree .tb:hover,
html[data-theme="dark"] .tabs .dd button:hover, html[data-theme="dark"] #katSonuc .hit:hover { background: #2c2926; }
html[data-theme="dark"] .tree .tn.on, html[data-theme="dark"] .tree .ta.on, html[data-theme="dark"] .tree .tb.on, html[data-theme="dark"] .tabs .dd button.on { background: var(--accent); color: #fff; }
html[data-theme="dark"] .tabs .dd { background: #211f1d; }
html[data-theme="dark"] table.list td { border-bottom-color: #2e2b28; }
html[data-theme="dark"] .tag, html[data-theme="dark"] .pbar { background: #2c2926; }
html[data-theme="dark"] .tag.ok, html[data-theme="dark"] .note.ok { background: #1d3a27; color: #8fdca8; }
html[data-theme="dark"] .tag.late, html[data-theme="dark"] .note.bad { background: #4a221b; color: #f0a394; }
html[data-theme="dark"] .tile.good b { color: #8fdca8; } html[data-theme="dark"] .tile.bad b { color: #f0a394; }
html[data-theme="dark"] .sheet, html[data-theme="dark"] .sheet input { color: #000; color-scheme: light; }
@media (max-width: 1100px) { .who .me { display: none; } .addrow.user { grid-template-columns: 1fr; } }
/* ---------- Revizyon, anlaşma, müşteri belgeleri, silme talepleri ---------- */
.bar .vr { width: 1px; height: 22px; background: var(--line); }
.revbar { display: inline-flex; gap: 8px; align-items: center; }
.bar .revbar select { min-width: 210px; }
a.btn { text-decoration: none; color: inherit; display: inline-block; }
.card.anl { border-style: dashed; }
.card.anl.ok { border: 1px solid #1f7a3d; background: #f1f8f3; }
.card.anl p { margin: 0 0 8px; }
.info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 20px; }
.info .w { grid-column: 1 / -1; }
.info span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.info b { font-weight: 600; overflow-wrap: anywhere; }
.revline { margin: 2px 0; white-space: nowrap; font-size: 12.5px; }
a.tag { text-decoration: none; cursor: pointer; background: var(--accent); color: #fff; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #a3321f; color: #fff; font-size: 11px; text-align: center; }
html[data-theme="dark"] .card.anl.ok { background: #16261b; border-color: #2f6b45; }
/* ---------- Lisans ve platform paneli ---------- */
.top .plat { font-size: 11px; letter-spacing: .14em; color: #cfc8bd; border: 1px solid #55504a; border-radius: 4px; padding: 2px 6px; margin-left: 4px; }
.who .firm { color: #cfc8bd; font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; border-right: 1px solid #55504a; }
.lic { padding: 8px 20px; font-size: 13px; background: #f6ecd2; color: #6b5210; border-bottom: 1px solid var(--line); }
.lic.bad { background: #f6dcd6; color: #8a2a19; font-weight: 600; }
.addrow.kod { grid-template-columns: 280px auto 1fr; margin: 12px 0 0; }
.addrow.paket { grid-template-columns: 1fr 120px 100px 120px 120px 90px auto auto auto; margin: 0; align-items: center; }
.mono { font-family: Consolas, "Courier New", monospace; }
textarea.ro { width: 100%; background: #f1ece4; }
tr.editrow input { width: 100%; } tr.editrow td input.n { width: 64px; }
table.list small { color: var(--muted); }
html[data-theme="dark"] .lic { background: #3a3114; color: #ecd58a; } html[data-theme="dark"] .lic.bad { background: #4a221b; color: #f0a394; }
html[data-theme="dark"] textarea.ro { background: #2a2725; }
@media (max-width: 1100px) { .addrow.paket, .addrow.kod { grid-template-columns: 1fr 1fr; } .who .firm { display: none; } }
.addrow.ek { grid-template-columns: 220px 90px auto 1fr; margin: 0; }
button.tag.dl { border: 0; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; }
/* ---------- Telefon ekranı (KTT CRM Mobil ve dar tarayıcı) ---------- */
@media (max-width: 700px) {
  body { font-size: 15px; }
  .top { height: auto; min-height: 52px; flex-wrap: wrap; gap: 6px 10px; padding: 6px 10px; padding-top: max(6px, env(safe-area-inset-top)); }
  .top .brand img { height: 30px; }
  .tabs { order: 3; width: 100%; height: 40px; overflow-x: auto; }
  .tabs button { padding: 0 12px; white-space: nowrap; }
  .tabs .dd { position: fixed; left: 8px; right: 8px; top: auto; margin-top: 40px; min-width: 0; border-radius: 8px; max-height: 70vh; overflow: auto; }
  .tabs .dd button { padding: 13px 12px; }
  .who .out { padding: 6px 8px; }
  .bar { padding: 8px 10px; } .bar select, .bar .revbar select { min-width: 0; max-width: 100%; flex: 1; }
  .only, .only.wide { padding: 10px 10px 80px; }
  .form { padding: 10px 10px 60px; } .ed { padding: 10px; } .prev { padding: 6px; }
  .grid, .grid3, .info { grid-template-columns: 1fr; } .grid .full, .grid3 .full3, .info .w { grid-column: auto; }
  .addrow, .addrow.masraf, .addrow.new, .addrow.user, .addrow.kod, .addrow.paket, .addrow.ek { grid-template-columns: 1fr; }
  .addrow.masraf .wide, .addrow.masraf .btn { grid-column: auto; justify-self: stretch; }
  .tiles { grid-template-columns: 1fr 1fr; } .tile b { font-size: 15px; }
  input, select, textarea, .btn { min-height: 40px; font-size: 16px; }      /* 16px: iOS odaklanınca yakınlaştırmasın */
  .btn.sm { min-height: 34px; font-size: 13px; padding: 5px 10px; }
  table.rows input, table.rows textarea { min-height: 36px; }
  .note { grid-template-columns: 1fr; }
  .musrow { flex-wrap: wrap; }
  .auth { padding: 12px; align-items: start; padding-top: max(24px, env(safe-area-inset-top)); }
}
/* ---------- Satın alma sayfası ---------- */
.auth-card.wide { max-width: 760px; }
.havale { white-space: pre-line; border: 1px dashed var(--line); border-radius: 8px; padding: 12px; background: #fbf9f5; font-weight: 600; }
table.paketler td { padding: 10px 8px; }
#iyzForm { min-height: 120px; }
html[data-theme="dark"] .havale { background: #1b1a18; }
