/* PKD360 — arayüz stilleri. Renkler token olarak; koyu tema ayrı adımlarla. */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fa; --ink: #1d2124; --ink-2: #3d4449; --muted: #6b747a; --line: #e2e5e8; --line-2: #eef0f2;
  --accent: #d82e29; --accent-hover: #b9231f; --accent-soft: #fdecec; --accent-ink: #ffffff;
  --sb-bg: #1f2326; --sb-bg-2: #2a2f33; --sb-ink: #c9cfd3; --sb-muted: #8a9399; --sb-active: #ffffff;
  --ok: #1a7346; --ok-bg: #e5f4ec; --err: #a8231f; --err-bg: #fbeaea; --warn: #8a5a00; --warn-bg: #fff4dc;
  --acc: #2c4a8a; --acc-bg: #e8eefb;
  --radius: 10px; --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .05), 0 1px 3px rgba(16, 24, 32, .06);
  --sb-w: 252px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131517; --surface: #1c1f22; --surface-2: #212528; --ink: #e9ecee; --ink-2: #c5cbcf; --muted: #9aa3a9; --line: #30363a; --line-2: #272c2f;
    --accent-soft: #3a1a19; --sb-bg: #0f1113; --sb-bg-2: #1a1d20;
    --ok: #6fd3a0; --ok-bg: #16352a; --err: #f08a86; --err-bg: #3b1716; --warn: #f0c060; --warn-bg: #3a3014;
    --acc: #a9c1f5; --acc-bg: #1d2a44; --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .35rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; font-weight: 650; }
code { font: .85em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- marka */
.brand { font-weight: 800; font-size: 1.3rem; color: var(--ink); letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.brand.big { display: block; font-size: 2.2rem; text-align: center; }

/* ---------- yerleşim: sol menü + içerik */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 30;
  display: flex; flex-direction: column; background: var(--sb-bg); color: var(--sb-ink); overflow-y: auto;
}
.main { flex: 1; min-width: 0; margin-left: var(--sb-w); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 32px 48px; }

.sb-brand { padding: 22px 20px 16px; }
.sb-brand .brand { color: #fff; font-size: 1.45rem; }
.sb-sub { font-size: .72rem; color: var(--sb-muted); margin-top: 2px; letter-spacing: .02em; }

.sb-account { margin: 0 12px 8px; padding: 10px 12px; border-radius: 8px; background: var(--sb-bg-2); }
.sb-account-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sb-muted); }
.sb-account-name { color: #fff; font-weight: 600; font-size: .88rem; line-height: 1.3; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sb-account form { margin: 0; }
.sb-leave { margin-top: 6px; background: none; border: 0; padding: 0; color: #f3a29f; font: inherit; font-size: .78rem; cursor: pointer; }
.sb-leave:hover { text-decoration: underline; }

.sb-nav { padding: 4px 12px; display: flex; flex-direction: column; gap: 1px; }
.sb-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--sb-muted); padding: 16px 10px 6px; }
.sb-nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 7px; color: var(--sb-ink); font-size: .9rem; position: relative; }
.sb-nav a:hover { background: var(--sb-bg-2); color: #fff; text-decoration: none; }
.sb-nav a.active { background: var(--sb-bg-2); color: var(--sb-active); font-weight: 600; }
.sb-nav a.active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sb-nav a.active svg { color: var(--accent); }

.sb-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.sb-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; flex-shrink: 0; }
.sb-user-info { min-width: 0; flex: 1; }
.sb-user-name { color: #fff; font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: .74rem; color: var(--sb-muted); }
.sb-user-actions { display: flex; gap: 2px; }
.sb-user-actions form { margin: 0; }
.sb-user-actions a, .sb-user-actions button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: var(--sb-muted); background: none; border: 0; cursor: pointer; }
.sb-user-actions a:hover, .sb-user-actions button:hover { background: var(--sb-bg-2); color: #fff; }

.mobilebar { display: none; }
.sb-backdrop { display: none; }
@media (max-width: 1100px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.sb-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
  .main { margin-left: 0; }
  .mobilebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .sb-toggle { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
  .wrap { padding: 20px 16px 40px; }
}

/* ---------- sayfa başlığı */
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.head > div:first-child p { margin: .15rem 0 0; }
.head h1 { margin-bottom: 0; }
section .head { align-items: center; margin-bottom: .6rem; }
section .head h2 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }

/* ---------- kart, kutucuk */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card.narrow { width: 100%; max-width: 400px; }
.card.inner { box-shadow: none; background: var(--surface-2); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 1rem 0 1.25rem; }
@media (max-width: 1250px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink-2); box-shadow: var(--shadow); }
.tile .n { font-size: 1.9rem; font-weight: 750; color: var(--ink); line-height: 1.1; margin-bottom: 4px; }
a.tile:hover { text-decoration: none; border-color: var(--accent); }

