/* Admin page (/beheer.html): dense and businesslike. Built on base.css; only what the tabs need on top of it. */

.beheer-main { padding-bottom: 56px; }
.beheer h1 { font-size: 22px; margin: 0; }
.beheer h2 { font-size: 15.5px; margin: 0 0 10px; }
.beheer h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--steel); margin: 0 0 4px; }
.beheer .small { font-size: 12.5px; }
.beheer .sub { font-size: 12.5px; color: var(--steel); }
.beheer p { margin: 0 0 10px; }
.pane-loading { padding: 24px 0; }

/* Tabs: stay in view under the site header, and scroll sideways when they do not fit. */
.tabs { position: sticky; top: var(--header-h); z-index: 40; display: flex; gap: 2px; overflow-x: auto; background: var(--bg);
  border-bottom: 1px solid var(--line); margin: 0 -24px 16px; padding: 12px 24px 0; scrollbar-width: thin; }
.tab { padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--steel);
  text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--card); color: var(--ink); border-color: var(--line); margin-bottom: -1px; }
.tab:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: -2px; }

/* The line above a tab: title, filters, count, buttons. */
.toolbar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px; }
.toolbar .push { margin-left: auto; }
/* A second form on the same tab (Tarieven, then Transport): room above it, so it reads as its own part. */
.toolbar.settings-next { margin-top: 36px; }
.toolbar.settings-next h2 { margin: 0; }
.toolbar label.inline { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; white-space: nowrap; }
.toolbar label.inline select, .toolbar label.inline input { padding: 6px 9px; font-weight: 400; }
.toolbar label.inline select { width: auto; }
.toolbar label.grow { flex: 1 1 240px; max-width: 460px; }
.toolbar .count { font-size: 13.5px; }
.back { margin: 0 0 8px; font-size: 13.5px; }
.lead { color: var(--ink-2); max-width: 90ch; }

