:root {
  --navy: #1f3864; --navy2: #2e4f8a; --ink: #1d2433; --muted: #6b7385; --line: #dfe3ea; --bg: #f4f6f9;
  --ok: #c6efce; --ok-ink: #006100; --bad: #ffc7ce; --bad-ink: #9c0006; --warn: #fce4d6; --warn-ink: #8a4b08;
  --in: #fffbe6; --in-ink: #1f4fbf;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.4 "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
button { font: inherit; cursor: pointer; border-radius: 6px; padding: 7px 14px; border: 1px solid var(--line); background: #fff; }
button.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
button.primary:hover { background: var(--navy2); }
button.ghost:hover { background: #eef1f6; }

.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar .logo { height: 46px; }
.topbar h1 { margin: 0; font-size: 18px; color: var(--navy); }
.topbar .sub { color: var(--muted); font-size: 12px; }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; }

.layout > * { min-width: 0; }
.layout { display: grid; grid-template-columns: 360px 1fr; gap: 16px; padding: 16px 20px; align-items: start; }
.inputs { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px 0; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.inputs details { border-bottom: 1px solid var(--line); }
.inputs details:last-child { border-bottom: 0; }
.inputs summary { padding: 10px 14px; font-weight: 600; color: var(--navy); cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.inputs summary::after { content: "▾"; color: var(--muted); }
.inputs details:not([open]) summary::after { content: "▸"; }
.inputs .fields { padding: 0 14px 12px; display: grid; grid-template-columns: 1fr 120px; gap: 6px 10px; align-items: center; }
.inputs label { font-size: 12.5px; color: #3a4252; }
.inputs label small { color: var(--muted); display: block; font-size: 11px; }
.inputs input, .inputs select { width: 100%; padding: 5px 7px; border: 1px solid #cfd5df; border-radius: 5px; background: var(--in); color: var(--in-ink); font: inherit; font-size: 13px; }
.inputs .wide { grid-column: 1 / -1; }
.inputs .fields .full { grid-column: 1 / -1; }
.inputs input:focus, .inputs select:focus { outline: 2px solid #9db7ea; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; border-left: 5px solid var(--line); min-width: 0; }
.card.ok { border-left-color: #3aa65a; } .card.bad { border-left-color: #d1394b; }
.card .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.card .v { font-size: 17px; font-weight: 600; margin-top: 2px; word-break: break-word; }
.card .s { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-word; }

.alerts { background: #fff6e5; border: 1px solid #f3d69b; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; color: #6b4a00; }
.alerts ul { margin: 4px 0 0 18px; padding: 0; }
.alerts.bad { background: #fde8ea; border-color: #f1b3bb; color: #7a1020; }

.tabs { display: flex; gap: 4px; margin-bottom: 0; }
.tabs button { border-radius: 8px 8px 0 0; border-bottom: 0; background: #e9edf3; color: #44506a; }
.tabs button.active { background: #fff; color: var(--navy); font-weight: 600; }
.tab { background: #fff; border: 1px solid var(--line); border-radius: 0 10px 10px 10px; padding: 14px; }
.hidden { display: none !important; }
.panel { margin-bottom: 14px; }
.panel-h { font-weight: 600; color: #fff; background: var(--navy); padding: 6px 10px; border-radius: 6px 6px 0 0; font-size: 13px; }
.panel-h .muted { color: #c7d2ea; font-weight: 400; margin-left: 8px; }
.two { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.hint { color: var(--muted); font-size: 12px; margin: 6px 2px; }
.muted { color: var(--muted); }

.table-wrap { overflow: auto; max-height: 470px; border: 1px solid var(--line); border-top: 0; }
table.grid { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.grid th { position: sticky; top: 0; background: #eef1f6; color: #2b3550; font-weight: 600; text-align: center; padding: 5px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: 4px 6px; border-bottom: 1px solid #eef0f4; text-align: right; white-space: nowrap; }
table.grid td.l { text-align: left; }
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:hover td { background-color: #f3f6fb; }
table.grid tbody tr.sel td { box-shadow: inset 0 2px 0 var(--navy), inset 0 -2px 0 var(--navy); font-weight: 600; }
td.ok, span.ok, div.ok { background: var(--ok) !important; color: var(--ok-ink); }
td.bad, span.bad, div.bad { background: var(--bad) !important; color: var(--bad-ink); }
td.warn, span.warn { background: var(--warn) !important; color: var(--warn-ink); }
table.grid td.why { text-align: left; white-space: normal; min-width: 180px; font-size: 11.5px; }

table.kv { width: 100%; border-collapse: collapse; font-size: 13px; border: 1px solid var(--line); border-top: 0; }
table.kv td { padding: 5px 8px; border-bottom: 1px solid #eef0f4; vertical-align: top; }
table.kv td:first-child { color: #4a5368; width: 52%; }
table.kv td:last-child { font-weight: 600; }
table.kv td.ok, table.kv td.bad { border-radius: 0; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }

/* ---------- A4 sayfaları (önizleme + baskı) ---------- */
.preview { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 10px; background: #e6e9ef; border-radius: 8px; overflow: auto; }
.page { background: #fff; color: #111; box-shadow: 0 2px 10px rgba(0,0,0,.18); font-family: Arial, Helvetica, sans-serif; position: relative; overflow: hidden; flex: none; }
.page.portrait { width: 210mm; height: 297mm; padding: 10mm 12mm; }
.page.landscape { width: 297mm; height: 210mm; padding: 7mm 9mm; }

/* Föy */
.foy { font-size: 8.9pt; }
.foy .head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--navy); padding-bottom: 3px; }
.foy .brand { display: flex; align-items: center; gap: 8px; }
.foy .brand img { height: 20mm; }
.foy .brand b { font-size: 17pt; color: var(--navy); }
.foy .head h2 { margin: 0; color: var(--navy); font-size: 15pt; }
.foy .tip { color: #c55a11; font-weight: 700; font-size: 10.5pt; margin: 3px 0 2px; }
.foy table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.foy td { padding: 1.4px 4px; border-bottom: 1px solid #d9d9d9; vertical-align: top; }
.foy td.lb { color: #333; } .foy td.v { font-weight: 700; }
.foy .sec { background: var(--navy); color: #fff; font-weight: 700; padding: 2px 5px; margin-top: 5px; font-size: 9.4pt; }
.foy .meta td { border: 0; padding: 1.5px 4px; }
.foy .note { font-weight: 700; color: var(--navy); margin: 3px 0; font-size: 9pt; }
.foy td.ok { background: var(--ok); color: var(--ok-ink); } .foy td.bad { background: var(--bad); color: var(--bad-ink); }
.foy .chart { margin-top: 2px; height: 42mm; }
.foy .chart svg { height: 100%; width: 100%; max-width: none !important; }
.foy .foot { margin-top: 1mm; font-size: 7.5pt; color: #666; border-top: 1px solid #ccc; padding-top: 2px; }

/* Çizim sayfası */
.cizim { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; gap: 0 8mm; height: 100%; font-size: 7.6pt; }
.cizim .ttl { grid-column: 1 / -1; display: flex; justify-content: space-between; font-weight: 700; color: var(--navy); font-size: 10pt; margin-bottom: 3mm; }
.cizim .ttl .uyari { color: #c00000; }
.cizim .img-box { position: relative; height: 178mm; align-self: start; }
.cizim .img-box img { height: 100%; width: auto; display: block; }
.cizim .ov { position: absolute; display: flex; font-weight: 700; font-size: 7.5pt; line-height: 1; white-space: nowrap; color: #000; }
.cizim .ov span { background: #fff; padding: 0 1px; }
.cizim .ov.h-left { justify-content: flex-start; } .cizim .ov.h-center { justify-content: center; }
.cizim .ov.v-bottom { align-items: flex-end; } .cizim .ov.v-center { align-items: center; }
.cizim .ov.rot span { transform: rotate(-90deg); display: inline-block; }
.cizim .right { display: flex; flex-direction: column; gap: 3mm; font-style: italic; min-width: 0; }
.cizim table { border-collapse: collapse; width: 100%; }
.cizim .ekipman td, .cizim .ekipman th { border: 1px solid #999; padding: 0.4px 3px; line-height: 1.25; }
.cizim .ekipman th { background: #f2f2f2; font-weight: 700; }
.cizim .ekipman td:nth-child(1), .cizim .ekipman td:nth-child(4) { text-align: center; }
.cizim .onay { border: 1px solid #999; padding: 1mm 3mm 2mm; }
.cizim .onay .h { text-align: center; font-size: 9.5pt; border-bottom: 1px solid #999; margin: 0 -3mm 1.5mm; padding-bottom: 1mm; }
.cizim .onay .row { display: flex; gap: 4mm; margin: 1mm 0; }
.cizim .tb { border: 1px solid #999; }
.cizim .tb td { border: 1px solid #bbb; padding: 1.2px 3px; }
.cizim .tb .proj { text-align: center; font-size: 10pt; }
.cizim .tb img { height: 15mm; }
.cizim .copy { font-size: 5.5pt; }
.cizim .foot { grid-column: 1 / -1; font-size: 7pt; color: #555; }
.cizim .yok { border: 1px dashed #aaa; color: #666; padding: 10mm; text-align: center; font-style: normal; }

.print-only { display: none; }
@media print {
  @page { size: A4 portrait; margin: 0; }
  @page landscape { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .page { box-shadow: none; break-after: page; }
  .page:last-child { break-after: auto; }
  .page.landscape { page: landscape; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; } .inputs { position: static; max-height: none; }
  .cards { grid-template-columns: repeat(2, 1fr); } .two { grid-template-columns: 1fr; }
}

.beta { font-size: 10px; font-weight: 700; color: #8a4b08; background: #fce4d6; border: 1px solid #f3c9a8; border-radius: 4px; padding: 1px 6px; vertical-align: middle; letter-spacing: .04em; }
/* Telefon: ana ekran uygulaması */
@media (max-width: 700px) {
  .topbar { position: static; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); flex-wrap: wrap; }
  .topbar .logo { height: 34px; } .topbar h1 { font-size: 15px; } .topbar .sub { display: none; }
  .topbar .actions { width: 100%; margin-left: 0; flex-wrap: wrap; } .topbar .actions button { flex: 1; }
  .layout { padding: 10px; gap: 10px; } .cards { grid-template-columns: 1fr; }
  .inputs .fields { grid-template-columns: 1fr 150px; }
  .topbar .title { flex: 1; min-width: 0; }
  .inputs input, .inputs select { font-size: 16px; }
  .tabs { overflow-x: auto; } .tabs button { white-space: nowrap; font-size: 13px; padding: 7px 10px; }
  .tab { padding: 8px; } table.kv td:first-child { width: 48%; }
  .preview { align-items: flex-start; }
}

/* ---------------------------------------------------------------- açılış + giriş ekranı */
html.kilitli body > header, html.kilitli body > main { visibility: hidden; }
html.kilitli, html.kilitli body { overflow: hidden; }
.giris { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 700px at 70% 10%, #2f6fb0 0%, rgba(47,111,176,0) 60%), linear-gradient(160deg, #0d1f3d 0%, #1f3864 55%, #24508a 100%);
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); transition: opacity .6s ease, transform .6s ease; }
.giris[hidden] { display: none; }
.giris.cikis { opacity: 0; transform: scale(1.03); pointer-events: none; }
.grs-icerik { position: relative; z-index: 2; width: 100%; max-width: 400px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.grs-logo { width: 104px; height: 104px; border-radius: 24px; background: #fff; display: grid; place-items: center; box-shadow: 0 18px 40px rgba(0,0,0,.35);
  animation: grsBelir .9s cubic-bezier(.2,.8,.2,1) both; }
.grs-logo { background: #2254d3; overflow: hidden; }
.grs-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.giris h1 { font-size: 24px; margin: 20px 0 6px; font-weight: 600; letter-spacing: .2px; animation: grsBelir .9s .15s cubic-bezier(.2,.8,.2,1) both; }
.grs-alt { margin: 0; color: #c9d6ea; font-size: 14px; max-width: 340px; animation: grsBelir .9s .3s cubic-bezier(.2,.8,.2,1) both; }
.grs-kart { width: 100%; margin-top: 26px; background: rgba(255,255,255,.97); color: var(--ink); border-radius: 16px; padding: 18px 20px 16px; text-align: left;
  box-shadow: 0 24px 60px rgba(4,14,32,.45); display: grid; gap: 6px; opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.2,1); }
.giris.form-acik .grs-kart { opacity: 1; transform: none; pointer-events: auto; }
.grs-ust { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.grs-kart label { font-size: 12.5px; color: #3a4252; margin-top: 4px; }
.grs-kart input:not([type=checkbox]) { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #cfd6e2; border-radius: 8px; width: 100%; background: #fff; }
.grs-kart input:focus { outline: 2px solid #6d9ee0; outline-offset: 0; border-color: #6d9ee0; }
.grs-kart .grs-hatirla { display: flex; gap: 6px; align-items: center; color: var(--muted); margin-top: 6px; }
.grs-kart button[type=submit] { margin-top: 8px; padding: 11px; font-size: 15px; font-weight: 600; border-radius: 8px; }
.grs-hata { background: var(--bad); color: var(--bad-ink); border-radius: 6px; padding: 7px 10px; font-size: 13px; margin-top: 4px; }
.grs-hata[hidden] { display: none; }
.grs-not { color: var(--muted); font-size: 11.5px; text-align: center; margin-top: 4px; }
.grs-kart.salla { animation: grsSalla .4s; }
.dil-sec { display: inline-flex; border: 1px solid #cfd6e2; border-radius: 8px; overflow: hidden; background: #f1f4f9; }
.dil-sec button { border: 0; border-radius: 0; background: transparent; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.dil-sec button.active { background: var(--navy); color: #fff; }
.dil-sec.mini button { padding: 6px 9px; font-size: 12px; font-weight: 600; }
.cikis-btn #kullaniciAd { font-size: 12.5px; color: var(--muted); }
.cikis-btn #kullaniciAd::after { content: ' ·'; }
.grs-tank { position: absolute; right: 7%; top: 50%; width: 260px; transform: translateY(-58%); opacity: .22; z-index: 1; }
.tk-dis { fill: none; stroke: #fff; stroke-width: 3; }
.tk-kapak { fill: #fff; opacity: .7; }
.tk-su { fill: #7fb8ff; opacity: .55; animation: tkSu 6s ease-in-out infinite; }
.tk-pompa { fill: #fff; }
.tk-boru { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.tk-kab { fill: #fff; animation: tkKab 3.2s linear infinite; }
.tk-kab.k2 { animation-delay: 1.1s; } .tk-kab.k3 { animation-delay: 2.1s; }
.grs-dalga { position: absolute; left: 0; bottom: 0; width: 200%; height: 26vh; min-height: 120px; z-index: 0; }
.grs-dalga path { animation: dalga 16s linear infinite; }
.grs-dalga .d1 { fill: rgba(126,184,255,.16); }
.grs-dalga .d2 { fill: rgba(126,184,255,.22); animation-duration: 11s; animation-direction: reverse; }
.grs-dalga .d3 { fill: rgba(255,255,255,.10); animation-duration: 8s; }
@keyframes dalga { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tkSu { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-34px); } }
@keyframes tkKab { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-90px); opacity: 0; } }
@keyframes grsBelir { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes grsSalla { 0%,100% { transform: none; } 25% { transform: translateX(-8px); } 50% { transform: translateX(7px); } 75% { transform: translateX(-4px); } }
@media (max-width: 900px) { .grs-tank { display: none; } }
@media (max-width: 700px) { .giris h1 { font-size: 20px; } .grs-logo { width: 88px; height: 88px; } .grs-kart { margin-top: 20px; } .topbar .actions { display: grid; grid-template-columns: auto 1fr 1.4fr auto; gap: 6px; } .topbar .actions > button { padding: 7px 8px; font-size: 13px; } .topbar .actions .dil-sec button { flex: none; } .cikis-btn #kullaniciAd { display: none; } }
@media (prefers-reduced-motion: reduce) { .giris *, .giris { animation: none !important; transition: none !important; } }
@media print { .giris { display: none !important; } html.kilitli body > header, html.kilitli body > main { visibility: visible; } }
.inputs input.par::placeholder { color: #9aa3b2; }
.inputs input.par.degisti { background: var(--warn); color: var(--warn-ink); font-weight: 600; }
.inputs .par-not { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.inputs .par-not small { color: var(--muted); font-size: 11px; }
.inputs .par-not button { align-self: flex-start; font-size: 12px; padding: 5px 10px; }

/* giriş hatası + kayıt talebi */
.grs-hata { display: flex; align-items: center; gap: 8px; border: 1px solid #f19aa5; font-weight: 600; }
.grs-hata .ikon { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--bad-ink); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.grs-kart input.hatali, .grs-kart textarea.hatali { border-color: #d64b5d; background: #fff6f7; }
.grs-gecis { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.grs-gecis a { color: var(--navy2); font-weight: 600; text-decoration: none; }
.grs-gecis a:hover { text-decoration: underline; }
.grs-kart[hidden] { display: none; }
.grs-kart.kayit { max-height: calc(100vh - 230px); overflow: auto; }
.kayit-acik { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.kayit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.kayit-grid label { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.kayit-grid .tam { grid-column: 1 / -1; }
.kayit-grid input, .kayit-grid textarea { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid #cfd6e2; border-radius: 8px; width: 100%; background: #fff; }
.grs-kart.kayit button[type=submit] { width: 100%; margin-top: 10px; padding: 11px; font-size: 15px; font-weight: 600; border-radius: 8px; }
.kayit-tamam { text-align: center; padding: 6px 4px; }
.kayit-tamam p { margin: 6px 0; font-size: 13.5px; }
.kayit-tamam .tamam-ikon { width: 46px; height: 46px; border-radius: 50%; background: var(--ok); color: var(--ok-ink); display: grid; place-items: center; font-size: 24px; font-weight: 700; margin: 4px auto 8px; }
.giris:has(.kayit:not([hidden])) .grs-alt, .giris:has(.kayit:not([hidden])) h1 { display: none; }
@media (max-width: 700px) { .kayit-grid { grid-template-columns: 1fr; } .grs-kart.kayit { max-height: calc(100vh - 150px); } }
.giris:has(.kayit:not([hidden])) .grs-logo { width: 64px; height: 64px; border-radius: 16px; animation: none; }
.giris:has(.kayit:not([hidden])) .grs-kart { margin-top: 14px; }
.grs-not .imza { font-style: italic; }

/* ---------------------------------------------------------------- teklif */
.inputs textarea { width: 100%; padding: 5px 7px; border: 1px solid #cfd5df; border-radius: 5px; background: var(--in); color: var(--in-ink); font: inherit; font-size: 13px; resize: vertical; }
.inputs input.degisti { border-color: #e69138; background: #fff4e5; }
.teklif-ust { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.teklif-ust .hint { margin: 0; flex: 1; }
.teklif-ust button { white-space: nowrap; }
.page.tk { width: 210mm; padding: 10mm 15mm; font-size: 8.6pt; line-height: 1.32; color: #000; }
.page.tk.tk-a4 { height: 297mm; display: flex; flex-direction: column; }
.page.tk.tk-akis { min-height: 297mm; overflow: visible; }
.tk p { margin: 0 0 3.2mm; }
.tk-ust { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 3mm; }
.tk-wetpit { height: 17mm; width: auto; }
.tk-partner { text-align: right; font-size: 8pt; }
.tk-partner img { display: block; height: 9mm; margin: 2mm 0 0 auto; }
.tk-kutu { border: 1px solid #000; display: flex; justify-content: space-between; padding: 1.5mm 3mm; }
.tk-kutu > div:first-child b { display: block; }
.tk-kutu > div:first-child img { height: 11mm; margin-top: 1mm; }
.tk-sirket { width: 47%; }
.tk-sirket table { border-collapse: collapse; } .tk-sirket td { padding: 0 4mm 0 0; }
.tk-alici { display: flex; justify-content: space-between; margin-top: 11mm; gap: 8mm; }
.tk-adres { margin-top: 6mm; }
.tk-no { text-align: right; min-width: 55mm; padding-top: 5mm; }
.tk-tarih { margin-top: 24mm; }
.tk-konu { font-weight: 700; font-size: 9.6pt; margin: 14mm 0 4mm; }
.tk-imza { margin-top: 24mm; display: flex; flex-direction: column; }
.tk-iletisim { display: flex; flex-direction: column; margin-top: 4mm; }
.tk-dok { margin: auto 0 12mm 0; border-collapse: collapse; width: 82mm; font-weight: 700; }
.tk-dok td { border: 1px solid #000; padding: 0.8mm 2mm; } .tk-dok td:first-child { width: 42%; }
.tk-kalem { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tk-kalem th { font-weight: 700; text-align: right; padding: 1.5mm 1mm; border-bottom: 1.5px solid #000; }
.tk-kalem th:nth-child(1), .tk-kalem th.l { text-align: left; }
.tk-kalem td { padding: 0.8mm 1mm; text-align: right; vertical-align: top; }
.tk-kalem td:nth-child(1) { text-align: left; } .tk-kalem td.l { text-align: left; }
.tk-kalem td:nth-child(3) { text-align: right; padding-right: 4mm; }
.tk-blok { break-inside: avoid; page-break-inside: avoid; border-bottom: 1.5px solid #000; }
.tk-bas td { padding-top: 2.5mm; }
.tk-detay td { padding-bottom: 3mm; }
.tk-detay td.l > div { min-height: 1em; }
.tk-bos { height: 2.5mm; }
.tk-det { border-collapse: collapse; } .tk-det td { padding: 0 6mm 0 0 !important; text-align: left !important; }
.tk-genel { display: flex; justify-content: flex-end; margin-top: 4mm; break-inside: avoid; }
.tk-genel table { border-collapse: collapse; width: 82mm; }
.tk-genel td { border: 1px solid #000; padding: 1.8mm 2mm; font-weight: 700; } .tk-genel td:last-child { text-align: right; }
.tk-eksik { color: #c00000; font-weight: 400; font-size: 7.5pt; }
.tk-baslik { font-weight: 700; margin: 0 0 3mm 2mm; }
.tk-sart { width: 100%; border-collapse: collapse; border-top: 1.5px solid #000; }
.tk-sart td { padding: 1.4mm 0; vertical-align: top; } .tk-sart td:first-child { width: 43mm; font-weight: 700; padding-right: 3mm; }
.tk-sart ul { margin: 0; padding-left: 4mm; } .tk-sart li { margin: 0; }
.tk-onay { display: flex; justify-content: space-between; margin-top: 12mm; padding: 0 2mm; }
.tk-banka { margin-top: auto; margin-bottom: 4mm; width: 100%; border-collapse: collapse; font-size: 9.3pt; font-weight: 700; }
.tk-banka th, .tk-banka td { border: 1px solid #000; padding: 1.3mm 1.5mm; text-align: left; }
.tk-banka th { font-weight: 400; }
@media print {
  @page teklif { size: A4 portrait; margin: 10mm 0; }
  .page.tk { page: teklif; padding: 0 15mm; }
  .page.tk.tk-a4 { height: 277mm; }
  .page.tk.tk-akis { min-height: 0; }
  .tk-kalem thead { display: table-header-group; }
}
@media (max-width: 700px) { .teklif-ust { flex-direction: column; } }

/* ---------------------------------------------------------------- teklif kaydı / pipeline */
.teklif-btn { display: flex; gap: 8px; }
.kayit-mesaj { font-size: 13px; font-weight: 600; min-height: 0; margin: 0 0 6px; }
.kayit-mesaj.ok { color: var(--ok-ink); } .kayit-mesaj.bad { color: var(--bad-ink); }
.pl-ozet { display: grid; grid-template-columns: 1.3fr repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
@media (max-width: 1100px) { .pl-ozet { grid-template-columns: repeat(4, 1fr); } }
.pl-k { min-width: 0; text-align: left; background: #fff; border: 1px solid #dfe3ea; border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; color: inherit; }
.pl-k.ana { cursor: default; background: #eef3fb; border-color: #c9d6ea; }
.pl-k.sec { outline: 2px solid var(--navy); }
.pl-k .k { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .04em; color: #5b6575; }
.pl-k .v { font-size: 20px; font-weight: 700; color: var(--navy); }
.pl-k .s { font-size: 12px; color: #5b6575; }
.pl-filtre { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.pl-filtre input, .pl-filtre select { padding: 5px 7px; border: 1px solid #cfd5df; border-radius: 5px; font: inherit; font-size: 13px; max-width: 180px; }
.pl-filtre input[type=search] { min-width: 210px; max-width: none; }
.pl-sag { margin-left: auto; flex-wrap: wrap; display: flex; gap: 6px; }
.pl-yukle { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid #cfd5df; border-radius: 6px; cursor: pointer; font-size: 13px; background: #fff; }
.pl-yukle input { display: none; }
.pl-bos { padding: 24px; text-align: center; color: #5b6575; border: 1px dashed #c9d0db; border-radius: 8px; }
.pl-tablo { font-size: 12px; }
.pl-tablo th[data-k] { cursor: pointer; }
.pl-tablo td, .pl-tablo th { padding: 4px 5px; }
.pl-tablo th.asc::after { content: ' ▲'; font-size: 9px; } .pl-tablo th.desc::after { content: ' ▼'; font-size: 9px; }
.pl-tablo td.l { text-align: left; }
.pl-tablo select.pl-durum { font: inherit; font-size: 12px; padding: 2px 4px; border-radius: 4px; border: 1px solid #cfd5df; }
.pl-durum.d-5 { background: var(--ok); color: var(--ok-ink); } .pl-durum.d-6 { background: var(--bad); color: var(--bad-ink); }
.pl-is { white-space: nowrap; } .pl-is button { padding: 3px 8px; font-size: 12px; }
.pl-is button.sil.onay { background: var(--bad); color: var(--bad-ink); border-color: var(--bad-ink); }
.pl-tablo tfoot td { border-top: 2px solid #c9d0db; }
table.grid.pl-tablo th, table.grid.pl-tablo td.l { white-space: normal; }
table.grid.pl-tablo tbody tr { cursor: default; }
table.grid.pl-tablo td:nth-child(2) { white-space: nowrap; }
.pl-rev { font-size: 10px; font-weight: 700; color: #8a4b08; background: #fce4d6; border-radius: 3px; padding: 0 3px; }

/* ---------------------------------------------------------------- rapor */
#rapor { --s1: #257de0; --s2: #f47230; --s3: #00b894; --txt2: #5b6575; --grid: #e9ecf1; }
.rp-filtre { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.rp-filtre select { padding: 5px 7px; border: 1px solid #cfd5df; border-radius: 5px; font: inherit; font-size: 13px; max-width: 170px; }
.rp-filtre #rpYazdir { margin-left: auto; }
.rp-donem { display: inline-flex; border: 1px solid #cfd5df; border-radius: 6px; overflow: hidden; }
.rp-donem button { border: 0; border-radius: 0; padding: 5px 10px; font-size: 12.5px; background: #fff; }
.rp-donem button + button { border-left: 1px solid #e2e6ec; }
.rp-donem button.sec { background: var(--navy); color: #fff; }
.rp-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 10px; }
.rp-tile { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; min-width: 0; }
.rp-tile .k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--txt2); }
.rp-tile .v { font-size: 22px; font-weight: 700; color: var(--ink); margin: 2px 0; }
.rp-tile .s { font-size: 12px; color: var(--txt2); }
.rp-izgara { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-kart { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 0; break-inside: avoid; }
.rp-kart.genis { grid-column: 1 / -1; }
.rp-kart h3 { margin: 0; font-size: 14px; color: var(--ink); }
.rp-alt { font-size: 12px; color: var(--txt2); margin: 1px 0 8px; }
.rp-hbar { display: flex; flex-direction: column; gap: 2px; }
.rp-sat { display: grid; grid-template-columns: minmax(70px, 34%) 1fr auto; align-items: center; gap: 8px; padding: 3px 2px; border-radius: 4px; }
.rp-sat:hover { background: #f3f6fb; }
.rp-ad { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-iz { height: 14px; position: relative; border-left: 1px solid #c9d0db; }
.rp-cub { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s1); border-radius: 0 4px 4px 0; }
.rp-deg { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; min-width: 64px; text-align: right; }
.rp-deg small { font-weight: 400; color: var(--txt2); }
.rp-lejant { display: flex; gap: 14px; font-size: 12px; color: var(--ink); margin-bottom: 6px; }
.rp-lejant i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); }
.rp-sutun { padding-left: 52px; }
.rp-alan { position: relative; height: 190px; border-bottom: 1px solid #c9d0db; }
.rp-gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--grid); }
.rp-gl span { position: absolute; left: -52px; width: 46px; text-align: right; top: -7px; font-size: 10.5px; color: var(--txt2); }
.rp-kolonlar { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.rp-kol { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 4px 4px 0 0; }
.rp-kol:hover { background: #f3f6fb; }
.rp-yigin { width: 64%; max-width: 46px; display: flex; flex-direction: column; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; }
.rp-seg { min-height: 2px; }
.rp-xek { display: flex; gap: 2px; margin-top: 3px; }
.rp-xek span { flex: 1; text-align: center; font-size: 10.5px; color: var(--txt2); white-space: nowrap; overflow: hidden; }
.rp-tablo { margin-top: 6px; font-size: 12px; } .rp-tablo summary { cursor: pointer; color: var(--txt2); }
.rp-tablo table { margin-top: 4px; }
.rp-liste { font-size: 12px; } table.grid.rp-liste tbody tr { cursor: default; }
.rp-bos { padding: 24px; text-align: center; color: var(--txt2); border: 1px dashed #c9d0db; border-radius: 8px; }
.rp-ipucu { position: fixed; z-index: 200; display: none; max-width: 340px; background: #1d2433; color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.rp-baslik { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--navy); padding-bottom: 6px; margin-bottom: 8px; }
.rp-baslik img { height: 14mm; } .rp-baslik b { display: block; font-size: 15pt; color: var(--navy); } .rp-baslik span { font-size: 9pt; color: #555; }
.rp-fdeger { font-size: 11px; border: 1px solid #ddd; border-radius: 4px; padding: 2px 6px; }
.page.rp-baski { width: 210mm; padding: 10mm 12mm; }
.page.rp-baski .rp-tablo, .page.rp-baski #rpYazdir { display: none; }
@media (max-width: 1100px) { .rp-tiles { grid-template-columns: repeat(3, 1fr); } .rp-izgara { grid-template-columns: 1fr; } }
@media print {
  .page.rp-baski { page: teklif; padding: 0 10mm; font-size: 9pt; }
  .page.rp-baski .rp-tiles { grid-template-columns: repeat(3, 1fr); }
  .page.rp-baski #rapor, .page.rp-baski { --s1: #257de0; --s2: #f47230; --s3: #00b894; --txt2: #5b6575; --grid: #e9ecf1; }
}
.rp-alan { margin-top: 12px; }
table.grid th.l { text-align: left; }
.tk-grup td { background: #e9eef7; font-weight: 700; padding: 1.6mm 1.5mm; border-bottom: 1px solid #000; break-after: avoid; }
#istasyonPanel { margin-bottom: 8px; }
.ist-ic { padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ist-tek { font-size: 13px; }
.ist-tablo { font-size: 12.5px; } table.grid.ist-tablo tbody tr { cursor: default; }
.ist-tablo input.ist-adet { width: 52px; padding: 2px 4px; border: 1px solid #cfd5df; border-radius: 4px; font: inherit; text-align: right; }
.ist-akt { background: #dbe7fb; color: var(--navy); font-size: 10.5px; padding: 0 6px; }
.ist-is { white-space: nowrap; } .ist-is button { padding: 3px 8px; font-size: 12px; margin-left: 3px; }
.ist-is button.sil.onay { background: var(--bad); color: var(--bad-ink); border-color: var(--bad-ink); }
.ist-ic .hint { margin: 0; }
.ist-tablo input.ist-isk { width: 58px; padding: 2px 4px; border: 1px solid #cfd5df; border-radius: 4px; font: inherit; text-align: right; }
#btnSifirla.onay { background: var(--warn); color: var(--warn-ink); border-color: #e69138; }
.foy-ist { align-self: stretch; max-width: 210mm; margin: 6px auto -8px; width: 100%; font-weight: 700; color: var(--navy); background: #dbe7fb; border-radius: 6px; padding: 5px 10px; font-size: 13px; }
.bz-kutu { grid-column: 1 / -1; background: #fff4e5; border: 1px solid #f3c9a8; border-radius: 6px; padding: 5px 8px; font-size: 12px; color: var(--warn-ink); margin-top: 3px; }
.bz-kutu .bz-sec { font-size: 12px; padding: 1px 8px; margin: 2px 2px 2px 0; border-radius: 10px; border: 1px solid #e69138; background: #fff; color: var(--warn-ink); cursor: pointer; }
.bz-kutu .bz-not { display: block; color: #8a6a4b; margin-top: 2px; }
.inputs input.bz-var { border-color: #e69138; }
/* föy: pompa eğrileri sayfası */
.foy.egri .sec .alt { font-weight: 400; font-size: 8pt; opacity: .85; }
.foy.egri .egri-g { height: 62mm; } .foy.egri .egri-g svg { width: 100%; height: 100%; max-width: none !important; }
.foy.egri .egri-k { margin-top: 1mm; }
.foy.egri .egri-yok { margin-top: 6mm; border: 1px dashed #aaa; color: #555; padding: 8mm; text-align: center; }

/* ---- sunucu sürümü: hesap / kullanıcı yönetimi */
#btnHesap .rozet { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: #d64545; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.yn-arka { position: fixed; inset: 0; background: rgba(15, 25, 45, .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; }
.yn-arka[hidden] { display: none; }
.yn-kutu { background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); width: min(1100px, 100%); padding: 18px 20px 22px; }
.yn-ust { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.yn-ust h2 { margin: 0; font-size: 18px; color: var(--ink, #1f2a44); }
.yn-kutu h3 { font-size: 14px; margin: 16px 0 6px; color: #2b3550; }
.yn-tablo td { vertical-align: top; } .yn-tablo .muted { font-size: 11.5px; }
.yn-is { white-space: nowrap; text-align: right; } .yn-is button { padding: 4px 9px; font-size: 12px; }
.yn-bekliyor td { background: #fff8e6; }
.yn-red td, .yn-kapali td { color: #8a93a6; }
.yn-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.yn-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: #4a5568; }
.yn-form input { padding: 7px 9px; border: 1px solid var(--line, #d7dce5); border-radius: 6px; font: inherit; min-width: 200px; }
.yn-sifre { margin-top: 16px; border-top: 1px solid var(--line, #e3e7ee); padding-top: 10px; }
.yn-sifre summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.pl-aktar { background: #eef5ff; border: 1px solid #c9dcf7; border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.pl-aktar button { margin-left: 6px; }