/* ---------- tablo */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
thead th { font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tr.current td { background: var(--warn-bg); }
td.actions { white-space: nowrap; text-align: right; }
td.actions > * { margin-left: .75rem; }
table.small td, table.small th { padding: 6px 10px; font-size: .82rem; }

/* ---------- etiket */
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.tag.off { background: var(--err-bg); color: var(--err); border-color: transparent; }
.tag.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.tag.acc { background: var(--acc-bg); color: var(--acc); border-color: transparent; }
.tag.st-yayimlandi { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.tag.st-iptal { background: var(--err-bg); color: var(--err); border-color: transparent; }
.tag.st-incelemede { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

/* ---------- bildirim */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 1rem; border: 1px solid transparent; }
.flash-basari { background: var(--ok-bg); color: var(--ok); }
.flash-hata { background: var(--err-bg); color: var(--err); }
.flash-uyari { background: var(--warn-bg); color: var(--warn); }

/* ---------- form */
.form { max-width: 680px; }
.form.wide { max-width: 1000px; }
label { display: block; margin-bottom: 14px; font-size: .86rem; font-weight: 550; color: var(--ink-2); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 8px 11px; font: inherit; font-weight: 400; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
label.check { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-weight: 400; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 18px; padding: 14px 18px 4px; }
legend { font-weight: 650; padding: 0 6px; font-size: .9rem; color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
@media (max-width: 700px) { .row2, .row3 { grid-template-columns: 1fr; } }
.help { font-size: .78rem; font-weight: 400; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.req { color: var(--accent); }
.unit { color: var(--muted); font-weight: 400; }
.err { color: var(--err); font-size: .82rem; margin-top: 4px; }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 16px; }

/* şema formu (hesap girdileri) */
fieldset .sf-row { margin-bottom: 14px; font-size: .86rem; }
.sf-row label { display: block; margin-bottom: 0; }
.sf-row.has-error input, .sf-row.has-error select { border-color: var(--err); }
.sf-row[hidden] { display: none; }
form.wide fieldset:has(.sf-row) { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 18px; }
form.wide fieldset:has(.sf-row) legend { grid-column: 1 / -1; }

/* ---------- düğme */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 550; cursor: pointer; line-height: 1.3; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.full { width: 100%; justify-content: center; padding: 10px; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
button.link:hover { text-decoration: underline; }
button.link.danger { color: var(--err); }
form.inline { display: inline; }

/* ---------- tanım listesi, alt menü, süzgeç */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.kv dt { color: var(--muted); font-size: .86rem; }
.kv dd { margin: 0; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: .75rem 0 1.5rem; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); width: fit-content; max-width: 100%; }
.subnav a { padding: 6px 12px; border-radius: 7px; color: var(--ink-2); font-size: .86rem; font-weight: 550; }
.subnav a:hover { background: var(--surface-2); text-decoration: none; }
section { margin-bottom: 2rem; scroll-margin-top: 1rem; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-form input:not([type=checkbox]) { width: auto; flex: 1 1 200px; margin: 0; }
.row-form select { width: auto; margin: 0 8px; display: inline-block; }
.inline-label { display: inline-flex; align-items: center; margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; margin: 0; }
.filters input { flex: 1 1 240px; }
.danger-zone { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
details summary { cursor: pointer; font-weight: 600; }
details.inner { margin: 1rem 0; }

/* ---------- giriş ve hata sayfaları */
body.bare { background: var(--sb-bg); }
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
body.bare .card.narrow { padding: 32px 30px; border: 0; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
body.bare .card.narrow > .muted { text-align: center; margin: 4px 0 22px; }
body.bare .card.narrow h1 { font-size: 2.4rem; text-align: center; color: var(--accent); }

/* madde seçici */
.picker-search { max-width: 360px; margin: 0 0 10px !important; }
.picker { max-height: 280px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); }
.picker label.check { padding: 3px 0; }
.picker label.check:has(input:checked) span:first-of-type { font-weight: 650; color: var(--ink); }
.picker label[hidden] { display: none; }

/* hesap föyü */
.result-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: .5rem 0 .6rem; box-shadow: var(--shadow); }
.rb-item { background: var(--surface); padding: 14px 16px; }
.rb-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rb-value { font-size: 1.15rem; font-weight: 700; margin-top: 2px; }
.rb-note { font-size: .75rem; color: var(--muted); }
.rb-value.zone-0 { color: #b3261e; } .rb-value.zone-1 { color: #c25e00; } .rb-value.zone-2 { color: #a07d00; } .rb-value.zone-ne { color: var(--ok); }
.rb-value.zone-20 { color: #4e342e; } .rb-value.zone-21 { color: #6d4c41; } .rb-value.zone-22 { color: #8d6e63; }
@media (prefers-color-scheme: dark) { .rb-value.zone-0 { color: #f28b82; } .rb-value.zone-1 { color: #f6ae5c; } .rb-value.zone-2 { color: #f1d36b; } .rb-value.zone-20 { color: #d7b8a8; } .rb-value.zone-21 { color: #c9ad9f; } .rb-value.zone-22 { color: #bfb0a8; } }
table.trace td { vertical-align: top; }
table.trace code.expr { display: inline-block; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 6px; margin-bottom: 3px; word-break: normal; }
table.trace .inputs { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--ink-2); }
.warn-list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
h2.mt { margin-top: 1.75rem; }

/* proje sekmeleri */
.tabs { display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; margin: .5rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; white-space: nowrap; flex-shrink: 0; color: var(--ink-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 6px 6px 0 0; }
.tabs a:hover { background: var(--surface); text-decoration: none; color: var(--ink); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--surface); }
.tabs .count { font-size: .72rem; font-weight: 650; padding: 0 7px; border-radius: 999px; background: var(--line-2); color: var(--muted); line-height: 1.6; }
.tabs a.active .count { background: var(--accent-soft); color: var(--accent); }
.tile .of { font-size: 1rem; color: var(--muted); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.grid2 .card { margin-bottom: 16px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.steps li { padding-left: 4px; }
.steps li > span { display: block; margin-bottom: 4px; }
.btn.small-btn { padding: 4px 10px; font-size: .82rem; }
.zone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.zone-list li { display: flex; align-items: center; gap: 10px; }
.zchip { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: .82rem; font-weight: 650; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
a.zchip:hover { text-decoration: none; filter: brightness(.97); }
.zchip.z0 { background: #fbe0de; border-color: #f2b8b4; color: #8c1d18; }
.zchip.z1 { background: #fde9d2; border-color: #f6c999; color: #8a4300; }
.zchip.z2 { background: #fdf3c4; border-color: #efd97a; color: #6b5300; }
.zchip.z20 { background: #e9ddd6; border-color: #bfa293; color: #3e2723; }
.zchip.z21 { background: #efe5df; border-color: #cbb3a6; color: #4e342e; }
.zchip.z22 { background: #f4eeea; border-color: #d7c7bd; color: #5d4037; }
.zchip.zne { background: var(--ok-bg); border-color: transparent; color: var(--ok); }

/* Tablo B.1 öneri kutusu */
.b1-hint { margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; background: var(--surface-2); font-size: .82rem; color: var(--ink-2); }
.b1-hint strong { display: block; margin-bottom: 4px; color: var(--ink); }
.b1-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 3px 0; }
.b1-pick { padding: 1px 9px; border: 1px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--accent); font: inherit; font-weight: 650; cursor: pointer; }
.b1-pick:hover { background: var(--accent); color: #fff; }
.b1-tip { margin-top: 5px; color: var(--muted); font-size: .76rem; }

/* uw yardımcısı */
.uw-hint { margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 6px; background: var(--surface-2); font-size: .82rem; color: var(--ink-2); }
.uw-hint strong { display: block; margin-bottom: 4px; color: var(--ink); }
.c1-table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: .78rem; }
.c1-table th, .c1-table td { padding: 4px 5px; border-bottom: 1px solid var(--line-2); text-align: center; white-space: nowrap; }
.c1-table thead th { font-size: .7rem; color: var(--muted); font-weight: 600; white-space: normal; }
.c1-table tbody th { text-align: left; white-space: normal; font-weight: 550; }
.c1-table tr.rec { background: var(--accent-soft); }
.c1-table tr.rec th::after { content: " ← önerilen"; color: var(--accent); font-weight: 700; }
.uw-calc { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.uw-calc input { width: auto !important; flex: 1 1 120px; margin: 0 !important; padding: 5px 8px !important; }
.sf-row:has(.uw-hint), .sf-row:has(.b1-hint) { grid-column: 1 / -1; }

/* PKD metinleri — düzenleyici */
.check-card summary { font-weight: 550; }
.check-card[open] summary { margin-bottom: 10px; }
.ph-inline { background: var(--warn-bg); color: var(--warn); padding: 0 4px; border-radius: 4px; }
.sec-layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .sec-layout { grid-template-columns: 1fr; } .sec-toc { position: static !important; } }
.sec-toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.sec-toc a { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; color: var(--ink-2); font-size: .86rem; }
.sec-toc a:hover { background: var(--surface-2); text-decoration: none; }
.sec-toc .legend { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 8px 6px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.ph { background: #e0a100; } .dot.empty { background: var(--line); border: 1px solid var(--muted); }
.sec-card { scroll-margin-top: 16px; }
.sec-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.sec-head h2 { margin: 0; }
.rte { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.rte:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.rte-bar button { min-width: 30px; padding: 4px 8px; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--ink-2); font: inherit; font-size: .82rem; cursor: pointer; }
.rte-bar button:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.rte-bar .sep { width: 1px; background: var(--line); margin: 3px 4px; }
.rte-area { min-height: 110px; padding: 12px 14px; outline: none; line-height: 1.6; color: var(--ink); }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rte-area p { margin: 0 0 8px; }
.rte-area h3 { font-size: 1rem; margin: 12px 0 6px; }
.rte-area ul, .rte-area ol { margin: 0 0 8px; padding-left: 22px; }
.rte-area table { border-collapse: collapse; width: 100%; margin: 6px 0 10px; font-size: .88rem; }
.rte-area th, .rte-area td { border: 1px solid var(--line); padding: 5px 8px; min-width: 60px; vertical-align: top; }
.rte-area th { background: var(--surface-2); }
.save-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 12px 16px; margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
.save-bar .dirty { color: var(--warn); font-weight: 600; }
[hidden] { display: none !important; }

/* F5 değerlendirme */
.area-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.area-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.area-chip:hover { text-decoration: none; border-color: var(--muted); }
.area-chip.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ign-table td { vertical-align: middle; }
.ign-table select, .ign-table input:not([type=checkbox]) { margin: 0; padding: 5px 7px; font-size: .84rem; }
.ign-table td:nth-child(2) { min-width: 160px; }
.ign-table td:nth-child(6) { min-width: 240px; width: 30%; }
.ign-table textarea { width: 100%; min-height: 2.6em; resize: vertical; margin: 0; padding: 5px 7px; font: inherit; font-size: .84rem; line-height: 1.35; }
.ign-table .risk-cell { min-width: 120px; }
.ign-table .risk-cell { white-space: normal; }
.ign-table .risk-cell .risk { display: table; margin-top: 3px; white-space: nowrap; }
.ign-table .risk-cell .tag { white-space: normal; }
.ign-table tr.nc td { background: #fdf0ef; }
@media (prefers-color-scheme: dark) { .ign-table tr.nc td { background: #3b1716; } }
td.cell-center { text-align: center; }
.risk { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: .78rem; font-weight: 650; }
.risk.r-dusuk { background: var(--ok-bg); color: var(--ok); }
.risk.r-orta { background: #fdf3c4; color: #6b5300; }
.risk.r-yuksek { background: #fde9d2; color: #8a4300; }
.risk.r-kabul_edilemez { background: #fbe0de; color: #8c1d18; }
.tag.pr-acil { background: #fbe0de; color: #8c1d18; border-color: transparent; }
.tag.pr-yuksek { background: #fde9d2; color: #8a4300; border-color: transparent; }
tr.done td { opacity: .6; }
.ign-table td:nth-child(3) select { min-width: 76px; }
.ign-table td:nth-child(4) select { min-width: 132px; }
.ign-table td:nth-child(7) select { min-width: 58px; }
.rte-proc .ph { background: var(--warn-bg); color: var(--warn); border-radius: 3px; padding: 0 2px; }

/* ---------- 2026-10-19 ekran incelemesi (W01–W07) */
.sb-collapse { position: absolute; top: 18px; right: 12px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--sb-muted); cursor: pointer; }
.sb-collapse:hover { background: var(--sb-bg-2); color: #fff; }
.sb-collapse svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.sb-brand { position: relative; }
@media (min-width: 1101px) {
  body.sb-hidden .sidebar { transform: translateX(-100%); }
  body.sb-hidden .main { margin-left: 0; }
  body.sb-hidden .mobilebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  body.sb-hidden .sb-toggle { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
}
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.head-title { min-width: 0; flex: 1 1 420px; }
.nav-select { display: none; width: 100%; margin: .5rem 0 1rem; }
@media (max-width: 700px) { .tabs { display: none; } .nav-select { display: block; } }
.table-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 .75rem; }
.table-filter input[type=search] { flex: 1 1 240px; min-width: 0; }
.table-filter select { flex: 0 1 auto; width: auto; }
td.chips .tag { margin: 1px 2px 1px 0; white-space: nowrap; }
td.warn { color: var(--warn, #9a6700); font-weight: 600; }
.missing-list { list-style: none; padding: 0; margin: 0; }
.missing-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.missing-list li:first-child { border-top: 0; }
.missing-list .code { font-weight: 700; margin-right: 6px; }
.plist td.title { max-width: 420px; }
.tile .n.small-n { font-size: 1.05rem; line-height: 1.3; }
.tile .n.z0 { color: #b42318; } .tile .n.z1 { color: #b54708; } .tile .n.z2 { color: #8a6d00; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form input[type=text] { width: 180px; }
tr.changed th, tr.changed td { background: var(--warn-bg); }
tr.overdue td { background: var(--err-bg); }
.late { color: var(--err); font-weight: 600; }
.eq-photo { max-width: 260px; max-height: 200px; border: 1px solid var(--line); border-radius: 6px; display: block; margin-bottom: 6px; }

/* ---------- kroki */
.kroki-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .kroki-layout { grid-template-columns: 1fr; } }
.kroki-canvas { padding: 8px; }
.kroki-svg { width: 100%; height: auto; display: block; cursor: crosshair; background: #fff; border-radius: 6px; }
.kroki-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; color: var(--muted); }
/* EN IEC 60079-10-1 Şekil A.1: Bölge 0 daire, 1 çapraz, 2 tek yön tarama */
.kroki-legend .lg { display: inline-block; width: 22px; height: 14px; margin-right: 4px; vertical-align: -2px; border: 1px solid #1d2124; background-color: #fff; }
.lg.z0 { background-image: radial-gradient(circle, transparent 2.2px, #1d2124 2.3px, #1d2124 3px, transparent 3.1px); background-size: 7px 7px; }
.lg.z1 { background-image: repeating-linear-gradient(45deg, #1d2124 0 1px, transparent 1px 5px), repeating-linear-gradient(-45deg, #1d2124 0 1px, transparent 1px 5px); }
.lg.z2 { background-image: repeating-linear-gradient(-45deg, #1d2124 0 1px, transparent 1px 5px); } .lg.z20 { background: #5d4037; } .lg.z21 { background: #8d6e63; } .lg.z22 { background: #bcaaa4; }
.kroki-mark { fill: #1565c0; }

/* F6 Kapsam ve ekler */
.card-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.card-head h2 { margin: 0; }
details.add { margin-top: .8rem; }
details.add > summary, details.inline-edit > summary { list-style: none; cursor: pointer; display: inline-block; }
details.add > summary::-webkit-details-marker, details.inline-edit > summary::-webkit-details-marker { display: none; }
details.add[open] > summary { margin-bottom: .6rem; }
details.inline-edit > summary { color: var(--acc); font-weight: 600; font-size: .9rem; }
details.inline-edit[open] { min-width: min(560px, 80vw); }
form.compact { margin-top: .5rem; }
form.compact label { margin-bottom: .5rem; }
.flash-bilgi { background: var(--acc-bg); color: var(--ink-2); }
.verify-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }

/* Proje sekmeleri: iş akışı grupları, sığmayınca alt satıra geçer (yatay kaydırma yok) */
.tabs.tabs-grouped { flex-wrap: nowrap; overflow: visible; gap: 18px; align-items: flex-start; padding-bottom: 8px; }
.tabs-grouped .tab-overview { padding-right: 18px; border-right: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; }
.tabs-grouped .tab-rows { display: grid; grid-template-columns: max-content 1fr; row-gap: 2px; column-gap: 14px; align-items: center; min-width: 0; }
.tabs-grouped .tab-group { display: contents; }
.tabs-grouped .tg-links { display: flex; flex-wrap: wrap; gap: 2px; }
.tabs-grouped .tg-label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tabs-grouped a { padding: 6px 10px; border-bottom: 0; margin-bottom: 0; border-radius: 8px; }
.tabs-grouped a.active { background: var(--accent-soft); color: var(--accent); }
.tabs-grouped a.active .count { background: var(--surface); }

.blast-fig-screen { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; margin: 1rem 0; }
.blast-fig-screen svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .blast-fig-screen { grid-template-columns: 1fr; } }

/* Ayırt edici düğmeler: simge, düzenleme düğmesi, bitişik çıktı grubu */
.btn .bi { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn.btn-edit { background: var(--surface-2); border-color: var(--line); }
.btn.btn-edit:hover { border-color: var(--accent); color: var(--accent); }
.btn-group { display: inline-flex; box-shadow: var(--shadow); border-radius: var(--radius-sm); }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn:hover { position: relative; z-index: 1; }
/* Sekmeler çip görünümünde: tıklanabilir oldukları belli olsun */
.tabs-grouped a { border: 1px solid var(--line); background: var(--surface); box-shadow: 0 1px 0 rgba(16,24,40,.04); }
.tabs-grouped a:hover { border-color: var(--muted); background: var(--surface); transform: translateY(-1px); }
.tabs-grouped a.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs-grouped a.active .count { background: rgba(255,255,255,.25); color: var(--accent-ink); }
.tabs-grouped .tg-links { gap: 6px; }
.tabs-grouped .tab-rows { row-gap: 6px; }
.tabs-grouped .tab-overview a { padding: 10px 16px; font-weight: 650; }

/* Çevre haritası */
.site-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.site-canvas { padding: 10px; }
.site-svg { width: 100%; height: auto; display: block; cursor: crosshair; border-radius: 8px; }
@media (max-width: 1000px) { .site-layout { grid-template-columns: 1fr; } }

/* Sade dil balonu */
.tip { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: .7rem; font-weight: 700; cursor: help; position: relative; vertical-align: middle; }
.tip::after { content: attr(data-tip); position: absolute; left: 0; top: 22px; z-index: 30; width: 300px; max-width: 70vw; padding: 8px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal; box-shadow: 0 6px 20px rgba(0,0,0,.25); display: none; }
.tip:hover::after, .tip:focus::after, .tip.open::after { display: block; }
.glossary div { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 2px 0 0; color: var(--ink-2); }
.glossary div[hidden] { display: none; }
/* İlerleme çubuğu */
.progress { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 14px; align-items: center; }
.progress li a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .8rem; }
.progress .pn { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--line); font-size: .7rem; font-weight: 700; }
.progress li.done a { border-color: #9bd1a8; color: #1f6b35; } .progress li.done .pn { background: #2e9e4f; color: #fff; }
.progress li.next a { border-color: var(--accent); color: var(--accent); font-weight: 650; } .progress li.next .pn { background: var(--accent); color: #fff; }
.progress .pstat { margin-left: auto; font-size: .78rem; color: var(--muted); }
.next-steps { border-left: 4px solid var(--accent); }
/* Madde seçici */
.picker-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 5px 10px; font-size: .8rem; cursor: pointer; color: var(--ink-2); }
.seg button.active { background: var(--accent); color: #fff; }
.picker-selected { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; font-size: .82rem; min-height: 1.4em; }
.chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; font-size: .78rem; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--accent); color: var(--accent); }
/* Dar ekran */
.row2 > *, .row3 > *, .picker label.check, .sf-row { min-width: 0; overflow-wrap: anywhere; }
.table-wrap.scrollable { position: relative; }
.table-wrap.scrollable::after { content: "← yana kaydırın →"; position: sticky; left: 0; display: block; padding: 3px 8px; font-size: .72rem; color: var(--muted); background: var(--surface-2); }
@media (min-width: 701px) { .table-wrap.scrollable::after { display: none; } }
details.adv { margin: 10px 0; } details.adv > summary { cursor: pointer; color: var(--muted); font-size: .86rem; }
table[data-sortable] thead th { cursor: pointer; user-select: none; }
table[data-sortable] thead th[aria-sort="ascending"]::after { content: " ▲"; font-size: .7em; }
table[data-sortable] thead th[aria-sort="descending"]::after { content: " ▼"; font-size: .7em; }
#src-table td:nth-child(4) { max-width: 240px; }

/* Diğer çıktılar menüsü */
.more-outputs { position: relative; display: inline-block; }
.more-outputs > summary { list-style: none; cursor: pointer; }
.more-outputs > summary::-webkit-details-marker { display: none; }
.more-outputs .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; display: flex; flex-direction: column; }
.more-outputs .menu a { padding: 8px 10px; border-radius: 6px; color: var(--ink); font-size: .88rem; }
.more-outputs .menu a:hover { background: var(--surface-2); color: var(--accent); }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0 12px; background: var(--surface-2); }
.box.warn { background: #fff7e6; border-color: #f0c36d; }
.box.ok { background: #eef9ee; border-color: #9ccc9c; }
/* Firma / kuruluş logosu */
.firm-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.firm-head h1 { margin: 0; }
.firm-logo { height: 52px; width: auto; max-width: 200px; object-fit: contain; background: #fff; padding: 4px; border: 1px solid var(--line); border-radius: 6px; vertical-align: middle; }
.firm-logo.org-logo { height: 80px; max-width: 260px; }
.firm-logo-prev { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; }
.inline-check { display: inline-flex; margin: 0; }
.prewrap { white-space: pre-wrap; }
.tile .n.n-sm { font-size: 1.05rem; }
input.w7 { width: 7em; }
/* Müşteri portalı (layout/portal) */
.portal-wrap { max-width: 1040px; margin: 0 auto; padding: 18px 16px 40px; }
.portal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 18px; }
.portal-head .brand { font-size: 1.3rem; font-weight: 700; }
.portal-head .brand span { color: var(--accent, #c8102e); }
/* Mobil saha keşif modu */
.saha .card { padding: 14px 14px; }
.saha .big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.saha .big .btn, .saha .big button { padding: 12px 8px; font-size: 1rem; text-align: center; }
.saha input[type=file] { font-size: 1rem; }
.saha details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.saha .todo li { padding: 4px 0; }
@media (max-width: 600px) { .saha .big { grid-template-columns: 1fr; } }
.portal-foot { margin-top: 28px; }
/* Portföy panosu tablosu */
#pano-table th, #pano-table td { white-space: nowrap; }
#pano-table td:nth-child(1), #pano-table td:nth-child(2) { white-space: normal; min-width: 190px; }
#pano-table td:nth-child(2) .muted { white-space: normal; }
/* Referans bölge kataloğu */
.ref-list { max-height: 460px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.ref-group { background: var(--surface-2); padding: 6px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.ref-row { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ref-act { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.grade-hint { color: var(--ink-2); }
/* Saha QR kartı */
.qr-card { display: flex; gap: 16px; align-items: center; }
.qr-card svg { display: block; }
.fc { max-width: 640px; margin: 0 auto; }
.fc-zone { font-size: 1.25rem; font-weight: 800; padding: 10px 14px; border-radius: 8px; margin: 0 0 10px; }
.fc-zone.z0 { background: #d92d20; color: #fff; } .fc-zone.z1 { background: #f79009; color: #111; } .fc-zone.z2 { background: #fdd835; color: #111; }
.fc-rules li { margin: 4px 0; }
/* Seçmeli PKD çıktısı */
.out-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.out-presets { margin: 8px 0 14px; }
/* Mevcut önlemler */
.exm-row { margin-bottom: 12px; }
.exm-status { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; }
.exm-status label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.tag.st-yeterli { background: #e6f4ea; color: #1e6b34; } .tag.st-kismen { background: #fff4d6; color: #7a5800; } .tag.st-yetersiz { background: #fde7e7; color: #a01818; }
.pwa-hint { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Kesit şablonları */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.sec-card svg { width: 100%; height: auto; display: block; }
.sec-card h3 { margin: 0 0 4px; font-size: 1rem; }
/* Belge dili çevirisi */
.tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tr-src { color: var(--ink-2); font-size: .92rem; }
@media (max-width: 760px) { .tr-row { grid-template-columns: 1fr; } }
