@import url('./notebook-header.css');
@import url('./notebook-roller.css');
@import url('./notebook-help.css');
/* Zeszyt pomiarowy — wspólne tokeny obu motywów, obsługa telefonu i pracy na budowie. */
.notebook {
  --nb-radius: var(--radius, 12px);
  --nb-fill: var(--accent-fill, #0075a9);
  width: 100%; max-width: 1100px; min-width: 0; margin: 0 auto;
  display: flex; flex-direction: column; gap: 18px;
  color: var(--text); overflow-wrap: anywhere;
}
.notebook *, .notebook *::before, .notebook *::after { box-sizing: border-box; }
.notebook [hidden] { display: none !important; }
.notebook h2, .notebook h3, .notebook h4, .notebook p { margin-top: 0; }
.notebook h2 { font-size: clamp(20px, 4.8vw, 28px); line-height: 1.25; letter-spacing: -.02em; }
.notebook h3 { font-size: 17px; line-height: 1.35; }
.notebook h4 { font-size: 15px; }
.notebook p:last-child { margin-bottom: 0; }
.notebook button, .notebook a, .notebook input, .notebook select, .notebook textarea { -webkit-tap-highlight-color: transparent; }
.notebook button, .notebook a { touch-action: manipulation; }
.notebook :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.nb-header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.nb-header > .nb-heading { flex: 1 1 130px; min-width: 0; }
.nb-header h2, .nb-heading h2 { margin-bottom: 3px; }
.nb-heading > p, .nb-heading > .nb-muted { margin: 0; }
.nb-eyebrow { font-size: 11px; letter-spacing: .09em; font-weight: 700; text-transform: uppercase; color: var(--accent); margin-bottom: 5px; }
.nb-muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.nb-save-state { font-size: 12px; color: var(--muted); display: flex; gap: 5px; align-items: center; }
.nb-save-state .icon { width: 14px; height: 14px; }
.nb-body, .nb-section { min-width: 0; display: flex; flex-direction: column; gap: 15px; }
.nb-section > h3, .nb-section > h4 { margin-bottom: 0; }
.nb-card { min-width: 0; padding: 17px; border-radius: var(--nb-radius); background: var(--panel-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.nb-card > h3 { margin-bottom: 13px; }
.nb-card > :last-child { margin-bottom: 0; }
.nb-grid, .nb-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; min-width: 0; }
.nb-grid > *, .nb-fields > *, .nb-workspace > * { min-width: 0; }
.nb-fields > .full, .nb-grid > .full { grid-column: 1 / -1; }
.nb-fields > h3, .nb-fields > h4, .nb-fields > p, .nb-fields > .nb-switch,
.nb-template-grid > .nb-empty, .nb-photo-grid > .nb-empty { grid-column: 1 / -1; }
.nb-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; align-items: start; }
.nb-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; min-width: 0; }
.nb-actions > .nb-button { flex: 1 1 130px; }
.nb-button {
  min-height: 46px; min-width: 44px; max-width: 100%; padding: 11px 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px);
  background: var(--panel-solid); color: var(--text); font: inherit; font-size: 14px;
  font-weight: 650; text-align: center; text-decoration: none; line-height: 1.3;
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.nb-button:hover { background: var(--panel-hover); border-color: var(--accent); text-decoration: none; }
.nb-button.is-primary { color: #fff; background: var(--nb-fill); border-color: var(--nb-fill); }
.nb-button.is-primary:hover { background: var(--accent-hover, #005b87); border-color: var(--accent-hover, #005b87); }
.nb-button.is-success { color: var(--success); background: var(--success-soft); border-color: var(--success); }
.nb-button.is-success:hover { background: color-mix(in srgb, var(--success) 22%, var(--panel-solid)); }
.nb-button.is-danger { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.nb-button.is-active, .nb-button[aria-pressed='true'] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.nb-button:disabled, .nb-button[aria-disabled='true'] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.nb-button:disabled:hover { border-color: var(--border-strong); }
.nb-button .icon { width: 19px; height: 19px; flex-shrink: 0; }
.nb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.nb-field > span { line-height: 1.4; }
.nb-field small { font-size: 12px; font-weight: 400; color: var(--muted); }
.nb-field input, .nb-field select, .nb-field textarea,
.notebook input.nb-search, .nb-search input {
  width: 100%; min-width: 0; max-width: 100%; min-height: 46px; padding: 11px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 16px; font-weight: 400;
  line-height: 1.4; box-shadow: none;
}
.nb-field select { text-overflow: ellipsis; padding-right: 24px; }
.nb-field textarea { min-height: 106px; resize: vertical; }
.nb-field input:focus, .nb-field select:focus, .nb-field textarea:focus, .nb-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.nb-field input:disabled, .nb-field select:disabled, .nb-field textarea:disabled { opacity: .55; cursor: not-allowed; }
.nb-field input::placeholder, .nb-field textarea::placeholder, .nb-search input::placeholder { color: var(--dim); }
.nb-field.is-error input, .nb-field.is-error select, .nb-field.is-error textarea,
.nb-field input[aria-invalid='true'], .nb-field select[aria-invalid='true'] { border-color: var(--danger); background: var(--danger-soft); }
.nb-figure-fields { gap: 13px; padding-top: 4px; }
.nb-figure-fields > .nb-field { padding: 11px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg-2); transition: background .15s, border-color .15s; }
.nb-field.is-active, .nb-figure-fields > .nb-field:focus-within { border-color: var(--success); background: var(--success-soft); }
.nb-field.is-active > span, .nb-figure-fields > .nb-field:focus-within > span { color: var(--success); }
.nb-field .nb-computed, .nb-computed { color: var(--success); font-weight: 650; }
.nb-fit-controls { grid-column: 1 / -1; width: 100%; min-width: 0; gap: 12px; padding-top: 17px; margin-top: 5px; border-top: 1px solid var(--border-strong); }
.nb-fit-controls > .nb-button { width: 100%; min-height: 46px; }
.nb-fit-controls > h3, .nb-fit-controls > p { margin-bottom: 0; }
.nb-replacement-fit { min-width: 0; }
.nb-replacement-fit h4 { margin: 0 0 10px; font-size: 17px; }
.nb-replacement-accounts, .nb-replacement-missing { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.nb-replacement-account { min-width: 0; padding: 12px; border: 1px solid var(--border-strong); border-left-width: 4px; border-radius: 8px; overflow-wrap: anywhere; }
.nb-replacement-account p { margin: 8px 0; line-height: 1.5; }
.nb-replacement-account > span { display: block; font-size: 14px; }
.nb-replacement-account.is-success { border-left-color: var(--success); }
.nb-replacement-account.is-error { border-left-color: var(--danger); background: var(--danger-soft); }
.nb-replacement-account.is-warning { border-left-color: var(--warn); }
.nb-replacement-account .nb-button, .nb-replacement-missing .nb-button { width: 100%; min-height: 56px; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.nb-replacement-account .nb-button { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin-top: 10px; }
.nb-replacement-account small { font-size: 14px; line-height: 1.45; }
@media (min-width: 800px) { .nb-replacement-accounts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nb-switch { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; color: var(--text); font-size: 14px; font-weight: 600; }
.nb-switch input[type='checkbox'] { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 48px; height: 28px; min-height: 28px; margin: 8px 0; padding: 3px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg-2); cursor: pointer; }
.nb-switch input[type='checkbox']::before { content: ''; display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.nb-switch input[type='checkbox']:checked { background: var(--nb-fill); border-color: var(--nb-fill); }
.nb-switch input[type='checkbox']:checked::before { background: #fff; transform: translateX(20px); }
.nb-switch input[type='checkbox']:disabled { opacity: .5; cursor: not-allowed; }
.nb-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nb-list-item { display: flex; align-items: center; gap: 12px; min-width: 0; width: 100%; padding: 14px; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: var(--nb-radius); color: var(--text); text-align: left; text-decoration: none; }
button.nb-list-item, a.nb-list-item { cursor: pointer; min-height: 70px; }
button.nb-list-item:hover, a.nb-list-item:hover { border-color: var(--accent); background: var(--panel-hover); text-decoration: none; }
.nb-list-item > div, .nb-list-item > span:not(.nb-thumbnail):not(.nb-status) { min-width: 0; flex: 1; }
.nb-list-item strong { display: block; font-size: 15px; line-height: 1.35; }
.nb-list-item small { display: block; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.nb-list-item span.nb-muted, .nb-list-item strong + span { display: block; margin-top: 4px; }
.nb-list-item .nb-chip { margin-top: 6px; }
.nb-list-item:disabled { opacity: .5; cursor: not-allowed; }
.nb-list-item .nb-actions { flex-shrink: 0; }
.nb-list-item .nb-actions > .nb-button { flex: 0 1 auto; }
.nb-thumbnail { display: grid; place-items: center; flex-shrink: 0; width: 58px; height: 66px; background: var(--bg-2); color: var(--accent); border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); overflow: hidden; }
.nb-thumbnail svg { width: 43px; height: 53px; }
.nb-thumbnail .icon { width: 25px; height: 25px; }
.nb-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.nb-template { min-height: 128px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--text); background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); font-size: 12px; line-height: 1.3; font-weight: 600; text-align: center; cursor: pointer; }
.nb-template:hover { background: var(--panel-hover); border-color: var(--accent); }
.nb-template.is-active, .nb-template[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.nb-template svg { flex-shrink: 0; width: 60px; height: 72px; max-width: 100%; color: var(--accent); }
.nb-tabs, .nb-steps { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.nb-tabs { padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg-2); }
.nb-tabs > button { flex: 1 1 66px; min-height: 44px; min-width: 0; padding: 8px 7px; border: 1px solid transparent; border-radius: calc(var(--radius-sm, 8px) - 2px); background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.nb-tabs > button.is-active, .nb-tabs > button[aria-selected='true'], .nb-tabs > button[aria-pressed='true'] { color: var(--accent); background: var(--panel-solid); border-color: var(--border-strong); box-shadow: var(--shadow); }
.nb-steps { align-items: center; gap: 5px; }
.nb-steps button, .nb-steps a { min-height: 44px; padding: 8px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--panel-solid); color: var(--muted); font-size: 12px; text-decoration: none; cursor: pointer; }
.nb-steps button, .nb-tabs button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.nb-steps button.is-active, .nb-steps a.is-active, .nb-steps [aria-current='step'] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.nb-footer { position: sticky; bottom: 12px; z-index: 12; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 12px; margin-top: 2px; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: var(--nb-radius); box-shadow: var(--shadow-pop, var(--shadow)); }
.nb-footer > .nb-button { flex: 1 1 120px; }
.nb-footer > .nb-muted { flex: 1 1 100%; }
.nb-alert, .nb-result { min-width: 0; padding: 13px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: var(--bg-2); font-size: 14px; line-height: 1.5; }
.nb-alert strong, .nb-result strong { display: block; margin-bottom: 4px; }
.nb-alert ul, .nb-result ul { padding-left: 19px; margin: 7px 0 0; }
.nb-alert li + li, .nb-result li + li { margin-top: 4px; }
.nb-alert.is-error, .nb-error { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.nb-alert.is-warning { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.nb-alert.is-success { color: var(--success); border-color: var(--success); background: var(--success-soft); }
.nb-error { font-size: 14px; padding: 12px 14px; border-radius: var(--radius-sm, 8px); }
.nb-error:empty { display: none; }
.nb-summary { display: flex; flex-direction: column; gap: 9px; margin: 0; }
.nb-row { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.nb-row:last-child { border-bottom: 0; }
.nb-row > :first-child { color: var(--muted); }
.nb-row > :last-child { font-weight: 650; text-align: right; }
.nb-chip, .nb-status { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 9px; max-width: 100%; font-size: 12px; font-weight: 650; line-height: 1.4; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); background: var(--bg-2); }
.nb-status.is-success, .nb-chip.is-success { color: var(--success); background: var(--success-soft); border-color: var(--success); }
.nb-status.is-warning, .nb-chip.is-warning { color: var(--warn); background: var(--warn-soft); border-color: var(--warn); }
.nb-status.is-error, .nb-chip.is-error { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.nb-search { position: relative; min-width: 0; }
.nb-search > .icon { position: absolute; left: 12px; top: 15px; color: var(--muted); pointer-events: none; }
.nb-search > .icon + input { padding-left: 39px; }
.nb-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.nb-photo { display: block; position: relative; aspect-ratio: 1; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: var(--bg-2); overflow: hidden; }
.nb-photo img, img.nb-photo { width: 100%; height: 100%; object-fit: cover; }
.nb-photo .nb-button { position: absolute; right: 4px; top: 4px; padding: 8px; }
.nb-empty { padding: 30px 18px; border: 1px dashed var(--border-strong); border-radius: var(--nb-radius); background: var(--panel-solid); color: var(--muted); text-align: center; }
.nb-empty > .icon { width: 35px; height: 35px; color: var(--accent); margin-bottom: 10px; }
.nb-empty h3 { margin-bottom: 6px; color: var(--text); }
.nb-empty > .nb-button { margin-top: 16px; }
.nb-spinner { width: 22px; height: 22px; display: inline-block; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
.nb-checks, .nb-drawing-checks { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.nb-check, .nb-drawing-check { padding: 9px 11px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); font-size: 13px; color: var(--muted); }
.nb-check.is-error, .nb-drawing-check.nb-invalid { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); font-weight: 600; }
.nb-drawing { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nb-drawing-toolbar { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.nb-drawing-toolbar > button { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: var(--panel-solid); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.nb-drawing-toolbar > button:disabled { opacity: .45; cursor: not-allowed; }
.nb-drawing-toolbar > button.is-active, .nb-drawing-toolbar > button[aria-pressed='true'] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.nb-drawing-snap { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 4px; color: var(--muted); font-size: 13px; cursor: pointer; }
.nb-drawing-snap input[type='checkbox'] { width: 20px; height: 20px; min-width: 20px; min-height: 20px; margin: 0; padding: 0; flex: 0 0 auto; accent-color: var(--accent); }
.nb-drawing-stage { min-width: 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background-color: var(--bg-2); background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 20px 20px; }
.nb-drawing-stage.nb-is-drawing { touch-action: none; cursor: crosshair; }
.nb-drawing-svg, .nb-diagram { display: block; width: 100%; max-width: 100%; height: auto; max-height: 60vh; max-height: 60dvh; overflow: hidden; }
.nb-drawing-svg { color: var(--text); user-select: none; -webkit-user-select: none; }
.nb-drawing-svg .nb-side-hit, .nb-drawing-svg .nb-edge-handle { touch-action: none; cursor: pointer; }
.nb-drawing-svg .nb-edge-handle { cursor: grab; }
.nb-drawing-svg .nb-edge-handle:active { cursor: grabbing; }
.nb-drawing-svg .nb-edge-handle:focus, .nb-drawing-svg .nb-side-hit:focus { outline: none; stroke: var(--accent); stroke-opacity: .45; }
.nb-drawing-svg .nb-edge-handle:focus-visible > line:first-child { stroke: var(--accent); stroke-opacity: .22; }
.nb-drawing-svg .nb-side-hit:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.nb-drawing-svg text { font-family: var(--font); }
.nb-drawing-svg .nb-window-glass { fill: var(--accent-soft); }
.nb-drawing-svg .nb-window { stroke: var(--accent); }
.nb-drawing-svg .nb-outline { stroke: var(--text); }
.nb-drawing-svg .nb-corner, .nb-drawing-svg .nb-draw-point { fill: var(--accent); }
.nb-drawing-svg .nb-level-line { stroke: var(--success); }
.nb-drawing-svg .nb-floor-line, .nb-drawing-svg .nb-zero-marker { stroke: var(--warn); }
.nb-drawing-svg .nb-element-label { fill: var(--text); }
.nb-drawing-svg .nb-window-figure { fill: var(--accent-soft); stroke: var(--accent); stroke-linejoin: round; }
.nb-drawing-svg .nb-outline-edge .nb-side-label { paint-order: stroke fill; stroke: var(--panel-solid); stroke-width: 3px; stroke-linejoin: round; }
.nb-drawing-svg .nb-outline-edge.is-active .nb-side-label { fill: var(--success); font-weight: 750; }
.nb-drawing-svg .nb-outline-edge.is-computed:not(.is-active) .nb-side-label { fill: var(--accent-2); }
.nb-drawing-svg .nb-outline-edge:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nb-drawing-window-edges { min-width: 0; padding: 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: var(--panel-solid); }
.nb-drawing-window-edges > h3 { font-size: 15px; margin-bottom: 6px; }
.nb-drawing-window-edges .nb-row { gap: 5px 10px; font-variant-numeric: tabular-nums; }
.nb-drawing-window-edges .nb-row > strong { color: var(--accent); }
.nb-drawing-window-edges .nb-row > span:last-child { flex-basis: 100%; text-align: left; font-size: 12px; color: var(--muted); font-weight: 400; }
.nb-drawing-reason { margin: 0; }
.nb-drawing-help, .nb-drawing-hint { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; }
.nb-drawing-texts { display: grid; gap: 6px; min-width: 0; }
.nb-drawing-text { padding: 9px 11px; border-radius: var(--radius-sm, 8px); background: var(--bg-2); border: 1px solid var(--border); font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.5; overflow-wrap: anywhere; }
.nb-drawing-level, .nb-drawing-floor { font-size: 13px; line-height: 1.5; padding: 11px 12px; border-radius: var(--radius-sm, 8px); background: var(--warn-soft); border: 1px solid var(--warn); color: var(--warn); }
.nb-drawing-level:empty, .nb-drawing-floor:empty { display: none; }
.nb-drawing-floor ul { margin: 6px 0 0; padding-left: 18px; }
.nb-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.nb-dimension { padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: var(--bg-2); color: var(--muted); font-size: 12px; }
.nb-dimension strong { display: block; margin-top: 5px; font-family: var(--mono); font-size: 19px; color: var(--text); }
.nb-dimension.is-error { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.nb-dimension.is-error strong { color: var(--danger); }
.nb-legend { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--muted); font-size: 12px; }
div.nb-element, section.nb-element { display: flex; flex-direction: column; gap: 10px; padding: 13px; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); }
.nb-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 0; }
.nb-inline > .nb-field { flex: 1 1 100px; }
.nb-inline > .nb-button { flex: 0 0 auto; }
.nb-quantity { width: 80px; max-width: 100%; }
.nb-complete { display: flex; align-items: center; flex-direction: column; gap: 15px; text-align: center; padding: 30px 18px; }
.nb-complete > .icon { width: 65px; height: 65px; padding: 14px; color: var(--success); background: var(--success-soft); border: 1px solid var(--success); border-radius: 50%; }
.nb-complete-mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; color: var(--success); background: var(--success-soft); border: 1px solid var(--success); }
.nb-complete-mark .icon { width: 38px; height: 38px; stroke-width: 2.5; }
.nb-complete > .nb-button { width: 100%; max-width: 460px; }
[data-live-size] { display: block; margin-top: 6px; color: var(--accent); font-family: var(--mono); font-size: 19px; font-weight: 650; line-height: 1.4; font-variant-numeric: tabular-nums; }
.nb-complete h2 { margin-bottom: 0; }
.nb-complete > .nb-actions { width: 100%; max-width: 460px; flex-direction: column; }
.nb-complete > .nb-actions > .nb-button { width: 100%; flex: none; }
.nb-technical-card { width: 100%; max-width: 100%; min-width: 0; grid-column: 1 / -1; scroll-margin-top: 84px; }
.nb-technical { display: flex; flex-direction: column; gap: 13px; width: 100%; min-width: 0; max-width: 100%; }
.nb-technical > * { min-width: 0; max-width: 100%; }
.nb-technical-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.nb-technical-toolbar button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; min-height: 44px; max-width: 100%; padding: 10px 12px; white-space: normal; line-height: 1.3; touch-action: manipulation; }
.nb-technical-toolbar button .icon { width: 19px; height: 19px; flex-shrink: 0; }
.nb-technical-canvas { position: relative; isolation: isolate; width: 100%; min-width: 0; height: 60vh; height: 60dvh; min-height: 360px; max-height: 760px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: var(--panel-solid); }
.nb-technical-svg { display: block; width: 100%; height: 100%; max-width: 100%; overflow: hidden; user-select: none; -webkit-user-select: none; }
.nb-technical-svg text { font-family: var(--font); font-variant-numeric: tabular-nums; }
.nb-technical-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.nb-technical-legend { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.nb-technical-group { min-width: 0; padding: 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: var(--bg-2); }
.nb-technical-group > h3, .nb-technical-group > h4 { margin: 0 0 8px; font-size: 15px; color: var(--text); }
.nb-technical-dimension-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 7px 12px; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.nb-technical-dimension-row:last-child { border-bottom: 0; }
.nb-technical-dimension-row > * { min-width: 0; margin: 0; }
.nb-technical-dimension-row > :last-child { max-width: 12ch; color: var(--text); font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.nb-technical-dimension-row.is-invalid { padding: 9px; border: 1px solid var(--danger); border-radius: 6px; color: var(--danger); background: var(--danger-soft); }
.nb-technical-dimension-row.is-invalid > :last-child { color: var(--danger); }
.nb-technical-texts { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.nb-technical-texts > p { margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); color: var(--muted); background: var(--bg-2); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.nb-technical-error { padding: 13px; border: 1px solid var(--danger); border-radius: var(--radius-sm, 8px); color: var(--danger); background: var(--danger-soft); font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.nb-technical-error:empty, .nb-technical-texts:empty { display: none; }
.nb-technical-dialog { --nb-radius: var(--radius, 12px); --nb-fill: var(--accent-fill, #0075a9); position: fixed; inset: 0; width: 100vw; width: 100dvw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); border: 0; border-radius: 0; background: var(--panel-solid); color: var(--text); font-family: var(--font); overflow: hidden; }
.nb-technical-dialog[open] { display: flex; flex-direction: column; gap: 9px; }
.nb-technical-dialog:fullscreen { width: 100vw; width: 100dvw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; background: var(--panel-solid); }
.nb-technical-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.nb-technical-dialog > .nb-technical { flex: 1 1 0; min-height: 0; overflow: hidden; }
.nb-technical-dialog .nb-technical-canvas { flex: 1 1 0; height: auto; min-height: 0; max-height: none; }
.nb-technical-dialog .nb-technical-toolbar { flex: 0 0 auto; }
.nb-technical-dialog .nb-technical-status { flex: 0 0 auto; }
.nb-technical-dialog .nb-technical-error { flex: 0 1 auto; max-height: 18vh; max-height: 18dvh; overflow-y: auto; overflow-x: hidden; }
.nb-technical-details { flex: 0 0 auto; min-width: 0; width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: var(--bg-2); color: var(--text); }
.nb-technical-details[open] { max-height: 32vh; max-height: 32dvh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.nb-technical-details > summary { position: sticky; top: 0; z-index: 1; min-height: 44px; padding: 12px; background: var(--bg-2); color: var(--text); font-size: 13px; font-weight: 650; line-height: 1.4; cursor: pointer; touch-action: manipulation; }
.nb-technical-details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.nb-technical-details > .nb-technical-texts, .nb-technical-details > .nb-technical-legend { padding: 11px; max-height: none; overflow: visible; }
.nb-technical-details > .nb-technical-texts:empty { display: none; }
.nb-technical-toolbar output { min-width: 38px; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); text-align: center; }
.nb-technical-dialog .nb-technical-toolbar [data-tech='fullscreen'] { flex: 1 1 0; }
.nb-print-dialog { --nb-radius: var(--radius, 12px); --nb-fill: var(--accent-fill, #0075a9); position: fixed; inset: 0; box-sizing: border-box; width: calc(100vw - 32px); width: calc(100dvw - 32px); max-width: 1100px; height: 92vh; height: 92dvh; max-height: 92vh; max-height: 92dvh; margin: auto; padding: 18px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius, 12px); background: var(--panel-solid); color: var(--text); font-family: var(--font); box-shadow: var(--shadow-pop, var(--shadow)); }
.nb-print-dialog[open] { display: flex; flex-direction: column; }
.nb-print-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.nb-print-dialog [hidden] { display: none !important; }
.nb-print-preview { display: flex; flex-direction: column; flex: 1 1 0; gap: 12px; width: 100%; max-width: 100%; min-width: 0; min-height: 0; }
.nb-print-preview > * { min-width: 0; max-width: 100%; }
.nb-print-toolbar { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-strong); }
.nb-print-toolbar h2, .nb-print-toolbar h3 { flex: 1 1 180px; min-width: 0; margin: 0; color: var(--text); font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.nb-print-toolbar .nb-button { min-width: 44px; min-height: 44px; max-width: 100%; }
.nb-print-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; width: 100%; min-width: 0; }
.nb-print-actions > .nb-button { flex: 1 1 140px; min-height: 46px; white-space: normal; }
.nb-print-frame-wrap { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; min-width: 0; width: 100%; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: #fff; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.nb-print-frame { display: block; flex: 1 0 auto; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; height: 100%; min-height: 70vh; min-height: 70dvh; margin: 0; border: 0; background: #fff; color-scheme: light; }
.nb-print-status { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; min-width: 0; max-height: 16vh; max-height: 16dvh; margin: 0; overflow-y: auto; overflow-x: hidden; color: var(--muted); font-size: 13px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.nb-print-preview > [data-pdf-result] { flex: 0 1 auto; min-height: 0; max-height: 25vh; max-height: 25dvh; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; }
.nb-print-status:empty { display: none; }
.nb-print-status.is-error, .nb-print-status[data-state='error'], .nb-print-status[role='alert'] { padding: 10px 12px; border: 1px solid var(--danger); border-radius: var(--radius-sm, 8px); color: var(--danger); background: var(--danger-soft); }
.nb-print-status.is-loading::before, .nb-print-status[data-state='loading']::before { content: ''; flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
[data-skin='ops'] .notebook { --nb-radius: 8px; }
[data-skin='ops'] .nb-field input, [data-skin='ops'] .nb-field select, [data-skin='ops'] .nb-field textarea { background: var(--panel-solid); }
@media (min-width: 600px) {
  .nb-fields, .nb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nb-fields .full, .nb-grid .full { grid-column: 1 / -1; }
  .nb-template-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .nb-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nb-header { flex-wrap: nowrap; }
  .nb-card { padding: 21px; }
  .nb-technical-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nb-technical-canvas { min-height: 440px; }
}
@media (min-width: 1100px) {
  .nb-workspace { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .nb-workspace > .nb-drawing, .nb-workspace > [data-drawing] { position: sticky; top: 90px; }
  .nb-drawing-svg { max-height: 66vh; max-height: 66dvh; }
}
@media (min-width: 701px) {
  .nb-print-toolbar > .nb-print-actions { flex: 0 1 auto; width: auto; }
  .nb-print-toolbar > .nb-print-actions > .nb-button { flex: 0 1 auto; }
}
@media (max-width: 700px) {
  .nb-print-dialog { width: 100vw; width: 100dvw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: max(12px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); border: 0; border-radius: 0; }
  .nb-print-toolbar { gap: 10px; padding-bottom: 10px; }
  .nb-print-toolbar h2, .nb-print-toolbar h3 { flex-basis: 100%; font-size: 17px; }
  .nb-print-toolbar > .nb-button { flex: 1 1 140px; }
  .nb-print-preview { gap: 10px; }
}
@media (max-width: 900px) {
  .nb-footer { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .notebook { gap: 14px; padding-bottom: 8px; }
  .notebook.nb-measuring-edge .nb-workspace { display: block; }
  .notebook.nb-measuring-edge .nb-workspace > [data-drawing] { position: sticky; top: 74px; z-index: 15; align-self: start; padding: 6px; margin-bottom: 14px; gap: 0; box-shadow: var(--shadow-pop, var(--shadow)); }
  .notebook.nb-measuring-edge [data-drawing] .nb-drawing-stage { width: 100%; }
  .notebook.nb-measuring-edge [data-drawing] .nb-drawing-svg { max-height: 28vh; max-height: 28dvh; }
  .notebook.nb-measuring-edge [data-drawing] > :not(.nb-drawing-stage) { display: none; }
  .notebook.nb-measuring-edge [data-figure-field], .notebook.nb-measuring-edge .nb-field:has(input[data-bind^='sides.']) { scroll-margin-top: calc(98px + 28vh); scroll-margin-top: calc(98px + 28dvh); }
}
@media (max-width: 420px) {
  .nb-card { padding: 14px; }
  .nb-header { gap: 8px; }
  .nb-header > .nb-button { padding: 10px; }
  .nb-list-item { padding: 12px; gap: 10px; flex-wrap: wrap; }
  .nb-list-item > .nb-actions { flex-basis: 100%; }
  .nb-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .nb-template-grid > .nb-card { padding: 10px; gap: 9px; }
  .nb-template-grid .nb-button { padding: 9px 6px; font-size: 12px; }
  .nb-template { font-size: 11px; min-height: 122px; }
  .nb-tabs > button { font-size: 12px; padding: 8px 5px; }
  .nb-footer { padding: 9px; gap: 7px; }
  .nb-footer > .nb-button { padding: 11px 10px; font-size: 13px; }
  .nb-technical-toolbar { gap: 6px; }
  .nb-technical-toolbar button { padding: 10px; font-size: 13px; }
  .nb-technical-group { padding: 11px; }
  .nb-technical-dialog .nb-technical-toolbar button[data-tech]:not([data-tech='fullscreen']) { width: 44px; padding: 10px; flex: 0 0 44px; }
  .nb-technical-dialog .nb-technical-toolbar button[data-tech]:not([data-tech='fullscreen']) span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .nb-technical-canvas { height: 65vh; height: 65dvh; min-height: 240px; }
  .nb-technical-dialog { padding: max(6px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .nb-technical-dialog .nb-technical { gap: 7px; }
  .nb-technical-dialog .nb-technical-canvas { height: auto; min-height: 0; }
}
@media (orientation: landscape) and (max-width: 1000px) and (max-height: 600px) {
  .nb-print-dialog { width: 100vw; width: 100dvw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: max(8px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); border: 0; border-radius: 0; }
  .nb-print-preview { overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; }
  .nb-print-toolbar { position: sticky; top: 0; z-index: 2; gap: 7px 12px; padding-bottom: 8px; background: var(--panel-solid); }
  .nb-print-toolbar h2, .nb-print-toolbar h3 { flex-basis: 160px; }
  .nb-print-toolbar > .nb-print-actions { flex: 0 1 auto; width: auto; }
  .nb-print-frame-wrap { min-height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .notebook *, .notebook *::before, .notebook *::after { animation-duration: .01ms; transition-duration: .01ms; }
  .nb-print-status::before { animation: none; }
}

/* „Kształty”: group headings (Łuki, Trapezy, Trójkąty, Okrągłe i wielokąty). */
.nb-template-group { margin: 14px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* Ustawienia luzów firmy i osoby — lista nie wypycha formularza na telefonie. */
.nb-settings { min-width: 0; width: 100%; color: var(--text); }
.nb-settings-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 18px; width: 100%; min-width: 0; }
.nb-settings-layout > * { min-width: 0; max-width: 100%; }
.nb-settings-accounts { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nb-settings-accounts > h3 { margin: 0; }
.nb-settings-search { min-width: 0; margin: 0; }
.nb-settings-search input { min-height: 46px; font-size: 16px; }
.nb-settings-target-list { display: flex; flex-direction: column; flex: 0 1 auto; gap: 8px; min-height: 64px; max-height: 32vh; max-height: 32dvh; min-width: 0; padding: 4px; margin: -4px; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.nb-settings-account { display: flex; flex-direction: column; flex: 0 0 auto; align-items: stretch; gap: 5px; width: 100%; min-width: 0; min-height: 64px; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); color: var(--text); background: var(--panel-solid); font: inherit; font-size: 14px; line-height: 1.4; text-align: left; overflow-wrap: anywhere; cursor: pointer; touch-action: manipulation; }
.nb-settings-account:hover { background: var(--panel-hover); border-color: var(--accent); }
.nb-settings-account.is-active, .nb-settings-account[aria-current='true'] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.nb-settings-account > strong { display: block; font-size: 15px; font-weight: 650; }
.nb-settings-account.is-active > strong, .nb-settings-account[aria-current='true'] > strong { color: var(--accent); }
.nb-settings-account .nb-muted { font-size: 13px; }
.nb-settings-account:disabled { opacity: .55; cursor: not-allowed; }
.nb-settings-custom { align-self: flex-start; max-width: 100%; font-size: 12px; white-space: normal; }
.nb-settings-editor, .nb-settings-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nb-settings-header { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.nb-settings-header > h3, .nb-settings-header > p { margin: 0; }
.nb-settings-fields { min-width: 0; gap: 14px; }
.nb-settings-fields .nb-field { font-size: 14px; }
.nb-settings-fields input, .nb-settings-fields select { min-height: 46px; font-size: 16px; }
.nb-settings-field-error { color: var(--danger); font-size: 12px; font-weight: 500; line-height: 1.4; }
.nb-settings-fields .nb-settings-field-error { color: var(--danger); }
.nb-settings-preview { min-width: 0; margin: 0; font-variant-numeric: tabular-nums; }
.nb-settings-preview dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 7px 12px; margin: 10px 0 0; font-size: 14px; }
.nb-settings-preview dt { color: var(--muted); }
.nb-settings-preview dd { margin: 0; color: var(--text); font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.nb-settings-history { min-width: 0; padding-top: 16px; border-top: 1px solid var(--border-strong); color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.nb-settings-history h3, .nb-settings-history h4 { margin-bottom: 9px; color: var(--text); font-size: 15px; }
.nb-settings-history ol, .nb-settings-history ul { margin: 0; padding-left: 20px; }
.nb-settings-history li { padding: 7px 0; }
.nb-settings-history li + li { border-top: 1px solid var(--border); }
.nb-settings-actions { display: flex; flex-wrap: wrap; gap: 9px; width: 100%; min-width: 0; }
.nb-settings-actions > .nb-button { flex: 1 1 140px; min-height: 46px; }
.nb-settings-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.nb-settings-error { margin: 0; padding: 12px; border: 1px solid var(--danger); border-radius: var(--radius-sm, 8px); color: var(--danger); background: var(--danger-soft); font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.nb-settings-field-error:empty, .nb-settings-status:empty, .nb-settings-error:empty { display: none; }
.nb-settings-discard { min-width: 0; padding: 14px; border: 1px solid var(--warn); border-radius: var(--radius-sm, 8px); color: var(--warn); background: var(--warn-soft); font-size: 14px; line-height: 1.5; }
.nb-settings-discard > p { margin-bottom: 12px; }
.nb-settings-discard .nb-actions { margin-top: 12px; }
@media (min-width: 1000px) {
  .nb-settings-layout { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
  .nb-settings-accounts { position: sticky; top: 90px; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); }
  .nb-settings-target-list { max-height: 60vh; max-height: 60dvh; }
}
@media (max-width: 420px) {
  .nb-settings-layout { gap: 14px; }
  .nb-settings-account { padding: 11px; }
  .nb-settings-discard .nb-button { flex-basis: 100%; }
}

.nb-building-list { display: grid; gap: 14px; min-width: 0; }
.nb-building-row { display: flex; flex-direction: column; gap: 12px; }
.nb-building-row > h4, .nb-building-row > p { margin: 0; }
.nb-building-row .nb-actions { flex-wrap: wrap; }
.nb-building-row .nb-actions > button { flex: 1 1 130px; white-space: normal; }
.nb-building-validation { padding-left: 32px; }
.nb-facade-tabs > button { flex-basis: 120px; }
.nb-table-scroll, .nb-facade-table-scroll { width: 100%; max-width: 100%; overflow: auto; overscroll-behavior-x: contain; border: 1px solid var(--border-strong); border-radius: var(--nb-radius); }
.nb-facade-changes { width: 100%; min-width: 700px; border-collapse: collapse; font-size: 14px; }
.nb-facade-changes th, .nb-facade-changes td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.nb-facade-changes thead { background: var(--bg-2); }
.nb-facade-changes td small { display: block; margin-top: 5px; color: var(--muted); }
.nb-facade .nb-technical-legend { min-width: 0; }
.nb-facade .nb-technical-toolbar > button { white-space: normal; }
@media (min-width: 1000px) { .nb-building-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.nb-technical-dialog .nb-technical-toolbar [data-facade='full'] { flex: 1 1 0; }
@media (max-width: 600px) {
  .nb-technical-dialog .nb-technical-toolbar button[data-facade]:not([data-facade='full']) { width: 44px; padding: 10px; flex: 0 0 44px; }
  .nb-technical-dialog .nb-technical-toolbar button[data-facade]:not([data-facade='full']) span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
}

/* ExpresOS — trwały arkusz wymiaru WP-05. Własne tokeny gwarantują kontrast. */
.nb-dimension-sheet {
  --nb-sheet-bg: #ffffff;
  --nb-sheet-text: #172126;
  --nb-sheet-muted: #49585f;
  --nb-sheet-key: #edf1f3;
  --nb-sheet-accent: #005b83;
  --nb-sheet-error: #a61c29;
  --nb-sheet-gap: 4px;
  --nb-sheet-control-height: 48px;
  --nb-sheet-input-height: 56px;
  --nb-sheet-key-height: 56px;
  --nb-sheet-hint-height: 20.8px;
  --nb-sheet-padding-y: 6px;
  --nb-sheet-border-width: 1px;
  position: fixed; z-index: 70;
  inset: auto 0 var(--nb-sheet-bottom, 0px);
  width: min(100%, 560px); max-width: 100%; min-width: 0;
  max-height: var(--nb-sheet-height, calc(100dvh - 8px));
  margin: 0 auto;
  padding: var(--nb-sheet-padding-y) max(12px, env(safe-area-inset-right, 0px)) max(var(--nb-sheet-padding-y), env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: var(--nb-sheet-gap);
  background: var(--nb-sheet-bg); color: var(--nb-sheet-text);
  border: var(--nb-sheet-border-width) solid var(--nb-sheet-muted); border-radius: 14px 14px 0 0;
  box-shadow: 0 -6px 28px #0003;
  font-family: var(--font, system-ui, sans-serif); font-size: 16px; line-height: 1.3;
  overflow: auto; overflow-x: hidden; overscroll-behavior: contain;
}
.nb-dimension-sheet, .nb-dimension-sheet * { box-sizing: border-box; }
.nb-dimension-sheet[hidden], .nb-dimension-sheet [hidden] { display: none !important; }
.nb-dimension-sheet p, .nb-dimension-sheet h3 { margin: 0; }
.nb-dimension-sheet button {
  min-width: var(--nb-sheet-control-height); min-height: var(--nb-sheet-control-height); margin: 0; padding: 8px;
  border: 1px solid var(--nb-sheet-muted); border-radius: 8px;
  background: var(--nb-sheet-key); color: var(--nb-sheet-text);
  font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer;
  touch-action: manipulation; overflow-wrap: anywhere;
}
.nb-dimension-sheet button:active { box-shadow: inset 0 0 0 2px var(--nb-sheet-accent); }
.nb-dimension-sheet :focus-visible { outline: 3px solid var(--nb-sheet-accent); outline-offset: 1px; }
.nb-sheet-header { display: flex; gap: var(--nb-sheet-gap); align-items: center; flex-shrink: 0; }
.nb-sheet-header .nb-sheet-label {
  flex: 1; min-width: 0; padding: 0; border: 0;
  background: transparent; text-align: left; font-size: 20px; font-weight: 650; line-height: 1.2;
  white-space: normal; overflow-wrap: anywhere;
}
.nb-sheet-header .nb-sheet-label[aria-expanded='true'] { white-space: normal; overflow-wrap: anywhere; }
.nb-sheet-hint {
  min-height: var(--nb-sheet-hint-height); flex-shrink: 0;
  font-size: 16px; line-height: 1.3; color: var(--nb-sheet-muted);
  white-space: normal; overflow-wrap: anywhere;
}
.nb-sheet-hint[data-expanded='true'] { height: auto; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.nb-sheet-input-row { display: flex; align-items: stretch; gap: var(--nb-sheet-gap); flex-shrink: 0; }
.nb-dimension-sheet .nb-sheet-input {
  flex: 1 1 48%; width: 0; min-width: 0; min-height: var(--nb-sheet-input-height); height: var(--nb-sheet-input-height); padding: 4px 8px;
  border: 2px solid var(--nb-sheet-accent); border-radius: 8px;
  background: var(--nb-sheet-bg); color: var(--nb-sheet-text);
  font: inherit; font-size: 36px; font-weight: 650; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.nb-sheet-input[aria-invalid='true'] { border-color: var(--nb-sheet-error); }
.nb-sheet-header .nb-sheet-unit, .nb-sheet-header .nb-sheet-keyboard-toggle, .nb-sheet-header .nb-sheet-close { flex: 0 0 var(--nb-sheet-control-height); width: var(--nb-sheet-control-height); padding: 4px; }
.nb-sheet-header .nb-sheet-close, .nb-sheet-header .nb-sheet-keyboard-toggle { font-size: 24px; }
.nb-sheet-metadata { flex: 1 1 52%; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.nb-sheet-echo, .nb-sheet-previous { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nb-sheet-echo { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nb-sheet-previous { font-size: 16px; color: var(--nb-sheet-muted); }
.nb-sheet-error { font-size: 16px; font-weight: 600; color: var(--nb-sheet-error); }
.nb-sheet-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--nb-sheet-gap); flex-shrink: 0; }
.nb-sheet-keypad { flex-shrink: 0; }
.nb-numpad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(88px, 1fr); grid-template-rows: repeat(4, minmax(var(--nb-sheet-key-height, 56px), auto)); gap: var(--nb-sheet-gap, 4px); }
.nb-numpad button { min-height: 56px; min-height: var(--nb-sheet-key-height, 56px); min-width: 56px; font-size: 24px; font-weight: 650; }
.nb-numpad [data-key='1'], .nb-numpad [data-key='4'], .nb-numpad [data-key='7'], .nb-numpad [data-key='decimal'] { grid-column: 1; }
.nb-numpad [data-key='2'], .nb-numpad [data-key='5'], .nb-numpad [data-key='8'] { grid-column: 2; }
.nb-numpad [data-key='3'], .nb-numpad [data-key='6'], .nb-numpad [data-key='9'] { grid-column: 3; }
.nb-numpad [data-key='1'], .nb-numpad [data-key='2'], .nb-numpad [data-key='3'], .nb-numpad [data-key='backspace'] { grid-row: 1; }
.nb-numpad [data-key='4'], .nb-numpad [data-key='5'], .nb-numpad [data-key='6'], .nb-numpad [data-key='sign'] { grid-row: 2; }
.nb-numpad [data-key='7'], .nb-numpad [data-key='8'], .nb-numpad [data-key='9'] { grid-row: 3; }
.nb-numpad [data-key='decimal'], .nb-numpad [data-key='0'] { grid-row: 4; }
.nb-numpad [data-key='backspace'], .nb-numpad [data-key='sign'] { grid-column: 4; }
.nb-numpad [data-key='0'] { grid-column: 2 / span 2; }
.nb-numpad [data-key='next'] {
  grid-column: 4; grid-row: 3 / span 2;
  color: var(--nb-sheet-bg); background: var(--nb-sheet-accent);
  padding: 8px 4px; font-size: 16px;
  white-space: nowrap; overflow-wrap: normal; word-break: normal;
}
.nb-ruler-svg { display: block; width: 100%; min-height: 44px; overflow: visible; }
.nb-ruler-hint { pointer-events: none; }
:root[data-theme='dark'] .nb-dimension-sheet {
  --nb-sheet-bg: #1c2327;
  --nb-sheet-text: #f4f7f9;
  --nb-sheet-muted: #bac9d1;
  --nb-sheet-key: #29353d;
  --nb-sheet-accent: #a8dcff;
  --nb-sheet-error: #ffb4bd;
}
.nb-sun .nb-dimension-sheet, .nb-dimension-sheet.nb-sun, [data-nb-sun='true'] .nb-dimension-sheet {
  --nb-sheet-bg: #ffffff;
  --nb-sheet-text: #000000;
  --nb-sheet-muted: #222222;
  --nb-sheet-key: #ffffff;
  --nb-sheet-accent: #003c58;
  --nb-sheet-error: #8c0c19;
  font-size: 18px; font-weight: 600;
}
.nb-sun .nb-dimension-sheet button, .nb-dimension-sheet.nb-sun button, [data-nb-sun='true'] .nb-dimension-sheet button { min-height: 56px; font-weight: 650; }
@media (prefers-reduced-motion: reduce) { .nb-ruler-hint { animation: none; transition: none; } }

/* ExpresOS — P3 reserves the actual docked sheet, including safe areas and sun mode. */
.nb-measure-screen { --nb-measure-header-height: 48px; min-width: 0; }
.nb-measure-header { height: var(--nb-measure-header-height); display: flex; align-items: center; gap: 4px; min-width: 0; }
.nb-measure-header .nb-button { min-width: 48px; padding: 4px; }
.nb-measure-header > div { min-width: 0; display: grid; }
.nb-measure-header strong, .nb-measure-header [data-save-state] { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nb-measure-header strong { font-size: 16px; }
.nb-measure-header [data-save-state] { font-size: 12px; }
.nb-measuring-scene { position: sticky; top: 0; flex: 0 0 auto; height: 56dvh; min-height: 200px; max-height: 560px; z-index: 1; isolation: isolate; contain: layout paint; overflow: hidden; background: var(--panel-solid, var(--bg)); }
.nb-measuring-scene > div, .nb-measuring-scene .nb-drawing { height: 100%; min-height: 0; }
.nb-measuring-scene svg { max-height: 100%; }
.nb-dimension-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.nb-dimension-pill { min-width: 48px; min-height: 48px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 12px; font: inherit; font-size: 16px; background: var(--panel-solid); color: var(--text); }
.nb-dimension-pill.is-active { outline: 3px solid var(--accent); outline-offset: -3px; font-weight: 700; }
.nb-measuring-edge [data-side].is-active { color: var(--accent); }
.nb-measuring-edge [data-side].is-active path, .nb-measuring-edge [data-side].is-active line { stroke: var(--accent); stroke-width: 4px; }
.nb-measure-details > summary { min-height: 48px; padding: 12px; cursor: pointer; font-weight: 650; }
.nb-equipment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nb-equipment-tile { min-height: 96px; min-width: 0; display: grid; gap: 8px; text-align: left; font: inherit; color: var(--text); }
.nb-opening-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.nb-fit-scene { height: 36dvh; min-height: 180px; }
.nb-equipment-scene { height: 24dvh; min-height: 120px; }
.nb-sheet-plausibility:empty { display: none; }
.nb-sheet-plausibility .nb-alert { margin: 0; padding: 4px 6px; font-size: 14px; }
.nb-sheet-plausibility .nb-alert > span { display: block; }
.nb-sheet-plausibility .nb-button { font-size: 16px; }
.nb-edge-adjust { display: flex; gap: 4px; flex-wrap: wrap; }
.nb-assumed { border-style: dashed; }
.nb-delete-undo { position: fixed; bottom: max(68px, env(safe-area-inset-bottom)); left: 12px; right: 12px; z-index: 80; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--panel-solid); border: 2px solid var(--text); border-radius: 12px; }
.nb-sun { --nb-measure-header-height: 56px; color: #000; background: #fff; --text: #000; --muted: #222; --panel-solid: #fff; --bg: #fff; --border-strong: #222; --accent: #003c58; font-size: 18px; font-weight: 600; }
.nb-sun .nb-button, .nb-sun .nb-dimension-pill, .nb-sun .nb-tabs > button, .nb-sun summary { min-height: 56px; font-weight: 650; }
.nb-sun .nb-measure-header strong { font-size: 18px; }
.nb-sun .nb-dimension-sheet { --nb-sheet-control-height: 56px; }
.nb-queue-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.nb-queue-fields > label { min-width: 0; overflow-wrap: anywhere; }
.nb-queue-fields select { max-width: 100%; min-height: 48px; }
@media (max-width: 700px) {
  .nb-measure-screen { position: fixed; inset: 0; z-index: 60; padding: 0 8px max(8px, env(safe-area-inset-bottom)); background: var(--bg); overflow: auto; overscroll-behavior: contain; }
  .nb-measure-screen .nb-body { min-width: 0; gap: 6px; }
  .nb-measure-screen .nb-measuring-scene { height: 40dvh; }
  .nb-measure-screen.nb-sheet-open { overflow: hidden; }
  .nb-sheet-open .nb-measuring-scene { height: min(27dvh, max(80px, calc(100dvh - var(--nb-live-sheet-height, 448px) - var(--nb-measure-header-height) - 4px))); min-height: 0; }
  .nb-sheet-open .nb-dimension-pills, .nb-sheet-open .nb-measure-details, .nb-sheet-open .nb-measure-primary, .nb-sheet-open [data-fit-invalidated] { display: none; }
  .nb-sheet-open > .nb-steps { display: none; }
  .nb-sheet-open [data-plausibility] { max-height: 0; overflow: hidden; }
  .nb-sheet-root .nb-dimension-sheet { max-height: min(var(--nb-sheet-height), calc(100dvh - 144px)); }
  .nb-equipment-grid { gap: 8px; }
}

/* ExpresOS — zdjęcia zachowane na telefonie, opisy i adnotacje WP-15. */
.nb-photos {
  --nb-photo-bg: #ffffff;
  --nb-photo-text: #172126;
  --nb-photo-muted: #49585f;
  --nb-photo-accent: #005b83;
  --nb-photo-pending: #674800;
  --nb-photo-pending-bg: #fff4d6;
  --nb-photo-error: #a61c29;
  --nb-photo-error-bg: #fff0f1;
  --nb-photo-border: #66747c;
  display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 100%;
  color: var(--nb-photo-text); font-size: 16px; line-height: 1.5;
}
.nb-photos *, .nb-photos *::before, .nb-photos *::after { box-sizing: border-box; }
.nb-photos [hidden] { display: none !important; }
.nb-photos h3, .nb-photos p { margin: 0; }
.nb-photos .nb-muted { color: var(--nb-photo-muted); font-size: 16px; }
.nb-photos .nb-button {
  min-width: 56px; min-height: 56px; padding: 12px; font-size: 16px;
  color: var(--nb-photo-text); background: var(--nb-photo-bg); border-color: var(--nb-photo-border);
  white-space: normal; overflow-wrap: anywhere; font-weight: 650;
}
.nb-photos .nb-button.is-primary {
  color: #ffffff; background: #005b83; border-color: #005b83;
}
.nb-photos .nb-button.is-danger {
  color: var(--nb-photo-error); background: var(--nb-photo-error-bg); border-color: var(--nb-photo-error);
}
.nb-photos .nb-button[aria-pressed='true'] {
  color: var(--nb-photo-accent); background: var(--nb-photo-bg); border-color: var(--nb-photo-accent);
  box-shadow: inset 0 0 0 2px var(--nb-photo-accent);
}
.nb-photos :focus-visible { outline: 3px solid var(--nb-photo-accent); outline-offset: 3px; }
.nb-photo-toolbar, .nb-photo-actions, .nb-photo-annotation-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; max-width: 100%;
}
.nb-photo-toolbar > .nb-button, .nb-photo-actions > .nb-button, .nb-photo-annotation-tools > .nb-button { flex: 1 1 132px; }
.nb-photo-status, .nb-photo-state { color: var(--nb-photo-muted); font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.nb-photo-status:empty, .nb-photo-error:empty { display: none; }
.nb-photos .nb-photo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.nb-photo-card {
  display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 100%; padding: 12px;
  color: var(--nb-photo-text); background: var(--nb-photo-bg);
  border: 1px solid var(--nb-photo-border); border-radius: var(--radius-sm, 8px);
}
.nb-photos .nb-photo-preview {
  display: block; position: relative; width: 100%; min-width: 56px; min-height: 56px; padding: 0;
  aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--nb-photo-border);
  border-radius: var(--radius-sm, 8px); color: var(--nb-photo-text); background: var(--nb-photo-bg); cursor: pointer;
}
.nb-photo-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.nb-photo-state { padding: 7px 10px; border: 1px solid var(--nb-photo-border); border-radius: 6px; }
.nb-photo-card.is-pending .nb-photo-state { color: var(--nb-photo-pending); background: var(--nb-photo-pending-bg); border-color: var(--nb-photo-pending); }
.nb-photo-card.is-error .nb-photo-state, .nb-photo-error {
  color: var(--nb-photo-error); background: var(--nb-photo-error-bg); border: 1px solid var(--nb-photo-error);
}
.nb-photo-card.is-deleted { border-style: dashed; }
.nb-photo-card.is-deleted .nb-photo-preview { opacity: .55; }
.nb-photo-fields, .nb-photo-background-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.nb-photo-fields label, .nb-photo-background-controls label {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--nb-photo-text); font-size: 16px; font-weight: 600;
}
.nb-photo-fields input, .nb-photo-fields select, .nb-photo-fields textarea,
.nb-photo-annotation-number, .nb-photo-background-controls input {
  width: 100%; min-width: 0; max-width: 100%; min-height: 56px; padding: 10px 12px;
  border: 1px solid var(--nb-photo-border); border-radius: var(--radius-sm, 8px);
  color: var(--nb-photo-text); background: var(--nb-photo-bg); font: inherit; font-size: 16px; line-height: 1.4;
}
.nb-photo-fields select { text-overflow: ellipsis; padding-right: 24px; }
.nb-photo-fields textarea { min-height: 96px; resize: vertical; }
.nb-photo-background-controls { padding: 12px; border: 1px solid var(--nb-photo-border); border-radius: var(--radius-sm, 8px); }
.nb-photo-background-controls input[type='range'] { padding: 10px 0; accent-color: var(--nb-photo-accent); touch-action: pan-y; }
.nb-photo-error { padding: 12px; border-radius: var(--radius-sm, 8px); font-size: 16px; line-height: 1.5; }
.nb-photo-undo {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-width: 0;
  padding: 10px 12px; color: var(--nb-photo-text); background: var(--nb-photo-bg);
  border: 2px solid var(--nb-photo-text); border-radius: var(--radius-sm, 8px); font-size: 16px;
}
.nb-photo-undo > .nb-button { flex: 0 1 132px; }
.nb-photo-annotator {
  display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 100%; padding: 12px;
  border: 2px solid var(--nb-photo-accent); border-radius: var(--radius-sm, 8px);
  color: var(--nb-photo-text); background: var(--nb-photo-bg);
}
.nb-photo-annotation-stage {
  position: relative; display: block; min-width: 0; width: 100%; overflow: hidden;
  border: 1px solid var(--nb-photo-border); border-radius: 6px; background: var(--nb-photo-bg);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair;
}
.nb-photo-annotation-image { display: block; width: 100%; height: auto; pointer-events: none; }
.nb-photo-annotation-overlay { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: hidden; touch-action: none; }
.nb-photo-annotation-overlay text { font-family: var(--font, system-ui, sans-serif); font-weight: 700; paint-order: stroke fill; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.nb-photo-annotation-tools > label { flex: 1 1 132px; min-width: 0; font-weight: 600; }
.nb-photo-annotation-number { margin-top: 6px; }
:root[data-theme='dark'] .nb-photos, :root:where(:not([data-theme='light']):not([data-skin='ops'])) .nb-photos {
  --nb-photo-bg: #1c2327; --nb-photo-text: #f4f7f9; --nb-photo-muted: #bac9d1; --nb-photo-accent: #a8dcff;
  --nb-photo-pending: #ffe3a0; --nb-photo-pending-bg: #372c12;
  --nb-photo-error: #ffb4bd; --nb-photo-error-bg: #3b2026; --nb-photo-border: #bac9d1;
}
:root .nb-sun .nb-photos, :root .nb-photos.nb-sun, :root [data-nb-sun='true'] .nb-photos {
  --nb-photo-bg: #ffffff; --nb-photo-text: #000000; --nb-photo-muted: #222222; --nb-photo-accent: #003c58;
  --nb-photo-pending: #4c3300; --nb-photo-pending-bg: #ffffff;
  --nb-photo-error: #8c0c19; --nb-photo-error-bg: #ffffff; --nb-photo-border: #222222;
  font-size: 18px; font-weight: 600;
}
.nb-sun .nb-photos .nb-button, .nb-sun .nb-photos label, .nb-sun .nb-photos input, .nb-sun .nb-photos select,
.nb-sun .nb-photos textarea, .nb-sun .nb-photos .nb-muted, .nb-sun .nb-photo-status, .nb-sun .nb-photo-state, .nb-sun .nb-photo-error {
  min-height: 56px; font-size: 18px; font-weight: 600;
}
@media (min-width: 640px) { .nb-photos .nb-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .nb-photos .nb-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) {
  .nb-photo-toolbar > .nb-button { flex-basis: 100%; }
  .nb-photo-card, .nb-photo-annotator { padding: 10px; }
  .nb-photo-actions > .nb-button, .nb-photo-annotation-tools > .nb-button { flex-basis: 100%; }
}

/* ExpresOS — WP-19: odczyty klienta i odizolowany kreator na telefonie pracownika. */
.nb-client-entry .nb-button, .nb-client-panel .nb-button, .nb-client-link .nb-button { min-height: 48px; font-size: 16px; }
.nb-client-badge { display: inline-block; max-width: 100%; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--warn, #946000); color: var(--text); background: var(--warn-soft, #fff4d6); font-size: 14px; font-weight: 650; line-height: 1.4; }
.nb-client-badge-measuring { border-style: dashed; background: var(--accent-soft); }
.nb-client-badge-verified { border-color: var(--success); background: var(--success-soft); }
.nb-client-panel, .nb-client-link, .nb-client-readings, .nb-client-reading { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nb-client-panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.nb-client-reading { padding: 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--panel-solid); }
.nb-client-reading h3, .nb-client-reading h4 { margin-bottom: 0; }
.nb-client-facts, .nb-client-link-details { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; }
.nb-client-facts > div, .nb-client-link-details > div { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.nb-client-facts dt, .nb-client-link-details dt { font-size: 14px; color: var(--muted); }
.nb-client-facts dd, .nb-client-link-details dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.nb-client-readings-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 16px; }
.nb-client-readings-table caption { text-align: left; padding-bottom: 12px; font-weight: 650; }
.nb-client-readings-table th, .nb-client-readings-table td { vertical-align: top; text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.nb-client-readings-table th { width: 48%; font-weight: 600; }
.nb-client-readings-table small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.nb-client-actions, .nb-client-history { display: flex; flex-wrap: wrap; gap: 10px; }
.nb-client-actions > *, .nb-client-history > * { flex: 1 1 180px; }
.nb-client-decisions, .nb-client-opening-actions { display: flex; flex-direction: column; min-width: 0; gap: 12px; }
.nb-client-decisions textarea { display: block; width: 100%; min-height: 96px; margin-top: 8px; padding: 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 8px; }
.nb-client-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.nb-client-photo { min-width: 0; margin: 0; }
.nb-client-photo img { width: 100%; max-height: 240px; object-fit: contain; border-radius: 8px; background: var(--bg-2); }
.nb-client-photo figcaption { display: flex; flex-direction: column; gap: 5px; font-size: 14px; overflow-wrap: anywhere; }
.nb-client-plain-text { white-space: pre-wrap; }
.nb-client-error, .nb-client-warnings, .nb-client-conflict, .nb-client-sms-notice, .nb-client-confirm { padding: 14px; border: 1px solid var(--danger); border-radius: 10px; color: var(--text); background: var(--danger-soft); }
.nb-client-warnings, .nb-client-sms-notice, .nb-client-confirm { border-color: var(--warn, #946000); background: var(--warn-soft, var(--panel-solid)); }
.nb-client-message, .nb-client-status { overflow-wrap: anywhere; font-size: 16px; }
.nb-client-conflict-versions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.nb-client-conflict pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; margin: 0; font-size: 14px; }
.nb-client-link-address { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 56px; padding: 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 8px; }
.nb-client-link-dialog { color: var(--text); background: var(--bg); }
body.nb-client-active > :not(.nb-client-mode):not(script):not(link) { visibility: hidden !important; }
.nb-client-mode { position: fixed; inset: 0; z-index: 22000; width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #f5f7f9; color: #172b3a; overflow: auto; overscroll-behavior: contain; }
.nb-client-mode[open] { display: block; }
.nb-client-mode::backdrop { background: #f5f7f9; }
.nb-client-mode-host { width: 100%; min-width: 0; }
.nb-client-mode [hidden] { display: none !important; }
.nb-client-mode *, .nb-client-mode *::before, .nb-client-mode *::after { box-sizing: border-box; }
.nb-client-exit-confirm { width: 100%; min-height: 100%; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); font: 18px/1.5 system-ui, sans-serif; }
.nb-client-exit-confirm button, .nb-client-mode-host > button { display: block; width: 100%; min-height: 56px; padding: 14px; margin: 16px 0; border: 2px solid #145d8c; border-radius: 12px; background: #fff; color: #172b3a; font: 650 18px/1.4 system-ui, sans-serif; cursor: pointer; }
.nb-client-exit-confirm [data-employee-exit] { color: #fff; background: #145d8c; }
.nb-client-mode :focus-visible { outline: 3px solid #145d8c; outline-offset: 3px; }
.nb-sun .nb-client-button, .nb-sun .nb-client-entry .nb-button { min-height: 56px; font-size: 18px; }
@media (min-width: 700px) { .nb-client-facts, .nb-client-link-details, .nb-client-conflict-versions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nb-client-link-address label { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.nb-client-link-address input { width: 100%; min-width: 0; max-width: 100%; min-height: 56px; padding: 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 8px; }

/* Rodzaj pomiaru i wyposażenie dostępne przy otworze, również na telefonie. */
.nb-scenario-choice { min-width: 0; padding: 12px; }
.nb-scenario-choice h3, .nb-scenario-choice h4 { margin: 0 0 8px; }
.nb-scenario-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.nb-scenario-tile { display: flex; align-items: center; gap: 12px; position: relative; min-width: 0; min-height: 94px; padding: 14px 12px; border: 2px solid var(--border-strong, #72838e); border-radius: 12px; background: var(--panel-solid, #fff); color: var(--text, #172b3a); font: inherit; text-align: left; cursor: pointer; }
.nb-scenario-tile > svg { flex: 0 0 56px; }
.nb-scenario-tile > span:not(.nb-scenario-check) { min-width: 0; flex: 1; }
.nb-scenario-tile strong, .nb-scenario-tile small { display: block; overflow-wrap: anywhere; }
.nb-scenario-tile strong { font-size: 18px; line-height: 1.35; }
.nb-scenario-tile small { margin-top: 6px; color: var(--muted, #526570); font-size: 16px; line-height: 1.45; }
.nb-scenario-tile.is-selected { border-color: var(--accent, #145d8c); background: var(--accent-soft, #e6f1f7); }
.nb-scenario-check { align-self: flex-start; font-size: 20px; font-weight: 800; color: var(--accent, #145d8c); }
.nb-old-type-choice { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border, #bac4ca); }
.nb-replacement-choice { min-width: 0; padding: 12px; margin: 8px 0; border: 1px solid var(--border-strong, #72838e); border-radius: 10px; }
.nb-replacement-choice legend { padding: 0 6px; font-weight: 700; font-size: 16px; }
.nb-replacement-choice .nb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-replacement-choice .nb-button { flex: 1 1 76px; }
.nb-quick-equipment { min-width: 0; margin: 10px 0; border: 1px solid var(--border-strong, #72838e); border-radius: 12px; padding: 12px; background: var(--panel-solid, #fff); }
.nb-quick-equipment h3 { margin: 0; font-size: 18px; }
.nb-quick-section { min-width: 0; border-top: 1px solid var(--border, #bac4ca); }
.nb-quick-section > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 56px; padding: 14px 0; box-sizing: border-box; font-size: 17px; font-weight: 700; cursor: pointer; }
.nb-quick-section > summary::before { content: '▸'; }
.nb-quick-section[open] > summary::before { content: '▾'; }
.nb-quick-section > summary::-webkit-details-marker { display: none; }
.nb-quick-section > summary > span { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-left: auto; color: var(--accent, #145d8c); font-size: 14px; font-weight: 600; }
.nb-quick-empty { color: var(--muted, #526570); font-size: inherit; font-weight: 400; }
.nb-quick-section-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 14px; min-width: 0; }
.nb-quick-tabs, .nb-quick-align { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nb-quick-equipment button { min-height: 48px; min-width: 48px; padding: 10px 12px; border: 1px solid var(--border-strong, #72838e); border-radius: 8px; color: var(--text, #172b3a); background: var(--panel-solid, #fff); font: inherit; font-size: 16px; line-height: 1.35; cursor: pointer; overflow-wrap: anywhere; }
.nb-quick-tabs > button, .nb-quick-align > button { flex: 1 1 110px; }
.nb-quick-equipment button.is-active, .nb-quick-equipment button[aria-pressed='true'] { border-color: var(--accent, #145d8c); background: var(--accent-soft, #e6f1f7); font-weight: 700; }
.nb-quick-item { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border, #bac4ca); border-radius: 10px; }
.nb-quick-item > strong, .nb-quick-item > span { overflow-wrap: anywhere; }
.nb-quick-item .nb-muted { margin: 0; }
.nb-quick-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nb-quick-dimension { display: flex; flex-direction: column; text-align: left; gap: 4px; }
.nb-quick-dimension > span { font-size: 16px; }
.nb-quick-dimension > small { font-size: 12px; color: var(--muted, #526570); }
.nb-quick-dimension > strong { color: var(--accent, #145d8c); font-size: 18px; }
.nb-quick-catalog { display: flex; flex-direction: column; gap: 6px; max-height: 380px; max-height: min(48dvh, 380px); overflow: auto; overscroll-behavior: contain; }
.nb-quick-catalog > button { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; }
.nb-quick-catalog > button small { color: var(--muted, #526570); }
.nb-quick-catalog-item > span:first-child { flex: 1; min-width: 0; }
.nb-quick-catalog-item strong, .nb-quick-catalog-item small { display: block; }
.nb-quick-catalog > button.nb-quick-catalog-item { flex-direction: row; align-items: center; gap: 10px; }
.nb-quick-catalog h4 { margin: 12px 0 4px; font-size: 14px; }
.nb-quick-quantity { display: flex; align-items: center; gap: 12px; }
.nb-quick-quantity > output { flex: 1; text-align: center; font-size: 18px; font-weight: 700; }
.nb-quick-remove { align-self: flex-start; }
.nb-quick-error[hidden] { display: none; }
.nb-scenario-tile:focus-visible, .nb-quick-equipment button:focus-visible, .nb-quick-section > summary:focus-visible { outline: 3px solid var(--accent, #145d8c); outline-offset: 3px; }
.nb-scenario-tile:disabled, .nb-quick-equipment button:disabled { opacity: .6; cursor: default; }
.nb-sun .nb-scenario-tile { min-height: 108px; border-width: 3px; }
.nb-sun .nb-scenario-tile small, .nb-sun .nb-quick-equipment button, .nb-sun .nb-quick-equipment input, .nb-sun .nb-quick-equipment select, .nb-sun .nb-quick-section > summary { font-size: 18px; }
.nb-sun .nb-quick-equipment button, .nb-sun .nb-quick-equipment input, .nb-sun .nb-quick-equipment select { min-height: 56px; }
@media (min-width: 800px) { .nb-scenario-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nb-client-link-dialog { width: min(100%, 760px); max-width: 100vw; max-height: 100dvh; padding: 16px; overflow: auto; }

/* Roleta: wszystkie wymiary prowadzą do wspólnego arkusza. */
.nb-roller-panel { min-width: 0; margin: 12px 0; padding: 12px; border: 1px solid var(--border-strong, #72838e); border-radius: 12px; background: var(--panel-solid, #fff); }
.nb-roller-panel h3 { margin: 0 0 10px; font-size: 19px; }
.nb-roller-panel .nb-field { min-width: 0; }
.nb-roller-panel input[type='text'], .nb-roller-panel select { width: 100%; max-width: 100%; min-width: 0; min-height: 56px; font-size: 16px; }
.nb-roller-panel button { min-height: 56px; min-width: 48px; padding: 12px; border: 1px solid var(--border-strong, #72838e); border-radius: 8px; color: var(--text, #172b3a); background: var(--panel-solid, #fff); font: inherit; line-height: 1.4; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.nb-roller-panel button:disabled { opacity: .6; cursor: default; }
.nb-roller-panel button:focus-visible, .nb-roller-panel summary:focus-visible { outline: 3px solid var(--accent, #145d8c); outline-offset: 3px; }
.nb-roller-question { min-width: 0; margin: 16px 0; padding: 12px 0; border: 0; border-top: 1px solid var(--border, #bac4ca); }
.nb-roller-question legend { padding: 0 8px 0 0; font-size: 17px; font-weight: 700; }
.nb-roller-types, .nb-roller-dimensions, .nb-roller-system, .nb-roller-more-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.nb-roller-panel .nb-roller-type { display: flex; flex-direction: column; gap: 6px; border-width: 2px; }
.nb-roller-type strong { font-size: 18px; }
.nb-roller-type small, .nb-roller-dimension small { font-size: 14px; line-height: 1.45; color: var(--muted, #526570); }
.nb-roller-panel [aria-pressed='true'] { border-color: var(--accent, #145d8c); background: var(--accent-soft, #e6f1f7); }
.nb-roller-window { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; padding: 12px; border-left: 4px solid var(--accent, #145d8c); }
.nb-roller-window > output { font-size: 23px; font-weight: 750; }
.nb-roller-window > small { color: var(--muted, #526570); }
.nb-roller-toggle { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.nb-roller-toggle > button { flex: 1 1 100px; text-align: center; }
.nb-roller-panel .nb-roller-dimension { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.nb-roller-dimension > strong { color: var(--accent, #145d8c); font-size: 19px; }
.nb-roller-pick, .nb-roller-proposals { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.nb-roller-pick strong, .nb-roller-warnings span, .nb-roller-system .nb-muted { overflow-wrap: anywhere; }
.nb-roller-warnings .nb-alert { display: flex; flex-direction: column; gap: 10px; }
.nb-roller-more > summary { min-height: 56px; padding: 14px 0; cursor: pointer; font-weight: 700; }
.nb-roller-error[hidden] { display: none; }
.nb-sun .nb-roller-panel button, .nb-sun .nb-roller-panel input, .nb-sun .nb-roller-panel select, .nb-sun .nb-roller-type small, .nb-sun .nb-roller-dimension small { font-size: 18px; }
@media (min-width: 700px) { .nb-roller-types, .nb-roller-dimensions, .nb-roller-system, .nb-roller-more-body { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
