/* DB Board Studio — technical white, installer blue, warning orange */
:root {
  --blue: #1F5FBF; --blue-d: #184C99; --blue-50: #EEF3FB; --blue-100: #DCE7F8;
  --orange: #F28C28; --orange-50: #FEF3E7; --orange-ink: #9A4F07;
  --ink: #14181F; --grey: #5B6573; --grey-2: #4B5563; --line: #DCE2EA; --bg: #F5F7FA; --panel: #FFFFFF;
  --danger: #D93025; --ok: #2E7D32;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --sh: 0 1px 2px rgba(20,24,31,.06), 0 6px 20px rgba(20,24,31,.07);
  --top: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
body.in-editor { height: 100vh; height: 100dvh; overflow: hidden; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { max-width: none; }
:focus-visible { outline: 3px solid rgba(31,95,191,.38); outline-offset: 2px; }
.muted { color: var(--grey); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.pad { padding: 16px; }
.mono { font-family: var(--mono); font-size: 13px; }

/* ---------- top ---------- */
.top { position: sticky; top: 0; z-index: 30; flex: none; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 4px 6px 4px 2px; border-radius: 9px; flex: none; }
.brand:hover { background: var(--bg); }
.brand-t { font-weight: 600; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.brand-t b { color: var(--blue); font-weight: 800; }
.proj { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.proj input { flex: 1; min-width: 0; max-width: 420px; border: 1px solid transparent; border-radius: 8px; padding: 7px 10px; font-weight: 700; font-size: 15px; background: transparent; }
.proj input:hover { border-color: var(--line); }
.proj input:focus { outline: none; border-color: var(--blue); background: #fff; }
.saved { font-size: 12px; color: var(--ok); white-space: nowrap; font-weight: 600; }
.saved.busy { color: var(--grey); }
.top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.icon-btn { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 6px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: 20px; line-height: 1; }
.icon-btn:hover { background: var(--bg); }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 15px; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #B3BDCA; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); border-color: var(--blue-d); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.big { width: 100%; padding: 14px; font-size: 16px; border-radius: 12px; margin-top: 14px; }
.btn.danger { color: var(--danger); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn b { font-size: 17px; line-height: 1; }

/* ---------- start ---------- */
.start { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 20px 40px; flex: 1; }
.hero { padding: 18px 0 8px; }
.kicker { font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--orange); margin: 0 0 12px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.06; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 800; }
.hero h1 span { color: var(--blue); }
.lead { font-size: 17px; color: var(--grey-2); max-width: 640px; margin: 0 0 20px; }
.steps3 { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.steps3 li { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px 9px 9px; font-size: 14px; }
.steps3 b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--blue); color: #fff; font: 800 14px var(--mono); }
.steps3 li:last-child b { background: var(--orange); }
.block { margin-top: 34px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.block h2 { font-size: 21px; margin: 0; letter-spacing: -.01em; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 30px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--grey-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.tpl-card { display: flex; flex-direction: column; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tpl-card:hover { border-color: var(--blue); box-shadow: var(--sh); transform: translateY(-2px); }
.tpl-img { display: grid; place-items: center; aspect-ratio: 4 / 3; background: linear-gradient(180deg, #F1F4F8, #E6EBF1); padding: 12px; }
.tpl-img img { max-width: 100%; max-height: 100%; display: block; filter: drop-shadow(0 4px 10px rgba(20,24,31,.12)); }
.tpl-meta { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 15px; }
.tpl-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tpl-tags i { font: 700 10.5px/1 var(--mono); font-style: normal; padding: 4px 7px; border-radius: 6px; background: var(--blue-50); color: var(--blue); }
.tpl-tags i.reg { background: var(--orange-50); color: var(--orange-ink); }
.tpl-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.tpl-desc { font-size: 12.5px; color: var(--grey); line-height: 1.4; }
.tpl-card.empty { align-items: center; justify-content: center; text-align: center; border-style: dashed; border-width: 2px; padding: 24px 18px; min-height: 260px; gap: 8px; background: transparent; }
.tpl-plus { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--blue); color: #fff; font-size: 32px; font-weight: 400; }
.proj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.proj-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px; display: flex; flex-direction: column; }
.proj-open { display: flex; flex-direction: column; gap: 3px; text-align: left; border: 0; background: none; padding: 12px; border-radius: 10px; font-size: 13px; }
.proj-open b { font-size: 15.5px; }
.proj-open:hover { background: var(--blue-50); }
.proj-act { display: flex; gap: 6px; padding: 4px 12px 10px; flex-wrap: wrap; }

/* ---------- editor ---------- */
.editor { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tabs { flex: none; display: flex; gap: 2px; padding: 0 8px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 12px 14px 10px; font-weight: 600; font-size: 14px; color: var(--grey); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.pane { flex: 1; min-height: 0; }
.pane-board { display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; }

.lib { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.lib-head { padding: 12px 12px 10px; border-bottom: 1px solid var(--line); flex: none; }
.lib-title { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.lib-title span { font: 600 11.5px var(--mono); color: var(--grey); }
.lib-close { display: none; margin-left: auto; }
.lib-head input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 14px; }
.lib-head input:focus { outline: none; border-color: var(--blue); background: #fff; }
.lib-list { overflow: auto; flex: 1; min-height: 0; padding: 6px 8px 24px; overscroll-behavior: contain; }
.lib-sum { font-size: 12px; color: var(--grey); margin: 6px 8px; }
.lib-cat summary { list-style: none; cursor: pointer; padding: 10px 8px; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; border-radius: 8px; }
.lib-cat summary::-webkit-details-marker { display: none; }
.lib-cat summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--grey); border-bottom: 2px solid var(--grey); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.lib-cat[open] summary::before { transform: rotate(45deg); }
.lib-cat summary span { margin-left: auto; font: 600 11.5px var(--mono); color: var(--grey); background: var(--bg); padding: 2px 7px; border-radius: 20px; }
.lib-cat summary:hover { background: var(--bg); }
.lib-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.lib-item:hover { background: var(--blue-50); }
.lib-ico { flex: none; width: 56px; height: 50px; display: grid; place-items: center; }
.lib-txt { flex: 1; min-width: 0; }
.lib-txt b { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.lib-txt small { display: block; font-size: 11.5px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.lib-add { flex: none; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 19px; font-weight: 600; color: var(--blue); line-height: 1; }
.lib-add:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); position: relative; }
.toolbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.zoom { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.zoom .icon-btn { height: 32px; min-width: 32px; font-size: 18px; }
.zoom-val { border: 0; background: none; font: 600 12.5px var(--mono); min-width: 54px; padding: 0 4px; }
.switch { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--grey-2); cursor: pointer; user-select: none; }
.switch input { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; }
.warn-chip { margin-left: auto; display: flex; align-items: center; gap: 6px; border: 0; background: var(--orange-50); color: var(--orange-ink); font-weight: 700; font-size: 12.5px; padding: 6px 11px; border-radius: 20px; }
.banner { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; background: var(--blue); color: #fff; font-size: 13.5px; }
.banner span { flex: 1; min-width: 180px; }
.banner .btn { border-color: rgba(255,255,255,.5); }
.banner .btn.ghost { background: transparent; color: #fff; }
.warnlist { flex: none; background: #fff; border-bottom: 1px solid var(--line); max-height: 42%; overflow: auto; padding: 10px 12px; }
.warn-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.warn-head span { color: var(--grey); font-size: 12px; }
.warn-item { display: block; width: 100%; text-align: left; font-size: 12.8px; line-height: 1.4; background: var(--orange-50); border: 0; border-left: 3px solid var(--orange); padding: 7px 10px; border-radius: 6px; margin: 6px 0; color: var(--ink); }
.warn-item.info { background: var(--blue-50); border-left-color: var(--blue); }
.canvas { flex: 1; min-height: 0; overflow: auto; padding: 12px; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.canvas svg { display: block; margin: 0 auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.canvas .dev { cursor: pointer; }
.canvas .dev:hover .hit { fill: rgba(31,95,191,.07); }
.canvas.placing { cursor: crosshair; }
body.dragging, body.dragging * { cursor: grabbing !important; }
.drag-float { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; opacity: .9; filter: drop-shadow(0 8px 16px rgba(20,24,31,.25)); }

.insp { background: #fff; border-left: 1px solid var(--line); overflow: auto; display: flex; flex-direction: column; min-height: 0; }
.insp-empty { padding: 18px 16px; }
.insp-empty h3 { margin: 0 0 2px; font-size: 17px; }
.insp-empty h4 { margin: 18px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--grey); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.kpis div { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; }
.kpis b { display: block; font: 800 18px var(--mono); color: var(--blue); }
.kpis span { font-size: 11.5px; color: var(--grey); }
.hint { font-size: 13px; background: var(--blue-50); border-radius: 10px; padding: 10px 12px; color: var(--grey-2); }
.ok { font-size: 13px; color: var(--ok); font-weight: 600; }
.insp-head { position: sticky; top: 0; background: #fff; z-index: 2; display: flex; gap: 10px; align-items: flex-start; padding: 14px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.insp-head h3 { margin: 0; font-size: 15px; line-height: 1.25; }
.insp-head p { margin: 2px 0 0; font-size: 12px; }
.insp-head > div { flex: 1; min-width: 0; }
.insp-close { margin: -6px -4px 0 0; }
.code-badge { flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 7px; border-radius: 8px; font: 800 13px var(--mono); background: var(--blue-50); color: var(--blue); }
.code-badge.main { background: var(--orange-50); color: var(--orange-ink); }
.code-badge.rcd { background: #E3ECFB; color: var(--blue-d); }
.code-badge.aux, .code-badge.passive { background: var(--bg); color: var(--grey-2); }
.insp-body { padding: 14px 16px 6px; flex: 1; }
.insp-act { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 6px; }
.insp-act .btn { flex: 1 1 auto; min-width: 42px; }
.fld { display: block; margin: 0 0 12px; }
.fld > span { display: block; font-size: 12px; font-weight: 600; color: var(--grey-2); margin-bottom: 5px; }
.fld > span i { font-style: normal; font-weight: 400; color: var(--grey); }
.fld input, .fld select, .fld textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 14.5px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,95,191,.14); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.variants { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; padding-top: 4px; border-top: 1px dashed var(--line); margin-top: 4px; }
.variants .fld { margin-top: 8px; margin-bottom: 4px; }
.note { font-size: 13px; background: var(--blue-50); border-radius: 9px; padding: 8px 11px; margin: 0 0 12px; color: var(--grey-2); }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 14px 0 8px; font-size: 12.5px; }
.spec dt { color: var(--grey); }
.spec dd { margin: 0; font-weight: 600; font-family: var(--mono); font-size: 12px; }
.desc { font-size: 12.8px; color: var(--grey-2); line-height: 1.5; }
.members { margin-bottom: 12px; font-size: 13.5px; }
.members ul { list-style: none; padding: 0; margin: 8px 0; }
.members li button { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 6px 4px; border-radius: 7px; font-size: 13.5px; }
.members li button:hover { background: var(--bg); }
.members li i { font: 800 12px var(--mono); font-style: normal; color: var(--blue); min-width: 22px; }

/* ---------- documenten ---------- */
.pane-doc { overflow: auto; padding: 18px 20px 30px; }
.pane-doc > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.doc-head h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.doc-head p { margin: 0; font-size: 13.5px; max-width: 700px; }
.doc-act { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-canvas { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: auto; padding: 4px; box-shadow: var(--sh); }
.doc-canvas svg { display: block; margin: 0 auto; }
.tbl-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; background: var(--ink); color: #fff; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 10px 12px; white-space: nowrap; }
.tbl td { padding: 9px 12px; border-top: 1px solid #EDF0F4; vertical-align: middle; }
.tbl .num { text-align: right; font-family: var(--mono); font-weight: 700; width: 64px; }
.tbl tr.sec td { background: var(--bg); color: var(--blue); font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; padding: 8px 12px; }
.tbl input, .tbl select { width: 100%; min-width: 120px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13.5px; }
.tbl.groups td:first-child { width: 60px; }
.tag { font: 700 10.5px var(--mono); background: var(--orange-50); color: var(--orange-ink); padding: 3px 7px; border-radius: 6px; }
.qty { white-space: nowrap; width: 86px; }
.qty .icon-btn { height: 30px; min-width: 30px; font-size: 16px; border: 1px solid var(--line); margin-left: 4px; }
.add-extra { display: flex; gap: 8px; flex-wrap: wrap; }
.add-extra select { flex: 1; min-width: 200px; max-width: 460px; }
.pdf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.pdf-forms fieldset { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 16px 6px; margin: 0 0 14px; }
.pdf-forms legend { font-weight: 800; font-size: 13px; padding: 0 6px; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; }
.logo-row { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.logo-prev { width: 120px; height: 70px; border: 1px dashed #B8C2CF; border-radius: 10px; display: grid; place-items: center; background: var(--bg); font-size: 11.5px; color: var(--grey); flex: none; overflow: hidden; }
.logo-prev img { max-width: 108px; max-height: 60px; }
.logo-row .btn { margin: 0 6px 6px 0; }
.checks { display: grid; gap: 8px; padding-bottom: 10px; }
.chk { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.chk input { width: 18px; height: 18px; accent-color: var(--blue); }
.pdf-side { position: sticky; top: 0; }
.cover-prev { width: 100%; aspect-ratio: 210 / 297; background: #fff; border-radius: 6px; box-shadow: 0 2px 4px rgba(20,24,31,.08), 0 14px 40px rgba(20,24,31,.14); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); }
.cp-band { background: var(--blue); color: #fff; padding: 14px 14px 12px; position: relative; height: 27%; border-bottom: 3px solid var(--orange); flex: none; }
.cp-k { display: block; font: 700 8px var(--mono); letter-spacing: .16em; opacity: .8; }
.cp-logo { position: absolute; right: 10px; top: 10px; width: 30%; height: 44%; background: #fff; border-radius: 5px; display: grid; place-items: center; padding: 5px; }
.cp-logo img { max-width: 100%; max-height: 100%; }
.cp-co { position: absolute; right: 12px; top: 12px; font-weight: 800; font-size: 11px; max-width: 40%; text-align: right; }
.cp-t { display: block; font-weight: 800; font-size: 18px; line-height: 1.1; margin-top: 11px; max-width: 60%; letter-spacing: -.01em; }
.cp-s { position: absolute; bottom: 8px; left: 14px; right: 14px; font-size: 6.6px; opacity: .85; }
.cp-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 11px 14px 4px; font-size: 8.5px; color: var(--grey); }
.cp-info i { display: block; font: 800 6.5px var(--mono); font-style: normal; color: var(--orange); letter-spacing: .12em; margin-bottom: 2px; }
.cp-info b { display: block; font-size: 10px; color: var(--ink); }
.cp-info span { display: block; }
.cp-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 5px 14px; }
.cp-chips span { background: #EEF2F7; border-radius: 3px; padding: 4px 5px; font-size: 8.5px; font-weight: 800; }
.cp-chips i { display: block; font-style: normal; font-weight: 500; font-size: 6px; color: var(--grey); }
.cp-img { flex: 1; min-height: 0; position: relative; }
.cp-img img { position: absolute; left: 14px; top: 6px; width: calc(100% - 28px); height: calc(100% - 12px); object-fit: contain; display: block; }
.cp-disc { flex: none; margin: 0 14px 12px; background: var(--orange-50); color: #784610; font-size: 6.2px; padding: 5px 6px; border-radius: 3px; line-height: 1.35; }

/* ---------- modal, toast ---------- */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(20,24,31,.45); display: grid; place-items: center; padding: 16px; }
.modal-card { background: #fff; border-radius: 18px; width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(20,24,31,.3); }
.modal-card h3 { margin: 0 0 12px; font-size: 19px; }
.modal-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.modal-act.col { flex-direction: column; align-items: stretch; }
.form .fld { margin-bottom: 12px; }
.menu-list { display: flex; flex-direction: column; gap: 4px; }
.menu-list button { text-align: left; border: 0; background: var(--bg); border-radius: 10px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.menu-list button:hover { background: var(--blue-50); color: var(--blue); }
.pdf-file { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 12px; padding: 12px; }
.pdf-file span { display: flex; flex-direction: column; min-width: 0; }
.pdf-file b { font-size: 13.5px; word-break: break-all; }
.pdf-file small { color: var(--grey); }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--blue-100); border-top-color: var(--blue); animation: spin .8s linear infinite; margin: 8px auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.tour { text-align: center; }
.tour-ill { background: var(--blue-50); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.tour-ill svg { width: 100%; max-width: 250px; height: auto; display: block; margin: 0 auto; }
.tour-step { font: 700 11.5px var(--mono); color: var(--orange); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 4px; }
.tour h3 { font-size: 22px; margin-bottom: 6px; }
.tour p { color: var(--grey-2); margin: 0; }
.tour .modal-act { justify-content: space-between; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); }
.dots i.on { width: 22px; background: var(--blue); }
.toast { position: fixed; left: 50%; bottom: 46px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; font-size: 14px; padding: 11px 16px; border-radius: 12px; z-index: 90; transition: opacity .2s, transform .2s; max-width: min(560px, calc(100vw - 32px)); box-shadow: var(--sh); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #8E1F17; }

.foot { flex: none; font-size: 11.5px; color: var(--grey); text-align: center; padding: 7px 14px; background: #fff; border-top: 1px solid var(--line); line-height: 1.35; }

/* ---------- tablet ---------- */
@media (max-width: 1099px) {
  .pane-board { grid-template-columns: minmax(0, 1fr); }
  .lib { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(390px, 92vw); transform: translateX(-104%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(20,24,31,.25); }
  body.lib-open .lib { transform: none; }
  body.lib-open::after { content: ''; position: fixed; inset: 0; background: rgba(20,24,31,.35); z-index: 45; }
  .lib-close { display: inline-grid; }
  .insp { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; max-height: 64dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 34px rgba(20,24,31,.18); transform: translateY(105%); transition: transform .22s ease; }
  body.has-sel .insp { transform: none; }
  .insp-empty { display: none; }
  .insp-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: var(--line); }
  .pdf-grid { grid-template-columns: minmax(0, 1fr); }
  .pdf-side { position: static; max-width: 420px; margin: 0 auto; width: 100%; }
}
/* ---------- telefoon ---------- */
@media (max-width: 699px) {
  :root { --top: 52px; }
  .top { padding: 0 6px 0 8px; gap: 4px; }
  body.in-editor .brand-t { display: none; }
  .saved { display: none; }
  .proj input { font-size: 14.5px; padding: 6px 6px; }
  #btn-pdf { padding: 7px 11px; }
  .icon-btn { min-width: 36px; }
  .start { padding: 18px 16px 30px; }
  .lead { font-size: 15.5px; }
  .steps3 li { flex: 1 1 100%; }
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tpl-card.empty { min-height: 0; grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; text-align: left; padding: 14px; }
  .tpl-card.empty .tpl-desc { display: none; }
  .tpl-plus { width: 44px; height: 44px; font-size: 26px; border-radius: 12px; }
  .tpl-meta { padding: 9px 10px 12px; }
  .tpl-name { font-size: 13.5px; }
  .tpl-desc { display: none; }
  .tab { padding: 11px 11px 9px; font-size: 13.5px; }
  .toolbar { gap: 5px; padding: 7px 8px; }
  .toolbar .btn.sm { padding: 6px 9px; }
  .zoom .icon-btn { min-width: 28px; }
  .zoom-val { min-width: 42px; font-size: 12px; }
  .switch { gap: 4px; }
  .switch span { font-size: 12.5px; }
  #btn-boardset { padding: 6px 9px; }
  .warn-chip { margin-left: 0; }
  .canvas { padding: 8px; }
  .pane-doc { padding: 14px 12px 24px; }
  .fld-row { grid-template-columns: 1fr; gap: 0; }
  .variants { grid-template-columns: 1fr 1fr; }
  .foot { font-size: 10.5px; padding: 5px 10px; }
  .insp-act .btn { flex: 1 1 22%; padding: 8px 6px; }
}
@media print { .top, .tabs, .foot, .lib, .insp, .toolbar { display: none !important; } }
.tpl-filter { margin: -4px 0 14px; }

/* offline (16/11/2026) */
.offline-card { background: #EEF3FB; border: 1px solid #C9D8F2; border-radius: 14px; padding: 16px; }
.offline-card .oc-head { display: flex; gap: 12px; align-items: center; }
.offline-card h2 { margin: 0; font-size: 18px; }
.offline-card .oc-status { margin: 2px 0 0; font-size: 14px; color: #5B6573; }
.offline-card .oc-status.ok { color: #1E7B3A; font-weight: 700; }
.offline-card p { font-size: 15px; line-height: 1.5; }
.offline-card .oc-install { margin: 4px 0 10px; }
.offline-card .oc-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.offline-card .oc-steps > div { background: #fff; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.offline-card .oc-steps ol { margin: 6px 0 0; padding-inline-start: 20px; } .offline-card .oc-steps li { margin: 3px 0; }
.offline-card.is-installed .oc-steps, .offline-card.is-installed > p { display: none; }
