/* Deliveries: project row, full-screen checklist, box checks and dialogs. */
.dl-shelf { margin: 0; border-top: 1px solid #e9e7e1; }
.dl-shelf[hidden], .dl-screen [hidden], .dl-dialog [hidden] { display: none !important; }
.dl-shelf-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 12px 0; border: 0; background: none; color: inherit; font: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.dl-shelf-status { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 0; color: #73766e; font-weight: 500; text-align: right; }
.dl-shelf-status em { font-style: normal; font-weight: 700; color: #a72f3a; }
.dl-shelf-text { display: inline; }
.dl-shelf-chevron { margin-left: 8px; font-size: 20px; line-height: 1; color: #73766e; }
.dl-shelf-button:focus-visible { outline: 3px solid #356da4; outline-offset: 3px; border-radius: 6px; }

html.dl-open { overflow: hidden; }
.dl-screen { position: fixed; inset: 0; box-sizing: border-box; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--paper, #f1efeb); color: var(--ink, #171717); overflow: hidden; }
.dl-screen[open] { display: flex; flex-direction: column; }
.dl-screen::backdrop { background: var(--paper, #f1efeb); }
.dl-screen *, .dl-dialog * { box-sizing: border-box; }
.dl-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); background: #fff; border-bottom: 1px solid var(--line, #ddd8d1); }
.dl-back { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--ink, #171717); font: inherit; font-size: 1rem; font-weight: 800; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.dl-title { margin: 0; font: 700 1.6rem/1.15 Georgia, serif; overflow-wrap: anywhere; }
.dl-head .dl-title { font-size: 1.45rem; }
.dl-pill { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line, #ddd8d1); border-radius: 999px; background: #fff; color: var(--ink, #171717); font: inherit; font-weight: 800; cursor: pointer; }
.dl-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 14px; padding: 16px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); }
.dl-heading { display: grid; gap: 4px; }
.dl-sub { margin: 0; color: var(--muted, #686868); font-size: .9rem; line-height: 1.45; }
.dl-notice { margin: 0; padding: 10px 12px; border-radius: 12px; background: #e3f1ea; color: #1f5a47; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.dl-notice.dl-error { background: #fae6e2; }
.dl-error { color: #a22a3e !important; }
.dl-section { display: grid; gap: 8px; }
.dl-group { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.dl-group h3 { margin: 0; font: 700 1.25rem/1.2 Georgia, serif; }
.dl-group span { color: var(--muted, #686868); font-weight: 700; font-size: .86rem; }
.dl-here > summary { list-style: none; cursor: pointer; padding: 4px 0 8px; }
.dl-here > summary::-webkit-details-marker { display: none; }
.dl-here > summary h3::after { content: " ›"; color: var(--muted, #686868); }
.dl-here[open] > summary h3::after { content: " ⌄"; }
.dl-list { display: grid; gap: 8px; }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 12px 14px; border: 1px solid var(--line, #ddd8d1); border-radius: 14px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dl-row:focus-visible, .dl-button:focus-visible, .dl-dock-button:focus-visible, .dl-pill:focus-visible, .dl-back:focus-visible, .dl-text-button:focus-visible, .dl-step-button:focus-visible { outline: 3px solid #356da4; outline-offset: 2px; }
.dl-box-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
.dl-row-copy { min-width: 0; display: block; }
.dl-row strong, .dl-sheet strong { display: block; font-size: .98rem; line-height: 1.3; overflow-wrap: anywhere; }
.dl-row small, .dl-sheet small { display: block; margin-top: 2px; color: var(--muted, #686868); font-size: .84rem; line-height: 1.35; overflow-wrap: anywhere; }
.dl-thumb { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; background: var(--photo-mat, #e8e6e1); }
/* Spec sheet pictures are product shots on white, so they are shown whole. */
.dl-pic { display: block; width: 48px; height: 48px; border-radius: 9px; object-fit: contain; background: #fff; border: 1px solid #ece9e3; }
.dl-pic-none { background: #f6f4f0; border-color: #f0ede8; }
.dl-pic-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
.dl-pic-large { width: 76px; height: 76px; flex: none; }
.dl-tag { justify-self: end; max-width: 9.5rem; padding: 5px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.dl-tag.here { color: #1f5a47; background: #e3f1ea; }
.dl-tag.part { color: #7a4c12; background: #fdf0d9; }
.dl-tag.miss { color: #842a22; background: #fae6e2; }
.dl-tag.none { color: #5c5752; background: #efece8; }
.dl-empty { margin: 8px 0 0; color: var(--muted, #686868); line-height: 1.5; }
.dl-empty-action { justify-self: start; }
.dl-dock { flex: none; display: flex; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: var(--paper, #f1efeb); border-top: 1px solid var(--line, #ddd8d1); }
.dl-dock-button { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 10px; min-width: 0; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line, #ddd8d1); border-radius: 18px; background: #fff; color: var(--ink, #171717); font: inherit; font-weight: 800; font-size: 1.02rem; line-height: 1.2; text-align: center; cursor: pointer; box-shadow: var(--shadow, 0 8px 28px rgba(0, 0, 0, .08)); }
.dl-dock-button.dl-main { flex: 1.5; border-color: var(--accent, #c83e49); background: var(--accent, #c83e49); color: #fff; }
.dl-dock-button:disabled { opacity: .55; cursor: default; }
.dl-dock-button .photo-camera-icon { transform: scale(1.15); margin: 0 2px; }
.dl-main .photo-camera-icon, .dl-main .photo-camera-icon::after { border-color: #fff; }
.dl-main .photo-camera-icon::before { background: #fff; }
.dl-camera-input { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -100px; }

.dl-check { gap: 12px; }
.dl-photo { display: block; width: 100%; max-height: 42vh; max-height: 42dvh; object-fit: contain; border-radius: 14px; border: 1px solid var(--line, #ddd8d1); background: var(--photo-mat, #e8e6e1); }
.dl-read { margin: 0; color: var(--muted, #686868); font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; }
.dl-read b { color: var(--ink, #171717); }
.dl-match-status { margin: 0; font-weight: 800; }
.dl-match { display: grid; gap: 10px; padding: 16px; border: 2px solid var(--live, #29715b); border-radius: 16px; background: #fff; }
.dl-match-empty { border-color: var(--line, #ddd8d1); }
.dl-match-head { display: flex; align-items: flex-start; gap: 12px; }
.dl-match-copy { display: grid; gap: 6px; min-width: 0; }
.dl-eyebrow { margin: 0; color: var(--live, #29715b); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; overflow-wrap: anywhere; }
.dl-match h4 { margin: 0; font: 700 1.2rem/1.25 Georgia, serif; overflow-wrap: anywhere; }
.dl-match p { margin: 0; color: var(--muted, #686868); font-size: .9rem; line-height: 1.4; }
.dl-step { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 12px; padding-top: 10px; border-top: 1px solid var(--line, #ddd8d1); }
.dl-step b { font-size: 1rem; }
.dl-step-label { display: grid; gap: 2px; }
.dl-step-label small { color: #626860; font-size: .86rem; font-weight: 500; }
.dl-stepper { display: flex; align-items: center; gap: 4px; }
.dl-step-value, .dl-stepper-value { min-width: 52px; text-align: center; font-weight: 800; font-size: 1.1rem; }
.dl-step-button { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 1px solid var(--line, #ddd8d1); border-radius: 12px; background: #fff; color: var(--ink, #171717); font: inherit; font-weight: 800; font-size: 1.3rem; cursor: pointer; }
.dl-step-button:disabled { opacity: .4; cursor: default; }
.dl-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fdf0d9; color: #6b430f; font-size: .88rem; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.dl-text-button { justify-self: start; min-height: 44px; padding: 8px 2px; border: 0; background: none; color: #9c3041; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.dl-dialog { box-sizing: border-box; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0 0 max(16px, env(safe-area-inset-bottom)); border: 1px solid #d8d4cd; border-radius: 18px; background: #fffefa; color: #252a28; box-shadow: 0 20px 80px #18201840; overflow: auto; overscroll-behavior: contain; }
.dl-dialog::backdrop { background: #18201866; }
.dl-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 18px 10px; background: #fffefa; }
.dl-dialog-head h2 { margin: 6px 0 0; font: 700 1.25rem/1.25 Georgia, serif; overflow-wrap: anywhere; }
.dl-dialog > :not(.dl-dialog-head) { margin-left: 18px; margin-right: 18px; }
.dl-dialog > .dl-photo { width: calc(100% - 36px); }
.dl-sheet-picture { display: block; width: 132px; height: 132px; margin-top: 2px; margin-bottom: 4px; border-radius: 12px; border: 1px solid #ece9e3; background: #fff; object-fit: contain; }
.dl-checked { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #ede9e1; }
.dl-checked .dl-field-label { margin: 0; }
.dl-checked-list { display: grid; gap: 8px; }
.dl-checked-box { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 4px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dl-checked-box small { min-width: 0; color: #4d514b; font-size: .88rem; line-height: 1.35; overflow-wrap: anywhere; }
.dl-checked-box .dl-thumb { flex: none; }
.dl-checked-box:focus-visible { outline: 3px solid #356da4; outline-offset: 2px; }
.dl-dialog-meta { margin: 6px 0; color: #626860; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.dl-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; border: 1px solid #d8d4cd; border-radius: 10px; background: #fffefa; color: #3b413c; font: inherit; font-size: .92rem; font-weight: 700; line-height: 1.25; text-align: center; cursor: pointer; }
.dl-button:disabled { opacity: .55; cursor: default; }
.dl-primary, .dl-primary:hover { background: #ad3547; border-color: #ad3547; color: #fff; }
.dl-close { flex: none; }
.dl-form { display: grid; gap: 12px; margin-top: 8px; }
.dl-field { display: grid; gap: 6px; font-size: .9rem; font-weight: 700; }
.dl-field small { color: #626860; font-weight: 500; }
.dl-field-label { margin: 4px 0 0; font-size: .9rem; font-weight: 700; }
.dl-field input, .dl-field textarea, .dl-search, .dl-edit input, .dl-edit textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid #b9bdb6; border-radius: 9px; background: #fff; color: #252a28; font: inherit; font-size: 16px; }
.dl-field textarea { resize: vertical; }
.dl-checkbox { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 600; }
.dl-checkbox input { width: 20px; height: 20px; }
.dl-segment { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-segment .dl-button { flex: 1 1 8rem; }
.dl-segment [aria-pressed=true] { color: #9c3041; border-color: #b53c50; background: #fdf0f0; }
.dl-problem-block .dl-tag { justify-self: start; }
.dl-problem-block { display: grid; justify-items: start; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #ede9e1; }
.dl-inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dl-manage { margin-top: 14px; padding-top: 14px; border-top: 1px solid #ede9e1; }
.dl-dialog-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.dl-form-status { min-height: 1em; margin: 8px 0 0; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.dl-candidate { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #ede9e1; }
.dl-candidate span { min-width: 0; overflow-wrap: anywhere; }
.dl-search-row { margin-top: 4px; margin-bottom: 10px; }
.dl-search { display: block; margin: 0; }
.dl-pick-list { max-height: 55vh; max-height: 55dvh; overflow: auto; }
.dl-sheets { display: grid; gap: 8px; }
/* The sheet's name keeps room for whole words: beside Open PDF and Discard on a
   small phone the buttons wrap first, so "Lighting scan" never reads "Lightin / g scan". */
.dl-sheet { display: grid; grid-template-columns: minmax(min(10rem, 100%), 1fr) auto; align-items: start; gap: 8px 12px; padding: 12px 0; border-top: 1px solid #ede9e1; }
.dl-sheet .dl-inline-actions { justify-content: flex-end; }
.dl-sheets-heading { margin: 12px 0 0; font: 700 1rem/1.3 Georgia, serif; }
.dl-sheet .dl-sheet-note { grid-column: 1 / -1; margin-top: -4px; }
.dl-sheet .dl-sheet-changed { color: #9c3041; font-weight: 700; }
.dl-sheet .dl-sheet-update { grid-column: 1 / -1; justify-self: start; }
.dl-sheet .dl-sheet-again { grid-column: 1 / -1; justify-self: start; margin-top: -12px; padding: 0; border: 0; background: none; font-family: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.dl-pending { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; border: 1px solid #ede9e1; border-radius: 12px; background: #fff; }
.dl-pending p { margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
.dl-choices { display: grid; gap: 8px; margin-top: 12px; }
.dl-choices .dl-button { width: 100%; text-align: left; white-space: normal; }
.dl-busy { display: inline-flex; align-items: center; gap: 7px; }
.dl-spinner { flex: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; opacity: .7; animation: dl-spin .9s linear infinite; }
@keyframes dl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dl-spinner { animation: dl-pulse 1.6s ease-in-out infinite; border-right-color: currentColor; } }
@keyframes dl-pulse { 50% { opacity: .25; } }
.dl-sheet-upload { display: grid; justify-items: start; gap: 2px; padding: 4px 0 8px; }
.dl-link { display: inline-flex; align-items: center; min-height: 44px; color: #9c3041; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.dl-review { gap: 12px; }
.dl-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line, #ddd8d1); border-radius: 14px; background: #fff; }
.dl-file .dl-row-copy { display: grid; gap: 2px; }
.dl-file strong { overflow-wrap: anywhere; }
.dl-file small { color: var(--muted, #686868); font-size: .86rem; }
.dl-file-badge { flex: none; display: grid; place-items: center; width: 40px; height: 46px; border-radius: 8px; background: #f5f3ef; color: #6b6e66; font-size: .78rem; font-weight: 800; }
.dl-edit { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; align-items: start; padding: 10px 12px; border: 1px solid var(--line, #ddd8d1); border-radius: 14px; background: #fff; }
.dl-edit .dl-grow { display: block; resize: none; overflow: hidden; line-height: 1.35; }
.dl-edit.has-picture { grid-template-columns: 48px minmax(0, 1fr) 72px; }
.dl-edit-pic { grid-row: span 2; }
.dl-edit .dl-edit-name { font-weight: 700; }
.dl-edit-details { grid-column: 1 / -1; margin: 0; color: #626860; font-size: .84rem; line-height: 1.4; overflow-wrap: anywhere; }
.dl-edit .dl-number { text-align: center; font-weight: 800; padding: 10px 4px; appearance: textfield; -moz-appearance: textfield; }
/* Without the spinner a count like 122.45 fits the box. */
.dl-number::-webkit-inner-spin-button, .dl-number::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dl-edit .dl-edit-room { min-height: 40px; color: #4d514b; font-size: 15px; }
.dl-edit-remove { justify-self: center; min-height: 40px; font-size: .86rem; }
.dl-edit.flag .dl-number { border-color: #c98a2b; background: #fdf0d9; }
.dl-edit.is-removed { opacity: .5; }
.dl-edit.is-removed .dl-edit-name { text-decoration: line-through; }
.dl-flag { grid-column: 1 / -1; margin: 0; color: #7a4c12; font-size: .84rem; font-weight: 700; line-height: 1.4; }
.dl-flag .dl-text-button { min-height: 32px; padding: 0 2px; font-size: .84rem; }
.dl-private { margin: 0; color: var(--muted, #686868); font-size: .84rem; line-height: 1.45; }

@media (max-width: 380px) {
  .dl-dock-button { font-size: .94rem; gap: 8px; padding: 8px; }
  .dl-tag { max-width: 7.5rem; }
  /* The tag goes under the name so long product names keep whole words beside the picture. */
  .dl-pic-row, .dl-box-row { grid-template-columns: 48px minmax(0, 1fr); row-gap: 6px; }
  .dl-pic-row > :first-child, .dl-box-row > :first-child { grid-row: span 2; }
  .dl-pic-row > :last-child, .dl-box-row > :last-child { grid-column: 2; justify-self: start; max-width: 100%; }
  .dl-pic-row > :last-child:empty { display: none; }
  .dl-edit.has-picture { grid-template-columns: 40px minmax(0, 1fr) 72px; }
  .dl-edit .dl-edit-pic { width: 40px; height: 40px; }
}
/* On wide screens the screen keeps a readable column instead of stretching edge to edge. */
@media (min-width: 840px) {
  .dl-head, .dl-body, .dl-dock { padding-left: calc((100% - 760px) / 2); padding-right: calc((100% - 760px) / 2); }
}
@media print { .dl-shelf, .dl-screen, .dl-dialog { display: none !important; } }
