.device-master-fields { padding:12px; background:var(--vd-surface-subtle); border-radius:8px; }
/* Inventory columns keep identity, status and price visible with long values. */
.inventory-table { table-layout:fixed; min-width:0; width:100%; }
.inventory-table th:nth-child(1) { width:29%; }
.inventory-table th:nth-child(2) { width:17%; }
.inventory-table th:nth-child(3) { width:10%; }
.inventory-table th:nth-child(4) { width:13%; }
.inventory-table th:nth-child(5) { width:14%; }
.inventory-table th:nth-child(6) { width:12%; }
.inventory-table th:nth-child(7) { width:5%; }
.inventory-table :is(th,td) { padding:12px 10px; overflow-wrap:anywhere; }
.inventory-table .machine-cell { min-width:0; }
.inventory-table .machine-cell>span:last-child { flex:1; }
.inventory-table .machine-cell strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.inventory-table .status-pill { white-space:normal; }
.inventory-table .numeric { font-variant-numeric:tabular-nums; }
.inventory-table .arrow-link { width:44px; height:44px; }
.inventory-table.archive-table th:nth-child(1) { width:25%; }
.inventory-table.archive-table th:nth-child(2) { width:15%; }
.inventory-table.archive-table th:nth-child(3) { width:9%; }
.inventory-table.archive-table th:nth-child(4) { width:12%; }
.inventory-table.archive-table th:nth-child(5) { width:11%; }
.inventory-table.archive-table th:nth-child(6) { width:13%; }
.inventory-table.archive-table th:nth-child(7) { width:15%; }
.inventory-filters { display:flex; flex-wrap:wrap; align-items:center; }
.inventory-filters>.search-wrap { flex:1 1 260px; min-width:200px; max-width:none; }
.inventory-filters>select { flex:1 1 170px; min-width:170px; max-width:240px; }
.inventory-filters>.filter-extra { flex-basis:100%; }
.filter-extra>summary { cursor:pointer; color:var(--vd-primary); font-weight:600; font-size:13px; min-height:44px; display:flex; align-items:center; gap:8px; }
.filter-extra>summary::before { content:'+'; font-size:18px; }
.filter-extra[open]>summary::before { content:'−'; }
.filter-extra-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; padding:4px 0 12px; }
.filters .filter-extra-fields select { width:100%; max-width:100%; min-width:0; }
.active-filters { display:flex; flex-wrap:wrap; gap:8px; margin:-8px 0 20px; }
.active-filters:empty,.active-filters:not(:has(a)) { display:none; }
.active-filter { display:inline-flex; align-items:center; gap:10px; min-height:44px; max-width:100%; padding:8px 12px; border:1px solid var(--vd-border); border-radius:var(--vd-control-radius); color:var(--vd-primary); background:var(--vd-surface-info); font-size:12px; overflow-wrap:anywhere; }
.active-filter>span { font-size:20px; flex:none; }
@media(max-width:760px) {
 .inventory-table :is(th,td) { padding:0; }
 .inventory-filters>.search-wrap,.inventory-filters>select { flex-basis:100%; max-width:100%; width:100%; min-width:0; }
 .filter-extra-fields { grid-template-columns:minmax(0,1fr); }
 .inventory-table .numeric { white-space:normal; }
}
[data-master-fields][hidden],[data-automaat-field][hidden],[data-second-device][hidden],[data-set-fields][hidden],.device-model-options[hidden],.device-model-options [hidden] { display:none; }
.device-form>.form-side { grid-column:2; grid-row:1 / span 3; }
.device-form>[data-set-fields] { grid-column:1; }
.device-second { grid-column:1; }
.device-second legend,fieldset.form-card>legend { font-size:18px; font-weight:700; padding:0 6px; }
.device-model-control { position:relative; }
.device-model-options { position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:40; max-height:220px; overflow:auto; border:1px solid var(--vd-border); border-radius:8px; background:var(--vd-surface,#fff); box-shadow:var(--vd-shadow-card); }
.device-model-options button { display:block; width:100%; text-align:left; border:0; background:transparent; color:var(--vd-text-primary); padding:10px; cursor:pointer; }.device-model-options button:focus { background:var(--vd-surface-info); }@media (hover:hover) and (pointer:fine){
.device-model-options button:hover{ background:var(--vd-surface-info); }}
.set-label { display:inline-flex; flex-wrap:wrap; align-items:center; gap:7px; font-size:12px; padding:6px 9px; background:var(--vd-surface-info); color:var(--vd-primary); border-radius:6px; margin-top:6px; }
.set-device-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.set-device-grid .surface { min-width:0; }
.set-shared-photo { display:block; max-width:100%; max-height:300px; object-fit:contain; margin:12px 0; }
.set-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:20px; }
.set-actions form { min-width:0; }
.set-actions .field { margin-bottom:12px; }
[data-model-identity] { position:relative; }
.device-kind-label { color:var(--vd-text-secondary); font-size:12px; }
@media(max-width:760px) { .set-device-grid,.set-actions { grid-template-columns:1fr; } .device-second,.device-form>[data-set-fields],.device-form>.form-side { grid-column:auto; grid-row:auto; } }
[data-component-new][hidden],[data-component-existing][hidden] { display:none; }
.set-registration { border:0; padding:0; margin:0; min-width:0; grid-column:1; }
.set-registration>legend { font-size:20px; font-weight:700; }
.set-component { margin:16px 0; }
.set-component>fieldset { border:0; padding:0; margin:16px 0 0; min-width:0; }
.set-component>fieldset>legend { font-size:16px; font-weight:600; padding:0 0 12px; }
.set-component>fieldset[data-component-existing] .field { margin-bottom:16px; }
.set-cost-table td { vertical-align:top; }
.set-cost-table details { margin-top:12px; min-width:130px; }
.set-cost-table details form { margin-top:12px; }
.set-cost-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; padding-top:20px; }
.set-cost-summary>div { display:flex; flex-direction:column; gap:7px; padding:14px; border-radius:8px; background:var(--vd-surface-subtle); }
.set-cost-summary strong { font-size:20px; }
.set-incomplete { padding:12px; border-left:3px solid var(--vd-warm); background:var(--vd-surface-subtle); }
.set-add-form { margin-top:20px; }
@media(max-width:760px) { .set-cost-summary { grid-template-columns:1fr; } .set-registration { grid-column:auto; } .set-component .section-heading { align-items:flex-start; flex-direction:column; } }

