/* Alumion assets supplied by the owner. Brand colors sampled from LOGO SUUR.png.
   Production status colors retain their Excel meaning. */
:root{--brand:#574ffd;--cyan:#4fc9fd;--ink:#24234c;--muted:#777990;--line:#e5e6f0;--lime:var(--cyan);color:var(--ink);background:#f6f7fc}
.sidebar{background:#fcfcfc;color:var(--ink);border-right:1px solid var(--line)}
.brand{display:flex;flex-direction:column;align-items:flex-start;gap:7px;letter-spacing:normal}
.brand-logo{display:block;width:184px;max-width:100%;height:auto}
.brand small{margin:0 0 0 3px;color:#777990;letter-spacing:.24em;font-size:9px}
.brand-symbol{display:none;width:44px;height:44px;overflow:hidden;flex:none}
.brand-symbol img{width:260px;height:75px;max-width:none;transform:translate(-13px,-16px)}
.navcaption{color:#85859f}.nav{color:#777790}.nav:hover{background:#f0efff;color:var(--brand)}
.nav.active{background:#ecebff;color:#4941dc}.sidebarbottom{color:#777990}.sidebarbottom p{color:#9394a7}
.online-dot{background:var(--cyan)}#avatar{background:#eeedff;color:#5149da}.accent{color:var(--brand)}
.primary{background:var(--brand);color:#fff}.primary:hover{background:#4640d8}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:var(--brand)}
.progresshero{background:linear-gradient(115deg,#29265d 0%,#4038b6 58%,#574ffd 100%)}
.progresshero .eyebrow,.progresshero p,#progress-legend{color:#dcdeff}.progress-track{background:#ffffff26}
.progress-track div{background:var(--cyan)}.progresshero strong span{color:var(--cyan)}
.projectart{background:#ececff}.projectart::before{background:repeating-linear-gradient(90deg,transparent 0,transparent 35px,#827ceb 36px,#827ceb 38px),repeating-linear-gradient(0deg,#b6b3f6 0,#b6b3f6 35px,#8d87df 36px,#8d87df 38px);border-color:#fafaff;box-shadow:25px 20px 0 #d1e9fb}
.projectart::after{color:#6862ac}.projectart .badge{background:#ffffffed}
.badge{background:#f0effa;color:#5b5781}.tab.selected{color:var(--brand);border-color:var(--brand)}
.chip[aria-pressed=true]{background:var(--brand);border-color:var(--brand);color:#fff}
.activityrow .eventdot{background:var(--cyan)}.iconbutton{background:#f0f0f8}
dialog::backdrop{background:#18163880}.projectcard:hover{box-shadow:0 12px 35px #37309212}
@media(max-width:1150px){.brand-logo{width:154px}.brand small{font-size:8px}}
@media(min-width:561px) and (max-width:850px){.brand-logo,.brand small{display:none}.brand .brand-symbol{display:block}.brand{align-items:center}}
@media(max-width:560px){.brand{gap:2px}.brand-logo{width:128px}.brand small{font-size:6px;letter-spacing:.22em;margin-left:4px}.brand-symbol{display:none}.sidebar{border-bottom:1px solid var(--line);border-right:0}.nav.active{background:#eeedff}.sidebar .nav{font-size:9px;padding:8px 6px;gap:5px}}
/* Shared horizontal grid preserves Excel's physical neighbours and empty slots. */
#elements.groups{padding:0 0 14px}
.assembly-scroll{overflow:auto;max-width:100%;overscroll-behavior-x:contain;border-block:1px solid var(--line)}
.assembly-grid{--meta:240px;--cell:102px;width:max-content;min-width:100%}
.assembly-heading,.assembly-row{display:grid;grid-template-columns:var(--meta) repeat(var(--slots),var(--cell));gap:0}
.assembly-heading{background:#f1f0fb;font-size:11px;font-weight:600}
.row-meta{display:grid;grid-template-columns:repeat(5,1fr);position:sticky;left:0;z-index:2;background:#fafaff;border-right:2px solid #d5d2ec;align-items:stretch}
.row-meta span{display:flex;align-items:center;justify-content:center;padding:8px 3px;border-right:1px solid var(--line);font-size:12px}
.assembly-heading .row-meta span{font-size:10px;background:#f1f0fb}
.slot-heading{text-align:center;padding:10px;border-right:1px solid var(--line)}
.assembly-row{border-top:1px solid var(--line)}
.assembly-row .card{width:auto;min-width:0;min-height:68px;padding:10px 7px;border-radius:0;border:0;border-right:1px solid #dfe2ea;box-shadow:none;text-align:left}
.assembly-row .card:hover{transform:none;outline:2px solid var(--brand);outline-offset:-2px;box-shadow:none}
.assembly-row .card strong{font-size:12px;line-height:1.3;overflow-wrap:anywhere}
.assembly-row .card .statusline{font-size:10px;margin-top:8px;gap:2px}
.empty-slot,.excluded-slot{border-right:1px solid var(--line);min-height:68px}
.excluded-slot{padding:10px 7px;color:#9295a6;background:#f9f9fc;font-size:11px}
.excluded-slot small{display:block;margin-top:8px;font-size:9px}
.layout-hint{font-size:11px;line-height:1.6;color:var(--muted);margin:12px 18px 0}
@media(max-width:560px){.assembly-grid{--meta:170px;--cell:98px}.row-meta span{font-size:10px;padding:6px 1px}.assembly-heading .row-meta span{font-size:9px}.assembly-row .card{min-height:68px;padding:9px 6px}.assembly-row .card strong{font-size:12px}}
.assembly-grid{--meta:135px}
.row-meta span{font-size:11px;padding:5px 1px;min-width:0}
.assembly-heading .row-meta span{writing-mode:vertical-rl;transform:rotate(180deg);height:62px;padding:7px 0;font-size:10px}
.slot-heading{display:grid;place-items:center}
.card-comment{display:block;margin-top:8px;font-size:9px;color:var(--brand);text-decoration:underline;text-underline-offset:2px}
.stop-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:10px;line-height:1.4;margin-top:7px;color:#82436b}
@media(max-width:560px){.assembly-grid{--meta:115px}.row-meta span{font-size:10px}.assembly-heading .row-meta span{font-size:9px}}

/* Full-width production workspace, with row totals fixed at the right edge. */
.shell{margin-left:0}.topbar{height:66px;padding:0 24px;gap:24px}.topbrand img{display:block;width:140px;height:auto}.topbar nav{display:flex;gap:8px}.topbar .nav{width:auto;margin:0;padding:10px 14px;font-size:12px;color:var(--ink)}.topbar .nav.active{background:#eeebff;color:var(--brand)}.topbar .breadcrumbs{margin-right:auto}.topbar .account{margin-left:auto}main{max-width:none;padding:22px 24px}.pagehead{margin:12px 0 18px}.pagehead h1{font-size:30px}.stage-nav{display:flex;align-items:center;gap:8px;margin-bottom:14px}.stage-nav a{margin-left:auto;font-size:12px;color:var(--brand)}.stage-note{font-size:12px;line-height:1.6;padding:10px 14px;background:#eeebff;border-radius:8px}.progresshero{padding:16px 22px;margin-bottom:12px}.progresshero strong{font-size:34px}.stats{margin-bottom:18px}.stat{padding:12px 16px}.stat strong{font-size:23px}.toolbar{padding:16px 18px 12px}.filterbar{padding:0 18px 12px}.assembly-grid{--summary:290px}.assembly-heading,.assembly-row{grid-template-columns:var(--meta) repeat(var(--slots),var(--cell)) var(--summary)}.row-summary{display:grid;grid-template-columns:30px 58px 58px 36px 36px 40px 30px;position:sticky;right:0;z-index:3;background:#fff;border-left:2px solid #d5d2ec;box-shadow:-5px 0 12px #211b5020;align-items:stretch}.row-summary>span{display:flex;align-items:center;justify-content:center;border-right:1px solid var(--line);font-size:11px;padding:5px 2px;min-width:0}.row-summary .row-done{color:#167952;background:#f0faf4;font-weight:600}.row-summary .row-direction{font-size:27px;color:var(--ink)}.summary-heading{background:#f1f0fb}.summary-heading>span{font-size:10px;font-weight:600}.row-start,.row-deadline{white-space:nowrap}.stage-nav .chip[aria-pressed=true]{background:var(--brand);color:white}
@media(max-width:850px){.topbar{padding:0 14px;gap:12px}.topbrand img{width:110px}.topbar .breadcrumbs{display:none}main{padding:16px 12px}.assembly-grid{--meta:100px;--summary:222px}.row-summary{grid-template-columns:26px 52px 52px 30px 30px 30px}.row-sequence{display:none!important}}
@media(max-width:560px){.topbar{height:auto;min-height:60px;flex-wrap:wrap;padding:10px 12px;gap:8px}.topbrand img{width:100px}.topbar .nav{padding:8px;font-size:11px}.topbar .account strong,.topbar .account small{display:none}.topbar #avatar{width:26px;height:26px}.topbar .account{gap:4px}.pagehead h1{font-size:25px}.stage-nav{flex-wrap:wrap}.stage-nav a{font-size:10px}.stage-nav .chip{font-size:11px}.progresshero{padding:12px 15px}.progresshero strong{font-size:30px}.stats{gap:6px}.stat{padding:9px 12px}.stat strong{font-size:21px}.assembly-grid{--meta:80px;--cell:108px;--summary:159px}.row-meta span{font-size:9px}.row-summary{grid-template-columns:22px 48px 29px 29px 29px}.row-summary>span{font-size:9px}.row-summary .row-direction{font-size:23px}.row-start{display:none!important}.summary-heading>span{font-size:8px}.assembly-row .card strong{font-size:11px}.assembly-row .card .statusline{font-size:9px}.assembly-heading .row-meta span{height:52px}.stage-note{font-size:11px}}

.row-quantities,.row-direction{flex-direction:column}.row-quantities small{font-size:9px;white-space:nowrap;color:#625b7d}.mobile-priority{display:none;font-size:8px}.listtitle{gap:12px;flex-wrap:wrap}.listtitle select{padding:6px;font-size:12px}.listtitle label{font-size:11px}@media(max-width:850px){.mobile-priority{display:block}.row-quantities small{font-size:8px}}

.card.sent{background:#fcf0f8}.card.sent .statusline{color:#ab4588}

/* Angle labels inside their own cells; keep numeric columns unchanged. */
.summary-heading{min-height:86px}
.summary-heading>span{position:relative;align-items:flex-end;padding:0;overflow:visible}
.summary-heading>span>b{position:absolute;left:50%;bottom:12px;transform:rotate(-45deg);transform-origin:0 50%;white-space:nowrap;font-size:10px;font-weight:600;line-height:12px}
@media(max-width:560px){.summary-heading{min-height:76px}.summary-heading>span>b{font-size:9px;line-height:11px;bottom:10px}}

#selection-bar{position:sticky;bottom:12px;z-index:30;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:14px;background:#fff;border:2px solid #574ffd;border-radius:14px;box-shadow:0 5px 24px #24204f30}#selection-bar[hidden]{display:none}#selection-bar strong{margin-right:auto}.card.multi-mode{position:relative;padding-right:26px}.card.multi-mode:after{content:"";position:absolute;right:8px;top:10px;width:14px;height:14px;border:1.5px solid #817ca5;border-radius:4px;background:white}.card.multi-selected{box-shadow:inset 0 0 0 3px #574ffd}.card.multi-selected:after{content:"✓";background:#574ffd;color:#fff;border-color:#574ffd;font-size:12px;text-align:center}#batch-detail{width:min(620px,94vw);max-height:90vh}#batch-detail label{display:block;margin:16px 0}#batch-detail select,#batch-detail textarea{width:100%;margin-top:6px}#batch-labels{max-height:110px;overflow:auto;font-size:13px}#multi-select{white-space:nowrap}@media(max-width:560px){#selection-bar{gap:8px;padding:10px;flex-wrap:wrap}#selection-bar strong{width:100%}.listtitle{flex-wrap:wrap}}

#deliveries{margin:14px 0;padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:white}#deliveries>summary{font-weight:650;cursor:pointer;color:var(--ink)}.delivery-filter{display:inline-flex;align-items:center;gap:8px;margin:10px 18px 10px 0;font-size:12px}.delivery-card{padding:16px;margin-top:12px;border:1px solid var(--line);border-radius:10px}.delivery-card-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.delivery-card-head h3{margin:0;margin-right:auto}.delivery-items{display:flex;flex-wrap:wrap;gap:8px 28px;padding-left:22px;font-size:12px}.delivery-items li{min-width:160px;padding:5px}.delivery-items small{display:block;color:#67637c;margin-top:5px}.delivery-card details{font-size:12px}.assembly-strip{display:block;font-size:9px;margin-top:8px;padding:4px 5px;border-left:4px solid #aaa;background:#ffffffb0;color:var(--ink);text-align:left}.assembly-strip.done{border-color:#00b050}.assembly-strip.working{border-color:#e4bb00}.assembly-strip.stopped{border-color:#b64796}.assembly-strip.unknown,.assembly-strip.review{border-color:#c27612}.delivery-badge{display:block;font-size:9px;margin-top:5px;color:#5144b8;text-align:left}#delivery-dialog{width:min(660px,94vw);max-height:90vh}#delivery-dialog label{display:block;margin:14px 0}#delivery-dialog select,#delivery-dialog textarea,#delivery-dialog input[type=date]{width:100%;margin-top:6px}#delivery-selection{max-height:32vh;overflow:auto;border:1px solid var(--line);border-radius:8px}.delivery-element{display:flex;align-items:center;gap:10px;padding:10px;border-bottom:1px solid var(--line);font-size:13px}.delivery-element>span:nth-child(2){flex:1}.delivery-element small{display:block;margin-top:4px}.delivery-element input{width:20px;height:20px}.delivery-element button{min-width:34px;min-height:34px}.ready{color:#167952}.not-ready{color:#905b16}@media(max-width:560px){#deliveries{padding:12px}.delivery-card{padding:12px}.delivery-card-head h3{font-size:16px}.delivery-filter{font-size:11px}.assembly-strip,.delivery-badge{font-size:8px}}

.production-delivery{display:inline-flex;align-items:center;gap:5px;margin-top:7px;padding:3px 6px;border-radius:5px;background:#eeebff;color:#4937b7;font-size:11px;font-weight:650;white-space:nowrap}.production-delivery svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}

.assembly-row .card .production-delivery{display:flex;align-items:center;justify-content:flex-start;gap:6px;line-height:1;margin-top:7px;color:#4937b7}.assembly-row .card .production-delivery svg{display:block;flex:0 0 19px;align-self:center}.assembly-row .card .production-delivery span{display:block;margin:0;padding:0;line-height:1;font-size:11px;color:inherit;align-self:center}

#elements[data-stage=assembly] .card.sent,#elements[data-stage=installation] .card.onsite{box-shadow:inset 0 0 0 3px #8b5cf6}#elements[data-stage=assembly] .card.sent{background:#edf8f2}#elements[data-stage=installation] .card.onsite{background:#fff}.actions{flex-wrap:wrap}.actions .sent,.actions .onsite{background:#f0ebff;color:#6635ba;box-shadow:inset 0 0 0 2px #8b5cf6}

.comment-options{display:grid;gap:8px;margin:12px 0;font-size:12px}.comment-options label{display:flex;align-items:center;gap:8px}.comment-options input{width:18px;height:18px}.assembly-strip.sent{border-color:#8b5cf6}
#statistics{margin:14px 0;padding:16px;background:white;border:1px solid var(--line);border-radius:12px}#statistics summary{cursor:pointer;font-weight:650}.report-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:end}.report-controls label{display:grid;font-size:12px}.report-table{overflow:auto;max-height:480px}.report-table td,.report-table th{padding:8px;text-align:left;border-bottom:1px solid var(--line);font-size:12px;white-space:nowrap}.load-number{font-size:10px;display:grid}.load-number input{width:60px;min-height:34px}

/* Consistent, readable controls and compact working views. */
:root{--muted:#656780}
body{line-height:1.45}
h2{font-size:22px;line-height:1.25}h3{font-size:16px;line-height:1.35}
label{font-size:13px;color:#555b72}.small{font-size:13px;line-height:1.55}.eyebrow{font-size:11px;line-height:1.4}
button:not(.card):not(.iconbutton):not(.projectcard){line-height:1.25}
.primary,.secondary,.chip{font-size:14px;min-height:42px;padding:10px 14px}
input:not([type=checkbox]):not([type=radio]),select,textarea{border:1px solid #cfd2e2;border-radius:8px;background-color:#fff;color:var(--ink);font-size:15px;min-height:42px;padding:9px 11px;max-width:100%;line-height:1.35}
select{padding-right:30px}textarea{line-height:1.5}input[type=checkbox]{accent-color:var(--brand);width:18px;height:18px;flex-shrink:0}
.topbar{height:60px}.topbar .nav{font-size:14px}.account strong{font-size:13px}.account small{font-size:11px}
main{padding:16px 20px}.pagehead{margin:8px 0 14px}.pagehead h1{font-size:28px}.subtitle{font-size:14px;margin-top:6px}.back,.textbutton{font-size:13px}
.stage-nav{gap:8px;margin-bottom:12px}.stage-nav a{font-size:13px}
.progresshero{padding:14px 20px;gap:20px}.progresshero .eyebrow{font-size:10px;margin-bottom:3px}.progresshero strong{font-size:32px}.progresshero p,#progress-legend{font-size:12px}.progressright{max-width:none;flex:0 1 55%}
.stats{gap:10px;margin-bottom:12px}.stat{padding:10px 14px}.stat label{font-size:13px}.stat strong{font-size:24px;margin-top:2px}
.tabs{margin-bottom:12px}.tab{font-size:14px;padding:10px 0}.tab span,.sync-caption{font-size:12px}
.toolbar{padding:14px 16px 10px;gap:12px}.toolbar label{font-size:13px}.toolbar input,.toolbar select{margin-top:5px}.filterbar{padding:0 16px 12px}.blindfilter{font-size:13px}.listtitle{padding:10px 16px;font-size:13px}.listtitle label,.listtitle select{font-size:13px}.layout-hint{font-size:12px}
#deliveries,#statistics{padding:13px 16px;margin:10px 0;border-radius:10px}#deliveries>summary,#statistics>summary{font-size:15px}#deliveries>p,#statistics>p{margin:10px 0;max-width:100ch}
.delivery-filter{font-size:13px;gap:8px;margin:8px 14px 8px 0}.delivery-filter input[type=date]{width:155px}.delivery-card{padding:14px;margin-top:10px}.delivery-card-head h3{font-size:17px}.delivery-card-head>span{font-size:13px}.delivery-items{font-size:14px;gap:8px 24px;margin:10px 0}.delivery-items small{font-size:12px}.delivery-card details{font-size:13px}
.report-controls{gap:8px}.report-controls button,#delivery-retry{border:1px solid #d5d4e8;background:#f8f8ff;border-radius:8px;padding:10px 12px;min-height:42px;font-size:13px;color:var(--ink)}.report-controls .primary{background:var(--brand);color:white}.report-controls label{gap:5px;font-size:13px}.report-table th,.report-table td{font-size:13px;padding:10px}.report-table th{background:#f5f4fc;position:sticky;top:0}.report-table table{width:100%;border-collapse:collapse}
dialog,#delivery-dialog,#batch-detail{width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:22px 24px;border-radius:16px;scrollbar-gutter:stable}
dialog .detailhead{margin-bottom:12px;gap:12px}.iconbutton{width:36px;height:36px;flex:0 0 36px}dialog h2{font-size:24px}#detail-title{font-size:28px;margin-top:0}#detail-location,.detailstatus{font-size:13px}.detailstatus{margin:10px 0 16px;flex-wrap:wrap}.detailhead .eyebrow{font-size:11px}
#delivery-dialog label,#batch-detail label{margin:12px 0;font-size:13px;line-height:1.4}#delivery-help{margin:8px 0 14px;font-size:14px;line-height:1.5}#delivery-dialog textarea{min-height:76px;max-height:180px}#delivery-dialog input[type=date],#delivery-dialog select{margin-top:5px}#delivery-error:empty{display:none}
#delivery-selection{max-height:36vh;border-radius:10px;background:#fafaff}
.delivery-element{display:flex;gap:10px;padding:10px 12px;font-size:14px;min-height:74px;align-items:center}.delivery-element:last-child{border-bottom:0}.delivery-element>span:first-child{font-size:12px;color:var(--muted);flex:0 0 18px}.delivery-element>span:nth-child(2){min-width:0;flex:1;overflow-wrap:anywhere}.delivery-element b{font-size:15px}.delivery-element small{font-size:12px;line-height:1.35;margin-top:3px}
#delivery-dialog .delivery-element .load-number{display:grid;grid-template-columns:1fr;gap:4px;margin:0;flex:0 0 76px;font-size:12px;line-height:1.2;color:#555b72}
#delivery-dialog .load-number input{width:76px;min-width:0;height:40px;min-height:40px;margin:0;padding:7px 9px;font-size:15px}
.delivery-element button{width:36px;height:40px;min-width:36px;min-height:40px;flex:0 0 36px;padding:0;border:1px solid #d8d6eb;border-radius:8px;background:#fff;color:var(--brand);font-size:19px}.delivery-element button:hover:not(:disabled){background:#eeebff}.delivery-element button:disabled{opacity:.3}
#delivery-save{width:100%;margin-top:4px;min-height:44px}.actions{grid-template-columns:repeat(2,minmax(0,1fr));margin:12px 0}.actions button{font-size:14px;padding:12px 8px;min-height:44px}#save-status{margin-top:4px;font-size:14px}
.conversation{margin-top:18px;padding-top:18px}.conversationhead{gap:10px;margin-bottom:12px}.conversationhead span{font-size:12px}.comment{padding:12px}.commenthead,.commenthead small{font-size:12px}.comment .visibility{font-size:10px}.comment p{font-size:14px;margin-top:6px}.comment-options{font-size:13px}.comment-options label{font-size:13px}.comment-bottom select,.comment-bottom .primary{font-size:13px;min-height:42px}.comment-bottom select{width:auto;flex:1;min-width:180px}.error{font-size:14px}.badge{font-size:12px}
.accesspanel{padding:20px}#access-form{margin:16px 0}.accesspanel p,.accessrow{font-size:14px}.activityrow{font-size:14px;padding:14px 0}.activityrow small{font-size:12px}.projectgrid{grid-template-columns:repeat(auto-fit,minmax(280px,460px));gap:16px}.projectart{height:120px}.projectbody{padding:20px}.projectbody p,.projectfoot{font-size:14px}.login-view{padding:48px 0;max-width:600px}.login-view h1{font-size:48px}.login-view small{font-size:13px}footer{margin-top:20px;font-size:11px}
.assembly-grid{--cell:112px}.assembly-row .card{padding:10px 8px;min-height:72px}.assembly-row .card strong{font-size:13px}.assembly-row .card .statusline{font-size:11px;margin-top:6px}.assembly-strip{font-size:10px}.row-meta span,.row-summary>span{font-size:12px}.assembly-row .card .production-delivery span{font-size:11px}
@media(max-width:650px){
 main{padding:12px}.pagehead h1{font-size:24px}.pagehead{gap:10px}.pagehead .secondary{font-size:12px;padding:9px}.stage-nav .chip{font-size:13px;padding:9px 10px}.stage-nav a{font-size:12px}
 .topbar{height:auto;gap:8px}.topbar .nav{font-size:12px;padding:8px}.progresshero{padding:12px 14px}.progresshero strong{font-size:29px}.progresshero p{font-size:11px;max-width:none}#progress-legend{font-size:10px}.stat label{font-size:12px}.stat strong{font-size:22px}.stats{gap:8px}
 .toolbar{grid-template-columns:repeat(3,minmax(0,1fr));padding:12px;gap:8px}.toolbar .search{grid-column:1/-1}.toolbar label{font-size:12px}.filterbar{padding:0 12px 12px}.chip{font-size:12px;padding:8px 10px}.listtitle{padding:10px 12px;font-size:12px}.tab{font-size:13px}
 dialog,#delivery-dialog,#batch-detail{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px;border-radius:12px}dialog h2{font-size:22px}#delivery-help{font-size:13px}#delivery-selection{max-height:38vh}.delivery-element{display:grid;grid-template-columns:16px minmax(0,1fr) 64px 32px 32px;gap:6px;padding:9px 8px;min-height:76px}.delivery-element b{font-size:14px}.delivery-element small{font-size:11px}#delivery-dialog .delivery-element .load-number{width:64px;min-width:0;font-size:11px}#delivery-dialog .load-number input{width:64px;font-size:16px;padding:7px}.delivery-element button{width:32px;min-width:32px;height:40px}.delivery-element:has(>input[type=checkbox]){grid-template-columns:20px minmax(0,1fr)}
 .commenthead{flex-wrap:wrap}.commenthead small{margin-left:0}.comment-bottom{flex-wrap:wrap}.comment-bottom .primary{flex:1}.report-controls{display:grid;grid-template-columns:1fr 1fr}.report-controls input{width:100%;min-width:0}.report-controls button{font-size:12px;padding:9px}.delivery-filter{display:flex;margin:10px 0}.delivery-card-head{gap:8px}.delivery-card-head .secondary{width:100%}.delivery-items{display:block}.delivery-items li{padding:4px 0}
 .assembly-grid{--cell:112px}.assembly-row .card strong{font-size:12px}.assembly-row .card .statusline{font-size:10px}.row-meta span,.row-summary>span{font-size:10px}.row-summary .row-direction{font-size:23px}.assembly-strip{font-size:9px}.login-view h1{font-size:38px}.projectgrid{grid-template-columns:minmax(0,1fr)}
}
.overview-strip{display:grid;grid-template-columns:minmax(300px,1fr) 1.5fr;gap:12px;margin-bottom:12px}.overview-strip .progresshero,.overview-strip .stats{margin:0}.overview-strip .progresshero{gap:16px}.overview-strip .progressright{flex-basis:45%}.overview-strip .stat{padding:10px 12px}.overview-strip .stat-icon{display:none!important}#project-code{margin-bottom:5px}.stage-note{margin:6px 0 10px;padding:8px 12px}.pagehead .subtitle{margin-top:4px}
@media(max-width:1000px){.overview-strip{grid-template-columns:1fr}.overview-strip .progresshero{padding:10px 14px}.overview-strip .progresshero>div:first-child{display:grid;grid-template-columns:auto auto;align-items:center;gap:0 12px}.overview-strip .progresshero .eyebrow{grid-column:2;grid-row:1;margin:0}.overview-strip .progresshero strong{grid-column:1;grid-row:1/3}.overview-strip .progresshero p{grid-column:2;grid-row:2;margin:0}.overview-strip .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.overview-strip .stat{padding:8px}.overview-strip .stat label{font-size:11px}.overview-strip .stat strong{font-size:21px}}
@media(max-width:560px){.overview-strip .progressright{display:none}.overview-strip .progresshero>div:first-child{width:100%;grid-template-columns:auto 1fr}.overview-strip .progresshero p{font-size:12px}.overview-strip .progresshero .eyebrow{font-size:10px}}

.row-summary.editable-plan{cursor:pointer}.row-summary.editable-plan:hover{background:#eeebff}.row-summary.editable-plan:focus-visible{outline:2px solid #574ffd;outline-offset:-2px}.row-summary small{display:block;font-size:10px}#row-plan-dialog{width:min(560px,calc(100vw - 24px))}.plan-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.plan-fields label{display:grid;gap:6px}.plan-fields input,.plan-fields select{width:100%;min-width:0}#plan-save{width:100%;margin-top:12px}@media(max-width:480px){.plan-fields{grid-template-columns:1fr}}

/* Comments stay in the detail dialog; the flag uses only role-visible comments. */
.card .element-heading{display:flex;align-items:center;gap:6px;min-width:0;width:100%}
.card .element-heading strong{min-width:0;flex:1}
.comment-flag{display:inline-flex;flex:0 0 24px;align-items:center;justify-content:center;width:24px;height:28px;color:#1687df}
.comment-flag svg{width:20px;height:20px;overflow:visible;fill:#cceaff;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Keep pending plan labels inside their own cell, including compact layouts. */
.row-summary .row-start{flex-direction:column;gap:4px}
.row-summary .row-start small{font-size:9px;line-height:1.2;color:#8a6500;white-space:nowrap}
.row-summary .mobile-priority{display:none}
@media(max-width:850px){.row-summary .mobile-priority{display:block}}

/* Project KPIs share the title row; compact view stacks without hiding metrics. */
#project-view>.pagehead{display:grid;grid-template-columns:minmax(230px,.8fr) minmax(0,2fr) auto;gap:20px;align-items:center}
#project-view>.pagehead .overview-strip{margin:0;grid-template-columns:minmax(220px,1fr) 1.4fr;gap:10px;min-width:0}
#project-view>.pagehead .progresshero{padding:12px 16px;gap:12px}
#project-view>.pagehead .progressright{display:none}
#project-view>.pagehead .stat{padding:10px;min-width:0}
@media(max-width:1200px){#project-view>.pagehead{grid-template-columns:minmax(0,1fr) auto}#project-view>.pagehead .overview-strip{grid-column:1/-1;grid-row:2}#project-view>.pagehead #refresh{grid-column:2;grid-row:1}}
@media(max-width:650px){#project-view>.pagehead .overview-strip{grid-template-columns:1fr}#project-view>.pagehead .stats{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Match the Port Artur project heading: title, four KPIs, refresh. */
#project-view>.pagehead{grid-template-columns:minmax(240px,1fr) minmax(0,2fr) auto;gap:20px}
#project-view>.pagehead .overview-strip{display:block;min-width:0}
#project-view>.pagehead .progresshero{display:none}
#project-view>.pagehead .stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0}
#project-view>.pagehead .stat{padding:12px;border:1px solid var(--line);border-radius:10px;box-shadow:0 3px 12px #24234c04;min-height:90px}
#project-view>.pagehead .stat strong{display:block;font-size:26px;line-height:1.2;margin:0 0 5px}
#project-view>.pagehead .stat label{display:block;font-size:13px;line-height:1.35}
#project-view>.pagehead .stat.all{background:linear-gradient(115deg,#29265d,#4038b6 65%,#574ffd);border:0;color:white}
#project-view>.pagehead .stat.all strong{color:var(--cyan)}
#project-view>.pagehead .stat.all label,#project-view>.pagehead .completion-note{color:#dcdeff}
.completion-note{display:block;font-size:11px;margin-top:4px}
@media(min-width:1051px){#project-view>.pagehead .overview-strip{grid-column:auto;grid-row:auto}#project-view>.pagehead #refresh{grid-column:auto;grid-row:auto}}
@media(max-width:1050px){#project-view>.pagehead{grid-template-columns:minmax(0,1fr) auto}#project-view>.pagehead .overview-strip{grid-column:1/-1;grid-row:2}#project-view>.pagehead #refresh{grid-column:2;grid-row:1}}
@media(max-width:500px){#project-view>.pagehead .stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

#project-view>.pagehead .stats{grid-template-columns:repeat(5,minmax(0,1fr))}
#project-view>.pagehead .stat.remaining{background:#fff8df;border-color:#eee0a7}
#project-view>.pagehead .stat.remaining strong{color:#8a6500}
@media(max-width:650px){#project-view>.pagehead .stats{grid-template-columns:repeat(2,minmax(0,1fr))}#project-view>.pagehead .stat.all{grid-column:1/-1}}

/* Single compact project header, retaining ERR colours. */
.project-open .topbar{display:flex;height:auto;min-height:64px;padding:10px 16px;gap:14px;align-items:center;flex-wrap:nowrap}
.project-open .topbrand{order:0;flex:0 0 130px}.project-open .topbrand img{width:130px}
.project-open .topbar .breadcrumbs{display:none}
.project-open .project-header{order:1;flex:1;min-width:0;display:flex;align-items:center;gap:14px;margin:0}
.project-open .project-header>div:first-child{flex:0 1 180px;min-width:130px}
.project-open .project-header h1{font-size:17px;line-height:1.2;margin:0}
.project-open #project-code,.project-open .project-header .subtitle,.project-open .project-header .progresshero{display:none}
.project-open .project-header .overview-strip{display:block;flex:1;min-width:0;margin:0}
.project-open .project-header .stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0}
.project-open .project-header .stat{min-height:44px;padding:7px 10px;border:1px solid var(--line);border-radius:7px;box-shadow:none}
.project-open .project-header .stat>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.project-open .project-header .stat strong{font-size:23px;line-height:1;margin:0}
.project-open .project-header .stat label{font-size:11px;line-height:1.2;margin:0}
.project-open .project-header .completion-note{display:none}
.project-open .project-header .stat.all{background:linear-gradient(115deg,#29265d,#4038b6 65%,#574ffd);border:0}
.project-open .project-header .stat.all strong{color:var(--cyan)}.project-open .project-header .stat.all label{color:#dcdeff}
.project-open .project-header .stat.remaining{background:#fff8df;border-color:#eee0a7}.project-open .project-header .stat.remaining strong{color:#8a6500}
.project-open #refresh{font-size:11px;padding:8px 10px;white-space:nowrap}
.project-open .topbar nav{order:2;gap:2px}.project-open .topbar .nav{padding:7px;font-size:11px}
.project-open .topbar .account{order:3;gap:6px;margin:0}.project-open .topbar #avatar,.project-open .topbar .account small{display:none}.project-open .topbar .account strong{font-size:11px}
.project-open #back{display:none}.project-open main{padding-top:12px}
@media(max-width:1300px){.project-open .topbar{flex-wrap:wrap}.project-open .project-header{order:4;flex:1 0 100%}.project-open .topbar nav{margin-left:auto}.project-open .project-header>div:first-child{flex-basis:180px}}
@media(max-width:650px){.project-open .project-header{flex-wrap:wrap;gap:8px}.project-open .project-header>div:first-child{flex:1}.project-open .project-header .overview-strip{order:3;flex:1 0 100%}.project-open .project-header .stats{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.project-open .project-header .stat{padding:7px 5px}.project-open .project-header .stat>div{display:block}.project-open .project-header .stat strong{font-size:20px;margin-bottom:4px}.project-open .project-header .stat label{font-size:10px}.project-open .topbar{gap:8px;padding:8px 12px}}

/* Frozen workspace controls: stage navigation + one grouped filter ribbon. */
#workspace-controls{position:sticky;top:0;z-index:40;background:#f6f7fc;padding:8px 0;box-shadow:0 5px 12px #24234c0b}
#workspace-controls .stage-nav{margin:0 0 7px;gap:7px}
#workspace-controls .stage-nav .chip,#workspace-controls #multi-select{min-height:36px;padding:8px 12px;font-size:12px}
#workspace-controls #multi-select{margin-left:8px;border-left:3px solid #d5d2ec}
#workspace-controls #multi-select[aria-pressed=true]{background:var(--brand);color:#fff}
#filter-ribbon{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:9px;padding:8px 10px}
#filter-ribbon .toolbar{display:flex;align-items:center;gap:7px;padding:0;flex:1;min-width:0}
#filter-ribbon label{display:flex;align-items:center;gap:6px;font-size:11px;margin:0;white-space:nowrap}
#filter-ribbon .toolbar label{min-width:0}#filter-ribbon .toolbar .search{flex:1;min-width:145px;font-size:0}
#filter-ribbon input[type=search]{width:100%;min-width:0;font-size:12px}
#filter-ribbon select,#filter-ribbon input[type=search]{height:34px;min-height:34px;padding:6px 8px;margin:0}
#filter-ribbon .toolbar select{width:auto;max-width:125px;font-size:11px}
#filter-ribbon .filterbar{display:flex;padding:0 0 0 10px;border-left:1px solid #d5d2ec;gap:10px;flex-shrink:0}
#filter-ribbon .chips{display:flex;gap:4px;flex-wrap:nowrap}
#filter-ribbon .chip{min-height:32px;font-size:11px;padding:6px 8px;white-space:nowrap}
#filter-ribbon .blindfilter{font-size:10px}#filter-ribbon .blindfilter input{width:16px;height:16px}
#filter-ribbon .order-filter{border-left:1px solid #d5d2ec;padding-left:10px;font-size:0}
#filter-ribbon .order-filter select{font-size:11px;width:140px}
#filter-ribbon #clear{font-size:11px;white-space:nowrap;padding:6px}
#elements-panel .listtitle{padding:8px 12px;min-height:0;justify-content:flex-start}
@media(max-width:1500px){#filter-ribbon{flex-wrap:wrap}#filter-ribbon .toolbar{flex-basis:100%}#filter-ribbon .filterbar{border-left:0;padding-left:0;flex:1}#filter-ribbon .toolbar select{max-width:160px}}
@media(max-width:650px){#workspace-controls{padding:5px 0}#workspace-controls .stage-nav{flex-wrap:nowrap;overflow-x:auto}#workspace-controls .stage-nav>*{flex-shrink:0}#workspace-controls .stage-nav a{display:none}#workspace-controls .stage-nav .chip,#workspace-controls #multi-select{padding:8px;font-size:11px}#filter-ribbon{gap:6px;padding:6px}#filter-ribbon .toolbar{flex-wrap:wrap}#filter-ribbon .toolbar .search{flex-basis:100%}#filter-ribbon .toolbar label{flex:1}#filter-ribbon .toolbar select{width:100%;max-width:none}#filter-ribbon .filterbar{overflow-x:auto;flex-basis:100%}#filter-ribbon .order-filter{border:0;padding:0}#filter-ribbon #clear{margin-left:auto}}
/* A single desktop command bar; smaller screens wrap at group boundaries. */
#workspace-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#workspace-controls .stage-nav{margin:0;flex-shrink:0;gap:5px}
#workspace-controls .stage-nav .chip,#workspace-controls #multi-select{font-size:11px;padding:7px 9px;white-space:nowrap}
#filter-ribbon{flex:1;min-width:0;padding:6px 8px;gap:7px}
#filter-ribbon .toolbar .search{flex:1 1 180px;min-width:130px;max-width:230px}
#filter-ribbon .toolbar{gap:5px}
#filter-ribbon .toolbar select{max-width:105px}
#filter-ribbon .filterbar{gap:7px;padding-left:7px}
#filter-ribbon .order-filter{padding-left:7px}
#filter-ribbon .order-filter select{width:130px}
#project-view .tabs #stage-window{align-self:center;font-size:11px;white-space:nowrap;margin-left:12px}
@media(max-width:1750px){#filter-ribbon{flex-basis:100%}#filter-ribbon .toolbar .search{max-width:230px}}
@media(max-width:650px){#workspace-controls .stage-nav{max-width:100%}#filter-ribbon .toolbar .search{max-width:none}#project-view .tabs #stage-window{display:none}}
.project-tool{display:none}.project-open .project-tool{display:inline-flex}
.overview-dialog{width:min(1100px,94vw);max-height:88vh;padding:24px;overflow:auto}
.overview-dialog .detailhead h2{margin:0;font-size:24px}
.overview-dialog #deliveries,.overview-dialog #statistics{border:0;margin:0;padding:12px 0 0;box-shadow:none}
.overview-dialog #deliveries>summary,.overview-dialog #statistics>summary{display:none}
/* Independently collapsible frozen matrix sides. */
.frozen-band{display:grid;grid-template-columns:var(--meta) calc(var(--slots)*var(--cell)) var(--summary);background:#f1f0fb;border-bottom:1px solid var(--line)}
.frozen-band button{border:0;border-radius:0;background:#eeebff;color:var(--ink);font-weight:600;font-size:12px;min-height:36px;padding:6px;position:sticky;z-index:5}
.frozen-band .info-toggle{left:0;border-right:2px solid #d5d2ec}.frozen-band .plan-toggle{right:0;border-left:2px solid #d5d2ec}
.km-row-group{display:grid}.km-merged{display:none}
.assembly-grid.info-collapsed{--meta:58px}
.info-collapsed .assembly-heading .row-meta{display:flex;justify-content:center;align-items:center}
.info-collapsed .assembly-heading .row-meta span{display:none}.info-collapsed .assembly-heading .row-meta:after{content:'KM';padding:16px 0}
.info-collapsed .assembly-row .row-meta{visibility:hidden}
.info-collapsed .km-merged{display:flex;position:sticky;left:0;z-index:4;width:var(--meta);box-sizing:border-box;align-items:center;justify-content:center;background:#f1f0fb;border-right:2px solid #d5d2ec;border-bottom:1px solid #d5d2ec;font-size:14px;font-weight:700}
.assembly-grid.plan-collapsed{--summary:110px}
.plan-collapsed .row-summary{grid-template-columns:58px 52px}
.plan-collapsed .row-summary>span:not(:nth-child(3)):not(:nth-child(6)){display:none!important}
.plan-collapsed .row-summary .mobile-priority{display:none}
.plan-collapsed .frozen-band .plan-toggle{font-size:11px}
#quality-camera{float:right;margin:0 0 12px 16px;display:flex;align-items:center;gap:8px;font-size:20px}#quality-camera span{font-size:13px}#quality-dialog{width:min(600px,94vw)}#quality-preview{display:block;max-width:100%;max-height:45vh;margin:16px auto;object-fit:contain}.quality-pick{display:block;padding:12px;cursor:pointer}.quality-pick input{display:block;margin-top:8px;width:100%}#quality-state{overflow-wrap:anywhere}

#quality-camera[hidden],#quality-preview[hidden]{display:none!important}
.project-open .project-header .stats:has(.weekly){grid-template-columns:repeat(6,minmax(0,1fr))}
.stat.weekly{background:#eeebff;border-color:#d5ceff!important}.stat.weekly strong{color:var(--brand);white-space:nowrap}
.photo-flag{display:inline-flex;color:#168352;flex:0 0 17px;margin-left:4px}.photo-flag svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
@media(max-width:650px){.project-open .project-header .stats:has(.weekly){grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Content-sized metrics also work on older tablet browsers without :has(). */
.project-open .project-header .overview-strip{flex:0 1 auto;max-width:100%}
.project-open .project-header .stats{display:flex;flex-wrap:nowrap;gap:6px;max-width:100%;overflow-x:auto}
.project-open .project-header .stat{flex:0 0 auto;min-height:38px;padding:7px 9px}
.project-open .project-header .stat>div{display:flex;align-items:center;flex-wrap:nowrap;gap:6px}
.project-open .project-header .stat strong{font-size:22px;line-height:1;margin:0;white-space:nowrap}
.project-open .project-header .stat label{font-size:11px;line-height:1.2;white-space:nowrap;margin:0}
.project-open .project-header>div:first-child{flex:0 1 auto;min-width:120px}
.project-open .project-header{gap:10px}
@media(max-width:1100px){.project-open .project-header{flex-wrap:wrap}.project-open .project-header>div:first-child{flex:1}.project-open .project-header .overview-strip{order:3;flex:0 1 auto}.project-open .project-header .stat{padding:6px 8px;min-height:36px}}
@media(max-width:650px){.project-open .project-header .overview-strip{flex:1 1 100%}.project-open .project-header .stat strong{font-size:20px}.project-open .project-header .stats{gap:5px}}

/* Metrics and controls remain visible together while scrolling. */
.project-open .topbar{position:sticky;top:0;z-index:50;background:#fff}
.project-open #workspace-controls{top:var(--header-height,64px)}
#filter-ribbon .blindfilter,#filter-ribbon .order-filter{display:none!important}
#filter-ribbon .toolbar{flex:0 1 auto}
#filter-ribbon .filterbar{flex:1 1 auto}

/* On tablets/phones only the work controls stick; the global menu scrolls away. */
@media(max-width:1280px),(pointer:coarse),(hover:none){
 .project-open .topbar{position:static}
 .project-open #workspace-controls{top:0}
 .project-open #workspace-controls>.project-header{order:0;flex:1 0 100%;width:100%;margin:0 0 8px;padding:4px 0 8px;border-bottom:1px solid var(--line);background:#f6f7fc}
 .project-open #workspace-controls>.project-header .overview-strip{margin-left:auto}
}
.password-login{display:grid;gap:14px;max-width:380px;margin:24px 0;padding:24px;border:1px solid var(--line);border-radius:12px;background:white}.password-login label{display:block;font-size:14px}.password-login input:not([type=checkbox]){display:block;width:100%;min-height:44px;margin-top:6px;padding:10px;border:1px solid #c9c9df;border-radius:7px}.password-login input[type=checkbox]{width:auto;min-height:0}.password-login [role=alert]{color:#b42a40;margin:0}.password-login small{margin:0}
#phone-filters,#phone-stage{display:none}
/* A phone keeps only the stage/selection controls pinned, leaving the matrix usable. */
@media(max-width:760px),(max-width:1280px) and (max-height:600px){
 .project-open .topbar{position:static}
 .project-open main{padding:10px 8px}
 .project-open #project-view>.project-header{margin:8px 0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
 .project-open #project-view>.project-header .overview-strip{order:3;flex:1 1 100%;margin:0;min-width:0}
 .project-open #project-view>.project-header #stats{display:flex;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start}
 .project-open #project-view>.project-header #stats .stat{flex:0 0 auto;min-height:36px;padding:6px 8px}
 .project-open #workspace-controls{top:0;padding:4px 0;gap:0;display:block}
 #workspace-controls .stage-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:4px;max-width:100%;padding:0}
 #workspace-controls .stage-nav .chip,#workspace-controls #multi-select,#workspace-controls #phone-filters{flex:0 0 auto;min-height:40px;padding:8px;font-size:11px;margin:0}
 #workspace-controls #phone-filters{display:inline-flex}
 #workspace-controls #filter-ribbon{display:none}
 #workspace-controls.filters-open #filter-ribbon{display:flex;position:absolute;top:100%;left:0;right:0;max-height:45dvh;overflow-y:auto;flex-wrap:wrap;box-shadow:0 8px 18px #24234c24;background:white;gap:8px;padding:10px}
 #workspace-controls #filter-ribbon .toolbar{flex:1 1 100%;display:flex;flex-wrap:wrap}
 #workspace-controls #filter-ribbon .toolbar .search{flex:1 1 100%;max-width:none}
 #workspace-controls #filter-ribbon .toolbar label{flex:1;min-width:0}
 #workspace-controls #filter-ribbon .toolbar select{width:100%;max-width:none}
 #workspace-controls #filter-ribbon .filterbar{flex:1 1 100%;overflow-x:auto}
 .project-open .tabs{margin-top:8px}
}
@media(max-width:480px){
 #workspace-controls .stage-nav>#stage-aluminium,#workspace-controls .stage-nav>#stage-assembly,#workspace-controls .stage-nav>#stage-installation{display:none}
 #workspace-controls #phone-stage{display:block;flex:1;min-width:0;min-height:40px;width:140px;margin:0;padding:8px;border:1px solid #d5d2ec;border-radius:8px;background:white;color:var(--ink);font-size:12px}
}
.row-comment-trigger{border:0;background:transparent;color:inherit;padding:4px;min-width:0;cursor:pointer;font:inherit;display:flex;align-items:center;justify-content:center;gap:2px}.row-comment-trigger:hover,.row-comment-trigger:focus-visible{background:#ece9ff;outline:2px solid #6250ff;outline-offset:-2px}.row-comment-marker{color:#009be8}.row-comments-dialog{width:min(580px,calc(100vw - 24px));max-height:85dvh;overflow:auto;padding:24px;border:0;border-radius:18px}.row-comments-dialog textarea{display:block;width:100%;box-sizing:border-box;margin:8px 0;font:inherit;padding:12px}.row-comments-dialog .comment p{white-space:pre-wrap;overflow-wrap:anywhere}
.drawing-buttons{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 18px}.drawing-buttons[hidden]{display:none}
dialog.drawing-viewer,dialog.drawing-viewer:fullscreen{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#e5e5ed;color:#25234c}
.drawing-viewer[open]{display:flex;flex-direction:column}.drawing-viewer header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:8px 12px;background:#fff;flex:none}.drawing-viewer header>div{display:flex;align-items:center;gap:6px}.drawing-viewer button{min-width:40px;min-height:40px;padding:6px 10px;border:1px solid #d5d2ea;border-radius:8px;background:#fff;color:#302859;font:inherit}.drawing-viewer [role=status]{margin:0;padding:8px 12px;background:white}.drawing-viewer [role=status]:empty{display:none}.drawing-canvas{flex:1;min-height:0;overflow:auto;padding:12px;text-align:center;overscroll-behavior:contain}.drawing-canvas canvas{background:white;display:block;margin:auto;max-width:none}.drawing-viewer strong{font-size:16px}

.drawing-canvas{touch-action:pan-x pan-y}.drawing-viewer header{position:relative;z-index:2}.drawing-viewer header>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px),(max-height:500px){.drawing-viewer header{padding:4px 6px;gap:4px;flex-wrap:nowrap}.drawing-viewer header>strong{font-size:12px;flex:1}.drawing-viewer header>div{gap:3px}.drawing-viewer button{min-width:32px;min-height:36px;padding:4px 6px}.drawing-canvas{padding:4px}}

.drawing-viewer [data-kind][aria-pressed="true"]{background:#5b48ff;color:#fff;border-color:#5b48ff}.drawing-viewer [data-kind="steel"]{margin-right:6px}
@media(max-width:600px){.drawing-viewer header{flex-wrap:wrap}.drawing-viewer header>strong{flex-basis:100%;font-size:11px}.drawing-viewer header>div{max-width:100%;overflow-x:auto;flex-shrink:1}.drawing-viewer header button{flex-shrink:0}}
/* Compact element card: title and tools together, with touch-sized controls. */
#detail{width:min(760px,calc(100vw - 24px));padding:18px 20px}
#detail .detailhead{margin:0 0 4px;min-height:28px}#detail .detailhead .eyebrow{font-size:10px;letter-spacing:.08em}
#detail .detail-title-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#detail #detail-title{margin:0;font-size:26px;line-height:1.2;flex:1;white-space:nowrap}
#detail-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#detail .drawing-buttons{display:flex;margin:0;gap:6px}
#detail-tools .secondary{padding:8px 10px;min-height:40px;font-size:12px;gap:5px}
#detail #quality-camera{float:none;margin:0;font-size:17px}#detail #quality-camera span{font-size:12px}
#detail .detail-meta{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;margin:8px 0 14px}
#detail #detail-location{margin:0;font-size:12px;line-height:1.4;flex:1}
#detail .detailstatus{margin:0;font-size:12px}#detail .detailstatus>.muted{display:none}
#detail #status-editor h3{font-size:13px;margin:0}#detail .actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:7px 0}
#detail .actions button{padding:9px 6px;min-height:44px;font-size:13px}
#detail #save-status{margin:3px 0 0;min-height:42px;padding:9px;font-size:13px}
#detail .conversation{margin-top:14px;padding-top:12px}#detail .conversationhead{margin-bottom:6px}#detail .conversationhead h3{font-size:14px}
#detail #comment-text{margin-top:4px;min-height:72px;padding:9px 11px;font-size:13px;line-height:1.4}
#detail .comment-options{gap:7px;margin:10px 0;font-size:12px}#detail .comment-options label{font-size:12px;line-height:1.4}
#detail .comment-bottom{margin-top:8px;gap:8px;flex-wrap:wrap}#detail .comment-bottom select{min-width:0;max-width:100%}
#detail #detail-error:empty{display:none}
@media(max-width:540px){#detail{padding:12px;width:calc(100vw - 12px)}#detail #detail-title{font-size:24px}#detail-tools{width:100%}#detail-tools .secondary{min-height:44px;padding:8px;font-size:12px}#detail .detail-meta{margin-bottom:10px}#detail #detail-location{flex-basis:100%}#detail .actions{grid-template-columns:repeat(2,minmax(0,1fr))}#detail .comment-bottom>*{max-width:100%}#detail .comment-bottom .primary{margin-left:auto}}
@media(max-width:540px){#detail #quality-camera span{display:none}#detail #quality-camera{min-width:44px;justify-content:center}#detail-tools{flex-wrap:nowrap}#detail .drawing-buttons{flex-wrap:nowrap}}
#detail .detailhead{gap:10px;margin-bottom:8px}#detail .detailhead .eyebrow{flex:none}#detail .detailhead #detail-location{font-size:11px;flex:1;margin:0;line-height:1.3}
#detail .detail-status-heading{display:flex;align-items:center;gap:10px;margin:14px 0 7px}#detail .detail-status-heading h3{font-size:13px;margin:0}#detail .detail-status-heading .detailstatus{margin:0}
@media(max-width:540px){#detail .detailhead{display:grid;grid-template-columns:1fr 36px;gap:3px 8px}#detail .detailhead #detail-stage{grid-column:1;grid-row:1}#detail .detailhead #detail-location{grid-column:1;grid-row:2;font-size:10px}#detail .detailhead #close-detail{grid-column:2;grid-row:1 / 3}#detail .detail-status-heading{margin-top:10px}}
.drawing-canvas{overflow-anchor:none;scroll-behavior:auto}

.quality-actions{display:flex;gap:8px;margin:12px 0}.quality-actions button{flex:1;min-height:48px}#quality-queue{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;max-height:42dvh;overflow:auto}.quality-thumb img{display:block;width:100%;height:110px;object-fit:cover;border-radius:8px}.quality-thumb button{width:100%;margin-top:4px;min-height:40px}#quality-save{width:100%;min-height:48px}#quality-dialog{max-height:92dvh;overflow:auto}
/* Dedicated wall sheet: no clipping, frozen columns, navigation or filters. */
#km-print-root{display:none}
@media print{
 @page{size:A3 landscape;margin:8mm}
 body.printing-km{margin:0!important;padding:0!important;background:white!important;display:block!important;min-width:0!important}
 body.printing-km>*{display:none!important}
 body.printing-km>#km-print-root{display:block!important;color:#202043;font-family:Arial,sans-serif;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 .km-print-page{break-after:page;page-break-after:always;width:100%}
 .km-print-page:last-child{break-after:auto;page-break-after:auto}
 .km-print-page header{position:static!important;display:block!important;margin:0 0 5mm;padding:0;background:white}
 .km-print-page h1{font-size:18pt;margin:0 0 2mm}.km-print-page p{font-size:11pt;margin:0}
 .km-print-page table{border-collapse:collapse;table-layout:fixed;width:100%;font-size:9pt}
 .km-print-page th,.km-print-page td{border:0.3mm solid #b5b5c9;padding:2mm 1mm;vertical-align:middle;overflow-wrap:anywhere;white-space:normal;height:24mm}
 .km-print-page thead th{height:8mm;background:#eeedf9;font-size:9pt}
 .km-print-page tbody th{background:#eeedf9}.km-print-page strong{display:block;font-size:10pt}.km-print-page small{display:block;font-size:8pt;margin-top:2mm}
 .km-print-page tr{break-inside:avoid;page-break-inside:avoid}
 .km-print-page .done{background:#e2f2e9}.km-print-page .working{background:#fff3c1}.km-print-page .stopped{background:#f3e1ef}.km-print-page .blind{background:#e9edef}.km-print-page .sent,.km-print-page .onsite{background:#eae4ff}
 .km-print-page .print-direction{font-size:20pt;text-align:center}
}
@media print{
 .km-print-page thead th{padding:1mm 0.5mm;font-size:8pt;overflow-wrap:normal}
 .km-print-page strong{font-size:9pt}
 .km-print-page small{font-size:7.5pt}
}
