/* 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-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)}
.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;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:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}.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}

/* Compact Kanban cards: keep identity, job, labels and date; detail fields open on click. */
.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-view-status,.production-board .order-view-total{display:none}
.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}
