/* Faz 3 — yerlesim plani: sahne (yakinlastir/kaydir), SVG nokta katmani, yan panel, lejant. Otomatik yuklenir. */
.az-plan { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-bottom: 18px; }
.az-plan-main { min-width: 0; }
.az-plan-side { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.az-plan-sec { margin: 0; }
.az-plan-sec h2 { font-size: 1rem; margin: 0 0 8px; }
.az-plan-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.az-plan-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.az-plan-modes .az-btn { min-height: 44px; }
.az-plan-modes .az-btn.is-active { background: var(--az-primary); color: #fff; border-color: var(--az-primary); }
.az-plan-zoom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.az-plan-zoom .az-btn { min-width: 44px; min-height: 44px; }

.az-plan-stage {
    position: relative; overflow: hidden; height: min(70vh, 720px); min-height: 320px;
    background: #e9ecf1 repeating-linear-gradient(45deg, transparent 0 14px, rgba(0, 0, 0, .025) 14px 28px);
    border: 1px solid var(--az-line-strong); border-radius: var(--az-radius); touch-action: none; user-select: none; -webkit-user-select: none;
    cursor: grab;
}
.az-plan-stage:focus-visible { outline: 2px solid var(--az-primary); }
.az-plan-stage.is-panning { cursor: grabbing; }
.az-plan-stage.is-ekle, .az-plan-stage.is-olcek, .az-plan-stage.is-place { cursor: crosshair; }
.az-plan-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.az-plan-canvas img { display: block; max-width: none; background: #fff; pointer-events: none; }
.az-plan-svg { position: absolute; left: 0; top: 0; overflow: visible; }
.az-plan-svg .az-pt { cursor: pointer; }
.az-plan-svg .az-pt.is-drag { cursor: grabbing; }
.az-plan-svg .az-pt-ring { fill: none; stroke-width: 3; }
.az-plan-svg .az-pt.is-selected .az-pt-ring { stroke-dasharray: 4 3; }
.az-plan-svg .az-pt-glif { fill: #fff; font-weight: 700; font-family: inherit; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.az-plan-svg .az-pt-kod { fill: #1c1917; font-family: ui-monospace, Menlo, Consolas, monospace; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.az-plan-svg .az-circle { fill: none; stroke: rgba(37, 99, 235, .55); stroke-width: 1.5; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; pointer-events: none; }
.az-plan-svg .az-circle.is-active { fill: rgba(37, 99, 235, .08); stroke: rgba(37, 99, 235, .95); stroke-width: 2.5; stroke-dasharray: none; }
.az-plan-svg .az-gap { pointer-events: none; }
.az-plan-svg .az-scale-line { stroke: #c2410c; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 6 4; }
.az-plan-svg .az-scale-dot { fill: #c2410c; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.az-plan-toast { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(28, 25, 23, .92); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: .85rem; max-width: 92%; overflow-wrap: anywhere; z-index: 5; }
.az-plan-toast.is-danger { background: var(--az-danger); }
.az-plan-kapsama { margin-top: 8px; font-size: .92rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.az-plan-eksik { color: var(--az-danger); }

.az-plan-lejant { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; font-size: .88rem; }
.az-plan-lejant li { display: flex; align-items: center; gap: 8px; }
.az-plan-glif { display: inline-block; min-width: 34px; text-align: center; border: 2px solid #333; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 6px; background: #fff; }
.az-plan-renk { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; }
.az-plan-renk-daire { background: #fff; border: 1.5px dashed rgba(37, 99, 235, .8); }
.az-plan-renk-bosluk { background: repeating-linear-gradient(45deg, rgba(220, 38, 38, .55) 0 2px, rgba(220, 38, 38, .10) 2px 6px); border: 1px solid rgba(220, 38, 38, .6); }

.az-plan-liste { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow: auto; display: grid; gap: 2px; }
.az-plan-liste li { display: flex; align-items: center; gap: 6px; }
.az-plan-liste li.is-selected .az-plan-liste-btn { background: var(--az-primary-soft); }
.az-plan-liste-btn { flex: 1 1 auto; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; padding: 6px 8px; border-radius: var(--az-radius-sm); overflow-wrap: anywhere; }
.az-plan-liste-btn:hover { background: var(--az-bg); }
.az-plan-koy { min-height: 44px; flex: 0 0 auto; }
.az-plan-sec-kart dt { color: var(--az-muted); font-size: .8rem; margin-top: 6px; }
.az-plan-sec-kart dd { margin: 0; }
.az-plan-sec-kart .az-actions { margin-top: 10px; flex-wrap: wrap; gap: 6px; }
.az-plan-yukle { margin-bottom: 14px; }
.az-plan-yukle-not { font-size: .85rem; }
.az-plan-ayar td:first-child { font-weight: 600; }
.az-plan-ayar input[name^="kaynak_"] { width: 100%; }
.az-plan-kaynak { font-size: .85rem; margin-top: 10px; }

@media (max-width: 900px) {
    .az-plan { grid-template-columns: 1fr; }
    .az-plan-stage { height: 62vh; min-height: 280px; }
    .az-plan-side { order: 2; }
}

/* Plan cizici (views/plan/draw.php + js/plan/cizim.js) */
.az-cz { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-bottom: 18px; }
.az-cz-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.az-cz-side { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.az-cz-bilgi { margin: -6px 0 10px; font-size: .88rem; }
.az-cz-arac { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; background: var(--az-surface); border: 1px solid var(--az-line); border-radius: var(--az-radius); padding: 6px; }
.az-cz-arac-2 { gap: 6px 10px; padding: 4px 8px; }
.az-cz-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 58px; min-height: 52px; padding: 4px 6px;
    border: 1px solid transparent; border-radius: var(--az-radius-sm); background: transparent; color: var(--az-text); font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; line-height: 1.1; list-style: none; }
.az-cz-btn::-webkit-details-marker { display: none; }
.az-cz-btn:hover { background: var(--az-bg); }
.az-cz-btn.is-active { background: var(--az-primary); color: #fff; border-color: var(--az-primary); }
.az-cz-btn:disabled { opacity: .45; cursor: default; }
.az-cz-btn-sm { flex-direction: row; min-height: 36px; min-width: 36px; font-size: .82rem; border-color: var(--az-line); }
.az-cz-ayrac { width: 1px; align-self: stretch; background: var(--az-line); margin: 0 2px; }
.az-cz-durum { margin-left: auto; font-size: .82rem; font-variant-numeric: tabular-nums; }
.az-cz-ikon { font-size: 1.15rem; line-height: 1; height: 1.2rem; }
.az-cz-ikon::before { content: '•'; }
.az-cz-ikon-sec::before { content: '⬉'; } .az-cz-ikon-kaydir::before { content: '✥'; } .az-cz-ikon-wall::before { content: '▬'; }
.az-cz-ikon-room::before { content: '▢'; } .az-cz-ikon-block::before { content: '■'; } .az-cz-ikon-door::before { content: '◜'; }
.az-cz-ikon-window::before { content: '▭'; } .az-cz-ikon-stairs::before { content: '☰'; } .az-cz-ikon-line::before { content: '╱'; }
.az-cz-ikon-dim::before { content: '↔'; } .az-cz-ikon-text::before { content: 'T'; font-weight: 800; } .az-cz-ikon-arrow::before { content: '➜'; color: #15803d; }
.az-cz-ikon-legend::before { content: '▤'; } .az-cz-ikon-sym::before { content: '⚑'; color: #dc2626; }
.az-cz-btn.is-active .az-cz-ikon::before { color: #fff; }
.az-cz-isaret { position: relative; }
.az-cz-palet { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: 250px; display: grid; gap: 2px; padding: 6px; background: var(--az-surface); border: 1px solid var(--az-line); border-radius: var(--az-radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .14); }
.az-cz-palet-btn { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border: 0; border-radius: var(--az-radius-sm); background: transparent; font: inherit; font-size: .86rem; text-align: left; cursor: pointer; }
.az-cz-palet-btn:hover { background: var(--az-bg); }
.az-cz-palet-ornek { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 5px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); font-size: .62rem; font-weight: 800; }

.az-cz-stage { position: relative; height: max(440px, calc(100vh - 300px)); overflow: hidden; border: 1px solid var(--az-line-strong); border-radius: var(--az-radius);
    background: #e9ecf1; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.az-cz-stage:focus-visible { outline: 2px solid var(--az-primary); }
.az-cz-stage.is-sec { cursor: default; }
.az-cz-stage.is-kaydir, .az-cz-stage.is-space { cursor: grab; }
.az-cz-stage.is-panning { cursor: grabbing; }
.az-cz-svg { display: block; }
.az-cz-svg .cz-it { cursor: pointer; }
.az-cz-stage:not(.is-sec) .az-cz-svg .cz-it { pointer-events: none; }
.az-cz-svg .cz-handle { cursor: move; }
.az-cz-ipucu { position: absolute; left: 10px; top: 10px; right: 10px; pointer-events: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.az-cz-ipucu { font-size: .8rem; color: #44403c; }
.az-cz-ipucu > * { pointer-events: auto; }
.az-cz-ipucu:not(:empty) { background: rgba(255, 255, 255, .92); border: 1px solid var(--az-line); border-radius: var(--az-radius-sm); padding: 5px 9px; right: auto; max-width: calc(100% - 20px); }

.az-cz-ozellik label { display: block; margin-bottom: 8px; }
.az-cz-ozellik input[type="number"], .az-cz-ozellik input[type="text"], .az-cz-ozellik select { width: 100%; }
.az-cz-ozellik-eylem { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.az-cz-kucuk { font-size: .8rem; margin: 6px 0; }
.az-cz-alan { gap: 8px; }
.az-cz-ozet { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0 0 8px; font-size: .9rem; }
.az-cz-ozet dt { color: var(--az-muted); }
.az-cz-ozet dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.az-cz-kopya { display: flex; gap: 6px; align-items: flex-start; }
.az-cz-kopya select, .az-cz-kopya .az-arama { flex: 1 1 auto; min-width: 0; }
.az-cz-kisayol { margin: 0; padding-left: 18px; font-size: .82rem; display: grid; gap: 4px; color: var(--az-muted); }
.az-cz-kisayol kbd { font: inherit; font-size: .76rem; background: var(--az-bg); border: 1px solid var(--az-line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--az-text); }

@media (max-width: 1100px) {
    .az-cz { grid-template-columns: 1fr; }
    .az-cz-stage { height: 64vh; min-height: 360px; }
}
@media (max-width: 600px) {
    .az-cz-btn { min-width: 50px; font-size: .68rem; }
    .az-cz-durum { width: 100%; margin-left: 0; }
}
.az-cz-dxf input[type="file"] { width: 100%; }
.az-cz-katman-wrap { max-height: 260px; overflow: auto; border: 1px solid var(--az-line); border-radius: var(--az-radius-sm); }
.az-cz-katman { width: 100%; border-collapse: collapse; font-size: .82rem; }
.az-cz-katman th { position: sticky; top: 0; background: var(--az-bg); text-align: left; font-weight: 600; padding: 5px 6px; }
.az-cz-katman td { padding: 4px 6px; border-top: 1px solid var(--az-line); }
.az-cz-katman td:first-child { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.az-cz-katman td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; color: var(--az-muted); }
.az-cz-katman td:nth-child(3), .az-cz-katman td:nth-child(4), .az-cz-katman th:nth-child(3), .az-cz-katman th:nth-child(4) { text-align: center; width: 44px; }
.az-cz-katman input { width: 18px; height: 18px; }
.az-cz-uyari { margin: 0 0 6px; padding-left: 18px; font-size: .8rem; color: var(--az-warn, #b45309); }
.az-cz-uyari:empty { display: none; }
