/* Színek: világos (alap) és sötét megjelenés (Fájl › Megjelenés; a <html data-theme="dark"> kapcsolja – theme.js).
   A műszaki rajzlap és a szabásterv táblarajza mindkét módban papírszerűen fehér. */
:root {
  color-scheme: light;
  /* világos alap: papiruszos, meleg törtfehér (a felhasználó kérése – ne vakító fehér); a rajzlap marad fehér papír */
  --bg: #ece8de;
  --panel: #f8f5ee;
  --pop: #faf8f2;          /* lenyíló menü, felugró ablak */
  --field: #fcfaf5;        /* beviteli mező, gomb, kártya */
  --subtle: #f3efe6;       /* táblázatfej, összesítő, halvány háttér */
  --subtle-2: #f6f3ec;
  --hover: #eef0e4;
  --hover-2: #ece8df;
  --btn-hover: #f5f2ea;
  --ink: #26261f;
  --ink-2: #4f4d44;
  --muted: #8f897c;
  --line: #e0dacd;
  --line-2: #c8c0b0;
  --line-soft: #ece7dd;
  --accent: #578452;     /* MR. Vision logózöld */
  --accent-hi: #4a7346;
  --accent-bg: #e9f0e1;
  --accent-line: #b9d3b3;
  --accent-line-soft: #cfe0ca;
  --accent-ink: #2f5a2b;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-line: #fecaca;
  --warn-bg: #fff7ed;
  --warn-ink: #9a3412;
  --warn-line: #fed7aa;
  --mod-bg: #fffbeb;
  --blue-ink: #1d4ed8;
  --blue-bg: #eff5ff;
  --blk-ink: #7b3fa0;      /* összefüggő erezetű frontblokk (Szabásterv) */
  --overlay: rgba(17, 24, 39, .45);
  --glass: rgba(250, 248, 242, .92);   /* feliratok a 3D nézet fölött */
  --halo: #faf8f2;
  --tip-bg: #1f2937;
  --tip-hi: #111827;
  --tip-ink: #fff;
  /* Modellező › sarokfogás jelei (a CAD-programok szokása szerint: csomópont zöld, élfelező ciánkék, él piros) */
  --snap-node: #16a34a;
  --snap-mid: #0891b2;
  --snap-edge: #dc2626;
  --desk: #d6d1c5;         /* a rajzlapok mögött */
  --disabled: #efebe3;
  --toggle-off: #cfc9bc;
  --canvas: #faf8f2;       /* alaprajz-szerkesztő */
  --grid: #ebe6dc;
  --grid-b: #ddd7ca;
  --scene-bg: #e7e3d9;     /* a 3D nézet háttere, a stúdió és a padló (viewer.js sceneTheme) */
  --scene-studio: #edeae2;
  --scene-floor: #dfdacf;
  --guide: #db2777;        /* segédvonal: egy vonalban egy sarokkal */
  --ul-ink: #3b4b66;       /* háttérrajz (betöltött alaprajz) vonalai */
  --ul-tool: #ea580c;      /* háttérrajz-eszköz (méretarány, áthelyezés, forgatás) */
  --hatch-a: #ebe7de;
  --hatch-b: #d8d2c5;
  --wt-fill: #e7e4de;
  --th-body: #ece9e1;      /* szekrény-bélyegképek */
  --th-body-ln: #6b7280;
  --th-in: #d6dadf;
  --th-in-ln: #8b939d;
  --th-fr: #ffffff;
  --th-ln: #374151;
  --th-sw: #9ca3af;
  --th-ml: #9aa1aa;
  --th-led: #f2a900;       /* LED-szalag és a fénye */
  --th-led-glow: rgba(255, 196, 64, .32);
  --th-gola: #6b7280;      /* Gola-profil a fugában */
  --radius: 8px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15171a;
  --panel: #1e2125;
  --pop: #23272c;
  --field: #272b30;
  --subtle: #262a2f;
  --subtle-2: #22262a;
  --hover: #283028;
  --hover-2: #2c3136;
  --btn-hover: #2e3338;
  --ink: #e6e8eb;
  --ink-2: #b7bdc6;
  --muted: #8d96a2;
  --line: #343a41;
  --line-2: #4b525b;
  --line-soft: #2b3035;
  --accent: #6b9c65;
  --accent-hi: #7cae76;
  --accent-bg: #253323;
  --accent-line: #43603e;
  --accent-line-soft: #36492f;
  --accent-ink: #a3d39b;
  --danger: #f87171;
  --danger-bg: #3a1f22;
  --danger-line: #7f2d33;
  --warn-bg: #36281a;
  --warn-ink: #fdba74;
  --warn-line: #7a4a1f;
  --mod-bg: #35301a;
  --blue-ink: #8db4ff;
  --blue-bg: #1e2a44;
  --blk-ink: #c49be0;
  --overlay: rgba(0, 0, 0, .6);
  --glass: rgba(30, 33, 37, .92);
  --halo: #15171a;
  --tip-bg: #e6e8eb;
  --tip-hi: #ffffff;
  --tip-ink: #111827;
  --desk: #0f1113;
  --disabled: #2a2e33;
  --toggle-off: #4b525b;
  --canvas: #1b1e22;
  --grid: #24282d;
  --grid-b: #2e3339;
  --scene-bg: #25292e;
  --scene-studio: #2a2e33;
  --scene-floor: #3a3f45;
  --guide: #f472b6;
  --ul-ink: #a9bad3;
  --ul-tool: #fb923c;
  --hatch-a: #2b2f34;
  --hatch-b: #3a3f45;
  --wt-fill: #4a463f;
  --th-body: #383d44;
  --th-body-ln: #9aa3ad;
  --th-in: #2e3238;
  --th-in-ln: #7e8792;
  --th-fr: #4b5159;
  --th-ln: #d1d5db;
  --th-sw: #6b7280;
  --th-ml: #8b939d;
  --th-led: #ffc233;
  --th-led-glow: rgba(255, 200, 80, .22);
  --th-gola: #9ca3af;
}
/* Színtémák – árnyalatok (Fájl › Téma; theme.js, <html data-tone>): a világos / sötét alapra a felület, a kiemelés és a
   3D nézet háttere (--scene-*: viewer.js applyTheme). A felhasználó kérése: több árnyalat, a saját ízlése szerint. */
:root[data-tone="light-blue"] {
  --bg: #edf1f6; --panel: #f7f9fc; --pop: #f9fbfd; --field: #fcfdfe; --subtle: #f2f5f9; --subtle-2: #f5f8fb;
  --glass: rgba(247, 249, 252, .92); --halo: #f7f9fc; --desk: #d6dce3; --disabled: #eef2f6; --toggle-off: #c9d2dc;
  --hatch-a: #e9eef3; --hatch-b: #d3dbe4; --th-body: #e9eef3;
  --hover: #f0f5fb; --hover-2: #eef2f7; --btn-hover: #f6f9fc;
  --ink: #1d2838; --ink-2: #485569; --muted: #8692a5; --line: #dde3ea; --line-2: #c3ccd7; --line-soft: #edf1f5;
  --accent: #2f6fb0; --accent-hi: #285f98; --accent-bg: #e8f1fb; --accent-line: #b3cdea; --accent-line-soft: #cddff2; --accent-ink: #1d4f80;
  --canvas: #fafcfe; --grid: #ecf1f6; --grid-b: #dfe6ee;
  --scene-bg: #e5eaf0; --scene-studio: #ecf0f5; --scene-floor: #dbe2ea;
}
:root[data-tone="light-slate"] {
  --bg: #e8ebed; --panel: #f6f7f8; --pop: #f9fafa; --field: #fbfbfc; --subtle: #f0f2f3; --subtle-2: #f4f5f6;
  --glass: rgba(246, 247, 248, .92); --halo: #f6f7f8; --desk: #d4d9dc; --disabled: #edf0f1; --toggle-off: #c7ced3;
  --hatch-a: #e7eaec; --hatch-b: #d1d6da; --th-body: #e8ebed;
  --hover: #eef3f3; --hover-2: #e9edef; --btn-hover: #f4f6f7;
  --ink: #232a30; --ink-2: #4d575f; --muted: #8b949b; --line: #dadfe3; --line-2: #c0c7cd; --line-soft: #ebeef0;
  --accent: #23827f; --accent-hi: #1d6f6c; --accent-bg: #e3f2f1; --accent-line: #a7d4d2; --accent-line-soft: #c5e3e1; --accent-ink: #175b59;
  --canvas: #f9fafb; --grid: #e9edef; --grid-b: #dce1e4;
  --scene-bg: #e1e5e8; --scene-studio: #e8ebed; --scene-floor: #d6dbdf;
}
:root[data-tone="light-sand"] {
  --bg: #ece2cf; --panel: #f7f0e2; --pop: #f9f3e7; --field: #fbf7ee; --subtle: #f2e9d8; --subtle-2: #f5eee0;
  --hover: #f3e8d6; --hover-2: #eee4d2; --btn-hover: #f6efe2;
  --glass: rgba(247, 240, 226, .92); --halo: #f7f0e2; --desk: #d8ccb6; --disabled: #ede5d6; --toggle-off: #d2c6b0;
  --hatch-a: #ebe2d1; --hatch-b: #d9ccb4; --th-body: #ece4d4;
  --ink: #2b2620; --ink-2: #5a5249; --muted: #948a7d; --line: #e6dfd3; --line-2: #cdc3b3; --line-soft: #f0ebe2;
  --accent: #b06a2c; --accent-hi: #96591f; --accent-bg: #f8ece0; --accent-line: #e6c4a3; --accent-line-soft: #efd7c0; --accent-ink: #7a4314;
  --canvas: #fdfbf7; --grid: #f0ebe2; --grid-b: #e5ddd0;
  --scene-bg: #ebe6dd; --scene-studio: #f0ebe3; --scene-floor: #e0d9cd;
}
:root[data-tone="light-lilac"] {
  --bg: #efecf4; --panel: #f9f8fc; --pop: #fbfafd; --field: #fdfcfe; --subtle: #f4f2f8; --subtle-2: #f7f5fa;
  --glass: rgba(249, 248, 252, .92); --halo: #f9f8fc; --desk: #d9d5e1; --disabled: #f0eef5; --toggle-off: #cdc6da;
  --hatch-a: #ebe8f1; --hatch-b: #d6d0e2; --th-body: #ebe8f1;
  --hover: #f4f0fa; --hover-2: #efecf5; --btn-hover: #f9f7fc;
  --ink: #26222f; --ink-2: #534c61; --muted: #908aa0; --line: #e3dfec; --line-2: #ccc5da; --line-soft: #efecf4;
  --accent: #7656b0; --accent-hi: #654899; --accent-bg: #f1ecf9; --accent-line: #cfc0ea; --accent-line-soft: #e0d6f2; --accent-ink: #4f3585;
  --canvas: #fcfbfe; --grid: #eeebf4; --grid-b: #e2dded;
  --scene-bg: #e8e5ef; --scene-studio: #eeebf3; --scene-floor: #dedae7;
}
:root[data-tone="dark-navy"] {
  --bg: #111725; --panel: #182033; --pop: #1c2539; --field: #212b40; --subtle: #1f283c; --subtle-2: #1b2336;
  --hover: #1f2b45; --hover-2: #26304a; --btn-hover: #283350;
  --ink: #e3e8f2; --ink-2: #b3bccd; --muted: #8792a8; --line: #2c3750; --line-2: #435070; --line-soft: #232d44;
  --accent: #5b9be6; --accent-hi: #74abeb; --accent-bg: #1b2c4a; --accent-line: #2f4b78; --accent-line-soft: #283e62; --accent-ink: #a9cdf7;
  --glass: rgba(24, 32, 51, .92); --halo: #111725; --desk: #0b0f19; --disabled: #222a3d;
  --canvas: #151c2d; --grid: #1e2740; --grid-b: #28324d;
  --scene-bg: #1d2537; --scene-studio: #222b3e; --scene-floor: #323c52;
}
:root[data-tone="dark-graphite"] {
  --bg: #18181a; --panel: #202023; --pop: #26262a; --field: #2a2a2e; --subtle: #27272b; --subtle-2: #232326;
  --hover: #2e2b27; --hover-2: #2f2f33; --btn-hover: #333337;
  --ink: #e8e8ea; --ink-2: #bcbcc2; --muted: #919198; --line: #38383d; --line-2: #505057; --line-soft: #2d2d31;
  --accent: #e08a3c; --accent-hi: #ea9a50; --accent-bg: #3a2a1c; --accent-line: #6e4a2a; --accent-line-soft: #523a24; --accent-ink: #f5c08c;
  --glass: rgba(32, 32, 35, .92); --halo: #18181a; --desk: #0e0e10; --disabled: #2a2a2e;
  --canvas: #1c1c1f; --grid: #27272b; --grid-b: #313136;
  --scene-bg: #26262a; --scene-studio: #2b2b2f; --scene-floor: #3b3b40;
}
:root[data-tone="dark-walnut"] {
  --bg: #1b1612; --panel: #241e19; --pop: #2a231d; --field: #2e2620; --subtle: #2c251f; --subtle-2: #27201b;
  --hover: #322a22; --hover-2: #352c24; --btn-hover: #3a3027;
  --ink: #ece4da; --ink-2: #c7b9a8; --muted: #9c8d7b; --line: #3d3329; --line-2: #5a4c3e; --line-soft: #312920;
  --accent: #c8954f; --accent-hi: #d6a565; --accent-bg: #3a2d1d; --accent-line: #6b5233; --accent-line-soft: #4f3d27; --accent-ink: #ecc994;
  --glass: rgba(36, 30, 25, .92); --halo: #1b1612; --desk: #110d0a; --disabled: #2e2620;
  --canvas: #201a15; --grid: #2b241e; --grid-b: #362d25;
  --scene-bg: #2a231d; --scene-studio: #2f2721; --scene-floor: #403529;
}
:root[data-tone="dark-black"] {
  --bg: #000000; --panel: #0d0d0d; --pop: #141414; --field: #161616; --subtle: #121212; --subtle-2: #0f0f0f;
  --hover: #1a1f1a; --hover-2: #1c1c1c; --btn-hover: #1f1f1f;
  --ink: #f2f2f2; --ink-2: #c4c4c4; --muted: #8e8e8e; --line: #2a2a2a; --line-2: #444444; --line-soft: #1c1c1c;
  --accent: #7dbb75; --accent-hi: #8fcc87; --accent-bg: #172515; --accent-line: #35552f; --accent-line-soft: #283f24; --accent-ink: #b4e3ad;
  --glass: rgba(13, 13, 13, .92); --halo: #000000; --desk: #000000; --disabled: #161616;
  --canvas: #080808; --grid: #161616; --grid-b: #202020;
  --scene-bg: #121212; --scene-studio: #161616; --scene-floor: #262626;
}
/* a Fájl › Téma színmintája (háttér, panel, kiemelés) */
.th-sw, .dd-menu .dd-flym button > span.th-sw { display: inline-flex; flex-direction: row; flex: 0 0 34px; width: 34px; height: 18px; border-radius: 5px; overflow: hidden; border: 1px solid var(--line-2); }
.th-sw i { flex: 1; }
.th-sw i:last-child { flex: .8; }
/* sötétben a fehér papír (rajzlap, szabásterv-tábla) ne vakítson; a táblakártyán a felirat a papír színeivel */
:root[data-theme="dark"] .dw-sheet svg.tsheet { filter: brightness(.94); }
:root[data-theme="dark"] .w-sheet:not(.cnc-sheet) { --ink: #1f2937; --ink-2: #4b5563; --muted: #6b7280; --line: #e2e5e9; color: var(--ink); filter: brightness(.94); }
:root[data-theme="dark"] .cnc-sheet { background: var(--panel); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: grid;
  /* az oszlop nem szélesedhet a tartalommal (különben a jobb oldali panel kilóg az ablakból) */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) 28px;
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
/* a számmezők fel/le léptetőnyilai rejtve (a billentyűzet ↑/↓ továbbra is léptet) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
/* számolás a számmezőkben (calc.js): a mező alatt az eredmény, pl. „= 900” */
.calc-tip {
  position: fixed; z-index: 4000; pointer-events: none;
  padding: 2px 8px; border-radius: 6px;
  background: var(--tip-bg); color: var(--tip-ink);
  font: 600 12px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18); white-space: nowrap;
}
.calc-tip.dim { opacity: .6; }
.calc-tip[hidden] { display: none; }

/* ---------- felső sáv */
/* két sor: fent a program (munkaterületek, projekt, visszavonás, felhasználó), alatta a munkaterület eszközei */
/* (a felső sáv – és a lenyíló menüi – a munkaterületek eszközsorai fölött: pl. a Korpusztervező „Új korpusz” gombja,
   z-index 20, ne lógjon bele a Fájl menübe; a felugró ablakok – 40-től – fölötte maradnak) */
