#upd-scans-section{margin:18px 0;padding:18px;border:1px solid #dce7f1;border-radius:14px;background:#fff;color:#31516e}
#upd-scans-section header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 12px}
#upd-scans-section h2{margin:0 0 6px;font-size:18px}#upd-scans-section p{margin:4px 0 12px;font-size:13px;color:#7890a6}
#upd-scans-section .ups-upload{display:inline-block;white-space:nowrap;padding:12px 17px;border-radius:9px;background:#2b659e;color:white;font-weight:600;cursor:pointer}
#upd-scans-section [data-list]{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:9px;margin:12px 0}
#upd-scans-section [data-list] button{display:grid;gap:5px;padding:12px;text-align:left;color:#365873;background:#f7fafd;border:1px solid #dfeaf3;border-radius:9px;cursor:pointer;min-width:0;overflow-wrap:anywhere}
#upd-scans-section small{font-size:11px;color:#7c91a4}
#upd-scan-dialog{box-sizing:border-box;width:calc(100vw - 40px);max-width:1600px;height:calc(100dvh - 40px);max-height:calc(100dvh - 40px);padding:0;border:1px solid #dbe5ee;border-radius:16px;color:#31516e;background:white;overflow:hidden}
#upd-scan-dialog::backdrop{background:#19364f80;backdrop-filter:blur(3px)}#upd-scan-dialog *{box-sizing:border-box}
#upd-scan-dialog[open]{display:flex;flex-direction:column}
#upd-scan-dialog>header{display:flex;flex:0 0 auto;justify-content:space-between;gap:20px;padding:18px 22px;border-bottom:1px solid #e1eaf2}
#upd-scan-dialog>header p{margin:0 0 5px;letter-spacing:2px;font-size:10px}#upd-scan-dialog h2{margin:0 0 6px;font-size:20px;overflow-wrap:anywhere;line-height:1.4}
#upd-scan-dialog>header button{align-self:start;font-size:22px;min-width:36px;padding:2px 8px}
#upd-scan-dialog>main{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:20px;flex:1;min-height:0;overflow:auto;padding:18px 22px;margin:0;width:100%;max-width:none}
#upd-scan-dialog .ups-original{min-width:0;display:flex;flex-direction:column;gap:12px}#upd-scan-dialog [data-preview]{min-height:400px;background:#f1f5f8;border:1px solid #e0e8ef;border-radius:10px;overflow:auto}
#upd-scan-dialog [data-preview] img{display:block;width:100%;height:auto}#upd-scan-dialog iframe{display:block;width:100%;height:65vh;border:0}
#upd-scan-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;max-height:350px;overflow:auto;padding:12px;background:#f3f7fb}
#upd-scan-dialog form{margin:0;min-width:0;padding:0;display:block}#upd-scan-dialog .ups-header-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}
#upd-scan-dialog label{display:grid;gap:6px;font-size:11px;min-width:0;color:#6d8295;margin:0;padding:0}
#upd-scan-dialog input{display:block;width:100%;min-width:0;max-width:100%;height:40px;margin:0;padding:8px 10px;border:1px solid #ccddeb;border-radius:8px;background:white;color:#29445d;font:inherit;font-size:13px;box-shadow:none}
#upd-scan-dialog h3{margin:0;font-size:15px}#upd-scan-dialog .ups-items-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
#upd-scan-dialog fieldset{margin:0 0 14px;padding:12px;border:1px solid #deE7ef;border-radius:10px;min-width:0}#upd-scan-dialog legend{padding:0 5px;font-size:12px;font-weight:600}
#upd-scan-dialog .ups-line-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}#upd-scan-dialog .ups-field-name{grid-column:span 2}
#upd-scan-dialog fieldset>button{margin-top:10px;font-size:11px;color:#ad4b3a}
#upd-scan-dialog .ups-notice{margin:0 0 16px;padding:12px;background:#fff5e7;border-radius:9px;font-size:12px;line-height:1.6;color:#8a672f}
#upd-scan-dialog .ups-error,#upd-scans-section .ups-error{color:#ae352b;background:#fff0ed;padding:10px;border-radius:8px;font-size:12px;line-height:1.6}
#upd-scan-dialog>[data-error]{margin:10px 22px;max-height:100px;overflow:auto;flex:0 0 auto}
#upd-scan-dialog .ups-totals{padding:12px;background:#f1f7fc;font-size:12px;border-radius:8px}
#upd-scan-dialog>footer{display:flex;justify-content:space-between;align-items:center;gap:14px;flex:0 0 auto;border-top:1px solid #e0e9f1;padding:14px 22px;background:white}
#upd-scan-dialog>footer>div{display:flex;flex-wrap:wrap;gap:8px}#upd-scan-dialog>footer>span{font-size:11px;color:#8295a7}
#upd-scan-dialog button{padding:9px 12px;border:1px solid #d4e2ee;border-radius:8px;background:#f4f8fc;color:#365d80;font:inherit;font-size:12px;cursor:pointer;margin:0;white-space:normal}
#upd-scan-dialog button.ups-primary{background:#2b659e;color:#fff}#upd-scan-dialog button:disabled{opacity:.5;cursor:wait}
@media(max-width:900px){#upd-scan-dialog>main{grid-template-columns:1fr}#upd-scan-dialog iframe{height:400px}#upd-scan-dialog [data-preview]{max-height:450px;min-height:150px}#upd-scan-dialog>footer{align-items:stretch;flex-direction:column}#upd-scan-dialog>footer>span{display:none}}
@media(max-width:520px){#upd-scans-section header{align-items:stretch;flex-direction:column}#upd-scan-dialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}#upd-scan-dialog>:is(header,main,footer){padding:14px}#upd-scan-dialog .ups-header-fields{grid-template-columns:1fr}#upd-scan-dialog .ups-line-fields{grid-template-columns:1fr 1fr}#upd-scan-dialog .ups-field-name{grid-column:1/-1}#upd-scan-dialog h2{font-size:16px}#upd-scan-dialog>footer>div{display:grid;grid-template-columns:1fr 1fr}}
#upd-scan-dialog>main{max-height:none}
#upd-scan-dialog .ups-pages{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}#upd-scan-dialog .ups-pages>div{display:flex;align-items:center;gap:7px;font-size:12px}
#upd-scan-dialog .ups-vat-mode{max-width:200px;margin-top:10px}#upd-scan-dialog select{display:block;width:100%;height:40px;padding:8px 10px;border:1px solid #ccddeb;border-radius:8px;background:white;color:#29445d;font:inherit;font-size:13px}
#upd-scan-dialog [data-preview]{max-height:68vh}#upd-scan-dialog [data-preview] img{max-width:none}
#upd-scan-dialog fieldset.ups-name-uncertain{border-color:#e8b66a;background:#fffbf4}
#upd-scan-dialog .ups-name-review{display:grid;gap:8px;padding:12px;margin-top:12px;border:1px solid #efd2a6;border-radius:8px;background:#fff4e2;font-size:12px;color:#8a6029}
#upd-scan-dialog .ups-name-review button{text-align:left;overflow-wrap:anywhere;background:white;font-size:12px}
#upd-scan-dialog .ups-name-review label{display:flex;align-items:center;gap:8px;color:#805c2d}
#upd-scan-dialog .ups-name-review input[type=checkbox]{width:16px;height:16px;min-width:16px;appearance:auto;padding:0}
