:root {
  --ink: #16242f;
  --ink-soft: #52626e;
  --line: #d9dfe3;
  --line-strong: #b8c2c9;
  --paper: #ffffff;
  --canvas: #f6f8f9;
  --surface: #eef1f3;
  --accent: #0e5a6b;
  --accent-strong: #0a4553;
  --accent-soft: #e0eff2;
  --signal: #d97706;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #15703f;
  --ok-soft: #e4f4ea;
  --warn-soft: #fdf3e0;
  --radius: 8px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font: 14px/1.45 var(--font);
}
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 13px; margin: 0 0 10px; font-weight: 650; }
h3 { font-size: 13px; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-soft); }
.small { font-size: 12px; }

/* Fejléc */
.top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.brand { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.brand span { color: var(--signal); }
.stepper { display: flex; gap: 2px; flex: 1; justify-content: center; min-width: 0; }
.step {
  display: flex; align-items: center; gap: 7px;
  border: 0; background: none; padding: 6px 10px; border-radius: 6px;
  font: inherit; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.step:hover { background: var(--surface); }
.step-no {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 650; background: var(--surface); color: var(--ink-soft);
}
.step.is-current { color: var(--ink); font-weight: 650; }
.step.is-current .step-no { background: var(--accent); color: #fff; }
.top-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.save-status { font-size: 12px; color: var(--ink-soft); margin-right: 6px; white-space: nowrap; }
.save-status.is-bad { color: var(--danger); }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; width: 210px; padding: 4px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(22 36 47 / 0.14);
}
.menu-list button { display: block; width: 100%; padding: 8px 10px; border: 0; background: none; text-align: left; font: inherit; color: inherit; border-radius: 5px; cursor: pointer; }
.menu-list button:hover { background: var(--surface); }
.small-screen-note { display: none; padding: 8px 16px; background: var(--warn-soft); font-size: 13px; }

/* Gombok és mezők */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 7px 14px; border-radius: 6px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); background: var(--surface);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-strong); }
.btn.ghost { background: var(--paper); border-color: var(--line-strong); }
.btn.ghost:hover:not(:disabled) { background: var(--surface); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: none; color: var(--danger); border-color: transparent; }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.wide { width: 100%; }
.btn + .btn.wide { margin-top: 6px; }
.small-btn { min-height: 30px; padding: 4px 10px; font-size: 13px; font-weight: 500; }
.btn.ghost.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.icon-btn {
  width: 30px; height: 30px; border: 1px solid var(--line-strong); background: var(--paper);
  border-radius: 6px; font-size: 16px; line-height: 1; cursor: pointer; color: var(--ink); flex: none;
}
.icon-btn:hover { background: var(--surface); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.field { display: block; margin-bottom: 10px; min-width: 0; }
.field-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 3px; color: var(--ink-soft); }
.field-hint { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  width: 100%; min-height: 34px; padding: 6px 8px; font: inherit; color: inherit;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 5px;
}
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.field-row .field-label { font-size: 11px; white-space: nowrap; }
.check { display: flex; align-items: flex-start; gap: 7px; margin-bottom: 10px; cursor: pointer; }
.check input { margin: 3px 0 0; }
.check-list .check { margin-bottom: 4px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.btn-row .btn { font-size: 12.5px; padding-inline: 6px; }

/* Fő elrendezés */
.main { flex: 1; min-height: 0; overflow: auto; }
.page { padding: 28px 16px 48px; }
.page-inner { max-width: 760px; margin: 0 auto; }
.lead { font-size: 15px; color: var(--ink-soft); margin-bottom: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card h2 { font-size: 15px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.nav-row { display: flex; justify-content: space-between; gap: 8px; }
.nav-row .btn.primary:only-child { margin-left: auto; }

.mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.review-room { padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 6px; }
.review-room.is-done { background: var(--ok-soft); border-color: transparent; }
.review-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.review-room ul { margin: 6px 0 0; padding-left: 22px; font-size: 12.5px; color: var(--ink-soft); }
.review-room li { margin-bottom: 2px; }
.mode-cards.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mode-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px;
  background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  font: inherit; color: inherit; cursor: pointer;
}
.mode-card strong { font-size: 15px; }
.mode-card:hover:not(:disabled) { border-color: var(--accent); }
.mode-card.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.mode-icon { color: var(--accent); }

.question { border: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; margin: 0 0 14px; min-width: 0; }
.question legend { font-weight: 650; padding: 0; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: block; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Munkaterület */
.workspace { display: flex; height: 100%; min-height: 0; }
.panel { width: 300px; flex: none; overflow-y: auto; background: var(--paper); border-right: 1px solid var(--line); }
.panel-inner { padding-bottom: 8px; }
.panel-section { padding: 14px; border-bottom: 1px solid var(--line); }
.panel > .nav-row, .panel-inner > .nav-row { padding: 14px; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; }
.tab { border: 0; background: none; padding: 5px 10px; font: inherit; border-radius: 5px; cursor: pointer; color: var(--ink-soft); }
.tab:hover { background: var(--surface); }
.tab.is-active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 650; }
.tab-add { font-size: 12.5px; }
.zoom { display: flex; align-items: center; gap: 4px; flex: none; }
.zoom-label { width: 42px; text-align: center; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sheet-host { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--canvas); }
.sheet { position: absolute; inset: 0; display: block; touch-action: none; user-select: none; cursor: grab; }
.sheet.is-panning { cursor: grabbing; }
.sheet.is-calibrating, .sheet.is-merging { cursor: crosshair; }
.hint {
  position: absolute; left: 12px; bottom: 12px; max-width: min(560px, calc(100% - 24px));
  padding: 6px 10px; background: rgb(22 36 47 / 0.86); color: #fff; font-size: 12.5px; border-radius: 6px; pointer-events: none;
}
.key-hint {
  position: absolute; left: 12px; top: 10px; max-width: min(640px, calc(100% - 320px)); display: flex; flex-wrap: wrap; gap: 3px 12px;
  font-size: 12px; color: var(--ink-soft); opacity: 0.72; pointer-events: none;
}
.key-hint span { white-space: nowrap; }
.key-hint kbd, .help kbd {
  display: inline-block; padding: 0 5px; margin-right: 3px; font: 600 11px var(--font); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px;
}
.inspector {
  position: absolute; top: 10px; right: 10px; bottom: 10px; width: 280px; max-height: calc(100% - 20px); height: fit-content;
  overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 22px rgb(22 36 47 / 0.14);
}
.inspector-inner { padding: 12px; }
.inspector-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.inspector-head strong { font-size: 14px; }
.more { margin-bottom: 10px; }
.more summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.readout { font-size: 13px; }

.palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.palette-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.palette-item {
  display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 5px 7px; text-align: left;
  border: 1px solid var(--line-strong); background: var(--paper); border-radius: 6px;
  font: inherit; font-size: 12.5px; line-height: 1.2; color: inherit; cursor: grab; touch-action: none;
}
.palette-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.palette-3 .palette-item { flex-direction: column; gap: 2px; text-align: center; }
.palette-icon { color: var(--accent); display: block; height: 30px; }
.palette-badge {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: #fff; border: 2px solid currentColor;
}
.shape-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 10px; }
.shape-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--paper); font: inherit; font-size: 11.5px; color: inherit; cursor: pointer;
}
.shape-btn:hover { border-color: var(--accent); }
.shape-btn.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.shape-btn svg { color: var(--accent); }
.field-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stepper-field { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 4px; }
.stepper-field input { text-align: center; }
.stepper-field .icon-btn { width: 34px; height: 34px; }
.inspector-title { display: flex; align-items: center; gap: 8px; }
.inspector-title .palette-badge { width: 30px; height: 30px; }
.check-list.scroll { max-height: 160px; overflow-y: auto; padding-right: 2px; }
.tip { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 10px; }
.list { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.list-row {
  display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 0; background: none;
  border-radius: 5px; font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer;
}
.list-row:hover { background: var(--surface); }
.list-row.is-selected { background: var(--accent-soft); font-weight: 600; }
.list-row.is-static { cursor: default; background: none; }
.file-name { font-weight: 600; word-break: break-word; }
.status-row { margin: 10px 0 8px; padding: 6px 8px; border-radius: 5px; font-size: 12.5px; }
.status-row.is-ok { background: var(--ok-soft); color: var(--ok); }
.status-row.is-bad { background: var(--warn-soft); color: #8a4b00; }

.summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; }
.summary dt { color: var(--ink-soft); }
.summary dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.issues { padding: 8px 10px; border-radius: 6px; margin-bottom: 8px; font-size: 13px; }
.issues ul { margin: 0; padding-left: 16px; }
.issues li { margin-bottom: 3px; }
.issues.is-error { background: var(--danger-soft); color: #8e1c13; }
.issues.is-warning { background: var(--warn-soft); color: #7a4300; }
.issues.is-pending { background: var(--accent-soft); color: var(--accent-strong); }
.final-banner { display: flex; flex-direction: column; gap: 2px; padding: 10px; margin-bottom: 10px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); }

/* Rajz */
.grid-line { fill: none; stroke: #dfe5e9; stroke-width: 1; }
.room { fill: rgb(255 255 255 / 0.82); stroke: none; cursor: move; }
.room:hover { fill: rgb(224 239 242 / 0.7); }
.room.is-selected { fill: rgb(224 239 242 / 0.95); }
.room.is-overlap { fill: rgb(253 236 234 / 0.9); }
.room.is-inserting { fill: rgb(14 90 107 / 0.25); }
.room.is-merge-target { cursor: crosshair; fill: rgb(253 243 224 / 0.9); }
.wall-outline { stroke: var(--ink); stroke-linecap: square; pointer-events: none; }
.wall-plain { stroke: #66737c; }
.wall-selected { stroke: var(--signal); stroke-linecap: square; pointer-events: none; }
.wall-gap { stroke: #fff; stroke-width: 13; }
.wall-swatch { display: block; flex: none; border-radius: 2px; }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; font-size: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wall-row { padding: 6px; margin: 0 -6px 4px; border-radius: 6px; }
.wall-row.is-selected { background: #fdf0da; box-shadow: inset 0 0 0 1.5px var(--signal); }
.wall-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 0; margin-bottom: 3px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-soft); text-align: left; cursor: pointer; }
.wall-row .field { margin-bottom: 0; }
.opening { cursor: move; }
.opening .hit { fill: transparent; stroke: none; }
.opening:hover .hit { fill: rgb(217 119 6 / 0.12); }
.opening.is-selected .hit { fill: rgb(217 119 6 / 0.18); }
.opening:hover .wall-gap { stroke: #ffe3b8; }
.wall-hit { stroke: transparent; stroke-width: 16; }
.wall-hit.is-h { cursor: ns-resize; }
.wall-hit.is-v { cursor: ew-resize; }
.wall-hit:hover { stroke: rgb(14 90 107 / 0.28); }
.handle-size { cursor: ew-resize; }
.glass { stroke: #2563eb; stroke-width: 1.5; }
.passage { stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 4 3; }
.door-leaf { stroke: var(--ink); stroke-width: 2; }
.door-arc { fill: none; stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 3; }
.opening.is-selected .wall-gap { stroke: #ffe3b8; }
.opening.is-selected .door-leaf { stroke: var(--signal); }
.room-name { font: 650 13px var(--font); fill: var(--ink); text-anchor: middle; pointer-events: none; }
.room-dims { font: 11.5px var(--font); fill: var(--ink-soft); text-anchor: middle; pointer-events: none; }
.dim { font: 600 12px var(--font); fill: var(--accent-strong); text-anchor: middle; pointer-events: none; }
.scene-dim { opacity: 0.35; pointer-events: none; }
.plan-locked .room, .plan-locked .opening { cursor: default; }
.plan-locked .room:hover { fill: rgb(255 255 255 / 0.82); }
.plan-locked .opening { pointer-events: none; }
.furn-body { fill: #f3efe8; stroke: #7d7364; stroke-width: 1.2; }
.furn-line { fill: none; stroke: #7d7364; stroke-width: 1; }
.furn-text { font: 11px var(--font); fill: #5c5346; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: #f3efe8; stroke-width: 3px; }
.furniture { cursor: move; }
.furniture:hover .furn-body { fill: #ebe3d6; }
.furniture.is-selected .furn-body { fill: #fbe9c8; stroke: var(--signal); stroke-width: 2; }
.furniture.is-selected .furn-line { stroke: var(--signal); }
.furniture.is-locked { pointer-events: none; opacity: 0.8; }
.handle.is-nwse { cursor: nwse-resize; }
.handle.is-nesw { cursor: nesw-resize; }
.rotate-zone { fill: transparent; cursor: grab; }
.rotate-stem { stroke: var(--signal); stroke-width: 1.5; pointer-events: none; }
.rotate-knob { fill: var(--signal); stroke: #fff; stroke-width: 2; cursor: grab; }
.ghost-furn { fill: rgb(217 119 6 / 0.15); stroke: var(--signal); stroke-width: 1.5; stroke-dasharray: 4 3; pointer-events: none; }
.ghost-furn-shape { opacity: 0.55; pointer-events: none; }
.ghost-front { pointer-events: none; }
.ghost-front line { stroke: var(--signal); stroke-width: 3; stroke-linecap: round; }
.ghost-front path { fill: var(--signal); }
.ghost-front text { fill: var(--signal); font-size: 12px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.select-box { fill: rgb(14 90 107 / 0.1); stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 3; pointer-events: none; }
.group-halo { fill-opacity: 0.16; stroke-width: 2; }
.group-link { stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; pointer-events: none; }
.group-led { stroke-width: 10; stroke-linecap: round; opacity: 0.35; }
.group-tag { font: 700 9.5px var(--font); fill: #fff; text-anchor: middle; pointer-events: none; }
.group-dot { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 9.5px; font-weight: 700; }
.group-row { align-items: center; justify-content: flex-start; }
.group-row .muted { margin-left: auto; }
.guide { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 6 4; pointer-events: none; }
.guide-text { font: 650 11px var(--font); fill: var(--accent-strong); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.ruler { stroke: var(--signal); stroke-width: 1; pointer-events: none; }
.ruler-text { font: 600 10.5px var(--font); fill: #92500a; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.symbol { cursor: move; }
.symbol-ring { fill: transparent; stroke: none; }
.symbol.is-selected .symbol-ring { fill: rgb(217 119 6 / 0.25); stroke: var(--signal); stroke-width: 2; }
.symbol.is-link-target { cursor: pointer; }
.symbol.is-link-target .symbol-ring { fill: rgb(14 90 107 / 0.14); stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 2; }
.led.is-link-target { cursor: pointer; }
.symbol-label { font: 650 10.5px var(--font); fill: var(--ink); pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.led { cursor: move; }
.led-line { stroke: var(--signal); stroke-width: 4; stroke-linecap: round; }
.led .hit { stroke: transparent; stroke-width: 16; }
.led.is-selected .led-line { stroke-width: 6; }
.led-text { font: 600 11px var(--font); fill: #92500a; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.handle { fill: #fff; stroke: var(--signal); stroke-width: 2.5; cursor: nwse-resize; }
.link { stroke: var(--signal); stroke-width: 1.5; stroke-dasharray: 5 4; pointer-events: none; }
.room-label { cursor: move; }
.room-label rect { fill: var(--accent); }
.room-label.is-selected rect { fill: var(--signal); }
.room-label text { font: 600 12px var(--font); fill: #fff; text-anchor: middle; pointer-events: none; }
.ghost-line { stroke: var(--signal); stroke-width: 6; opacity: 0.75; }
.ghost-bad { fill: rgb(180 35 24 / 0.25); stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 3 3; }
.calib-line { stroke: var(--danger); stroke-width: 2; }
.calib-point { fill: #fff; stroke: var(--danger); stroke-width: 2.5; }

/* Fotók */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.photo-thumb { position: relative; }
.photo-thumb button.photo-open { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: rgb(22 36 47 / 0.75); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.modal-photo { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; }
.modal.is-wide { width: min(880px, 100%); }
.help { max-height: 68vh; overflow-y: auto; padding-right: 8px; }
.help h3 { font-size: 14px; margin: 16px 0 6px; }
.help h3:first-child { margin-top: 0; }
.help ul { margin: 0; padding-left: 18px; }
.help li { margin-bottom: 4px; }
.help table { width: 100%; border-collapse: collapse; }
.help td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.help td:first-child { white-space: nowrap; width: 1%; }
.suggest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; margin: 10px 0 12px; padding: 0; list-style: none; }
.suggest-list li { display: flex; justify-content: space-between; gap: 8px; }

.palette-furn { display: block; width: 30px; height: 30px; flex: none; }

/* Admin felület */
.adm-brand { font-size: 12px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.adm-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.adm-actions { display: flex; align-items: center; gap: 6px; }
.adm-list { max-width: 980px; }
.adm-list-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.adm-table-wrap { padding: 0; overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th { padding: 10px 12px; font-size: 12px; text-align: left; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.adm-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-row { cursor: pointer; }
.adm-row:hover { background: var(--surface); }
.adm-panel { width: 320px; }
.adm-tabs { display: flex; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.adm-circuits { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.adm-circuit {
  display: grid; grid-template-columns: 12px auto minmax(0, 1fr); align-items: center; gap: 1px 8px; width: 100%;
  padding: 7px 8px; border: 1px solid transparent; border-radius: 6px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.adm-circuit:hover { background: var(--surface); }
.adm-circuit.is-active { background: var(--accent-soft); border-color: var(--accent); }
.adm-dot { width: 12px; height: 12px; border-radius: 50%; }
.adm-circuit-code { font-weight: 700; }
.adm-circuit-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-circuit-meta { grid-column: 3; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.adm-pairs dd { font-weight: 500; overflow-wrap: anywhere; }
.adm-gap { margin-top: 10px; }
.adm-bullets { margin: 0; padding-left: 18px; }
.adm-bullets li { margin-bottom: 4px; }
.adm-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.adm-photos img { display: block; width: 100%; height: 80px; object-fit: cover; border-radius: 5px; }
.adm-modes { display: flex; gap: 4px; flex: none; }
.adm-sheet #plan * { cursor: inherit; }
.adm-sheet #plan [data-kind="element"], .adm-sheet #plan [data-kind="element"] * { cursor: pointer; }
.adm-sheet.is-routing, .adm-sheet.is-routing #plan * { cursor: crosshair; }
.adm-route-line { fill: none; stroke-width: 2.500; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.adm-route-line.is-draft { stroke-width: 2; opacity: 0.8; }
.adm-route.is-selected .adm-route-line { stroke-width: 4; }
.adm-route-hit { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; }
.adm-sheet.is-routing .adm-route-hit { pointer-events: none; }
.adm-stub { stroke-width: 1.500; stroke-dasharray: 2 3; pointer-events: none; }
.adm-route-label { font-size: 11px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 3px; pointer-events: none; }
.adm-ring { fill: none; stroke-width: 2.500; }
.adm-focus { fill: none; stroke: var(--signal); stroke-width: 2; stroke-dasharray: 4 3; pointer-events: none; }
.adm-mid { fill: #fff; stroke: var(--accent); stroke-width: 1.500; cursor: copy; }
.adm-node { fill: #fff; stroke-width: 2; pointer-events: none; }
.adm-snap { fill: none; stroke: var(--ink-soft); stroke-width: 1.500; pointer-events: none; }
.adm-snap.is-snapped { stroke: var(--accent); }
.adm-snap.is-element { stroke: var(--signal); stroke-width: 2.500; }
.adm-views { display: flex; gap: 2px; flex: none; }
.adm-wide { max-width: 1180px; }
.adm-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.adm-columns > .card { margin-bottom: 14px; }
.adm-choice { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.adm-choice-card {
  display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.adm-choice-card:hover { background: var(--surface); }
.adm-choice-card.is-primary { border-color: var(--accent); background: var(--accent-soft); }
.adm-choice-card span { font-size: 12.5px; color: var(--ink-soft); }
.adm-panel-mark { fill: #1f2937; stroke: #fff; stroke-width: 1.500; }
.adm-panel-text { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; pointer-events: none; }
.adm-panel { cursor: grab; }
.adm-panel.is-auto .adm-panel-mark { fill: #4b5563; stroke: #fbbf24; stroke-dasharray: 3 2; }
.adm-panel.is-selected .adm-panel-mark { stroke: var(--signal); stroke-width: 3; stroke-dasharray: none; }
.adm-ring.is-free { stroke: #9ca3af; stroke-width: 1.500; stroke-dasharray: 4 3; }
.brand.is-link { cursor: pointer; color: inherit; text-decoration: none; }
.adm-home { max-width: 1060px; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 16px 0; }
.adm-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 92px; text-align: left; font: inherit; color: inherit; cursor: pointer; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.adm-tile:hover { background: var(--surface); }
.adm-tile strong { font-size: 15.5px; }
.adm-tile span { font-size: 12.5px; color: var(--ink-soft); }
.adm-tile.is-primary { border-color: var(--accent); background: var(--accent-soft); }
.adm-add-select { max-width: 360px; padding: 5px 8px; font: inherit; font-size: 13px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); color: inherit; }
.adm-bars { display: flex; flex-direction: column; gap: 8px; }
.adm-bar { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.adm-bar-name { font-weight: 650; }
.adm-bar-track { display: block; height: 10px; background: var(--surface); border-radius: 5px; overflow: hidden; }
.adm-bar-fill { display: block; height: 100%; background: var(--accent); }
.adm-bar-fill.is-bad { background: var(--danger); }
.adm-bar-value { font-size: 12px; color: var(--ink-soft); }
.adm-checks { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-checks li { padding: 6px 9px; border-radius: 5px; font-size: 13px; }
.adm-checks .is-bad { background: var(--danger-soft); color: var(--danger); }
.adm-checks .is-warn { background: var(--warn-soft); color: #8a4b00; }
.adm-checks .is-ok { background: var(--ok-soft); color: var(--ok); }
.adm-diagram { overflow-x: auto; }
.adm-diagram svg { display: block; min-width: 760px; width: 100%; height: auto; }
.adm-rail svg { max-width: 760px; }
.adm-table-title { margin: 14px 14px 8px; }
.adm-demo { margin: 0 14px 10px; padding: 7px 10px; font-size: 12.5px; border-radius: 5px; background: var(--warn-soft); color: #8a4b00; }
.adm-num-input { width: 92px; padding: 4px 6px; font: inherit; text-align: right; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); color: inherit; }
.adm-table .is-edited td { background: var(--accent-soft); }
.adm-group-row td { font-size: 12px; font-weight: 650; color: var(--ink-soft); background: var(--canvas); }
.adm-textarea { display: block; width: 100%; padding: 8px; font: inherit; border: 1px solid var(--line-strong); border-radius: 6px; resize: vertical; margin-bottom: 6px; }
.adm-view-opts {
  position: absolute; left: 12px; top: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 5px 10px; font-size: 12.5px;
  background: rgb(255 255 255 / 0.92); border: 1px solid var(--line); border-radius: 6px;
}
.adm-legend { color: var(--ink-soft); font-size: 11.5px; }
.adm-kd { cursor: move; }
.adm-kd rect { fill: #fff; stroke-width: 2; }
.adm-kd path { fill: none; stroke-width: 1.4; }
.adm-kd.is-selected rect { stroke-width: 3.5; }
.adm-kd-label { font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 3px; pointer-events: none; }
.adm-route-line.is-switched { stroke-width: 1.6; }
.adm-route.is-selected .adm-route-line.is-switched { stroke-width: 3; }
.adm-logo { display: block; max-width: 180px; max-height: 70px; margin: 6px 0; }
.pd-frame-out { fill: #fff; stroke: #16242f; stroke-width: 1; }
.pd-zone { font-size: 10px; fill: #52626e; }
.pd-tb { fill: #fff; stroke: #16242f; stroke-width: 1.6; }
.pd-tb-label { font-size: 8.5px; fill: #52626e; }
.pd-tb-value { font-size: 11px; fill: #16242f; }
.pd-ref { font-size: 9px; fill: #52626e; }
.pd-mech { stroke: #16242f; stroke-width: 0.8; stroke-dasharray: 3 2; }
.pd-sym-dash { fill: none; stroke: #52626e; stroke-width: 0.8; stroke-dasharray: 4 3; }
.pd-term { fill: #fff; stroke: #16242f; stroke-width: 0.8; }
.pd-enclosure { fill: #f8fafb; stroke: #16242f; stroke-width: 1.6; }
.pd-slot { fill: none; stroke: #d9dfe3; stroke-width: 0.7; stroke-dasharray: 2 2; }
.pd-line.is-l1 { stroke: #7c4a1e; }
.pd-line.is-l2 { stroke: #16242f; }
.pd-line.is-l3 { stroke: #7a8791; }
.pd-line.is-rail-thin { stroke-width: 1.8; }
.adm-view-opt { display: flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.adm-layers { position: relative; }
.adm-table tr.is-changed td { background: var(--warn-soft); }
.adm-was { display: block; font-size: 11.5px; color: #8a4b00; }
.adm-changes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.adm-stale-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--warn, #d97706); vertical-align: middle; }
.adm-pack-input { width: 90px; padding: 4px 6px; font: inherit; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); color: inherit; }
.adm-order-note { margin: 0 14px 8px; }
.adm-order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px 14px; }
.adm-order-print { font: inherit; white-space: pre-wrap; }
.adm-layers summary { cursor: pointer; font-weight: 600; white-space: nowrap; }
.adm-layer-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: flex; flex-direction: column; gap: 5px; min-width: 240px; max-height: 60vh; overflow: auto;
  padding: 10px 12px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 6px 18px rgb(0 0 0 / 0.12);
}
.adm-layer { display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.adm-draft-bar { display: inline-flex; gap: 4px; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line-strong); }
.adm-modes .btn.is-active { box-shadow: inset 0 0 0 2px var(--accent); }
.adm-sheet .adm-dim { opacity: 0.22; }
.adm-link { stroke: var(--signal); stroke-width: 2; stroke-dasharray: 6 4; pointer-events: none; }
.adm-link.is-group { stroke: var(--accent); stroke-dasharray: 2 4; }
.adm-link-end { fill: none; stroke: var(--signal); stroke-width: 2; pointer-events: none; }
.adm-relations { display: flex; flex-direction: column; gap: 6px; padding: 8px; margin-bottom: 10px; background: var(--canvas); border-radius: 6px; }
.adm-related { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.adm-related .field-label { margin: 0; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.adm-chip { padding: 1px 7px; font: inherit; font-size: 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: inherit; cursor: pointer; }
.adm-chip:hover { background: var(--accent-soft); }
.adm-circuit-pill { padding: 1px 8px; font-size: 12px; font-weight: 700; color: #fff; border-radius: 10px; }
.adm-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.adm-table-head h2 { margin: 0; }
.adm-table-head select { max-width: 320px; padding: 5px 8px; font: inherit; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); color: inherit; }
.panel-diagram { background: #fff; }
.panel-diagram text { font-family: var(--font); }
.panel-rail text { font-family: var(--font); text-anchor: middle; }
.pd-frame { fill: none; stroke: #16242f; stroke-width: 2; }
.pd-dot { fill: #16242f; }
.pd-sym { fill: none; stroke: #16242f; stroke-width: 1; }
.pd-sym-box { fill: #fff; stroke: #16242f; stroke-width: 1.2; }
.pd-sym-ring { fill: none; stroke: #16242f; stroke-width: 1.2; }
.pd-arrow { fill: #16242f; }
.pd-cell { fill: none; stroke: #16242f; stroke-width: 0.8; }
.pd-cell.is-head { fill: #eef1f3; }
.pd-th { font-size: 11px; font-weight: 700; fill: #16242f; }
.pd-td { font-size: 11px; fill: #16242f; }
.pd-sheet-title { font-size: 15px; font-weight: 750; fill: #16242f; }
.pd-line.is-thin { stroke-width: 0.9; }
.pd-line.is-rail { stroke-width: 2.4; }
.pd-line.is-n { stroke: #1d4ed8; }
.pd-line.is-pe { stroke: #15803d; }
.pd-box.is-n-bar { fill: #dbeafe; }
.pd-box.is-pe-bar { fill: #dcfce7; }
.pd-box { fill: #fff; stroke: #16242f; stroke-width: 1.2; }
.pd-box.is-feed { fill: #f1f5f9; }
.pd-box.is-main { fill: #fde8e8; }
.pd-box.is-spd { fill: #fdf3e0; }
.pd-box.is-rcd { fill: #e0eff2; }
.pd-box.is-breaker { fill: #fff; }
.pd-box.is-extra { fill: #ede9fe; }
.pd-line { stroke: #16242f; stroke-width: 1.2; }
.pd-line.is-bus { stroke-width: 3; }
.pd-rail { fill: #d9dfe3; }
.pd-title { font-size: 11px; font-weight: 650; fill: #16242f; }
.pd-sub { font-size: 9.5px; fill: #52626e; }
.pd-code { font-size: 12px; font-weight: 750; fill: #16242f; }
.panel-diagram .pd-note { font-size: 10.5px; fill: #16242f; text-anchor: start; }
.panel-diagram .pd-note.is-soft { font-size: 9.5px; fill: #52626e; }
.pd-hd { font-size: 11px; fill: #16242f; }
.pd-tb-value.is-small { font-size: 9.5px; }
.pd-tb-big { font-size: 15px; font-weight: 700; fill: #16242f; text-anchor: middle; }
.pd-tiny { font-size: 8px; fill: #16242f; }
.pd-tiny-b { font-size: 9px; font-weight: 700; fill: #16242f; }
.pd-term-dot { fill: #fff; stroke: #16242f; stroke-width: 1; }
.pd-zone-name { font-size: 15px; fill: #16242f; }
.pd-big { font-size: 26px; fill: #16242f; }
.pd-cover-title { font-size: 24px; font-weight: 650; fill: #16242f; }
.pd-cover-sub { font-size: 16px; fill: #52626e; }
.pd-cell.is-section { fill: #f5f7f8; }
.pd-line.is-dash { stroke-dasharray: 7 4; }
.pd-line.is-dashdot { stroke-dasharray: 14 4 2 4; }
.pd-line.is-bus.is-n, .pd-line.is-bus.is-pe, .pd-line.is-bus { stroke-width: 1.6; }
.adm-live { font-size: 12px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; pointer-events: none; }

/* Ügyfél ajánlat: a képernyős előnézet és a nyomtatás közös */
.quote-doc { font-size: 10.5pt; line-height: 1.4; color: var(--q-dark); background: #fff; }
.quote-doc table { width: 100%; border-collapse: collapse; }
.quote-doc th, .quote-doc td { padding: 1.2mm 1.5mm; text-align: left; vertical-align: top; border-bottom: 0.2mm solid #d9dfe3; }
.quote-doc th { width: 30mm; font-weight: 600; }
.quote-doc h2 { margin: 5mm 0 1.5mm; padding-left: 2mm; font-size: 10.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--q-dark); border-left: 1.2mm solid var(--q-accent); }
.quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; padding-bottom: 3mm; margin-bottom: 2mm; border-bottom: 0.8mm solid var(--q-accent); }
.quote-logo { display: block; max-height: 13mm; max-width: 80mm; margin-bottom: 1.5mm; }
.quote-services { font-size: 9pt; color: var(--q-dark); opacity: 0.8; }
.quote-title { font-size: 22pt; font-weight: 800; letter-spacing: 0.02em; color: var(--q-dark); white-space: nowrap; }
.quote-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
.quote-sum td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-sum .is-sub td { font-weight: 650; border-top: 0.3mm solid var(--q-dark); }
.quote-sum .is-discount td { font-weight: 650; color: var(--q-dark); background: color-mix(in srgb, var(--q-accent) 14%, #fff); }
.quote-sum .is-total td { padding: 2.2mm 2mm; font-size: 13pt; font-weight: 800; color: #fff; background: var(--q-dark); border-bottom: 0; }
.quote-sum .is-total td:last-child { color: var(--q-accent); }
.quote-note { margin: 2mm 0 0; font-size: 9pt; }
.quote-text { margin: 0; white-space: pre-line; }
.quote-doc ul { margin: 0 0 3mm; padding-left: 5mm; font-size: 9.5pt; }
.quote-doc li::marker { color: var(--q-accent); }
.quote-closing { margin: 4mm 0 0; font-weight: 650; color: var(--q-dark); }
.quote-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin: 8mm 0 2mm; break-inside: avoid; }
.quote-sign { text-align: center; }
.quote-sign img, .quote-sign-blank { display: block; width: 100%; height: 22mm; object-fit: contain; }
.quote-sign-line { border-top: 0.3mm solid var(--q-dark); padding-top: 1.5mm; font-weight: 650; min-height: 5mm; }
.quote-sign-role { font-size: 9pt; opacity: 0.8; }
.quote-sign img[style] { width: auto; max-width: 100%; margin: 0 auto; }
.own-sign-preview { display: block; max-width: 100%; margin: 4px 0 10px; padding: 4px; background: #fff; border: 1px dashed var(--line-strong); border-radius: 6px; object-fit: contain; }
.own-sign-size { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.own-sign-size input { flex: 1; max-width: 260px; }
.sig-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
.sig-pad { width: 100%; max-width: 560px; aspect-ratio: 3 / 1; height: auto; background: #fff; border: 1px dashed var(--line-strong); border-radius: 6px; touch-action: none; cursor: crosshair; }
.tig-rows { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.tig-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 6px; align-items: center; }
.tig-row input[type="text"]:first-child { padding: 5px 8px; font: inherit; border: 1px solid var(--line-strong); border-radius: 4px; min-width: 0; }
.tig-row .adm-num-input { width: 100%; }
.tig-total { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.smart-title { margin: 16px 0 8px; font-size: 15px; }
.quote-footer { margin: 4mm 0 0; padding-top: 2mm; border-top: 0.4mm solid var(--q-accent); font-size: 8.5pt; opacity: 0.85; }
.adm-sheet-editor { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; max-width: 1280px; }
.adm-sheet-preview { position: sticky; top: 0; }
.adm-sheet-preview .adm-table-head { padding: 0 0 8px; }
.adm-paper { padding: 12mm; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 22px rgb(22 36 47 / 0.1); }
.adm-paper.is-small { width: 210mm; zoom: 0.52; }
.adm-quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 14px; align-items: start; max-width: 1560px; }
.adm-quote-main { min-width: 0; }
.adm-quote-preview { position: sticky; top: 0; max-height: calc(100vh - 110px); overflow-y: auto; }
.adm-quote-preview h2 { margin-bottom: 8px; }
.adm-extra-name { width: 100%; min-width: 150px; padding: 4px 6px; font: inherit; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); color: inherit; }
.adm-extra-unit { width: 56px; padding: 4px 6px; font: inherit; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); color: inherit; }
.adm-table td select { padding: 4px 6px; font: inherit; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); color: inherit; }
.adm-discount { padding: 12px 14px; border-top: 1px solid var(--line); }
.adm-discount-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr 1.4fr; gap: 8px; }
.adm-plan-tools { display: flex; flex-direction: column; gap: 6px; }
.adm-plan-tools .status-row { margin: 0; }
.adm-plan-tools .btn + .btn.wide { margin-top: 0; }
@media (max-width: 1100px) { .adm-quote-layout { grid-template-columns: 1fr; } .adm-quote-preview { position: static; max-height: none; } }
.adm-color { width: 100%; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); cursor: pointer; }

/* Nyomtatás */
/* Helyszíni mód: telefonon is, nagy érintési felületekkel */
.adm-row-actions { white-space: nowrap; }
.adm-row-actions .btn { margin-left: 4px; text-decoration: none; }
.site-body .site-top { flex-wrap: wrap; gap: 6px 14px; }
.site-body .adm-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-main { flex: 1; min-height: 0; overflow: auto; padding: 12px 12px 40px; }
.site-inner { max-width: 900px; margin: 0 auto; }
.site-phases { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scroll-snap-type: x proximity; }
.site-phase {
  flex: 1 0 118px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; scroll-snap-align: start;
  font: inherit; color: inherit; text-align: left; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
}
.site-phase span { font-size: 12px; color: var(--ink-soft); }
.site-phase.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.site-bar { display: block; width: 100%; height: 5px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.site-bar span { display: block; height: 100%; background: var(--ok); }
.site-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.site-open { margin-left: auto; }
.site-room { padding: 10px 12px; margin-bottom: 10px; }
.site-room-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.site-room-head h2 { margin: 0; font-size: 15px; }
.site-item { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.site-check { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 2px; font: inherit; color: inherit; text-align: left; background: none; border: 0; cursor: pointer; }
.site-box { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--line-strong); border-radius: 6px; font-weight: 800; color: #fff; }
.site-item.is-done .site-box { background: var(--ok); border-color: var(--ok); }
.site-item.is-done .site-text strong { color: var(--ink-soft); }
.site-icon { flex: none; display: inline-flex; }
.site-text { display: flex; flex-direction: column; min-width: 0; }
.site-at { color: var(--ok); }
.site-note { color: #8a4b00; }
.site-note-btn { flex: none; }
.site-note-btn.has-note { border-color: var(--signal); color: #8a4b00; }
.site-actions { margin-top: 14px; }
.site-actions .btn { margin-bottom: 8px; }
.site-plan-card { padding: 10px; }
.site-plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.site-plan { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 6px; background: #fff; -webkit-overflow-scrolling: touch; }
.site-plan svg { display: block; height: auto; }
.site-mark { cursor: pointer; }
.site-mark circle:first-child { fill: rgb(234 88 12 / 0.22); stroke: #ea580c; stroke-width: 3.5; }
.site-mark.is-done circle:first-child { fill: rgb(21 112 63 / 0.08); stroke: var(--ok); stroke-width: 1.5; stroke-opacity: 0.6; }
.site-mark.is-skipped circle:first-child { fill: rgb(100 116 139 / 0.25); stroke: #64748b; stroke-width: 1.5; stroke-dasharray: 3 2; }
.site-cross { fill: none; stroke: #475569; stroke-linecap: round; }
/* A húzást és a két ujjas nagyítást a program kezeli, ezért a böngésző saját görgetése ki van kapcsolva a rajzon. */
.site-plan { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.site-plan.is-panning { cursor: grabbing; }
.site-plan.is-panning .site-mark, .site-plan.is-panning [data-kind="element"] { cursor: grabbing; }
.site-status { padding: 8px 12px; margin-bottom: 10px; border-radius: 6px; font-weight: 650; }
.site-status.is-open { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.site-status.is-done { background: var(--ok-soft); color: var(--ok); }
.site-item.is-open .site-box { border-color: #ea580c; border-width: 3px; }
.site-room.has-open { border-left: 4px solid #ea580c; }
.site-item.is-skipped { opacity: 0.75; }
.site-item.is-skipped .site-box { background: #94a3b8; border-color: #94a3b8; }
.site-item.is-skipped .site-text strong { text-decoration: line-through; color: var(--ink-soft); }
.site-skip { color: #475569; font-style: italic; }
.site-skip-check { font-weight: 650; margin-bottom: 8px; }
.site-icon-size { padding: 4px 6px; font: inherit; font-size: 13px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); }
.site-pick .site-item:first-child { border-top: 0; }
.site-badge { fill: var(--ok); }
.site-tick { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-note-dot { fill: var(--danger); }
.site-plan [data-kind="element"] { cursor: pointer; }
@media (max-width: 600px) {
  .site-body .top-actions .save-status { display: none; }
  .site-main { padding: 8px 8px 32px; }
  .site-open { margin-left: 0; width: 100%; }
}

.print-root { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { display: block; height: auto; background: #fff; }
  body > *:not(.print-root) { display: none !important; }
  .print-root { display: block; font-size: 10.5pt; color: #000; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-root h1 { font-size: 18pt; margin: 0 0 2mm; }
  .print-root h2 { font-size: 13pt; margin: 6mm 0 2mm; }
  .print-root h3 { font-size: 11pt; margin: 4mm 0 1mm; }
  .print-root section { break-inside: auto; }
  .print-floor { break-before: page; }
  .print-plan { display: block; width: 100%; height: auto; max-height: 215mm; border: 0.3mm solid #b8c2c9; break-inside: avoid; }
  .print-root table { width: 100%; border-collapse: collapse; margin-bottom: 3mm; }
  .print-root th, .print-root td { border-bottom: 0.2mm solid #b8c2c9; padding: 1mm 1.5mm; text-align: left; vertical-align: top; }
  .print-root th { font-size: 9pt; color: #52626e; }
  .print-root tr { break-inside: avoid; }
  .print-root .quote-doc h2 { font-size: 10.5pt; margin: 5mm 0 1.5mm; }
  .print-root .quote-doc th { color: var(--q-dark); }
  @page tervlap { size: A4 landscape; margin: 6mm; }
  .print-sheet { page: tervlap; break-before: page; }
  .print-sheet .panel-diagram { display: block; width: 100%; height: auto; max-height: 195mm; }
  .print-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1mm 4mm; margin-bottom: 3mm; font-size: 9.5pt; }
  .print-legend span { display: flex; align-items: center; gap: 1.5mm; }
  .print-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
  .print-photos figure { margin: 0; break-inside: avoid; }
  .print-photos img { display: block; width: 100%; max-height: 90mm; object-fit: contain; }
  .print-photos figcaption { font-size: 9pt; margin-top: 1mm; }
}

/* Ablakok */
.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgb(22 36 47 / 0.45); }
.modal { width: min(440px, 100%); padding: 20px; background: var(--paper); border-radius: 10px; box-shadow: 0 16px 48px rgb(22 36 47 / 0.3); }
.modal h2 { font-size: 17px; margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; max-width: min(520px, calc(100% - 32px));
  transform: translate(-50%, 12px); padding: 9px 14px; border-radius: 6px; background: var(--ink); color: #fff;
  opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); }

@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

@media (max-width: 1100px) {
  .save-status { display: none; }
  .step-name { display: none; }
  .step.is-current .step-name { display: inline; }
}
@media (max-width: 820px) {
  html, body { height: auto; }
  body { min-height: 100%; }
  .small-screen-note { display: block; }
  .top { flex-wrap: wrap; gap: 8px; }
  .stepper { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
  .top-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  /* Admin: a nézetek és a főmenü saját, vízszintesen görgethető sort kapnak. */
  .adm-views { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: thin; }
  .adm-views .tab { white-space: nowrap; }
  .adm-title { order: 2; flex-basis: 100%; }
  .stage-bar { flex-wrap: wrap; }
  .adm-modes { overflow-x: auto; max-width: 100%; }
  .adm-columns { grid-template-columns: minmax(0, 1fr); }
  .adm-hide-narrow { display: none; }
  .adm-sheet-editor { grid-template-columns: minmax(0, 1fr); }
  .adm-sheet-preview { position: static; overflow-x: auto; }
  .adm-paper { padding: 6mm; }
  .main { overflow: visible; }
  .workspace { flex-direction: column; height: auto; }
  .panel { width: 100%; border-right: 0; border-top: 1px solid var(--line); order: 2; }
  .stage { order: 1; flex: none; height: 62vh; }
  .inspector { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-height: 60vh; z-index: 20; }
  .hint, .key-hint { display: none; }
  .mode-cards, .mode-cards.is-three, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 24px; }
}

/* SharePoint: belépés, mappaválasztó */
.cloud-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cloud-warn { color: #8a4b00; }
.cloud-error { color: var(--danger); }
.btn.ghost.is-warn { border-color: var(--signal); color: #8a4b00; }
.cloud-browser { display: grid; gap: 10px; }
.cloud-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.cloud-crumb { border: 0; background: none; padding: 2px 4px; color: var(--accent); cursor: pointer; font: inherit; border-radius: 4px; }
.cloud-crumb:hover { background: var(--accent-soft); }
.cloud-sep { color: var(--ink-soft); }
.cloud-list { display: grid; gap: 4px; max-height: 50vh; min-height: 120px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); align-content: start; }
.cloud-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 6px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.cloud-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.cloud-item::before { content: ""; flex: none; width: 16px; height: 12px; border-radius: 2px; background: #e8b84a; }
.cloud-item.is-file::before { width: 12px; height: 15px; background: var(--line-strong); }
.cloud-new { display: flex; gap: 8px; }
.cloud-new input { flex: 1; min-width: 0; }
#folderBtn { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-file { display: flex; align-items: center; gap: 4px; } .cloud-file input { flex: 1; min-width: 0; }
.panel-section.is-soon .btn:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(1); }
.cloud-gate { max-width: 420px; margin: 8vh auto 0; text-align: center; } .cloud-gate .card { display: grid; justify-items: center; gap: 10px; padding: 28px 20px; } .cloud-gate h1 { margin: 0; }
.link-gate { max-width: 420px; margin: 8vh auto 0; text-align: center; } .link-gate .card { display: grid; justify-items: center; gap: 10px; padding: 28px 20px; } .link-gate h1 { margin: 0; } .link-form { display: grid; gap: 10px; width: 100%; text-align: left; } .link-error { color: var(--danger); min-height: 1em; margin: 0; }