.topbar { display: flex; flex-direction: column; background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 25; }
.tb-row { display: flex; align-items: center; gap: 10px; padding: 0 12px; flex-wrap: wrap; row-gap: 6px; }
.tb-app { min-height: 50px; padding-top: 7px; padding-bottom: 7px; }
.tb-tools { min-height: 42px; padding-top: 5px; padding-bottom: 5px; border-top: 1px solid var(--line-soft); background: var(--subtle-2); }
body[data-mode="workshop"] .tb-tools { display: none; }   /* a Műhelynek saját menüje van */
.tb-disp { border-left: 0; padding-left: 0; }   /* a sor eleje: nincs előtte elválasztó */
.tb-view { margin-right: 6px; }                 /* a nézőpont-gombok (jobbra), a Kimenet előtt */
/* lenyíló menü (Fájl, Kimenet) */
.dd { position: relative; border-top: 0; }
.dd > summary { list-style: none; padding: 5px 10px; font-weight: 400; display: block; }
.dd > summary::before { content: none; }
.dd[open] > summary { background: var(--accent-bg); border-color: var(--accent); }
.dd-menu {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 220px; background: var(--pop); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px; z-index: 30; display: flex; flex-direction: column;
}
.dd.right .dd-menu { left: auto; right: 0; }
/* menüsor: ikon – felirat (balra, közvetlenül az ikon mellett) – jobbra a billentyű / a mostani érték / a pipa */
.dd-menu button {
  display: flex; align-items: center; justify-content: flex-start; gap: 11px; border: 0; background: none;
  padding: 7px 12px 7px 10px; border-radius: 6px; cursor: pointer; text-align: left; white-space: nowrap; color: var(--ink);
}
.dd-menu button > span:not(.dd-grp-r) { flex: 1 1 auto; min-width: 0; }
.dd-menu .nm-grid .cat-item > span { flex: none; }   /* (az Új korpusz csempéi oszlopban: a feliratuk ne nyúljon) */
.dd-menu button > kbd, .dd-menu button > .dd-grp-r, .dd-menu button > .dd-on { margin-left: auto; padding-left: 14px; }
.dd-menu button:hover { background: var(--accent-bg); }
.dd-menu button.on .dd-on { color: var(--accent); }
.dd-langs { display: grid; grid-template-columns: 1fr 1fr; }   /* Fájl › Nyelv: két oszlopban */
.dd-menu kbd { color: var(--muted); border: 0; background: none; padding: 0; }
.dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.dd-menu button > span { display: flex; flex-direction: column; line-height: 1.25; }
.dd-menu button small { color: var(--muted); font-size: 11px; white-space: normal; }
.dd-sec { padding: 8px 12px 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.dd-note { padding: 5px 10px 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dd-note kbd { font-size: 10.5px; border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; background: var(--subtle); }
/* Fájl menü a bal felső sarokban */
.file-dd > summary.file-btn { font-weight: 600; padding: 5px 12px; }
.file-menu { min-width: 280px; }
/* Fájl menü: oldalra nyíló almenü (a sor: név, jobbra a mostani érték és ▸; az almenü a sorra állva vagy kattintva) */
.dd-fly { position: relative; display: flex; flex-direction: column; }
.dd-menu button > span.dd-grp-r { flex-direction: row; align-items: center; gap: 8px; }
.dd-cur { color: var(--muted); font-size: 11.5px; }
.dd-arr { font-style: normal; color: var(--muted); font-size: 11px; }
.dd-flym {
  display: none; position: absolute; left: calc(100% + 5px); top: -5px; min-width: 210px; flex-direction: column; z-index: 31;
  background: var(--pop); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px;
}
.dd-flym::before { content: ''; position: absolute; left: -10px; top: 0; bottom: 0; width: 10px; }   /* az egér átjut a menüről */
/* a menü alján lévő almenük (Téma, Nyelv, Felület mérete) felfelé nyílnak, hogy ne lógjanak ki a képernyőből */
.dd-fly[data-up] > .dd-flym { top: auto; bottom: -5px; }
.dd-fly:hover > .dd-flym, .dd-fly.open > .dd-flym { display: flex; }
.dd-fly:hover > .dd-grp, .dd-fly.open > .dd-grp { background: var(--accent-bg); }
.dd-flym .dd-langs { min-width: 250px; }
.dd-langs button { justify-content: flex-start; gap: 6px; }   /* a pipa a nyelv neve mögött (ne a szomszéd oszlop előtt) */
.save-menu { min-width: 320px; }
.save-menu button { white-space: normal; }
/* ＋ Új korpusz: fent kereső, balra a csoportok, jobbra az elemek kártyán (kis elölnézeti kép, név, méret – mint a
   Helyiségtervező elemtárában) */
.new-menu { width: min(700px, calc(100vw - 40px)); height: min(560px, 72vh); padding: 0; overflow: hidden; }
.nm-head { padding: 8px; border-bottom: 1px solid var(--line); }
.nm-q { width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); color: var(--ink); font: inherit; }
.nm-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 180px 1fr; }
.nm-cats { display: flex; flex-direction: column; gap: 1px; padding: 6px; border-right: 1px solid var(--line); overflow-y: auto; }
.dd-menu .nm-cats button { gap: 8px; white-space: normal; padding: 7px 9px; color: var(--ink); }
.nm-cats button > span { flex: 1; }
.nm-cats small { color: var(--muted); font-size: 11px; }
.dd-menu .nm-cats button.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; padding: 10px; overflow-y: auto; align-content: start; }
.dd-menu .nm-grid .cat-item { flex-direction: column; justify-content: flex-start; align-items: center; gap: 2px; white-space: normal; padding: 8px 6px 7px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); color: var(--ink); }
.dd-menu .nm-grid .cat-item:hover { border-color: var(--accent); background: var(--accent-bg); }
/* a csoportlista két része (Új korpusz · Megnyitás); a meglévő korpusz kártyáján × – törlés; a most nyitott kiemelve */
.nm-sec { padding: 8px 9px 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.nm-sec:not(:first-child) { margin-top: 6px; border-top: 1px solid var(--line-soft); }
.dd-menu .nm-grid .cat-item { position: relative; }
.dd-menu .nm-grid .cat-item.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.nm-del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 14px; line-height: 1; color: var(--muted); background: var(--field); border: 1px solid var(--line); opacity: 0; }
.cat-item:hover .nm-del, .cat-item:focus-visible .nm-del { opacity: 1; }
.nm-del:hover { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }
.nm-foot { grid-column: 1 / -1; margin: 4px 2px 0; }
@media (max-width: 640px) { .nm-body { grid-template-columns: 1fr; } .nm-cats { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); } }
.d-new-dd > summary.new-btn { font-weight: 600; color: var(--accent); border-color: var(--accent); }
.d-new-dd[open] > summary.new-btn { background: var(--accent-bg); }
/* nézetmód menü (Megjelenés) */
.vs-dd > summary { display: flex; align-items: center; gap: 4px; }
.vs-cur { display: inline-flex; }
.vs-ico { width: 22px; height: 20px; flex: none; }
.vs-menu { min-width: 290px; max-height: 70vh; overflow-y: auto; }
.vs-menu button { justify-content: flex-start; gap: 10px; white-space: normal; }
.vs-menu button span { display: flex; flex-direction: column; line-height: 1.25; }
.vs-menu button small { color: var(--muted); font-size: 11px; }
.vs-menu button.on { background: var(--accent-bg); }
.vs-menu button.on b { color: var(--accent); }
/* a logó szerint: ikon, mellette sötét „MR. Vision”, alatta zöld, ritkított nagybetűs „DESIGNER” */
.brand { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 7px; white-space: nowrap; }
.logo { width: 32px; height: 32px; grid-row: span 2; }
.brand-name { font-weight: 700; color: var(--ink); font-size: 15px; line-height: 1.05; align-self: end; }
.brand-sub { color: var(--accent); font-weight: 700; font-size: 10px; line-height: 1.2; letter-spacing: .2em; text-transform: uppercase; align-self: start; }
/* a verziószám a „DESIGNER” mellett (asztali programban; böngészőben üres) */
.brand-ver { margin-left: 5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.brand-ver:empty { display: none; }
.proj-name {
  width: 180px; border: 1px solid transparent; border-radius: 6px; padding: 5px 8px; background: transparent; font-weight: 600;
}
.proj-name:hover, .proj-name:focus { border-color: var(--line); background: var(--field); outline: none; }
.tb-group { display: flex; gap: 4px; padding-left: 10px; border-left: 1px solid var(--line); }
.spacer, .grow { flex: 1; }

.btn {
  border: 1px solid var(--line); background: var(--field); border-radius: 6px; padding: 5px 10px; cursor: pointer; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--line-2); background: var(--btn-hover); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hi); }
.btn.on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.btn.icon { padding: 4px 9px; font-size: 15px; line-height: 1; }
.btn.sm { padding: 2px 8px; font-size: 12px; }
.btn.ghost { border-style: dashed; color: var(--ink-2); width: 100%; margin: 4px 0; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-bg); border-color: var(--danger-line); }
.btn.wide { width: 100%; margin-top: 10px; }

