*{box-sizing:border-box}body{margin:0;background:#f3f5f1;color:#20231f;font:15px Arial,"Microsoft YaHei",sans-serif}header{height:54px;padding:0 22px;background:#173c35;color:#fff;display:flex;align-items:center;justify-content:space-between}header a,header button{color:#fff;margin-left:16px;background:none;border:0}.heading,.panel,.cards{max-width:1180px;margin:18px auto;padding:0 16px}.panel{background:#fff;border:1px solid #d8ddd6;border-radius:7px;padding:16px}.cards{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.card{background:#fff;padding:12px;border-left:4px solid #327562}.card strong{display:block;font-size:24px}form{display:flex;gap:8px}input{flex:1;padding:11px}button,select{padding:9px}.title{display:flex;justify-content:space-between}.row{padding:10px;border-bottom:1px solid #e4e7e2;display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;align-items:center}.remark{background:#fff0c7;color:#702f00;padding:6px 9px;border-radius:4px;font-weight:bold;display:inline-block}.error{color:#a01818}.badge{background:#e4eee9;padding:3px 7px;border-radius:10px}dialog{width:min(920px,95vw);max-height:90vh;overflow:auto;border:0;border-radius:8px}.close{float:right}.scans{width:100%;border-collapse:collapse}.scans td,.scans th{padding:7px;border-bottom:1px solid #ddd;text-align:left}@media(max-width:760px){.cards{grid-template-columns:repeat(2,1fr)}.row{grid-template-columns:1fr}.heading,.panel,.cards{padding:0 9px}}
.urgent-badge{display:inline-block;color:#8b190f;background:#ffe2dc;border:1px solid #d85b4b;border-radius:3px;padding:1px 5px;font-size:12px}
.delivery-tools{display:flex;gap:18px;align-items:end;flex-wrap:wrap}.delivery-tools form{flex:1;min-width:330px}.delivery-tools label{display:flex;flex-direction:column;gap:4px}.delivery-tools input{min-width:90px}.delivery-table td:first-child{font-size:16px}.delivery-table .same-customer td{border-top-color:#f5f6f3}.delivery-table .same-customer td:nth-child(2){border-left:4px solid #78a99a}.same-mark{display:block;color:#54776d}.secondary{background:#eef1ed;color:#28332f;border:1px solid #cad2cc}.located{outline:3px solid #d49a22;background:#fff7d6}.hint{color:#5c6862;background:#eef3f0;padding:8px}#notice{max-width:1180px;margin:8px auto;padding:0 16px;min-height:22px}
.ok{color:#176b3d}.delivery-title{display:flex;align-items:baseline;gap:12px;margin:8px 14px 5px}.delivery-title h1{font-size:20px;margin:0}.delivery-title span,.delivery-title small{color:#66716b;font-size:12px}.delivery-title small{margin-left:auto}.sticky-delivery-tools{position:sticky;top:0;z-index:20;padding:7px;max-width:none;margin:5px 12px}.sticky-delivery-tools form{display:flex;flex-wrap:wrap;align-items:end}.sticky-delivery-tools label{min-width:95px}.sticky-delivery-tools label:first-child{min-width:240px;flex:1}.sticky-delivery-tools input,.sticky-delivery-tools select{padding:6px}.delivery-panel{max-width:none;margin:7px 12px;padding:7px}.compact-result{display:flex;gap:12px;align-items:center;padding:2px 2px 6px}.compact-result small{color:#66716b}.customer-workbench{max-height:76vh;overflow:auto;border:1px solid #d8ddd6}.delivery-customer-table{min-width:1080px}.delivery-customer-table thead th{position:sticky;top:0;background:#edf2ee;z-index:8}.delivery-customer-table td{vertical-align:middle}.customer-fixed{position:sticky!important;left:0;background:#fff;z-index:6;min-width:160px}.delivery-customer-table thead .customer-fixed{z-index:12;background:#e4ece7}.action-fixed{position:sticky!important;right:0;background:#fff;z-index:6;min-width:250px}.delivery-customer-table thead .action-fixed{z-index:12;background:#e4ece7}.customer-fixed small,.delivery-table small{display:block;color:#65706a;margin-top:4px}.roll-stack{display:flex;flex-wrap:wrap;gap:5px;min-width:460px;max-width:900px}.delivery-roll{display:inline-flex;gap:3px;align-items:center;padding:3px 5px;background:#f7f9f7;border:1px solid #d8dfd9;border-radius:3px;white-space:nowrap}.delivery-roll.urgent-roll{border-color:#cc3e2e;background:#fff3ef}.delivery-roll em{max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7b351d}.upload-dot{font-style:normal;color:#8d9791;font-size:13px}.upload-dot.done{color:#15934a}.service-mini{font:bold 12px Arial;color:#15543f;background:#dcece3;border-radius:2px;padding:1px 3px}.delivery-actions{display:grid;grid-template-columns:1fr 1fr;gap:4px}.delivery-actions input{grid-column:1/-1;padding:6px;min-width:220px}.delivery-actions button{padding:5px}.tiny{padding:2px 5px;font-size:12px;margin:2px}.special-mark{display:block;color:#942814;background:#ffe8df;padding:3px;margin-top:4px}
.delivery-roll.located-roll{background:#fff0a8!important;border:2px solid #d38a00!important;box-shadow:0 0 0 3px #ffd85c66}

/* Fiona Cloud delivery workbench: compact rows while the SQLite legacy
   rendering above remains unchanged. */
body.cloud-module-delivery .delivery-title{margin:4px 12px 6px}
body.cloud-module-delivery .sticky-delivery-tools{top:54px;margin:4px 12px;padding:6px}
body.cloud-module-delivery .sticky-delivery-tools form{gap:6px}
body.cloud-module-delivery .sticky-delivery-tools input,
body.cloud-module-delivery .sticky-delivery-tools select,
body.cloud-module-delivery .sticky-delivery-tools button{height:32px;padding:4px 7px}
body.cloud-module-delivery .delivery-panel{margin-top:5px}
body.cloud-module-delivery .delivery-customer-table th,
body.cloud-module-delivery .delivery-customer-table td{padding:6px 8px;line-height:1.25}
body.cloud-module-delivery .delivery-customer-table tbody tr:nth-child(odd){background:#fff}
body.cloud-module-delivery .delivery-customer-table tbody tr:nth-child(even){background:#f7f9f7}
body.cloud-module-delivery .delivery-customer-table tbody tr:hover{background:#f1f6f2}
body.cloud-module-delivery .customer-fixed,
body.cloud-module-delivery .action-fixed{background:inherit;min-width:0}
body.cloud-module-delivery .customer-fixed{width:165px}
body.cloud-module-delivery .action-fixed{width:108px}
body.cloud-module-delivery .customer-fixed small{display:inline;margin:0 0 0 5px;font-size:11px}
body.cloud-module-delivery .roll-stack{min-width:420px;max-width:none;gap:4px}
body.cloud-module-delivery .delivery-roll{padding:2px 4px;line-height:20px}
body.cloud-module-delivery .delivery-roll em{font-size:11px;color:#a2442d}
body.cloud-module-delivery .special-mark{display:inline-block;margin:2px 0 0;padding:1px 4px;font-size:10px;background:#fff1eb}
body.cloud-module-delivery .compact-actions{position:relative}
body.cloud-module-delivery .compact-actions summary{list-style:none;cursor:pointer;white-space:nowrap;border:1px solid #cad2cc;border-radius:4px;background:#eef1ed;padding:5px 7px;text-align:center}
body.cloud-module-delivery .compact-actions summary::-webkit-details-marker{display:none}
body.cloud-module-delivery .delivery-action-menu{position:absolute;z-index:30;right:0;top:calc(100% + 4px);width:260px;padding:7px;background:#fff;border:1px solid #cbd5cf;border-radius:5px;box-shadow:0 8px 24px #173c3526}
body.cloud-module-delivery .delivery-action-menu .delivery-actions{display:grid}
@media(max-width:850px){body.cloud-module-delivery .sticky-delivery-tools{top:0}}
/* Dense Excel-style delivery workbench. */
body.cloud-module-delivery .sticky-delivery-tools{top:54px;z-index:40;background:#fff;border-color:#cbd5cf}
body.cloud-module-delivery .sticky-delivery-tools form{display:grid;grid-template-columns:minmax(300px,2.4fr) minmax(130px,.8fr) minmax(135px,.85fr) minmax(105px,.65fr) minmax(105px,.65fr) minmax(105px,.65fr) 78px 78px;width:100%;gap:7px}
body.cloud-module-delivery .sticky-delivery-tools label{min-width:0}
body.cloud-module-delivery .sticky-delivery-tools input,body.cloud-module-delivery .sticky-delivery-tools select{width:100%;min-width:0}
body.cloud-module-delivery .progress-legend{margin-left:auto;font-size:11px;color:#627069}
body.cloud-module-delivery .col-customer{width:190px}body.cloud-module-delivery .col-source{width:62px}body.cloud-module-delivery .col-rolls{width:auto}body.cloud-module-delivery .col-delivery{width:58px}body.cloud-module-delivery .col-time{width:110px}body.cloud-module-delivery .col-action{width:132px}
body.cloud-module-delivery .delivery-customer-table{table-layout:fixed;min-width:1120px}
body.cloud-module-delivery .delivery-customer-table th,body.cloud-module-delivery .delivery-customer-table td{padding:4px 6px}
body.cloud-module-delivery .customer-id-grid{display:grid;grid-template-columns:minmax(0,1fr) 42px 34px;gap:4px;align-items:center}
body.cloud-module-delivery .customer-id-grid strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body.cloud-module-delivery .customer-id-grid small{margin:0;text-align:right;white-space:nowrap}
body.cloud-module-delivery .roll-stack{min-width:0;max-width:none;gap:3px}
body.cloud-module-delivery .delivery-roll{display:inline-flex;align-items:center;white-space:nowrap;break-inside:avoid;gap:3px;min-width:132px;height:27px;padding:2px 4px}
.progress-dots{display:inline-flex;gap:2px}.progress-dots i{display:block;width:7px;height:7px;border-radius:50%;border:1px solid #b9c2bd;background:#f5f6f5}.progress-dots i.on{background:#159447;border-color:#159447}
.claim-link{font-size:10px;color:#915400}.operation-button{width:124px;height:34px;padding:5px 10px;font-weight:700}.portal-menu{position:fixed;z-index:1000;width:280px;padding:8px;background:#fff;border:1px solid #aebdb5;box-shadow:0 8px 24px #173c3540}.portal-menu button,.portal-menu a,.portal-menu input{display:block;width:100%;min-height:34px;margin:3px 0;text-align:left}.portal-menu input{padding:6px}.portal-menu a{padding:8px;color:#173c35;text-decoration:none}.portal-menu a:hover{background:#edf4f0}
@media(max-width:1050px){body.cloud-module-delivery .sticky-delivery-tools form{grid-template-columns:2fr 1fr 1fr 1fr;}.progress-legend{display:none}}

body.cloud-module-delivery .col-customer{width:245px}body.cloud-module-delivery .col-source{width:58px}body.cloud-module-delivery .col-delivery{width:54px}body.cloud-module-delivery .col-time{width:96px}body.cloud-module-delivery .col-action{width:132px}
body.cloud-module-delivery .customer-id-grid{grid-template-columns:minmax(165px,1fr) 42px 34px}body.cloud-module-delivery .customer-id-grid strong{white-space:normal;overflow-wrap:anywhere;line-height:1.2;max-height:2.4em}
#delivery-detail{width:min(1200px,94vw);height:min(900px,88vh);max-height:88vh;padding:0;border:0;border-radius:7px}#delivery-detail::backdrop{background:#173c3566}.delivery-detail-shell{height:100%;display:flex;flex-direction:column}.detail-header,.detail-footer{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#fff}.detail-header{border-bottom:1px solid #d7dfdb}.detail-header h2{margin:0;font-size:19px}.detail-header button{font-size:22px;background:transparent;color:#173c35}.detail-body{flex:1;min-height:0;overflow-y:auto;padding:14px 16px}.detail-footer{border-top:1px solid #d7dfdb;justify-content:flex-end}.detail-summary{display:flex;gap:18px;align-items:center;margin-bottom:12px}.detail-roll-grid{display:flex;flex-wrap:wrap;gap:6px}.detail-roll-grid .delivery-roll{min-width:145px}.detail-special{margin-top:16px;border-top:1px solid #d7dfdb;padding-top:10px}.detail-special p{margin:6px 0}
.customer-workbench{height:calc(100vh - 285px);min-height:360px;overflow:auto}.delivery-customer-table thead th{position:sticky;top:0;z-index:4}.customer-id-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 7px;align-items:center;min-width:170px}.customer-id-grid strong{overflow-wrap:anywhere;white-space:normal}.customer-id-grid small{grid-column:1/-1}.delivery-tools form{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.delivery-tools label{min-width:105px}.filter-search{min-width:260px!important;flex:1}.delivery-roll{white-space:nowrap}
.registration-note{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.delivery-roll em{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;color:#6b4d1f;font-size:11px}
.copyable-customer{cursor:pointer}.service-mini{background:transparent;padding:0}.service-f{color:#168447}.service-m{color:#1f62a5}.service-s{color:#8a6500}.progress-dots i.scan.on{background:#159447;border-color:#159447}.progress-dots i.upload.on{background:#2675c7;border-color:#2675c7}.progress-dots i.physical.on{background:#80552d;border-color:#80552d}.progress-summary{display:flex;flex-wrap:wrap;gap:5px 8px}.progress-summary .progress-dots{white-space:nowrap}
.pager{display:flex;align-items:center;justify-content:center;gap:8px;padding:7px;font-size:12px}.pager select{padding:3px}.copyable-customer:before{content:'⧉';font-weight:400;margin-right:5px;color:#65746d}.roll-stack{max-width:none;min-width:0;gap:3px}.delivery-roll{padding:2px 3px;border:0;background:transparent}.delivery-customer-table{table-layout:fixed;min-width:900px}.delivery-customer-table .col-customer{width:210px}.delivery-customer-table .col-rolls{width:auto}.delivery-customer-table .col-time{width:105px}.delivery-customer-table .col-note{width:190px}
.delivery-customer-table .col-count{width:54px}.roll-count-column{text-align:center!important;white-space:nowrap;color:#65706a}.customer-fixed>.copyable-customer{display:block}
#detail{width:min(1120px,95vw);max-height:90vh}.film-section{border-top:1px solid #d9e0dc;padding-top:9px;margin-top:10px}.film-section h3{margin:0 0 7px;font-size:15px}.film-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.film-fields div{min-width:0;background:#f6f8f6;padding:6px}.film-fields dt{font-size:11px;color:#65716c}.film-fields dd{margin:2px 0;overflow-wrap:anywhere}.film-timeline{border-left:2px solid #92b2a6;margin-left:8px;padding-left:18px}.film-timeline li{padding:4px 0}.film-timeline time{display:inline-block;width:165px;color:#65716c}.film-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid #ccd7d1;padding:9px 0}.query-pager{display:flex;justify-content:center;gap:8px;margin-top:10px}@media(max-width:760px){.film-fields{grid-template-columns:1fr}.film-timeline time{display:block;width:auto}}
.physical-film-grid{display:flex;flex-wrap:wrap;gap:6px}.physical-film-grid button{display:grid;grid-template-columns:auto auto;gap:2px 8px;text-align:left;background:#f4f7f5;color:#1d2b25;border:1px solid #cfd9d3}.physical-film-grid small{grid-column:1/-1;color:#5f6e67}.physical-history{display:grid;gap:4px}.physical-history>div{display:grid;grid-template-columns:90px 55px 75px 1fr 150px;gap:7px;padding:5px 7px;background:#f6f8f6}.film-actions a{display:inline-block;padding:8px;color:#174c3e;font-weight:700}@media(max-width:760px){.physical-history>div{grid-template-columns:1fr 1fr}.physical-history time{grid-column:1/-1}}
.production-status-strip{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:7px;margin:8px 0 10px}.production-status-item{display:flex;align-items:center;gap:7px;min-width:0;padding:7px 9px;background:#f5f8f6;border:1px solid #d9e0dc;border-radius:5px}.production-status-item>span{font-weight:700}.production-status-item b{font-size:12px;white-space:nowrap}.production-status-item .done{color:#23704d}.production-status-item .pending{color:#7a8580}.production-status-item button{margin-left:auto;padding:4px 7px;font-size:12px;white-space:nowrap}@media(max-width:760px){.production-status-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.production-status-item{align-items:flex-start;flex-wrap:wrap}}