/* Cards */
.beheer .card { margin-bottom: 14px; }
.card.pad, .pad { padding: 14px 16px; }
.card.narrow { max-width: 420px; }
.card-title { padding: 12px 16px 0; }
.pad-x { padding-left: 16px; padding-right: 16px; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.columns > .card { margin-bottom: 14px; max-width: none; }

/* Tables */
.table-scroll { overflow-x: auto; }
.beheer table.grid { font-size: 13.5px; }
.beheer table.grid th, .beheer table.grid td { padding: 6px 10px; }
.beheer table.grid th { white-space: nowrap; background: #fafbfc; }
.beheer table.grid tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: #fafbfc; }
table.list td strong { font-weight: 600; }
table.list tr.selected { background: #fff7e0; }
table.list tr.inactive td { color: var(--steel); }
table.materials .off { text-decoration: line-through; color: var(--steel); }
/* Materialen: a tick per thickness for the stock, and one button for the whole material. */
table.materials .stock { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-width: 160px; }
table.materials .stock label { display: inline-flex; gap: 4px; align-items: center; margin: 0; font-weight: 400; white-space: nowrap; }
.lead-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 14px; }
.lead-form label { margin: 0; font-weight: 600; }
.lead-form input[type=text] { max-width: 90px; font-variant-numeric: tabular-nums; }
.lead-form .help { flex-basis: 100%; margin: 0; }
.empty { padding: 18px 16px; color: var(--steel); margin: 0; }
.neg { color: var(--err); }
.nowrap { white-space: nowrap; }
.beheer .badge { white-space: nowrap; }

/* Parts of a quote, an order or a basket */
.thumb-cell { width: 76px; }
.thumb { display: block; width: 64px; height: 48px; }
svg.thumb path { fill: #fff3cc; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.thumb-none { display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 6px; color: var(--steel); font-size: 11px; font-weight: 600; }
/* On a narrow screen the table scrolls sideways (.table-scroll) instead of squeezing the text into a strip. */
table.parts td:nth-child(3) { min-width: 230px; }
table.list td[data-f=customer] { min-width: 190px; }
.file-name { overflow-wrap: anywhere; }
.line-note { font-size: 12.5px; margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.line-problems { margin: 4px 0 0; padding-left: 18px; color: var(--err); font-size: 12.5px; }
.line-remarks { margin-top: 6px; font-size: 12.5px; padding: 6px 10px; }
.line-remarks ul { margin: 2px 0 0; padding-left: 18px; }
table.parts td.files { white-space: nowrap; font-size: 12.5px; }
table.costs td, table.costs th { white-space: nowrap; }
table.costs td.sum { font-weight: 600; }
table.costs .group-head th { text-align: center; border-bottom: 0; padding-bottom: 0; font-size: 11.5px; }
table.costs .group-head th + th { border-left: 1px solid var(--line); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 8px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff; }
.stat > span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--steel); font-weight: 600; }
.stat b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.stat small { font-size: 12.5px; color: var(--steel); }
.stat small em { font-style: normal; font-weight: 600; color: var(--ink); }
.stat.neg b, .stat.neg small em { color: var(--err); }

table.totals { border-collapse: collapse; width: 100%; font-size: 14px; }
table.totals th { text-align: left; font-weight: 400; padding: 3px 0; }
table.totals td { text-align: right; font-variant-numeric: tabular-nums; padding: 3px 0 3px 16px; }
table.totals tr.sum th, table.totals tr.sum td { font-weight: 700; border-top: 1px solid var(--line); padding-top: 6px; }
table.totals tr.aside th, table.totals tr.aside td { color: var(--steel); font-size: 13px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 5px 18px; margin: 0; font-size: 14px; }
.facts dt { color: var(--steel); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts dd .sub { margin-left: 6px; }
.facts dd.pre { white-space: pre-line; }
.facts + .notice { margin: 12px 0 0; }
.party { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; font-size: 14px; }
.party p { margin: 0; overflow-wrap: anywhere; }

/* Forms */
fieldset.group { border: 0; margin: 0 0 14px; min-width: 0; }
fieldset.group > legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; font-size: 15.5px; font-weight: 700; }
fieldset.group > legend.pad-legend { padding: 14px 16px 0; }
fieldset.group > legend + * { clear: both; }
.group-note { font-size: 13.5px; color: var(--ink-2); max-width: 100ch; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px 24px; align-items: start; }
.fields .field { margin: 0; min-width: 0; }
.fields .field.wide, .fields .field-multiline, .fields .field-custom, .fields .field-raw { grid-column: 1 / -1; }
.fields .field-multiline textarea, .fields .field.wide textarea { max-width: 820px; }
.field input[type=text] { max-width: 420px; }
.field-decimal input[type=text], .field-int input[type=text] { max-width: 150px; font-variant-numeric: tabular-nums; }
.field-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.unit { font-weight: 400; color: var(--steel); font-size: 12.5px; margin-left: 4px; }
.help { font-size: 12.5px; color: var(--steel); margin: 4px 0 0; max-width: 70ch; }
.field-error { color: var(--err); font-size: 12.5px; font-weight: 600; margin: 4px 0 0; }
.field.invalid input, .field.invalid textarea, input.invalid { border-color: var(--err); background: #fff8f7; }
.field-unknown label, .field-unknown .field-label { font-family: var(--mono); }
code.raw { display: block; font-family: var(--mono); font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 8px; overflow-wrap: anywhere; max-width: 820px; }
.check input { margin-top: 3px; flex: none; }

table.rows { width: auto; min-width: min(100%, 520px); }
table.rows td { vertical-align: middle; }
table.rows input[type=text] { width: 130px; padding: 6px 9px; font-variant-numeric: tabular-nums; }
.field-custom .table-scroll { margin: 6px 0 8px; }
ol.rush { margin: 6px 0 8px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
ol.rush li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
ol.rush [data-days] { min-width: 150px; }
ol.rush input[type=text] { width: 90px; padding: 6px 9px; font-variant-numeric: tabular-nums; }
/* The places of afhalen: name, address and Weghalen on one row; on a phone each under the other. */
ol.places { margin: 6px 0 8px; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 820px; }
ol.places li { display: grid; grid-template-columns: minmax(0, 14em) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
ol.places label { display: grid; gap: 2px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
ol.places input[type=text] { max-width: none; width: 100%; padding: 6px 9px; }

/* The save line stays in view at the bottom of a long form, so the result of a save is never off screen. */
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -4px 14px rgba(16, 24, 40, .08); padding: 10px 16px; }
.save-bar .push { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-msg { font-size: 13.5px; margin: 0; }
.form-msg-ok { color: var(--ok); font-weight: 600; }
.form-msg-error { color: #7a1f18; background: #fdecea; border: 1px solid #f5c2bd; border-radius: 8px; padding: 6px 10px; font-weight: 600; }
p.form-msg { margin-bottom: 12px; }
#status-form textarea { resize: vertical; }

.notice { margin-bottom: 12px; }
.notice.dismissible { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.notice.dismissible .btn { flex: none; }
.no-access { max-width: 560px; margin: 40px auto; }
.no-access h1 { margin-bottom: 10px; }

/* A switch for "active": a checkbox, drawn as a slider. */
input.switch { appearance: none; width: 34px; height: 20px; border-radius: 99px; background: #c9d0d8; position: relative; cursor: pointer;
  margin: 0; vertical-align: middle; transition: background .15s; }
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
input.switch:checked { background: var(--ok); }
input.switch:checked::after { left: 16px; }
input.switch:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
input.switch:disabled { opacity: .5; cursor: progress; }

/* Tab "Over ons" (js/beheer/over-ons.js): the piece with its counters, and the photos. */
.counted input[type=text] { max-width: 520px; }
.counted textarea { max-width: 820px; resize: vertical; }
.counter { font-size: 12.5px; color: var(--steel); margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--err); font-weight: 600; }
.photo-admin.dragging { outline: 3px dashed var(--accent-dark); outline-offset: -3px; background: #fffaf0; }
.photo-drop { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 14px 16px; margin: 0 0 12px; border: 1px dashed #b7c0cb; border-radius: 8px;
  background: var(--bg); font-size: 13.5px; color: var(--ink-2); }
.photo-drop .btn { flex: none; }
.photo-drop span { flex: 1 1 320px; max-width: 90ch; }
.photo-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; font-size: 13.5px; }
.photo-progress[hidden] { display: none; }
.photo-progress progress { flex: 0 1 220px; height: 10px; accent-color: var(--accent-dark); }
.photo-log { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.photo-log:empty { display: none; }
.photo-log li { overflow-wrap: anywhere; color: var(--ink-2); }
.photo-log strong { font-weight: 600; color: var(--ink); }
.photo-log-ok span { color: var(--ok); font-weight: 600; }
.photo-log-error { padding: 6px 10px; border: 1px solid #f5c2bd; border-radius: 8px; background: #fdecea; }
.photo-log li.photo-log-error, .photo-log-error strong { color: #7a1f18; }
.photo-rows { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.photo-rows:empty { display: none; }
.photo-row { display: grid; grid-template-columns: 148px minmax(0, 1fr) auto; gap: 10px 16px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.photo-row:last-child { border-bottom: 0; padding-bottom: 0; }
.photo-thumb { display: block; width: 148px; height: 111px; object-fit: cover; border-radius: 6px; background: var(--ink); }
.photo-row.photo-hidden .photo-thumb { opacity: .45; }
.photo-fields { display: grid; gap: 8px; min-width: 0; }
.photo-fields .field { margin: 0; }
.photo-fields .field input[type=text] { max-width: 520px; }
.photo-visible { align-items: center; margin: 0; cursor: pointer; }
.photo-visible input { margin-top: 0; }
.photo-fields .form-msg { justify-self: start; }
.photo-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 280px; }

/* Mail */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 14px; align-items: start; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-align: left; cursor: pointer; text-decoration: underline; }
#mail-table tbody tr { cursor: pointer; }
.mail-text { font-family: var(--mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px; margin: 10px 0 0; }
.mail-setup p { max-width: 110ch; }
.mail-setup code { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.mail-counts { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.mail-counts b { font-variant-numeric: tabular-nums; }
.mail-test .field { margin: 0; }
.mail-test .form-msg { margin: 8px 0 0; }
.mail-actions { margin: 12px 0 0; }
#mail-view h2 { overflow-wrap: anywhere; }
/* A field with its button next to it: the test mail, the BV of an order. On a phone the button drops below. */
.input-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.input-row input[type=text], .input-row input[type=email] { flex: 1 1 220px; max-width: 340px; min-width: 0; }

/* The BV of one order (bestellingen.js) */
.bv-form { margin: 12px 0 0; }
.bv-form .field { margin: 0; }
p.form-msg#bv-result { margin: 12px 0 0; }

/* Warnings of a line: what the site told the customer it cannot make as drawn. Red, because somebody has to call. */
.job-warnings ul, .line-warnings ul, .offer-notes ul { margin: 4px 0 0; padding-left: 18px; }
.line-warnings { margin: 6px 0 0; font-size: 12.5px; padding: 6px 10px; }

/* Pricing a request by hand (offer-form.js). The numbers in it are the server's; while it is asked they are dimmed. */
.offer-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.offer-form .lead { margin-top: 6px; }
.offer-lines { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line); }
.offer-line { display: grid; grid-template-columns: 76px minmax(0, 1fr) 200px 130px; gap: 6px 16px; align-items: start; padding: 12px 16px;
  border-bottom: 1px solid var(--line); }
.offer-part { min-width: 0; overflow-wrap: anywhere; }
.offer-basis { margin-top: 6px; font-size: 13.5px; }
.offer-basis-none { color: var(--warn); }
.offer-basis-none .sub { color: var(--steel); }
.offer-line .field { margin: 0; }
.offer-money { display: flex; align-items: center; gap: 6px; }
.offer-money input[type=text] { max-width: 130px; text-align: right; font-variant-numeric: tabular-nums; }
.offer-total { text-align: right; }
.offer-total span { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.offer-total b { display: block; padding: 9px 0; font-variant-numeric: tabular-nums; }
.offer-rest { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 24px; align-items: start; margin-bottom: 14px; }
.offer-rest .field { margin: 0; min-width: 0; }
.offer-rest .field.wide { grid-column: 1 / -1; }
.offer-rest textarea { max-width: 820px; resize: vertical; }
.offer-form input[type=date] { font: inherit; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  width: 100%; max-width: 200px; }
.offer-result { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 14px 32px; align-items: start; margin-bottom: 14px; }
.offer-result .notice { margin-bottom: 10px; }
.offer-form[data-calc=bezig] .offer-total b, .offer-form[data-calc=bezig] [data-offer-totals] { opacity: .45; }
.offer-form .save-bar { border-width: 1px 0 0; border-radius: 0 0 var(--radius) var(--radius); }
.offer-sent { border-left: 4px solid var(--ok); }
.offer-sent .facts { margin-bottom: 10px; }
.offer-sent table.totals { max-width: 380px; }
.offer-sent .notice { margin: 12px 0 0; }

/* The nesting views are drawn here by js/beheer/nest-view.js; hidden until that module fills them. */
[data-nest-host] { margin-bottom: 14px; }

/* The nesting of one job: closed until the owner asks for it (js/beheer/nest-mount.js). */
.nest-card > summary { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; padding: 12px 16px; cursor: pointer; list-style: none; }
.nest-card > summary::-webkit-details-marker { display: none; }
.nest-card > summary::before { content: ""; flex: none; align-self: center; width: 7px; height: 7px; margin-right: 2px;
  border-right: 2px solid var(--steel); border-bottom: 2px solid var(--steel); transform: rotate(-45deg); transition: transform .15s; }
.nest-card[open] > summary::before { transform: rotate(45deg); }
.nest-card > summary h2 { margin: 0; }
.nest-card > summary .sub { flex: 1 1 260px; }
.nest-card > summary:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: -2px; border-radius: var(--radius); }
.nest-body { padding: 0 16px 14px; }
.nest-bar { margin: 0 0 10px; }
.nest-busy { display: flex; align-items: center; gap: 10px; color: var(--ink-2); padding: 8px 0; margin: 0; }
.nest-spinner { flex: none; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent-dark); border-radius: 50%; animation: nest-spin .8s linear infinite; }
@keyframes nest-spin { to { transform: rotate(360deg); } }

/* A NestReport (js/beheer/nest-view.js): numbers per material, then every sheet as a drawing with its legend. */
.nest-actions { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.nest-totals { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 13.5px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.nest-group + .nest-group { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.beheer h3.nest-group-title { font-size: 15.5px; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 0 0 2px; }
.nest-rules { margin: 0 0 10px; }
.nest-summary small .neg, .nest-summary small .neg em, .nest-summary small em.neg { color: var(--err); }
.nest-sheet { margin: 16px 0 0; }
.nest-sheet figcaption { display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; margin-bottom: 6px; font-size: 14px; }
.nest-sheet-title { font-size: 15px; }
.nest-sheet-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nest-msg { font-size: 12.5px; color: var(--steel); }
.nest-msg-error { color: var(--err); font-weight: 600; }
.nest-svg { display: block; width: 100%; height: auto; max-height: 78vh; }
/* The sheet is grey and the part of it that may be used is white: what stays grey is the edge strip. */
.nest-plate { fill: #e6e9ed; stroke: var(--ink); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.nest-inner { fill: #fff; stroke: #9aa4b0; stroke-width: 1px; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.nest-part { stroke-width: 1px; stroke-linejoin: round; }
.nest-part.approx { stroke-dasharray: 5 3; }
.nest-part:hover { stroke-width: 2.5px; }
.nest-cut { stroke: var(--err); stroke-width: 1.5px; stroke-dasharray: 8 5; vector-effect: non-scaling-stroke; }
/* The codes lie over the parts; a hover has to reach the part under them for its title. */
.nest-labels { pointer-events: none; }
.nest-labels text { text-anchor: middle; dominant-baseline: central; font-family: var(--font); font-weight: 700; fill: var(--ink); }
.nest-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 13px; }
.nest-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nest-legend li > span { overflow-wrap: anywhere; }
.nest-swatch { flex: none; width: 14px; height: 14px; }
.nest-code { min-width: 1.3em; text-align: center; font-variant-numeric: tabular-nums; }
.nest-count { color: var(--steel); white-space: nowrap; }
.nest-key { color: var(--steel); }
.nest-key-edge { flex: none; width: 14px; height: 14px; background: #e6e9ed; border: 1px dashed #9aa4b0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.nest-key-cut { flex: none; width: 14px; height: 0; border-top: 2px dashed var(--err); }

/* Tab "Samen nesten": the materials to choose from. */
.nest-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.nest-choice { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-weight: 400; cursor: pointer; }
.nest-choice:has(input:checked) { border-color: var(--accent-dark); background: #fffaf0; box-shadow: inset 0 0 0 1px var(--accent-dark); }
.nest-choice input { flex: none; margin-top: 4px; }
.nest-choice strong, .nest-choice .sub { display: block; }
#nest-orders th:first-child, #nest-orders td:first-child { width: 36px; }

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  ol.places li { grid-template-columns: minmax(0, 1fr); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  ol.places [data-remove] { justify-self: start; }
  .beheer .wrap { padding: 0 12px; }
  .tabs { margin: 0 -12px 12px; padding: 8px 12px 0; }
  .tab { padding: 8px 10px; }
  .columns { grid-template-columns: minmax(0, 1fr); }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 6px; }
  .toolbar label.grow { flex-basis: 100%; max-width: none; }
  .toolbar .push { margin-left: 0; }
  .notice.dismissible { flex-direction: column; }
  .card.narrow { max-width: none; }
  /* The quantity tiers fit a phone without scrolling: shorter fields, and the headings may wrap. */
  .field-custom table.rows { min-width: 0; }
  .field-custom table.rows th { white-space: normal; }
  .field-custom table.rows input[type=text] { width: 84px; }
  .nest-sheet-actions { margin-left: 0; }
  /* A photo: the picture beside its fields, the buttons under them. */
  .photo-row { grid-template-columns: 96px minmax(0, 1fr); }
  .photo-thumb { width: 96px; height: 72px; }
  .photo-actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  /* A line of the pricing form: the drawing and the part on top, the price and its total under them. */
  .offer-line { grid-template-columns: 64px minmax(0, 1fr); }
  .offer-line .offer-price { grid-column: 1 / -1; }
  .offer-total { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .offer-total span, .offer-total b { display: inline; margin: 0; padding: 0; }
  .offer-result { grid-template-columns: minmax(0, 1fr); }
}

/* The nesting on paper: every sheet on a page of its own with its legend, for the operator who sorts the parts. */
@page nest-sheet { size: A4 landscape; margin: 10mm; }
@media print {
  .nest-sheet { page: nest-sheet; break-before: page; break-inside: avoid; margin: 0; }
  .nest-sheet-actions, .nest-actions, .nest-bar { display: none !important; }
  .nest-svg { max-height: 150mm; }
  .nest-part:hover { stroke-width: 1px; }

  /* "Platen afdrukken" (nest-view.js marks the view and the page): only the sheets of that view, on white.
     Everything that is not the view, not inside it and not on the way to it is taken out, so no empty page
     of the screen around it comes out of the printer. */
  html.nest-print { page: nest-sheet; }
  html.nest-print, html.nest-print body { background: #fff !important; }
  html.nest-print body *:not(:has([data-nest-printing])):not([data-nest-printing]):not([data-nest-printing] *) { display: none !important; }
  html.nest-print [data-nest-printing] > :not(.nest-group), html.nest-print [data-nest-printing] .nest-group > :not(.nest-sheet) { display: none !important; }
  html.nest-print body :has([data-nest-printing]), html.nest-print [data-nest-printing], html.nest-print .nest-group {
    display: block !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important;
    background: #fff !important; max-width: none !important; position: static !important; }
  html.nest-print .nest-sheet-title { font-size: 15pt; }
  html.nest-print .nest-sheet figcaption, html.nest-print .nest-legend { font-size: 10pt; color: #000; }
}