.seg { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: var(--field); padding: 5px 10px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: #fff; }

/* ---------- elrendezés */
.layout { display: grid; grid-template-columns: 270px minmax(0, 1fr) 340px; min-height: 0; }
.panel { background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.panel.left { border-right: 1px solid var(--line); }
.panel.right { border-left: 1px solid var(--line); }
.panel-h { padding: 12px 14px 6px; font-weight: 650; }
.scroll { overflow-y: auto; min-height: 0; flex: 1; }
.search { margin: 0 12px 8px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; }

.viewport { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.viewport canvas { display: block; touch-action: none; }
/* a feliratok saját rétegben: a CSS2DRenderer mélység szerint 1…n z-indexet ad nekik – rétegzárás nélkül sok szekrénynél
   a 40-es z-index fölé is kerülnének, és átütnének a szabásjegyzéken / párbeszédablakon, a nézetkockán */
.label-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
/* méretláncok felül- és elölnézetben (Helyiségtervező › Méretek) */
.vdims { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.vdims[hidden] { display: none; }
.vdims .vd-l { stroke: var(--ink-2); stroke-width: 1; fill: none; }
.vdims .vd-l.tot { stroke: var(--ink); }
.vdims .vd-e { stroke: var(--ink-2); stroke-width: .6; opacity: .5; fill: none; }
.vdims .vd-k { stroke: var(--ink); stroke-width: 1.4; fill: none; }
.vdims .vd-t { font: 600 11px system-ui, sans-serif; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.vdims .vd-t.tot { font-weight: 700; }
.vdims .vd-t.gap { fill: var(--muted); }
/* Helyiségtervező › Műszaki rajz: a 3D nézet helyén */
#pDrawing { z-index: 6; }
.dim-label {
  background: var(--accent); color: #fff; font: 600 11px system-ui, sans-serif; padding: 2px 7px; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
/* mérőszalag (Helyiségtervező): a mért távolság, alatta a részletek */
.measure-label {
  display: flex; flex-direction: column; align-items: center; background: #7048e8; color: #fff; font: 700 12px system-ui, sans-serif;
  padding: 3px 9px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.25); white-space: nowrap;
}
.measure-label small { font-weight: 500; font-size: 10.5px; opacity: .9; }
.measure-label.live { opacity: .85; }
/* a ferde mérés tengely menti összetevői (X / Y / Z): kisebb, keretes felirat a szaggatott vonalakon */
.measure-label.leg { background: var(--panel); color: #7048e8; border: 1.5px solid #7048e8; font-size: 11px; padding: 1px 7px; box-shadow: none; }
:root[data-theme="dark"] .measure-label.leg { color: #a48ff7; border-color: #a48ff7; }
.label-layer.measuring .cab-num { opacity: .25; }
.tape-ico { width: 17px; height: 15px; vertical-align: -3px; }

/* ---------- elemtár */
.cat-h { padding: 10px 14px 4px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
/* Elemtár: csukható kategóriák (becsukva a darabszám) és csukható sáv */
.cat-fold { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.cat-fold:hover { color: var(--accent); }
.cat-n { margin-left: auto; font-size: 10.5px; font-weight: 600; letter-spacing: 0; color: var(--muted); background: var(--subtle); border-radius: 8px; padding: 0 7px; }
.lib-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-right: 10px; }
.lib-tg { font-size: 14px; line-height: 1; color: var(--ink-2); }
#planner.lib-shut { grid-template-columns: 34px minmax(0, 1fr) 340px; }
@media (max-width: 1400px) { #planner.lib-shut { grid-template-columns: 34px minmax(0, 1fr) 310px; } }
@media (max-width: 1150px) { #planner.lib-shut { grid-template-columns: 34px minmax(0, 1fr) 280px; } }
#planner.lib-shut .panel.left > :not(.lib-h) { display: none; }
#planner.lib-shut .lib-h { flex-direction: column-reverse; justify-content: flex-end; padding: 8px 4px; gap: 12px; }
#planner.lib-shut .lib-h > span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; color: var(--muted); }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 12px 6px; }
.cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 6px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); cursor: pointer; text-align: center;
}
.cat-item:hover { border-color: var(--accent); background: var(--accent-bg); }
.cat-name { font-size: 12px; font-weight: 550; line-height: 1.2; }
.cat-dim { font-size: 10.5px; color: var(--muted); }

svg.thumb { width: 100%; height: 64px; }
svg.thumb.big { height: 130px; }
svg.thumb * { vector-effect: non-scaling-stroke; }
svg.thumb .body { fill: var(--th-body); stroke: var(--th-body-ln); }
svg.thumb .in, svg.thumb .wt { fill: var(--th-in); stroke: var(--th-in-ln); }
svg.thumb .fr { fill: var(--th-fr); stroke: var(--th-ln); }
svg.thumb .sw { stroke: var(--th-sw); stroke-dasharray: 3 3; }
svg.thumb .ml { fill: none; stroke: var(--th-ml); stroke-width: 2; }
svg.thumb .hd { stroke: var(--th-ln); stroke-width: 2; fill: var(--th-ln); }
svg.thumb .rod { stroke: var(--th-body-ln); stroke-width: 2; }
svg.thumb .led { fill: var(--th-led); stroke: none; }
svg.thumb .led-glow { fill: var(--th-led-glow); stroke: none; }
svg.thumb .gola { fill: var(--th-gola); stroke: none; }
/* Gola-profil színe a beállításnál */
.gola-sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line); }
svg.thumb .ov { fill: #2b2d30; }
svg.thumb .ovg { fill: #4b5058; }
svg.thumb .gl { fill: #dcebf0; stroke: #5b7a86; }
svg.thumb .pr { fill: #b9bdc2; stroke: #4b5563; }

/* ---------- tulajdonságok */
.ph { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.name-in { flex: 1; min-width: 0; font-weight: 650; font-size: 14px; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; }
/* rögzítés (lakat) a Helyiségtervező panelfejlécében: nyitott lakat – szabad, zárt (kiemelve) – rögzítve */
.lock-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; color: var(--muted); }
.lock-btn.on { color: var(--warn-ink); background: var(--warn-bg); border-color: var(--warn-line); }
.lock-ico { width: 15px; height: 15px; }
.lock-note { display: flex; align-items: center; gap: 6px; color: var(--warn-ink); }
.ph > b { flex: 1; }
.name-in:hover, .name-in:focus { border-color: var(--line); outline: none; }
.badge { font-size: 11px; color: var(--accent); background: var(--accent-bg); border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.preview { padding: 0 14px 6px; }

details { border-top: 1px solid var(--line); }
summary { padding: 9px 14px; font-weight: 600; cursor: pointer; user-select: none; list-style: none; display: flex; align-items: center; gap: 6px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }
.sec-b { padding: 0 14px 12px; }

.g2, .g3 { display: grid; gap: 8px; margin-bottom: 8px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
/* projekt alapméretek: típus neve + magasság + mélység egy sorban */
.pd-row { grid-template-columns: 1.1fr 1fr 1fr; align-items: end; margin-bottom: 2px; }
.pd-name { font-size: 12px; padding-bottom: 14px; }
.pd-wide { grid-column: span 2; }
.fld { display: flex; flex-direction: column; gap: 3px; min-width: 0; margin-bottom: 6px; }
.fld > span { font-size: 11px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.fld input, .fld select, .zone select, .zh, .inl input {
  width: 100%; min-width: 0; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--field);
}
.fld input:focus, .fld select:focus, .zone select:focus, .zh:focus, .inl input:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.chk { display: inline-flex; align-items: center; gap: 6px; margin: 4px 12px 4px 0; cursor: pointer; }
.chk input { accent-color: var(--accent); }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; border: 1px solid rgba(0,0,0,.2); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.muted { color: var(--muted); }
.small { font-size: 11px; margin: 2px 0 0; }
.pad { padding: 14px; }

.col-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; margin-top: 8px; background: var(--subtle-2); }
.col-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inl { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-2); }
.inl input { width: 70px; }
.zone { border: 1px solid var(--line); border-radius: 6px; background: var(--field); margin-top: 6px; }
.zone.merged { border-top: 2px dashed var(--accent); }
.zone-h { display: flex; align-items: center; gap: 4px; padding: 5px; }
.zone-h select { flex: 1; }
.zh { width: 64px !important; flex: none; }
.zone-b { padding: 0 8px 6px; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: end; }
.zone-b .fld { width: calc(50% - 4px); }
.ib { border: 1px solid var(--line); background: var(--field); border-radius: 5px; width: 24px; height: 26px; cursor: pointer; padding: 0; }
.ib:hover:not(:disabled) { background: var(--accent-bg); }
.ib:disabled { opacity: .3; cursor: default; }

table.mini { width: 100%; border-collapse: collapse; }
table.mini td { padding: 3px 0; border-bottom: 1px solid var(--line); }
.n { text-align: right; white-space: nowrap; }

.warn { margin: 10px 14px; padding: 8px 10px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 6px; border: 1px solid var(--warn-line); }
.warn div + div { margin-top: 4px; }
.ok { margin: 10px 14px; color: var(--accent); font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 14px 18px; }
.actions .btn { flex: 1 1 auto; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats div { background: var(--subtle); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; }
.stats b { font-size: 18px; }
.stats span { font-size: 11px; color: var(--muted); }
.tips { margin: 6px 14px 18px; padding: 10px 12px; background: var(--subtle); border-radius: 8px; color: var(--ink-2); }
.tips p { margin: 6px 0 0; }
kbd { font: 11px ui-monospace, monospace; background: var(--field); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; }

/* ---------- állapotsor, értesítés */
.statusbar {
  display: flex; align-items: center; gap: 16px; padding: 0 14px; font-size: 12px; color: var(--ink-2);
  background: var(--panel); border-top: 1px solid var(--line);
}
.st-bad { color: var(--danger); font-weight: 600; }
.st-ok { color: var(--accent); }
/* a ⚠ jelzés kattintható: a hibák egyenként (issue-bar) */
.st-link { background: none; border: 0; padding: 2px 6px; margin: 0 -6px; border-radius: 4px; font: inherit; font-weight: 600; cursor: pointer; }
.st-link:hover { background: var(--hover); text-decoration: underline; }
.issue-bar {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 6; max-width: calc(100% - 200px);
  display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; font-size: 13px;
  background: var(--pop); border: 1px solid var(--danger); border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.issue-bar .iss-n { color: var(--danger); white-space: nowrap; }
.issue-bar .iss-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-bar .btn.sm { flex: none; }
.toast {
  position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); background: var(--tip-bg); color: var(--tip-ink);
  padding: 8px 14px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 80;
}

/* ---------- ablak */
.modal { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 40; }
.modal[hidden], .toast[hidden] { display: none; }
.modal-box {
  width: min(1100px, 94vw); height: min(760px, 88vh); background: var(--pop); border-radius: 12px; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.modal-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 0 14px 14px; }
table.tbl { width: 100%; border-collapse: collapse; margin-top: 10px; }
.tbl th { position: sticky; top: 0; background: var(--subtle); text-align: left; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 5px 8px; border-bottom: 1px solid var(--line-soft); }
.tbl tr.grp td { background: var(--accent-bg); color: var(--accent); font-weight: 650; }
.tbl th.n { text-align: right; }
/* kötőelemek: kötéstípus-mátrix és látszó felületek (lenyitható) */
.conn-mx { margin: 6px 0 8px; }
.conn-mx > summary { cursor: pointer; font-size: 12px; color: var(--ink-2); padding: 3px 0; }
.conn-mx > summary:hover { color: var(--accent); }
.conn-row { margin: 4px 0 6px; }
.conn-row > span { font-size: 11px; color: var(--ink-2); }
.conn-row > div { display: grid; grid-template-columns: 3fr 2fr; gap: 4px; margin-top: 2px; }
.conn-row select { width: 100%; min-width: 0; font-size: 11.5px; padding: 3px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
.conn-vis { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.doc-dlg .tbl { margin-top: 4px; }
.doc-dlg h4 { margin: 12px 0 0; font-size: 13px; }
/* élzárás lapnév szerint (bandrules.js): felül az alapvastagságok, alatta minden lapnév élenként */
.br-defs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0 6px; padding: 8px 10px; background: var(--subtle); border: 1px solid var(--line); border-radius: 8px; }
.br-defs label { display: inline-flex; align-items: center; gap: 6px; }
.br-dlg select { font-size: 12px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); color: var(--ink-2); }
.br-tbl { width: auto; }
.br-tbl th, .br-tbl td { white-space: nowrap; padding: 3px 6px; }
.br-tbl select { width: 102px; }
.br-tbl select.on { color: var(--ink); font-weight: 600; border-color: var(--accent); }
.br-tbl tr.br-set .br-n { font-weight: 600; }
.br-tbl .br-st { text-align: center; }
.br-dlg .warn-ink { color: var(--warn-ink); font-weight: 600; }

.cat-item { position: relative; min-width: 0; }
.cat-name { overflow-wrap: anywhere; }
.cat-item.user { border-color: var(--accent-line-soft); }
.cat-tools { position: absolute; top: 4px; right: 4px; display: none; gap: 2px; }
.cat-item:hover .cat-tools { display: flex; }
.cat-tools .ib { width: 22px; height: 22px; font-size: 12px; }
/* Elemtár és Alaprajztervező elemsáv: csempék egymás alatt (mint a Modellező, a Tolóajtó és a Műhely bal sávja) –
   balra a kis rajz, mellette a név, alatta a méret / rövid leírás */
#catalog .cat-grid, .r-pal .cat-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
#catalog .cat-grid > .cat-item, .r-pal .cat-grid > .cat-item {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 1px;
  align-items: center; justify-items: start; min-height: 44px; padding: 4px 10px 4px 6px; text-align: left;
}
#catalog .cat-grid > .cat-item > svg.thumb, .r-pal .cat-grid > .cat-item > svg.thumb { grid-row: 1 / span 2; width: 40px; height: 38px; }
#catalog .cat-grid > .cat-item > .cat-name, .r-pal .cat-grid > .cat-item > .cat-name { grid-column: 2; align-self: end; font-size: 12.5px; font-weight: 600; }
#catalog .cat-grid > .cat-item > .cat-dim, .r-pal .cat-grid > .cat-item > .cat-dim { grid-column: 2; align-self: start; font-size: 11px; }
/* (csak név, alsor nélkül: középen) */
#catalog .cat-grid > .cat-item > .cat-name:last-child, .r-pal .cat-grid > .cat-item > .cat-name:last-child { grid-row: 1 / span 2; align-self: center; }
/* a saját sablon szerkesztő / törlő gombja a csempe jobb szélén, középen */
#catalog .cat-grid > .cat-item .cat-tools { top: 50%; transform: translateY(-50%); right: 6px; }
.actions.top { padding: 0 14px 10px; }

/* ---------- módváltás */
body[data-mode="planner"] #designer, body[data-mode="planner"] .only-designer,
body[data-mode="designer"] #planner, body[data-mode="designer"] .only-planner,
body:not([data-mode="modeler"]) #modeler, body:not([data-mode="modeler"]) .only-modeler,
body[data-mode="modeler"] #planner, body[data-mode="modeler"] #designer,
body[data-mode="modeler"] .only-planner, body[data-mode="modeler"] .only-designer { display: none !important; }
.only-designer[hidden], .only-modeler[hidden], .only-sliding[hidden] { display: none !important; }
/* Tolóajtó-tervező */
body:not([data-mode="sliding"]) #sliding, body:not([data-mode="sliding"]) .only-sliding,
body[data-mode="sliding"] #planner, body[data-mode="sliding"] #designer, body[data-mode="sliding"] #modeler,
body[data-mode="sliding"] .only-planner, body[data-mode="sliding"] .only-designer, body[data-mode="sliding"] .no-modeler { display: none !important; }
.layout.sliding { grid-template-columns: 270px minmax(0, 1fr) 340px; }
#sViewport { flex: 1; }
/* Tolóajtó: rendszercsempék egymás alatt – kis rajz, rövid név, jobbra a típusok száma (a többi a buborékban) */
.s-groups { display: flex; flex-direction: column; gap: 5px; padding: 10px 10px 4px; }
.s-gcard { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); cursor: pointer; line-height: 1.2; }
.s-gcard:hover { border-color: var(--accent); background: var(--accent-bg); }
.s-gcard.on { border-color: var(--accent); background: var(--accent-bg); box-shadow: inset 3px 0 0 var(--accent); }
.s-gcard.on b { color: var(--accent); }
.s-gcard b { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
.s-gcard .s-gn { flex: none; min-width: 20px; padding: 1px 6px; border-radius: 9px; background: var(--subtle); color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.s-gico { width: 40px; height: 33px; flex: none; }
.s-gico * { vector-effect: non-scaling-stroke; }
.s-gico .rl { fill: var(--th-ml); }
.s-gico .dr { fill: var(--th-fr); stroke: var(--th-ln); stroke-width: 1; }
.s-gico .pf { fill: var(--th-ml); stroke: var(--th-ln); stroke-width: .6; }
.s-gico .gl { fill: #d6eaf2; stroke: #5b7a86; stroke-width: 1; }
.s-gico .in { fill: var(--th-body); stroke: var(--th-in-ln); stroke-width: .8; }
.s-gico .ln { stroke: var(--th-ln); stroke-width: 1; }
.s-gico .ar { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.s-type select { font-weight: 600; }
.s-seg { display: flex; margin-top: 3px; }
.s-seg button { flex: 1; font-size: 12px; padding: 4px 6px; }
.s-fields { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.s-field { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; cursor: pointer; }
.s-field.on { border-color: var(--accent); background: var(--accent-bg); }
.s-field-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.s-tab { border-collapse: collapse; width: 100%; font-size: 12.5px; margin: 6px 0 2px; }
.s-tab th { text-align: left; background: var(--subtle); font-weight: 600; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.s-tab td { padding: 3px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.s-tab .r { text-align: right; white-space: nowrap; }
.s-notes { margin: 4px 0 0 18px; padding: 0; font-size: 12.5px; color: var(--ink-2); }
.s-notes li { margin: 2px 0; }
@media (max-width: 1300px) { .layout.sliding { grid-template-columns: 220px minmax(0, 1fr) 300px; } }

/* ---------- Egyedi modellező */
.layout.modeler { grid-template-columns: 250px minmax(0, 1fr) 330px; }
.m-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.m-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.m-bar select { padding: 3px 4px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; }
/* szűk sávban a Mérés gomb csak ikonnal (a felirat a buborékban) – a sáv szélessége szerint, nem az ablaké */
.m-bar { container-type: inline-size; }
@container (max-width: 960px) { .m-bar .lbl { display: none; } }
.m-3d { flex: 1; min-height: 0; }
/* Egyedi modellező: behúzható elemek, a lap méretei a 3D-ben */
/* (csempék egymás alatt: ikon + név, a leírás a buborékban – mint a Tolóajtó és a Műhely bal sávja) */
.m-els { display: flex; flex-direction: column; gap: 4px; padding: 4px 10px 6px; }
.m-el {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 5px 10px 5px 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); color: var(--ink);
  cursor: grab; user-select: none; text-align: left; font: inherit;
}
.m-el:hover { border-color: var(--accent); background: var(--accent-bg); }
.m-el:active { cursor: grabbing; }
.m-el b { min-width: 0; font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.m-el .m-ico { width: 22px; height: 22px; }
.m-el.m-tpl { cursor: pointer; }
.m-el.m-tpl > .ui-ico { width: 22px; height: 22px; margin: 0; stroke-width: 1.75; color: var(--muted); }
.pad-x { padding-left: 14px; padding-right: 14px; }
.m-planes { margin-top: 3px; }
.m-fit { margin-top: 8px; padding: 6px 8px; background: var(--accent-bg); border-radius: 6px; font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.m-split { margin: 6px 0 4px; }
.m-split-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px 6px; margin-top: 4px; }
.m-split-sizes label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.m-split-sizes input { width: 100%; min-width: 0; padding: 3px 5px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; text-align: right; }
/* Egyedi modellező jobb sávja: fejléc (név, gombok, szerep, tájolás, szabásméret), csukható csoportok ikonnal és
   becsukva rövid összefoglalóval (mint a Helyiségtervezőé), X / Y / Z mezők egy sorban – kis kijelzőn is áttekinthető */
.m-head { padding: 10px 14px 8px; border-bottom: 1px solid var(--line); background: var(--subtle-2); }
.m-hname { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.m-hname .m-ico, .m-hname .sec-ico { width: 18px; height: 18px; flex: none; }
.m-hname input { flex: 1; min-width: 0; font-weight: 600; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
.m-hname input:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.m-htitle b { font-size: 12.5px; letter-spacing: .3px; }
.m-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.m-acts .btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; font-size: 11.5px; }
.m-acts .sec-ico { width: 14px; height: 14px; }
.m-acts .btn.danger .sec-ico { stroke: currentColor; }
.m-head .fld-row { margin-bottom: 6px !important; }
.m-head .m-planes { margin: 0 0 6px; }
.m-head > .row { margin-top: 2px; }
.m-cutinfo { display: flex; align-items: flex-start; gap: 6px; font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.m-cutinfo .sec-ico { width: 14px; height: 14px; margin-top: 1px; }
.m-head .m-fit { margin-top: 6px; }
.m-hname .m-ib { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; }
.m-hname .m-ib .sec-ico { width: 15px; height: 15px; }
.m-hname .m-ib.danger .sec-ico { stroke: var(--danger); }
.m-hname .m-ib:hover { border-color: var(--accent); background: var(--accent-bg); }
/* ikonok a menüpontokon és a gombokon (uiicons.js): a felirat színével */
/* (az ikonok Tabler-ikonok – ticons.js, 24-es nézetdobozzal: a 2-es vonal 15–16 px-en kb. 1,3 px) */
.ui-ico { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; margin-right: 5px; }
.btn.icon .ui-ico { margin-right: 0; }
/* a menüsor ikonja: jól látható, közvetlenül a felirat előtt (a leírásos soroknál a felső sorhoz igazítva) */
.dd-menu button > .ui-ico { margin: 0; stroke: var(--accent); width: 20px; height: 20px; stroke-width: 1.75; }
.dd-menu button:has(> span > small) > .ui-ico { align-self: flex-start; margin-top: 1px; }
.seg button .ui-ico { margin-right: 4px; }
.mode-seg button .ui-ico { width: 16px; height: 16px; }
/* vezetés (guide.js): a javasolt következő lépés (lüktető keret + címke), a bemutató célpontja és buboréka */
.guide-next { position: relative; animation: guide-pulse 1.8s ease-in-out infinite; z-index: 1; }
.guide-next::after { content: attr(data-guide); position: absolute; top: -9px; right: -4px; z-index: 3; padding: 1px 7px; border-radius: 9px;
  background: var(--accent); color: #fff; font: 600 10px/16px system-ui, sans-serif; white-space: nowrap; pointer-events: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
@keyframes guide-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 15%, transparent); } }
.guide-tour { outline: 3px solid var(--accent) !important; outline-offset: 2px; border-radius: 6px; }
.guide-bub { position: fixed; z-index: 1001; width: 300px; padding: 12px 14px 10px; border: 1px solid var(--accent-line); border-radius: 10px;
  background: var(--pop); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 13px; line-height: 1.45; }
.guide-bub .gb-h { display: flex; align-items: baseline; gap: 8px; }
.guide-bub .gb-h b { flex: 1; font-size: 14px; color: var(--accent-ink, var(--accent)); }
.guide-bub .gb-h small { color: var(--muted); }
.guide-bub p { margin: 6px 0 10px; }
.guide-bub .gb-b { display: flex; justify-content: flex-end; gap: 6px; }
.guide-bub .gb-b .btn:first-child { margin-right: auto; }
/* Súgó a ? gomb mögött (help.js): a magyarázó szöveg elrejtve, a fejlécben kis ? gomb, kattintásra buborék */
.hlp-hid { display: none !important; }
.hlp { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; padding: 0; margin-left: 6px;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--field); color: var(--ink-2); font: 700 10.5px/1 system-ui, sans-serif; cursor: help; vertical-align: middle; }
.hlp:hover, .hlp:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); outline: none; }
summary .hlp { margin-left: 4px; }
.hlp.hlp-chip { width: auto; height: 20px; border-radius: 10px; padding: 0 8px 0 6px; gap: 4px; margin: 2px 0 4px; font-weight: 600; }
.hlp.hlp-chip span { font-weight: 500; font-size: 11px; }
.hlp.hlp-in { margin-left: 4px; }
.hlp-pop { position: fixed; z-index: 1000; max-width: 340px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--pop); color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: 12.5px; line-height: 1.45; }
.hlp-pop .hlp-p + .hlp-p { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line-soft); }
.hlp-pop .hlp-p p { margin: 4px 0 0; }
.hlp-pop ul { margin: 0; padding-left: 16px; }
.hlp-pop li + li { margin-top: 3px; }
/* Egyedi modellező: Műszaki rajz gomb a nézetváltóban, a rajz eszköztárának ikonjai */
.m-dwbtn { display: inline-flex; align-items: center; gap: 5px; }
.m-dwbtn .sec-ico, .dw-title .sec-ico, .m-cutdd > summary .sec-ico { width: 15px; height: 15px; }
.seg button.on .sec-ico { stroke: #fff; }
.dw-title { display: inline-flex; align-items: center; gap: 6px; }
.m-cutdd > summary { display: inline-flex; align-items: center; gap: 5px; }
/* a kijelölt lap fülei: Lap · Megmunkálás · Modell */
.m-tabs { margin: 8px 14px 4px; }
.m-tabs button { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; padding: 5px 4px; color: var(--ink); }
.m-tabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tabs .sec-ico { width: 14px; height: 14px; }
.m-tabs button.on .sec-ico { stroke: #fff; }
.m-badge { flex: none; font-style: normal; font-size: 10px; font-weight: 700; min-width: 16px; line-height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; }
.m-tabs button.on .m-badge { background: #fff; color: var(--accent); }
.m-warn { margin: 8px 14px; }
#mProps > details > summary { gap: 8px; padding: 8px 14px; font-size: 12px; letter-spacing: .3px; }
#mProps > details > summary:hover { background: var(--subtle); }
#mProps > details > summary .sec-t { text-transform: uppercase; }
#mProps > details > summary::before { display: none; }
#mProps > details > summary::after { content: '▸'; flex: none; color: var(--muted); transition: transform .15s; }
#mProps > details[open] > summary::after { transform: rotate(90deg); }
#mProps > details[open] > summary .sec-hint { display: none; }
#mProps > details > .sec-b { padding: 2px 14px 10px; }
#mProps .sec-b > .tips { margin: 0; padding: 4px 10px 8px; font-size: 12px; line-height: 1.4; }
#mProps .sec-b > .tips p { margin: 5px 0 0; }
#mProps .sec-b .m-lmat.on { margin: 0 -14px; }
.m-xyz { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 2px 0 6px; }
.m-xf { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.m-xf label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.m-xf span { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-xf input { width: 100%; min-width: 0; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); text-align: right; }
.m-xf input:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.m-xf input:disabled { background: var(--disabled); color: var(--ink-2); }
.m-xf .m-r90 { padding: 2px 4px; font-size: 11px; }
.m-ax { flex: none; font-style: normal; font-weight: 700; font-size: 9.5px; line-height: 14px; min-width: 14px; text-align: center; border-radius: 3px; color: #fff; }
.m-ax.axX { background: #e5484d; }   /* a 3D tengelyszínei (viewer AX_COL) */
.m-ax.axY { background: #30a46c; }
.m-ax.axZ { background: #3e7bfa; }
.m-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; }
.m-two .fld-row { flex-direction: column !important; align-items: stretch; gap: 3px; }
.m-two .fld-row > span { font-size: 11px !important; color: var(--ink-2) !important; }
.m-two .fld-row input { width: 100% !important; }
.m-rotrow { display: flex; align-items: center; gap: 6px; }
.m-rotrow .fld { flex: 1; min-width: 0; }
.m-rotrow .btn { flex: none; padding: 3px 7px; }
.m-size {
  pointer-events: auto; cursor: text; background: var(--tip-bg); color: var(--tip-ink); border-radius: 9px; font: 700 11px system-ui, sans-serif;
  padding: 1px 7px; box-shadow: 0 1px 3px rgba(0,0,0,.25); white-space: nowrap;
}
.m-size:hover { background: var(--tip-hi); outline: 2px solid #f59e0b; }
.m-size.editing { padding: 0; background: var(--field); }
/* a beírt szám a mező saját színeivel (a címke fehér felirata itt nem látszana) */
.m-size input { width: 70px; border: 0; outline: none; font: 700 12px system-ui, sans-serif; text-align: center; border-radius: 8px; padding: 3px 4px; color: var(--ink); background: var(--field); }
.wall-dim input { width: 74px; }
.m-parts { padding: 4px 0; }
.m-part { padding: 6px 14px; cursor: pointer; border-left: 3px solid transparent; display: flex; flex-direction: column; }
.m-part:hover { background: var(--hover); }
.m-part.on { background: var(--accent-bg); border-left-color: var(--accent); }
.m-tpls { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.m-tpls .btn { text-align: left; }
.m-sub { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin: 10px 0 4px; }
.m-title { font-size: 13px; }
/* (vonalas, mint a Tabler-ikonok: az alakos lapok saját rajza is kitöltés nélkül, a szöveg halvány színével) */
.m-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.m-el:hover .m-ico, .m-part.on .m-ico { color: var(--accent); }
.m-part { flex-direction: row; align-items: center; gap: 8px; }
.m-part span { display: flex; flex-direction: column; min-width: 0; }
.m-part small { font-size: 11px; color: var(--muted); }
.m-part span { flex: 1; }
/* a lap dekorjának mintája a lapok listájában (saját dekor: erősebb keret) */
.m-sw { flex: none; width: 18px; height: 18px; border-radius: 4px; border: 1px dashed rgba(0,0,0,.25); background-size: cover; background-position: center; }
.m-sw.own { border: 1px solid rgba(0,0,0,.35); }
/* Lapok anyaga: laponként anyag és dekor */
.m-lmat { padding: 6px 0 2px; border-top: 1px solid var(--line); }
.m-lmat.on { background: var(--accent-bg); margin: 0 -14px; padding: 6px 14px 2px; }
.m-lmat .fld-row { margin-bottom: 4px !important; }
.m-lmat .fld-row > span { min-width: 0; }
.m-lname { font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-lname:hover { color: var(--accent); text-decoration: underline; }
.m-lmat .dp-fld > span:empty { display: none; }
.m-lmat .dp-fld { margin-bottom: 4px; }
/* több kijelölt lap (Egyedi modellező): a listájuk */
.m-msel { display: flex; flex-direction: column; gap: 3px; margin-bottom: 6px; max-height: 260px; overflow-y: auto; }
.m-mrow { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; }
.m-mrow.on { border-color: var(--accent); background: var(--accent-bg); }
.m-mrow .m-lname { flex: 1; min-width: 0; }
.m-mrow small { color: var(--muted); font-size: 11px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-mrow .ib { width: 22px; height: 22px; font-size: 11px; flex: none; }
.m-planes { margin-bottom: 8px; }
.m-planes button { flex: 1; font-size: 12px; padding: 4px 6px; }
.m-shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.m-shape { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--field); cursor: pointer; font-size: 11px; line-height: 1.15; text-align: center; }
.m-shape:hover { border-color: var(--accent); background: var(--accent-bg); }
.m-shape .m-ico { width: 26px; height: 26px; }
.m-orient { gap: 4px; flex-wrap: wrap; }
.m-crow { display: grid; grid-template-columns: 1fr 74px 64px; gap: 5px; align-items: center; margin-bottom: 4px; font-size: 12px; }
.m-crow select, .m-crow input { padding: 3px 4px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; }
.m-crow input { text-align: right; }
.m-crow input.bad { border-color: #dc2626; }
.m-edge { display: grid !important; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; margin-bottom: 3px; }
.m-edge small { color: var(--muted); font-size: 11px; }
.m-cut { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; margin-bottom: 6px; position: relative; }
.m-cut .ib { position: absolute; right: 6px; top: 4px; width: 22px; height: 22px; font-size: 11px; }
.mode-seg button { font-weight: 600; padding: 6px 14px; }
/* Egyedi modellező › Vázlat (msketch.js): a 3D fölött, a lap 2D-ben */
.m-sketch { position: absolute; inset: 0; z-index: 40; background: var(--bg, #f4f5f7); cursor: crosshair; outline: none; overflow: hidden; touch-action: none; }
.m-sketch[hidden] { display: none; }
.sk-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sk-g { stroke: rgba(100, 116, 139, .12); stroke-width: 1; }
.sk-gm { stroke: rgba(100, 116, 139, .28); stroke-width: 1; }
.sk-panel { fill: #fffaf0; stroke: #57534e; stroke-width: 1.6; }
.sk-axis { stroke: #94a3b8; stroke-width: 1; stroke-dasharray: 6 4; }
.sk-tx { font: 600 12px system-ui, sans-serif; fill: #64748b; }
.sk-f { fill: rgba(37, 99, 235, .16); stroke: #2563eb; stroke-width: 1.5; cursor: move; }
.sk-f.thru { fill: var(--bg, #f4f5f7); stroke: #1e3a8a; }
.sk-f.on { stroke: #f59e0b; stroke-width: 2.4; fill: rgba(245, 158, 11, .18); }
.sk-f.back { fill: none; stroke: #94a3b8; stroke-dasharray: 5 4; cursor: default; pointer-events: none; }
.sk-lam { fill: none; stroke: rgba(87, 83, 78, .55); stroke-width: 1; pointer-events: none; }
.sk-lam.back { stroke-dasharray: 5 4; stroke: rgba(148, 163, 184, .7); }
.sk-draft { fill: rgba(245, 158, 11, .14); stroke: #f59e0b; stroke-width: 1.6; stroke-dasharray: 6 3; pointer-events: none; }
polyline.sk-draft { fill: none; }
.sk-h { fill: #fff; stroke: #f59e0b; stroke-width: 1.6; cursor: grab; }
.sk-o { fill: #f59e0b; stroke: #fff; stroke-width: 1.5; }
/* illesztés: segédvonal a célon; méretező fogantyú fölött a kurzor a méretezésé (msketch.js) */
.sk-guide { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 5 4; pointer-events: none; }
.m-sketch.sk-rs .sk-f, .m-sketch.sk-rs .sk-h { cursor: inherit; }
.sk-labels { position: absolute; inset: 0; pointer-events: none; }
.sk-dim { position: absolute; transform: translate(-50%, -50%); }
.sk-dim.sk-gap { background: #2563eb; color: #fff; }
.sk-dim.sk-ro { pointer-events: none; opacity: .85; }
.sk-dl { position: absolute; border-color: #2563eb; border-style: dashed; border-width: 0; pointer-events: none; }
.sk-dl.h { border-top-width: 1px; }
.sk-dl.v { border-left-width: 1px; }
.sk-hint { position: absolute; left: 10px; bottom: 10px; right: 10px; max-width: 760px; padding: 6px 10px; border-radius: 7px; background: rgba(15, 23, 42, .78); color: #f1f5f9; font-size: 12px; line-height: 1.4; pointer-events: none; }
.sk-hint kbd { background: rgba(255, 255, 255, .16); border-radius: 3px; padding: 0 4px; font-size: 11px; }
.sk-tools button { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 8px; }
.sk-tools .m-ico { width: 16px; height: 16px; }
.sk-list { display: flex; flex-direction: column; gap: 3px; }
.sk-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.sk-item span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sk-item small { color: var(--muted); font-size: 11px; }
.sk-item:hover { background: var(--hover); }
.sk-item.on { border-color: #f59e0b; background: rgba(245, 158, 11, .1); }
.sk-item .ib { width: 22px; height: 22px; font-size: 11px; flex: none; }
.sk-sum { font-size: 12px; color: var(--ink-2); margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
/* Egyedi modellező › Keret (mframe.js): a keret rúdjai 2D-ben */
.fr-bar { fill: #d5dce4; stroke: #334155; stroke-width: 1.4; cursor: move; }
.fr-bar.wood { fill: #ecd9b8; stroke: #7c5a3a; }
.fr-bar.on { stroke: #f59e0b; stroke-width: 2.4; fill: #fde9c4; }
.fr-cl { fill: none; stroke: #2563eb; stroke-width: 1.1; stroke-dasharray: 10 3 2 3; pointer-events: none; }
.fr-cl.on { stroke: #b45309; }
.fr-mid { stroke: #16a34a; stroke-width: 1; stroke-dasharray: 3 4; opacity: .75; pointer-events: none; }
.sk-h.on { fill: #f59e0b; }
.fr-num { position: absolute; transform: translate(-50%, -50%); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #fff; border: 1px solid #334155; color: #0f172a; font: 600 11px/16px system-ui, sans-serif; text-align: center; pointer-events: none; }
/* sötét téma: a Vázlat és a Keret szerkesztője ne világos lapot mutasson sötét háttér előtt */
:root[data-theme="dark"] .sk-panel { fill: #2b2a27; stroke: #a8a29e; }
:root[data-theme="dark"] .sk-tx { fill: var(--muted); }
:root[data-theme="dark"] .sk-h { fill: var(--field); }
:root[data-theme="dark"] .fr-bar { fill: #3a4048; stroke: #cbd5e1; }
:root[data-theme="dark"] .fr-bar.wood { fill: #5a4630; stroke: #d6b98f; }
:root[data-theme="dark"] .fr-bar.on { fill: #5c4520; }
:root[data-theme="dark"] .fr-num { background: var(--field); border-color: var(--line-2); color: var(--ink); }
:root[data-theme="dark"] .s-gico .gl { fill: #26404a; stroke: #7fa3b0; }
.fr-tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 4px; }
.fr-tbl th, .fr-tbl td { padding: 2px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.fr-tbl th { color: var(--muted); font-weight: 600; }
.fr-tbl .n { text-align: right; }
/* lamellás marás: profilválasztó */
.lam-profs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; margin: 6px 0 8px; }
.lam-prof { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--field); cursor: pointer; font-size: 11px; line-height: 1.15; text-align: center; color: var(--ink); }
.lam-prof:hover { border-color: var(--accent); }
.lam-prof.on { border-color: var(--accent); background: var(--accent-bg); }
.lam-ico { width: 64px; height: 22px; }
.lam-ico path { fill: #e7dccb; stroke: #57534e; stroke-width: .8; stroke-linejoin: round; }
.lam-res { margin: 6px 0 2px; font-size: 12.5px; font-weight: 600; }

/* ---------- Korpusztervező */
.front-label {
  background: var(--glass); border: 1px solid var(--accent-line); color: var(--ink); border-radius: 4px;
  font: 600 10.5px system-ui, sans-serif; padding: 1px 6px; white-space: nowrap; pointer-events: none;
}
.front-label.open { border-style: dashed; color: var(--muted); }
.fld-row .ib.split { flex: none; width: 26px; height: 26px; color: var(--accent); font-size: 14px; margin-right: -4px; }
.div-box { width: min(560px, 94vw) !important; }
.div-box .presets { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 10px; }
.div-prev { display: flex; gap: 16px; align-items: center; min-height: 120px; padding: 10px; background: var(--subtle); border-radius: 8px; }
.div-prev .warn { margin: 0; }
.div-help { margin: 10px 0 4px; color: var(--ink-2); }
.div-help summary { cursor: pointer; font-weight: 600; }
.div-help p { margin: 6px 0; }
.div-help code { background: var(--hover-2); padding: 0 4px; border-radius: 3px; }
.fuga-tip {
  position: absolute; z-index: 6; pointer-events: none; background: var(--tip-bg); color: var(--tip-ink); font: 600 11px system-ui, sans-serif;
  padding: 4px 8px; border-radius: 6px; white-space: nowrap; transform: translate(14px, -28px);
}
/* Modellező › sarokfogás (medit3d.js): grab – megfogható sarok; node – csomópont (négyzet); mid – élfelező (rombusz);
   edge – él (kör) */
.m-snap {
  position: absolute; z-index: 6; pointer-events: none; width: 14px; height: 14px; margin: -7px 0 0 -7px; box-sizing: border-box;
  --snap-c: var(--accent); border: 2.5px solid var(--snap-c); background: color-mix(in srgb, var(--snap-c) 28%, transparent);
  box-shadow: 0 0 0 1.5px var(--panel); border-radius: 3px;
}
.m-snap[hidden] { display: none; }
.m-snap.grab { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--panel); }
.m-snap.node { --snap-c: var(--snap-node); }
.m-snap.mid { --snap-c: var(--snap-mid); transform: rotate(45deg); border-radius: 2px; }
.m-snap.edge { --snap-c: var(--snap-edge); border-radius: 50%; }
.snap-label {
  pointer-events: none; margin-left: 34px; background: var(--glass); color: var(--accent-ink); border: 1px solid var(--accent-line);
  font: 700 12px system-ui, sans-serif; padding: 1px 6px; border-radius: 10px;
}
.snap-label.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.part-info {
  position: absolute; left: 10px; bottom: 10px; z-index: 5; max-width: 300px; max-height: 38%; overflow: auto;
  background: var(--glass); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08); font-size: 12px; pointer-events: auto;
}
.part-info .pi-title { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.part-info .pi-part + .pi-part { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.part-info .pi-name { font-weight: 600; }
.part-info .pi-size { font-size: 17px; font-weight: 700; color: var(--accent-ink); }
.part-info .pi-size span { font-size: 12px; font-weight: 600; color: var(--muted); }
.part-info .pi-meta { color: var(--muted); font-size: 11px; }
.layout.designer { grid-template-columns: 260px minmax(0, 1fr) 360px; }
.d-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* Korpusztervező › Vasalatok: vasalat másolása húzással (a gomb az előlap sarkán, húzás közben a felirat a kurzor mellett) */
.hw-copy { position: absolute; z-index: 6; width: 26px; height: 26px; padding: 0; border: 1px solid var(--accent); border-radius: 6px; background: var(--panel); color: var(--accent-ink); font-size: 15px; line-height: 1; cursor: grab; box-shadow: 0 1px 4px var(--overlay); touch-action: none; }
.hw-copy:hover { background: var(--accent-bg); }
.hw-copy.inner { border-style: dashed; }   /* belsőfiók (ajtó mögött) – mint az elemtár ikonja */
.hw-copy:active { cursor: grabbing; }
.hw-copy-ghost { position: fixed; z-index: 1000; pointer-events: none; padding: 3px 9px; border-radius: 6px; background: var(--tip-bg); color: var(--tip-ink); font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 4px var(--overlay); }
.hw-copy-ghost.bad { opacity: .7; }
/* Korpusztervező: fülek (több nyitott korpusz) */
.d-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 5px 8px 0; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; flex: none; }
.d-tab { display: flex; align-items: center; gap: 6px; flex: none; min-width: 90px; max-width: 220px; padding: 4px 4px 5px 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 7px 7px 0 0; background: var(--subtle); color: var(--ink-2); font-size: 12.5px; cursor: pointer; user-select: none; }
.d-tab:hover { background: var(--hover-2); color: var(--ink); }
.d-tab.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: inset 0 2px 0 var(--accent); }
.d-tab-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-tab-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--warn-ink); }
.d-tab-x { flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.d-tab-x:hover { background: var(--danger-bg); color: var(--danger); }
.d-tab-add { flex: none; width: 32px; height: 27px; border: 1px dashed var(--line-2); border-bottom: 0; border-radius: 7px 7px 0 0; background: none; color: var(--ink-2); font-size: 15px; cursor: pointer; }
.d-tab-add:hover { background: var(--accent-bg); color: var(--accent-ink); }
.d-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.d-name { font-weight: 600; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; width: 190px; background: var(--field); color: var(--ink); }
.d-source { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* (a felirat a data-dirty attribútumból – fordítható: designer.js / slidingui.js) */
.d-source.dirty::after { content: ' • ' attr(data-dirty); color: var(--warn-ink); }
.d-bar .dd { z-index: 20; }
#dViewport { flex: 1; }
.d-result { position: absolute; inset: 0; background: var(--panel); z-index: 5; padding: 14px 18px; }
.d-result h3 { margin: 0 0 2px; }
.d-result h4 { margin: 18px 0 0; }
.d-res-head { display: flex; gap: 16px; align-items: center; }
svg.thumb.res { width: 150px; height: 150px; }
.d-explode { width: 110px; accent-color: var(--accent); }
/* a 3D nézet eszközei (nézőpont, nyitás, robbantás) – csak a Tervezés fülön */
.d-3d-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.d-3d-tools[hidden] { display: none; }
/* műszaki rajz fül */
/* a felső sáv rögzített; csak alatta görgetnek / nagyodnak a rajzlapok */
.d-drawing { background: var(--desk); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.d-drawing[hidden] { display: none; }
.dw-bar { flex: none; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 18px; background: var(--panel); border-bottom: 1px solid var(--line); }
.dw-scroll { flex: 1; min-height: 0; overflow: auto; position: relative; padding: 14px 18px 24px; }
.dw-bar select { margin-left: 4px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; }
.dw-chk { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer; }   /* kötőelemek furatai be / ki */
/* keskeny helyen (Korpusztervező) a sor tördelődik, a feliratok egyben maradnak */
.dw-bar { flex-wrap: wrap; row-gap: 6px; }
.dw-bar > b, .dw-bar > span, .dw-bar > label { white-space: nowrap; }
.dw-sheet { width: calc(min(1400px, 100%) * var(--dwz, 1)); margin: 0 auto 18px; }
.dw-pages.pan { cursor: grab; }
.d-drawing.panning, .d-drawing.panning .dw-pages { cursor: grabbing; user-select: none; }
.dw-zoom { display: flex; gap: 2px; }
.dw-zoom .dw-zv { min-width: 54px; }
.dw-h { display: flex; align-items: center; gap: 8px; padding: 0 2px 5px; color: var(--ink-2); }
.dw-sheet svg.tsheet { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
/* Helyiségtervező › Műszaki rajz: bal oldali tartalom – kereső, a tételek (helyiségrajz, korpuszok kis képpel, munkalapok)
   és a látott tétel lapjai; ☰ elrejti */
.dw-body { flex: 1; min-height: 0; display: flex; }
.dw-body > .dw-scroll { min-width: 0; }
.dw-side { flex: none; width: 260px; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-right: 1px solid var(--line); }
.dw-noside .dw-side { display: none; }
.d-drawing:not(.dw-noside) .dw-sidebtn { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-ink); }
.dw-find { padding: 8px; border-bottom: 1px solid var(--line); }
.dw-find input { width: 100%; box-sizing: border-box; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--field); color: var(--ink); }
.dw-toc { flex: 1; min-height: 0; overflow: auto; padding-bottom: 12px; }
.dw-ti { border-bottom: 1px solid var(--line-soft); }
.dw-tr { display: flex; align-items: center; }
.dw-tg { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 6px 4px 6px 10px; background: none; border: 0; text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.dw-tr:hover { background: var(--hover); }
.dw-ti.on > .dw-tr { background: var(--accent-bg); box-shadow: inset 3px 0 0 var(--accent); }
.dw-thumb { flex: none; width: 48px; height: 42px; display: flex; align-items: center; justify-content: center; }
.dw-thumb svg.thumb, .dw-thumb svg.wt-thumb, .dw-thumb svg { width: 100%; height: 100%; }
.dw-ico { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linejoin: round; }
.dw-tt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dw-tt b { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-tt small { color: var(--ink-2); font-size: 11px; }
.dw-tpdf { flex: none; margin-right: 6px; opacity: 0; }
.dw-tr:hover .dw-tpdf, .dw-ti.on .dw-tpdf, .dw-tpdf:focus-visible { opacity: 1; }
.dw-tp { display: flex; flex-direction: column; padding: 2px 8px 7px 64px; }
.dw-tp button { text-align: left; background: none; border: 0; padding: 3px 6px; border-radius: 4px; color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
.dw-tp button:hover { background: var(--hover-2); color: var(--ink); }
.dw-tp button.on { color: var(--accent-ink); font-weight: 600; }
.dw-pn { display: inline-block; min-width: 28px; color: var(--muted); }
.dw-tp button.on .dw-pn { color: inherit; }
.dw-none { padding: 10px 12px; }
.dw-pdf .dd-menu { min-width: 300px; }
.dw-sheet.dw-flash svg.tsheet { animation: dw-flash 1s ease-out; }
@keyframes dw-flash { from { box-shadow: 0 0 0 4px var(--accent); } to { box-shadow: 0 2px 10px rgba(0, 0, 0, .18); } }
@media (max-width: 1000px) { .dw-side { width: 210px; } .dw-thumb { width: 38px; height: 34px; } }

.d-sec { padding: 14px 14px 4px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .6px; }
/* be- és kicsukható csoport / alcsoport (Korpusztervező bal oldali lista) */
.d-fold { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.d-fold:hover { color: var(--accent); }
.d-chev { flex: none; width: 10px; font-style: normal; color: var(--muted); }
.d-chev::before { content: '▸'; display: inline-block; transform: rotate(90deg); transition: transform .15s; }
.d-chev.shut::before { transform: none; }
.d-row { padding: 6px 10px 6px 14px; cursor: pointer; font-weight: 550; border-left: 3px solid transparent; display: flex; align-items: center; gap: 9px; }
.d-row > span { flex: 1; }
.d-tg { border: 0; background: none; padding: 4px 6px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.d-tg:hover { background: var(--hover-2); }
.d-ico.sm { width: 24px; height: 24px; }
.d-ico.xs { width: 18px; height: 18px; }
.d-row:hover { background: var(--hover); }
/* L-sarok felülnézeti vázlata (Korpusztervező): a korpusz, az ajtók, a pántok helye, a méretek */
.lc-plan { display: block; width: 100%; max-width: 300px; margin: 2px auto 8px; font-size: 10.5px; fill: var(--ink); }
.lc-plan .lc-body { fill: var(--accent-bg); stroke: var(--accent); stroke-width: 1.4; }
.lc-plan .lc-door { stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; }
.lc-plan .lc-hinge { fill: var(--panel); stroke: var(--ink); stroke-width: 1.4; }
.lc-plan .lc-wall-panel { stroke: var(--accent); stroke-width: 5; }
.lc-plan .lc-wall-back { stroke: var(--accent); stroke-width: 2.2; }
.lc-plan .lc-wall-gap { stroke: var(--panel); stroke-width: 3; }
.lc-plan .lc-wall-none { stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 4 3; }
.d-row.on { background: var(--accent-bg); border-left-color: var(--accent); color: var(--accent); }
.d-items { padding: 2px 8px 6px 18px; display: flex; flex-direction: column; gap: 1px; }
.d-item { display: flex; align-items: center; gap: 10px; padding: 3px 6px; border-radius: 6px; cursor: grab; user-select: none; }
.d-item:hover { background: var(--accent-bg); }
.d-item:active { cursor: grabbing; }
.d-item.off { opacity: .45; cursor: not-allowed; }
.d-item.off:hover { background: none; }
.d-ico { width: 34px; height: 34px; flex: none; }
/* a fa saját vonalas ikonjai (designer.js icon, xicons.js d-…): jól látható méretben, a szöveg színével; a kiválasztott
   csoportnál és rámutatva zöld (a felhasználó kérése: nagyobb, egyedi ikonok) */
.d-ico.d-ti { width: 26px; height: 26px; stroke-width: 1.6; color: var(--ink-2); }
.d-ico.sm.d-ti { width: 26px; height: 26px; }
.d-ico.xs.d-ti { width: 22px; height: 22px; stroke-width: 1.7; }
.d-row.on .d-ti, .d-item:hover .d-ti, .d-sub:hover .d-ti { color: var(--accent); }
.d-item { min-height: 34px; }
.d-item > span { font-size: 12.5px; }
.d-sub { display: flex; align-items: center; gap: 8px; font-size: 12px; }
/* az Alaprajztervező elemsávja és a kijelölt elem fejléce (roomeditor.js palIco) */
svg.r-ti { width: 22px; height: 22px; flex: none; stroke-width: 1.75; color: var(--muted); }
.r-pal .cat-grid > .cat-item > svg.r-ti { grid-row: 1 / span 2; justify-self: center; }
.r-pal .cat-item:hover svg.r-ti { color: var(--accent); }
.d-sub { padding: 6px 14px 2px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.d-tpl { display: flex; align-items: center; gap: 4px; margin: 3px 10px; }
.d-tpl-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--field); border-radius: 6px; padding: 4px 6px; cursor: pointer; text-align: left; }
.d-tpl-open:hover { border-color: var(--accent); }
.d-tpl.on .d-tpl-open { border-color: var(--accent); background: var(--accent-bg); }
.d-tpl-open span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.d-tpl-open small { display: block; color: var(--muted); font-size: 10.5px; }
svg.thumb.mini { width: 34px; height: 34px; flex: none; }
.d-tpl-tools { display: flex; gap: 6px; padding: 8px 14px 18px; }

.d-ph { padding: 10px 14px; font-weight: 600; letter-spacing: .3px; border-bottom: 1px solid var(--line); background: var(--subtle-2); }
.d-acc { border-bottom: 1px solid var(--line); }
.d-acc-h { display: flex; align-items: center; gap: 6px; padding: 9px 14px; cursor: pointer; user-select: none; }
.d-acc-h::before { content: '›'; color: var(--accent); font-size: 16px; line-height: 1; transition: transform .15s; }
.d-acc-h:hover { background: var(--hover); }
.d-acc.open > .d-acc-h { background: var(--accent-bg); font-weight: 600; }
.d-acc.open > .d-acc-h::before { transform: rotate(90deg); }
.d-acc-h > span:first-of-type { flex: 1; }
.d-hwsum { display: block; font-size: 11px; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.fld-row.ro b .bad { color: var(--danger); font-weight: 600; }
.d-size { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.d-acc-b, .d-pad { padding: 8px 14px 10px; }
.fld-row { flex-direction: row !important; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px !important; }
.fld-row > span { font-size: 12px !important; flex: 1; color: var(--ink) !important; }
.fld-row input, .fld-row select { width: 140px !important; flex: none; }
.fld-row input[type="number"], .fld-row input[data-num] { text-align: right; }
.fld-row input:disabled { background: var(--disabled); color: var(--ink-2); }
.fld-row.ro b { font-weight: 500; width: 140px; text-align: right; padding-right: 8px; color: var(--ink-2); }
.tgl { cursor: pointer; }
.tgl input { display: none; }
.tgl i { width: 36px; height: 20px; border-radius: 10px; background: var(--toggle-off); position: relative; flex: none; transition: background .15s; margin-right: 2px; }
.tgl i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tgl input:checked + i { background: var(--accent); }
.tgl input:checked + i::after { left: 18px; }
#dProps hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.d-subh { font-weight: 600; font-size: 12px; margin: 12px 0 6px; }
/* külső él eltolása (közteslap / köztesoldal): címke balra, két nyílgomb jobbra */
.edge-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0; font-size: 12px; }
.edge-btns { display: flex; gap: 6px; }
.edge-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 3px 8px; color: var(--accent); }
.edge-btn svg { display: block; }
.edge-btn:disabled { opacity: .35; cursor: default; }
.d-card { margin: 10px 14px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle-2); }
.d-card .row { margin-top: 6px; }
.pad-s { padding: 8px 14px; }
.pad { padding: 14px; }
.modal-box.small { width: min(420px, 92vw); height: auto; }
.modal-box.small .fld { margin-bottom: 10px; }
.row.end { justify-content: flex-end; margin-top: 6px; }

/* ---------- nézetkocka (jobb felső sarok): matt, térhatású lapok, vékony élek, kiemelés a program színével */
.vcube { position: absolute; top: 12px; right: 12px; width: 140px; height: 140px; z-index: 4; user-select: none; touch-action: none; }
.vc-shadow {
  position: absolute; left: 50%; top: 50%; width: 92px; height: 22px; margin: 44px 0 0 -46px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(15, 23, 42, .22), rgba(15, 23, 42, 0));
}
.vc-axes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.vc-axes text { font: 800 9px system-ui, sans-serif; text-anchor: middle; fill: #fff; }
.vc-cube { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; cursor: grab; }
.vc-cube:active { cursor: grabbing; }
.vc-face {
  position: absolute; inset: 0; display: grid; grid-template-columns: 18% 64% 18%; grid-template-rows: 18% 64% 18%;
  border: 1px solid rgba(71, 85, 105, .28); border-radius: 4px; backface-visibility: hidden; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.vc-face span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font: 650 9.5px system-ui, "Segoe UI", sans-serif; letter-spacing: .9px; color: #475569;
}
.vc-cell { display: block; transition: background .12s; }
.vc-cell:hover { background: color-mix(in srgb, var(--accent) 55%, transparent); cursor: pointer; }
.vc-cell.face:hover { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.vc-face:has(.vc-cell.face:hover) span { color: #2f5a2b; }
.vc-home {
  position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border: 0; border-radius: 50%; padding: 5px; cursor: pointer;
  background: var(--glass); box-shadow: 0 1px 4px rgba(15, 23, 42, .18); opacity: .8; transition: opacity .15s, box-shadow .15s;
}
.vc-home svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vcube:hover .vc-home { opacity: 1; }
.vc-home:hover { box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(15, 23, 42, .2); }
.vc-home:hover svg { stroke: var(--accent); }

/* ---------- Helyiségtervező: tengelyek, kezelőelem, faltávolságok */
.axis-label { font: 800 13px system-ui, sans-serif; text-shadow: 0 0 3px var(--halo), 0 0 3px var(--halo); pointer-events: none; }
.wall-dim {
  pointer-events: auto; cursor: text; background: var(--field); color: var(--blue-ink); border: 1.5px solid #2563eb; border-radius: 10px;
  font: 700 11.5px system-ui, sans-serif; padding: 1px 8px; box-shadow: 0 1px 4px rgba(0,0,0,.15); white-space: nowrap;
}
.wall-dim:hover { background: #2563eb; color: #fff; }
/* csak kiírt érték (Helyiségtervező: az alaprajzi elem helye – módosítani az Alaprajz-szerkesztőben lehet) */
.wall-dim.ro { cursor: default; border-style: dashed; }
.wall-dim.ro:hover { background: var(--field); color: var(--blue-ink); }
/* az alaprajzi elem adatai a Helyiségtervező paneljén: csak olvashatók */
fieldset.ro-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.ro-fields :is(input, select, textarea) { background: var(--disabled); color: var(--ink-2); cursor: default; }
.ro-note { margin: 2px 14px 8px; }
.wall-dim.editing { padding: 0; border-width: 2px; }
.wall-dim input { width: 74px; border: 0; outline: none; font: 700 12px system-ui, sans-serif; text-align: center; border-radius: 9px; padding: 3px 4px; color: var(--blue-ink); background: var(--field); }
.viewport .fuga-tip[hidden] { display: none; }
.view-hint {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 4; pointer-events: none; max-width: calc(100% - 24px);
  background: var(--glass); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 12px; color: var(--ink-2); text-align: center;
}
/* faltávolságok: egysoros felirat fölötte, alatta mihez mérve (fal / szomszéd) – a négy mező egy vonalban */
.pos-dist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-items: start; margin-bottom: 6px; }
.pos-dist .fld { margin-bottom: 0; gap: 2px; }
.pos-dist .fld > span { justify-content: center; white-space: nowrap; }
.pos-dist input { text-align: center; color: var(--blue-ink); font-weight: 600; padding-left: 2px; padding-right: 2px; }
.pos-dist input::-webkit-inner-spin-button { display: none; }
.pos-dist .pd-to { font-size: 10.5px; line-height: 14px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-note { margin: -4px 0 4px; }
.sub-h { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin: 8px 0 4px; }
#props .sub-h { margin: 12px 0 6px; }
#props .sec-b > .sub-h:first-child { margin-top: 2px; }
.pos-more { border-top: 0; margin-top: 6px; }
.pos-more > summary { padding: 4px 0; font-weight: 500; font-size: 12px; color: var(--ink-2); }
.rot-row { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 8px; }
.rot-row .fld { flex: 1 1 60px; min-width: 52px; margin-bottom: 0; }
.rot-row .btn { flex: none; margin-bottom: 1px; padding-left: 7px; padding-right: 7px; white-space: nowrap; }
/* a jobb oldali panel csoportfejlécei: ikon, cím, becsukva rövid összefoglaló, a nyíl jobbra */
#props > details > summary { gap: 8px; padding: 10px 14px; }
#props > details > summary:hover { background: var(--subtle); }
#props > details > summary::before { display: none; }
#props > details > summary::after { content: '▸'; flex: none; color: var(--muted); transition: transform .15s; }
#props > details[open] > summary::after { transform: rotate(90deg); }
.sec-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sec-t { flex: 1; min-width: 0; }
.sec-hint { flex: 0 1 auto; min-width: 0; max-width: 55%; font-weight: 400; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#props > details[open] > summary .sec-hint { display: none; }
/* illeszkedési sík felirata (két elem érintkező lapja) */
.contact-label {
  pointer-events: none; background: #16a34a; color: #fff; font: 700 10.5px system-ui, sans-serif; padding: 1px 7px; border-radius: 9px;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); white-space: nowrap; transform: translateY(-14px);
}
/* kijelölő keret (Shift + húzás üres helyen) */
.sel-band { position: absolute; z-index: 6; pointer-events: none; border: 1.5px dashed var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 2px; }
/* több kijelölt elem listája */
.multi-list { display: flex; flex-direction: column; gap: 4px; padding: 4px 14px 10px; max-height: 320px; overflow-y: auto; }
.ml-item { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px 2px 0; }
.ml-item.on { border-color: var(--accent); background: var(--accent-bg); }
.ml-name { flex: 1; display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; padding: 4px 8px; cursor: pointer; text-align: left; font-weight: 550; }
.ml-name small { color: var(--muted); font-weight: 400; font-size: 11px; }

/* ---------- ferde tetőtér: a kijelölt szekrények ferdére vágása (slopeui.js) */
.slope-box { width: 94vw !important; height: 90vh !important; max-width: none !important; }
.slope-box .modal-h .sl-mode { margin-left: 14px; }
.sl-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.sl-canvas { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--canvas); border-right: 1px solid var(--line); }
#slSvg { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; touch-action: none; cursor: crosshair; }
.sl-side { padding: 10px 14px; overflow-y: auto; }
.sl-side .sub-h { margin-top: 10px; }
.sl-it { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin: 5px 0; }
.sl-it small { color: var(--muted); font-size: 11.5px; }
.sl-w { font-size: 11.5px; color: var(--warn-ink); }
#slSvg * { vector-effect: non-scaling-stroke; }
#slSvg .sl-floor { stroke: var(--ink-2); stroke-width: 2; }
#slSvg .sl-ceil { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 6 4; }
#slSvg .sl-orig { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; }
#slSvg .sl-pt { fill: rgba(205, 181, 147, .30); stroke: var(--ink-2); stroke-width: .8; }
#slSvg .sl-bk { fill: rgba(205, 181, 147, .12); stroke: var(--muted); stroke-width: .6; }
#slSvg .sl-top { fill: rgba(37, 99, 235, .28); stroke: #2563eb; stroke-width: 1.2; }
#slSvg .sl-fr { fill: var(--field); fill-opacity: .82; stroke: var(--ink-2); stroke-width: 1; }
#slSvg .sl-off { stroke: none; }
#slSvg .sl-hatch { stroke: rgba(220, 38, 38, .35); stroke-width: 1.4; }
#slSvg .sl-roof { stroke: #7f1d1d; stroke-width: 2; stroke-dasharray: 8 5; }
#slSvg .sl-cut { stroke: #dc2626; stroke-width: 2; }
#slSvg .sl-h circle { fill: var(--field); stroke: #dc2626; stroke-width: 2.5; cursor: grab; }
#slSvg .sl-h:hover circle { fill: rgba(220, 38, 38, .18); }
#slSvg .sl-tx { fill: var(--ink-2); font-family: system-ui, sans-serif; text-anchor: middle; pointer-events: none; }
#slSvg .sl-tx.sl-ang, #slSvg .sl-tx.sl-hv { fill: #b91c1c; font-weight: 700; paint-order: stroke; stroke: var(--canvas); stroke-width: 3; }
#slSvg .sl-tx.sl-num { font-weight: 700; }

/* ---------- helyiség alaprajz-szerkesztő */
.room-box { width: 97vw !important; height: 95vh !important; max-width: none !important; }
.room-box .modal-h .r-mode { margin-left: 14px; }
.r-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--subtle-2); }
.r-shapes { display: flex; gap: 4px; flex-wrap: wrap; }
.r-shape { display: flex; align-items: center; gap: 5px; padding: 3px 8px; font-size: 12px; }
.r-ico { width: 30px; height: 24px; }
.r-ico polygon { fill: var(--accent-bg); stroke: var(--accent); stroke-width: 1.4; }
.r-main { flex: 1; display: grid; grid-template-columns: 236px minmax(0, 1fr) 300px; min-height: 0; }
@media (max-width: 1300px) { .r-main { grid-template-columns: 200px minmax(0, 1fr) 270px; } }
/* elemsáv (bal) */
.r-pal { overflow-y: auto; border-right: 1px solid var(--line); background: var(--panel); padding-bottom: 12px; }
.r-pal-h { padding: 10px 14px 0; font-weight: 700; font-size: 13px; }
.r-pal-tip { padding: 2px 14px 4px; margin: 0; }
.r-pal .cat-grid { padding: 0 10px 6px; gap: 5px; }
.r-pal .cat-item { padding: 6px 4px 5px; cursor: grab; }
.r-pal .cat-item:active { cursor: grabbing; }
.r-pal svg.thumb { height: 44px; }
.r-pal .cat-name { font-size: 11.5px; }
/* nézetek: alaprajz, 3D vagy egymás mellett */
.r-views { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; min-height: 0; }
.r-views[data-mode="2d"] { grid-template-columns: 1fr; }
.r-views[data-mode="2d"] .r-3d { display: none; }
.r-views[data-mode="3d"] { grid-template-columns: 1fr; }
.r-views[data-mode="3d"] .r-canvas { display: none; }
.r-3d { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid var(--line); }
.r-3d > canvas { display: block; }
.r-3d-hint { position: absolute; left: 8px; bottom: 8px; right: 70px; z-index: 2; font-size: 11px; color: var(--ink-2); pointer-events: none; text-shadow: 0 0 3px var(--canvas); }
.r-canvas { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--canvas); border-right: 1px solid var(--line); }
#rSvg { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; cursor: default; }
.r-side { padding: 10px 14px; overflow-y: auto; }
.r-side .fld-row input { width: 100px !important; text-align: right; }
.r-area { margin: 6px 0 4px; color: var(--ink-2); }
.r-foot { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); }
.r-hint { font-size: 12px; color: var(--ink-2); }
.r-hint.flash { color: var(--warn-ink); font-weight: 600; }
/* jobb oldali panel: a kijelölt elem, a falon lévő elemek listája */
.r-ihead { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }
.r-ihead b { font-size: 14px; }
.r-sec { border-top: 1px solid var(--line); padding-top: 2px; margin-top: 6px; }
.r-side .warn.r-warn, .r-side .ok.r-ok { margin: 10px 0; }
.r-side .actions.r-act { padding: 6px 0 12px; }
.r-wl-h { font-size: 11px; font-weight: 700; color: var(--muted); margin: 8px 0 2px; text-transform: uppercase; letter-spacing: .4px; }
.r-li { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: none; padding: 4px 6px; border-radius: 5px; cursor: pointer; text-align: left; color: var(--ink); font: inherit; font-size: 12.5px; }
.r-li:hover { background: var(--accent-bg); }
.r-li i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.r-li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-li small { color: var(--muted); }
.r-wrow .r-wpick { cursor: pointer; color: var(--ink); text-decoration: none; }
.r-wrow .r-wpick:hover { color: var(--accent); text-decoration: underline; }
.r-wrow.on .r-wpick { color: #2563eb; font-weight: 700; }
.r-side .r-wrow input { width: 86px !important; }
.r-anc { flex: none; margin-left: -4px; }
/* alaprajz: a falon lévő elemek, a kijelölt fal, a méretek */
#rSvg .r-wsel { stroke: rgba(37, 99, 235, .45); stroke-width: 12; pointer-events: none; }
#rSvg .r-wnum { cursor: pointer; }
#rSvg .r-wnum circle { fill: var(--field); stroke: var(--ink-2); stroke-width: 1.2; }
#rSvg .r-wnum text { font: 700 11px system-ui, sans-serif; fill: var(--ink-2); text-anchor: middle; }
#rSvg .r-wnum.on circle { fill: #2563eb; stroke: #2563eb; }
#rSvg .r-wnum.on text { fill: #fff; }
#rSvg .r-it { cursor: grab; }
#rSvg .r-op { fill: transparent; stroke: none; }
#rSvg .r-op:hover { fill: rgba(139, 111, 71, .12); }
#rSvg .r-op.sel { fill: rgba(37, 99, 235, .16); stroke: #2563eb; stroke-width: 1.5; stroke-dasharray: 4 3; }
#rSvg .r-fx circle { fill: var(--field); stroke-width: 2; }
#rSvg .r-fx text, #rSvg .r-fb text { font: 700 8.5px system-ui, sans-serif; text-anchor: middle; pointer-events: none; }
#rSvg .r-fx:hover circle { stroke-width: 3; }
#rSvg .r-fx.sel circle { fill: #2563eb; stroke: #2563eb !important; }
#rSvg .r-fx.sel text { fill: #fff !important; }
#rSvg .r-fb polygon { stroke-width: 1.6; }
#rSvg .r-fb.sel polygon { stroke: #2563eb !important; stroke-width: 2.6; }
#rSvg .r-fxl { stroke-width: 1.2; pointer-events: none; }
#rSvg .r-dim { stroke: #2563eb; stroke-width: 1.2; pointer-events: none; }
#rSvg .r-lbl.idim rect { stroke: #2563eb; }
#rSvg .r-lbl.hgt rect { fill: var(--blue-bg); }
#rSvg .r-grid { stroke: var(--grid); stroke-width: 1; }
#rSvg .r-grid.b { stroke: var(--grid-b); }
#rSvg .r-room { fill: rgba(205, 181, 147, .35); stroke: var(--ink-2); stroke-width: 7; stroke-linejoin: miter; }
#rSvg .r-room.bad { stroke: #dc2626; fill: rgba(220, 38, 38, .08); }
#rSvg .r-ghost { fill: none; stroke: #cbd5e1; stroke-width: 4; stroke-dasharray: 8 6; }
#rSvg .r-cab { fill: color-mix(in srgb, var(--accent) 18%, transparent); stroke: #87a582; stroke-width: 1; pointer-events: none; }
#rSvg .r-gap { stroke: var(--canvas); stroke-width: 8; pointer-events: none; }
#rSvg .r-win { stroke: #3b82f6; stroke-width: 3; pointer-events: none; }
#rSvg .r-door { fill: none; stroke: #8b6f47; stroke-width: 1.6; stroke-dasharray: 5 3; pointer-events: none; }
#rSvg .r-wall { stroke: transparent; stroke-width: 16; cursor: copy; }
#rSvg .r-wall:hover { stroke: rgba(37, 99, 235, .22); }
#rSvg .r-lbl { cursor: text; }
#rSvg .r-lbl rect { fill: var(--field); stroke: #93b4f5; stroke-width: 1.4; }
#rSvg .r-lbl text { font: 600 12.5px system-ui, sans-serif; fill: var(--blue-ink); text-anchor: middle; }
#rSvg .r-lbl:hover rect { fill: var(--blue-bg); stroke: #2563eb; stroke-width: 2; }
#rSvg .r-lbl.live rect { fill: #2563eb; stroke: #2563eb; }
#rSvg .r-lbl.live text { fill: #fff; }
#rSvg .r-ang { font: 600 11px system-ui, sans-serif; fill: #7c3aed; text-anchor: middle; cursor: text; }
#rSvg .r-ang.right { fill: #a1a1aa; }
#rSvg .r-ang:hover { fill: #2563eb; text-decoration: underline; }
#rSvg .r-vtx { fill: var(--field); stroke: var(--ink); stroke-width: 2; cursor: move; }
#rSvg .r-vtx:hover, #rSvg .r-vtx.sel { fill: #2563eb; stroke: #2563eb; }
#rSvg .r-draft { fill: rgba(37, 99, 235, .06); stroke: #2563eb; stroke-width: 3; }
#rSvg .r-rubber { stroke: #2563eb; stroke-width: 2; stroke-dasharray: 6 5; }
#rSvg .r-close { fill: rgba(37, 99, 235, .15); stroke: #2563eb; stroke-width: 1.5; }
#rSvg .r-cursor { fill: #2563eb; }
#rSvg .r-rt { fill: none; stroke: #2563eb; stroke-width: 1.4; pointer-events: none; }
/* bele-rajzolás: az alap (a meglévő alaprajz), a nyitott vonal, az eredmény előnézete */
#rSvg .r-ghost.base { fill: var(--wt-fill); fill-opacity: .55; stroke: var(--ink-2); stroke-width: 5; stroke-dasharray: none; }
#rSvg .r-draft.open { fill: none; }
#rSvg .r-preview { fill: var(--accent-bg); fill-opacity: .6; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 7 4; pointer-events: none; }
#rSvg .r-guide { stroke: var(--guide); stroke-width: 1.3; stroke-dasharray: 5 4; pointer-events: none; }
#rSvg .r-gref { fill: none; stroke: var(--guide); stroke-width: 1.6; pointer-events: none; }
#rSvg .r-hit { fill: none; stroke: var(--guide); stroke-width: 2; pointer-events: none; }
#rSvg.panning { cursor: grabbing; }
/* háttérrajz (betöltött DXF, PDF, kép): vászon az alaprajz alatt, eszközök, jobb oldali csoport */
.r-canvas canvas.r-ulcv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#rSvg.r-tooling { cursor: crosshair; }
#rSvg .r-hit.ul { stroke: var(--ul-tool); }
#rSvg .r-ulrub { stroke: var(--ul-tool); stroke-width: 2; stroke-dasharray: 7 4; pointer-events: none; }
#rSvg .r-ulpt { fill: var(--ul-tool); stroke: var(--field); stroke-width: 1.5; pointer-events: none; }
.r-ulbtn { display: inline-flex; align-items: center; gap: 6px; }
.r-ul { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px 6px; margin: 2px 0 12px; background: var(--subtle); }
.r-ulh { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.r-ulname { font-weight: 600; font-size: 12.5px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-ulinfo { margin: 1px 0 6px; }
.r-ulbtns { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.r-ul .btn { display: inline-flex; align-items: center; gap: 5px; }
.r-ul .btn.primary .sec-ico { stroke: #fff; }
.r-ul .r-uldet { width: 100%; justify-content: center; margin: 6px 0 4px; padding: 5px 8px; }
.r-ul .r-uldet.on { background: var(--accent-hi); color: #fff; }
.r-ulrow { gap: 6px !important; }
.r-side .r-ulrow input[type="number"], .r-side .r-ulrow input[data-num] { width: 64px !important; }
.r-side .r-ulrow input[type="range"] { width: 118px !important; }
.r-side .r-ulrow select { width: 118px !important; }
.r-ulrow .ib { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.r-ullay summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin: 6px 0 4px; }
.r-ullist { max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; background: var(--field); }
.r-ulli { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 0; cursor: pointer; }
.r-ulli span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-ulli small { color: var(--muted); }
#rEdit { position: absolute; }
/* alaprajz: nagyítás (görgő is), a rácsköz */
.r-zoom { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: flex; align-items: center; gap: 2px; }
.r-zoom .r-gstep { font-size: 11px; color: var(--ink-2); margin-right: 6px; text-shadow: 0 0 3px var(--canvas); pointer-events: none; }

/* kisebb ablak / nagyobb Windows-nagyítás: tömörebb felső sáv és keskenyebb oldalpanelek */
@media (max-width: 1600px) {
  .proj-name { width: 150px; }
  .tb-row { gap: 8px; }
  .tb-group { padding-left: 8px; }
}
@media (max-width: 1400px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr) 310px; }
  .layout.designer { grid-template-columns: 230px minmax(0, 1fr) 330px; }
  .layout.modeler { grid-template-columns: 220px minmax(0, 1fr) 300px; }
  .brand-name, .brand-sub { display: none; }
  .mode-seg button { padding: 6px 8px; }
  .proj-name { width: 120px; }
  .tb-row { gap: 6px; }
  .tb-group { padding-left: 6px; }
}
/* a második sor kapcsológombjai csak ikonnal (a felirat a buborékban) – az ikonok mellett 1500 px alatt már nem fér */
@media (max-width: 1500px) {
  .tgl-btn .lbl, .vs-dd .lbl { display: none; }
  .tgl-btn .ui-ico, .tgl-btn .tape-ico { margin-right: 0; }
}
@media (max-width: 1150px) {
  .layout { grid-template-columns: 210px minmax(0, 1fr) 280px; }
  .layout.designer { grid-template-columns: 200px minmax(0, 1fr) 310px; }
  .layout.modeler { grid-template-columns: 200px minmax(0, 1fr) 280px; }
  .fld-row input, .fld-row select { width: 120px !important; }
  .fld-row.ro b { width: 120px; }
  .m-work { grid-template-columns: 1fr; grid-template-rows: 1.4fr 1fr; }
  .m-sketch { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- dekorválasztó (EGGER + alap színek) */
.dp-fld { margin-bottom: 8px; }
.dp-fld > span { font-size: 12px; color: var(--ink); }
.dp-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 4px 8px 4px 4px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--field); cursor: pointer; text-align: left;
}
.dp-btn:hover { border-color: var(--line-2); background: var(--btn-hover); }
.dp-btn:focus-visible { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.dp-sw { flex: none; width: 34px; height: 24px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); background-size: cover; background-position: center; }
.dp-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.dp-txt b { font-weight: 650; }
.dp-txt small { color: var(--muted); }
.dp-btn.inh .dp-name { color: var(--ink-2); font-style: italic; }
.dp-caret { color: var(--muted); font-size: 11px; }
.zone-b .dp-fld { width: 100% !important; }
.dp-pop { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 45; }
.dp-pop[hidden] { display: none; }
.dp-box {
  width: min(860px, 94vw); height: min(640px, 88vh); background: var(--pop); border-radius: 12px; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.dp-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px 8px; }
.dp-title { white-space: nowrap; }
.dp-search { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; }
.dp-search:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.dp-h { border-bottom: 1px solid var(--line); padding-bottom: 10px !important; }
.dp-main-row { flex: 1; min-height: 0; display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.dp-side { border-right: 1px solid var(--line); padding: 8px; background: var(--subtle-2); display: flex; flex-direction: column; gap: 2px; }
.dp-mk-h { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 7px 9px; border: 1px solid transparent; border-radius: 7px; background: none; cursor: pointer; text-align: left; }
.dp-mk-h:hover { background: var(--hover-2); }
.dp-mk-h b { font-size: 13px; letter-spacing: .3px; }
.dp-mk-h small { font-size: 11px; color: var(--muted); }
.dp-mk-h.on { background: var(--accent-bg); border-color: var(--accent); }
.dp-mk-h.on b { color: var(--accent-hi); }
.dp-cats { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 10px; padding-left: 8px; border-left: 2px solid var(--accent-bg); }
.dp-cats button { display: flex; justify-content: space-between; gap: 8px; border: 0; background: none; padding: 5px 8px; border-radius: 5px; cursor: pointer; font-size: 12px; text-align: left; }
.dp-cats button small { color: var(--muted); }
.dp-cats button:hover { background: var(--hover-2); }
.dp-cats button.on { background: var(--field); color: var(--accent-hi); font-weight: 600; box-shadow: 0 0 0 1px var(--accent) inset; }
.dp-side-note { margin: auto 4px 2px; font-size: 10.5px; color: var(--muted); }
.dp-body { padding: 4px 14px 14px; }
.dp-tile em { font-style: normal; font-size: 10px; color: var(--muted); padding: 0 2px; text-transform: uppercase; letter-spacing: .4px; }
.dp-mk { color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.dp-apply { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--subtle-2); }
.dp-apply[hidden] { display: none; }
.dp-pick { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; font-size: 12px; }
.dp-pick > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-who { font-size: 11px; white-space: nowrap; }
.vw-legend {
  position: absolute; right: 10px; bottom: 10px; z-index: 3; pointer-events: auto; max-width: 55%; padding: 3px 9px; border-radius: 5px;
  background: var(--glass); color: var(--ink-2); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.vw-legend[hidden] { display: none; }
body[data-mode="modeler"] .no-modeler { display: none; }
.dp-sub { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin: 10px 0 6px; }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.dp-tile {
  display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 4px 4px 6px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--field); cursor: pointer; text-align: left; min-width: 0;
}
.dp-tile:hover { border-color: var(--line-2); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.dp-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.dp-img { display: block; height: 62px; border-radius: 5px; overflow: hidden; margin-bottom: 4px; border: 1px solid rgba(0,0,0,.08); }
.dp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dp-tile b { font-size: 12px; font-weight: 650; padding: 0 2px; }
.dp-tile small { font-size: 11px; color: var(--ink-2); padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 14px; }
.dp-inh {
  display: block; width: 100%; margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: 8px; background: var(--subtle-2);
  cursor: pointer; text-align: left; font-weight: 600; color: var(--ink-2);
}
.dp-inh.on { border-style: solid; border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.dp-foot { padding: 7px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.dp-sw.pt { background: var(--subtle); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dp-sw.pt svg, .dp-img.pt svg { height: 100%; width: auto; display: block; }
.dp-img.pt { background: var(--subtle); display: flex; align-items: center; justify-content: center; padding: 3px 0; }
/* ---------- munkalap (Helyiségtervező) */
svg.wt-thumb { width: 100%; height: 150px; display: block; }
svg.wt-thumb * { vector-effect: non-scaling-stroke; }
.wt-pc { fill: var(--wt-fill); stroke: var(--th-ln); stroke-width: 1.2; }
.wt-cut { fill: var(--panel); stroke: var(--th-ln); stroke-width: 1; }
.wt-jt { stroke: #1d4ed8; stroke-width: 2.5; }
.wt-cn { fill: #1d4ed8; }
.wt-wall { stroke: #2563eb; stroke-width: 2; stroke-dasharray: 4 3; }
.wt-lb { font-weight: 700; font-family: system-ui, sans-serif; fill: var(--ink); }
.wt-sub { margin: 0 14px 6px; text-align: center; }
.wt-cabrow { display: flex; align-items: center; gap: 8px; margin: 6px 14px; }
.wt-cabrow .btn.wide { width: 100%; }
/* összevont lábazat a szekrény paneljén */
.pl-join { margin-top: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.pl-join p { margin: 4px 0; }
.wt-leg + .wt-leg, .wt-j + .wt-j { border-top: 1px dashed var(--line); margin-top: 6px; }
.wt-thr { margin: 2px 0 4px; }
/* (hátsó kiállásnál a „Hátul” nem választható: kiáll, élzárt) */
.wt-ro { display: block; padding: 6px 0; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.seg.sm button { padding: 3px 8px; font-size: 12px; }
.wt-split { gap: 4px; }
.wt-split input.zh { width: 80px; }
.wt-cut { margin: 6px 0; }
.wt-cut .zone-h .spacer { flex: 1; }
.wt-cut .zone-h select { flex: none; width: auto; }
.wt-add { margin-top: 6px; }
.ok-t { color: var(--accent); margin: 2px 0 6px; }
.warn-t { color: var(--warn-ink); margin: 2px 0 6px; }
.wt-bar { display: flex; height: 20px; margin: 4px 0; border: 1px solid #9ca3af; border-radius: 3px; overflow: hidden; font-size: 11px; }
.wt-bar span { background: var(--field); border-right: 1px solid #9ca3af; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.wt-bar i { background: repeating-linear-gradient(45deg, var(--hatch-a) 0 4px, var(--hatch-b) 4px 6px); color: var(--muted); font-style: normal; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.wt-h { margin: 18px 0 6px; }

/* ---------- Műhely (szabásterv, törzsek, árajánlat – a PC Műhely motorjával) */
body:not([data-mode="workshop"]) #workshop { display: none !important; }
body[data-mode="workshop"] #planner, body[data-mode="workshop"] #designer, body[data-mode="workshop"] #modeler,
/* (only-plan-ws: a Helyiségtervezőben és a Műhelyben – pl. a Kimenet gomb) */
body[data-mode="designer"] .only-plan-ws, body[data-mode="modeler"] .only-plan-ws, body[data-mode="sliding"] .only-plan-ws { display: none !important; }
body[data-mode="workshop"] .only-planner, body[data-mode="workshop"] .only-designer, body[data-mode="workshop"] .only-modeler,
body[data-mode="workshop"] .no-workshop { display: none !important; }
.layout.workshop { grid-template-columns: 230px minmax(0, 1fr); }
/* Műhely menü: csempék egymás alatt (mint a Modellező és a Tolóajtó bal sávja): ikon + név, a leírás a buborékban */
.w-tiles { display: flex; flex-direction: column; gap: 5px; padding: 2px 10px 4px; }
.w-tiles-gap { height: 8px; }
.w-tile {
  display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 40px; padding: 6px 10px 6px 9px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--field);
  color: var(--ink); cursor: pointer; text-align: left;
}
.w-tile > .ui-ico { width: 22px; height: 22px; margin: 0; stroke-width: 1.75; color: var(--muted); }
.w-tile > b { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.2; }
.w-tile:hover { border-color: var(--accent); background: var(--accent-bg); }
.w-tile:hover > .ui-ico { color: var(--ink); }
.w-tile.on { border-color: var(--accent); background: var(--accent-bg); box-shadow: inset 3px 0 0 var(--accent); }
.w-tile.on b, .w-tile.on > .ui-ico { color: var(--accent); }
.w-tile.w-tile-out { border-style: dashed; border-color: var(--accent-line-soft); }
.w-tile.w-tile-out b, .w-tile.w-tile-out > .ui-ico { color: var(--accent-ink); }
.w-nav-note { margin: 14px 16px; font-size: 11px; line-height: 1.45; }
.w-main { background: var(--bg); padding: 0 22px 30px; }
.w-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; background: var(--bg); }
.w-head h2 { margin: 0; font-size: 18px; }
.w-busy { color: var(--accent); font-size: 12px; }
.w-body.busy { opacity: .55; transition: opacity .2s; }
.w-set {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 14px; padding: 10px 14px 4px; margin-bottom: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.w-set .fld { width: 130px; }
.w-set .w-ded { margin-bottom: 12px; }
.w-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.w-stats div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px; display: flex; flex-direction: column; min-width: 0; }
.w-stats b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-stats span { font-size: 11px; color: var(--muted); }
.w-stats div:last-child { border-color: var(--accent); background: var(--accent-bg); }
.w-stats div:last-child b { color: var(--accent); }
.w-main .warn { margin: 0 0 12px; }
.w-grp { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.w-grp-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.w-grp-h > b:first-child { font-size: 14px; }
.w-grp-h .chk { margin: 0; font-size: 12px; color: var(--ink-2); }
.w-cost { font-size: 14px; }
.w-rec { margin: 6px 0 2px; color: var(--ink-2); display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.w-meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.w-bad { color: var(--warn-ink); font-weight: 600; }
.w-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.w-sheet { margin: 0; border: 1px solid var(--line); border-radius: 6px; padding: 6px; background: #fff; }
.w-sheet:hover { border-color: var(--accent-line); }
.w-sheet svg { display: block; width: 100%; height: auto; }
.w-sheet figcaption { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
/* szabásterv: kézi szerkesztés – kattintható alkatrészek, kijelölés, húzás, lépések sávja */
.w-sheet.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.w-sheet.locked { background: #f8fbf7; border-color: #b9d3b3; }
.w-lock { margin-right: 4px; }
.w-hit rect { fill: transparent; pointer-events: all; cursor: grab; }
.w-hit rect:hover { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
.w-hit rect.sel { fill: color-mix(in srgb, var(--accent) 24%, transparent); stroke: var(--accent); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.locked .w-hit rect { cursor: pointer; }
.locked .w-hit rect:hover { fill: rgba(0, 0, 0, .04); }
[data-wt] { outline: 3px solid var(--accent); outline-offset: 1px; }
[data-wt="swap"] { outline-color: #c2410c; }
[data-wt="bad"] { outline-color: var(--danger); }
body.w-dragging, body.w-dragging * { cursor: grabbing !important; user-select: none; }
.w-ghost { position: fixed; z-index: 90; pointer-events: none; border: 2px dashed var(--muted); background: rgba(255, 255, 255, .35); }
.w-ghost.move { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.w-ghost.swap { border-color: #c2410c; background: rgba(194, 65, 12, .14); }
.w-ghost.bad { border-color: var(--danger); background: rgba(185, 28, 28, .08); }
.w-ghost span { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 4px; background: var(--pop); color: var(--ink-2); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.w-ghost span:empty { display: none; }
.w-ghost.move span { color: var(--accent); }
.w-ghost.swap span { color: #c2410c; }
.w-ghost.bad span { color: var(--danger); }
/* szabad maradéklap (ráhúzható) és az „Új tábla” mező – ez csak húzás közben látszik */
.w-drop { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-height: 96px; padding: 10px 28px; border: 2px dashed var(--accent-line); border-radius: 6px; background: var(--accent-bg); color: var(--accent); text-align: center; }
.w-drop span { color: var(--ink-2); font-size: 12px; }
.w-drop small { color: var(--muted); font-size: 11px; }
.w-drop.new { display: none; border-color: var(--line-2); background: var(--subtle-2); color: var(--ink-2); }
.w-sheets.drag .w-drop.new { display: flex; }
.w-drop-x { position: absolute; top: 4px; right: 4px; padding: 1px 6px; font-size: 13px; }
.w-edbar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; min-height: 44px; margin: 14px -22px -30px; padding: 7px 22px; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0, 0, 0, .06); font-size: 12.5px; }
.w-zbar { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; width: 100%; font-size: 12.5px; min-height: 30px; }
.w-ed-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.w-edbar .dd-menu, .w-zbar .dd-menu { top: auto; bottom: calc(100% + 4px); max-height: 50vh; overflow-y: auto; }
.w-man-b { color: var(--accent); font-weight: 600; }
.w-blk-b { color: var(--blk-ink); font-weight: 600; }
.w-rem-dd .dd-menu { min-width: 290px; }
.w-zoom-s { height: 100%; display: flex; justify-content: center; }
.w-own-l { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.w-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 3px 2px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--subtle-2); }
.w-chip .btn.icon { padding: 1px 6px; font-size: 13px; border: 0; background: none; }
body:has(.w-edbar) .toast { bottom: 104px; }
.w-h3 { margin: 18px 0 0; font-size: 14px; }
.w-main .tbl { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.w-main .tbl td .btn.sm { margin-left: 6px; }
.w-costs { max-width: 760px; }
.w-costs tr.w-total td { background: var(--accent-bg); font-size: 14px; }
/* felugró ablak (választó, megerősítés, nagyítás) */
.w-pick { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 60; }
.w-pick-box { width: min(760px, 94vw); max-height: 86vh; background: var(--pop); border-radius: 12px; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.w-pick.wide .w-pick-box { width: min(1020px, 94vw); height: min(720px, 86vh); }
.w-pick.small .w-pick-box { width: min(560px, 94vw); }
.w-pick-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.w-pick-body { padding: 0 14px 10px; flex: 1; min-height: 0; }
.w-pick-body .pad { padding: 14px 0 4px; }
.w-pick-body ul { margin: 6px 0; padding-left: 20px; }
.w-pick-q { display: block; width: 100%; margin: 12px 0 4px; }
.w-pick-sub { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 8px; }
.w-pick-row { cursor: pointer; }
.w-pick-row:hover td { background: var(--accent-bg); }
.w-pick-row.on td { background: var(--accent-bg); font-weight: 600; }
.w-pick-row.off td { color: var(--muted); }
.w-pick-f { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.w-pick-f .chk { margin: 0 8px 0 0; }
.w-zoom .w-pick-box { width: 96vw; height: 92vh; max-height: none; }
/* Új projekt ablak */
.np-box .w-pick-box { width: min(680px, 94vw); }
.np { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.np .fld > span { font-weight: 600; }
.np-name { font-size: 15px; padding: 6px 8px; }
.np-cust { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--subtle-2); }
.np-cur b { word-break: break-all; }
.np-sec { display: flex; flex-direction: column; }
.np-h { font-size: 12.5px; margin-bottom: 4px; }
.np-opt { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; cursor: pointer; }
.np-opt input { width: auto; flex: none; margin: 0; }
.np-opt span { flex: 1; }
.np-opt.off { opacity: .5; cursor: default; }
.np-row { display: flex; align-items: center; gap: 6px; margin: 0 0 4px 24px; }
.np-row input { flex: 1; min-width: 0; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; }
.np-row.dim { opacity: .55; }
.np-prev { padding: 8px 10px; background: var(--subtle); border-radius: 7px; line-height: 1.45; }
.warn-ink { color: var(--warn-ink, #b45309); }
.order-dd .dd-menu { min-width: 300px; }
.w-zoom .w-pick-body { display: flex; }
.w-zoom-b { flex: 1; min-height: 0; padding: 12px 0; display: flex; align-items: center; justify-content: center; }
.w-zoom-b svg { max-width: 100% !important; max-height: 100%; width: auto !important; height: 100%; }
.pad0 { margin: 10px 0 0; }
.nowrap { white-space: nowrap; }
/* szabásterv: maradékraktár */
.w-note { background: var(--panel); border: 1px dashed var(--accent-line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.w-rem { color: var(--accent); font-weight: 600; }
/* árajánlat */
.w-qstats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.w-qstats small { font-size: 11px; font-weight: 400; color: var(--muted); }
.w-in { width: 110px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); text-align: right; }
.w-in.sm { width: 64px; }
.w-in.wide { width: min(260px, 100%); text-align: left; }
.w-in:focus, .w-form textarea:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.w-q td { vertical-align: middle; }
.w-q tr.w-sub td { background: var(--subtle-2); font-size: 12px; }
.w-q tr.w-sub td:first-child { padding-left: 22px; }
.w-q tr.w-off td { color: var(--muted); }
.w-q .chk { margin: 0 6px 0 0; }
.btn.ghost-i { border: 0; background: none; color: var(--accent); padding: 0 4px; font-size: 11px; }
.w-sum tr.w-total td { background: var(--accent-bg); font-size: 14px; }
.w-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.w-cols .w-grp { margin-bottom: 0; }
.w-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 8px; }
.w-form .fld input, .w-form .fld select, .w-form textarea { width: 100%; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); font: inherit; }
.w-form .fld .w-in { width: 100%; text-align: left; }
.w-form textarea { resize: vertical; }
.w-form .chk { margin: 6px 0 8px; }
.w-wide { grid-column: 1 / -1; }
.w-mini { margin-top: 8px; }
.w-cust { margin-top: 6px; }
.w-h3 .btn { margin-left: 8px; vertical-align: middle; }
.w-h3 .w-order-dd { display: inline-block; vertical-align: middle; font-weight: 400; }
.w-h3 .w-order-dd .dd-menu { font-size: 13px; }
.w-h3 .w-in { vertical-align: middle; }
/* törzsek */
.w-reg { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.w-reg-list .tbl { margin-top: 0; }
.w-reg-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.w-reg-bar .search { margin: 0; flex: 1; min-width: 200px; }
.w-reg-bar select { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
.w-reg-form { position: sticky; top: 64px; }
.w-reg-act { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.w-sub-h { font-weight: 650; margin: 14px 0 4px; }
@media (max-width: 1250px) { .w-reg { grid-template-columns: minmax(0, 1fr); } .w-reg-form { position: static; } .w-cols { grid-template-columns: 1fr; } }@media (max-width: 1400px) { .w-stats, .w-qstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* szekrényszámok a Helyiségtervező 3D nézetében */
.cab-num { background: var(--field); color: var(--ink); border: 1.5px solid var(--accent); font: 700 11px system-ui, sans-serif; padding: 1px 6px; border-radius: 9px; box-shadow: 0 1px 3px rgba(0,0,0,.2); pointer-events: none; }
.num-badge { font: 700 11px system-ui, sans-serif; color: #fff; background: var(--accent); border-radius: 9px; padding: 1px 7px; white-space: nowrap; }
.link-note { margin: 2px 0 8px; }
/* Műhely › Beállítások */
.w-slist { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.w-srow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 3px 0; }
.w-srow > span:first-child { flex: 1 1 210px; min-width: 150px; color: var(--ink-2); }
.w-srow .w-in { width: 110px; }
.w-srow .w-in.wide { width: auto; flex: 1 1 260px; text-align: left; }
.w-srow select { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
.w-srow small { min-width: 54px; }
.w-grp .fld textarea { width: 100%; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; font: inherit; resize: vertical; }
.w-parts { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.w-parts .chk { align-items: flex-start; margin: 2px 0; }
.w-edges { max-width: 520px; }
.w-edges .w-in { width: 90px; }
.w-first { border-style: solid; border-color: var(--accent); background: var(--accent-bg); }
/* Műhely › szabásjegyzék */
.w-list td { vertical-align: middle; }
.w-list tr.w-mod td { background: var(--mod-bg); }
.w-list tr.w-off td { color: var(--muted); }
.w-list tr.w-off td:nth-child(3) { text-decoration: line-through; }
.w-stale { color: var(--warn-ink); cursor: help; }
.w-orphans { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: 6px; padding: 6px 10px; margin: 6px 0; }
.w-orphans .btn { margin-left: 6px; }
.w-list td .btn.sm { padding: 1px 7px; margin-left: 2px; }
/* CNC-maró (wscnc.js) */
.cnc-sheet.done { border-color: var(--accent); background: var(--accent-bg); }
.cnc-sheet.done svg { opacity: .55; }
.cnc-sv { cursor: zoom-in; }
.cnc-sb { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.cnc-sb .chk { margin: 0 0 0 auto; font-size: 12px; }
.cnc-pv { margin: 4px 0 8px; }
.w-pick.wide.cnc-big .w-pick-box { width: 96vw; height: 92vh; max-height: none; }
/* Kimenet-központ (outputhub.js): három oszlop – Ügyfélnek, Műhelynek, Beszállítóknak */
.w-pick.oh .w-pick-box { width: min(1180px, 96vw); height: auto; max-height: 90vh; }
.w-pick.oh .w-pick-body { padding-top: 12px; }
.oh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.oh-col { border: 1px solid var(--line); border-radius: 10px; background: var(--field); overflow: hidden; }
.oh-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--subtle); border-bottom: 1px solid var(--line); }
.oh-h svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.oh-h b { font-size: 14px; }
.oh-h small { color: var(--muted); margin-left: auto; font-size: 11px; text-align: right; }
.oh-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line-soft); }
.oh-item:first-of-type { border-top: 0; }
.oh-item:hover { background: var(--hover); }
.oh-item.off { opacity: .5; }
.oh-ico svg { width: 22px; height: 22px; color: var(--accent); display: block; }
.oh-txt { flex: 1; min-width: 0; }
.oh-txt b { display: block; font-size: 13px; font-weight: 600; }
.oh-txt small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.oh-acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 46%; }
.oh-note { margin: 0; padding: 8px 12px 10px; border-top: 1px solid var(--line-soft); }
.oh-folder { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 12px; border: 1px solid var(--accent-line-soft); background: var(--accent-bg); border-radius: 10px; }
.oh-folder.off { border-color: var(--warn-line); background: var(--warn-bg); }
.oh-folder svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.oh-folder.off svg { color: var(--warn-ink); }
.oh-folder b { display: block; font-size: 13px; }
.oh-folder small { display: block; color: var(--muted); font-size: 11px; word-break: break-all; }
.w-pick.oh .warn { margin-bottom: 10px; }
.cnc-zoom svg { width: 100%; height: auto; }
.cnc-tools .w-in { width: 72px; }
.cnc-tools .w-in.sm { width: 46px; }
.cnc-tools .w-in.wide { width: 210px; text-align: left; }
.cnc-tools td.c { text-align: center; }
.cnc-tools select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
.w-h3 .muted.small { font-weight: 400; margin-left: 6px; }
/* bejelentkezés és fiókok (account.js) */
.login-ov { background: var(--bg); z-index: 90; }
.login-box { width: min(440px, 94vw); padding: 0; }
.login-brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 6px; }
.login-brand img { width: 44px; height: 44px; }
.login-brand b { display: block; font-size: 17px; }
.login-box > .w-form { padding: 4px 18px 6px; }
.login-box .warn { margin: 4px 18px 10px; }
.login-srv { font-size: 12px; margin: 6px 0 2px; }
.login-srv summary { cursor: pointer; color: var(--ink-2); }
.login-srv .w-form { margin-top: 4px; }
.user-dd > summary { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.user-dd.other > summary { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.user-other { font-weight: 600; }
.user-menu { min-width: 300px; }
.user-head { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sub-ok { color: var(--accent); }
.sub-soon { color: var(--warn-ink); }
.sub-bad { color: var(--danger); font-weight: 600; }
.acc-form { grid-template-columns: 1fr 1fr; }
.acc-sec { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.acc-form .fld input.ro, .acc-form .fld select:disabled { background: var(--disabled); color: var(--ink-2); }
.acc-form .fld > b { padding: 5px 0; font-weight: 500; }
.acc-users { padding-top: 10px; }
.acc-users .btn { padding: 2px 8px; font-size: 12px; }
.badge.off { color: var(--danger); background: var(--danger-bg); }
.acc-up { margin: 3px 0; }
.db-banner { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: min(720px, 92vw); z-index: 95;
  background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: 8px; padding: 9px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: pointer; font-size: 13px; }
.db-banner[hidden] { display: none; }

/* frissítés (update.js) */
.upd-notes { white-space: pre-wrap; max-height: 40vh; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; font-size: 13px; }
.upd-prog { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.upd-prog[hidden] { display: none; }
.upd-bar { height: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.upd-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* Látványkép (renderui.js): panel a 3D nézet bal felső sarkában, a kép kerete a nézetben */
.rnd-panel { position: absolute; left: 10px; top: 10px; z-index: 6; width: 300px; max-height: calc(100% - 20px); overflow-y: auto;
  background: var(--pop); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.rnd-h { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.rnd-h .grow { flex: 1; }
.rnd-ico { width: 17px; height: 17px; flex: none; vertical-align: -3px; }
.rnd-prev { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--subtle); border: 1px solid var(--line); cursor: zoom-in; }
.rnd-prev canvas { display: block; width: 100%; height: 100%; }
.rnd-ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px 14px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.4; }
.rnd-ph[hidden] { display: none; }
.rnd-prog { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2); }
.rnd-prog[hidden] { display: none; }
.rnd-prog .rnd-track { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rnd-prog i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width .15s; }
/* előkészítés: mozgó csík (transform – a lépések alatt is mozog) */
.rnd-prog.busy i { width: 30% !important; transition: none; animation: rnd-busy 1.2s ease-in-out infinite; }
@keyframes rnd-busy { from { transform: translateX(-110%); } to { transform: translateX(340%); } }
.rnd-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
.rnd-l { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); white-space: nowrap; }
.rnd-row .seg button { padding: 4px 10px; color: var(--ink); }
.rnd-row .seg button.on { color: #fff; }
.rnd-row select { max-width: 150px; }
.rnd-row input[type=range] { width: 140px; accent-color: var(--accent); }
.rnd-wide { display: flex; align-items: center; justify-content: center; gap: 7px; }
.rnd-more { border-top: 1px solid var(--line); padding-top: 6px; }
.rnd-more > summary { cursor: pointer; display: flex; align-items: center; gap: 7px; color: var(--ink-2); padding: 3px 0; list-style: none; }
.rnd-more > summary::-webkit-details-marker { display: none; }
.rnd-more > summary::after { content: '▸'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.rnd-more[open] > summary::after { transform: rotate(90deg); }
.rnd-sw { display: flex; gap: 5px; }
.rnd-sw button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); cursor: pointer; padding: 0; }
.rnd-sw button.on { box-shadow: 0 0 0 2px var(--pop), 0 0 0 4px var(--accent); }
.rnd-f { display: flex; gap: 8px; }
.rnd-f .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; }
.rnd-frame { position: absolute; z-index: 2; pointer-events: none; outline: 1.5px dashed rgba(255, 255, 255, .95); outline-offset: -1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 0 0 200vmax rgba(10, 14, 20, .32); }
.rnd-big { display: block; max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; border-radius: 4px; }
/* AI-fotósítás (próba) a Látványkép panelen */
.rnd-note { margin: 4px 0 2px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.rnd-key { display: inline-flex; align-items: center; gap: 6px; }
.rnd-key small { color: var(--ink-2); text-align: right; }
.rnd-chk { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); margin: 4px 0; }
.rnd-ai .rnd-wide { width: 100%; margin-top: 4px; }
.rnd-ai .rnd-wide small { margin-left: auto; color: var(--muted); }
.rnd-aimsg { margin-top: 6px; font-size: 11.5px; line-height: 1.4; color: var(--ink-2); }
.rnd-aimsg[hidden] { display: none; }
.rnd-aimsg.warn { color: var(--warn-ink); }

/* Előfizetési csomagok (plan.js): a zárolt funkció lakattal és a csomag nevével látszik, kattintásra a magyarázat */
.plan-badge { display: inline-flex; align-items: center; gap: 2px; margin-left: 5px; padding: 0 5px; border-radius: 9px; font-size: 10.5px;
  font-weight: 600; line-height: 16px; vertical-align: middle; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn-line);
  cursor: pointer; white-space: nowrap; }
.plan-badge:hover { border-color: var(--warn-ink); }
.plan-lock-ico { width: 11px; height: 11px; flex: none; vertical-align: -1px; }
.plan-lock-btn { color: var(--warn-ink); border-color: var(--warn-line); background: var(--warn-bg); gap: 4px; }
.plan-lock-btn:hover { border-color: var(--warn-ink); background: var(--warn-bg); }
.plan-lock-btn .plan-lock-ico { width: 12px; height: 12px; }
.oh-item.plan-locked .oh-ico, .oh-item.plan-locked .oh-txt { opacity: .6; }
.w-grp.plan-locked > :not(.w-grp-h) { opacity: .55; }
.cat-grid.plan-locked .cat-item { opacity: .5; cursor: pointer; }
.dp-mk-h.plan-locked { opacity: .75; }
/* a zárolt nézet / szakasz helyén (Műhely, Szabásjegyzék fül, anyagválasztó) */
.plan-gate { display: grid; place-items: center; padding: 28px 16px; }
.plan-gate-box { max-width: 520px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.plan-gate-box h3 { margin: 6px 0 8px; font-size: 16px; }
.plan-gate-box p { margin: 6px 0; line-height: 1.45; }
.plan-gate-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--warn-ink); background: var(--warn-bg); }
.plan-gate-ico svg { width: 22px; height: 22px; }
.plan-gate-f { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.plan-adds { text-align: left; margin: 10px 0 0; font-size: 12.5px; }
.plan-adds ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); }
.plan-locked > p .plan-lock-ico, .plan-locked p > .plan-lock-ico { width: 14px; height: 14px; color: var(--warn-ink); }
/* a Csomagok ablak táblázata */
.plan-tbl th.c, .plan-tbl td.c { text-align: center; width: 92px; }
.plan-tbl th.c small { display: block; font-weight: 400; font-size: 10.5px; color: var(--accent); }
.plan-tbl .on { background: var(--accent-bg); }
.plan-tbl tr.plan-g th { text-align: left; background: var(--subtle); font-size: 12px; padding-top: 8px; }
.plan-yes { color: var(--accent); font-weight: 700; }
.plan-no { color: var(--muted); }
.acc-plan { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 3px 0; }