/* Compact dossiers keep the selected tab and daily actions within reach. */
.dossier-head.detail-head { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin:0 0 16px; }
.dossier-identity,.set-dossier-identity { display:flex; align-items:center; gap:16px; min-width:0; }
.dossier-photo,.set-dossier-photo { width:64px; height:80px; flex:none; display:grid; place-items:center; background:var(--vd-surface-subtle); border:1px solid var(--vd-border); border-radius:8px; overflow:hidden; }
.dossier-photo a { display:block; height:100%; width:100%; }
.dossier-photo img,.set-dossier-photo .set-shared-photo { display:block; width:100%; height:100%; max-height:none; margin:0; object-fit:contain; }
.dossier-photo svg { width:28px; height:28px; color:var(--vd-primary); }
.dossier-title { min-width:0; }
.dossier-head ~ :is(.surface,.two-col-layout,.finance-stats) { min-width:0; }
.dossier-head ~ .surface :is(.timeline,.timeline-item,.timeline-body,.timeline-top),.dossier-head ~ .two-col-layout > * { min-width:0; }
.dossier-head ~ .surface :is(.timeline-body p,.timeline-top strong,.timeline-meta),.dossier-head ~ .two-col-layout .cost-list span { overflow-wrap:anywhere; }
.dossier-title h1,.set-dossier-identity h1 { margin:4px 0 8px; font-size:26px; overflow-wrap:anywhere; }
.dossier-meta { display:flex; gap:8px 12px; align-items:center; flex-wrap:wrap; color:var(--vd-text-secondary); font-size:12px; overflow-wrap:anywhere; }
.dossier-meta .set-label { margin:0; }
.dossier-controls { display:flex; flex-direction:column; align-items:flex-end; gap:12px; flex:none; max-width:48%; }
.dossier-controls .heading-buttons { justify-content:flex-end; flex-wrap:wrap; }
.dossier-status.status-inline { margin:0; gap:10px; }
.dossier-status.status-inline label { color:var(--vd-text-secondary); }
.dossier-status.status-inline select,.page-content:has(.dossier-head) .dossier-status button { min-height:44px; height:44px; }
.dossier-status button[hidden] { display:none; }
.page-content:has(.dossier-head) .btn { min-height:44px; height:auto; }
.dossier-head + .detail-tabs { margin-top:0; }
.dossier-head ~ .machine-hero { grid-template-columns:160px minmax(0,1fr); min-height:190px; }
.dossier-head ~ .machine-hero .hero-photo { min-height:190px; }
.dossier-head ~ .machine-hero .hero-photo img { max-height:210px; width:100%; object-fit:contain; }
.dossier-head ~ .machine-hero .hero-info { padding:24px; }
.dossier-head ~ .machine-hero .hero-info h2 { font-size:23px; }
.dossier-action-panel.surface { min-width:0; padding:0; margin:16px 0; }
.page-content:has(.dossier-head) .dossier-action-panel.surface { padding:0; }
.dossier-action-panel > summary { padding:16px 20px; min-height:52px; font-size:14px; font-weight:700; cursor:pointer; overflow-wrap:anywhere; }
.dossier-action-panel[open] > summary { border-bottom:1px solid var(--vd-border); }
.dossier-panel-body { padding:20px; min-width:0; overflow-wrap:anywhere; }
.dossier-action-list { display:block; }
.dossier-action-list .form-stack { max-width:880px; }
.dossier-action-panel .dossier-cancel { display:inline-flex; margin-top:12px; }
.dossier-management { margin:24px 0 16px; border-top:1px solid var(--vd-border); }
.dossier-management > summary { min-height:44px; padding:14px 0; color:var(--vd-text-secondary); cursor:pointer; font-size:13px; font-weight:600; }
.dossier-management-body { margin-top:8px; }
.dossier-management .machine-delete-zone { margin-top:8px; }
.set-dossier-head { display:flex; justify-content:space-between; gap:24px; align-items:center; margin-bottom:20px; }
.set-dossier-identity p { margin:0; font-size:13px; color:var(--vd-text-secondary); }
.set-dossier-actions { display:flex; flex-direction:column; align-items:flex-end; gap:12px; min-width:0; }
.set-dossier-actions .heading-buttons { justify-content:flex-end; flex-wrap:wrap; }
.set-dossier-price { display:flex; align-items:center; gap:14px; }
.set-dossier-price span { color:var(--vd-text-secondary); font-size:12px; }
.set-dossier-price strong { font-size:22px; white-space:nowrap; }
.set-availability,.set-sale-summary { padding:12px 16px; border-left:3px solid var(--vd-warm); background:var(--vd-surface-subtle); border-radius:0 8px 8px 0; font-size:13px; overflow-wrap:anywhere; margin:0 0 20px; }
.set-cost-table { width:100%; table-layout:fixed; }
.set-cost-table th:first-child { width:35%; }
.set-cost-table td { overflow-wrap:anywhere; white-space:normal; }
.set-cost-table td details { min-width:0; }
.set-cost-table summary,.set-detach > summary { cursor:pointer; min-height:44px; display:list-item; padding:10px 0; color:var(--vd-primary); font-weight:600; font-size:12px; }
.set-detach { border-top:1px solid var(--vd-border); padding:4px 0; }
.set-detach .form-stack { padding:12px 0; max-width:680px; }
.dossier-management .set-split-form { border-top:1px solid var(--vd-border); padding-top:20px; margin-top:20px; }
@media(max-width:1100px) {
 .dossier-head.detail-head { flex-direction:column; }
 .dossier-controls { max-width:100%; width:100%; align-items:flex-start; flex-direction:row; flex-wrap:wrap; }
 .dossier-controls .heading-buttons { width:auto; justify-content:flex-start; }
 .dossier-status.status-inline { margin-left:auto; }
}
@media(max-width:760px) {
 .dossier-head.detail-head { gap:14px; }
 .dossier-photo { width:48px; height:64px; }
 .dossier-identity { gap:12px; align-items:flex-start; }
 .dossier-title h1,.set-dossier-identity h1 { font-size:22px; }
 .dossier-controls { flex-direction:column; align-items:stretch; }
 .dossier-controls .heading-buttons { display:grid; grid-template-columns:1.65fr 1fr 1fr; gap:8px; width:100%; }
 .dossier-controls .heading-buttons .btn { padding:10px 8px; min-width:0; white-space:normal; text-align:center; }
 .dossier-status.status-inline { margin-left:0; align-items:center; }
 .dossier-status.status-inline > div { flex:1; min-width:0; }
 .dossier-status select { min-width:0; width:100%; }
 .dossier-head ~ .machine-hero { grid-template-columns:1fr; }
 .dossier-head ~ .machine-hero .hero-photo { display:none; }
 .dossier-head ~ .machine-hero .hero-photo img { max-height:180px; }
 .dossier-head ~ .machine-hero .hero-info { padding:16px; }
 .dossier-head ~ .machine-hero .hero-info > p { display:none; }
 .dossier-head ~ .machine-hero .hero-detail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .dossier-head ~ .machine-hero .hero-detail-grid strong { font-size:14px; }
 .dossier-panel-body { padding:16px; }
 .set-dossier-head { flex-direction:column; align-items:stretch; gap:16px; }
 .set-dossier-actions { align-items:stretch; }
 .set-dossier-price { justify-content:space-between; }
 .set-dossier-actions .heading-buttons { justify-content:flex-start; width:100%; }
 .set-cost-table,.set-cost-table tbody,.set-cost-table tr,.set-cost-table td { display:block; width:100%; }
 .set-cost-table thead { display:none; }
 .set-cost-table tr { border-bottom:1px solid var(--vd-border); padding:12px 0; }
 .set-cost-table td { border:0; padding:7px 0; min-height:0; }
 .set-cost-table td[data-label]:not(:first-child)::before { content:attr(data-label); display:block; color:var(--vd-text-secondary); font-size:11px; margin-bottom:4px; }
 .set-cost-table details { margin-top:2px; }
 .set-cost-table details[open] { padding-bottom:8px; }
}

/* Two everyday actions remain after restoring the visible reservation form. */
@media(max-width:760px) { .dossier-controls .heading-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); } }
