/* Compact retained delivery register. Uses the user's workspace appearance. */
.deliveries-project{color:var(--ink);font:13px/1.45 system-ui,sans-serif;padding:18px 0 28px;width:100%;min-width:0}
.dl-header,.dl-actions,.dl-tabs,.dl-dialog-head,.dl-ticket-title,.dl-file-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.dl-header{justify-content:space-between;margin-bottom:14px}.dl-header h1{font-size:18px;margin:0;border-left:5px solid var(--accent);padding-left:10px}
.deliveries-project button{font:650 12px/1.35 system-ui,sans-serif;border:1px solid var(--line-strong);border-radius:7px;padding:7px 11px;min-height:33px;color:var(--ink);background:var(--surface);cursor:pointer;box-shadow:none;transition:none}
.deliveries-project button:hover{background:var(--hover)}.deliveries-project button:disabled{opacity:.45;cursor:default}.deliveries-project button.primary{color:#fff;background:var(--accent);border-color:var(--accent)}
.deliveries-project button:focus-visible,.deliveries-project input:focus-visible,.deliveries-project textarea:focus-visible,.deliveries-project select:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.dl-tabs{margin-bottom:12px}.dl-tabs .selected{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-dark)}.dl-tabs input{flex:1 1 250px;min-width:200px}
.deliveries-project input,.deliveries-project textarea,.deliveries-project select{box-sizing:border-box;color:var(--ink);background:var(--input);border:1px solid var(--line-strong);border-radius:6px;padding:8px 9px;font:400 13px/1.4 system-ui,sans-serif;max-width:100%;min-width:0}
.dl-status:empty{display:none}.dl-status,.dl-notice,.dl-warning,.dl-recovery{padding:10px 12px;border:1px solid var(--warning-line);background:var(--warning-bg);color:var(--warning);border-radius:7px;overflow-wrap:anywhere}.dl-warning{font-weight:600}.dl-success{color:var(--success);padding:8px 0}.dl-help{color:var(--muted);font-size:12px;margin:6px 0;line-height:1.5}
.dl-body{padding:0}.dl-ticket-row{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--line);background:var(--panel);border-radius:10px;margin:8px 0}.dl-ticket-info{flex:1;min-width:0}.dl-ticket-icon{width:60px;height:70px;font-size:24px!important;display:flex;align-items:center;justify-content:center;flex-direction:column}.dl-ticket-icon small{font-size:9px}.dl-ticket-icon img,.dl-ticket-icon canvas{width:56px;height:65px;object-fit:cover;border-radius:5px}.dl-ticket-title{gap:8px}.dl-text-button{padding:0!important;border:0!important;background:transparent!important;text-align:left;min-height:24px!important}.dl-ticket-title .dl-text-button{font-size:14px}.dl-badge{font-size:10px;border-radius:12px;padding:2px 7px;color:var(--warning);background:var(--warning-bg);white-space:nowrap}.dl-badge.verified{color:var(--success);background:var(--success-bg,var(--surface))}
.dl-overlay{position:fixed;inset:0;background:#0007;z-index:90;display:flex;justify-content:center;align-items:flex-start;padding:70px 22px 24px;overflow:auto}.dl-dialog{background:var(--panel);border:1px solid var(--line-strong);border-radius:11px;padding:18px;box-shadow:var(--shadow);width:min(1150px,100%);box-sizing:border-box;max-height:calc(100dvh - 94px);overflow:auto}.dl-dialog-head{justify-content:space-between;margin-bottom:12px}.dl-dialog-head h2{font-size:17px;margin:0;flex:1;overflow-wrap:anywhere}.dl-footer{justify-content:flex-end;margin-top:14px;padding-top:10px;border-top:1px solid var(--line)}
.dl-form-grid{display:grid;grid-template-columns:2fr 1fr 1.2fr 1.2fr;gap:12px}.dl-field{display:flex;flex-direction:column;gap:4px;min-width:0;margin:0 0 10px;font-size:12px;font-weight:650}.dl-field input,.dl-field textarea,.dl-field select{width:100%}.dl-field>span{padding-left:2px}
.dl-table-scroll{overflow:auto;max-width:100%;margin:9px 0;border:1px solid var(--line);border-radius:7px}.dl-table-scroll table{border-collapse:collapse;width:100%;min-width:770px;font-size:12px}.dl-table-scroll th{background:var(--surface);padding:8px;text-align:left;color:var(--muted);font-size:11px;white-space:nowrap;border-bottom:1px solid var(--line-strong)}.dl-table-scroll td{padding:8px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}.dl-table-scroll tr:last-child td{border-bottom:0}.dl-table-scroll td .dl-field{margin:0}.dl-table-scroll td .dl-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.dl-table-scroll td input{padding:6px;min-width:65px}.dl-table-scroll td:nth-child(3){min-width:190px}.dl-qty{display:flex;gap:5px;max-width:160px}.dl-qty .dl-field:first-child{width:80px}.dl-qty .dl-field:last-child{width:55px}.dl-unreadable{background:var(--warning-bg)}
.dl-files{margin:6px 0 12px}.dl-file-row{padding:6px 0;border-bottom:1px solid var(--line)}.dl-file-row>span{flex:1;overflow-wrap:anywhere}.dl-file-row small{color:var(--muted)}.dl-collector{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.dl-collector-page{border:1px solid var(--line);border-radius:7px;width:150px;min-height:130px;display:flex;flex-direction:column;gap:7px;padding:10px;overflow-wrap:anywhere}.dl-collector-page b{color:var(--accent)}.dl-collector-page button{margin-top:auto;font-size:10px}.dl-original-preview{display:block;max-width:100%;max-height:70dvh;margin:auto;object-fit:contain}.dl-original-pdf{width:100%;height:68dvh;border:0;background:white}
.dl-original-scroll{max-height:70dvh;overflow:auto;background:var(--surface);text-align:center}.dl-original-scroll canvas{display:block;margin:auto}.dl-original-scroll .dl-original-preview{max-height:none}.dl-ticket-pages{display:flex;flex-direction:column;align-items:center;gap:8px;margin:10px 0}.deliveries-project .dl-ticket-page{padding:0;overflow:hidden;max-width:340px;max-height:340px}.dl-ticket-page img,.dl-ticket-page canvas{display:block;max-width:100%;max-height:340px;object-fit:contain}
.dl-connections,.dl-match,.dl-scan-review{border:1px solid var(--line);border-radius:8px;padding:12px;margin:12px 0;background:var(--surface)}.dl-connections h3,.dl-match h3,.dl-scan-review h3{font-size:13px;margin:0 0 8px}.dl-connections .dl-actions{margin:5px 0}.dl-model-choice{display:flex;gap:8px;padding:6px}.dl-model-choice input{width:auto}.dl-conflicts{position:relative;z-index:91;background:var(--panel);border:2px solid var(--warning-line);padding:16px;max-width:1000px;margin:auto}.dl-conflicts label{display:block}.dl-conflicts pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow:auto}.dl-dialog details{margin:8px 0;border-bottom:1px solid var(--line);padding:6px}.dl-dialog summary{cursor:pointer;font-weight:600}
@media(max-width:720px){.deliveries-project{padding:12px 0}.dl-header h1{font-size:16px}.dl-header{align-items:flex-start}.dl-tabs{gap:5px}.dl-tabs button{font-size:11px;padding:7px}.dl-overlay{padding:16px 8px}.dl-dialog{max-height:calc(100dvh - 32px);padding:12px}.dl-form-grid{grid-template-columns:1fr 1fr}.dl-dialog-head{align-items:flex-start}.dl-dialog-head .dl-actions{justify-content:flex-end}.dl-ticket-icon{width:43px;height:55px}.dl-file-row>span{flex-basis:100%}.dl-body{padding:8px}.dl-ticket-row{gap:8px}}

.dl-pdf-badge{font:750 12px/1 system-ui,sans-serif;letter-spacing:.04em;color:var(--accent-dark);border:1px solid var(--line-strong);padding:8px 5px;border-radius:4px}
