/* Yapısal Analiz — uygulama arayüzü */
:root { --ya-bg: #eef1f5; --ya-panel: #ffffff; --ya-line: #d7dde6; --ya-fg: #1b2433; --ya-muted: #5c6a7d; --ya-acc: #1f5fbf; --ya-acc2: #ffd600; --ya-hover: #e8eef8; --v-bg: #ffffff; --v-fg: #1b2433; --v-grid: #cfd6e0; --ya-navy: #003366; }
:root[data-theme="dark"] { --ya-bg: #0f151d; --ya-panel: #16202b; --ya-line: #2a3644; --ya-fg: #e3e9f0; --ya-muted: #93a1b2; --ya-acc: #6aa5ff; --ya-hover: #1f2b39; --v-bg: #0b1118; --v-fg: #dfe7f1; --v-grid: #26323f; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.ya-body { background: var(--ya-bg); color: var(--ya-fg); font: 13px/1.35 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; overflow: hidden; }
.ya { display: grid; grid-template-rows: auto auto auto 1fr auto; height: 100vh; height: 100dvh; }
.ya button, .ya input, .ya select { font: inherit; color: inherit; }
.ya-top { display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: var(--ya-navy); color: #fff; }
.ya-top a.ya-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
.ya-top a.ya-brand svg { width: 26px; height: 26px; }
.ya-title { flex: 1; min-width: 80px; background: transparent; border: 1px solid transparent; color: #fff !important; font-weight: 600; padding: 4px 6px; border-radius: 6px; }
.ya-title:hover, .ya-title:focus { border-color: rgba(255,255,255,.35); outline: none; }
.ya-top .ya-sel { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff !important; border-radius: 6px; padding: 3px 6px; }
.ya-top .ya-sel option { color: #111; }
.ya-run { background: var(--ya-acc2); color: #10213a !important; border: 0; border-radius: 7px; padding: 6px 14px; font-weight: 700 !important; cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ya-run:hover { filter: brightness(1.05); }
.ya-run.alt { background: rgba(255,255,255,.14); color: #fff !important; border: 1px solid rgba(255,255,255,.3); }
.ya-menu { display: flex; gap: 0; background: var(--ya-panel); border-bottom: 1px solid var(--ya-line); padding: 0 6px; overflow-x: auto; scrollbar-width: none; }
.ya-menu > .m { position: relative; }
.ya-menu > .m > button { background: none; border: 0; padding: 7px 11px; cursor: pointer; border-radius: 5px; white-space: nowrap; }
.ya-menu > .m > button:hover, .ya-menu > .m.open > button { background: var(--ya-hover); }
.ya-dd { position: fixed; z-index: 50; min-width: 250px; background: var(--ya-panel); border: 1px solid var(--ya-line); border-radius: 8px; box-shadow: 0 14px 40px -14px rgba(0,0,0,.35); padding: 5px; max-height: 80vh; overflow: auto; }
.ya-dd button { display: flex; width: 100%; justify-content: space-between; gap: 18px; text-align: left; background: none; border: 0; padding: 6px 10px; border-radius: 5px; cursor: pointer; }
.ya-dd button:hover { background: var(--ya-hover); }
.ya-dd button:disabled { opacity: .45; cursor: default; }
.ya-dd button kbd { color: var(--ya-muted); font: 11px/1.4 inherit; }
.ya-dd hr { border: 0; border-top: 1px solid var(--ya-line); margin: 4px 2px; }
.ya-dd .sub { color: var(--ya-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px 2px; }
.ya-tools { display: flex; align-items: center; gap: 2px; padding: 4px 8px; background: var(--ya-panel); border-bottom: 1px solid var(--ya-line); overflow-x: auto; scrollbar-width: thin; }
.ya-tools button { display: grid; place-items: center; width: 32px; height: 30px; background: none; border: 1px solid transparent; border-radius: 6px; cursor: pointer; flex: 0 0 auto; color: var(--ya-fg); }
.ya-tools button:hover { background: var(--ya-hover); }
.ya-tools button.on { background: var(--ya-hover); border-color: var(--ya-acc); color: var(--ya-acc); }
.ya-tools button svg { width: 18px; height: 18px; }
.ya-tools .txt { width: auto; padding: 0 8px; font-weight: 600; font-size: 12px; }
.ya-tools .sep { width: 1px; height: 22px; background: var(--ya-line); margin: 0 5px; flex: 0 0 auto; }
.ya-tools select { border: 1px solid var(--ya-line); background: var(--ya-panel); border-radius: 6px; padding: 3px 6px; max-width: 170px; }
.ya-tools label.mini { display: flex; align-items: center; gap: 5px; color: var(--ya-muted); font-size: 12px; white-space: nowrap; margin-left: 4px; }
.ya-main { display: grid; grid-template-columns: 1fr 330px; min-height: 0; }
.ya-main.noside { grid-template-columns: 1fr 0; }
.ya-view { position: relative; min-height: 0; overflow: hidden; }
#ya-canvas { display: block; touch-action: none; }
.ya-side { border-left: 1px solid var(--ya-line); background: var(--ya-panel); overflow: auto; padding: 12px 14px; min-width: 0; }
.ya-side h3 { margin: 0 0 8px; font-size: 14px; }
.ya-side h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ya-muted); }
.ya-side table, .ya-tab { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.ya-side td, .ya-side th { padding: 3px 4px; border-bottom: 1px solid var(--ya-line); text-align: left; }
.ya-side td.r, .ya-tab td.r { text-align: right; }
.ya-side .muted { color: var(--ya-muted); }
.ya-side .btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ya-btn { border: 1px solid var(--ya-line); background: var(--ya-panel); color: var(--ya-fg); border-radius: 7px; padding: 6px 11px; cursor: pointer; }
.ya-btn:hover { border-color: var(--ya-acc); color: var(--ya-acc); }
.ya-btn.pri { background: var(--ya-acc); color: #fff; border-color: var(--ya-acc); }
.ya-btn.pri:hover { color: #fff; filter: brightness(1.08); }
.ya-btn.sm { padding: 3px 8px; font-size: 12px; }
.ya-status { display: flex; gap: 16px; align-items: center; padding: 4px 12px; background: var(--ya-panel); border-top: 1px solid var(--ya-line); color: var(--ya-muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.ya-status b { color: var(--ya-fg); font-weight: 600; }
.ya-status .grow { flex: 1; }
.ya-float { position: absolute; background: color-mix(in srgb, var(--ya-panel) 92%, transparent); border: 1px solid var(--ya-line); border-radius: 9px; padding: 6px 9px; box-shadow: 0 6px 20px -12px rgba(0,0,0,.4); font-size: 12px; backdrop-filter: blur(6px); }
.ya-planebar { top: 10px; left: 10px; display: flex; align-items: center; gap: 6px; }
.ya-planebar button { border: 1px solid var(--ya-line); background: var(--ya-panel); border-radius: 5px; width: 24px; height: 22px; cursor: pointer; }
.ya-drawbar { top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; }
.ya-drawbar select { border: 1px solid var(--ya-line); border-radius: 6px; padding: 2px 6px; background: var(--ya-panel); }
.ya-legend { right: 10px; bottom: 10px; min-width: 150px; }
.ya-legend .bar { height: 12px; border-radius: 3px; background: linear-gradient(90deg, rgb(30,40,200), rgb(20,160,230), rgb(60,200,90), rgb(240,210,40), rgb(220,40,30)); margin: 4px 0; }
.ya-legend .row { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.ya-legend .ratio span { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.ya-busy { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(10,20,35,.35); z-index: 90; }
.ya-busy div { background: var(--ya-panel); padding: 18px 26px; border-radius: 12px; font-weight: 600; box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); }
/* modal */
.ya-modal { position: fixed; inset: 0; z-index: 80; }
.ya-modal[hidden] { display: none; }
.ya-layer { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; background: rgba(10,20,35,.38); padding: 16px; }
.ya-layer + .ya-layer { background: rgba(10,20,35,.30); }
.ya-dlg { background: var(--ya-panel); color: var(--ya-fg); border-radius: 12px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.ya-dlg.wide { width: min(980px, 100%); }
.ya-dlg.xwide { width: min(1240px, 100%); }
.ya-dlg header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--ya-line); }
.ya-dlg header h2 { font-size: 15px; margin: 0; }
.ya-dlg header button { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ya-muted); line-height: 1; }
.ya-dlg .body { padding: 14px 16px; overflow: auto; }
.ya-dlg footer { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--ya-line); }
.ya-f { display: flex; flex-direction: column; gap: 3px; margin-bottom: 9px; font-size: 12px; color: var(--ya-muted); font-weight: 600; }
.ya-f > div { display: flex; border: 1px solid var(--ya-line); border-radius: 7px; overflow: hidden; background: var(--v-bg); }
.ya-f input, .ya-f select { border: 0; background: transparent; padding: 6px 8px; flex: 1; min-width: 0; color: var(--ya-fg); font-weight: 400; }
.ya-f select { border: 1px solid var(--ya-line); border-radius: 7px; background: var(--v-bg); }
.ya-f em { font-style: normal; padding: 0 8px; display: flex; align-items: center; background: var(--ya-hover); color: var(--ya-muted); font-weight: 400; font-size: 11px; }
.ya-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 12px; }
.ya-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.ya-chk { display: inline-flex; align-items: center; gap: 6px; margin: 3px 12px 3px 0; cursor: pointer; }
.ya-list { display: grid; grid-template-columns: 220px 1fr; gap: 14px; min-height: 340px; }
@media (max-width: 720px) { .ya-list { grid-template-columns: 1fr; } }
.ya-list .items { border: 1px solid var(--ya-line); border-radius: 8px; overflow: auto; max-height: 52vh; }
.ya-list .items button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--ya-line); padding: 6px 9px; cursor: pointer; }
.ya-list .items button.on { background: var(--ya-hover); color: var(--ya-acc); font-weight: 600; }
.ya-tabwrap { overflow: auto; max-height: 60vh; border: 1px solid var(--ya-line); border-radius: 8px; }
.ya-tab th { position: sticky; top: 0; background: var(--ya-hover); font-weight: 600; text-align: left; padding: 5px 7px; border-bottom: 1px solid var(--ya-line); white-space: nowrap; }
.ya-tab td { padding: 3px 7px; border-bottom: 1px solid var(--ya-line); white-space: nowrap; }
.ya-tab input, .ya-tab select { border: 1px solid var(--ya-line); border-radius: 5px; padding: 3px 5px; width: 90px; background: var(--v-bg); color: var(--ya-fg); }
.ya-note { color: var(--ya-muted); font-size: 12px; margin: 6px 0; }
.ya-warn { background: #fff4d6; color: #7a5600; border-radius: 7px; padding: 7px 10px; margin: 6px 0; font-size: 12px; }
:root[data-theme="dark"] .ya-warn { background: #3a2f10; color: #f3d27a; }
.ya-ok { color: #1f8a3e; font-weight: 700; } .ya-ng { color: #c0392b; font-weight: 700; }
.ya-mini { width: 100%; height: 70px; display: block; }
.ya-side .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.ya-hide-sm { }
@media (max-width: 900px) {
  .ya-main { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .ya-side { border-left: 0; border-top: 1px solid var(--ya-line); max-height: 38vh; }
  .ya-hide-sm { display: none !important; }
  .ya-top a.ya-brand span { display: none; }
}
/* print report */
#ya-print { display: none; }
@media print {
  body.ya-printing > *:not(#ya-print) { display: none !important; }
  body.ya-printing { overflow: visible; background: #fff; }
  #ya-print { display: block; color: #111; font: 10.5px/1.4 "Segoe UI", Arial, sans-serif; }
  #ya-print h1 { font-size: 16px; margin: 0 0 6px; }
  #ya-print h2 { font-size: 13px; margin: 14px 0 4px; break-after: avoid; }
  #ya-print table { width: 100%; border-collapse: collapse; margin: 4px 0; break-inside: auto; }
  #ya-print td, #ya-print th { border: 1px solid #999; padding: 2px 5px; text-align: left; }
  #ya-print th { background: #eef1f5; }
  #ya-print .mem { break-inside: avoid; border: 1px solid #bbb; padding: 6px 8px; margin: 8px 0; }
  #ya-print img { max-width: 100%; }
  @page { size: A4; margin: 14mm; }
}
.ya-float[hidden] { display: none !important; }
.ya-report table { border-collapse: collapse; margin: 6px 0 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.ya-report td, .ya-report th { border: 1px solid var(--ya-line); padding: 4px 8px; text-align: left; vertical-align: top; }
.ya-report th { background: var(--ya-hover); }
.ya-report h2 { font-size: 14px; margin: 14px 0 4px; }
.ya-report .mem > h2:first-child { font-size: 16px; margin-top: 0; }
.ya-report h3 { font-size: 12.5px; margin: 10px 0 2px; }
.ya-report tr.gov td { font-weight: 700; background: var(--ya-hover); }
.ya-report table { max-width: 100%; display: block; overflow-x: auto; }
.ol { text-decoration: overline; }
.ya-main > * { min-width: 0; }
.ya, .ya-top { max-width: 100vw; }
.ya-title { min-width: 0; }
@media (max-width: 600px) {
  .ya-top { gap: 6px; padding: 6px 8px; }
  .ya-top .ya-sel { padding: 2px 2px; font-size: 12px; }
  .ya-run { padding: 6px 10px; }
  .ya-title { flex: 1 1 40px; }
}

/* --- v3: kolay kullanım — model durumu, hızlı işlemler, kartlı şablon seçimi, bildirimler --- */
.ya :focus-visible, .ya-modal :focus-visible { outline: 2px solid var(--ya-acc); outline-offset: 2px; }
.ya-top :focus-visible { outline-color: #fff; }
kbd { border: 1px solid var(--ya-line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--v-bg); font: 11.5px ui-monospace, "SF Mono", Consolas, monospace; color: var(--ya-fg); white-space: nowrap; }
.ya-dd button kbd { border: 0; background: none; padding: 0; }
code { background: var(--ya-hover); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.ya-ib { width: 32px; height: 30px; display: inline-grid; place-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff !important; border-radius: 7px; cursor: pointer; font-weight: 700; flex: 0 0 auto; }
.ya-ib:hover { background: rgba(255,255,255,.22); }
.ya-ib svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.ya-ib svg path[fill] { fill: currentColor; stroke: none; }
.ya-tools button:disabled { opacity: .35; cursor: default; }
.ya-tools button:disabled:hover { background: none; }
/* araç çubuğu: gruplar + simge altında kısa ad */
.ya-tools { gap: 4px 10px; }
@media (min-width: 901px) { .ya-tools { flex-wrap: wrap; overflow-x: visible; } }
.ya-tools .tg { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; padding-right: 10px; border-right: 1px solid var(--ya-line); }
.ya-tools .tg:last-child { border-right: 0; padding-right: 0; }
.ya-tools .tg-sel { margin-left: auto; gap: 8px; }
.ya-tools button.st { width: auto; min-width: 46px; height: 42px; padding: 3px 5px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.ya-tools button.st svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  /* telefonda sık kullanılan gruplar başa gelir; sağ kenarda kaydırma ipucu (solma) */
  .ya-tools { padding-right: 30px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); }
  .ya-tools .tg-tool { order: 1; } .ya-tools .tg-draw { order: 2; } .ya-tools .tg-view { order: 3; } .ya-tools .tg-show { order: 4; } .ya-tools .tg-sel { order: 5; margin-left: 0; } .ya-tools .tg-file { order: 6; }
  .ya-tools .tg-sel label.mini { margin-left: 0; }
}
.ya-tools button.st.tool.on { background: var(--ya-acc); border-color: var(--ya-acc); color: #fff; }
:root[data-theme="dark"] .ya-tools button.st.tool.on { color: #0b1118; }
.ya-st-hint { color: var(--ya-muted); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ya-btn:disabled { opacity: .45; cursor: default; }
.ya-btn.danger:hover { border-color: #c0392b; color: #c0392b; }
.ya-btn:focus-visible { outline-offset: 1px; }

/* yan panel: model durumu */
.ya-flow { margin: 0 0 6px; border: 1px solid var(--ya-line); border-radius: 10px; background: var(--v-bg); overflow: hidden; }
.ya-flow-h { display: flex; justify-content: space-between; align-items: center; padding: 7px 11px; background: var(--ya-hover); font-size: 12px; }
.ya-flow-h span { color: var(--ya-muted); font-variant-numeric: tabular-nums; }
.ya-flow ul { list-style: none; margin: 0; padding: 0; }
.ya-flow li { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border-top: 1px solid var(--ya-line); }
.ya-flow li > div { flex: 1; min-width: 0; }
.ya-flow li b { display: block; font-size: 12.5px; }
.ya-flow li small { color: var(--ya-muted); font-size: 11.5px; line-height: 1.3; display: block; }
.ya-flow .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: 0 0 auto; background: var(--ya-line); color: var(--ya-muted); }
.ya-flow li.ok .ic { background: #1f8a3e; color: #fff; }
.ya-flow li.err .ic { background: #c0392b; color: #fff; }
.ya-flow li.warn .ic { background: #c88a00; color: #fff; }
.ya-flow li.go .ic { background: var(--ya-acc); color: #fff; }
.ya-flow li.err small { color: #c0392b; }
.ya-flow li.warn small { color: #9a6c00; }
:root[data-theme="dark"] .ya-flow li.err small { color: #ff8a7d; } :root[data-theme="dark"] .ya-flow li.warn small { color: #f3d27a; }
.ya-flow li .ya-btn { white-space: nowrap; flex: 0 0 auto; }
.ya-welcome { margin: 0 0 10px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--ya-acc) 45%, var(--ya-line)); background: color-mix(in srgb, var(--ya-acc) 8%, var(--ya-panel)); border-radius: 10px; }
.ya-welcome p { margin: 4px 0 0; color: var(--ya-muted); font-size: 12px; }
.ya-quick { margin: 10px 0 2px; padding: 8px 10px 10px; border: 1px solid var(--ya-line); border-radius: 10px; background: var(--v-bg); }
.ya-side .ya-quick h4 { margin: 0 0 6px; }
.ya-quick .grp { display: grid; grid-template-columns: 50px 1fr; gap: 6px; align-items: start; margin-top: 6px; }
.ya-quick .grp > span { color: var(--ya-muted); font-size: 11.5px; padding-top: 5px; }
.ya-quick .btns { margin-top: 0; }

/* kartlı şablon seçimi */
.ya-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ya-tpl { display: grid; justify-items: center; gap: 2px; padding: 10px 6px 8px; border: 1px solid var(--ya-line); border-radius: 10px; background: var(--ya-panel); cursor: pointer; color: var(--ya-muted); text-align: center; }
.ya-tpl svg { width: 52px; height: 42px; }
.ya-tpl b { color: var(--ya-fg); font-size: 12.5px; }
.ya-tpl small { font-size: 11px; }
.ya-tpl:hover { border-color: var(--ya-acc); }
.ya-tpl.on { border-color: var(--ya-acc); background: color-mix(in srgb, var(--ya-acc) 9%, var(--ya-panel)); color: var(--ya-acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ya-acc) 22%, transparent); }
.ya-tpl-p[hidden] { display: none; }
.ya-tpl-sum { margin: 4px 0 0; padding: 7px 10px; border-radius: 8px; background: var(--ya-hover); font-size: 12.5px; }
.ya-help { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 4px 26px; }
.ya-help h4 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ya-muted); }
.ya-help p { margin: 4px 0; line-height: 1.5; }
.ya-steps { margin: 0; padding-left: 20px; } .ya-steps li { margin: 0 0 7px; line-height: 1.5; }
.ya-tab.keys td { white-space: normal; vertical-align: top; }
.ya-tab.keys td:first-child { white-space: nowrap; padding-right: 14px; }
.ya-help code { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 720px) { .ya-help { grid-template-columns: minmax(0, 1fr); } }

/* boş model karşılama + bildirim */
.ya-empty { position: absolute; inset: 0; display: grid; justify-items: center; align-content: start; padding-top: 12%; pointer-events: none; }
.ya-empty[hidden] { display: none; }
.ya-empty > div { pointer-events: auto; max-width: min(420px, calc(100% - 24px)); text-align: center; padding: 18px 22px 14px; border: 1px solid var(--ya-line); border-radius: 14px; background: color-mix(in srgb, var(--ya-panel) 94%, transparent); box-shadow: 0 16px 40px -22px rgba(0,0,0,.5); }
.ya-empty h3 { margin: 0 0 4px; font-size: 16px; } .ya-empty p { margin: 0 0 10px; color: var(--ya-muted); }
.ya-empty .btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 8px; }
.ya-toast { pointer-events: none; position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 95; max-width: min(560px, 92vw); padding: 10px 16px; border-radius: 10px; background: #1b2433; color: #fff; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); font-size: 13px; }
.ya-toast[hidden] { display: none; }
.ya-toast.err { background: #8e1d1d; }
.ya-toast kbd { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }
@media (max-width: 900px) { .ya-st-hint { display: none; } .ya-toast { bottom: 18px; } }
@media (pointer: coarse) { .ya-tools button { height: 36px; min-width: 36px; } .ya-f input, .ya-f select, .ya-tab input, .ya-tab select { font-size: 16px; } .ya-menu > .m > button { padding: 10px 12px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---- modal analiz ve deprem (TBDY 2018) ---- */
.ya-modebar { left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 20px); }
.ya-modebar button { border: 1px solid var(--ya-line); background: var(--ya-panel); color: var(--ya-fg); border-radius: 6px; min-width: 32px; height: 32px; padding: 0 8px; cursor: pointer; font-size: 16px; line-height: 1; }
.ya-modebar button:hover { background: var(--ya-hover); }
.ya-modebar button.pl { font-size: 12px; font-weight: 600; background: var(--ya-acc); color: #fff; border-color: var(--ya-acc); white-space: nowrap; }
:root[data-theme="dark"] .ya-modebar button.pl { color: #0b1118; }
.ya-modebar .mi { display: flex; flex-direction: column; font-size: 12px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.ya-modeon .ya-legend { bottom: 62px; }
@media (max-width: 600px) {
  .ya-modebar { left: 8px; right: 8px; bottom: 8px; transform: none; justify-content: space-between; gap: 5px; max-width: none; }
  .ya-modebar .mi span:last-child { display: none; }
  body.ya-modeon .ya-legend { bottom: 60px; right: 8px; }
}
.ya-spec { display: block; width: 100%; height: 190px; border: 1px solid var(--ya-line); border-radius: 8px; background: var(--v-bg); margin: 6px 0 8px; }
.ya-seis h4, .ya-seis-res h4 { margin: 14px 0 6px; font-size: 13px; }
.ya-seis-calc { font-size: 12px; line-height: 1.6; background: var(--ya-hover); border-radius: 8px; padding: 7px 10px; margin: 4px 0; font-variant-numeric: tabular-nums; }
.ya-kv td:first-child { white-space: normal; }
.ya-kv th { position: static; }
.ya-hl td { font-weight: 600; }
.ya-notes { margin: 4px 0 0; padding-left: 18px; font-size: 12px; color: var(--ya-muted); }
.ya-notes li { margin: 3px 0; }
.ya-pre { font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; background: var(--ya-hover); border-radius: 8px; padding: 8px 10px; margin: 0; white-space: pre-wrap; overflow-x: auto; }
.ya-tab input[type=checkbox] { width: auto; margin: 0; }
.ya-seis2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; align-items: start; }
@media (max-width: 700px) { .ya-seis2 { grid-template-columns: minmax(0, 1fr); } }
.ya-seis h4 .ya-step { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: var(--ya-acc); color: #fff; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.ya-adv { margin: 14px 0 4px; border: 1px solid var(--ya-line); border-radius: 10px; padding: 0 12px 8px; }
.ya-adv > summary { cursor: pointer; padding: 10px 0 8px; font-weight: 600; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.ya-adv > summary::-webkit-details-marker { display: none; }
.ya-adv > summary::before { content: "▸"; display: inline-block; width: 14px; transition: transform .15s; color: var(--ya-muted); }
.ya-adv[open] > summary::before { transform: rotate(90deg); }
.ya-adv > summary .muted { font-weight: 400; font-size: 12px; }
.ya-menu > .mfind { position: sticky; left: 0; z-index: 2; background: var(--ya-panel); padding-right: 4px; margin-right: 2px; border-right: 1px solid var(--ya-line); }
.ya-menu > .mfind > button { display: flex; align-items: center; gap: 5px; background: none; border: 0; padding: 7px 11px; cursor: pointer; border-radius: 5px; white-space: nowrap; color: var(--ya-acc); font-weight: 600; }
.ya-menu > .mfind > button:hover { background: var(--ya-hover); }
.ya-menu > .mfind svg { width: 16px; height: 16px; }
@media (pointer: coarse) { .ya-menu > .mfind > button { padding: 10px 12px; } }
.ya-find-in { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--ya-line); border-radius: 8px; background: var(--ya-panel); color: var(--ya-fg); }
.ya-find-in:focus { outline: 2px solid var(--ya-acc); outline-offset: 1px; }
.ya-find-h { margin: 8px 2px 4px; font-size: 12px; color: var(--ya-muted); }
.ya-find-list { list-style: none; margin: 0; padding: 0; max-height: min(52vh, 420px); overflow: auto; border-radius: 8px; }
.ya-find-list li { display: flex; align-items: baseline; gap: 8px; padding: 9px 10px; border-radius: 7px; cursor: pointer; }
.ya-find-list li b { font-weight: 600; flex: 0 1 auto; }
.ya-find-list li .p { color: var(--ya-muted); font-size: 12px; margin-right: auto; }
.ya-find-list li kbd { font-size: 11px; }
.ya-find-list li.on, .ya-find-list li:hover { background: var(--ya-hover); }
.ya-find-list li.on { box-shadow: inset 3px 0 0 var(--ya-acc); }
.ya-dlg a { color: var(--ya-acc); text-decoration: underline; text-underline-offset: 2px; }
:root[data-theme="dark"] .ya-dlg a { color: #8cbcff; }
.ya-hint { background: var(--ya-hover); border-left: 3px solid var(--ya-acc); border-radius: 6px; padding: 8px 10px; margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
@media (max-width: 600px) { .ya-find-list li { flex-wrap: wrap; row-gap: 1px; } .ya-find-list li .p { flex-basis: 100%; order: 3; margin-right: 0; } .ya-find-list li kbd { margin-left: auto; } }

/* ---- Tanımla pencereleri: kesit / malzeme / yük listeleri ---- */
.ya-list.defl { grid-template-columns: 250px minmax(0, 1fr); gap: 16px; min-height: 380px; }
.defl .lp { display: flex; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; }
.defl .ya-lsearch { border: 1px solid var(--ya-line); border-radius: 7px; padding: 6px 9px; background: var(--v-bg); color: var(--ya-fg); width: 100%; box-sizing: border-box; }
.defl .items { border: 1px solid var(--ya-line); border-radius: 8px; overflow: auto; max-height: 54vh; flex: 1 1 auto; background: var(--v-bg); }
.defl .items button.dr { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--ya-line); padding: 6px 9px; cursor: pointer; color: var(--ya-fg); font: inherit; }
.defl .items button.dr:last-child { border-bottom: 0; }
.defl .items button.dr:hover { background: var(--ya-hover); }
.defl .items button.dr.on { background: var(--ya-hover); color: var(--ya-acc); box-shadow: inset 3px 0 0 var(--ya-acc); }
.defl .items .nm { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.defl .items small { color: var(--ya-muted); font-size: 11px; font-weight: 400; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.defl .items .tx { min-width: 0; flex: 1 1 auto; display: block; }
.defl .items .tx .nm { flex: none; }
.defl .items .th { flex: 0 0 54px; height: 42px; color: var(--ya-muted); display: block; }
.defl .items .th svg { width: 100%; height: 100%; display: block; }
.defl .btns { display: flex; flex-wrap: wrap; gap: 6px; }
.defl .ed { min-width: 0; overflow: auto; max-height: 64vh; padding: 0 4px 4px 0; }
.defl .ed h3 { font-size: 15px; }
@media (max-width: 760px) { .ya-list.defl { grid-template-columns: minmax(0, 1fr); min-height: 0; } .defl .items { max-height: 26vh; } .defl .ed { max-height: none; overflow: visible; } }
.ya-h4 { margin: 12px 0 6px; font-size: 13px; }
.ya-secrow { display: grid; grid-template-columns: minmax(190px, 270px) minmax(0, 1fr); gap: 14px; align-items: start; margin: 8px 0 4px; }
@media (max-width: 760px) { .ya-secrow { grid-template-columns: minmax(0, 1fr); } }
.ya-secprev { border: 1px solid var(--ya-line); border-radius: 10px; background: var(--v-bg); color: var(--ya-fg); padding: 6px; min-height: 120px; }
.ya-secprev svg, .ya-secsvg { display: block; width: 100%; height: auto; max-height: 270px; }
.ya-secdims { min-width: 0; }
.ya-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.ya-props input.ro { background: color-mix(in srgb, var(--ya-hover) 75%, transparent); color: var(--ya-muted); }
.ya-info { font-size: 12px; color: var(--ya-muted); margin: 2px 0 8px; }
.ya-info b { color: var(--ya-fg); }
.ya-adv { margin: 8px 0; border: 1px solid var(--ya-line); border-radius: 8px; padding: 6px 10px; }
.ya-adv summary { cursor: pointer; font-weight: 600; font-size: 12.5px; }
.ya-adv[open] summary { margin-bottom: 8px; }
.ya-adv .muted { font-weight: 400; }
.ya-f textarea { border: 1px solid var(--ya-line); border-radius: 7px; background: var(--v-bg); color: var(--ya-fg); padding: 6px 8px; font: 12.5px/1.45 ui-monospace, Menlo, Consolas, monospace; resize: vertical; font-weight: 400; width: 100%; box-sizing: border-box; }
.ya-shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.ya-shape { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 8px 6px; border: 1px solid var(--ya-line); border-radius: 10px; background: var(--ya-panel); cursor: pointer; color: var(--ya-muted); text-align: center; font: inherit; }
.ya-shape svg { width: 66px; height: 52px; }
.ya-shape b { color: var(--ya-fg); font-size: 12.5px; }
.ya-shape small { font-size: 10.5px; line-height: 1.25; }
.ya-shape:hover { border-color: var(--ya-acc); }
.ya-shape.on { border-color: var(--ya-acc); background: color-mix(in srgb, var(--ya-acc) 9%, var(--ya-panel)); color: var(--ya-acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ya-acc) 22%, transparent); }
.ya-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; max-height: 36vh; overflow: auto; }
.ya-size { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--ya-line); border-radius: 8px; cursor: pointer; background: var(--ya-panel); font-variant-numeric: tabular-nums; }
.ya-size.on { border-color: var(--ya-acc); background: color-mix(in srgb, var(--ya-acc) 10%, var(--ya-panel)); color: var(--ya-acc); }
.ya-size.has { opacity: .5; cursor: not-allowed; }
.ya-rows td { padding: 3px 4px; } .ya-rows select, .ya-rows input { width: 100%; min-width: 96px; box-sizing: border-box; }
.ya-rows td:last-child { width: 1%; }
.ya-pill { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--ya-hover); color: var(--ya-acc); vertical-align: middle; margin-left: 6px; }
.ya-link { background: none; border: 0; padding: 0; color: var(--ya-acc); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; font-weight: 400; }
:root[data-theme="dark"] .ya-link { color: #8cbcff; }
.ya-confirm p { margin: 0 0 6px; }

/* ---- v4: sol araç şeridi, sağ tık / açılır menüler, özellikler penceresi ---- */
.ya-main { grid-template-columns: auto minmax(0, 1fr) 330px; }
.ya-main.noside { grid-template-columns: auto minmax(0, 1fr) 0; }
#ya-canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.ya-lbar { display: grid; grid-template-columns: repeat(2, 46px); grid-auto-rows: min-content; align-content: start; gap: 3px; width: 108px; padding: 6px 7px; background: var(--ya-panel); border-right: 1px solid var(--ya-line); overflow-y: auto; overflow-x: hidden; min-height: 0; scrollbar-width: thin; }
.ya-lbar.compact { grid-template-columns: 38px; width: 54px; }
.ya-lbar .lg { grid-column: 1 / -1; margin: 5px 0 1px; padding: 6px 0 0; border-top: 1px solid var(--ya-line); font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ya-muted); text-align: center; }
.ya-lbar .lg:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ya-lbar .lg.grow { border: 0; padding: 0; margin: 0; }
.ya-lbar .lb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; padding: 4px 1px 3px; background: none; border: 1px solid transparent; border-radius: 9px; cursor: pointer; color: var(--ya-fg); font-size: 10px; font-weight: 600; line-height: 1.1; text-align: center; overflow: hidden; }
.ya-lbar .lb svg { width: 20px; height: 20px; flex: 0 0 auto; }
.ya-lbar .lb span { max-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.ya-lbar .lb:hover { background: var(--ya-hover); }
.ya-lbar .lb.on { background: var(--ya-acc); border-color: var(--ya-acc); color: #fff; }
:root[data-theme="dark"] .ya-lbar .lb.on { color: #0b1118; }
.ya-lbar .lb.open { background: var(--ya-hover); border-color: var(--ya-acc); color: var(--ya-acc); }
.ya-lbar .lb.dim { opacity: .5; }
.ya-lbar .lb.danger:hover { color: #c0392b; border-color: #c0392b; }
.ya-lbar .lb.tgl { grid-column: 1 / -1; min-height: 32px; flex-direction: row; gap: 4px; color: var(--ya-muted); font-weight: 500; margin-top: 4px; }
.ya-lbar .lb.tgl svg { width: 15px; height: 15px; }
.ya-lbar.compact .lb.tgl svg { transform: rotate(180deg); }
.ya-lbar.compact .lb { min-height: 38px; }
.ya-lbar.compact .lb span, .ya-lbar.compact .lg span { display: none; }
.ya-lbar.compact .lg { font-size: 0; padding: 0; margin: 3px 0; height: 1px; background: var(--ya-line); border: 0; }
.ya-lbar.compact .lg:first-child { display: none; }
.ya-lbar .lb:focus-visible { outline: 2px solid var(--ya-acc); outline-offset: -2px; }
@media (max-width: 900px) {
  .ya-main, .ya-main.noside { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .ya-lbar { grid-row: 1; grid-template-columns: 52px; width: 64px; padding: 5px 5px 18px; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); }
  .ya-lbar .lb { min-height: 50px; font-size: 10.5px; }
  .ya-lbar .lb.tgl { display: none; }
  .ya-view { grid-row: 1; grid-column: 2; }
  .ya-side { grid-row: 2; grid-column: 1 / -1; max-height: 30vh; }
  .ya-main.noside .ya-side { display: none; }
}

/* sağ tık / açılır menü */
.ya-ctx { position: fixed; z-index: 70; min-width: 230px; max-width: min(340px, calc(100vw - 12px)); overflow: auto; background: var(--ya-panel); color: var(--ya-fg); border: 1px solid var(--ya-line); border-radius: 11px; box-shadow: 0 18px 48px -16px rgba(0,0,0,.5); padding: 5px; outline: 0; font-size: 13px; overscroll-behavior: contain; }
.ya-ctx .ch { margin: -5px -5px 4px; padding: 8px 14px 7px; border-bottom: 1px solid var(--ya-line); background: var(--ya-hover); border-radius: 10px 10px 0 0; }
.ya-ctx .ch b { display: block; font-size: 13.5px; }
.ya-ctx .ch small { display: block; color: var(--ya-muted); font-size: 11.5px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.ya-ctx .cg { padding: 7px 10px 2px; color: var(--ya-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.ya-ctx .cn { margin: 4px 9px 6px; color: var(--ya-muted); font-size: 12px; line-height: 1.4; }
.ya-ctx hr { border: 0; border-top: 1px solid var(--ya-line); margin: 4px 2px; }
.ya-ctx .ci { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; text-align: left; background: none; border: 0; padding: 6px 10px; border-radius: 7px; cursor: pointer; color: var(--ya-fg); font: inherit; }
.ya-ctx .ci svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--ya-muted); }
.ya-ctx .ci .ph { width: 17px; flex: 0 0 17px; }
.ya-ctx .ci .sw { width: 13px; height: 13px; border-radius: 3px; flex: 0 0 13px; margin: 0 2px; border: 1px solid rgba(0,0,0,.2); }
.ya-ctx .ci .t { flex: 1 1 auto; min-width: 0; }
.ya-ctx .ci .t small { display: block; color: var(--ya-muted); font-size: 11px; line-height: 1.25; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.ya-ctx .ci kbd { border: 0; background: none; color: var(--ya-muted); padding: 0; font-size: 11px; }
.ya-ctx .ci:hover, .ya-ctx .ci:focus-visible { background: var(--ya-hover); outline: 0; }
.ya-ctx .ci:focus-visible { box-shadow: inset 0 0 0 2px var(--ya-acc); }
.ya-ctx .ci.dim { opacity: .5; }
.ya-ctx .ci.danger, .ya-ctx .ci.danger svg { color: #c0392b; }
:root[data-theme="dark"] .ya-ctx .ci.danger, :root[data-theme="dark"] .ya-ctx .ci.danger svg { color: #ff8a7d; }
.ya-ctx .ci.on .t { font-weight: 600; color: var(--ya-acc); }
.ya-ctx .ci .chk { color: var(--ya-acc); font-weight: 700; }
.ya-ctx .ci .chev { color: var(--ya-muted); font-size: 10px; transition: transform .12s; }
.ya-ctx .ci.open .chev { transform: rotate(90deg); }
.ya-ctx .csub { margin: 0 0 4px 18px; padding-left: 6px; border-left: 2px solid var(--ya-line); }
.ya-ctx .csub[hidden] { display: none; }
.ya-ctx .cx { padding: 4px 6px 2px; }
.ya-ctx .cpat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ya-muted); }
.ya-ctx .cpat select { flex: 1; min-width: 0; border: 1px solid var(--ya-line); border-radius: 7px; background: var(--v-bg); color: var(--ya-fg); padding: 5px 7px; font: inherit; }
@media (pointer: coarse) { .ya-ctx .ci { min-height: 42px; font-size: 14px; } .ya-ctx .cpat select { font-size: 16px; } }

/* özellikler penceresi */
.ya-dlg.mid { width: min(760px, 100%); }
.ya-pp { min-height: 360px; }
.pp-head { display: flex; align-items: center; gap: 11px; margin: 0 0 10px; }
.pp-head svg { width: 28px; height: 28px; flex: 0 0 28px; color: var(--ya-acc); }
.pp-head b { display: block; font-size: 15px; }
.pp-head small { display: block; color: var(--ya-muted); font-size: 12px; }
.pp-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.pp-types button { border: 1px solid var(--ya-line); background: var(--ya-panel); border-radius: 99px; padding: 5px 13px; cursor: pointer; font-weight: 600; color: var(--ya-fg); }
.pp-types button span, .ya-tabs button span { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 99px; background: var(--ya-hover); color: var(--ya-muted); font-size: 11px; text-align: center; font-weight: 700; }
.pp-types button[aria-selected="true"] { background: var(--ya-acc); border-color: var(--ya-acc); color: #fff; }
:root[data-theme="dark"] .pp-types button[aria-selected="true"] { color: #0b1118; }
.pp-types button[aria-selected="true"] span { background: rgba(255,255,255,.25); color: inherit; }
.ya-tabs { display: flex; gap: 2px; margin: 0 0 12px; border-bottom: 1px solid var(--ya-line); overflow-x: auto; scrollbar-width: none; }
.ya-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 9px 13px; cursor: pointer; color: var(--ya-muted); font-weight: 600; white-space: nowrap; }
.ya-tabs button[hidden] { display: none; }
.ya-tabs button:hover { color: var(--ya-fg); }
.ya-tabs button[aria-selected="true"] { color: var(--ya-acc); border-bottom-color: var(--ya-acc); }
.pp-pane[hidden] { display: none; }
.pp-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 7px 14px; margin: 8px 0; padding: 9px 12px; background: var(--ya-hover); border-radius: 9px; }
.kv { display: flex; flex-direction: column; font-size: 11.5px; color: var(--ya-muted); min-width: 0; }
.kv b { color: var(--ya-fg); font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pp-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.pr-chk { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px 14px; }
.pr-rel th, .pr-rel td { padding: 6px 8px; }
.pr-rel th:not(:first-child), .pr-rel td:not(:first-child) { text-align: center; width: 70px; }
.pr-rel input[type=checkbox], .pr-chk input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--ya-acc); }
.pr-list { counter-reset: pr; display: grid; gap: 8px; margin-bottom: 8px; }
.pr { counter-increment: pr; border: 1px solid var(--ya-line); border-radius: 10px; padding: 4px 11px 2px; background: var(--v-bg); }
.pr-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.pr-h b::before { content: "Yük " counter(pr); font-size: 12px; font-weight: 700; color: var(--ya-muted); }
.pr-x { background: none; border: 0; font-size: 21px; line-height: 1; color: var(--ya-muted); cursor: pointer; width: 32px; height: 30px; border-radius: 7px; }
.pr-x:hover { color: #c0392b; background: var(--ya-hover); }
.pr-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 0 10px; }
.pr-sec + .pr-sec { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--ya-line); }
.pr-empty[hidden] { display: none; }
@media (max-width: 600px) { .ya-dlg.mid { width: 100%; } .pr-g { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ya-tabs button { padding: 10px 11px; } }
@media (pointer: coarse) { .pr-x { width: 40px; height: 38px; } .pp-types button { padding: 8px 15px; } .pr-rel input[type=checkbox], .pr-chk input[type=checkbox] { width: 22px; height: 22px; } }

.pr-g .ya-f.pr-wide { grid-column: 1 / -1; }

/* koyu tema: açık mavi vurgu zemini üzerinde koyu yazı (okunabilir kontrast) */
:root[data-theme="dark"] .ya-btn.pri, :root[data-theme="dark"] .ya-btn.pri:hover,
:root[data-theme="dark"] .ya-tools button.st.tool.on, :root[data-theme="dark"] .ya-flow li.go .ic,
:root[data-theme="dark"] .ya-modebar button.pl, :root[data-theme="dark"] .ya-seis h4 .ya-step,
:root[data-theme="dark"] .ya-lbar .lb.on, :root[data-theme="dark"] .pp-types button[aria-selected="true"] { color: #0b1118; }

/* gövdeye eklenen açılır menü, pencere ve bağlam menüsündeki düğmeler de tema rengini miras alsın (koyu temada siyah yazı olmasın) */
:where(body.ya-body) :where(button, input, select, textarea) { color: inherit; }

/* ---- ızgara düzenleyici ---- */
.gd-head, .gd-row { display: grid; grid-template-columns: 26px minmax(64px, 1fr) minmax(110px, 1.7fr) 36px; gap: 8px; align-items: center; }
.gd-head { font-size: 11px; font-weight: 600; color: var(--ya-muted); margin: 2px 0 4px; }
.gd-rows { max-height: 38vh; overflow: auto; padding-right: 2px; margin-bottom: 8px; }
.gd-row { margin-bottom: 6px; }
.gd-n { color: var(--ya-muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.gd-row .gd-id { border: 1px solid var(--ya-line); border-radius: 7px; background: var(--v-bg); padding: 6px 8px; min-width: 0; color: var(--ya-fg); }
.gd-c { display: flex; border: 1px solid var(--ya-line); border-radius: 7px; overflow: hidden; background: var(--v-bg); }
.gd-c input { border: 0; background: transparent; padding: 6px 8px; flex: 1; min-width: 0; color: var(--ya-fg); }
.gd-c em { font-style: normal; padding: 0 8px; display: flex; align-items: center; background: var(--ya-hover); color: var(--ya-muted); font-size: 11px; }
.gd-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.gd-quick { border: 1px dashed var(--ya-line); border-radius: 9px; padding: 9px 11px 6px; margin: 10px 0; }
.gd-quick b { font-size: 12.5px; }
.gd-quick .ya-btn { margin: 2px 0 4px; }
.ya-dlg footer .gd-del { margin-right: auto; color: #c0392b; border-color: #c0392b66; }
@media (pointer: coarse) { .gd-row .gd-id, .gd-c input { font-size: 16px; } }

/* ---- Izgara sistemi penceresi ---- */
.gs-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 14px; align-items: start; }
.gs-sec { border: 1px solid var(--ya-line); border-radius: 8px; padding: 6px 10px 10px; margin-bottom: 10px; }
.gs-sec > h4 { margin: 0 0 6px; font-size: 12px; color: var(--ya-acc); font-weight: 700; }
.gs-in { display: grid; grid-template-columns: minmax(0, 1fr) 78px; gap: 10px; align-items: start; }
.gs-scroll { max-height: 172px; overflow: auto; border: 1px solid var(--ya-line); border-radius: 6px; background: var(--v-bg); }
.gs-tab th, .gs-tab td { padding: 2px 4px; }
.gs-tab input[type=text], .gs-tab input[type=number] { width: 100%; min-width: 64px; }
.gs-tab select { width: 100%; min-width: 74px; }
.gs-tab tr.sel td { background: color-mix(in srgb, var(--ya-acc) 15%, transparent); }
.gs-tab input.gs-col { width: 34px; min-width: 34px; height: 24px; padding: 0 2px; cursor: pointer; }
.gs-tab input.gs-col.unset { opacity: .55; }
.gs-btns { display: flex; flex-direction: column; gap: 8px; }
.gs-side { display: flex; flex-direction: column; gap: 10px; }
.gs-box { border: 1px solid var(--ya-line); border-radius: 8px; padding: 8px 10px; }
.gs-box .ya-chk { margin: 2px 0; }
.gs-box .ya-f { margin-bottom: 8px; }
.gs-lab { font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--ya-muted); }
.gs-prev { padding: 4px; min-height: 60px; }
.gs-prev svg { width: 100%; height: auto; display: block; color: var(--ya-fg); }
.gs-pv-empty { font-size: 11px; color: var(--ya-muted); padding: 12px 6px; text-align: center; }
@media (max-width: 760px) { .gs-wrap { grid-template-columns: minmax(0, 1fr); } .gs-in { grid-template-columns: minmax(0, 1fr); } .gs-btns { flex-direction: row; } }
@media (pointer: coarse) { .gs-tab input, .gs-tab select { font-size: 16px; } }

.ya-f input.bad, .ya-f > div:has(input.bad), input.ya-in.bad { border-color: #d63a2f !important; box-shadow: 0 0 0 2px rgba(214,58,47,.22); outline: none; }
.ya-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #e8eefb; color: #2b4a80; }
.ya-chip.warn { background: #fff1d6; color: #7a4d00; }
:root[data-theme="dark"] .ya-chip { background: #243453; color: #bcd0f5; }
:root[data-theme="dark"] .ya-chip.warn { background: #4a3a14; color: #ffd98a; }
.ya-scope { margin: 0 0 10px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--ya-acc) 9%, var(--ya-panel)); color: var(--ya-fg); font-size: 12.5px; border: 1px solid color-mix(in srgb, var(--ya-acc) 25%, var(--ya-line)); }
.ya-relsvg { margin: 0 0 8px; }

/* ======================================================================
   v5 — modern üst çubuk, menü ve yazı tipi; Gösterim paneli; imleç ipucu
   ====================================================================== */
:root { --ya-font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ya-font-d: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", Roboto, Arial, sans-serif; }
body.ya-body { font-family: var(--ya-font); font-size: 13px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-feature-settings: "calt", "kern", "cv11"; }
.ya button, .ya input, .ya select, .ya textarea, .ya-modal button, .ya-modal input, .ya-modal select, .ya-modal textarea, .ya-dd, .ya-tip, .ya-showpop { font-family: var(--ya-font); }
.ya-top { background: linear-gradient(115deg, #00264d 0%, #003a73 52%, #0b4f93 100%); padding: 8px 16px; gap: 12px; box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); }
.ya-top a.ya-brand { gap: 10px; font-family: var(--ya-font-d); font-weight: 650; font-size: 15px; letter-spacing: -.012em; }
.ya-top a.ya-brand svg { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 2px 8px -2px rgba(0,0,0,.45); }
.ya-title { font-family: var(--ya-font-d); font-size: 14px; font-weight: 560; letter-spacing: -.005em; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.10); border-radius: 9px; padding: 5px 10px; }
.ya-title:hover, .ya-title:focus { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); }
.ya-top .ya-sel { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); border-radius: 9px; padding: 4px 8px; font-size: 12.5px; font-weight: 520; }
.ya-ib { border-radius: 9px; width: 34px; height: 32px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); }
.ya-run { border-radius: 9px; padding: 7px 16px; font-weight: 650 !important; letter-spacing: .01em; box-shadow: 0 6px 16px -8px rgba(255,214,0,.7); }
.ya-run.alt { box-shadow: none; background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22); }

.ya-menu { background: var(--ya-panel); border-bottom: 1px solid var(--ya-line); padding: 5px 12px; gap: 2px; align-items: center; }
.ya-menu > .m > button { font-family: var(--ya-font); font-size: 13.5px; font-weight: 520; letter-spacing: .008em; color: var(--ya-fg); padding: 6px 12px; border-radius: 8px; transition: background .12s, color .12s; }
.ya-menu > .m > button:hover { background: color-mix(in srgb, var(--ya-acc) 9%, transparent); }
.ya-menu > .m.open > button { background: color-mix(in srgb, var(--ya-acc) 14%, transparent); color: var(--ya-acc); }
.ya-menu > .mfind { border-right: 0; padding-right: 6px; margin-right: 4px; }
.ya-menu > .mfind > button { background: var(--ya-hover); border: 1px solid var(--ya-line); border-radius: 999px; padding: 5px 15px 5px 11px; font-size: 13px; font-weight: 560; color: var(--ya-muted); }
.ya-menu > .mfind > button:hover { color: var(--ya-acc); border-color: var(--ya-acc); }
.ya-dd { border-radius: 12px; padding: 6px; min-width: 270px; border-color: color-mix(in srgb, var(--ya-line) 80%, transparent); box-shadow: 0 18px 50px -16px rgba(10,25,50,.45), 0 2px 8px -2px rgba(10,25,50,.18); }
.ya-dd button { font-size: 13px; font-weight: 450; padding: 7px 11px; border-radius: 8px; }
.ya-dd button:hover { background: color-mix(in srgb, var(--ya-acc) 11%, transparent); color: var(--ya-fg); }
.ya-dd button kbd { font-family: var(--ya-font); font-size: 10.5px; color: var(--ya-muted); background: var(--ya-hover); border-radius: 5px; padding: 1px 6px; }
.ya-dd .sub { font-size: 10.5px; font-weight: 650; letter-spacing: .08em; padding: 9px 11px 3px; }
.ya-dd hr { margin: 5px 4px; }

.ya-tools { padding: 5px 12px; gap: 4px 12px; }
.ya-tools .tg { padding-right: 12px; }
.ya-tools button { border-radius: 8px; }
.ya-tools button:hover { background: color-mix(in srgb, var(--ya-acc) 9%, transparent); }
.ya-tools button.on { background: color-mix(in srgb, var(--ya-acc) 14%, transparent); border-color: color-mix(in srgb, var(--ya-acc) 55%, transparent); color: var(--ya-acc); }
.ya-tools button.open { background: color-mix(in srgb, var(--ya-acc) 14%, transparent); }
.ya-tools button.st { font-size: 10.5px; font-weight: 560; letter-spacing: .01em; }
.ya-tools select { border-radius: 8px; padding: 4px 8px; }
.ya-side h3, .ya-dlg header h2 { font-family: var(--ya-font-d); letter-spacing: -.01em; }
.ya-dlg { border-radius: 14px; }
.ya-btn { border-radius: 8px; font-weight: 520; }
.ya-lgd { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 3px 0 6px; vertical-align: middle; }

/* Gösterim açılır paneli */
.ya-showpop { position: fixed; z-index: 60; width: 300px; background: var(--ya-panel); border: 1px solid var(--ya-line); border-radius: 12px; padding: 10px 12px 12px; box-shadow: 0 20px 54px -18px rgba(10,25,50,.5); font-size: 13px; color: var(--ya-fg); }
.ya-showpop .hd { font: 650 11px/1 var(--ya-font); letter-spacing: .08em; text-transform: uppercase; color: var(--ya-muted); margin: 0 0 9px; }
.ya-showpop .lrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 9px; background: var(--ya-hover); margin-bottom: 8px; font-weight: 560; }
.ya-showpop .lrow select { border: 1px solid var(--ya-line); border-radius: 7px; background: var(--ya-panel); padding: 3px 7px; min-width: 120px; }
.ya-showpop .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; }
.ya-showpop .chk { display: flex; align-items: center; gap: 7px; padding: 5px 4px; border-radius: 7px; cursor: pointer; }
.ya-showpop .chk:hover { background: var(--ya-hover); }
.ya-showpop .chk input { accent-color: var(--ya-acc); width: 15px; height: 15px; margin: 0; }
.ya-showpop .ft { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--ya-line); }

/* imleç ipucu */
.ya-tip { position: absolute; z-index: 20; pointer-events: none; min-width: 150px; max-width: 260px; padding: 8px 11px 9px; border-radius: 10px; background: color-mix(in srgb, var(--ya-panel) 96%, transparent); border: 1px solid var(--ya-line); box-shadow: 0 12px 34px -14px rgba(10,25,50,.5); font-size: 12px; backdrop-filter: blur(8px); }
.ya-tip[hidden] { display: none; }
.ya-tip h5 { margin: 0; font: 650 13px/1.2 var(--ya-font-d); }
.ya-tip h6 { margin: 8px 0 2px; font: 650 10.5px/1 var(--ya-font); letter-spacing: .07em; text-transform: uppercase; color: var(--ya-muted); }
.ya-tip .sub { color: var(--ya-muted); font-size: 11.5px; margin-top: 1px; }
.ya-tip table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ya-tip td { padding: 1px 0; } .ya-tip td.r { text-align: right; } .ya-tip td em { font-style: normal; color: var(--ya-muted); font-size: 11px; }
