/* Shared only by order lists, order headers and order lines. */
.order-view-card,.order-view-hero,.order-view-lines{--ov-blue:#87cfff;--ov-purple:#ceb7ff;--ov-green:#86dfbc;--ov-amber:#ffd58a;--ov-neutral:#a9bfd0;--ov-tint:#172e42;--ov-soft:#102233;--ov-hover:#1c3b54;--ov-accent:var(--ov-neutral)}
.order-view-tone-blue{--ov-accent:var(--ov-blue,#87cfff)}.order-view-tone-purple{--ov-accent:var(--ov-purple,#ceb7ff)}.order-view-tone-green{--ov-accent:var(--ov-green,#86dfbc)}.order-view-tone-amber{--ov-accent:var(--ov-amber,#ffd58a)}
.order-view-card.order{position:relative;grid-template-columns:minmax(0,1fr) minmax(145px,auto) 18px;gap:18px;align-items:center;min-height:0;padding:18px 18px 18px 22px;border-left:4px solid var(--ov-accent);background:var(--panel);box-shadow:0 2px 10px #020c1615;transition:background-color .15s,border-color .15s;isolation:isolate}
.order-view-card.order:hover{background:var(--ov-hover);border-color:var(--ov-accent)}
.order-view-card.order:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.order-view-card-main{display:flex;flex-direction:column;gap:8px;min-width:0}
.order-view-card-heading{display:flex;align-items:baseline;gap:10px;min-width:0;flex-wrap:wrap;line-height:1.3}
.order-view-number{font-size:.79rem;font-weight:850;color:var(--ov-accent);font-variant-numeric:tabular-nums;white-space:nowrap}
.order-view-customer{font-size:1.06rem;font-weight:800;overflow-wrap:anywhere}
.order-view-title{font-size:.91rem;font-weight:550;line-height:1.5;color:var(--ink);overflow-wrap:anywhere}
.order-view-meta{display:flex;gap:5px 16px;flex-wrap:wrap;color:var(--muted);font-size:.76rem;font-weight:500;line-height:1.5}
.order-view-meta-item{display:inline-flex;gap:5px;max-width:100%;overflow-wrap:anywhere}
.order-view-meta-label{font-weight:750;flex-shrink:0}
.order-card-delivery{display:grid;gap:2px;color:var(--muted);font-size:.76rem;line-height:1.4;min-width:0}
.order-card-delivery>.order-view-meta-item{display:block}
.order-card-delivery .order-view-meta-label{margin-right:5px}
.order-delivery-facts{display:grid;gap:10px;min-width:0}
.order-view-card-aside{display:flex;align-items:flex-end;flex-direction:column;gap:9px;max-width:230px;min-width:0;text-align:right}
.order-view-status{font-size:.73rem;font-weight:780;line-height:1.35;padding:5px 9px;border:1px solid var(--ov-accent);border-radius:7px;color:var(--ov-accent);display:inline-flex;align-items:center;max-width:100%;overflow-wrap:anywhere;text-align:inherit;background:var(--ov-soft,#102233)}
.order-view-date{display:flex;flex-direction:column;gap:1px;line-height:1.35;font-size:.85rem;font-variant-numeric:tabular-nums}
.order-view-date small{font-size:.65rem;font-weight:600;color:var(--muted)}
.order-view-date-muted{font-size:.77rem;color:var(--muted)}
.order-view-total{font-size:.92rem;font-variant-numeric:tabular-nums;white-space:nowrap}
.order-view-open{color:var(--muted);display:flex;align-items:center}.order-view-open .icon{width:18px;height:18px}
.order-view-labels,.order-view-warnings{display:flex;flex-wrap:wrap;gap:5px;max-width:100%}
.order-view-label,.order-view-warning{display:inline-block;border:1px solid var(--ov-label-border,#496175);background:var(--ov-label-bg,#203548);color:var(--ov-label-ink,#d9e9f5);border-radius:5px;padding:3px 7px;font-size:.68rem;line-height:1.35;font-weight:750;overflow-wrap:anywhere;max-width:100%;text-align:left}
.order-view-label-green{--ov-label-bg:#173e32;--ov-label-ink:#a9f1c7;--ov-label-border:#3c805e}.order-view-label-yellow{--ov-label-bg:#453d19;--ov-label-ink:#ffe997;--ov-label-border:#8d7932}.order-view-label-orange{--ov-label-bg:#4b2d17;--ov-label-ink:#ffd1a3;--ov-label-border:#a36a36}.order-view-label-red{--ov-label-bg:#48232a;--ov-label-ink:#ffbac7;--ov-label-border:#a65e6b}.order-view-label-purple{--ov-label-bg:#34264b;--ov-label-ink:#dbc4ff;--ov-label-border:#7d60aa}.order-view-label-blue{--ov-label-bg:#173950;--ov-label-ink:#a4dfff;--ov-label-border:#417ca3}.order-view-label-sky{--ov-label-bg:#143c42;--ov-label-ink:#a0ecf1;--ov-label-border:#3f8089}.order-view-label-lime{--ov-label-bg:#303f1e;--ov-label-ink:#d4f3a0;--ov-label-border:#718e43}.order-view-label-pink{--ov-label-bg:#44253f;--ov-label-ink:#ffc3ed;--ov-label-border:#9b6491}.order-view-label-black{--ov-label-bg:#292e38;--ov-label-ink:#e3e6ed;--ov-label-border:#636c7b}
.order-view-warning{--ov-label-bg:#43341b;--ov-label-ink:#ffe1a5;--ov-label-border:#967441;font-weight:650}
.order-view-hero{position:relative;background:linear-gradient(110deg,var(--ov-tint),var(--panel));border:1px solid var(--line);border-top:4px solid var(--ov-accent);border-radius:15px;padding:18px 22px;margin-bottom:18px;min-width:0}
.order-view-hero-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.order-view-identity{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0}
.order-view-eyebrow{letter-spacing:.04em;font-size:clamp(1.1rem,2vw,1.3rem);line-height:1.3;font-weight:850;color:var(--text);white-space:nowrap}
.order-view-identity .order-header-link{white-space:nowrap}
.order-view-hero h1{font-size:clamp(1.3rem,2.7vw,1.85rem);line-height:1.25;letter-spacing:-.025em;margin:12px 0 5px;overflow-wrap:anywhere}
.order-view-hero-customer{margin:0;color:var(--muted);font-size:1rem;overflow-wrap:anywhere}
.order-view-hero>.order-view-labels{margin-top:13px}.order-view-hero .order-view-label{font-size:.73rem;padding:4px 8px}
.order-view-lines{border:1px solid var(--line);border-radius:14px;background:var(--panel);margin-bottom:16px;padding:0 18px;min-width:0}
.order-view-lines-heading{cursor:pointer;min-height:55px;padding:15px 0;font-size:1rem;font-weight:800;color:var(--ink)}
.order-view-lines-heading:focus-visible{outline:3px solid var(--blue);outline-offset:3px;border-radius:5px}
.order-view-line-count{display:inline-flex;align-items:center;justify-content:center;min-width:25px;height:23px;padding:0 7px;background:var(--ov-soft);border:1px solid var(--line);border-radius:6px;margin-left:9px;font-size:.74rem;font-variant-numeric:tabular-nums;color:var(--muted)}
/* A bounded goods preview expands on request without an inner scrollbar. */
.order-view-lines{--order-lines-preview-height:310px}
.order-view-lines-heading{display:flex;align-items:center;gap:8px;cursor:default}
.order-view-lines-heading h2{margin:0;font:inherit}
.order-view-lines-heading .order-view-line-count{margin-left:0}
.order-view-lines-viewport{position:relative;min-width:0}
.order-view-lines-viewport.is-collapsed{max-height:var(--order-lines-collapsed-height,var(--order-lines-preview-height));overflow:hidden}
.order-view-lines-viewport.is-collapsed::after{content:"";position:absolute;inset:auto 0 0;height:16px;background:linear-gradient(to bottom,transparent,var(--panel));pointer-events:none}
.order-view-lines-toggle{display:flex;justify-content:center;align-items:center;gap:9px;width:100%;min-height:44px;padding:9px 12px;margin:5px 0 14px;font-size:.88rem}
.order-view-lines-toggle[hidden]{display:none!important}
.order-view-lines-mobile-toggle{display:none}
.order-view-lines-arrow{font-size:.84rem;line-height:1}
.order-view-lines-total{display:flex;align-items:baseline;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:12px 20px 12px 0;margin:0 0 8px;font-size:.9rem;font-weight:750}.order-view-lines-total strong{font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:700px){
 .order-view-lines-heading{flex-wrap:wrap}
 .order-view-lines-mobile-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-inline-start:auto;padding:6px 10px;font-size:.8rem}
 .order-view-lines-toggle{display:none}
 .order-view-lines-viewport,.order-view-lines-viewport.is-collapsed{max-height:none;overflow:auto}
 .order-view-lines-viewport.is-collapsed::after{display:none}
 .order-view-lines-viewport:not(.is-expanded) .order-view-line-extra{display:none}
}
.order-view-line-table{width:100%;table-layout:fixed;border-collapse:collapse;margin:0 0 10px;font-size:.87rem}
.order-view-line-table th{font-size:.7rem;font-weight:750;color:var(--muted);text-align:left;padding:7px 0 10px;border-bottom:1px solid var(--line)}
.order-view-line-table td{padding:14px 0;border-bottom:1px solid var(--line);vertical-align:top;line-height:1.5;color:var(--ink)}
.order-view-line-table tbody tr:last-child td{border-bottom:0}
.order-view-line-table .order-view-quantity-column,.order-view-line-table .order-view-line-quantity{width:90px;text-align:right;padding-left:12px;font-variant-numeric:tabular-nums}
.order-view-line-table .order-view-amount-column,.order-view-line-table .order-view-line-amount{width:135px;text-align:right;padding-left:16px;padding-right:20px;font-variant-numeric:tabular-nums}
.order-view-line-quantity>span{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.order-view-line-quantity>small{display:block;color:var(--muted);font-size:.7rem;overflow-wrap:anywhere}
.order-view-line-amount{font-weight:700;overflow-wrap:anywhere}
.order-view-product{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.order-view-product-number{display:inline-block;font-size:.7rem;font-weight:700;line-height:1.5;color:var(--muted);background:var(--ov-soft);border:1px solid var(--line);padding:1px 6px;border-radius:4px;max-width:100%;overflow-wrap:anywhere}
.order-view-product-name{font-size:.88rem;font-weight:750;overflow-wrap:anywhere;white-space:pre-wrap;min-width:0}
.order-view-description{margin:8px 0 0 14px;padding:0 0 0 12px;border-left:2px solid var(--line);font-size:.82rem;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.order-view-empty{padding:0 0 15px;margin:0;color:var(--muted);font-size:.88rem}
.order-view-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
html[data-theme=light] .order-view-card,html[data-theme=light] .order-view-hero,html[data-theme=light] .order-view-lines{--ov-blue:#1d6c9b;--ov-purple:#7051a4;--ov-green:#227453;--ov-amber:#856017;--ov-neutral:#536d81;--ov-tint:#f0f5fa;--ov-soft:#f1f5f8;--ov-hover:#edf5fc}
html[data-theme=light] .order-view-label{--ov-label-bg:#edf2f6;--ov-label-ink:#41596c;--ov-label-border:#becedb}
html[data-theme=light] .order-view-label-green{--ov-label-bg:#e5f4eb;--ov-label-ink:#245f3d;--ov-label-border:#a2cbb1}html[data-theme=light] .order-view-label-yellow{--ov-label-bg:#fff6d4;--ov-label-ink:#705709;--ov-label-border:#ddc575}html[data-theme=light] .order-view-label-orange{--ov-label-bg:#fff0e1;--ov-label-ink:#8a4b1a;--ov-label-border:#dfb28c}html[data-theme=light] .order-view-label-red{--ov-label-bg:#ffebef;--ov-label-ink:#94354b;--ov-label-border:#dda0ad}html[data-theme=light] .order-view-label-purple{--ov-label-bg:#f0eafa;--ov-label-ink:#694296;--ov-label-border:#c1a7db}html[data-theme=light] .order-view-label-blue{--ov-label-bg:#e7f3fc;--ov-label-ink:#245c84;--ov-label-border:#a1c7e2}html[data-theme=light] .order-view-label-sky{--ov-label-bg:#e3f5f6;--ov-label-ink:#21656c;--ov-label-border:#9ccbd1}html[data-theme=light] .order-view-label-lime{--ov-label-bg:#edf5df;--ov-label-ink:#496a22;--ov-label-border:#b8cb95}html[data-theme=light] .order-view-label-pink{--ov-label-bg:#faeaf4;--ov-label-ink:#8a3d75;--ov-label-border:#d7abca}html[data-theme=light] .order-view-label-black{--ov-label-bg:#e8ecf1;--ov-label-ink:#3c4656;--ov-label-border:#b7c0cf}
html[data-theme=light] .order-view-warning{--ov-label-bg:#fff4dc;--ov-label-ink:#7a561a;--ov-label-border:#d9bb7a}
@media(max-width:700px){.order-view-card.order{grid-template-columns:minmax(0,1fr);gap:12px;padding:15px 14px 15px 16px}.order-view-card-aside{flex-direction:row;flex-wrap:wrap;align-items:center;max-width:none;gap:10px 16px;text-align:left;padding-top:11px;border-top:1px solid var(--line)}.order-view-card-aside .order-view-status{flex:0 1 auto}.order-view-card-aside .order-view-date{margin-left:auto}.order-view-card-aside .order-view-total{margin-left:auto}.order-view-open{display:none}.order-view-customer{font-size:1rem}.order-view-meta{gap:4px 12px}.order-view-hero{padding:15px 16px}.order-view-hero h1{margin-top:11px}.order-view-lines{padding:0 13px}.order-view-line-table .order-view-quantity-column,.order-view-line-table .order-view-line-quantity{width:54px;padding-left:7px}.order-view-line-table .order-view-amount-column,.order-view-line-table .order-view-line-amount{width:88px;padding-left:9px}.order-view-description{margin-left:8px;padding-left:9px}.order-view-product-name{font-size:.82rem}.order-view-line-table{font-size:.8rem}.order-view-description{font-size:.77rem}}
@media(max-width:380px){.order-view-card-heading{gap:5px 8px}.order-view-meta-item{flex-wrap:wrap;gap:0 5px}.order-view-card-aside .order-view-status{max-width:100%}.order-view-hero-top{gap:8px}.order-view-status{font-size:.69rem}.order-view-lines{padding:0 10px}.order-view-line-table .order-view-quantity-column,.order-view-line-table .order-view-line-quantity{width:54px;padding-left:5px}.order-view-line-table .order-view-amount-column,.order-view-line-table .order-view-line-amount{width:74px;padding-left:6px}.order-view-product-number{font-size:.63rem}.order-view-description{margin-left:5px;padding-left:7px}}
@media(prefers-reduced-motion:reduce){.order-view-card.order{transition:none}}

/* Order detail flow: operations together, supporting facts kept compact. */
.order-detail{display:grid;gap:16px}.order-detail>.panel,.order-detail>.order-hero,.order-detail>.order-work{margin-bottom:0}.order-detail .order-section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.order-detail .order-section-heading h2{font-size:19px;margin:0}.order-detail .order-contact-strip{display:grid;grid-template-columns:1.2fr 1.2fr .7fr;gap:16px;padding:16px 18px;background:var(--panel);border:1px solid var(--line);border-radius:14px}.order-detail .order-contact-fact{min-width:0}.order-detail .order-contact-fact>span{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}.order-detail .order-contact-fact>strong{display:block;font-size:14px;line-height:1.45;overflow-wrap:anywhere}.order-detail .order-contact-links{display:flex;flex-direction:column;gap:5px;margin-top:8px}.order-detail .order-contact-links a{font-size:13px;color:var(--accent,#8fd3ff);overflow-wrap:anywhere;text-decoration:underline;text-underline-offset:3px}.order-detail .order-operations{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}.order-detail .order-operations:has(>.order-operation-card:only-child){grid-template-columns:1fr}.order-detail .order-operation-card{margin:0;min-width:0;border-top:3px solid #d6a14f;display:flex;flex-direction:column;align-items:flex-start;gap:12px}.order-detail .installation-operation{border-top-color:#59bde7}.order-detail .order-operation-heading{display:flex;align-items:center;gap:10px}.order-detail .order-operation-heading>.icon{color:#d6a14f}.order-detail .installation-operation .order-operation-heading>.icon{color:#59bde7}.order-detail .order-operation-heading h3{margin:0;font-size:18px}.order-detail .order-operation-status{color:var(--ink);font-size:15px;font-weight:650;margin:0}.order-detail .order-operation-hint{font-size:13px;line-height:1.5;margin:0}.order-detail .order-operation-card>.primary{min-height:44px;margin:0;width:100%;justify-content:center}.order-detail .order-production-followup{width:100%;margin-top:auto}.order-detail .order-plan-settings{width:100%;border-top:1px solid var(--line);padding-top:12px;margin-top:auto}.order-detail .order-plan-settings>summary{font-size:14px;font-weight:700;cursor:pointer;min-height:28px}.order-detail .plan-detail-inline{padding-top:12px}.order-detail .plan-detail-inline>.primary,.order-detail .plan-detail-inline>.secondary{margin:7px 8px 0 0}.order-detail .plan-detail-inline .plan-detail-row{font-size:13px;padding:10px 0}.order-detail .plan-detail-inline .estimate-editor{margin-top:8px}.order-detail .followup-production-slot{display:grid;gap:10px}.order-detail .followup-production-slot>.followup-section{padding:12px;margin:0;box-shadow:none;background:var(--panel2);border-radius:10px}.order-detail .followup-production-slot>.followup-section>summary{font-size:14px;margin-bottom:0;line-height:1.5}.order-detail .followup-production-slot>.followup-section[open]>summary{margin-bottom:12px}.order-detail .followup-production-slot .work-form{padding:10px}.order-detail .order-brief-slot{display:grid;gap:12px}.order-detail .order-brief-slot:empty{display:none}.order-detail .order-followup-rest>.followup-stack{margin:0;gap:12px}.order-detail .order-source-details>summary,.order-detail .order-trello-brief>summary{font-size:15px;font-weight:700;cursor:pointer}.order-detail .order-source-details[open]>.info-grid{margin-top:16px}.order-detail .order-source-details .panel{box-shadow:none;margin:0}.order-detail .order-data-notice{border:1px solid #a37c36;border-left-width:3px;border-radius:10px;background:var(--panel);padding:10px 14px;color:var(--ink);font-size:13px;line-height:1.5;margin:0}.order-detail .order-source-details .order-data-notice{margin:12px 0}.order-detail .order-work>.details-actions{gap:8px}.order-detail .order-work .work-group{margin-top:14px;padding-top:12px}.order-detail .order-work .work-group>summary{cursor:pointer;font-size:14px;font-weight:700;min-height:24px}.order-detail .order-trello-brief .work-text{line-height:1.6;margin-top:12px}.order-detail .order-trello-brief{margin:0}.order-detail .order-operation-card input,.order-detail .order-operation-card select{min-width:0;max-width:100%}
@media(max-width:900px){.order-detail .order-contact-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.order-detail .order-operation-card{padding:16px}}
@media(max-width:700px){.order-detail .order-operations{grid-template-columns:1fr}.order-detail{gap:12px}.order-detail .order-contact-strip{padding:14px;gap:14px}.order-detail .order-contact-links a{min-height:28px;display:flex;align-items:center}.order-detail .order-contact-fact>strong{font-size:13px}.order-detail .order-operation-heading h3{font-size:17px}.order-detail .order-source-details>.info-grid{grid-template-columns:1fr;gap:12px}.order-detail .order-work>.details-actions>button{flex:1 1 40%;min-height:44px}.order-detail .order-work>.details-actions>button.primary{flex-basis:100%}}

.order-detail>.order-view-hero,.order-detail>.order-view-lines{margin-bottom:0}.order-detail .order-contact-strip:has(>.order-contact-fact:only-child){grid-template-columns:1fr}

#app-view.order-workspace>.welcome{margin:0 0 10px}#app-view.order-workspace>.welcome #who-role,#app-view.order-workspace>.welcome #who-name{display:none}#app-view.order-workspace>.welcome #last-sync{margin:0;font-size:11px;max-width:none}#app-view.order-workspace>.toolbar{margin-top:8px}
.order-detail .order-source-operations{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:10px}.order-detail .order-source-operations>summary{cursor:pointer;font-size:14px;font-weight:700}.order-detail .order-source-operations p{font-size:13px;line-height:1.5;margin:10px 0}

/* The order conversation has its own composer and history. */
.order-messages .order-message-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.order-messages .order-message-heading h3{margin:0}.order-messages .order-message-heading .details-actions{margin:0}.order-messages .order-message-history>.work-note:first-child{padding-top:12px}.order-messages .work-note{overflow-wrap:anywhere}.order-messages .work-editor>.work-form{max-width:none}.order-messages .order-message-reports{margin-top:14px}.order-messages .order-message-history>p{margin-top:12px}.order-detail>.order-messages{margin-bottom:0}
.order-detail .order-header-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.order-detail .order-header-actions>button{min-height:44px}@media(max-width:620px){.order-detail .order-header-actions>button{flex:1 1 auto}}

.order-detail .order-packing-brief{margin:0}.order-detail .order-packing-brief>summary{font-size:15px;font-weight:700;cursor:pointer}.order-detail .order-packing-brief[open]>summary{margin-bottom:14px}.order-detail .order-packing-brief textarea{display:block;width:100%;max-width:100%;margin-top:7px}

.order-detail .order-header-actions{align-items:center}.order-header-pack{position:relative}.order-header-pack>summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;cursor:pointer;list-style:none}.order-header-pack>summary::-webkit-details-marker{display:none}.order-header-pack>summary:after{display:none}.order-header-pack-menu{position:absolute;z-index:20;top:calc(100% + 6px);left:0;display:grid;gap:6px;width:240px;max-width:calc(100vw - 52px);padding:8px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 28px #0003}.order-header-pack-menu>button{width:100%;justify-content:flex-start;min-height:42px;text-align:left}.order-detail .order-header-link{font-size:12px;color:var(--muted);text-decoration:underline;text-underline-offset:3px;padding:8px 4px}.order-sms-dialog>.completion-heading{margin-bottom:10px}.order-sms-dialog .sms-text{max-width:100%}.order-sms-dialog .work-form{max-width:none}@media(max-width:620px){.order-detail .order-header-pack{flex:1 1 auto}.order-header-pack>summary{width:100%}}

.order-header-pack>summary{border:1px solid var(--line);border-radius:11px;font-weight:750;padding:10px 17px;background:var(--panel2);color:var(--ink)}.order-header-pack>summary:hover{filter:brightness(1.1)}.order-review .followup-control-slot{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px}.order-review .followup-control-slot:empty{display:none}.order-review .followup-control-slot>.panel{margin:0;box-shadow:none;background:var(--panel2);padding:14px}.order-review .followup-control-slot>.panel:only-child{grid-column:1/-1}.order-review .followup-control-slot>.panel>summary{cursor:pointer;font-weight:700}.order-review .followup-control-slot>.panel[open]>summary{margin-bottom:12px}@media(max-width:700px){.order-review .followup-control-slot{grid-template-columns:1fr}}

/* Files can be dropped anywhere inside the document panel; the button is the keyboard alternative. */
.order-work .work-upload-slot:empty{display:none}.order-work .work-dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;min-height:96px;margin:12px 0;border:2px dashed var(--line);border-radius:12px;background:var(--panel2);color:var(--ink);padding:15px;text-align:center}.order-work .work-dropzone strong{font-size:.92rem}.order-work .work-dropzone span{font-size:.77rem;font-weight:500;color:var(--muted)}.order-work .work-dropzone:hover{border-color:var(--blue)}.order-work.work-drag-active{outline:3px solid var(--blue);outline-offset:3px}.order-work.work-drag-active .work-dropzone{border-color:var(--blue);background:var(--input)}.order-work .work-selected-files{list-style:none;padding:0;margin:0;display:grid;gap:8px}.order-work .work-selected-files:empty{display:none}.order-work .work-selected-files li{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--line);border-radius:8px}.order-work .work-selected-files li>span{flex:1;min-width:0;overflow-wrap:anywhere}.order-work .work-selected-files strong,.order-work .work-selected-files small{display:block}.order-work .work-selected-files small{margin-top:3px}.order-work .work-selected-files button{max-width:45%;overflow-wrap:anywhere;font-size:.75rem;padding:8px;min-height:40px}.order-work .work-upload-form input[type=file]{min-width:0;width:100%}@media(max-width:620px){.order-work .work-dropzone{padding:12px;min-height:90px}.order-work .work-selected-files li{align-items:flex-start;gap:8px}.order-work .work-selected-files button{max-width:40%}}

/* Compact order actions and open installation / sales controls. */
.order-sms-dialog .work-field[hidden]{display:none}
.order-detail .order-plan-settings{border:0;padding:0;margin:0;width:100%}.order-detail .installation-operation>.order-finish-installation{margin-top:auto}.order-detail .installation-operation .plan-detail-inline{padding:0}.order-detail .installation-operation .plan-estimate{margin-top:0}.order-detail .installation-operation .plan-detail-row{font-size:13px}.order-review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}.order-review-grid>.panel{margin:0;min-width:0}.order-review-grid h3{margin-top:0}.order-review-grid .followup-control-slot{display:block;margin:0}.order-review-grid .order-documentation{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}.order-review-grid .order-documentation h4{margin:0 0 10px}.order-review-grid .followup-documentation-slot>.followup-section{margin:14px 0 0;padding:12px;box-shadow:none}.order-review-grid .work-form{padding:12px}.order-message-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:20px;background:var(--accent,#59bde7);color:#082130;font-size:11px;font-weight:800}.order-header-actions .order-candidate-trigger:disabled{opacity:1;cursor:default}.order-header-actions .order-candidate-trigger.is-selected{background:#226c4a;border-color:#59bd8d;color:#f4fff9}.order-description-dialog .order-description-trello,.order-description-dialog .order-description-packing{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.order-description-dialog textarea{width:100%;max-width:100%;min-height:100px}.order-messages-dialog .order-messages{box-shadow:none;border:0;padding:0;margin:0}.order-sms-dialog{width:min(540px,calc(100vw - 24px))}.order-sms-dialog .sms-text{min-height:125px}.order-review-grid .followup-invoice>p{font-size:13px}@media(max-width:700px){.order-review-grid{grid-template-columns:1fr;gap:12px}.order-detail .installation-operation .plan-estimate-form{display:flex;flex-wrap:wrap;gap:8px}.order-detail .installation-operation .plan-estimate-form>label{flex:1 1 100%;min-width:0}}

/* Production keeps its four work queues side by side; smaller screens scroll the board. */
.production-view-switch{display:flex;justify-content:flex-end;gap:6px;margin:0 0 12px}.production-view-switch button{min-height:40px;min-width:86px;padding:8px 14px}.production-view-switch button[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--blue)}
.production-board-viewport{max-width:100%;min-width:0;overflow-x:auto;padding:3px 3px 14px;overscroll-behavior-x:contain}.production-board-viewport:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:12px}.production-board{display:grid;grid-template-columns:repeat(4,minmax(235px,1fr));gap:12px;align-items:stretch;min-width:976px}.production-board-column{--production-accent:#ceb7ff;min-width:0;background:var(--panel2);border:1px solid var(--line);border-top:3px solid var(--production-accent);border-radius:13px;padding:11px}.production-board-not{--production-accent:#ffd58a}.production-board-progress{--production-accent:#87cfff}.production-board-produced{--production-accent:#86dfbc}.production-board-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin:0 0 12px}.production-board-heading h3{margin:0;font-size:15px;line-height:1.35;color:var(--ink)}.production-board-count{display:inline-flex;align-items:center;justify-content:center;min-width:25px;height:25px;padding:0 6px;border:1px solid var(--line);background:var(--panel);border-radius:7px;font-size:12px;font-weight:800;color:var(--production-accent);font-variant-numeric:tabular-nums}.production-board-jobs{display:grid;gap:10px}.production-board-empty{color:var(--muted);font-size:13px;text-align:center;padding:24px 0;margin:0}.production-board-job{display:grid;gap:8px;min-width:0}.production-board-job:has(>.production-board-sources){padding:7px;border:1px solid var(--line);border-radius:12px}.production-board-sources{margin:0;padding:2px;font-size:11px;font-weight:650;color:var(--muted)}
.production-board .order-view-card.order{grid-template-columns:minmax(0,1fr);gap:11px;padding:13px 12px;border-radius:10px;align-items:start}.production-board .order-view-card-main{gap:7px}.production-board .order-view-card-heading{display:flex;flex-direction:column;align-items:flex-start;gap:5px}.production-board .order-view-customer{font-size:.91rem;line-height:1.4}.production-board .order-view-number{font-size:.72rem}.production-board .order-view-title{font-size:.8rem;line-height:1.45}.production-board .order-view-meta{font-size:.7rem;gap:4px 9px}.production-board .order-view-meta-item{display:block}.production-board .order-view-meta-label{margin-right:5px}.production-board .order-view-card-aside{align-items:flex-start;flex-direction:row;flex-wrap:wrap;max-width:none;gap:8px;text-align:left;padding-top:9px;border-top:1px solid var(--line)}.production-board .order-view-status{font-size:.65rem;padding:4px 6px}.production-board .order-view-date{margin-left:0;font-size:.73rem}.production-board .order-view-total{margin-left:auto;font-size:.8rem}.production-board .order-view-open{display:none}.production-board .order-view-label,.production-board .order-view-warning{font-size:.65rem;padding:3px 6px}.production-board .order-view-warnings{gap:4px}
html[data-theme=light] .production-board-column{--production-accent:#7051a4}html[data-theme=light] .production-board-not{--production-accent:#856017}html[data-theme=light] .production-board-progress{--production-accent:#1d6c9b}html[data-theme=light] .production-board-produced{--production-accent:#227453}
@media(max-width:700px){.production-board{grid-template-columns:repeat(4,100%);min-width:0;gap:12px}.production-board-viewport{margin:0 -3px;scroll-snap-type:x mandatory;scroll-padding-inline:3px}.production-board-column{scroll-snap-align:start;scroll-snap-stop:always}.production-view-switch{justify-content:flex-start}}

.production-board-job[draggable=true]>.order-view-card{cursor:grab}.production-board-job[draggable=true]>.order-view-card:active{cursor:grabbing}.production-board-column.production-drop-target{outline:1px dashed var(--production-accent);outline-offset:2px}.production-board-column.production-drop-active{outline:3px solid var(--production-accent);outline-offset:2px;background:var(--input)}.production-board-job.production-dragging{opacity:.5}.production-board-job.production-board-pending{opacity:.8}.production-board-feedback{margin:0;padding:7px 9px;background:var(--panel);border:1px solid var(--line);border-radius:7px;color:var(--ink);font-size:12px;line-height:1.45;overflow-wrap:anywhere}.production-board-error{border-color:#ad5d6c;color:#ffbbc9}.production-move-menu{margin-top:-3px;min-width:0}.production-move-menu>summary{cursor:pointer;list-style:none;font-size:11px;font-weight:700;color:var(--muted);padding:7px 4px;text-align:right;min-height:32px}.production-move-menu>summary::-webkit-details-marker{display:none}.production-move-menu>summary:focus-visible{outline:2px solid var(--blue);outline-offset:1px;border-radius:5px}.production-move-options{display:grid;gap:5px;padding:5px 0}.production-move-options>button{font-size:12px;padding:8px;min-height:36px;white-space:normal}.production-board-viewport[aria-busy=true] .production-move-menu>summary{cursor:wait}html[data-theme=light] .production-board-error{color:#94354b;border-color:#dda0ad}

/* Missing order data is marked at the field, without a separate warning row. */
.order-detail .order-contact-fact .order-field-missing{color:#ff7474;font-size:18px;font-weight:850;line-height:1.3;letter-spacing:.035em}
.order-contact-missing-link{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.order-contact-missing-link>span{color:var(--muted);font-size:12px;min-width:38px}
html[data-theme=light] .order-detail .order-contact-fact .order-field-missing{color:#bd202b}

/* Empty queues remain full-height drop zones; cards start at the top. */
.production-board-column{display:flex;flex-direction:column;min-height:360px;min-height:min(600px,65vh)}
.production-board-jobs{flex:1;align-content:start;min-height:220px}
.production-board-job[draggable=true]>.order-view-card{user-select:none}
.production-board-column.production-drop-target .production-board-empty{border:2px dashed var(--production-accent);border-radius:10px;min-height:180px;display:grid;place-items:center}

/* Emphasize the hovered destination, including when it already contains cards.
 * Production marks other allowed destinations separately with a dashed outline. */
.production-board-column.production-drop-active,
.all-orders-column.production-drop-target{
 --kanban-drop-ring:#6bddff;
 --kanban-drop-tint:rgba(56,189,248,.19);
 border-color:var(--kanban-drop-ring);
 outline:3px solid var(--kanban-drop-ring);
 outline-offset:-2px;
 background:linear-gradient(var(--kanban-drop-tint),var(--kanban-drop-tint)),var(--panel2);
 box-shadow:inset 0 0 0 2px var(--kanban-drop-ring);
}
.production-board-column.production-drop-active>.production-board-heading,
.all-orders-column.production-drop-target>.production-board-heading{
 background:#08658c;
 border-radius:6px;
 box-shadow:0 0 0 5px #08658c;
}
.production-board-column.production-drop-active>.production-board-heading h3,
.all-orders-column.production-drop-target>.production-board-heading h3{color:#fff}
.production-board-column.production-drop-active .production-board-count,
.all-orders-column.production-drop-target .production-board-count{background:#e5f9ff;border-color:#e5f9ff;color:#064663}
html[data-theme=light] .production-board-column.production-drop-active,
html[data-theme=light] .all-orders-column.production-drop-target{--kanban-drop-ring:#0075ac;--kanban-drop-tint:rgba(0,133,196,.16)}

/* Compact Kanban cards retain installation planning as well as identity and deadlines. */
.production-board .order-view-card.order{gap:5px;padding:8px 9px;border-radius:8px}
.production-board .order-view-card-main{gap:4px}
.production-board .order-view-card-heading{flex-direction:row;flex-wrap:nowrap;align-items:baseline;gap:8px}
.production-board .order-view-number{font-size:.95rem;font-weight:850}
.production-board .order-view-customer{font-size:.81rem;line-height:1.3;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-board .order-view-title{font-size:.77rem;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.production-board .order-view-meta,.production-board .order-card-delivery,.production-board .order-view-status,.production-board .order-view-total{display:none}
.order-card-installation{display:none}
.order-view-labels.order-card-board-labels{display:none}
.production-board .order-view-labels.order-card-board-labels{display:flex}
.production-board .order-view-labels.order-card-list-labels{display:none}
.production-board .order-card-installation{display:flex;flex-direction:column;gap:4px;font-size:.72rem;line-height:1.4;margin-top:2px;min-width:0}
.order-card-installer,.order-card-appointment{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 6px;min-width:0}
.order-card-installation small{font-size:.65rem;color:var(--muted)}
.order-card-installer strong{overflow-wrap:anywhere}
.order-card-missing{color:var(--ov-label-ink,#ffe1a5)}
.order-card-booking{font-size:.62rem;line-height:1.35;border:1px solid;padding:2px 5px;border-radius:5px}
.order-card-booking.is-confirmed{color:#a9f1c7;background:#173e32;border-color:#3c805e}
.order-card-booking.is-tentative{color:#ffe1a5;background:#43341b;border-color:#967441}
.order-card-visit-progress{font-size:.65rem;color:var(--muted)}
.order-card-installation-finished{color:var(--mint,#6cd9c1);font-weight:700}
.production-board .order-card-not-applicable{display:none}
.production-board .order-operation-card-tags:not(:has(>:not(.order-card-not-applicable))){display:none}
html[data-theme=light] .order-card-missing{color:#7a561a}
html[data-theme=light] .order-card-booking.is-confirmed{color:#245f3d;background:#e5f4eb;border-color:#a2cbb1}
html[data-theme=light] .order-card-booking.is-tentative{color:#7a561a;background:#fff4dc;border-color:#d9bb7a}
.production-board .order-view-card-aside{padding-top:3px;border-top:0;gap:4px;align-items:center}
.production-board .order-view-card-aside:has(>.order-view-status:only-child){display:none}
.production-board .order-view-date{flex-direction:row;align-items:baseline;gap:5px;font-size:.72rem;margin-left:0}
.production-board .order-view-date small{font-size:.62rem}
.production-board .order-view-labels,.production-board .order-view-warnings{gap:3px}
.production-board .order-view-label,.production-board .order-view-warning{padding:2px 5px;font-size:.63rem;line-height:1.25}
.production-board-job{gap:2px}
.production-board-jobs{gap:7px}
.production-board .production-move-menu{margin-top:0}
.production-board .production-move-menu>summary{min-height:24px;padding:3px 4px;font-size:10px}


/* A shared production hold stays in its current queue. */
.order-view-card.order.order-production-on-hold{--ov-accent:#f09898;background:linear-gradient(110deg,#6a3f48 0%,#3d2e39 65%,var(--panel) 100%);border-color:#a86464;border-left-color:#f09898}
.order-view-card.order.order-production-on-hold:hover{background:linear-gradient(110deg,#7b4952 0%,#49323e 65%,var(--panel) 100%);border-color:#f09898}
.production-hold-label{display:inline-flex;align-items:center;color:#ffb4b4;font-size:12px;font-weight:800;line-height:1.4}
.production-hold-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-bottom:10px}
.production-hold-actions .production-hold-toggle{min-height:40px;margin:0;font-size:13px}
.production-board .production-hold-label{font-size:11px}
html[data-theme=light] .order-view-card.order.order-production-on-hold{--ov-accent:#cb7777;background:linear-gradient(110deg,#fbdcdc 0%,#fff0f0 65%,#fff 100%);border-color:#e2aaaa;border-left-color:#cb7777}
html[data-theme=light] .order-view-card.order.order-production-on-hold:hover{background:linear-gradient(110deg,#f7cece 0%,#ffe7e7 65%,#fff 100%);border-color:#cb7777}
html[data-theme=light] .production-hold-label{color:#9b3535}


/* Dates stay compact; each production queue owns its deadline sorting. */
.production-board-heading{margin-bottom:7px}
.production-deadline-sort{display:block;width:100%;min-width:0;min-height:32px;padding:5px 7px;margin:0 0 9px;font-size:11px;font-weight:650;border-radius:7px}
.production-deadline-missing,.order-detail .order-date-fact .order-field-missing{color:#ff8585;font-weight:850}
.order-detail .order-date-fact{display:flex;align-items:baseline;flex-wrap:wrap;gap:7px 12px;margin:0;font-size:14px}
.order-detail .order-date-fact>span{color:var(--muted);font-size:12px}
.order-detail .order-date-fact .order-field-missing{font-size:18px}
.order-detail .order-date-hint{margin:0;font-size:12px}
.order-detail .production-deadline-form.work-form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;padding:0;margin:0;border:0;background:none;max-width:none}
.order-detail .production-deadline-form .work-field{flex:1 1 170px;min-width:0;margin:0;font-size:12px}
.production-deadline-form input{width:100%;min-height:40px;margin-top:5px}
.production-deadline-form button{min-height:40px;margin:0;padding:8px 12px;font-size:13px}
.production-deadline-editor .production-deadline-hint{margin:6px 0 0;font-size:11px;line-height:1.4}
.production-deadline-editor .production-deadline-reset{margin:6px 0 0;padding:6px 9px;min-height:32px;font-size:11px}
html[data-theme=light] .production-deadline-missing,html[data-theme=light] .order-detail .order-date-fact .order-field-missing{color:#ac3030}

.order-detail .order-delivery-date{width:100%}.order-delivery-date-slot .production-deadline-hint{font-size:11px;margin:6px 0 0;line-height:1.4}.order-delivery-date-slot>button{font-size:12px;min-height:36px;margin:7px 0 0;padding:7px 10px}

/* Planning and contact information share one compact order section. */
.order-view-hero-main{display:flex;align-items:center;justify-content:space-between;gap:16px 28px;margin:10px 0 12px}.order-view-hero-copy{flex:1;min-width:0}.order-view-hero-contact{flex:0 1 auto;min-width:0}.order-view-hero-contact>span{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}.order-view-hero-contact>strong{display:block;font-size:15px;overflow-wrap:anywhere}.order-view-hero-contact .order-field-missing{color:#ff7474;font-size:18px;font-weight:850}.order-view-hero-copy h1{margin:0}.order-view-hero-copy .order-view-hero-customer{margin:7px 0 0}
.order-detail .order-contact-strip{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(320px,1fr);gap:18px 24px;align-items:start}
.order-planning-panel{display:grid;gap:8px;min-width:0;border-left:1px solid var(--line);padding-left:20px}.order-planning-panel .order-planning-value{display:flex;align-items:baseline;justify-content:space-between;flex:1;gap:10px;min-height:32px}.order-planning-panel .order-planning-value>span{margin:0}.order-planning-panel .order-planning-value>strong{text-align:right;flex-shrink:0}.order-detail .order-planning-panel .order-planning-summary{min-height:32px;gap:12px;align-items:baseline}.order-planning-panel .order-contact-fact:has(>.order-planning-value){padding-right:44px}
.order-planning-value{min-width:0;text-align:left}.order-planning-value>span{display:block;color:var(--muted);font-size:12px;font-weight:400;margin-bottom:6px}.order-planning-value>strong{display:block;font-size:15px;line-height:1.45;overflow-wrap:anywhere}
.order-detail .order-planning-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:48px;padding:0;margin:0;border:0;border-radius:4px;background:none;color:var(--ink);list-style:none;cursor:pointer;text-align:left;white-space:normal}
.order-planning-summary::-webkit-details-marker{display:none}.order-planning-summary:after{display:none}.order-planning-edit{color:var(--accent,#8fd3ff);font-size:12px;font-weight:600;text-decoration:underline;text-underline-offset:3px;flex-shrink:0}
.order-planning-summary:focus-visible{outline:2px solid var(--blue);outline-offset:4px}.order-planning-editor[open]>.order-planning-summary{margin-bottom:10px}.order-planning-editor .production-deadline-form .work-field{flex-basis:100%}.order-planning-editor input{box-sizing:border-box;max-width:100%;min-width:0}.order-planning-editor .production-deadline-hint{margin:7px 0 0;font-size:11px;line-height:1.4}.order-planning-editor .production-deadline-reset{min-height:32px;margin:6px 0 0;padding:6px 9px;font-size:11px}
html[data-theme=light] .order-view-hero-contact .order-field-missing{color:#bd202b}
@media(max-width:900px){.order-detail .order-contact-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.order-planning-panel{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);padding:12px 0 0}}
@media(max-width:700px){.order-view-hero-main{flex-wrap:wrap;gap:10px}.order-view-hero-copy{flex-basis:100%}.order-view-hero-contact{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 10px}.order-view-hero-contact>span{margin:0}}
@media(max-width:380px){.order-planning-panel .order-planning-summary{gap:8px}.order-planning-panel .order-planning-value{gap:8px}.order-planning-panel .order-planning-value>span{font-size:11px}.order-planning-panel .order-planning-value>strong{font-size:14px}}



/* One final check with the existing documentation package download. */
.order-detail>.order-final-review{margin:0}.order-final-review-heading{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;flex-wrap:wrap;margin-bottom:12px}.order-final-review-heading h3{margin:0;font-size:18px}.order-final-review-heading .details-actions{margin:0}.order-final-review-heading .order-archive>p:empty{display:none}.order-final-review-heading .order-archive>p{margin:6px 0 0;font-size:12px}.order-final-review-heading button{min-height:40px;margin:0;font-size:13px}
.order-final-review .order-final-review-form.work-form{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"check submit" "note note";align-items:center;gap:6px 24px;max-width:none;margin:0;padding:0;border:0;background:none}
.order-final-review .work-field{margin:0;min-width:0}
.order-final-review .work-field.order-final-review-check{grid-area:check;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:10px;min-height:44px;font-size:14px;line-height:1.45;cursor:pointer}
.order-final-review-check input[type=checkbox]{order:-1;flex:0 0 20px;width:20px;height:20px;min-height:20px;padding:0;margin:0;accent-color:var(--accent,#59bde7)}
.order-final-review-form>button{grid-area:submit;min-height:44px;margin:0;font-size:13px;white-space:normal}
.order-final-review-note{grid-area:note;min-width:0;max-width:760px}
.order-final-review-note>summary{width:fit-content;min-height:30px;padding:4px 0;color:var(--muted);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.order-final-review-note>summary:hover{color:var(--ink)}
.order-final-review-note[open]>.work-field{margin-top:8px;font-size:13px}
.order-final-review textarea{display:block;width:100%;box-sizing:border-box;min-height:76px;margin:0;resize:vertical}
.order-final-review-status{margin:0 0 12px;font-size:13px;line-height:1.5}.order-final-review-status:not(.muted){color:#86dfbc}html[data-theme=light] .order-final-review-status:not(.muted){color:#227453}
@media(max-width:600px){.order-final-review .order-final-review-form.work-form{grid-template-columns:1fr;grid-template-areas:"check" "note" "submit";gap:8px}.order-final-review-form>button{width:100%;margin-top:4px}.order-final-review-heading .order-review-files,.order-final-review-heading .order-archive button{width:100%}.order-final-review-check{min-height:36px}}



.install-board .production-board-ready{--production-accent:#70d7bb}.install-board .production-board-own{--production-accent:#80cbff}.install-board .production-board-external{--production-accent:#ffbc70}.install-board .production-board-waiting{--production-accent:#ff9393}
html[data-theme=light] .install-board .production-board-ready{--production-accent:#226747}html[data-theme=light] .install-board .production-board-own{--production-accent:#19618e}html[data-theme=light] .install-board .production-board-external{--production-accent:#98601c}html[data-theme=light] .install-board .production-board-waiting{--production-accent:#b32b36}
.install-board .production-move-menu button{display:block;width:100%;margin-top:4px;padding:7px;font-size:11px;text-align:left}

/* Shared order media: one drop target, photo thumbnails and a document list. */
.order-work{position:relative}.order-work>h3{margin-bottom:12px}.order-work>p:empty{display:none}.order-work .work-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;margin-top:18px}.order-work .work-photos,.order-work .work-files{min-width:0}.order-work .work-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}.order-work .work-section-heading h4{font-size:16px;margin:0}.order-work .work-section-heading .details-actions{margin:0;gap:8px}.order-work .work-section-heading button{min-height:42px}.order-work .work-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:12px}.order-work .work-photo-tile{margin:0;min-width:0}.order-work .work-thumbnail{display:block;width:100%;aspect-ratio:1;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--panel2);cursor:pointer}.order-work .work-thumbnail img{display:block;width:100%;height:100%;object-fit:cover}.order-work .work-thumbnail.is-loading img:not([src]){visibility:hidden}.order-work .work-thumbnail.preview-unavailable{position:relative}.order-work .work-thumbnail.preview-unavailable::after{content:'Vis bilde';display:block;padding:12px;color:var(--muted);font:inherit}.order-work .work-photo-tile figcaption{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:6px}.order-work .work-photo-tile .details-actions{margin:6px 0 0;gap:5px}.order-work .work-photo-tile .details-actions button{font-size:11px;padding:6px 8px;min-height:32px}.work-documents{list-style:none;padding:0;margin:0;min-width:0}.order-work .work-documents .work-file{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;align-items:center;padding:14px 0}.order-work .work-documents .work-file>.work-file-info{min-width:0;overflow-wrap:anywhere}.order-work .work-file-info strong{display:block;font-size:14px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.order-work .work-file-info small{font-size:12px}.order-work .work-documents .work-file .details-actions{grid-column:2;grid-row:1 / span 2;align-self:center;flex-wrap:wrap;gap:6px;width:auto}.order-work .work-documents .work-file .details-actions button{font-size:12px;padding:8px 10px;min-height:38px}.work-file-share{display:inline-flex;align-items:center;gap:8px;font-weight:500;font-size:12px;line-height:1.4;cursor:pointer;margin:0;min-height:32px}.work-file-share input[type=checkbox]{accent-color:var(--blue);width:18px;min-width:18px;height:18px;min-height:18px;padding:0;margin:0}.order-work .work-share-all{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:8px 0;border-bottom:1px solid var(--line)}.order-work .work-share-all .muted{font-size:11px}.order-work .work-empty{padding:14px 0;font-size:13px}.order-work.work-drag-active::after{content:'Slipp her – bilder og filer sorteres automatisk';position:absolute;inset:6px;z-index:5;display:flex;align-items:center;justify-content:center;padding:24px;text-align:center;pointer-events:none;border:2px dashed var(--blue);border-radius:12px;background:var(--panel);opacity:.96;font-weight:700}.order-work .work-trello-link{font-size:12px}.completion-dialog .work-documents .work-file{align-items:center}.completion-dialog .work-documents .work-file-info{min-width:0}
@media(max-width:850px){.order-work .work-columns{grid-template-columns:1fr;gap:24px}.order-work .work-files{border-top:1px solid var(--line);padding-top:20px}}
@media(max-width:620px){.order-work .work-desktop-upload{display:none}.order-work .work-upload-slot:has(.work-desktop-upload:only-child){display:none}.order-work .work-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.order-work .work-section-heading .details-actions{gap:6px}.order-work .work-section-heading button{min-height:44px}.order-work .work-documents .work-file{gap:8px}.order-work .work-documents .work-file .details-actions{max-width:92px;flex-direction:column;align-items:stretch}.order-work .work-documents .work-file .details-actions button{min-height:40px}.order-work .work-file-share{font-size:12px;min-height:36px}.order-work .work-share-all{align-items:flex-start}.order-work .work-share-all .muted{font-size:11px}.order-work .work-trello-link{width:auto;flex:none!important;min-height:40px}}


.order-header-actions>.order-delivery-menu{position:relative;margin-left:auto;flex:0 0 auto}.order-delivery-trigger{min-height:44px;padding:10px 17px}.order-delivery-trigger::after{content:'▾';font-size:11px;margin-left:4px}.order-delivery-options{position:absolute;right:0;top:calc(100% + 6px);z-index:30;display:grid;gap:6px;min-width:180px;max-width:calc(100vw - 52px);padding:8px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 28px #0003}.order-delivery-options[hidden]{display:none}.order-delivery-options>button{width:100%;min-height:42px;justify-content:flex-start;text-align:left}@media(max-width:620px){.order-header-actions>.order-delivery-menu{flex:1 1 auto}.order-delivery-trigger{width:100%}}

/* Keep planning beside the estimate and offer a checked calendar gap. */
.order-detail .installation-operation .plan-estimate{padding:12px 0 0;border-bottom:0;margin-bottom:0}
.order-detail .installation-operation .plan-estimate-form{gap:10px}
.order-detail .installation-operation .plan-estimate-form>label{flex:1 1 130px;min-width:0}
.order-detail .installation-operation .plan-estimate-form input{width:100%}
.order-detail .installation-operation .plan-estimate-form>button{min-height:44px;padding:9px 12px;font-size:13px}
.order-detail .installation-operation .plan-estimate-form>.plan-new-appointment{margin-left:auto}
.plan-availability{padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);display:grid;gap:8px}
.plan-availability>p,.plan-transfer{margin:0;font-size:13px;line-height:1.5}
.plan-availability>p{font-weight:650}.plan-availability>small{font-size:11px}.plan-availability>button{justify-self:start;min-height:38px;font-size:13px;padding:7px 11px}
@media(max-width:700px){.order-detail .installation-operation .plan-estimate-form>label{flex-basis:100%}.order-detail .installation-operation .plan-estimate-form>button{flex:1;min-width:0}}


/* Keep mobile media tools together above the photos and documents. */
.order-work .work-mobile-upload{display:none}
@media(max-width:620px){
 .order-work>.work-media-actions{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;width:100%;min-width:0;margin:0;overflow-x:auto}
 .order-work>.work-media-actions:empty{display:none}
 .order-work>.work-media-actions>button{flex:0 0 auto!important;width:auto;min-height:44px;padding:9px 12px;font-size:13px;white-space:nowrap}
 .order-work>.work-media-actions>.work-mobile-upload{display:inline-flex}
 .order-work .work-section-heading>.work-section-actions{display:none}
}

.order-sms-dialog .sms-history{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}.order-sms-dialog .sms-history summary{cursor:pointer;font-size:14px;font-weight:700}.order-sms-dialog .sms-history .followup-row{padding:12px 0;border-bottom:1px solid var(--line)}.order-sms-dialog .sms-history button{margin-top:12px}.order-sms-dialog .work-field select,.order-sms-dialog .work-field input{min-width:0;max-width:100%}
.order-sms-dialog .sms-feedback{border-color:#e88a8a;background:#492b30;color:#ffe4e4;overflow-wrap:anywhere}.order-sms-dialog .sms-feedback[hidden]{display:none}.order-sms-dialog .sms-status-error{color:#ffb9b9;font-size:13px}html[data-theme=light] .order-sms-dialog .sms-feedback{border-color:#c57878;background:#fff0f0;color:#8b2222}html[data-theme=light] .order-sms-dialog .sms-status-error{color:#a22222}

/* Place production pause/resume beside the heading, wrapping safely on phones. */
.order-detail .production-operation>.order-operation-heading{width:100%;flex-wrap:wrap}
.order-detail .production-operation>.order-operation-heading h3{flex:1 1 auto;min-width:0}
.order-detail .production-hold-slot{margin-left:auto;max-width:100%;min-width:0}
.order-detail .production-hold-slot:empty{display:none}
.order-detail .production-hold-slot>.production-hold-toggle{min-height:40px;margin:0;font-size:13px}

/* Small production controls in the title bar; retain original actions. */
.order-detail .production-header-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-left:auto;max-width:100%;min-width:0}
.order-detail .production-header-actions>.production-finish-action{width:auto;flex:0 1 auto;min-height:40px;max-width:100%;padding:9px 14px;font-size:13px;margin:0;white-space:normal}
.order-detail .production-header-actions>.production-hold-slot{margin:0;flex:0 1 auto;max-width:100%}
.order-detail .production-header-actions>.production-hold-slot>.production-hold-toggle{min-height:40px;margin:0}
@media(max-width:700px){
 .order-detail .production-operation>.order-operation-heading h3{flex:1 1 160px}
 .order-detail .production-header-actions{flex:1 0 100%;width:100%;justify-content:flex-end}
 .order-detail .production-header-actions>.production-finish-action,
 .order-detail .production-header-actions>.production-hold-slot{flex:1 1 145px;min-width:0}
 .order-detail .production-header-actions>.production-hold-slot>.production-hold-toggle{width:100%}
}


@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 .order-detail .order-header-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;margin-top:12px}
 .order-detail .order-header-actions>button,.order-detail .order-header-actions>details>summary,.order-detail .order-header-actions>.order-delivery-menu>.order-delivery-trigger{width:100%;min-width:0;min-height:44px;font-size:12px;padding:8px 4px;white-space:normal;overflow-wrap:anywhere}
 .order-detail .order-header-actions>details,.order-detail .order-header-actions>.order-delivery-menu{min-width:0;margin-left:0;width:100%}
 .order-detail .order-contact-links a{min-height:44px;padding-block:5px}
 .order-detail .order-plan-settings>summary{min-height:44px;display:flex;align-items:center}
}

/* Complete order-flow Kanban reuses the compact production card component. */
.all-orders-overview{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin:0 0 12px}
.all-orders-stage{min-width:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;min-height:68px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);text-align:left;box-shadow:none}
.all-orders-stage strong{font-size:23px;font-variant-numeric:tabular-nums;line-height:1.1;color:var(--blue)}
.all-orders-stage span{font-size:12px;line-height:1.35}
.all-orders-stage.active{border-color:var(--blue);background:var(--panel2)}
.all-orders-stage:hover{background:var(--panel2)}
.all-orders-board{grid-template-columns:repeat(var(--all-board-columns,13),minmax(230px,1fr));min-width:max(100%,calc(var(--all-board-columns,13) * 244px))}
.all-orders-board .all-orders-column{--production-accent:#83badd}
.all-orders-board .all-orders-preparation{--production-accent:#b0d6ff}
.all-orders-board .all-orders-queued,.all-orders-board .all-orders-not{--production-accent:#ffd18b}
.all-orders-board .all-orders-progress,.all-orders-board .all-orders-produced{--production-accent:#b2a8ff}
.all-orders-board .all-orders-ready,.all-orders-board .all-orders-lukasz,.all-orders-board .all-orders-external_install,.all-orders-board .all-orders-waiting{--production-accent:#78d6c4}
.all-orders-board .all-orders-external,.all-orders-board .all-orders-review,.all-orders-board .all-orders-invoice{--production-accent:#7abfff}
.all-orders-board .all-orders-other{--production-accent:#aab9c6}
.all-orders-board .production-board-job{min-width:0}
.all-orders-source-note{font-size:10px;margin:3px 4px 5px;color:var(--muted)}
@media(max-width:900px){.all-orders-overview{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){
 .all-orders-board-viewport{margin:0 -3px;scroll-snap-type:x mandatory;scroll-padding-inline:3px}
 .all-orders-board{grid-template-columns:repeat(var(--all-board-columns,13),minmax(250px,85vw));min-width:max-content;gap:10px}
 .all-orders-board .all-orders-column{scroll-snap-align:start;scroll-snap-stop:always}
 .all-orders-overview{gap:6px}
 .all-orders-stage{padding:8px 9px;min-height:61px}
 .all-orders-stage strong{font-size:21px}
 .all-orders-stage span{font-size:11px}
}


/* LIVE order covers: compact in lists, wide 16:9 in every Kanban column. */
.order-view-cover[hidden]{display:none!important}
.order-view-cover{position:absolute;left:19px;top:50%;transform:translateY(-50%);width:84px;height:66px;overflow:hidden;background:var(--panel2);border:1px solid var(--line);border-radius:8px}
.order-view-cover img{display:block;width:100%;height:100%;object-fit:contain;-webkit-user-drag:none;user-select:none}
.order-view-card.order:has(.order-view-cover:not([hidden])) .order-view-card-main{padding-left:96px;min-height:68px}
.production-board .order-view-cover{position:relative;left:auto;top:auto;transform:none;width:100%;height:auto;max-height:160px;aspect-ratio:auto;border-radius:6px;margin-bottom:3px}
.production-board .order-view-cover img{height:auto;max-height:158px;object-fit:contain}
.production-board .order-view-card.order:has(.order-view-cover:not([hidden])) .order-view-card-main{padding-left:0;min-height:0}
.order-work .work-photo-tile.is-cover .work-thumbnail{border-color:var(--blue);box-shadow:0 0 0 2px var(--blue)}
.order-work .work-photo-tile .work-cover-marker{display:block;font-size:11px;color:var(--blue);font-weight:800;margin:5px 0 0}
@media(max-width:620px){
 .order-view-cover{left:15px;width:75px;height:61px}
 .order-view-card.order:has(.order-view-cover:not([hidden])) .order-view-card-main{padding-left:83px;min-height:64px}
 .production-board .order-view-cover{left:auto;width:100%;height:auto}
 .production-board .order-view-card.order:has(.order-view-cover:not([hidden])) .order-view-card-main{padding-left:0;min-height:0}
}

/* LIVE 1.13.107: Stack production over installation at full width.
   Each card has room for lengthy production lists and split visits. */
@media (min-width:901px){
 .container:has(.order-detail){max-width:1560px}
 .order-detail .order-operations{grid-template-columns:minmax(0,1fr);align-items:start}
 .order-detail .installation-operation .plan-detail-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;margin-bottom:0;padding:14px 0}
 .order-detail .installation-operation .plan-visit-actions{justify-content:flex-end;align-items:center}
 .order-detail .installation-operation .plan-visit-actions>button{white-space:nowrap}
 .order-detail .installation-operation .plan-visit-copy{min-width:0}
 .order-detail .installation-operation .plan-estimate-form{display:grid;grid-template-columns:minmax(150px,1fr) auto auto;align-items:end;gap:12px}
 .order-detail .installation-operation .plan-estimate-form>label{flex:auto;min-width:0}
 .order-detail .installation-operation .plan-estimate-form>button{white-space:nowrap}
 .order-detail .installation-operation .plan-estimate-form>.plan-new-appointment{margin-left:0}
 .order-detail .installation-operation>.order-finish-installation{width:auto;min-width:220px;max-width:100%;align-self:flex-start}
}
@media (min-width:1100px){
 .order-detail .order-operations{grid-template-columns:minmax(0,1fr);gap:20px}
 .order-detail .order-operation-card{padding:24px;gap:16px}
}

.k2-visit-rows{display:grid;gap:8px;width:100%;min-width:0}



/* Production files: first work section, compact rows and one shared preview. */
.order-production-files{margin-top:2px;padding:0 0 14px;border-top:0;border-bottom:1px solid var(--line,rgba(140,170,190,.2));min-width:0}
.order-production-files h4{margin:0;font-size:16px}
.order-production-files .work-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 8px}
.order-production-files .work-section-heading>.details-actions{margin:0;flex:0 1 auto}
.order-production-files .work-documents{list-style:none;margin:0;padding:0;min-width:0}
.order-production-files .work-documents .work-file{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.order-production-files .work-documents .work-file:last-child{border-bottom:0}
.order-production-files .work-file>.work-file-info{flex:none;min-width:0;overflow-wrap:anywhere}
.order-production-files .work-file-info strong{display:block;font-size:14px;overflow-wrap:anywhere}
.order-production-files .work-file-info small{font-size:12px}
.order-production-files .work-file>.details-actions{grid-column:3;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:7px;margin:0;width:auto}
.order-production-files .work-file>.details-actions button{min-height:40px}
.order-production-files .work-file-share{white-space:nowrap}
.customer-files-dialog{width:min(880px,calc(100vw - 2rem));max-width:880px}
.customer-file-breadcrumbs{display:flex;gap:.4rem;flex-wrap:wrap;margin:.75rem 0}
.customer-file-breadcrumbs button{font-size:.85rem;max-width:100%;overflow-wrap:anywhere}
.customer-files-dialog input[type=search]{width:100%;box-sizing:border-box;margin-bottom:.75rem}
.customer-file-list{list-style:none;margin:0;padding:0;max-height:48vh;overflow:auto;border-block:1px solid var(--line,rgba(140,170,190,.2))}
.customer-file-row{border-bottom:1px solid var(--line,rgba(140,170,190,.2));min-width:0}
.customer-file-row:last-child{border-bottom:0}
.customer-files-dialog .customer-folder-button{display:flex;justify-content:flex-start;width:100%;text-align:left!important;border:0;background:transparent!important;padding:.8rem;white-space:normal;overflow-wrap:anywhere}
.customer-file-choice{display:flex!important;align-items:center;gap:.8rem;padding:.8rem;cursor:pointer;min-width:0}
.customer-file-choice input{width:1.15rem!important;min-width:1.15rem;margin:0}
.customer-file-choice span{display:grid;gap:.25rem;min-width:0;overflow-wrap:anywhere}
.customer-file-selection{max-height:18vh;overflow:auto}
.customer-file-chosen{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:.4rem 0;font-size:.85rem}
.customer-file-chosen>span{flex:1;overflow-wrap:anywhere;min-width:0}
.customer-file-chosen button{padding:.3rem .65rem;font-size:.8rem}
@media(max-width:700px){
 .customer-files-dialog{width:100%;max-width:100%;box-sizing:border-box}
 .customer-file-list{max-height:45dvh}
 .order-production-files .work-section-heading>.details-actions{width:auto}
 .order-production-files .work-documents .work-file{grid-template-columns:minmax(0,1fr) auto;gap:9px}
 .order-production-files .work-file>.work-file-info{grid-column:1/-1}
 .order-production-files .work-file-share{grid-column:1;white-space:normal;font-size:12px}
 .order-production-files .work-file>.details-actions{grid-column:2;grid-row:2;width:auto}
 .order-production-files .details-actions button{white-space:normal}
}

/* LIVE v1.14: inline job instructions, reversible covers and manual job creation. */
.order-detail .order-description-inline,.order-detail .order-description-packing{margin:12px 0 0;min-width:0}
.order-description-inline h3,.order-description-packing h3{margin:0 0 8px}
.order-description-inline textarea,.order-description-packing textarea{display:block;box-sizing:border-box;width:100%;max-width:100%;min-height:102px;resize:vertical;margin:10px 0 8px;font:inherit}
.order-description-inline .details-actions{margin:8px 0 0}
.order-description-packing .work-form{max-width:none}
.order-detail .order-header-cover{font-size:.82rem;flex:0 1 auto!important;white-space:nowrap;min-width:0;padding-inline:12px}
.order-detail .order-header-cover[disabled]{opacity:.65}
.live-stage-menu .order-header-pack-menu,.live-trello-menu .order-header-pack-menu{right:0;left:auto;width:min(280px,calc(100vw - 48px));max-height:65vh;overflow:auto}
.live-trello-intent{display:flex;align-items:center;gap:9px;font-size:.85rem;line-height:1.45;cursor:pointer}
.live-trello-intent input{width:19px;height:19px;flex:0 0 auto}
.live-stage-menu select{width:100%;min-width:0}
.live-create-trigger{margin:0 0 14px;min-height:42px}
.live-job-dialog{width:min(660px,calc(100vw - 24px));max-width:100%;box-sizing:border-box}
.live-job-form{display:grid;gap:13px;margin-top:12px}
.live-job-form>.work-field{display:grid;gap:6px}
.live-job-form textarea{box-sizing:border-box;width:100%;max-width:100%;min-height:95px}
.live-job-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.live-job-fields .work-field{min-width:0;display:grid;gap:5px}
.live-job-fields input,.live-job-fields select,.live-job-form input{width:100%;box-sizing:border-box;min-width:0}
.live-job-dialog .details-actions{display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:650px){.live-job-fields{grid-template-columns:1fr}.order-detail .order-header-cover{font-size:.78rem;padding-inline:10px}.live-job-dialog{padding:15px}.order-detail .live-stage-menu,.order-detail .live-trello-menu{flex:1 1 auto}}


/* Desktop Kanban: fixed column headings, independently scrolling card lists. */
@media(min-width:901px){
 main.container:has(#app-view:not(.hidden)){max-width:none;width:100%;padding-inline:28px}
 .site-header{padding-inline:28px}
 .production-board-viewport>.production-board{height:var(--desktop-board-height,calc(100dvh - 320px));align-items:stretch}
 .production-board-viewport>.production-board>.production-board-column{height:100%;min-height:0;overflow:hidden}
 .production-board-heading{flex:0 0 auto;position:sticky;top:0;z-index:1;background:var(--panel2)}
 .production-board-viewport .production-board-jobs{flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;grid-auto-rows:max-content;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding-right:4px}
 .production-board-viewport .production-board-job{align-self:start}
}
/* Shared desktop density. Mobile retains its existing spacing and control sizes. */
.order-list-tools{display:contents}
@media(min-width:901px){
 main.container:has(#app-view:not(.hidden)){padding-top:12px}
 #app-view>.toolbar{margin:8px 0;min-height:28px}
 #app-view>.toolbar h2{font-size:19px}
 #app-view #content.workflow-page :is(button.primary,button.secondary),#app-view #content :is(.order-detail,.order-list-tools) :is(button.primary,button.secondary){min-height:36px;padding:6px 12px;font-size:14px}
 #app-view #content :is(.panel,.order-work){padding:14px;margin-bottom:10px}
 #app-view #content .panel :is(h2,h3){margin-top:0;margin-bottom:8px}
 #app-view #content :is(.info-grid,.source-grid,.summary-stats,.quick-cards,.mk-kpis,.mk-insights){gap:10px}
 #app-view #content :is(.quick-section,.dashboard-group){margin-top:16px}
 #app-view #content .quick-section h2{margin:0 0 8px;font-size:18px}
 #app-view #content .quick-card{min-height:56px;padding:10px 12px}
 #app-view #content .summary-stat{padding:12px}
 #app-view #content .details-actions{gap:6px}
 #app-view #content .order-detail{gap:10px}
 #app-view #content .order-contact-strip{padding:12px 14px;gap:12px}
 #app-view #content .order-operation-card{gap:8px}
 #app-view #content .order-section-heading{margin-bottom:8px}
 #app-view #content .order-hero{padding:16px;margin-bottom:0}
 #app-view #content .list-controls{gap:8px;margin:0;align-items:end}
 #app-view #content>.list-controls{margin-bottom:8px}
 #app-view #content .list-controls label{flex:0 1 190px;gap:3px;font-size:11px}
 #app-view #content .list-controls .list-search{flex:1 1 240px}
 #app-view #content .list-controls :is(input,select){min-height:36px;padding:6px 10px;font-size:14px}
 #app-view #content .list-result{margin:0 0 6px;min-height:20px;gap:8px;font-size:12px}
 #app-view #content .list-result p{margin:0}
 .order-list-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px 12px;margin-bottom:6px}
 .order-list-tools>.all-orders-overview{grid-column:1;grid-row:1;display:flex;flex-wrap:wrap;gap:6px;margin:0}
 .order-list-tools>.live-create-trigger{grid-column:2;grid-row:1;margin:0;align-self:center}
 .order-list-tools>.production-view-switch{grid-column:2;grid-row:2;gap:4px;margin:0;align-self:end}
 #app-view #content .order-list-tools .all-orders-stage{flex:0 1 auto;flex-direction:row;align-items:center;justify-content:flex-start;gap:7px;min-height:36px;padding:6px 10px;border-radius:8px}
 .order-list-tools .all-orders-stage strong{font-size:18px}
 .order-list-tools .all-orders-stage span{font-size:12px;white-space:nowrap}
 .order-list-tools>.list-controls{grid-column:1;grid-row:2}
 .order-list-tools>.list-result{grid-column:1/-1;grid-row:3}
 .order-list-tools:not(:has(.all-orders-overview))>.production-view-switch{grid-row:1}
 .order-list-tools:not(:has(.all-orders-overview))>.list-controls{grid-row:1}
 .order-list-tools:not(:has(.all-orders-overview))>.list-result{grid-row:2}
 #app-view #content .production-view-switch button{min-width:70px}
 #app-view #content .finance-period{margin-top:10px;gap:10px}
 #app-view #content .finance-period label{flex:0 1 210px;gap:4px}
 #app-view #content .finance-period input{min-height:36px;padding:6px 10px;font-size:14px}
 #app-view #content .finance-heading h2{margin:12px 0 4px;font-size:20px}
 #app-view #content .plan-toolbar{gap:8px;margin-bottom:6px}
 #app-view #content .plan-toolbar .plan-period{flex:1 1 280px;order:0;margin:0;font-size:18px}
 #app-view #content .plan-calendar-filter{min-height:36px;padding:6px 10px}
 #app-view #content .connection-card{padding:12px;gap:4px}
 #app-view #content .connection-card h3{margin-bottom:4px}
 #app-view #content .connection-card p{margin:2px 0;font-size:13px}
 #app-view #content .team-directory-toolbar{margin-bottom:8px}
 #app-view #content .mk-cadence{margin-bottom:12px}
 #app-view #content .mk-channel-heading{margin-bottom:10px}
}
/* Desktop app shell: chrome stays in view, only the workspace content scrolls. */
@media screen and (min-width:901px){
 body:has(#app-view:not(.hidden)){height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}
 body:has(#app-view:not(.hidden))>.site-header{flex:0 0 auto;position:relative}
 main.container:has(#app-view:not(.hidden)){flex:1 1 0;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding-bottom:0}
 #app-view:not(.hidden){display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden}
 #app-view>*{flex-shrink:0}
 #app-view>#content{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
 #app-view>#content:has(>.order-list-tools),#app-view>#content:has(>.production-board-viewport){display:flex;flex-direction:column;overflow:hidden}
 #content>.order-list-tools,#content>.list-controls{flex:0 0 auto}
 #content>.order-list-tools{max-height:50%;overflow:auto}
 #content>.orders,#content>.production-board-viewport{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain}
 #content>.orders{align-content:start}
 #content>.production-board-viewport{padding-bottom:0}
 main.container:has(#app-view:not(.hidden))>.bottom-nav{position:relative;inset:auto;flex:0 0 auto;width:calc(100% + 56px);margin:6px -28px 0}
 main.container:has(#app-view:not(.hidden))>.site-footer{flex:0 0 auto;margin:3px 0;font-size:10px;line-height:14px}
 #app-view>:is(#phone-settings,#sms-mfa-settings){max-height:50%;overflow:auto}
 #content>:is(.plan-toolbar,.comments-toolbar),#content .mk-heading{position:sticky;top:0;z-index:2;background:var(--bg);padding-block:6px}
 #content>.panel:has(>.finance-period){position:sticky;top:0;z-index:2;max-height:50%;overflow:auto}
}

/* Shared configurable home and list workspace. */
.workflow-page{display:flex!important;flex-direction:column;min-height:0;overflow:hidden!important}
.workflow-tools{flex:0 0 auto;max-height:48%;overflow:auto;padding:0 0 8px}
.workflow-shortcuts,.workflow-modes{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.workflow-shortcuts:empty{display:none}
.workflow-modes{justify-content:flex-end}
.workflow-page>.workflow-results,.workflow-page>.production-board-viewport{flex:1 1 0;min-height:0;overflow:auto}
.workflow-results.orders{align-content:start}
.workspace-settings-form{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;gap:12px}
.workspace-column-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;border:1px solid var(--line);border-radius:8px;padding:12px;min-width:0}
.workspace-column-picker[hidden]{display:none}
.workspace-column-choice{display:flex;align-items:center;gap:9px;min-height:36px;font-size:13px}
.workspace-column-choice input{width:18px;min-height:18px;height:18px;flex:0 0 18px}
@media(max-width:900px){.workflow-page{display:block!important;overflow:visible!important}.workflow-tools{max-height:none;overflow:visible}.workflow-shortcuts button{font-size:12px;min-height:40px;padding:7px 10px}}

/* A compact support status belongs above the header navigation, outside content scrolling. */
.site-header:has(>#preview-banner:not(.hidden)){flex-wrap:wrap;height:auto}
.site-header>#preview-banner{position:static;order:-10;flex:0 0 100%;width:100%;min-width:0;min-height:28px;margin:0;padding:3px 8px;border-radius:5px;font-size:11px;line-height:1.35;gap:6px;flex-wrap:nowrap}
#preview-label{min-width:0;overflow-wrap:anywhere}
#preview-banner>#leave-preview{flex:0 0 auto;width:auto;max-width:none;min-height:24px;padding:2px 8px;font-size:11px;line-height:1.35}
/* List cards must not shrink into one another when the viewport is constrained. */
.orders:has(>.order-view-card){display:flex;flex-direction:column;gap:0;align-items:stretch}
.orders>.order-view-card.order{flex:0 0 144px;height:144px;min-height:144px;max-height:144px;overflow:hidden;align-items:center;padding:12px 14px}
.orders>.order-view-card.order .order-view-card-main{height:116px;max-height:116px;min-width:0;gap:4px;overflow:hidden;justify-content:flex-start}
.orders>.order-view-card.order .order-view-card-main>*{flex:0 0 auto;min-width:0}
.orders>.order-view-card.order .order-view-card-heading{flex-wrap:nowrap;height:22px;min-height:22px;overflow:hidden;align-items:baseline}
.orders>.order-view-card.order .order-view-customer{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;min-width:0}
.orders>.order-view-card.order .order-view-title{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:20px;line-height:20px}
.orders>.order-view-card.order .order-view-meta{flex-wrap:nowrap;height:18px;line-height:18px;overflow:hidden}
.orders>.order-view-card.order .order-view-meta-item{min-width:0;overflow:hidden;white-space:nowrap}
.orders>.order-view-card.order .order-view-meta-item>span:last-child{overflow:hidden;text-overflow:ellipsis}
.orders>.order-view-card.order :is(.order-view-labels,.order-view-warnings){flex-wrap:nowrap;height:20px;overflow:hidden}
.orders>.order-view-card.order :is(.order-view-label,.order-view-warning){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-block:2px}
.orders>.order-view-card.order .order-view-card-aside{max-height:116px;overflow:hidden;gap:5px}
@media(max-width:700px){
 .orders>.order-view-card.order{flex-basis:196px;height:196px;min-height:196px;max-height:196px;grid-template-rows:116px 44px;gap:8px;padding:12px 14px}
 .orders>.order-view-card.order .order-view-card-aside{height:44px;max-height:44px;flex-wrap:nowrap;gap:8px;padding-top:5px}
 .orders>.order-view-card.order .order-view-status{max-width:45%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
}

/* Keep workspace heading, filters and actions together; focus stays inside clipped chrome. */
.list-controls .list-multi{display:flex;flex-direction:column;flex:1 1 170px;min-width:0;max-width:280px;gap:5px;font-size:12px;color:var(--muted)}
.list-controls .list-multi-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0;min-height:40px;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:var(--input);color:var(--ink);font-size:14px;font-weight:400;text-align:left}
.list-multi-trigger>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-multi-trigger::after{content:'⌄';flex:none}
.list-multi-menu{position:fixed;inset:auto;margin:0;padding:6px;z-index:70;max-width:calc(100vw - 16px);max-height:min(440px,calc(100dvh - 16px));overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--ink);box-shadow:0 12px 28px #0005;font-size:14px}
.list-multi-actions{display:flex;justify-content:space-between;gap:8px;position:sticky;top:-6px;z-index:1;padding-bottom:6px;background:var(--panel2)}
.list-multi-actions button{min-height:34px;padding:6px 10px;font-size:12px}
#app-view #content .list-controls .list-multi-option{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex:none;width:100%;max-width:none;min-width:0;min-height:36px;gap:10px;padding:8px;border-radius:5px;font-size:14px;font-weight:400;line-height:1.3;text-align:left;color:var(--ink);cursor:pointer}
.list-multi-option:hover,.list-multi-option:focus-within{background:var(--input)}
#app-view #content .list-controls .list-multi-option input[type=checkbox]{flex:0 0 18px;width:18px;height:18px;min-height:18px;margin:0;padding:0;accent-color:var(--blue)}
@media(min-width:901px){.list-controls .list-multi-label{font-size:11px}}
@media(max-width:700px){.list-controls .list-multi-trigger,.list-multi-actions button,#app-view #content .list-controls .list-multi-option{min-height:44px}.list-controls .list-multi{max-width:none}}
#app-view:has(>.workflow-page)>.toolbar{display:none}
.workflow-title{margin:0;font-size:19px;line-height:1.3}
.workflow-tools>.workflow-title{margin-bottom:8px}
.workflow-tools .list-controls :is(input,select):focus-visible{outline-width:2px;outline-offset:-2px}
@media(min-width:901px){
 .workflow-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:4px 2px 6px}
 .workflow-tools>.workflow-title{grid-column:1;grid-row:1;align-self:center;margin:0}
 .workflow-tools>.workflow-modes{grid-column:2;grid-row:1;margin:0;align-self:center}
 #app-view #content .workflow-tools>.list-controls{grid-column:1/-1;grid-row:2;margin:0}
 #app-view #content .workflow-tools>.list-result{grid-column:1/-1;grid-row:3;margin:0;min-height:16px}
}
@media(min-width:1400px){
 .workflow-tools{grid-template-columns:auto minmax(0,1fr) auto;column-gap:16px}
 .workflow-tools>.workflow-title{align-self:end;padding-bottom:9px}
 #app-view #content .workflow-tools>.list-controls{grid-column:2;grid-row:1}
 .workflow-tools>.workflow-modes{grid-column:3;grid-row:1;align-self:end}
 #app-view #content .workflow-tools>.list-result{grid-column:2/-1;grid-row:2}
}


/* Shared order detail overview: identity, facts and actions in one surface. */
.order-detail>.order-overview{padding:20px 24px 0;border-radius:16px;border-top-width:3px;background:var(--panel);box-shadow:0 3px 16px #03182708;overflow:visible}
.order-overview .order-view-hero-top{gap:12px;align-items:center}
.order-overview .order-view-eyebrow{font-size:14px;letter-spacing:.035em;font-weight:800}
.order-overview .order-header-link{font-size:12px;padding:4px 0}
.order-overview .order-view-status{font-size:12px;padding:5px 10px;border-radius:20px}
.order-overview .order-view-hero-main{margin:14px 0 18px;align-items:center;gap:24px}
.order-overview .order-view-hero-copy h1{font-size:clamp(20px,1.55vw,28px);line-height:1.3;letter-spacing:-.02em;margin:0}
.order-overview .order-view-hero-customer{font-size:14px;margin-top:5px}
.order-overview .order-view-hero-contact{padding-left:24px;border-left:1px solid var(--line);max-width:260px}
.order-overview .order-view-hero-contact>span{font-size:11px;margin-bottom:4px}
.order-overview .order-view-hero-contact>strong{font-size:14px}
.order-overview>.order-view-labels{margin:0 0 14px}
.order-detail .order-overview>.order-contact-strip{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;padding:16px 0;margin:0;gap:20px 32px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(300px,1.15fr)}
.order-overview .order-contact-fact>span{font-size:11px;margin-bottom:5px}
.order-overview .order-contact-fact>strong{font-size:14px;font-weight:650}
.order-overview .order-contact-links{flex-direction:row;flex-wrap:wrap;gap:5px 16px;margin-top:6px}
.order-overview .order-contact-links a{font-size:13px;line-height:1.5}
.order-overview .order-planning-panel{gap:4px;padding-left:28px}
.order-overview .order-planning-summary{min-height:30px}
.order-overview .order-planning-value{gap:12px;min-height:30px}
.order-overview .order-planning-value>span{font-size:11px}
.order-overview .order-planning-value>strong{font-size:14px}
.order-detail .order-overview .order-field-missing{font-size:13px;letter-spacing:0}
.order-detail .order-overview>.order-header-actions{margin:0 -24px;padding:12px 24px;gap:7px;border-top:1px solid var(--line);background:var(--panel2);border-radius:0 0 13px 13px;align-items:center}
.order-detail .order-overview .order-header-actions>button,.order-overview .order-header-pack>summary{min-height:36px;padding:7px 12px;font-size:12px;border-radius:8px;font-weight:700}
.order-overview>.order-data-notice{margin:0 0 14px;font-size:12px;padding:8px 10px}
@media(max-width:1100px){
 .order-detail .order-overview>.order-contact-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px}
 .order-overview .order-planning-panel{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);padding:12px 0 0;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
 .order-overview .order-planning-value{align-items:flex-start;flex-direction:column;gap:3px}
 .order-detail .order-overview .order-planning-summary{align-items:baseline}
 .order-overview .order-planning-value>strong{text-align:left}
}
@media(max-width:700px){
 .order-detail>.order-overview{padding:15px 15px 0;border-radius:12px}
 .order-overview .order-view-eyebrow{font-size:13px}
 .order-overview .order-view-status{font-size:11px}
 .order-overview .order-view-hero-main{margin:12px 0 14px;gap:10px}
 .order-overview .order-view-hero-copy h1{font-size:20px}
 .order-overview .order-view-hero-contact{padding:0;border:0;max-width:none}
 .order-overview .order-view-hero-contact>span{margin:0}
 .order-detail .order-overview>.order-contact-strip{grid-template-columns:1fr;gap:14px;padding:14px 0}
 .order-overview .order-planning-panel{grid-column:auto;grid-template-columns:1fr;gap:4px}
 .order-overview .order-planning-value{flex-direction:row;align-items:baseline;gap:12px}
 .order-detail .order-overview .order-planning-summary{align-items:center;min-height:36px}
 .order-overview .order-contact-links a{min-height:28px}
 .order-detail .order-overview>.order-header-actions{margin:0 -15px;padding:10px 15px;border-radius:0 0 10px 10px;gap:6px}
 .order-detail .order-overview .order-header-actions>button,.order-overview .order-header-pack>summary{min-height:40px;padding:8px 10px}
}

/* Job brief belongs to the shared overview; packing text opens from its menu. */
.order-detail .order-overview>.order-description-inline{position:relative;margin:0;padding:16px 0;border-top:1px solid var(--line);background:none;border-radius:0;box-shadow:none}
.order-overview .order-description-inline h3{font-size:13px;margin:0 70px 8px 0;font-weight:750}
.order-overview .order-description-edit{position:absolute;right:0;top:10px;min-height:32px;padding:5px 10px;font-size:12px}
.order-overview .order-description-preview{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6}
.order-description-editor[hidden],.order-description-preview[hidden],.order-description-edit[hidden]{display:none!important}
.order-packing-dialog{width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;scrollbar-gutter:stable}
.order-packing-editor textarea{box-sizing:border-box;width:100%;max-width:100%;min-height:180px;resize:vertical;margin:8px 0;font:inherit}
.order-packing-editor .details-actions{display:flex;flex-wrap:wrap;gap:8px}
.order-packing-editor .packing-text-preview{white-space:pre-wrap;overflow-wrap:anywhere}

/* Wide order details use both work columns; narrower screens retain one. */
@media(min-width:1280px){
 .order-detail .order-operations{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
}

/* Hybrid operations are independent, manual and reversible. No queue changes. */
.order-detail .order-operation-heading{width:100%;min-width:0;flex-wrap:wrap}
.order-detail .operation-relevance-slot{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-left:auto;min-width:0}
.order-detail .operation-relevance-status{display:inline-flex;align-items:center;border:1px solid var(--line);background:var(--panel2);padding:5px 9px;border-radius:999px;font-size:11px;font-weight:700;line-height:1.2;white-space:nowrap}
.order-detail .operation-relevance-status.inactive{background:var(--panel2);color:var(--muted);border-style:dashed}
.order-detail .operation-applicability-toggle,.order-detail .operation-reveal{font-size:12px;min-height:36px;padding:6px 10px;margin:0}
.order-detail .order-operation-card.operation-not-applicable{border-top-color:var(--muted);background:var(--panel);gap:6px}
.order-detail .order-operation-card.operation-not-applicable .order-operation-heading>.icon{color:var(--muted)}
.order-detail .operation-skip-note{font-size:12px;color:var(--muted);line-height:1.45;margin:0}
.order-detail .order-external-followup,.order-detail .order-delivery-followup{width:100%;min-width:0;display:grid;gap:10px}
.order-detail .followup-external-slot{display:grid;gap:10px;min-width:0}
.order-detail .followup-external-slot>.followup-section,.order-detail .order-delivery-followup .followup-section{
 background:var(--panel2);padding:12px;border-radius:10px;min-width:0;box-shadow:none;margin:0
}
.order-detail .order-delivery-followup .work-form{width:100%;box-sizing:border-box;min-width:0}
.order-detail .order-delivery-followup .work-form>label{min-width:0}
.order-detail .order-delivery-followup :is(input,select,textarea){max-width:100%;min-width:0;box-sizing:border-box}
.order-detail .order-delivery-manual-status{margin:8px 0;font-size:13px;font-weight:700}
.order-detail .external-operation{border-top-color:#b4a0de}
.order-detail .delivery-operation{border-top-color:#7fd2ab}
.order-detail .external-operation .order-operation-heading>.icon{color:#b4a0de}
.order-detail .delivery-operation .order-operation-heading>.icon{color:#7fd2ab}
.order-delivery-card{display:grid;gap:14px;min-width:0}
.order-delivery-status{display:grid;gap:4px;line-height:1.4}
.order-delivery-status>strong{font-size:1.08rem}
.order-delivery-actions{margin:0;flex-wrap:wrap}
.order-delivery-modes{display:flex;gap:7px;flex-wrap:wrap}
.order-delivery-modes>button{min-width:0;flex:1 1 80px}
html[data-theme] .order-delivery-actions>.order-pickup-sent,html[data-theme] .order-delivery-actions>.order-delivery-done:disabled{opacity:1;border:1px solid #7fd2ab;color:#7fd2ab;cursor:default}
.order-operation-card-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}
.order-operation-card-tag{font-size:11px;font-weight:650;border:1px dashed var(--line);border-radius:6px;padding:3px 7px;background:var(--panel2);color:var(--muted)}
@media(max-width:700px){
 .order-detail .operation-relevance-slot{flex:1 1 100%;justify-content:flex-end}
 .order-detail .operation-applicability-toggle,.order-detail .operation-reveal{min-height:44px}
 .order-detail .order-delivery-followup .work-form{grid-template-columns:minmax(0,1fr)}
}

/* Prominent Ask Alex action in the order identity header. */
.order-detail .order-view-hero-top>.order-header-alex{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:180px;padding:10px 20px;border:1px solid #d854eb;border-radius:11px;background:linear-gradient(110deg,#c000b9 0%,#6a08ef 100%);color:#fff;font-weight:850;letter-spacing:.025em;cursor:pointer;box-shadow:0 2px 10px #8b18d322}
.order-detail .order-view-hero-top>.order-header-alex:hover{filter:brightness(1.12)}
.order-detail .order-view-hero-top>.order-header-alex:focus-visible{outline:3px solid #e9baff;outline-offset:3px}
@media(max-width:620px){.order-detail .order-view-hero-top>.order-header-alex{margin-left:0;min-width:0;flex:1 1 160px}}

/* Shared order files: cover first, four fixed category targets, one overview. */
.order-work{min-width:0}
.work-category-dropzone.work-drag-active{outline:2px solid #63c9d3;outline-offset:2px;background:color-mix(in srgb,#63c9d3 15%,var(--panel2))}
.work-file-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.order-work .work-file-heading h3{margin:0;font-size:1rem}
.order-work .work-file-heading .work-media-actions{margin:0;gap:6px}
.order-work .work-file-heading button{min-height:34px;padding:7px 10px;font-size:.8rem}
.work-file-heading .work-file-mobile-title,.work-file-heading>.work-file-add-action:empty,.work-file-heading>.work-media-actions:empty{display:none}
.work-file-heading>.work-file-add-action{margin-inline-start:auto}
.order-work .work-editor:empty{display:none}
.work-category-dropzones{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:0px}
.work-category-dropzones>.work-category-dropzone{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:3px;min-width:0;min-height:64px;margin:0;padding:10px 12px;text-align:left;border:1px dashed var(--line);border-radius:12px;background:var(--panel2);color:var(--text);cursor:pointer;white-space:normal}
.work-category-dropzone strong{font-size:.87rem;overflow-wrap:anywhere}
.work-category-dropzone span,.work-category-dropzone small{color:var(--muted);font-size:.82rem;line-height:1.45}
.work-category-dropzone:hover{border-color:#63c9d3}
.work-file-overview{margin-top:10px;border-top:1px solid var(--line);padding-top:8px}
.work-file-overview>summary{cursor:pointer;font-weight:700;padding:5px 0}
.work-category-filters{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.work-category-filters button{font-size:.82rem;white-space:normal}
.work-category-filters [aria-pressed=true]{border-color:#63c9d3;background:color-mix(in srgb,#63c9d3 14%,var(--panel2))}
.work-category-group{margin:18px 0;min-width:0}
.work-category-select{width:100%;max-width:180px;min-width:0;font-size:.8rem;padding:6px 8px;border:1px solid var(--line);border-radius:7px;background:var(--panel2);color:var(--text)}
.work-file .work-category-select{flex:0 1 160px}
.work-archive-choices{display:grid;gap:12px;margin:16px 0 22px}
.work-archive-choice{display:flex;align-items:center;gap:10px;cursor:pointer}
.work-archive-choice input{width:18px;height:18px;flex:0 0 18px}
@media(max-width:1000px){.work-category-dropzones{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.work-category-dropzones{gap:8px}.work-category-dropzones>.work-category-dropzone{padding:9px 10px;min-height:60px}.work-category-dropzone strong{font-size:.87rem}.work-category-filters button{flex:1 1 110px}}
/* Invoice links are supporting information, separate from confirmed order closure. */
.order-billing-stamp{font-size:12px;font-weight:400;line-height:1.4;color:var(--muted);gap:4px 8px}
.order-billing-stamp>span+span::before{content:'·';margin-right:8px}
.order-billing-stamp.is-compact{display:block;font-size:11px;line-height:1.3}
/* One compact row for photos and documents; the preview fits inside the existing text height. */
.order-work .work-file-info{display:flex;align-items:center;gap:10px}
.order-work .work-file-copy{display:block;flex:1;min-width:0;text-align:left}
.order-work .work-file-open{display:flex;align-items:center;gap:10px;width:100%;min-width:0;min-height:0;padding:0;border:0;border-radius:4px;background:transparent;color:inherit;font:inherit;text-align:left}
.order-work .work-file-open:hover .work-file-copy>strong{text-decoration:underline}
.order-work.work-compact-files .work-documents .work-file{display:block}
.work-document-dialog{width:min(1000px,calc(100% - 24px))}
.work-document-preview{display:block;width:100%;height:auto;border:0;border-radius:8px;background:#fff}
.work-document-preview[hidden],.work-document-pages[hidden]{display:none}
.work-document-pages{align-items:center;justify-content:space-between;margin:0 0 12px}
.order-work .work-file-open:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.order-work .work-file-preview{position:relative;display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;overflow:hidden;border:1px solid var(--line);border-radius:5px;background:var(--panel2);color:var(--muted)}
.order-work .work-file-type{font-size:8px;font-weight:700;line-height:1;letter-spacing:0;white-space:nowrap}
.order-work .work-file-preview img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;background:var(--panel2)}
.order-work .work-file-preview.is-loading img,.order-work .work-file-preview.preview-unavailable img{display:none}
.order-work .work-file.is-cover .work-file-preview{border-color:var(--blue)}
.order-work .work-file-info .work-cover-marker{display:inline;font-size:inherit;color:var(--blue);margin:0 0 0 8px}
/* Keep all file rows compact alongside the category, sharing and file actions. */
.order-work .work-category-group{margin:12px 0}
.order-work .work-category-group h4{margin:10px 0 4px;font-size:.9rem}
.order-work .work-photo-grid:empty,.order-work .work-documents:empty{display:none}
.order-work .work-documents .work-file{grid-template-columns:minmax(160px,1fr) 150px auto auto;gap:8px 12px;padding:9px 0}
.order-work .work-documents .work-file .work-category-select{min-height:34px;height:34px;padding:5px 8px}
.order-work .work-documents .work-file .details-actions{grid-column:4;grid-row:auto;flex-direction:row;max-width:none;gap:6px}
.order-work .work-documents .work-file>:is(.work-category-select,.work-file-category){grid-column:2}
.order-work .work-file-category{min-width:0}
.order-work .work-file-category>.work-category-select{width:100%}
.order-work :is(.work-file-more,.work-file-category-label),.order-work .work-file-copy .work-file-shared{display:none}
.order-work .work-documents .work-file>.work-file-share{grid-column:3}
.order-work .work-documents .work-file .details-actions button{min-height:34px;padding:6px 9px}
.order-work .work-documents .work-file-share{white-space:nowrap;min-height:32px}
@media(max-width:760px){
 .order-work .work-documents .work-file{grid-template-columns:minmax(0,1fr) auto;gap:6px 8px}
 .order-work .work-documents .work-file>.work-file-info{grid-column:1/-1}
 .order-work .work-documents .work-file>:is(.work-category-select,.work-file-category){grid-column:1;grid-row:2;max-width:100%}
 .order-work .work-documents .work-file>.details-actions{grid-column:2;grid-row:2}
 .order-work .work-documents .work-file>.work-file-share{grid-column:1/-1;grid-row:3;white-space:normal}
}
@media(max-width:700px){
 #app-view #content .order-work .work-documents .work-file.work-file--mobile-row{grid-template-columns:minmax(0,1fr) auto;gap:6px 8px;padding-block:5px;scroll-margin-block-end:calc(92px + env(safe-area-inset-bottom))}
 .order-work .work-documents .work-file--mobile-row>.work-file-info{grid-column:1;grid-row:1}
 .order-work .work-file--mobile-row>.work-file-more{display:inline-flex;align-items:center;justify-content:center;grid-column:2;grid-row:1;min-width:44px;min-height:44px;padding:0;font-size:1.25rem;line-height:1}
 .order-work .work-file-copy .work-file-shared{display:flex;width:fit-content;max-width:100%;margin-top:3px;padding:2px 7px;font-size:11px}
 #app-view #content .order-work .work-documents .work-file--mobile-row>.work-file-menu-option{grid-column:1/-1;grid-row:auto;min-width:0}
 .order-work .work-file--mobile-row>.work-file-more[aria-expanded="false"]~.work-file-menu-option{display:none}
 .order-work .work-file--mobile-row>.work-file-category{display:grid;gap:4px}
 .order-work .work-file--mobile-row .work-file-category-label{display:block;color:var(--ui-muted);font-size:.8rem}
 .order-work .work-documents .work-file--mobile-row .work-category-select{min-height:44px;height:auto;font-size:16px}
 .order-work .work-file--mobile-row>.details-actions{justify-content:flex-start;margin:0}
}

/* Delivery: reset in the heading; pickup/send or delivered action alongside mode choices. */
.order-operation-heading>.order-delivery-reset{margin-left:auto;min-height:34px;padding:5px 12px;font-size:.82rem;flex:0 0 auto}
.order-delivery-modes>.order-delivery-actions{flex:1 1 140px;margin:0;min-width:0}
.order-delivery-modes>.order-delivery-actions>button{width:100%;min-width:0;min-height:44px}

/* A shared size and type scale for every order-header action and submenu. */
.order-header-actions>.order-header-pack>.order-header-pack-menu{top:auto;bottom:calc(100% + 6px);max-height:65vh;overflow-y:auto;overscroll-behavior:contain}
#app-view #content .order-detail .order-overview>.order-header-actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:6px;--order-action-width:auto}
#app-view #content .order-detail .order-overview>.order-header-actions>button,
#app-view #content .order-detail .order-overview>.order-header-actions>details{flex:0 0 var(--order-action-width);width:var(--order-action-width);min-width:0;margin:0}
#app-view #content .order-detail .order-overview>.order-header-actions>details{padding:0}
#app-view #content .order-detail .order-overview>.order-header-actions>.order-header-cover{flex:0 0 var(--order-action-width)!important;padding:0}
#app-view #content .order-detail .order-overview>.order-header-actions>button,
#app-view #content .order-detail .order-overview>.order-header-actions>details>summary,
#app-view #content .order-detail .order-overview .order-header-pack-menu>button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:40px;min-height:40px;margin:0;padding:8px 10px;font-family:inherit;font-size:13px;font-weight:700;line-height:18px;letter-spacing:normal;border-radius:8px;white-space:nowrap}
#app-view #content .order-detail .order-overview>.order-header-actions>details>summary{width:100%}
#app-view #content .order-detail .order-overview .order-header-pack-menu>button{width:100%;justify-content:flex-start;padding-inline:12px;text-align:left}
#app-view #content .order-detail .order-overview>.order-header-actions>.order-mobile-actions-trigger{display:none}
@media(max-width:700px){
 #app-view #content .order-detail .order-overview>.order-header-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 #app-view #content .order-detail .order-overview>.order-header-actions>button,
 #app-view #content .order-detail .order-overview>.order-header-actions>details{width:100%;min-width:0}
 #app-view #content .order-detail .order-overview>.order-header-actions>button,
 #app-view #content .order-detail .order-overview>.order-header-actions>details>summary,
 #app-view #content .order-detail .order-overview .order-header-pack-menu>button{height:44px;min-height:44px;padding:8px 6px}
 #app-view #content .order-detail .order-overview .order-header-pack-menu>button{padding-inline:12px}
 #app-view #content .order-detail .order-overview>.order-header-actions--mobile-menu{
  grid-template-columns:repeat(2,minmax(0,1fr));width:auto;margin-inline:0;padding-inline:0;background:transparent;
 }
 #app-view #content .order-detail .order-overview>.order-header-actions--mobile-menu>:not(.order-messages-trigger,.order-mobile-actions-trigger){display:none}
 #app-view #content .order-detail .order-overview>.order-header-actions>.order-mobile-actions-trigger{display:flex;gap:7px}
 #app-view #content .order-detail .order-overview .order-header-actions--mobile-menu>.order-messages-trigger{gap:4px}
 .mobile-action-dialog .order-mobile-action-options>button{justify-content:flex-start;padding-inline:12px}
}
@media(max-width:380px){#app-view #content .order-detail .order-overview>.order-header-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}

.alex-document-results{display:grid;gap:10px;margin:12px 0}.alex-document-result{display:grid;gap:3px;overflow-wrap:anywhere}.alex-document-result small{display:block}

/* Covers lead the card, as in Trello. Keep artwork and lettering inside the
   image visible instead of cropping a logo or a tall customer sketch. */
.order-view-card.order>.order-view-cover{grid-column:1/-1}
.orders>.order-view-card.order:has(.order-view-cover:not([hidden])) .order-view-card-main{padding-left:0;min-height:0}
.orders>.order-view-card.order>.order-view-cover{position:relative;left:auto;top:auto;transform:none;width:100%;height:160px;aspect-ratio:auto;margin:0 0 4px;border:0;border-bottom:1px solid var(--line);border-radius:8px 8px 0 0}
.orders>.order-view-card.order>.order-view-cover img{object-fit:contain}
.order-detail-cover[hidden]{display:none!important}
.order-view-hero>.order-detail-cover{position:relative;display:block;width:calc(100% + 44px);height:clamp(150px,22vw,240px);margin:-18px -22px 16px;padding:0;overflow:hidden;border:0;border-bottom:1px solid var(--line);border-radius:11px 11px 0 0;background:var(--panel2);color:var(--ink);cursor:pointer}
.order-detail-cover img{display:block;width:100%;height:100%;object-fit:contain;-webkit-user-drag:none}
.order-detail-cover img:not([src]){visibility:hidden}
.order-detail-cover-hint{position:absolute;right:10px;bottom:10px;max-width:calc(100% - 20px);padding:7px 10px;border:1px solid #ffffff50;border-radius:7px;background:#071a2bd9;color:white;font-size:12px;line-height:1.4;white-space:normal}
.order-detail-cover:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
@media(max-width:700px){
 .order-view-hero>.order-detail-cover{width:calc(100% + 32px);height:clamp(140px,48vw,210px);margin:-15px -16px 14px}
 .orders>.order-view-card.order:has(.order-view-cover:not([hidden])) .order-view-card-main{padding-left:0;min-height:0}
 .orders>.order-view-card.order .order-view-cover{position:relative;left:auto;top:auto;transform:none;width:calc(100% + 24px);height:clamp(110px,42vw,180px);aspect-ratio:auto;margin:-12px -12px 8px;border:0;border-bottom:1px solid var(--line);border-radius:9px 9px 0 0}
 .orders>.order-view-card.order .order-view-cover img{object-fit:contain}
 .production-board .order-view-card.order .order-view-cover{width:calc(100% + 18px);height:auto;aspect-ratio:auto;margin:-8px -9px 6px;border:0;border-bottom:1px solid var(--line);border-radius:6px 6px 0 0}
 .production-board .order-view-cover img{object-fit:contain}
 .production-board .order-view-card.order .order-view-card-heading{flex-wrap:wrap;align-items:baseline}
 .production-board .order-view-card.order .order-view-customer{white-space:normal;overflow-wrap:anywhere;font-size:.86rem}
 .production-board .order-view-card.order .order-view-title{font-size:.84rem;line-height:1.4}
}

/* Keep the order summary and goods visible together on desktop. */
@media(min-width:1200px){
 .order-detail:has(>.order-view-lines){grid-template-columns:minmax(0,2fr) minmax(0,3fr);align-items:start}
 .order-detail:has(>.order-view-lines)>*{grid-column:1/-1;min-width:0}
 .order-detail:has(>.order-view-lines)>.order-overview{grid-column:1;grid-row:1}
 .order-detail:has(>.order-view-lines)>.order-view-lines{grid-column:2;grid-row:1;align-self:stretch;display:flex;flex-direction:column}
 .order-detail:has(>.order-view-lines)>.order-view-lines>.order-view-lines-total{margin-top:auto}
 .order-detail:has(>.order-view-lines)>.order-view-lines>.order-view-lines-toggle{margin-top:auto}
 .order-detail:has(>.order-view-lines)>.order-view-lines>.order-view-lines-total+.order-view-lines-toggle{margin-top:5px}
 .order-detail:has(>.order-view-lines) .order-overview>.order-contact-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .order-detail:has(>.order-view-lines) .order-overview .order-planning-panel{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);padding:12px 0 0;grid-template-columns:minmax(0,1fr);gap:4px}
 .order-detail:has(>.order-view-lines) .order-overview .order-planning-value{flex-direction:row;align-items:baseline;gap:12px}
 .order-detail:has(>.order-view-lines) .order-overview .order-planning-value>strong{text-align:right;white-space:nowrap}
 .order-detail:has(>.order-view-lines) .order-overview .order-planning-summary{align-items:baseline}
 .order-detail:has(>.order-view-lines) .order-overview .order-view-hero-main{gap:16px}
 .order-detail:has(>.order-view-lines) .order-overview .order-view-hero-contact{padding-left:16px}
}

/* v1.13.173: a stable order workspace with one page scroll. */
.toolbar.order-detail-toolbar{flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:8px 22px;min-width:0}
.order-detail-toolbar>.order-section-nav{display:flex;gap:6px;min-width:0;max-width:100%}
.order-section-nav button{flex:0 1 auto;min-width:0;min-height:34px;padding:6px 10px;font-size:12px;line-height:1.3;white-space:nowrap}
.order-detail-workspace [data-order-anchor]{scroll-margin-top:68px}
.order-detail-workspace>.order-job-description{grid-column:1/-1;position:relative;margin:0;padding:16px 20px}
.order-job-description h3{margin:0 0 10px}
.order-job-description .order-description-preview{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;margin:0}
.order-job-description .order-description-read{margin-top:10px}
.order-job-description .order-description-edit{position:absolute;right:16px;top:12px;min-height:34px;padding:6px 12px}
.order-job-description h3{padding-right:85px}
.order-job-description .order-description-editor textarea{width:100%;min-height:140px}
.order-job-description .order-description-preview[hidden],.order-job-description .order-description-read[hidden],.order-job-description .order-description-edit[hidden]{display:none!important}
.order-job-description>.order-description-mobile{display:none}
@media(max-width:700px){
 .order-description-editable:not(.is-editing){display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px}
 .order-description-editable>h3{padding-right:0}
 #app-view #content .order-detail-workspace .order-description-editable:not(.is-editing)>h3{margin:0;gap:6px}
 #app-view #content .order-detail-workspace .order-description-editable:not(.is-editing)>h3>.icon{width:20px;height:20px;flex-basis:20px}
 #app-view #content .order-description-editable:not(.is-editing)>.order-description-edit{display:inline-flex;align-items:center;position:static;max-width:100%;margin:0;padding:6px 7px;font-size:.8rem}
 .order-description-editable:not(.is-editing)>.order-description-preview{display:block;max-height:6.2em;max-height:4lh;flex-basis:100%;min-width:0}
 .order-description-editable:not(.is-editing)>.order-description-read{display:inline-flex;align-items:center;margin:0}
 .order-description-editable:not(.is-editing)>:is(.order-description-input,.order-description-save-status,.details-actions){display:none}
 .order-description-editable.is-editing>.order-description-done{display:inline-flex;align-items:center;min-height:44px}
}
.order-detail-workspace .order-operations{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:18px;align-items:start}
.order-detail-workspace .order-operation-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.order-detail-workspace .order-operation-row:has(>.order-operation-card[hidden]){grid-template-columns:minmax(0,1fr)}
.order-detail-workspace .order-operation-row:not(:has(>.order-operation-card:not([hidden]))){display:none}
.order-detail-workspace .order-operation-card{height:auto;min-height:0;margin:0;gap:0}
.order-detail-workspace .order-supplies{padding:0!important;border:0}
.order-supplies-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0 8px}
.order-supplies-heading h4{margin:0;font-size:13px}
.order-supplies-heading button{flex:0 0 auto;min-height:34px;padding:6px 10px}
/* One row layout for material and external orders, including received history. */
.order-detail-workspace .order-supplies{container-type:inline-size}
.order-detail-workspace .order-supplies .followup-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;align-items:start;padding:12px 0;margin:0;border:0;border-top:1px solid var(--line);font-size:14px;min-width:0}
.order-detail-workspace .order-supplies .followup-row>strong{grid-column:1;grid-row:1;min-width:0;font-size:14px;overflow-wrap:anywhere}
.order-detail-workspace .order-supplies .followup-row>p{grid-column:1;grid-row:2;margin:0;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.order-detail-workspace .order-supplies .followup-row>.tag{grid-column:2;grid-row:1;justify-self:end;align-self:start;max-width:100%;margin:0}
.order-detail-workspace .order-supplies .followup-row>.details-actions{grid-column:2;grid-row:2;margin:0;justify-content:flex-end;flex-wrap:wrap;gap:6px}
.order-detail-workspace .order-supplies .followup-row .details-actions>button{min-height:32px;padding:5px 9px;font-size:12px;max-width:100%}
.order-supplies-history{margin-top:10px;border-top:1px solid var(--line);padding-top:8px}
.order-supplies-history>h5{font-size:12px;color:var(--muted);margin:0 0 6px;line-height:1.5}
.order-detail-workspace .production-header-actions{padding:8px 0 0;margin-bottom:4px}
.order-detail-workspace .plan-visits-summary{margin:10px 0;font-size:12px;color:var(--muted)}
.order-detail-workspace .plan-allocation{font-size:12px;margin:6px 0}
.order-detail-workspace .plan-detail-row{margin-top:8px}
.order-detail-workspace .plan-visits-content>.secondary:last-child{margin-top:10px;width:100%}
.order-detail-workspace .work-file-overview{border-top:0;margin-top:8px;padding-top:0}
.work-file-overview>h4{margin:8px 0;font-size:13px}
.order-detail-workspace .work-category-filters{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 12px}
.order-detail-workspace .work-category-filters button{min-height:34px;padding:6px 10px;font-size:12px}
.order-detail-workspace .work-media-actions{gap:6px;flex-wrap:wrap}
.order-detail-workspace .work-media-actions button{min-height:36px;padding:7px 10px;font-size:12px}
.order-upload-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.order-upload-choices button{min-height:70px}
.order-reading-dialog{width:min(1080px,calc(100vw - 40px));max-width:calc(100vw - 40px)}
.order-reading-reference{margin-top:0;font-size:13px}
.order-lines-full{position:relative;min-width:0}
.order-lines-dialog .order-view-line-table{width:100%;table-layout:fixed}
.order-lines-dialog .order-view-line-table thead th{position:sticky;top:0;background:var(--panel);z-index:2}
.order-lines-dialog .order-lines-dialog-total{position:sticky;bottom:0;z-index:3;background:var(--panel);border-top:1px solid var(--line);padding:16px 8px;box-shadow:0 -4px 12px #0002}
.order-lines-full .order-view-line-item{overflow-wrap:anywhere}
.order-reading-dialog .work-text{white-space:pre-wrap;overflow-wrap:anywhere}
@media(min-width:1200px){
 .order-detail-workspace:has(>.order-view-lines)>.order-overview{grid-row:1}
 .order-detail-workspace:has(>.order-view-lines)>.order-view-lines{grid-row:1}
 .order-detail-workspace .order-view-lines{--order-lines-preview-height:240px}
}
@media(max-width:700px){
 .toolbar.order-detail-toolbar{position:sticky;top:62px;z-index:12;background:var(--bg);padding-block:6px;gap:8px}
 .order-detail-toolbar>.order-section-nav{width:100%;gap:4px}
 .order-section-nav button{flex:1 1 0;padding:6px 2px;font-size:11px;min-height:44px;white-space:normal;overflow-wrap:anywhere}
 .order-detail-workspace [data-order-anchor]{scroll-margin-top:155px}
 .order-detail-workspace .order-operation-row{grid-template-columns:minmax(0,1fr);gap:12px}
 .order-detail-workspace>.order-job-description{padding:14px}
 .order-reading-dialog{width:100vw;max-width:100vw}
 .order-lines-dialog .order-view-quantity-column{width:56px}
 .order-lines-dialog .order-view-amount-column{width:84px}
 .order-lines-dialog .order-view-line-table th,.order-lines-dialog .order-view-line-table td{font-size:12px;padding:10px 5px}
 .order-lines-dialog .order-view-product{flex-wrap:wrap}
 .order-detail-workspace .work-file-heading{align-items:flex-start;flex-direction:column;gap:8px}
 .order-detail-workspace .order-work:not(.work-compact-files){display:flex;flex-direction:column}
 .order-detail-workspace .order-work:not(.work-compact-files) .work-file-heading{align-items:center;flex-direction:row}
 .order-detail-workspace .order-work:not(.work-compact-files) .work-file-heading>.work-media-actions{flex-basis:100%}
 .order-detail-workspace .order-work:not(.work-compact-files) :is(.work-file-desktop-title,.work-file-overview>h4){display:none}
 .order-detail-workspace .order-work:not(.work-compact-files) .work-file-mobile-title{display:inline}
 .order-detail-workspace .order-work:not(.work-compact-files)>.work-upload-slot{order:1}
 .order-detail-workspace .order-work:has(.work-file-add-action:not(:empty))>.work-upload-slot{display:none}
}
.order-detail-workspace .order-view-lines-viewport .order-view-product{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:7px}
.order-detail-workspace .order-view-lines-viewport .order-view-line-table td{padding-block:9px}
.order-detail-workspace .order-view-lines-viewport .order-view-description{margin:4px 0 0 0;padding-left:8px;font-size:12px;line-height:1.4}
@media(max-width:700px){
 .order-detail-workspace .order-view-lines-viewport .order-view-line-table{table-layout:auto}
 .order-view-lines-viewport .order-view-line-table :is(.order-view-quantity-column,.order-view-line-quantity,.order-view-amount-column,.order-view-line-amount){width:1%;padding-inline:8px 0}
 .order-view-lines-viewport .order-view-line-table :is(.order-view-amount-column,.order-view-line-amount){white-space:nowrap;overflow-wrap:normal}
 .order-view-lines-viewport .order-view-line-table .order-view-line-item{padding-inline-end:4px}
 .order-detail-workspace .order-view-lines-viewport .order-view-product{gap:3px 6px}
 .order-view-lines-viewport .order-view-product-name{order:-1;font-size:.88rem}
 .order-detail-workspace .order-view-lines-viewport .order-view-description{font-size:.8125rem;line-height:1.45}
 .order-detail-workspace .order-view-lines-total{padding-inline-end:0}
}
.responsive-dialog.order-reading-dialog{width:min(1080px,calc(100vw - 40px));max-width:calc(100vw - 40px)}
.order-lines-dialog>.live-dialog-content{padding-bottom:0}
.order-lines-dialog .order-lines-dialog-total{margin-bottom:0}
@media(max-width:700px){.responsive-dialog.order-reading-dialog{width:100vw;max-width:100vw}}
@media(max-width:700px){
 #app-view #content .order-detail-workspace .order-overview>.order-header-actions>button,
 #app-view #content .order-detail-workspace .order-overview>.order-header-actions>details>summary{white-space:normal;text-align:center;font-size:12px;line-height:1.2;height:auto;min-height:44px;overflow-wrap:anywhere}
}
@container(max-width:460px){
 .order-detail-workspace .order-supplies .followup-row>p{grid-column:1/-1}
 .order-detail-workspace .order-supplies .followup-row>.details-actions{grid-column:1/-1;grid-row:3;justify-content:flex-start;margin-top:3px}
}
@media(max-width:700px){
 .order-detail-workspace .order-supplies .followup-row .details-actions>button{min-height:44px}
}
.order-detail-workspace .work-category-filters .work-drag-active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
@media(min-width:701px){.completion-dialog.responsive-dialog.order-lines-dialog{width:min(1080px,calc(100vw - 40px));max-width:calc(100vw - 40px)}}


/* Editable local job name and independent Tripletex reference. */
.order-view-hero .order-view-eyebrow{font-size:clamp(1.35rem,2.2vw,1.65rem);color:#8acaff;font-weight:850}
.order-view-hero .order-view-hero-customer{font-size:clamp(1.15rem,1.6vw,1.4rem);font-weight:700;color:var(--ink)}
.order-header-editable{width:100%;min-width:0;max-width:100%;box-sizing:border-box;font:inherit;color:inherit;background:transparent;border:1px solid transparent;border-radius:6px;padding:3px 5px;margin:0;outline-offset:2px}
.order-header-editable:hover{border-color:var(--line)}.order-header-editable:focus{border-color:var(--blue);background:var(--input);outline:2px solid var(--blue)}
.order-view-hero h1 .order-header-name{display:block;font:inherit;line-height:1.25;resize:none;overflow:hidden;min-height:1.4em;padding:0 3px}
.order-header-save-status{display:block;font-size:12px;font-weight:500;line-height:1.4;color:var(--muted);margin-top:3px}.order-header-save-status:empty{display:none}.order-header-save-status.is-error{color:#ff7474}
.order-header-save-retry{font-size:12px;padding:4px 8px;min-height:28px}.order-header-save-retry[hidden]{display:none}
.order-reference-field{margin-top:12px}.order-reference-editor{font-size:14px;line-height:1.4;font-weight:650}.order-reference-editor>.order-header-editable{margin-left:-5px}

html[data-theme=light] .order-view-hero .order-view-eyebrow{color:#0878b8}

/* Operation headers share space; their lists grow naturally with saved rows. */
.order-detail-workspace .order-operation-header{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;width:100%;min-width:0;border-bottom:1px solid var(--line);padding-bottom:12px}
.order-detail-workspace .order-operation-header .order-operation-heading{width:auto;min-height:0;flex:0 1 auto}
.order-detail-workspace .order-operation-header .order-operation-status{font-size:12px;line-height:1.4;margin:0}
.order-operation-identity{display:grid;gap:5px;min-width:0}
.order-detail-workspace .order-supplies-header{flex:1 1 170px;min-width:0}
.order-detail-workspace .order-supplies-header .order-supplies-heading{margin:0}
.order-detail-workspace .order-supplies-header h4{font-size:12px;line-height:1.5;color:var(--muted)}
.order-detail-workspace .order-operation-header .production-header-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px;flex:0 1 auto;margin:0 0 0 auto;padding:0;min-width:0;width:auto;border:0}
.order-supplies-add{display:contents}
.order-detail-workspace .order-operation-header button{min-height:38px;max-width:100%;padding:8px 10px;font-size:12px;white-space:normal}
.order-detail-workspace .installation-header-summary{flex:1 1 240px;min-width:0}
.order-detail-workspace .installation-header-identity{display:flex;flex-wrap:wrap;align-items:center;gap:5px 16px;flex:1 1 240px;min-width:0}
.order-detail-workspace .installation-header-summary .plan-visits-summary{min-height:0;padding:0;margin:0;cursor:default;line-height:1.4}
.order-detail-workspace .installation-header-summary .plan-allocation{margin:4px 0 0;font-size:11px;line-height:1.5}
.order-detail-workspace .installation-header-actions{flex:0 1 auto;min-width:0;margin-left:auto}
.order-detail-workspace .installation-header-actions .plan-estimate{padding:0;margin:0;border:0}
.order-detail-workspace .installation-header-actions .plan-estimate-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:6px 8px}
.order-detail-workspace .installation-operation .installation-header-actions .plan-estimate-form>label{flex:0 1 86px;min-width:76px;max-width:100px;font-size:11px;gap:4px}
.order-detail-workspace .installation-operation .installation-header-actions .plan-estimate-form input{min-height:38px;padding:8px}
.order-detail-workspace .installation-operation .installation-header-actions .plan-estimate-form>button{flex:0 1 auto;min-height:38px;margin:0;font-size:12px;padding:8px 10px}
.order-detail-workspace .installation-operation .plan-visits-details{border:0;margin:0}
.order-detail-workspace .installation-operation .plan-visits-content{padding:0;gap:0}
.order-detail-workspace .installation-operation .plan-visits-content>.plan-detail-row:first-child{margin-top:0}
.order-detail-workspace .order-production-followup{margin-top:0}
#app-view #content .order-detail.order-detail-workspace :is(.order-production-followup,.order-external-followup) .order-supplies{border:0;padding-top:0;margin:0}
@media(max-width:700px){
 .order-detail-workspace .order-operation-header{gap:10px;padding-bottom:10px}
 .order-detail-workspace .order-supplies-header{flex:1 1 130px}
 .order-detail-workspace .order-operation-header .production-header-actions{flex-basis:100%;justify-content:flex-start;margin-left:0}
 .order-detail-workspace .installation-header-summary{flex:1 1 190px}
 .order-detail-workspace .installation-header-actions{flex:1 1 100%;margin:0}
 .order-detail-workspace .installation-operation .installation-header-actions .plan-estimate-form>.plan-new-appointment{flex:1 1 160px}
 .order-detail-workspace .order-operation-header button{min-height:44px}
 .order-detail-workspace .installation-operation .installation-header-actions .plan-estimate-form>button,.order-detail-workspace .installation-operation .installation-header-actions .plan-estimate-form input{min-height:44px}
}

/* One shared title/action row; supporting information stays below the title. */
#app-view #content .order-detail-workspace .order-operation-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px 16px;padding-bottom:12px}
#app-view #content .order-detail-workspace :is(.order-operation-identity,.installation-header-identity){display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;min-width:0}
#app-view #content .order-detail-workspace .order-operation-header .order-operation-heading{flex:1 0 100%;margin:0;min-height:38px;align-items:center}
#app-view #content .order-detail-workspace .order-supplies-header{flex:0 1 auto;margin:0}
#app-view #content .order-detail-workspace .order-operation-header :is(.production-header-actions,.installation-header-actions){display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:6px;width:auto;margin:0;min-width:0}
#app-view #content .order-detail-workspace .order-operation-header button{flex:0 0 auto;min-height:38px;width:auto;max-width:none;white-space:nowrap;font-size:12px;padding:8px 10px;margin:0}
#app-view #content .order-detail-workspace .order-operation-header :is(.production-hold-slot,.production-hold-actions){display:contents}
#app-view #content .order-detail-workspace .installation-header-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;flex:1 1 100%;align-items:center}
#app-view #content .order-detail-workspace .installation-header-summary :is(.plan-visits-summary,.plan-allocation){grid-column:1;margin:0}
#app-view #content .order-detail-workspace .installation-header-summary .plan-estimate{grid-column:2;grid-row:1 / span 2;margin:0;padding:0;border:0}
#app-view #content .order-detail-workspace .installation-header-summary .plan-estimate-form{display:flex;flex-wrap:nowrap;align-items:center;gap:6px}
#app-view #content .order-detail-workspace .installation-header-summary .plan-estimate-form>label{display:flex;flex-direction:row;align-items:center;gap:8px;flex:none;font-size:11px;margin:0}
#app-view #content .order-detail-workspace .installation-header-summary .plan-estimate-form input{width:76px;min-height:38px;padding:8px}
#app-view #content .order-detail-workspace .installation-header-summary .plan-estimate>small{display:block;font-size:11px;margin-top:4px}
#app-view #content .order-detail-workspace .plan-save-estimate[hidden]{display:none}
@media(max-width:700px){
 #app-view #content .order-detail-workspace .order-operation-header{grid-template-columns:minmax(0,1fr);gap:8px}
 #app-view #content .order-detail-workspace .order-operation-header :is(.production-header-actions,.installation-header-actions){justify-content:flex-start;flex-basis:auto}
 #app-view #content .order-detail-workspace .order-operation-header button{min-height:44px;padding:8px;font-size:12px}
 #app-view #content .order-detail-workspace .installation-header-summary{grid-template-columns:minmax(0,1fr)}
 #app-view #content .order-detail-workspace .installation-header-summary .plan-estimate{grid-column:1;grid-row:auto}
 #app-view #content .order-detail-workspace .installation-header-summary .plan-estimate-form input{min-height:44px}
}

/* Each desktop row stretches to its tallest visible card without measuring JS. */
#app-view #content .order-detail-workspace .order-operation-row{align-items:stretch}
#app-view #content .order-detail-workspace .order-purchases-row{grid-template-columns:minmax(0,2fr) minmax(0,2fr) minmax(0,1fr)}
#app-view #content .order-detail-workspace .order-purchases-row:has(>.order-operation-card[hidden]){grid-template-columns:repeat(2,minmax(0,1fr))}
#app-view #content .order-detail-workspace .order-purchases-row:has(>.order-operation-card:not([hidden])):not(:has(>.order-operation-card:not([hidden])~.order-operation-card:not([hidden]))){grid-template-columns:minmax(0,1fr)}
#app-view #content .order-detail-workspace .order-installation-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
#app-view #content .order-detail-workspace .order-installation-row:has(>.installation-operation[hidden]){grid-template-columns:minmax(0,1fr)}
#app-view #content .order-detail-workspace .order-operation-row>.order-operation-card{align-self:stretch;height:auto}
#app-view #content .order-detail-workspace .order-operation-files{display:flex;min-width:0;align-self:stretch}
#app-view #content .order-detail-workspace .order-operation-files>.order-work{flex:1 1 auto;min-width:0;width:100%;margin:0;box-sizing:border-box}
@media(max-width:1000px){
 #app-view #content .order-detail-workspace .order-purchases-row{grid-template-columns:repeat(3,minmax(0,1fr))}
 #app-view #content .order-detail-workspace .order-installation-row{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:700px){
 #app-view #content .order-detail-workspace :is(.order-purchases-row,.order-installation-row){grid-template-columns:minmax(0,1fr)!important;align-items:start}
}
#app-view #content .order-detail-workspace .installation-header-identity{display:contents}
#app-view #content .order-detail-workspace .installation-header-identity>.order-operation-heading{grid-column:1;grid-row:1}
#app-view #content .order-detail-workspace .installation-header-summary{grid-column:1 / -1;grid-row:2}
#app-view #content .order-detail-workspace .installation-header-actions{grid-column:2;grid-row:1}
#app-view #content .order-detail-workspace .delivery-operation>.order-operation-heading{width:100%;min-height:38px;gap:6px}
#app-view #content .order-detail-workspace .delivery-operation>.order-operation-heading h3{font-size:14px;line-height:1.3}
#app-view #content .order-detail-workspace .delivery-operation>.order-operation-heading>.icon{width:18px;flex:0 0 18px}
#app-view #content .order-detail-workspace .order-delivery-reset{font-size:11px;padding:6px;min-height:34px}
#app-view #content .order-detail-workspace .order-operation-files .work-media-actions{display:flex;flex-wrap:nowrap;gap:6px}
#app-view #content .order-detail-workspace .order-operation-files .work-media-actions>button{font-size:12px;padding:8px;white-space:nowrap;min-height:38px;flex:0 0 auto}
@media(max-width:700px){
 #app-view #content .order-detail-workspace .installation-header-actions{grid-column:1;grid-row:3}
 #app-view #content .order-detail-workspace .order-operation-files .work-media-actions{flex-wrap:wrap}
 #app-view #content .order-detail-workspace .order-operation-files .work-media-actions>button{min-height:44px}
}
@media(min-width:701px) and (max-width:1000px){
 #app-view #content .order-detail-workspace .order-purchases-row{grid-template-columns:minmax(0,1fr)!important}
}

/* Keep delivery mode choices compact; the selected action gets its own row. */
#app-view #content .order-detail-workspace .order-delivery-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#app-view #content .order-detail-workspace .order-delivery-modes>.order-delivery-actions{grid-column:1 / -1;display:flex;margin:0;width:100%;min-width:0}
#app-view #content .order-detail-workspace .order-delivery-modes>button,
#app-view #content .order-detail-workspace .order-delivery-modes>.order-delivery-actions>button{width:100%;min-width:0;min-height:44px;box-sizing:border-box;padding:8px 10px;line-height:1.2;white-space:nowrap}

/* Shared luminous top edge on every main order-detail card. */
#app-view #content .order-detail-workspace :is(.order-overview,.order-view-lines,.order-job-description,.order-operation-card,.order-work,.order-final-review,.k2-limited-detail,.k2-visit-list){--order-card-accent:#59bde7;position:relative;border-top:2px solid color-mix(in srgb,var(--order-card-accent) 75%,var(--line));box-shadow:inset 0 12px 20px -18px color-mix(in srgb,var(--order-card-accent) 55%,transparent),0 -5px 18px -14px color-mix(in srgb,var(--order-card-accent) 65%,transparent)}
#app-view #content .order-detail-workspace .order-view-lines{--order-card-accent:#88bfff}
#app-view #content .order-detail-workspace .order-job-description{--order-card-accent:#72d5c5}
#app-view #content .order-detail-workspace .production-operation{--order-card-accent:#e4b45c}
#app-view #content .order-detail-workspace .external-operation{--order-card-accent:#c2a2ee}
#app-view #content .order-detail-workspace .installation-operation{--order-card-accent:#64cfee}
#app-view #content .order-detail-workspace .delivery-operation{--order-card-accent:#7fd2ab}
#app-view #content .order-detail-workspace .order-work{--order-card-accent:#8baaff}
#app-view #content .order-detail-workspace :is(.order-overview,.order-view-lines,.order-job-description,.order-operation-card,.order-work,.order-final-review,.k2-limited-detail,.k2-visit-list)::before{content:'';position:absolute;left:14px;right:14px;top:-2px;height:2px;border-radius:100%;background:linear-gradient(90deg,transparent,var(--order-card-accent) 22%,var(--order-card-accent) 78%,transparent);box-shadow:0 0 9px 1px color-mix(in srgb,var(--order-card-accent) 55%,transparent);pointer-events:none}
html[data-theme=light] #app-view #content .order-detail-workspace :is(.order-overview,.order-view-lines,.order-job-description,.order-operation-card,.order-work,.order-final-review,.k2-limited-detail,.k2-visit-list)::before{box-shadow:0 0 8px color-mix(in srgb,var(--order-card-accent) 35%,transparent)}
#app-view #content .order-detail-workspace :is(.order-job-description>h3,.order-view-lines-heading h2){display:flex;align-items:center;gap:10px}
#app-view #content .order-detail-workspace :is(.order-job-description>h3,.order-view-lines-heading h2)>.icon{width:24px;height:24px;flex:0 0 24px;color:var(--order-card-accent)}

/* Preserve inactive cards and their dimensions beneath a noninteractive veil. */
#app-view #content .order-detail-workspace .order-operation-card.operation-not-applicable{gap:0}
#app-view #content .order-detail-workspace .order-operation-card.operation-not-applicable::after{content:'Ikke aktuell';position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;padding:16px;border-radius:inherit;background:color-mix(in srgb,var(--panel) 70%,transparent);backdrop-filter:blur(1px);color:var(--muted);font-size:13px;font-weight:700;pointer-events:auto}

/* Six readable columns per desktop viewport; selected subsets fill the space. */
@media(min-width:901px){
 .all-orders-board-viewport{container-type:inline-size}
 .all-orders-board{width:max-content;min-width:100%;grid-template-columns:repeat(var(--all-board-columns,13),minmax(0,calc((100cqw - (var(--all-board-page-columns,6) - 1) * 12px) / var(--all-board-page-columns,6))))}
}
.production-board-column{padding:7px}
.production-board-heading{justify-content:flex-start;gap:7px;margin-bottom:8px}
.production-board-heading h3{flex:1;min-width:0;overflow-wrap:anywhere}
.production-board-heading .production-board-count{flex-shrink:0}
.production-board-heading>.board-column-trigger{flex:0 0 32px;min-width:32px;min-height:32px;height:32px;margin:0;padding:0;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:24px;line-height:1}
.production-board-heading>.board-column-trigger:hover,.production-board-heading>.board-column-trigger[aria-expanded=true]{background:var(--input);color:var(--ink)}
.board-column-menu{position:fixed;inset:auto;z-index:1000;box-sizing:border-box;margin:0;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);box-shadow:0 10px 30px #0005;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;text-align:left}
.board-column-menu[hidden]{display:none}
.board-column-menu-title{display:block;font-size:13px;padding:3px 5px 9px}
.board-column-sort{display:grid;gap:6px;font-size:12px;color:var(--muted);padding:4px 5px 10px}
.board-column-menu .board-column-sort>select{width:100%;min-width:0;max-width:none;margin:0;font:inherit;min-height:38px}
.board-column-menu>.board-column-action{display:block;width:100%;margin:0;padding:10px 6px;min-height:40px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:13px;text-align:left;box-shadow:none}
.board-column-menu>.board-column-action:hover{background:var(--input)}
.order-card-dates{display:flex;flex-wrap:wrap;gap:5px 12px}
.order-card-dates>.order-view-date{flex-direction:row;align-items:baseline;gap:4px;white-space:nowrap}
.production-board .order-view-card-heading{flex-wrap:wrap}
.production-board .order-view-customer{flex:1 1 120px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:clip}
.production-board .order-view-card-main{gap:5px}
.production-board .order-view-card-aside{gap:5px}
.production-board .order-view-date{font-size:.75rem}
.production-board .order-view-date small{font-size:.72rem}
@media(min-width:901px){.production-board-viewport .production-board-jobs{scrollbar-gutter:auto;scrollbar-width:thin;padding-right:2px}}
@media(max-width:700px){.production-board-heading>.board-column-trigger{flex-basis:44px;min-width:44px;min-height:44px;height:44px}.board-column-menu>.board-column-action{min-height:44px}}

/* Keep the filters and view actions on the same desktop row. */
@media(min-width:901px){
 .workflow-tools{grid-template-columns:minmax(0,1fr) auto;gap:4px 12px}
 #app-view #content .workflow-tools>.list-controls{grid-column:1;grid-row:1;flex-wrap:nowrap;align-items:end;min-width:0;margin:0}
 #app-view #content .workflow-tools>.list-controls>.list-search{flex:1 1 240px;min-width:120px}
 .workflow-tools>.workflow-modes{grid-column:2;grid-row:1;align-self:end;margin:0;flex-wrap:nowrap}
 #app-view #content .workflow-tools>.list-result{grid-column:1/-1;grid-row:2;margin:0}
}

/* Compact, directly editable dates and an aligned mounting action. */
.order-detail .order-planning-panel .order-inline-date,
.order-detail .order-planning-panel .order-installer-value{display:grid;grid-template-columns:minmax(0,1fr) 158px;align-items:center;gap:10px;min-height:38px;width:100%;margin:0}
.order-inline-date>span:first-child{font-size:12px;color:var(--muted);font-weight:400}
.order-inline-date-frame{display:contents}
.order-detail .order-planning-panel .order-inline-date-input{box-sizing:border-box;width:100%;min-width:0;min-height:34px;margin:0;padding:5px 8px;font:inherit;font-size:13px;border:1px solid var(--line);border-radius:6px;background:var(--input);color:var(--ink);color-scheme:dark}
html[data-theme=light] .order-detail .order-planning-panel .order-inline-date-input{color-scheme:light}
.order-inline-date-status{display:block;text-align:right;color:var(--muted);font-size:11px;line-height:1.4}
.order-inline-date-status:empty{display:none}
.order-detail .order-planning-panel .order-contact-fact:has(>.order-planning-value){padding-right:0}
.order-detail .order-planning-panel .order-installation-plan{box-sizing:border-box;width:100%;min-height:34px;margin:0;padding:5px 8px;font-size:12px;white-space:normal}
.order-installer-value>.muted,.order-installer-value>strong{text-align:right}
.order-planning-panel .production-deadline-reset{font-size:10px;min-height:24px;padding:3px 6px;margin:2px 0 0 auto;display:block}
.order-work .work-dropzones{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;margin:12px 0}
.order-work .work-dropzones .work-dropzone{min-width:0;margin:0;min-height:92px;box-sizing:border-box;padding:12px}
.order-work .work-dropzone.work-drag-active{border-color:var(--blue);background:var(--input)}
@media(max-width:420px){.order-detail .order-planning-panel .order-inline-date,.order-detail .order-planning-panel .order-installer-value{grid-template-columns:minmax(0,1fr) 145px;gap:6px}.order-work .work-dropzones{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
 .order-detail .order-planning-panel :is(.order-inline-date,.order-installer-value){
  grid-template-columns:minmax(0,1fr) min(50%,164px);gap:8px;min-width:0;
 }
 /* Keep iOS's native date value inside a track with its own visible border. */
 .order-detail .order-planning-panel .order-inline-date-frame{
  display:flex;align-items:center;min-inline-size:0;box-sizing:border-box;min-height:44px;padding:0 8px;
  border:1px solid var(--line);border-radius:var(--ui-radius-sm);background:var(--input);
 }
 #app-view #content .order-detail .order-planning-panel .order-inline-date-frame>input[type=date]{
  /* iOS WebKit aligns the native value through the input's flex layout. */
  display:flex;align-items:center;flex:1 1 0%;width:0;min-inline-size:0;max-inline-size:100%;min-height:42px;padding:0;border:0;
  margin:0;background:transparent;appearance:none;font-size:16px;
 }
 .order-inline-date-frame>input::-webkit-date-and-time-value{min-inline-size:0;max-inline-size:100%;padding:0;text-align:center}
 .order-inline-date-frame>input::-webkit-datetime-edit{min-inline-size:0;padding:0}
}
@media(max-width:360px){
 .order-detail .order-planning-panel .order-inline-date{grid-template-columns:minmax(0,1fr);gap:4px}
}


/* List thumbnails occupy a left column. Board and detail covers keep their own layout. */
.orders>.order-view-card.order>.order-view-cover{grid-column:1;grid-row:1;position:relative;inset:auto;transform:none;width:112px;height:84px;aspect-ratio:auto;margin:0;border:1px solid var(--line);border-radius:8px;background:var(--panel2);overflow:hidden;align-self:center}
.orders>.order-view-card.order{grid-template-columns:112px minmax(0,1fr) minmax(145px,auto) 18px}
.orders>.order-view-card.order>.order-view-card-main{grid-column:2;grid-row:1;padding-left:0;min-height:0}
.orders>.order-view-card.order>.order-view-card-aside{grid-column:3;grid-row:1}
.orders>.order-view-card.order>.order-view-open{grid-column:4;grid-row:1}
.order-view-cover img[hidden],.order-view-cover-placeholder[hidden]{display:none!important}
.order-view-cover-placeholder{display:flex;width:100%;height:100%;align-items:center;justify-content:center;color:var(--muted);background:linear-gradient(145deg,var(--panel2),var(--panel))}
.order-view-cover-placeholder>.icon{display:flex;width:38px;height:38px;align-items:center;justify-content:center;opacity:.65}
.order-view-cover-placeholder svg{width:38px;height:38px}
.production-board .order-view-cover[data-cover-placeholder=true]{display:none}
@media(max-width:700px){
 .orders>.order-view-card.order>.order-view-cover{display:none!important}
 .orders>.order-view-card.order{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto}
 .orders>.order-view-card.order>.order-view-card-main{grid-column:1;grid-row:1;padding-left:0;min-height:0}
 .orders>.order-view-card.order>.order-view-card-aside{grid-column:1;grid-row:2}
 .orders>.order-view-card.order>.order-view-open{display:none}
}


/* Shared order-chip geometry belongs to the order views; colours use LIVE tokens. */
@media screen {
html[data-theme] .ui-status.order-chip{display:inline-flex;align-items:center;max-width:100%;padding:3px 8px;border-radius:var(--ui-radius-sm);font-size:11px;line-height:1.4;font-weight:700;white-space:normal;overflow-wrap:anywhere;text-overflow:clip;border-width:1px;border-style:solid;box-shadow:none}
html[data-theme] .order-marker-row{display:flex;flex-wrap:wrap;gap:5px;margin-top:3px}
html[data-theme] .production-board .order-view-status.order-chip{display:none}
 html[data-theme] .ui-status.order-chip.order-chip-duplicates-status{display:none}
 html[data-theme] .production-board .ui-status.order-chip.order-chip-duplicates-status{display:inline-flex}
 /* Permit only cards with markers to grow; never clip an operational warning. */
 .orders>.order-view-card.order:has(.order-marker-row){flex-basis:auto;height:auto;max-height:none;grid-template-rows:auto}
 .orders>.order-view-card.order:has(.order-marker-row) .order-view-card-main{height:auto;max-height:none;overflow:visible}
 .orders>.order-view-card.order .order-marker-row{height:auto;flex-wrap:wrap;overflow:visible}
 .orders>.order-view-card.order:has(.order-marker-row) .order-view-card-aside{height:auto;max-height:none;flex-wrap:wrap;overflow:visible}
}

/* Seller geometry belongs to order cards, independently of the shared palette. */
 html[data-theme] .order-seller{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-left:6px;padding:2px 5px;border:1px solid;border-radius:var(--ui-radius-sm,8px);font-size:10px;line-height:1.2;font-weight:800;letter-spacing:.02em;white-space:nowrap}

/* Keep seller initials in the lower right corner of compact Kanban cards. */
html[data-theme] .production-board .order-view-card.order:has(.order-seller){padding-bottom:30px}
html[data-theme] .production-board .order-view-card.order .order-seller{position:absolute;right:9px;bottom:8px;margin-left:0}

/* Kanban dates read left to right: delivery, then production. */
.production-board .order-card-dates>.order-card-delivery-date{order:-1}

/* Billing and delivery/production dates must never share a row. */
.production-board .order-view-card-aside>.order-card-dates{flex:0 0 100%;width:100%;min-width:0}
@media(max-width:700px){
 .orders>.order-view-card.order:has(.order-billing-stamp){flex-basis:auto;height:auto;max-height:none;grid-template-rows:auto auto}
 .orders>.order-view-card.order:has(.order-billing-stamp) .order-view-card-aside{height:auto;max-height:none;flex-wrap:wrap;overflow:visible}
 .orders>.order-view-card.order:has(.order-billing-stamp) .order-card-dates{flex:0 0 100%;width:100%;min-width:0}
}
/* The Meldinger button keeps a permanent, upper-right badge slot at every count. */
html[data-theme] #app-view #content .order-detail .order-overview>.order-header-actions>.order-messages-trigger{
 position:relative;padding-right:30px;
}
/* Quiet ring when all messages are read; strong contrast for unread messages. */
html[data-theme] #app-view #content .order-messages-trigger .order-message-count{
 position:absolute;top:2px;right:3px;z-index:1;
 box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
 min-width:18px;height:18px;padding:0 4px;white-space:nowrap;pointer-events:none;
 border:1px solid var(--ui-action-border);border-radius:999px;
 background:transparent;color:var(--ui-action-ink);
 font-size:11px;font-weight:800;line-height:16px;font-variant-numeric:tabular-nums;
}
html[data-theme] #app-view #content .order-messages-trigger .order-message-count.is-inactive{
 visibility:hidden;
}
html[data-theme] #app-view #content .order-messages-trigger .order-message-count.is-unread{
 background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-surface);
}

.order-installer-summary{min-width:0;text-align:right;overflow-wrap:anywhere}
.order-installer-summary>*{display:block}
.order-installer-summary>small{font-size:12px;line-height:1.35}
