/* Staff app layout. Tokens and components live in ui.css. */
.skip{position:absolute;left:12px;top:-60px;z-index:200;background:var(--primary);color:#fff;font-weight:600;padding:10px 14px;border-radius:var(--r-sm);text-decoration:none}
.skip:focus{top:12px}
#app:focus{outline:none}

/* ---------- Shell ---------- */
.shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}
.signed-out .shell{grid-template-columns:minmax(0,1fr)}
.signed-out .sidebar{display:none}
/* Navy sidebar (owner, 12 Oct): white logo and text, current page in the action blue, white count pills with navy numbers. */
.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:6px;padding:20px 14px;background:var(--brand);color:#fff;color-scheme:dark;overflow-y:auto}
.sidebar :focus-visible{outline-color:#fff}
.sb-brand{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:0 8px 14px;text-decoration:none;color:#fff}
.sb-brand img{height:160px;width:auto}
.sb-brand span{font-size:22px;font-weight:600;color:#fff;letter-spacing:.01em;line-height:1.2}
.sb-new{margin:4px 0 14px}
.sb-nav{display:grid;gap:2px}
.sb-nav a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--r-sm);color:#fff;text-decoration:none;font-weight:500;font-size:15px}
.sb-nav a:hover{background:rgba(255,255,255,.08);color:#fff}
.sb-nav a[aria-current=page]{background:var(--primary);color:#fff;font-weight:600}
.sb-nav .ic{width:20px;height:20px;color:#fff}
.sb-nav .count{margin-left:auto;min-width:22px;padding:1px 7px;border-radius:999px;background:#fff;color:var(--brand);font-size:12px;font-weight:600;text-align:center}
.sb-user{margin-top:auto;display:flex;align-items:center;gap:10px;padding:12px 8px 0;border-top:1px solid rgba(255,255,255,.16)}
.sb-who{flex:1;min-width:0;line-height:1.3}
.sb-who b{display:block;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-who small{color:#fff;font-size:13px}
.sidebar .icon-btn{color:#fff}
.sidebar .icon-btn:hover{background:rgba(255,255,255,.1);color:#fff}
.avatar{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--primary-soft);color:var(--primary-ink);font-size:12px;font-weight:600;flex:none}
.avatar.sm{width:25px;height:25px;font-size:12px} /* same height as a status pill */
.o-card-status{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
.avatar.lg{width:36px;height:36px;font-size:13px}
.mobile-bar{display:none}
@media (max-width:900px){
  .shell{grid-template-columns:minmax(0,1fr)}
  .mobile-bar{display:flex;position:sticky;top:0;z-index:40;align-items:center;justify-content:space-between;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--border)}
  .mobile-bar img{height:34px;display:block}
  .signed-out .mobile-bar{display:none}
  .sidebar{position:fixed;inset:0 auto 0 0;z-index:50;width:min(280px,85vw);transform:translateX(-105%);visibility:hidden;transition:transform .25s var(--ease),visibility 0s .25s;box-shadow:var(--shadow-lg)}
  .nav-open .sidebar{transform:none;visibility:visible;transition:transform .25s var(--ease)} /* visible at once, so focus can move in; hidden after the slide */
}

/* ---------- Page ---------- */
.page{max-width:1280px;margin:0 auto;padding:32px 32px 72px;animation:rise .3s var(--ease)}
.page.narrow{max-width:880px}
@media (max-width:640px){.page{padding:20px 16px 56px}}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:24px}
.lead{color:var(--text-2);margin-top:6px;font-size:15px}
.empty{text-align:center;padding:56px 20px;color:var(--muted)}
.empty .ic{width:32px;height:32px;color:var(--muted);margin-bottom:10px}
.empty h2{color:var(--text);margin-bottom:6px}

/* ---------- Dashboard ---------- */
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:16px}
.search{position:relative;flex:1 1 280px}
.search .ic{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.search input{padding-left:40px}
.toolbar select{width:180px;min-width:0;flex:0 1 180px}
.toolbar #fSort{width:170px;flex-basis:170px} /* room for "Senest ændret" plus the chevron */
.toolbar .seg{gap:0;flex-wrap:nowrap}
.toolbar .seg label{border-radius:0;min-height:40px}
.toolbar .seg label:first-of-type{border-radius:var(--r-sm) 0 0 var(--r-sm)}
.toolbar .seg label:last-of-type{border-radius:0 var(--r-sm) var(--r-sm) 0;margin-left:-1px}
@media (max-width:640px){.search{flex-basis:100%}.toolbar select{flex:1 1 40%;width:auto}}
.seg label{min-height:42px;border-radius:var(--r-sm)}
.view-toggle{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--r-sm);overflow:hidden;background:var(--surface);box-shadow:var(--shadow-sm)}
.view-toggle input{position:absolute;opacity:0;width:1px;height:1px}
.view-toggle label{margin:0;display:grid;place-items:center;width:42px;height:40px;color:var(--muted);cursor:pointer}
.view-toggle label+input+label{border-left:1px solid var(--border)}
.view-toggle input:checked+label{background:var(--sel-bg);color:var(--sel);box-shadow:inset 0 0 0 2px var(--sel)}
.view-toggle input:checked+label::before{display:none} /* icon-only toggle: the edge is enough */
.view-toggle input:focus-visible+label{outline:2px solid var(--primary);outline-offset:-2px}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:16px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.tabs button{display:inline-flex;align-items:baseline;gap:7px;padding:10px 14px;line-height:20px;border:0;background:none;font:inherit;font-size:14px;font-weight:500;color:var(--text-2);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tabs a{display:inline-flex;align-items:center;padding:10px 14px;font-size:14px;font-weight:500;color:var(--text-2);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tabs a[aria-current=page]{color:var(--sel);border-bottom-color:var(--sel);font-weight:600}
.tabs button:hover,.tabs a:hover{color:var(--text)}
.admin-tabs{margin-bottom:24px}
.admin-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;align-items:start;max-width:880px}
.tabs [aria-pressed=true]{color:var(--sel);border-bottom-color:var(--sel);font-weight:600}
/* Count sits on the label's baseline, same weight family, readable grey; the selected tab tints it rather than inverting it */
.tabs .count{display:inline-block;min-width:22px;padding:0 7px;border-radius:999px;background:var(--s-grey-bg);color:var(--text-2);font-size:13px;line-height:20px;font-weight:600;text-align:center;font-variant-numeric:tabular-nums}
.tabs button:hover .count{color:var(--text)}
.tabs [aria-pressed=true] .count{background:var(--sel-bg);color:var(--sel)}
.dash-body{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
.dash-body.has-panel{grid-template-columns:minmax(0,1fr) 360px}
/* list view */
.o-list{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);overflow:hidden}
.o-row{display:grid;grid-template-columns:56px minmax(0,1fr) 170px 190px 32px 20px;align-items:center;gap:16px;padding:14px 18px;text-decoration:none;color:var(--text);border-bottom:1px solid var(--border);transition:background .12s}
.o-item{position:relative}
.o-item:last-child .o-row{border-bottom:0}
.o-row:hover{background:var(--subtle);color:var(--text)}
.o-row[aria-current=true]{background:var(--sel-bg)}
.thumb{width:56px;height:56px;border-radius:var(--r-sm);border:1px solid var(--border);background:#fff;display:grid;place-items:center;overflow:hidden;color:var(--border-strong)}
.thumb img{width:100%;height:100%;object-fit:contain}
.o-main{min-width:0;display:grid;gap:2px}
.o-title{font-weight:600;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.o-sub{font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.o-time{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}
.o-time .ic{width:15px;height:15px}
.o-time.soon{color:var(--warn-ink);font-weight:600}
.o-time.late{color:var(--danger);font-weight:600}
.o-chev{color:var(--muted)}
.o-time.todo{color:var(--primary-ink);font-weight:600}
.o-time-sm{display:none}
@media (max-width:1100px){.o-row{grid-template-columns:56px minmax(0,1fr) auto 20px}.o-row > .o-time,.o-who{display:none}.o-time-sm{display:inline-flex}}
@media (max-width:560px){.o-row{grid-template-columns:48px minmax(0,1fr);gap:12px;padding:12px 14px}.o-row .thumb{width:48px;height:48px}.o-status{grid-column:2}.o-chev{display:none}}
/* card view */
.o-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px}
.o-card{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;text-decoration:none;color:var(--text);box-shadow:var(--shadow-sm);transition:box-shadow .2s var(--ease),transform .2s var(--ease)}
.o-card:hover{box-shadow:var(--shadow);transform:translateY(-2px);color:var(--text)}
.o-card[aria-current=true]{outline:2px solid var(--sel);outline-offset:-2px}
.o-card-img{aspect-ratio:4/3;background:#fff;border-bottom:1px solid var(--border);display:grid;place-items:center;color:var(--border-strong);padding:8px}
.o-card-img img{width:100%;height:100%;object-fit:contain}
.o-card-img .ic{width:32px;height:32px}
.o-card-body{display:grid;gap:4px;padding:14px 16px 16px;min-width:0}
.o-card-body > *{min-width:0;overflow-wrap:break-word}
.o-card-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}
/* quick view panel */
.quick{position:sticky;top:24px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;max-height:calc(100vh - 48px);animation:slide-in .25s var(--ease)}
.quick-loading{height:420px}
.quick-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 12px 12px 18px;border-bottom:1px solid var(--border)}
.quick-tools{display:flex;align-items:center;gap:4px}
.quick-img{aspect-ratio:16/10;background:var(--subtle);display:grid;place-items:center;padding:10px;border-radius:var(--r);color:var(--muted);font-size:14px}
.quick-img img{max-width:100%;max-height:100%;object-fit:contain;background:#fff;border-radius:var(--r-sm)}
.quick-img span{display:grid;justify-items:center;gap:6px}
.quick-body{padding:18px;overflow-y:auto;display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.quick-body > .btn.ghost,.quick-body > .btn.quiet{justify-self:start}
.quick-body h2{font-size:18px}
.quick-body h2:focus{outline:none}
.quick-sub{font-size:13px;color:var(--muted);font-weight:600}
.quick-items{list-style:none;margin:-6px 0 0;padding:0;display:grid;gap:8px;font-size:14px}
.quick-items li{display:flex;gap:10px;align-items:baseline}
.quick-items small{display:block;color:var(--muted);font-size:13px}
@media (max-width:1179px){.quick{display:none!important}.dash-body.has-panel{grid-template-columns:1fr}}

/* Next-step box (dashboard quick view and order page) */
.next-box{display:grid;gap:8px;padding:16px;border-radius:var(--r);background:var(--subtle);border:1px solid var(--border)}
.next-box b{font-size:16px;font-weight:600}
.next-box p{font-size:14px;color:var(--text-2)}
.next-title{font-size:16px;font-weight:600}
.next-box.tone-danger .next-title{color:var(--danger-ink)}
.next-box.tone-ok .next-title{color:var(--s-green)}
.next-box .btn{margin-top:4px}
.next-box.tone-info{background:var(--primary-soft);border-color:var(--edge-blue)}
.next-box.tone-wait{background:var(--s-amber-bg);border-color:var(--edge-amber)}
.next-box.tone-danger{background:var(--danger-soft);border-color:var(--edge-red)}
.next-box.tone-danger b{color:var(--danger-ink)}
.next-box.tone-ok{background:var(--s-green-bg);border-color:var(--edge-green)}
.next-box.tone-ok b{color:var(--s-green)}

/* ---------- Order page ---------- */
.crumb{display:inline-flex;align-items:center;gap:4px;font-size:14px;font-weight:500;color:var(--text-2);text-decoration:none;margin-bottom:12px}
.crumb:hover{color:var(--primary)}
.order-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}
.order-title{min-width:0;flex:1 1 420px}
.order-title .meta{display:flex;flex-wrap:wrap;gap:2px 16px;color:var(--muted);font-size:14px;margin-top:6px}
.order-title .meta > *{white-space:nowrap}
.head-actions{display:flex;gap:8px;align-items:flex-start}
.menu-wrap{position:relative}
.menu-wrap summary{list-style:none}
.menu-wrap summary::-webkit-details-marker{display:none}
.menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:240px;padding:6px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--shadow-lg)}
.menu button,.menu a{display:flex;width:100%;align-items:center;gap:10px;padding:10px 12px;border:0;background:none;font:inherit;font-size:14px;color:var(--text);text-decoration:none;border-radius:var(--r-sm);cursor:pointer;text-align:left}
.menu button:hover,.menu a:hover{background:var(--subtle);color:var(--text)}
.menu .ic{color:var(--muted)}
@media (max-width:640px){.hide-sm{display:none}}
.note{margin-bottom:18px;max-width:80ch}
.update-slot:not(:empty){margin-bottom:16px}
.item-tabs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin;padding-bottom:4px;margin-bottom:18px;align-items:stretch}
.item-tabs [data-tab-item]{display:flex;align-items:center;gap:10px;padding:10px 16px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);font:inherit;text-align:left;cursor:pointer;color:var(--text);white-space:nowrap;box-shadow:var(--shadow-sm)}
.item-tabs [data-tab-item]:hover{border-color:var(--border-strong)}
.item-tabs [aria-pressed=true]{border-color:var(--sel);background:var(--sel-bg);box-shadow:inset 0 0 0 1px var(--sel)}
.tab-txt b{display:block;font-size:14px;font-weight:600}
.tab-txt small{display:block;font-size:12px;color:var(--muted)}
.item-tabs .add-item{align-self:stretch;border-radius:var(--r);padding:10px 16px;white-space:nowrap}
.item-view{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}
@media (max-width:1000px){.item-view{grid-template-columns:1fr}}
.viewer{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);overflow:hidden}
.viewer-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;padding:10px 10px 10px 18px;border-bottom:1px solid var(--border)}
.ver-label{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--text-2);white-space:nowrap}
.ver-label b{color:var(--text)}
.viewer-tools{display:flex;gap:2px}
.icon-btn[disabled]{opacity:.35;pointer-events:none}
.viewer-stage{background:#fff;display:grid;place-items:center;min-height:360px}
.stage-btn{border:0;padding:0;background:none;cursor:zoom-in;display:block;max-width:100%}
.viewer-stage .pin-layer img{max-height:70vh;width:auto}
.viewer-stage iframe{width:100%;height:70vh;border:0;background:#fff}
.viewer-empty{display:grid;justify-items:center;gap:10px;padding:40px 20px;color:var(--muted);text-align:center}
.viewer-empty .ic{width:36px;height:36px;color:var(--border-strong)}
.viewer-cap{padding:12px max(18px, calc(100% - 75ch)) 12px 18px;font-size:13px;color:var(--text-2);border-top:1px solid var(--border)}
.side{display:grid;gap:16px;position:sticky;top:24px}
@media (max-width:1000px){.side{position:static}}
.side > .facts{padding:4px 2px}
.side > .btn.ghost,.side > .btn.quiet{justify-self:start}
.item-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.item-acts .btn{justify-content:flex-start;min-height:36px;padding:6px 10px}
@media (max-width:640px){.item-acts .btn{min-height:44px}}
.mail-note{display:flex;gap:8px;align-items:flex-start;margin:-6px 0 18px;font-size:14px} /* LET8 */
.mail-note svg{width:18px;height:18px;flex:none;margin-top:1px;color:var(--sel)}
.news-dot{width:8px;height:8px;border-radius:50%;background:var(--primary);flex:none;margin-left:auto;align-self:flex-start} /* LET9 */
.hold-scope{border:0;padding:0;margin:0 0 16px}
.hold-scope legend{padding:0}
.reasons{display:flex;flex-wrap:wrap;gap:2px 12px;font-size:13px}
.nowrap{white-space:nowrap}
.older-more{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-top:16px}
.older-more .hint{margin:0}
.draft-offer{margin-bottom:18px}
.draft-offer p{margin:2px 0 0}
.draft-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.item-sum small.err-text{display:block}
/* M9: internal comments */
.comments{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:12px}
.comments li{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;padding:8px 10px;border-radius:var(--r)}
.comments li.is-new{background:var(--s-blue-bg)}
.c-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:0;font-size:13px}
.c-head time{color:var(--muted)}
.c-acts{display:inline-flex;gap:10px;margin-left:auto}
.c-body{margin:2px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.comment-form textarea{width:100%}
.comment-acts{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;margin-top:8px}
.comment-acts select{max-width:260px}
.c-mark{display:inline-flex;align-items:center;gap:3px;margin-left:8px;font-size:12px;font-weight:600;color:var(--sel);vertical-align:middle}
.c-mark svg{width:14px;height:14px}
.prod-table .is-coming td{color:var(--text-2)}
.prod-table .is-coming .thumb{opacity:.6}
.warn-text{color:var(--s-amber)}
.mail-fail p{margin:2px 0 0}
.approvers{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin-top:10px;font-size:14px}
.approvers .chip{padding:3px 10px;gap:6px}
.approvers .chip small{font-size:12px}
.chip-x{display:inline-grid;place-items:center;width:20px;height:20px;margin:-2px -6px -2px 0;border:0;border-radius:50%;background:none;color:var(--muted);cursor:pointer}
.chip-x:hover{background:var(--s-red-bg);color:var(--s-red)}
.chip-x svg{width:12px;height:12px}
.mail-fix{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.mail-fix input{flex:1 1 220px;max-width:320px}
.mail-err{margin:12px 18px 0}
.err-text{color:var(--s-red)}
/* folded sections */
.folds{display:grid;gap:12px;margin-top:28px}
.fold{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-sm)}
.fold > summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;font-weight:600;cursor:pointer;list-style:none}
.fold > summary::-webkit-details-marker{display:none}
.fold > summary .ic{color:var(--muted);transition:transform .2s}
.fold > summary h2{font-size:inherit;font-weight:inherit;margin-right:auto}
.fold[open] > summary .ic{transform:rotate(180deg)}
.fold-body{padding:0 20px 20px}
.fold-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.sheet .fold{box-shadow:none}
.sheet .fold > summary{padding:12px 16px}
.sheet .fold-body,.sheet details.fold > .field,.sheet details.fold > p{padding:0 16px}
.file-cols{display:grid;grid-template-columns:1fr 1fr;gap:24px}
@media (max-width:800px){.file-cols{grid-template-columns:1fr}}
.file-cols h3{font-size:14px;margin-bottom:10px}
.files{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}
.files li{display:flex;align-items:center;gap:12px}
.f-thumb{width:44px;height:44px;border-radius:var(--r-sm);border:1px solid var(--border);object-fit:contain;background:#fff;display:grid;place-items:center;color:var(--muted);flex:none}
.f-name{flex:1;min-width:0;display:grid}
.f-name a{color:var(--text);font-weight:500;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}
.f-name a:hover{text-decoration:underline}
.f-name small{color:var(--muted);font-size:12px}
.q{display:inline-flex;align-items:center;gap:3px}
.q .ic{width:14px;height:14px;vertical-align:-2px}
.q-good{color:var(--s-green)}.q-ok{color:var(--warn-ink)}.q-poor{color:var(--danger)}
.file-cols .callout{margin-bottom:12px}
.timeline{list-style:none;margin:0 0 20px;padding:0;display:grid;gap:10px;font-size:14px}
.timeline li{display:flex;gap:12px;align-items:baseline}
.sub-h{font-size:14px;margin:4px 0 10px}
.activity{list-style:none;margin:0;padding:0;font-size:14px;max-height:360px;overflow-y:auto}
.activity li{display:grid;grid-template-columns:130px 1fr;gap:12px;padding:8px 0;border-top:1px solid var(--border)}
.activity time{color:var(--muted);white-space:nowrap}
.activity b{font-weight:600}
@media (max-width:560px){.activity li{grid-template-columns:1fr;gap:0}}

/* Item form (forms.js) inside sheets and the wizard */
.product-pick select{font-weight:500}
.pick-first{display:flex;align-items:center;gap:10px;padding:16px;border:1.5px dashed var(--border-strong);border-radius:var(--r);color:var(--muted);font-size:14px}
/* Product questions: fixed groups (catalog.js GROUPS), one question per row */
.spec-group{padding-top:18px;margin-top:6px;border-top:1px solid var(--border)}
.spec-group > h4{font-size:15px;font-weight:600;color:var(--text);margin-bottom:14px}
.spec-group .field:not([hidden]){animation:rise .25s var(--ease)}
.spec-group .with-unit input{max-width:140px}
.spec-group .qty-total{max-width:160px}
.spec-extra{padding-top:18px;margin-top:6px;border-top:1px solid var(--border)}
/* In the wizard the item editor already has a divider above the first group */
.item-editor .spec-group:first-of-type{border-top:0;margin-top:0;padding-top:4px}
.spec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
.spec-grid .wide{grid-column:1/-1}
.sheet .spec-grid{grid-template-columns:1fr}
@media (max-width:640px){.spec-grid{grid-template-columns:1fr}}
.spec-grid .field:not([hidden]){animation:rise .25s var(--ease)}
.size-grid{display:grid;gap:10px}
.size-row{display:grid;grid-template-columns:64px 1fr;align-items:center;gap:10px}
.size-model{font-size:14px;font-weight:600}
.size-cells{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:6px}
.size-cell{margin:0;display:grid;gap:2px;text-align:center;font-size:12px;color:var(--muted);font-weight:500}
.size-cell input{text-align:center;padding:6px 4px;min-height:38px}
@media (max-width:480px){.size-row{grid-template-columns:1fr}}

/* ---------- Tables (purchasing, admin) ---------- */
.table{width:100%;border-collapse:collapse;font-size:14px}
.table th{text-align:left;font-weight:500;font-size:13px;color:var(--muted);padding:12px 16px;background:var(--subtle);border-bottom:1px solid var(--border);white-space:nowrap}
.table td{padding:14px 16px;border-bottom:1px solid var(--border);vertical-align:middle}
.table tr:last-child td{border-bottom:0}
.table .num{text-align:right}
.table-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);overflow-x:auto;position:relative} /* relative: hidden labels inside scroll with the table instead of widening the page */
.cell-title{display:flex;align-items:center;gap:12px;min-width:220px}
.cell-title b{display:block;font-weight:600}
.cell-title small{display:block;color:var(--muted);font-size:13px}
.qty{font-size:16px;font-weight:600}

/* ---------- Mailbox ---------- */
.mailbox{display:grid;grid-template-columns:380px minmax(0,1fr);gap:20px;align-items:start}
.mail-list{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;max-height:calc(100vh - 180px);overflow-y:auto}
.mail-row{display:grid;gap:2px;padding:14px 16px;border-bottom:1px solid var(--border);text-decoration:none;color:var(--text)}
.mail-row:hover{background:var(--subtle);color:var(--text)}
.mail-row[aria-current=true]{background:var(--sel-bg)}
.mail-row .mt{display:flex;gap:8px;font-size:13px;color:var(--muted)}
.mail-row .mt time{margin-left:auto}
.mail-row .ms{font-size:14px;font-weight:500}
.mail-view{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;display:flex;flex-direction:column;min-height:70vh}
.mail-view iframe{flex:1;border:0;width:100%;background:var(--bg);min-height:70vh}
.mail-meta{padding:12px 18px;border-bottom:1px solid var(--border);font-size:14px;display:flex;gap:12px;flex-wrap:wrap;align-items:center}
@media (max-width:900px){.mailbox{grid-template-columns:1fr}.mailbox.has-detail .mail-list{display:none}.mailbox:not(.has-detail) .mail-view{display:none}}

/* ---------- Login ---------- */
.login{min-height:100vh;display:grid;place-items:center;padding:32px 16px}
.login-card{width:min(720px,100%);padding:36px}
.login-card img{height:56px;margin-bottom:20px}
.login-card h1{margin-bottom:6px}
.login-group{margin-top:22px}
.login-group h2{font-size:13px;color:var(--muted);font-weight:600;margin-bottom:10px}
.login-users{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.login-users button{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);font:inherit;text-align:left;cursor:pointer;color:var(--text);transition:all .15s}
.login-users button:hover{border-color:var(--primary);background:var(--primary-soft)}
.login-users small{display:block;color:var(--muted);font-size:13px}

/* ---------- New order wizard ---------- */
.steps{display:flex;align-items:center;gap:12px;list-style:none;margin:0 0 28px;padding:0;counter-reset:step}
.steps li{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:500;color:var(--muted);counter-increment:step}
.steps li::before{content:counter(step);display:grid;place-items:center;width:30px;height:30px;border-radius:50%;border:1.5px solid var(--border-strong);font-weight:600;background:var(--surface)}
.steps li+li::after{content:none}
.steps .bar{flex:1;height:2px;background:var(--border);min-width:20px}
.steps li[aria-current=step]{color:var(--text);font-weight:600}
.steps li[aria-current=step]::before{border-color:var(--sel);background:var(--sel);color:#fff}
.steps li.done{color:var(--text-2)}
.steps li.done::before{border-color:var(--sel);background:var(--sel-bg);color:var(--sel)}
.wizard-card{padding:28px}
.wizard-card h2{font-size:1.125rem;margin-bottom:22px}
.wizard-card > h2 + .lead{margin-top:-18px}
.wizard-card > .lead{margin-bottom:22px}
.wizard-nav{display:flex;justify-content:space-between;gap:12px;margin-top:20px}
/* On a phone the buttons stack full width, the step forward on top within thumb reach. */
@media (max-width:640px){.wizard-nav{flex-direction:column-reverse}.wizard-nav > *,.wizard-nav .nav-end > *{width:100%}.wizard-nav .nav-end{flex-direction:column-reverse}}
.item-sum{display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);margin-bottom:10px}
.item-sum .grow{flex:1;min-width:0}
.item-sum b{font-weight:600} /* LET6: name · product type · quantity on one line */
.item-sum small{color:var(--muted);font-size:13px}
.item-sum small.deliver{display:block}
.review-grid{display:grid;gap:18px}
.review-block h3{font-size:14px;color:var(--muted);font-weight:600;margin-bottom:8px}

/* ---------- Order slip: one A4 page per item, layout on the top half ---------- */
.slip-tools{display:flex;justify-content:space-between;gap:12px;margin-bottom:20px}
.slip-page{display:flex;flex-direction:column;gap:14px;background:#fff;border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);padding:28px;margin-bottom:24px}
.slip-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:12px;border-bottom:2px solid var(--brand)}
.slip-head img{height:40px}
.slip-title{text-align:right}
.slip-title h1{font-size:1.125rem}
.slip-title span{font-size:13px;color:var(--muted)}
.slip-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:4px 18px;margin:0;font-size:13px}
.slip-meta dt{color:var(--muted);font-size:12px}.slip-meta dd{margin:0;font-weight:500}
.slip-proof{position:relative;display:grid;place-items:center;aspect-ratio:16/10;border:1px solid var(--border);border-radius:var(--r-sm);background:#fff;overflow:hidden}
.slip-proof img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.slip-name{display:flex;align-items:baseline;justify-content:space-between;gap:8px 20px;flex-wrap:wrap}
.slip-name h2{font-size:1.125rem}
.slip-name p{font-size:13px;font-weight:600}
.slip-name .ok{color:var(--s-green)}.slip-name .not{color:var(--danger-ink)}
.slip-blocks{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:18px;font-size:13px}
.slip-block h3{font-size:12px;font-weight:600;color:var(--muted);padding-bottom:4px;margin-bottom:6px;border-bottom:1px solid var(--border)}
.slip-block dl{display:grid;grid-template-columns:auto 1fr;gap:3px 10px;margin:0}
.slip-block dt{color:var(--muted)}.slip-block dd{margin:0;overflow-wrap:anywhere}
.slip-block .chips{gap:4px}.slip-block .chip{font-size:12px;padding:1px 8px 1px 3px}.slip-block .sw{width:13px;height:13px}
.slip-receive{display:flex;flex-wrap:wrap;gap:8px 28px;margin-top:auto;padding:12px 14px;border:1px solid var(--border-strong);border-radius:var(--r-sm);font-size:13px}
@media (max-width:640px){.slip-blocks{grid-auto-flow:row}.slip-page{padding:18px}}
@page{size:A4;margin:12mm}
@media print{
  .sidebar,.mobile-bar,.no-print,.skip,#toast-status,#toast-alert{display:none!important}
  .shell{display:block}
  body{background:#fff}
  .page{padding:0;max-width:none;animation:none}
  .slip-page{border:0;border-radius:0;box-shadow:none;padding:0;margin:0;height:272mm;break-after:page;break-inside:avoid}
  .slip-page:last-child{break-after:auto}
  .slip-proof{aspect-ratio:auto;height:128mm}
  .slip-blocks{grid-auto-flow:column}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Admin */
.table-card .table select{min-width:170px}
/* Wizard item editor and the optional internal section */
.item-editor{padding:20px 0 4px;border-top:1px solid var(--border);margin-bottom:14px}
.internal-fold{box-shadow:none;background:var(--subtle);margin-bottom:18px}
.internal-fold > summary{font-size:14px}
.internal-fold > summary .muted{font-weight:400;margin-right:auto}

/* Dashboard filters fold into one button on phones; the page "Ny ordre" only shows when the sidebar is hidden */
.filters{display:contents}
.filter-btn{display:none}
.filter-btn .count{min-width:20px;padding:0 6px;border-radius:999px;background:var(--sel);color:#fff;font-size:12px}
.mobile-only{display:none}
@media (max-width:900px){.mobile-only{display:inline-flex}}
@media (max-width:640px){
  .filter-btn{display:inline-flex}
  .filters{display:none;flex-basis:100%;gap:10px}
  .filters.open{display:flex}
}
/* Upload: the customer's request and a preview of the chosen file */
.callout.ask b{display:block}
.callout.ask p{margin-top:4px}
.up-preview{display:block;max-width:100%;max-height:240px;margin:12px auto 0;border:1px solid var(--border);border-radius:var(--r-sm);background:#fff}
/* New order: one item in three parts (forms.js chunk-0/1/2), shown one at a time */
.item-editor[data-sub="0"] :is(.chunk-1,.chunk-2),
.item-editor[data-sub="1"] :is(.chunk-0,.chunk-2),
.item-editor[data-sub="2"] :is(.chunk-0,.chunk-1){display:none}
.editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.substeps{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0 0 20px;padding:0}
.substeps button{display:inline-flex;align-items:center;gap:8px;font:inherit;font-size:13px;font-weight:500;padding:6px 12px 6px 6px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--text-2);cursor:pointer}
.substeps .n{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--s-grey-bg);font-weight:600;font-size:12px}
.substeps button[aria-current=step]{border-color:var(--sel);background:var(--sel-bg);color:var(--sel);font-weight:600}
.substeps button[aria-current=step] .n{background:var(--sel);color:#fff}
.substeps button:not([aria-current]):hover{border-color:var(--border-strong);color:var(--text)}
.lookup .search{display:block}
.lookup{padding-bottom:18px;border-bottom:1px solid var(--border);margin-bottom:22px}
/* Mailboks: search + filter above the list */
.mail-tools{display:grid;gap:8px;margin-bottom:4px}
.mail-tools .search{max-width:420px}
@media (max-width:900px){.page:has(.mailbox.has-detail) .mail-tools{display:none}}
/* Indkøbsliste: tick several rows, mark them ordered together */
.table .pick{width:44px;padding-right:0}
.bulk-bar{position:sticky;top:12px;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding:10px 12px 10px 18px;
  background:var(--primary-soft);border:1px solid var(--edge-blue);border-radius:var(--r);font-weight:600;color:var(--primary-ink);animation:rise .2s var(--ease)}
/* Administration: rights per user */
.rights-btn{padding-inline:10px;white-space:nowrap;min-height:34px}
.rights-state{color:var(--muted);font-weight:400}
.rights-state::before{content:"·";margin-right:6px}
.rights{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:2px}
.rights li{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}
.rights .check span{display:grid;gap:2px}
.rights small{color:var(--muted);font-size:13px}
.r-tag{flex:none;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;background:var(--s-grey-bg);color:var(--s-grey)}
.r-tag.changed{background:var(--s-amber-bg);color:var(--s-amber)}
/* Indstillinger: profile badge */
.avatar.xl{width:56px;height:56px;font-size:1.125rem}
.profile-preview{display:flex;align-items:center;gap:14px;margin-bottom:22px}
.profile-preview b{display:block;font-size:16px}
.profile-preview small{color:var(--muted)}
.ini-input{text-transform:uppercase;max-width:120px}
.swatches{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.swatches > input{position:absolute;opacity:0;width:1px;height:1px}
.swatches > label{margin:0;padding:3px;border-radius:50%;border:2px solid transparent;cursor:pointer;display:grid;place-items:center}
.swatches > input:checked + label{border-color:var(--sel)}
.swatches > input:focus-visible + label{outline:2px solid var(--primary);outline-offset:2px}
.own-color{border-radius:999px!important;display:inline-flex!important;gap:6px;padding:3px 10px 3px 3px!important;font-size:13px;font-weight:600;color:var(--text-2);border:1px solid var(--border-strong)!important}
.swatches > input:checked + .own-color{border:2px solid var(--sel)!important}
.own-color input[type=color]{width:30px;height:30px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer}

/* Administration → Produkttyper */
.t-right{text-align:right}
.pt-page{max-width:880px}
.pt-sec{margin-bottom:20px}
.pt-sec > h2{font-size:1.125rem;margin-bottom:6px}
.pt-sec > .hint{margin:0 0 16px}
.pt-group{padding-top:16px;margin-top:16px;border-top:1px solid var(--border)}
.pt-group > h3{font-size:15px;font-weight:600;margin-bottom:12px}
.pt-fields{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:10px}
.pt-fields:empty{display:none}
.pt-field{border:1px solid var(--border);border-radius:var(--r);padding:14px 14px 4px;background:var(--surface)}
.pt-row{display:grid;grid-template-columns:minmax(0,1fr) 220px auto auto;gap:12px;align-items:end}
.pt-row .field{margin-bottom:10px}
.pt-req{margin-bottom:20px;white-space:nowrap}
.pt-tools{display:flex;margin-bottom:12px}
.ic.up{transform:rotate(180deg)}
.icon-btn.kill:hover{color:var(--danger);background:var(--hover)}
.pt-cond{margin:-4px 0 10px}
.pt-more{margin:0 0 10px}
.pt-more > summary{font-size:13px;font-weight:600;color:var(--text-2);cursor:pointer;padding:4px 0;width:max-content}
.pt-more[open] > summary{margin-bottom:10px}
.pt-std .chip{padding:4px 12px;color:var(--text-2);background:var(--bg)}
.pt-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.pt-reset{margin-left:auto}
@media (max-width:720px){.pt-row{grid-template-columns:1fr auto}.pt-label,.pt-type{grid-column:1 / -1}.pt-req{margin-bottom:12px}}

/* Administration → E-mails */
.mr-group{margin-bottom:24px}
/* Same column widths in both tables, so the columns line up from table to table */
.mr-group .table{table-layout:fixed;width:100%;min-width:720px}
.mr-c-name{width:46%}.mr-c-who{width:28%}.mr-c-on{width:10%}.mr-c-edit{width:16%}
.mr-when{display:block;font-size:13px;color:var(--muted);margin-top:2px;line-height:1.4}
.mr-sub{font-size:14px;font-weight:600;margin:18px 0 10px}
.mr-list{margin:0}
.mr-people{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px 16px}
.mr-people .check{align-items:center}
.mr-extra:not(:empty){margin-bottom:10px}
.mr-days{margin:16px 0 0}
.mr-days .with-unit span{white-space:normal}
.mr-fields{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px}
.mr-field{cursor:pointer;padding:4px 10px;font-family:ui-monospace,Consolas,monospace;font-size:12px;color:var(--sel)}
.mr-field:hover{border-color:var(--sel);background:var(--sel-bg)}
.mr-lang{border:0;padding:0;margin:0 0 8px}
.mr-lang + .mr-lang{border-top:1px solid var(--border);padding-top:18px}
.mr-lang legend{font-size:15px;font-weight:600;margin-bottom:12px;padding:0}

/* Photos of the finished product (order page, side panel) */
.photo-box{border-top:1px solid var(--border);padding-top:16px;display:grid;gap:10px}
.photo-box h2{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600}
.photo-box h2 .ic{color:var(--muted)}
.photos{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px}
.photos li{position:relative}
.photo{display:block;width:100%;aspect-ratio:1;padding:0;border:1px solid var(--border);border-radius:var(--r-sm);overflow:hidden;background:var(--bg);cursor:zoom-in}
.photo img{width:100%;height:100%;object-fit:cover;display:block}
.photo:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.photo-x{position:absolute;top:4px;right:4px;width:28px;height:28px;background:rgba(255,255,255,.92);box-shadow:var(--shadow-sm)}

/* Administration → Statistik og mål */
.stats-sec{margin-bottom:32px}
.stats-sec > h2{font-size:1.125rem;font-weight:600;margin-bottom:12px}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:16px;align-items:start}
.stats-page .card h3{font-size:15px;font-weight:600;margin-bottom:14px;display:flex;gap:8px;align-items:baseline}
.stats-page .card h3 .muted{font-weight:400;font-size:13px}
.goals{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:16px}
.goal{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);padding:18px 20px;display:grid;gap:4px;align-content:start}
.goal-title{font-size:13px;color:var(--text-2);font-weight:500}
.goal-value{font-size:28px;font-weight:650;letter-spacing:-.02em;line-height:1.15;color:var(--text);font-variant-numeric:tabular-nums}
.goal.missed .goal-value{color:var(--s-red)}
.goal-target{font-size:13px;color:var(--text-2);display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.goal-flag{font-size:12px;font-weight:600;padding:1px 8px;border-radius:999px;background:var(--s-grey-bg);color:var(--s-grey)}
.goal.met .goal-flag{background:var(--s-green-bg);color:var(--s-green)}
.goal.missed .goal-flag{background:var(--s-red-bg);color:var(--s-red)}
.goal-note{font-size:12px;color:var(--muted)}
.stack{display:flex;height:14px;border-radius:999px;overflow:hidden;background:var(--s-grey-bg);gap:2px}
.stack-seg{display:block;height:100%}
.sg-awaiting_layout,.sg-sample_needed{background:var(--dot-grey)}.sg-layout_ready,.sg-sample_ready{background:var(--sel)}.sg-with_customer,.sg-sample_with_customer{background:var(--dot-amber)}
.sg-rejected,.sg-sample_rejected{background:var(--dot-red)}.sg-approved{background:var(--dot-green)}.sg-ordered,.sg-in_production{background:var(--dot-done)}
.legend{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px 16px;font-size:13.5px;color:var(--text-2)}
.legend li{display:flex;align-items:center;gap:8px}
.legend b{margin-left:auto;color:var(--text);font-variant-numeric:tabular-nums}
.legend.inline{display:flex;gap:18px;margin:0 0 14px}
.legend.inline b{margin:0}
.meter-list{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.meter-list li{display:grid;grid-template-columns:minmax(150px,1.2fr) 2fr 32px;align-items:center;gap:12px;font-size:13.5px;color:var(--text-2)}
.meter-list b{text-align:right;color:var(--text);font-variant-numeric:tabular-nums}
.meter{height:10px;border-radius:999px;background:var(--s-grey-bg);overflow:hidden}
.meter-fill{display:block;height:100%;border-radius:999px}
.t-red{background:var(--dot-red)}.t-amber{background:var(--dot-amber)}.t-green{background:var(--dot-green)}.t-grey{background:var(--dot-grey)}
.key{width:10px;height:10px;border-radius:50%;display:inline-block}
.k-orders{background:var(--sel)}.k-approved{background:var(--dot-green)}
.weeks{display:grid;grid-template-columns:repeat(12,1fr);gap:6px;align-items:end;height:200px;border-bottom:1px solid var(--border);margin-bottom:28px}
.week{display:flex;flex-direction:column;height:100%;position:relative}
.week-bars{flex:1;display:flex;align-items:flex-end;justify-content:center;gap:3px}
.week-bars .bar{width:min(18px,40%);border-radius:4px 4px 0 0;position:relative;min-height:0}
.week-bars .bar i{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-style:normal;font-size:12px;font-weight:600;color:var(--text-2);padding-bottom:2px;font-variant-numeric:tabular-nums}
.week-label{position:absolute;top:100%;left:0;right:0;text-align:center;font-size:12px;color:var(--muted);padding-top:6px;white-space:nowrap}
.stats-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.stats-table th.num{text-align:right;white-space:normal;line-height:1.3;max-width:96px}
.inline-bar{display:inline-block;vertical-align:middle;width:110px;height:8px;border-radius:999px;background:var(--s-grey-bg);overflow:hidden;margin-right:10px}
.inline-bar span{display:block;height:100%;background:var(--sel);border-radius:999px}
.num-after{font-variant-numeric:tabular-nums}
@media (max-width:640px){.weeks{gap:2px}.week-label{font-size:12px;transform:rotate(-40deg);transform-origin:top left;left:30%}.meter-list li{grid-template-columns:1fr 1fr 28px}}

/* "Fremstil fysisk prøve" on the item form */
.sample-check span{display:grid;gap:2px}
.sample-check small{font-size:13px;color:var(--muted)}

/* Product-type editor: standard questions under each section */
.pt-lib{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.pt-std-add{cursor:pointer;padding:5px 12px 5px 8px;font-size:13px;font-weight:500;color:var(--sel);background:var(--surface)}
.pt-std-add:hover:not(:disabled){border-color:var(--sel);background:var(--sel-bg)}
.pt-std-add:disabled{color:var(--muted);background:var(--bg);cursor:default;text-decoration:line-through;opacity:.7}
.pt-std-add .ic{width:14px;height:14px}
.pt-own{margin-left:4px}
.pt-label label .r-tag{margin-left:4px;font-size:12px;padding:1px 7px}

.pt-usage{margin-bottom:20px}

/* Administration → Brugere: phone column */
.phone-input{width:150px;min-height:36px;padding:6px 10px;font-size:14px}

/* Quick view: "Tag opgaven" next to an unassigned item */
.quick-items li{align-items:center}
.quick-take{margin-left:auto;min-height:32px;padding:4px 10px;font-size:13px}
/* LET12: "Ingen fil" - the whole line is a large click target */
.check.no-file{align-items:center;min-height:44px;padding:8px 12px;margin-top:8px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface)}
.check.no-file:hover{border-color:var(--sel);background:var(--sel-bg)}
.check.no-file input{width:20px;height:20px;margin:0}
.check.no-file:has(input:checked){border-color:var(--sel);background:var(--sel-bg)}
/* LET16 */
.answered-line{display:flex;gap:8px;align-items:center;margin:8px 0 0;font-size:14px;color:var(--text-2)}
.answered-line svg{width:16px;height:16px;color:var(--sel);flex:none}
.answered-tag{display:block;font-size:12px;color:var(--muted);margin-top:4px;white-space:nowrap}
.o-card-status .answered-tag{display:inline;margin:0}
/* MID2: searching shows one list; the tabs step back */
#tabs.is-searching button{opacity:.45;cursor:default}
.search-count{align-self:center;font-weight:600;font-size:14px;margin-right:12px}
/* MID3: a question that appears gets a short highlight */
@keyframes just-shown{from{background:var(--sel-bg)}to{background:transparent}}
@media (prefers-reduced-motion:no-preference){.field.just-shown{animation:just-shown 1.2s ease-out;border-radius:var(--r-sm)}}
/* MID7: the page on its way */
#app.is-loading{pointer-events:none}
.skel-page{display:grid;gap:14px}
.skel{border-radius:var(--r);background:linear-gradient(90deg,var(--subtle),var(--surface),var(--subtle));background-size:200% 100%}
@media (prefers-reduced-motion:no-preference){.skel{animation:sk 1.2s linear infinite}}
@keyframes sk{to{background-position:-200% 0}}
.skel-title{height:34px;width:240px}
.skel-lead{height:18px;width:360px;max-width:80%;margin-bottom:12px}
.skel-row{height:64px}
/* MID9: colleague suggestions under the comment box */
.mention-wrap{position:relative}
.mention-list{position:absolute;left:0;top:100%;z-index:20;margin:4px 0 0;padding:4px;list-style:none;min-width:260px;max-width:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:0 12px 24px -8px rgba(16,24,40,.2)}
.mention-list li{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--r-sm);cursor:pointer;font-size:14px}
.mention-list li small{display:block;color:var(--muted);font-size:12px}
.mention-list li[aria-selected=true],.mention-list li:hover{background:var(--sel-bg)}
/* MID10: product type suggestions */
.pick-list{width:100%;max-height:300px;overflow:auto}
.pick-list li{justify-content:space-between}
.pick-list li small{display:inline;color:var(--muted);font-size:12px}
/* MID12: "Send en mail" is a choice in the hold dialogs */
.check.mail-note{margin:0 0 18px;align-items:center}
.check.mail-note > span svg{display:inline-block;vertical-align:-4px;margin-right:6px}
/* MID13: "Åbn ordre" stands out in the quick view */
.quick-open{min-height:42px;padding-inline:18px;font-weight:600}

/* KOM2: tabs that scroll sideways get an arrow; Ny ordre shows "Trin 2 af 3" on a phone. */
.scroll-wrap{position:relative;min-width:0} /* never widen a grid or flex parent */
.scroll-more{position:absolute;right:0;top:0;bottom:0;width:44px;border:0;padding:0;background:linear-gradient(90deg,transparent,var(--bg) 45%);color:var(--text);display:grid;place-items:center;cursor:pointer}
.scroll-more[hidden]{display:none}
.steps-sm{display:none}
@media (max-width:640px){
  .steps{display:none}
  .steps-sm{display:block;margin:0 0 20px;font-size:14px;color:var(--text-2)}
  .steps-sm b{color:var(--text)}
  .steps-track{display:block;height:4px;margin-top:8px;border-radius:999px;background:var(--border)}
  .steps-track span{display:block;height:100%;border-radius:inherit;background:var(--sel)}
  .tabs button,.tabs a{min-height:44px}
}
.wizard-nav .nav-end{display:flex;gap:12px;flex-wrap:wrap;justify-content:flex-end}

/* KOM4: Haster */
/* A soft tint like every other pill; the clock (not a second red) tells it apart from "Ændringer ønsket". */
.pill.urgent{background:var(--danger-soft);color:var(--danger);font-weight:600;gap:5px}
.pill.urgent::before{display:none}
.pill.urgent .ic{width:14px;height:14px}
.urgent-txt{color:var(--danger);font-weight:600}
.urgent-box{margin-bottom:14px}
.o-status .pill.urgent{margin-right:6px}

/* A 44px tap area for the inline "Tilføj godkender" link without moving the line. */
/* "Tilføj …" takes the shape of what it adds: a pill beside the approver chips, a tile beside the item tabs. */
.approvers .add-approver{min-height:0;padding:3px 12px 3px 8px;gap:6px;border-radius:999px;font-size:13px}
.approvers .add-approver .ic{width:14px;height:14px}

/* A failed mail is trouble, not work: its count in the sidebar is red, not the navy of the work counts. */
.sb-nav .count.alarm{background:var(--danger);color:#fff}

/* "Tidligere kunde": the no-match line is information, not a choice. */
.lookup .mention-list li.none{cursor:default;color:var(--muted)}
.lookup .mention-list li.none:hover{background:none}
.lookup .mention-list li{flex-direction:column;align-items:flex-start;gap:0}

/* The offer to move the delivery date sits between the date and the reason. */
.urgent-move{margin:4px 0 0}
.urgent-move.off{color:var(--muted)}

/* Mailboks: whether a customer code still works. */
.mail-row .pill{padding:2px 8px;font-size:12px;margin-left:4px;vertical-align:1px}
.pill.code-ok{background:var(--s-green-bg);color:var(--s-green)}
.pill.code-off{background:var(--s-grey-bg);color:var(--s-grey)}

/* Overblik: one click opens the order; the eye button opens the quick view. It takes the chevron's place on wide screens. */
.o-peek{display:none;position:absolute;width:34px;height:34px;min-height:0;color:var(--muted)}
.o-peek[aria-pressed=true]{color:var(--sel);background:var(--sel-bg)}
@media (min-width:1180px){
  .o-peek{display:grid}
  .o-item > .o-row{padding-right:56px}
  .o-item > .o-row .o-chev{display:none}
  .o-row + .o-peek{right:14px;top:50%;transform:translateY(-50%)}
  .o-card + .o-peek{right:10px;top:10px;background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-sm)}
  .dash-body.has-panel .o-row{grid-template-columns:56px minmax(0,1fr) auto}
  .dash-body.has-panel .o-row > .o-time,.dash-body.has-panel .o-who{display:none}
  .dash-body.has-panel .o-time-sm{display:inline-flex}
}

/* The mail choice sits last, right above the buttons, separated so it is seen before pressing. */
.sheet-body > .check.mail-note:last-child{margin:4px 0 0;padding-top:14px;border-top:1px solid var(--border)}

/* K-48 Genbestil: the customer's earlier orders under "Tidligere kunde", and the reorder dialog's item rows. */
.reorder-list{margin-top:14px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--r);background:var(--subtle)}
.reorder-list ul{list-style:none;margin:6px 0 0;padding:0;max-height:260px;overflow:auto;display:grid;gap:8px}
.reorder-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px}
.reorder-list li small{color:var(--text-2)}
.reorder-items{border:0;padding:0;margin:0 0 16px}
.reorder-items legend{padding:0}
.reorder-row{display:flex;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid var(--border)}
.reorder-row .check{flex:1;margin:0}
.reorder-row input[type=number]{width:96px;min-height:38px}

/* Overblik: "Ryd filtrering" top right, greyed out when nothing is filtered. */
.head-tools{display:flex;align-items:center;gap:16px}
#clearFilters{font-weight:500}
#clearFilters:disabled{color:var(--muted);cursor:default;text-decoration:none;opacity:.7}

/* Produktion and Indkøb: the action button in a fixed slot, the two downloads stacked beside it, so every row lines up and the column stays narrow. */
.prod-acts{display:grid;grid-template-columns:var(--act-w,108px) auto;align-items:center;gap:8px;white-space:nowrap;text-align:left}
.pur-acts{--act-w:auto} /* Indkøb: most items have no production file, so no "Ingen …" text there */
.prod-acts>.act-main{grid-column:1;justify-content:center}
.dl-stack{grid-column:2;display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.dl-stack .sm-btn{min-height:28px;padding:3px 8px;font-size:13px}
.dl-stack .sm-btn .ic{width:15px;height:15px}

/* Trykfiler: chosen at "Send til produktion", fetched in the production queue next to the approved layout. */
.print-pick{border:0;padding:0;margin:16px 0 0;display:grid;gap:8px}
.print-pick legend{padding:0;margin-bottom:6px}
.print-have{list-style:none;margin:0;padding:0;display:grid;gap:4px;font-size:14px}
.print-have li{display:flex;align-items:center;gap:6px}
.sm-btn{min-height:36px;padding:6px 10px;font-weight:500}
.prod-acts .menu-wrap .menu{right:0}
.file-none{padding:3px 8px;white-space:normal;line-height:1.25}

/* Produktion: sortable column headers. */
.th-sort{display:inline-flex;align-items:center;gap:4px;border:0;background:none;padding:0;font:inherit;color:inherit;cursor:pointer;text-transform:inherit;letter-spacing:inherit}
.th-sort:hover{color:var(--text)}
.th-sort.on{color:var(--text);font-weight:600}
.th-sort .th-arrow{width:14px;height:14px;opacity:0;transition:transform .15s}
.th-sort .th-arrow.up{transform:rotate(180deg)}
.th-sort.on .th-arrow{opacity:1}
.th-sort:hover .th-arrow{opacity:.5}
.th-sort.on:hover .th-arrow{opacity:1}
th.num .th-sort{flex-direction:row-reverse}

/* Produktion: every row the same height, so the list reads like a schedule. Long text is cut with "…" (full text on hover). */
.prod-table{table-layout:fixed;min-width:940px} /* fits 1280px laptops; narrower screens scroll the table, not the page */
.prod-table .c-cust{width:13%}.prod-table .c-qty{width:80px}.prod-table .c-due{width:108px}.prod-table .c-status{width:168px}.prod-table .c-do{width:270px}
.prod-table td{height:84px;padding-top:10px;padding-bottom:10px}
.prod-table .cell-title{min-width:0}
.prod-table .cell-title .thumb{flex:none;width:44px;height:44px}
.prod-table .cell-text{min-width:0;flex:1}
.prod-table .cell-text small,.prod-table .one-line{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.prod-table .cell-text b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.3} /* the item name gets two lines before it is cut */
.prod-table .clamp2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.prod-table td:nth-child(4) .small{white-space:nowrap}
.prod-table .one-line{margin-top:4px}

/* Produktion and Indkøb: the order number leads the small line; it is what they look up. */
.ord-no{font-weight:600;color:var(--text-2)} /* order number first and bold: Overblik, Indkøb, Produktion */
.cell-text small .ord-no{display:inline;white-space:nowrap}

/* Indkøbsliste: fixed columns so it fits a 1280px laptop; the item name takes what is left and wraps. */
.pur-table{table-layout:fixed;min-width:900px}
.pur-table th.pick{width:44px}.pur-table .w-cust{width:12%}.pur-table .w-qty{width:76px}.pur-table .w-po{width:132px}.pur-table .w-date{width:114px}.pur-table .w-acts{width:304px}
.pur-table td:last-child,.pur-table th:last-child{padding-left:12px;padding-right:12px}
.pur-table .cell-title{min-width:0}
.pur-table .cell-title .thumb{flex:none}
.pur-table .cell-text{min-width:0}
.pur-table .cell-text b{hyphens:auto}

/* Next-step box: the item's colours, size and quantity right above "Send til kunden", to hold against the proof. */
.send-check{display:grid;gap:6px;margin:2px 0 4px}
.send-check p{margin:0}
.send-check .chips{margin:0}

/* Produkttype: "Kalenderdage | Hverdage" under the production time. */
.pt-days-unit{margin-top:8px}
.list-note{margin:10px 4px 0}

/* Leverandører (owner, 13 Oct) */
.mention-list li.none{cursor:default;color:var(--muted)}
.mention-list li.none:hover{background:none}
.sup-list li{flex-direction:column;align-items:flex-start;gap:0}
.sup-list li.act{color:var(--primary-ink);font-weight:600}
.sup-table tr.is-off td{color:var(--muted)}
.sup-lead{display:flex;gap:8px;align-items:center}
.sup-lead input{max-width:110px}
.sup-lead select{width:auto}
.sup-sub{margin:22px 0 4px}
.sup-fields{margin:4px 0 16px}
.sup-fields ul{margin:0;padding:0 0 0 18px;font-size:14px;line-height:1.7}
.sup-fields code{font-size:13px;background:var(--subtle);border:1px solid var(--border);border-radius:4px;padding:0 4px}
