/* Quiet, responsive staff order card. */
#detail:has(.oc-refined){width:min(820px,calc(100vw - 32px));max-width:820px;padding:24px;background:#f7f8fa;border:1px solid #e4e7ec;border-radius:22px}
.oc-refined{display:grid;gap:14px;min-width:0;color:#202733;font-size:14px;line-height:1.5}
.oc-refined *, .jd-file-dialog *{box-sizing:border-box}
.oc-refined .oc-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0;padding:8px 0 4px;border:0}
.oc-refined .oc-number-group{display:flex;align-items:center;gap:6px;min-width:0}
.oc-refined .oc-head h2{font-size:22px;line-height:1.25;letter-spacing:-.5px;margin:0;overflow-wrap:anywhere}
.oc-refined .oc-head-actions{display:flex;gap:8px;margin-left:auto;align-items:center;flex-wrap:wrap}
.oc-refined button,.oc-refined summary{font-size:13px}
.oc-refined .oc-icon{width:36px;height:36px;min-width:36px;padding:8px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;border:1px solid #e6e9ee;background:#fff;flex-shrink:0}
.oc-refined .oc-icon svg{width:20px;height:20px;max-width:20px}
.oc-refined .oc-more>summary{width:36px;height:36px;display:grid;place-items:center;background:#fff;border:1px solid #e6e9ee;border-radius:10px;font-size:23px;list-style:none;padding:0;cursor:pointer}
.oc-refined .oc-more>summary::-webkit-details-marker{display:none}
.oc-refined .oc-more-menu{min-width:220px;max-width:calc(100vw - 56px);z-index:10}
.oc-refined .oc-section{background:white;border:1px solid #e6e9ee;border-radius:16px;padding:18px 20px;min-width:0;margin:0}
.oc-refined h3{font-size:14px;line-height:1.4;font-weight:650;margin:0 0 12px}
.oc-refined h3 small{font-size:12px;font-weight:400;color:#7a8492;margin-left:5px}
.oc-refined .oc-client{display:flex;align-items:baseline;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin:0 0 16px;font-size:14px;white-space:normal}
.oc-refined .oc-client b{font-size:17px;overflow-wrap:anywhere}
.oc-refined .oc-client a{white-space:nowrap;color:#59697b}
.oc-refined .oc-delivery{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2fr);gap:16px;margin:0;color:inherit;white-space:normal;overflow:visible}
.oc-refined .oc-delivery>div{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere}
.oc-caption{display:block;font-size:12px;color:#7b8490;margin-bottom:3px}
.oc-refined .oc-note{margin:14px 0 0;padding-top:12px;border-top:1px solid #eef0f3;white-space:pre-wrap;overflow-wrap:anywhere}
.oc-refined .oc-items{margin:0;padding:0;list-style:none}
.oc-refined .oc-items li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:20px;padding:12px 0;border-bottom:1px solid #f0f1f4}
.oc-refined .oc-items li:last-child{border-bottom:0}
.oc-refined .oc-name{white-space:normal;text-overflow:clip;overflow-wrap:anywhere;font-size:14px;line-height:1.45}
.oc-refined .oc-name small{display:block;color:#808894;font-size:12px;margin-top:4px}
.oc-refined .oc-sum{font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.oc-refined .oc-total{display:flex;justify-content:space-between;align-items:center;margin:8px 0 0;padding:14px 0 0;border-top:1px solid #e8ebef;gap:16px}
.oc-refined .oc-total strong{font-size:20px;font-variant-numeric:tabular-nums}
.oc-refined .oc-section-heading{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.oc-refined .oc-section-heading h3{margin:0;flex:1}
.oc-payment-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 12px}
.oc-payment-summary strong{display:block;font-size:17px;font-weight:600;overflow-wrap:anywhere}
.oc-payment-summary small{font-size:12px;color:#808894}
.oc-refined .order-payment{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 0;border-top:1px solid #eef0f3;border-bottom:0;margin:0;background:transparent}
.oc-refined .order-payment>div:first-child{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.oc-refined .order-payment small{flex-basis:100%;font-size:12px;color:#7a8490}
.oc-refined .payment-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.oc-file-grid{display:flex;flex-wrap:wrap;gap:10px}
.jd-file-tile{display:flex!important;flex-direction:column;gap:5px;width:84px;max-width:100%;color:#677385;text-decoration:none;font-size:11px;line-height:1.3;text-align:center}
.jd-file-thumb{width:84px;height:72px;border:1px solid #e4e7ed;background:#f6f7fa;border-radius:10px;display:grid;place-items:center;overflow:hidden;color:#727e90;font-size:13px}
.jd-file-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.oc-refined details>summary{color:#677385;cursor:pointer;font-size:12px;line-height:1.6}
.oc-refined .oc-upload,.oc-refined .oc-receiving-extra{margin-top:14px}
.oc-refined .oc-info{display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px;font-size:12px;margin:12px 0 0}
.oc-refined .oc-info dd{margin:0;overflow-wrap:anywhere}
.oc-refined .oc-info dt{color:#7b8490}
.oc-refined .muted{font-size:12px;margin:8px 0;color:#7a8490}
.oc-refined .badge{font-size:11px;padding:4px 8px;white-space:normal}
.oc-payment-select{display:grid;gap:10px}
.order-line .order-number{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px;line-height:1.3;white-space:normal}
.order-number .order-shipment-date{display:block!important;position:static!important;font-size:11px!important;font-weight:400!important;line-height:1.4;color:#7a8490;margin:0!important}
/* One accessible modal for protected attachments; underlying card stays open. */
.jd-file-dialog{width:min(960px,calc(100vw - 24px));height:min(90dvh,1000px);max-width:960px;max-height:94dvh;padding:0;border:1px solid #dce1e8;border-radius:18px;background:#fff;color:#202733;box-shadow:0 24px 90px #15233855}
.jd-file-dialog[open]{display:flex;flex-direction:column}
.jd-file-dialog::backdrop{background:#15202d99;backdrop-filter:blur(3px)}
.jd-file-dialog header{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #e9ecf0;flex-shrink:0}
.jd-file-dialog h2{flex:1;min-width:0;font-size:15px;margin:0;overflow-wrap:anywhere}
.jd-file-dialog header button{font-size:24px;width:36px;height:36px;padding:0;background:#f2f4f7;color:#333;border:0;border-radius:10px}
.jd-file-dialog header a{font-size:12px;color:#426388;text-decoration:none}
.jd-file-body{min-height:0;flex:1;overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:16px;background:#f4f5f7}
.jd-file-body img{max-width:100%;max-height:100%;object-fit:contain;margin:auto}
.jd-file-body canvas{max-width:100%;height:auto;background:#fff}
.jd-file-body pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;font-size:12px}
.jd-file-dialog footer{display:flex;justify-content:center;gap:20px;align-items:center;padding:10px;border-top:1px solid #e4e7ed;font-size:12px}
.jd-file-dialog footer[hidden]{display:none}
/* Compact, timestamped logs across event, audit, price and order history. */
.bell-row,.jd-audit-row,.log-row,.jd-timeline-row,.pb-hist .sb-row{font-size:12px!important;line-height:1.55!important;border-radius:0!important;box-shadow:none!important;margin:0!important;border:0!important;border-bottom:1px solid #edf0f4!important;background:transparent!important}
.bell-row>summary,.jd-audit-row>summary,.log-row>summary,.jd-timeline-row>summary{padding:9px 4px!important;gap:8px 14px!important;font-size:12px!important;min-height:0!important}
.bell-copy b,.jd-audit-row b,.log-row b{font-size:12px!important;font-weight:500!important}
.bell-copy small,.bell-row time,.jd-audit-row time,.log-row small,.jd-timeline-row time,.pb-hist .sb-num{font-size:11px!important;color:#7a8490;font-variant-numeric:tabular-nums}
.bell-row>summary{grid-template-columns:130px minmax(0,1fr) 12px!important}
.bell-row>summary>time{grid-column:1;grid-row:1;white-space:normal}
.bell-row .bell-copy{grid-column:2;grid-row:1}
.bell-row .bell-chevron{grid-column:3;grid-row:1}
.bell-row .bell-dot{display:none}
.bell-row.severity-error .bell-copy b{color:#b34343}
.bell-row.severity-warning .bell-copy b{color:#9c711e}
.bell-detail{font-size:12px;padding:8px 12px!important}
.jd-timeline-row summary{display:grid;grid-template-columns:130px minmax(0,1fr) auto;align-items:baseline}
.jd-log-details{display:grid;grid-template-columns:minmax(90px,140px) minmax(0,1fr);gap:5px 14px;font-size:12px;margin:8px 0;line-height:1.5}
.jd-log-details dt{color:#7a8490;overflow-wrap:anywhere}.jd-log-details dd{margin:0;overflow-wrap:anywhere;min-width:0}
.jd-log-values>div{padding:3px 0;border-bottom:1px solid #f1f2f5}
.pb-hist .sb-row{padding:8px 4px!important}.pb-hist .sb-num{order:-1}
@media(max-width:600px){#detail:has(.oc-refined){padding:14px;width:calc(100vw - 16px);border-radius:16px}.oc-refined{gap:10px}.oc-refined .oc-section{padding:14px;border-radius:13px}.oc-refined .oc-head h2{font-size:19px}.oc-refined .oc-head-actions{flex-basis:100%;justify-content:flex-end}.oc-refined .oc-client b{font-size:16px}.oc-refined .oc-delivery{grid-template-columns:1fr;gap:10px}.oc-refined .oc-items li{gap:10px}.oc-refined .oc-sum{font-size:13px}.oc-refined .oc-info{grid-template-columns:100px minmax(0,1fr)}.bell-row>summary{grid-template-columns:90px minmax(0,1fr) 10px!important}.jd-timeline-row summary{grid-template-columns:90px minmax(0,1fr)}.jd-timeline-row summary small{grid-column:2}.jd-log-details{grid-template-columns:90px minmax(0,1fr)}.jd-file-dialog header{padding:10px;gap:8px}}
@media(prefers-reduced-motion:reduce){.oc-refined *,.jd-file-dialog *{scroll-behavior:auto!important;transition:none!important}}


/* Compact order card; touch controls remain usable on phones. */
#detail:has(.oc-refined){width:min(680px,calc(100vw - 24px));padding:16px;border-radius:16px}
#detail:has(.oc-refined)>.row.between{margin-bottom:4px}
.oc-refined{gap:8px;font-size:12px;line-height:1.4}
.oc-refined .oc-head{gap:8px;padding:4px 0}
.oc-refined .oc-head h2{font-size:18px;letter-spacing:-.3px}
.oc-refined .oc-head-actions{gap:6px}
.oc-refined button{font-size:11px;padding:6px 10px;min-height:30px}
.oc-refined .oc-icon,.oc-refined .oc-more>summary{width:30px;height:30px;min-width:30px;padding:6px;border-radius:8px}
.oc-refined .oc-icon svg{width:16px;height:16px}
.oc-refined .oc-more>summary{font-size:20px;padding:0}
.oc-refined .oc-section{padding:11px 13px;border-radius:11px}
.oc-refined h3{font-size:12px;margin-bottom:7px}
.oc-refined h3 small{font-size:10px}
.oc-refined .oc-client{margin-bottom:9px;font-size:12px;gap:5px 12px}
.oc-refined .oc-client b{font-size:14px}
.oc-refined .oc-delivery{gap:10px;grid-template-columns:minmax(100px,1fr) minmax(0,2fr);font-size:12px}
.oc-refined .oc-caption{font-size:10px;margin-bottom:2px}
.oc-refined .oc-note{margin-top:8px;padding-top:8px;font-size:12px}
.oc-refined .oc-items li{padding:7px 0;gap:12px}
.oc-refined .oc-name{font-size:12px;line-height:1.4}
.oc-refined .oc-name small{font-size:10px;margin-top:2px}
.oc-refined .oc-sum{font-size:12px}
.oc-refined .oc-total{padding-top:9px;margin-top:5px;font-size:12px}
.oc-refined .oc-total strong{font-size:16px}
.oc-refined .oc-section-heading{margin-bottom:7px;gap:6px}
.oc-refined .oc-payment-summary{gap:12px;margin-bottom:6px}
.oc-refined .oc-payment-summary strong{font-size:14px}
.oc-refined .oc-payment-summary small{font-size:10px}
.oc-refined .order-payment{padding:8px 0;gap:7px;font-size:12px}
.oc-refined .order-payment small{font-size:10px}
.oc-refined .payment-actions,.oc-refined .oc-file-grid{gap:7px}
.oc-refined .jd-file-tile{width:60px;font-size:10px;gap:3px}
.oc-refined .jd-file-thumb{width:60px;height:50px;border-radius:7px;font-size:11px}
.oc-refined .oc-upload,.oc-refined .oc-receiving-extra{margin-top:8px}
.oc-refined details>summary{font-size:11px}
.oc-refined .oc-info{grid-template-columns:115px minmax(0,1fr);gap:5px;font-size:11px;margin-top:8px}
.oc-refined .muted{font-size:11px;margin:5px 0}
.oc-refined .badge{font-size:10px;padding:3px 6px}
.oc-refined .oc-more:has(.oc-more-menu:empty){display:none}
@media(max-width:600px){#detail:has(.oc-refined){padding:10px;width:calc(100vw - 12px);border-radius:12px}.oc-refined{gap:7px}.oc-refined .oc-section{padding:10px}.oc-refined .oc-head h2{font-size:17px}.oc-refined .oc-head-actions{flex-basis:auto;margin-left:auto}.oc-refined .oc-client b{font-size:14px}.oc-refined .oc-delivery{grid-template-columns:1fr;gap:7px}.oc-refined .oc-info{grid-template-columns:95px minmax(0,1fr)}}
@media(pointer:coarse){.oc-refined .oc-icon,.oc-refined .oc-more>summary{width:40px;height:40px;min-width:40px}.oc-refined button{min-height:40px}.oc-refined details>summary{min-height:32px;align-content:center}}


/* Minimal desktop card: one overview, one compact item list, one media strip. */
#detail:has(.oc-minimal){width:min(680px,calc(100vw - 24px));padding:12px;max-height:94dvh;overflow:auto}
#detail:has(.oc-minimal)>.row.between{height:0;min-height:0;margin:0;padding:0;position:relative;border:0;background:none}
#detail:has(.oc-minimal)>.row.between>.eyebrow{display:none}
#detail:has(.oc-minimal) #close-modal{position:absolute;right:4px;top:3px;width:28px;height:28px;min-height:28px;padding:0;z-index:2}
.oc-minimal{gap:8px}.oc-minimal .oc-section{padding:10px 12px;margin:0;box-shadow:none}
.oc-minimal .oc-head{padding:0 32px 8px 0;gap:7px;border:0;margin:0}
.oc-minimal .oc-head h2{font-size:16px}.oc-minimal .oc-head-actions{margin-left:auto;flex-basis:auto}
.oc-minimal .oc-client{margin:0 0 8px;font-size:11px;gap:6px}.oc-minimal .oc-client b{font-size:13px}
.oc-minimal .oc-overview-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,1fr);gap:14px;align-items:start}
.oc-minimal .oc-delivery{display:flex;flex-direction:column;gap:4px;font-size:12px;margin:0;line-height:1.4}
.oc-minimal .oc-delivery small{font-size:10px;color:#7a8490}
.oc-minimal .oc-finance{display:grid;gap:4px;font-size:11px}
.oc-minimal .oc-finance>div{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.oc-minimal .oc-finance strong{font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.oc-minimal .oc-finance>div>span:not(.badge){color:#7a8490}
.oc-minimal .oc-pay-state{justify-content:flex-end!important;align-items:center!important;gap:6px!important}
.oc-minimal .oc-pay-state .oc-icon{width:24px;height:24px;min-width:24px;min-height:24px;padding:4px;border:0;background:transparent}
.oc-minimal .oc-dates{display:flex;flex-wrap:wrap;gap:3px 12px;padding-top:8px;margin-top:8px;border-top:1px solid #eef0f3;color:#8a919c;font-size:10px;line-height:1.5;font-variant-numeric:tabular-nums}
.oc-minimal .oc-dates time{color:#657080}.oc-minimal .oc-note{font-size:11px;line-height:1.4;padding-top:7px;margin-top:7px}
.oc-minimal .oc-primary-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.oc-minimal .oc-review-line{display:flex;gap:6px;align-items:center;font-size:10px;margin-top:6px}.oc-review-line>span{flex:1;min-width:0}
.oc-minimal .oc-products{padding:3px 12px}
.oc-minimal .oc-items,.oc-minimal .oc-items li{border-radius:0;box-shadow:none;background:transparent;min-height:0}
.oc-minimal .oc-items li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;padding:7px 0;gap:5px 14px;border:0;border-bottom:1px solid #eef0f3;margin:0}
.oc-minimal .oc-items li:last-child{border-bottom:0}
.oc-minimal .oc-name{font-size:12px;line-height:1.4}.oc-minimal .oc-line-price{font-size:10px;color:#7b8593;white-space:nowrap;align-self:center;font-variant-numeric:tabular-nums}.oc-minimal .oc-sum{font-size:12px;align-self:center}
.oc-line-note{grid-column:1/-1;font-size:10px;color:#9b7b38}
.oc-minimal .oc-delivery-cost{display:flex;justify-content:space-between;font-size:11px;padding:6px 0;border-top:1px solid #eef0f3;color:#7b8593}
.oc-minimal .oc-file-grid{display:flex;gap:7px;padding:0 2px;margin:0;flex-wrap:wrap;align-items:center}
.oc-minimal .jd-file-tile{width:48px;height:48px;display:block!important;padding:0}
.oc-minimal .jd-file-tile>span:not(.jd-file-thumb){display:none}
.oc-minimal .jd-file-thumb{width:48px;height:48px;border-radius:8px;border:1px solid #e0e5ec;font-size:10px}
.oc-minimal .oc-file-add{width:48px;height:48px;min-height:48px;padding:0;border:1px dashed #cbd3df;border-radius:8px;background:transparent;color:#768599;font-size:22px}
.oc-minimal .oc-extra{padding:3px 4px;border:0;border-radius:0;background:none;margin:0}
.oc-minimal .oc-extra>summary{font-size:10px;color:#8a919c;padding:0;min-height:0;line-height:1.7}
.oc-minimal .oc-info{font-size:10px;gap:4px 10px}.oc-minimal #oc-extra-actions{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}
.oc-minimal #oc-extra-actions button{min-height:26px;padding:3px 6px;font-size:10px;background:transparent;border:0;color:#728094}
.jd-history-text,.oc-payment-history{font-size:10px;line-height:1.6;color:#7c8795;overflow-wrap:anywhere;margin-top:8px}
.jd-history-text p,.oc-payment-history p{font-size:10px!important;line-height:1.6!important;margin:3px 0!important;padding:0!important}
.jd-history-text time{font-variant-numeric:tabular-nums;color:#929ba7}
.jd-row-edit{padding:6px!important;width:30px;height:30px;min-width:30px;border-radius:8px;border:0;background:transparent;color:#8190a3;display:grid;place-items:center;flex-shrink:0}
.jd-row-edit svg{width:16px;height:16px}
.oc-edit-form{background:white;border:1px solid #dce4ef;border-radius:10px;padding:12px;font-size:12px}
.oc-editor-title,.oc-editor-footer{display:flex;align-items:center;gap:8px}.oc-editor-title b{flex:1}.oc-editor-title{margin-bottom:8px}
.oc-edit-line{display:grid;grid-template-columns:minmax(0,1fr) 65px 85px 30px;gap:6px;align-items:center;margin:5px 0}
.oc-edit-form input,.oc-edit-form select,.oc-edit-form textarea{width:100%;min-width:0;padding:6px 8px;min-height:30px;font-size:12px;border:1px solid #dce2eb;border-radius:7px;box-sizing:border-box}
.oc-edit-form label{font-size:10px;color:#788599;display:block;margin:0}.oc-edit-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.oc-editor-footer{margin-top:8px}
.oc-add-product [data-product-hits]{display:grid;gap:4px;margin-top:4px}.oc-add-product{margin-top:8px}
.oc-upload-dialog{width:min(420px,calc(100vw - 24px));padding:18px;border:1px solid #e0e5ee;border-radius:14px;max-height:90dvh;overflow:auto}
.oc-upload-dialog::backdrop{background:#18243877;backdrop-filter:blur(2px)}
.oc-upload-dialog header{display:flex;align-items:center;gap:10px;margin-bottom:14px}.oc-upload-dialog h3{font-size:15px;flex:1;margin:0}.oc-upload-dialog header button{background:none;border:0;color:#7e8999;font-size:22px;padding:0}
.oc-upload-types{display:flex;background:#f1f4f8;border-radius:9px;padding:3px;margin:0 0 12px;gap:3px}.oc-upload-types label{flex:1;cursor:pointer;position:relative}.oc-upload-types input{position:absolute;opacity:0;width:1px}.oc-upload-types span{display:block;text-align:center;border-radius:7px;padding:7px;font-size:12px}.oc-upload-types input:checked+span{background:#fff;box-shadow:0 1px 4px #1d324a13}.oc-upload-types input:focus-visible+span{outline:2px solid #6384b6}
.oc-receipt-inputs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.oc-receipt-inputs[hidden]{display:none}.oc-receipt-inputs label:last-child{grid-column:1/-1}
.oc-upload-dialog label{font-size:11px}.oc-upload-dialog input:not([type=radio]),.oc-upload-dialog select{max-width:100%;width:100%;box-sizing:border-box;padding:7px;min-width:0;font-size:12px;border:1px solid #dce2eb;border-radius:7px}
.oc-file-input{display:block;margin-top:10px}.oc-file-input small,.oc-upload-dialog p{font-size:10px;color:#7c8795}.oc-upload-dialog [role=alert]{color:#b44d4d}.oc-upload-dialog button[type=submit]{width:100%;margin-top:10px;font-size:12px}
@media(max-width:480px){.oc-minimal .oc-overview-grid{grid-template-columns:1fr;gap:8px}.oc-minimal .oc-finance{padding-top:8px;border-top:1px solid #eef0f3}.oc-minimal .oc-items li{grid-template-columns:minmax(0,1fr) auto;gap:3px 8px}.oc-minimal .oc-name{grid-column:1}.oc-minimal .oc-line-price{grid-column:1;grid-row:auto}.oc-minimal .oc-sum{grid-column:2;grid-row:span 2}.oc-edit-line{grid-template-columns:minmax(0,1fr) 55px 70px 28px;gap:4px}.oc-edit-line>span{grid-column:1/-1}}

html.apple-office #detail:has(.oc-minimal){padding:12px!important}
html.apple-office #detail:has(.oc-minimal)>.row.between{height:0!important;min-height:0!important;margin:0!important;padding:0!important}
html.apple-office #detail .oc-minimal .oc-head h2{font-size:17px!important;margin:0!important}
html.apple-office .oc-upload-dialog form{display:grid!important;gap:8px!important}
html.apple-office .oc-upload-dialog form>header{margin:0!important;padding:0!important}
html.apple-office .oc-upload-dialog form>p{margin:0!important;min-height:0!important}
html.apple-office .oc-upload-dialog .oc-upload-types{margin:4px 0!important}
html.apple-office .oc-upload-dialog .oc-file-input{margin:0!important}
html.apple-office .oc-upload-dialog [data-upload-error]:empty{display:none}
html.apple-office .oc-minimal .oc-items{border:0!important;border-radius:0!important;padding:0!important}


/* Stable order identity/date/action columns. */
.office .order-list .order-line{display:grid!important;grid-template-columns:28px minmax(130px,160px) minmax(0,1fr) auto minmax(100px,120px) 30px!important;gap:8px!important;align-items:center!important;padding:7px 10px 7px 4px!important;min-height:56px!important}
.office .order-list .order-identity{grid-column:2;grid-row:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.office .order-list .order-number{display:block!important;padding:0!important;min-height:0!important;max-width:100%;text-decoration:none!important;border:0!important;background:transparent!important;text-align:left;line-height:1.4!important;overflow-wrap:anywhere;white-space:normal!important}
.office .order-number:hover,.office .order-number:focus,.office .order-number *{text-decoration:none!important}
.office .order-list .order-shipment-date{display:block!important;font-size:11px!important;font-weight:400!important;line-height:1.4!important;color:#8793a1!important;background:none!important;border:0!important;border-radius:4px!important;padding:0!important;min-height:0!important;min-width:0!important;margin:0!important;text-align:left;text-decoration:none!important}
.office .order-list button.order-shipment-date:hover{color:#42668e!important;background:#edf3fa!important}
.office .order-list button.order-shipment-date:focus-visible{outline:2px solid #8aa9ce;outline-offset:3px}
.office .order-list .expand-order{grid-column:1!important;grid-row:1!important}
.office .order-list .order-client{grid-column:3!important;grid-row:1!important;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.office .order-list .order-indicators{grid-column:4!important;grid-row:1!important;display:flex;flex-wrap:nowrap;align-items:center;gap:5px!important}
.office .order-list .order-amount{grid-column:5!important;grid-row:1!important;text-align:right;white-space:nowrap;margin:0!important;font-variant-numeric:tabular-nums}
html.apple-office .order-list .jd-row-edit{grid-column:6!important;grid-row:1!important;position:static!important;background:transparent!important;color:#7c8da3!important;border:0!important;padding:6px!important;width:30px!important;height:30px!important;min-height:30px!important;min-width:30px!important;margin:0!important;display:grid!important;place-items:center;border-radius:8px!important;box-shadow:none!important}
html.apple-office .order-list .jd-row-edit:hover{background:#edf2f7!important;color:#45678f!important}
.office .order-list .jd-row-edit svg{width:17px!important;height:17px!important}
.jd-date-dialog{width:min(320px,calc(100vw - 24px));box-sizing:border-box}
.jd-date-dialog h3{font-size:14px!important;margin:0 0 12px!important}.jd-date-dialog form{display:grid;gap:12px}.jd-date-dialog input{width:100%;box-sizing:border-box;min-width:0}.jd-date-dialog .date-actions{display:flex;gap:8px}.jd-date-dialog p:empty{display:none}.jd-date-dialog p{font-size:12px;color:#a54c4c;margin:0}
/* Product cards: allow long names and values without moving their controls. */
html.apple-office .jd-product-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;gap:8px!important;align-items:start!important;margin:4px 0 14px!important}
html.apple-office .jd-product-heading h2{font-size:19px!important;line-height:1.3!important;min-width:0;overflow-wrap:anywhere}
.jd-product-main,.jd-product-copy{min-width:0}.jd-product-prices{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:12px!important;padding-bottom:12px!important}.jd-product-prices>div{min-width:0!important}.jd-product-prices strong{font-size:19px!important;overflow-wrap:anywhere}.jd-product-extra .product-specs{display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,2fr);gap:7px 12px}.jd-product-extra dd{margin:0;min-width:0;overflow-wrap:anywhere}.jd-product-card .jd-product-description p{font-size:12px;line-height:1.5}.jd-product-card .jd-product-photo{max-height:220px}
@media(max-width:760px){.office .order-list .order-line{grid-template-columns:24px minmax(0,1fr) auto 30px!important;grid-template-rows:auto auto!important;gap:3px 7px!important;padding:7px 8px 7px 3px!important}.office .order-list .expand-order{grid-column:1!important;grid-row:1/3!important}.office .order-list .order-identity{grid-column:2!important;grid-row:1!important}.office .order-list .order-client{grid-column:2!important;grid-row:2!important;font-size:11px}.office .order-list .order-amount{grid-column:3!important;grid-row:1!important;font-size:12px}.office .order-list .order-indicators{grid-column:3!important;grid-row:2!important;justify-content:flex-end}.office .order-list .jd-row-edit{grid-column:4!important;grid-row:1/3!important}.office .order-list .order-number{font-size:11px!important}.office .order-list .order-shipment-date{font-size:10px!important}.jd-product-extra .product-specs{grid-template-columns:100px minmax(0,1fr)}}

/* Compact stage history below shipment date. */
.oc-minimal .oc-stage-log{margin:3px 0 0;min-width:0;font-size:11px;color:#7b8491;line-height:1.5}
.oc-minimal .oc-stage-log>summary{padding:2px 0;cursor:pointer;font-size:11px;font-weight:400;color:#7b8491;list-style:disclosure-closed}
.oc-minimal .oc-stage-log[open]>summary{list-style:disclosure-open}
.oc-minimal .oc-stage-log .oc-dates{display:flex;flex-direction:column;gap:2px;margin:5px 0 2px;padding:0;border:0;font-size:11px}
.oc-minimal .oc-stage-log .oc-dates span,.oc-minimal .oc-stage-log .oc-stage-updated{font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.oc-minimal .oc-stage-log .jd-history-text,.oc-minimal .oc-stage-log .oc-payment-history{margin:5px 0 0;padding:0;border:0;font-size:11px}
.oc-minimal .oc-stage-log p,.oc-minimal .oc-stage-log time{font-size:11px;line-height:1.5;margin:2px 0}
.oc-minimal .oc-stage-log h3{font-size:11px;margin:6px 0 3px;font-weight:500}

/* Edit the original product list, with visible draft differences. */
.oc-minimal .oc-editing-products{padding:10px 12px}
.oc-minimal .oc-editing-products .oc-edit-form{border:0;padding:0;margin:0;box-shadow:none;background:none}
.oc-minimal .oc-inline-item{display:grid;grid-template-columns:minmax(0,1fr) 64px 96px 94px 28px;gap:6px 10px;align-items:center;padding:8px 0;border-bottom:1px solid #eef0f2}
.oc-minimal .oc-inline-name{min-width:0;overflow-wrap:anywhere;font-size:12px}
.oc-minimal .oc-inline-item label{display:grid;gap:2px;min-width:0;margin:0}
.oc-minimal .oc-inline-item label>span{font-size:10px;color:#8a929e}
.oc-minimal .oc-inline-item input{width:100%;min-width:0;height:30px;padding:4px 7px;font-size:12px;box-sizing:border-box}
.oc-minimal .oc-inline-item [data-line-sum]{font-size:12px;text-align:right;white-space:nowrap}
.oc-minimal [data-line-diff]{grid-column:1/-1;color:#9a6715;font-size:10px;line-height:1.5}
.oc-minimal [data-line-diff]:empty{display:none}
.oc-minimal .oc-removed-item{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;color:#986b6b;padding:6px 0}
.oc-minimal .oc-inline-total{display:flex;justify-content:space-between;font-size:12px;padding:8px 0}
.oc-minimal .oc-total-change{grid-column:1/-1;display:block;color:#9a6715;font-size:10px;line-height:1.5;text-align:right;overflow-wrap:anywhere}
.oc-minimal .oc-total-change:empty{display:none}
.oc-minimal .oc-edit-other{font-size:11px;margin:8px 0}
.oc-minimal .oc-edit-other summary{cursor:pointer;color:#828b98}
.oc-minimal .oc-editor-footer{display:flex;gap:8px;justify-content:flex-end;margin-top:8px}
.oc-minimal .oc-editor-footer button{font-size:12px;padding:7px 12px;min-height:30px}
@media(max-width:600px){.oc-minimal .oc-inline-item{grid-template-columns:64px minmax(80px,1fr) minmax(75px,1fr) 28px;gap:5px 8px}.oc-minimal .oc-inline-name{grid-column:1/4}.oc-minimal .oc-inline-item [data-line-remove]{grid-column:4;grid-row:1}.oc-minimal .oc-inline-qty{grid-column:1;grid-row:2}.oc-minimal .oc-inline-price{grid-column:2;grid-row:2}.oc-minimal .oc-inline-item [data-line-sum]{grid-column:3/5;grid-row:2}}

/* Staff card: isolated from floating form labels. */
#detail:has(#staff-profile-form){width:min(460px,calc(100vw - 24px))!important;max-width:460px!important;padding:20px!important;box-sizing:border-box}
#detail:has(#staff-profile-form)>.row{justify-content:flex-end;margin:0!important;height:24px}#detail:has(#staff-profile-form)>.row>.eyebrow{display:none}
.sp-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px}.sp-heading small,.sp-rights header small{color:#84909b;font-size:11px}.sp-heading h2,.sp-rights h2{font-size:21px;margin:3px 0!important}
#staff-profile-form .sp-row{display:grid;grid-template-columns:90px minmax(0,1fr) 34px;gap:8px;align-items:center;min-height:44px;border-bottom:1px solid #edf0f3}.sp-label{font-size:12px;color:#7b8793}.sp-value{font-size:14px;color:#253544;overflow-wrap:anywhere}.sp-icon{display:inline-flex!important;align-items:center;justify-content:center;width:34px!important;height:34px!important;min-height:34px!important;border:0!important;border-radius:8px!important;padding:8px!important;background:transparent!important;color:#7d8d9c!important;cursor:pointer}.sp-icon:hover{background:#eef4f8!important;color:#138bd1!important}.sp-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.sp-input{grid-column:2/4}.sp-input input,.sp-input select{width:100%!important;min-width:0!important;height:36px!important;min-height:36px!important;padding:6px 8px!important;font-size:14px!important;margin:0!important}.sp-row.editing>.sp-value,.sp-row.editing>.sp-icon{display:none!important}.sp-row.editing .sp-input{display:block}.sp-input[hidden],.sp-footer[hidden]{display:none!important}
#staff-profile-form .sp-menu{display:flex;justify-content:space-between;align-items:center;width:100%;padding:12px 0;border:0;border-bottom:1px solid #edf0f3;border-radius:0;background:transparent;color:#253544;font-size:13px;text-align:left}.sp-menu span{color:#8393a3}.sp-extra{margin-top:6px}.sp-extra>summary{padding:13px 0;font-size:13px;color:#7b8793;cursor:pointer}.sp-id{font-size:10px;color:#9aa4ae;overflow-wrap:anywhere}.sp-delete{color:#cf3535!important;background:transparent!important;border:0!important;padding:8px 0!important;font-size:12px}.sp-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.sp-footer button{min-height:36px;padding:8px 16px;border-radius:9px}.sp-error:empty{display:none}.sp-error{color:#c52b2b;font-size:12px}
.staff-system,.employee-dot,.employee-open{border-radius:8px!important;width:32px!important;height:32px!important;min-height:32px!important;padding:6px!important;box-sizing:border-box}.staff-system{color:#a0a8b0!important;background:#f0f2f4!important}.staff-system.tg.linked{color:#229ed9!important;background:#eaf6fc!important}.staff-system.saby.linked{color:#009fe3!important;background:#eaf6fc!important}.staff-system svg{width:20px!important;height:20px!important}
.sp-rights{width:min(460px,calc(100vw - 24px));max-height:85dvh;overflow:auto;border:0;border-radius:18px;padding:22px;box-sizing:border-box}.sp-rights::backdrop{background:#172d4140}.sp-rights header{display:flex;justify-content:space-between;align-items:center}.sp-caption{font-size:12px;color:#7b8793;margin:12px 0}.sp-rights details{border-bottom:1px solid #e8edf1}.sp-rights summary{padding:12px 0;cursor:pointer;font-size:14px}.sp-rights summary small{float:right;color:#8b98a3}.sp-permission{display:flex;justify-content:space-between;align-items:center;gap:14px;font-size:12px;padding:8px 0}.sp-permission input{width:18px;height:18px;flex:none;accent-color:#199bdb}.sp-rights footer{text-align:right;margin-top:16px}

#staff-profile-form,.sp-rights form{display:block!important;gap:0!important}
#staff-profile-form .sp-extra,.sp-rights details{margin:0!important;padding:0!important}
#staff-profile-form .sp-extra>summary,.sp-rights summary{padding:12px 0!important;min-height:0!important;line-height:20px!important}
#detail .sp-heading{margin:0 0 10px!important;min-height:42px!important}.sp-heading h2,.sp-rights h2{line-height:26px!important}.sp-heading small{line-height:16px!important}
#detail .staff-system,#app .staff-system,#app .icon-button,#detail .icon-button,#app .employee-dot,#app .employee-open{border-radius:8px!important}
#detail .staff-system.tg.linked,#app .staff-system.tg.linked{color:#229ed9!important;background:#eaf6fc!important}
#detail .staff-system.saby.linked,#app .staff-system.saby.linked{color:#009fe3!important;background:#eaf6fc!important}
#detail .staff-system:not(.linked),#app .staff-system:not(.linked){color:#a0a8b0!important;background:#f0f2f4!important}

.sp-caption-edit{display:flex;align-items:center;gap:6px;height:28px}.sp-caption-edit .sp-icon{width:28px!important;height:28px!important;min-height:28px!important;padding:5px!important}#staff-profile-form .sp-row{grid-template-columns:90px minmax(0,1fr)!important}.sp-row .sp-input{grid-column:2!important}.sp-rights .sp-permission select{width:170px;max-width:50%;min-height:32px;padding:4px 6px;font-size:12px}.sp-rights footer{display:flex;justify-content:flex-end;gap:8px}

/* Persistent BK navigation, shared by all staff pages. */
.office>.office-header{position:sticky!important;top:0!important;z-index:100!important;background:rgba(248,249,251,.98);backdrop-filter:blur(14px);isolation:isolate}
.office{overflow:visible!important}.pb-edit-controls{display:flex;align-items:center;gap:8px;margin:10px 0}.pb-edit-controls [hidden]{display:none!important}.pb-edit-controls svg{width:18px;height:18px}

.office{--bk-header-height:64px;padding-top:var(--bk-header-height)}
.office>.office-header{position:fixed!important;inset:0 0 auto 0!important;width:100%;height:var(--bk-header-height)!important;box-sizing:border-box}
@media(max-width:760px){.office{--bk-header-height:58px}}
@media(max-width:480px){.office{--bk-header-height:50px}}

#detail .oc-recipient-fields{display:flex;flex-wrap:wrap;gap:5px 10px}#detail .oc-recipient-fields label{flex:1 1 9em;min-width:0}#detail .oc-recipient-fields input{width:100%;box-sizing:border-box}
#detail .oc-line-head,#detail .oc-inline-item{display:grid;grid-template-columns:minmax(0,1fr) clamp(35px,8vw,58px) clamp(52px,11vw,82px) clamp(67px,13vw,98px) 26px;align-items:center;gap:2px 5px;padding:3px 0}
#detail .oc-line-head{font-size:10px;color:#596475}#detail .oc-inline-item>*{grid-column:auto;grid-row:auto;min-width:0}#detail .oc-inline-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#detail .oc-inline-item label>span{display:none}#detail .oc-inline-item input,#detail .oc-inline-item button{min-height:26px;height:26px;padding:1px 4px;margin:0}
#detail .oc-inline-item [data-line-diff]{grid-column:1/-1;font-size:10px}#detail [data-line-diff]:empty,#detail [data-client-options]:empty{display:none}

#detail .oc-line-head,#detail .oc-inline-item{grid-template-columns:minmax(0,1fr) clamp(50px,9vw,82px) clamp(33px,6vw,58px) clamp(46px,9vw,82px) clamp(55px,10vw,98px) 24px;column-gap:3px}
#detail .oc-inline-item .oc-pack{box-sizing:border-box;width:100%;min-width:0;min-height:26px;height:26px;font-size:12px;padding:1px 2px}

/* Compact product details and a single editing entry point. */
#detail .jd-product-card .product-specs{grid-template-columns:minmax(105px,30%) minmax(0,1fr);gap:4px 12px;margin:6px 0;font-size:12px;line-height:1.3}
#detail .jd-product-card .product-specs dt,#detail .jd-product-card .product-specs dd{margin:0;padding:2px 0;min-height:0}
#detail .jd-product-extra,#detail .jd-product-description{margin:6px 0;padding:4px 0}
#detail .jd-product-card .jd-product-main{gap:12px;margin:8px 0}
#detail .archive-history .archive-log{font-size:11px!important;line-height:1.25!important;padding:2px 0!important;margin:0!important;min-height:0!important}
#detail .jd-pack-edit{margin-top:8px}#detail .jd-pack-row{display:grid;grid-template-columns:minmax(55px,1fr) minmax(65px,1fr) minmax(85px,1fr) auto;gap:6px;align-items:end}
#detail .jd-pack-row label{font-size:11px;min-width:0}#detail .jd-pack-row input{width:100%;min-width:0;box-sizing:border-box;height:32px;min-height:32px;padding:4px 6px}#detail .jd-pack-row [role=status]{grid-column:1/-1}
@media(max-width:520px){#detail .jd-pack-row{grid-template-columns:repeat(3,minmax(0,1fr))}#detail .jd-pack-row button{grid-column:1/-1}}

.jd-file-drag{cursor:move;touch-action:none;user-select:none}.jd-file-dialog .jd-storage-frame{width:100%;height:100%;min-height:55vh;border:0}.jd-file-dialog .jd-file-body{min-height:0;flex:1;overflow:auto}.payment-file-purpose{display:flex;align-items:center;gap:6px}.payment-file-purpose select{max-width:160px;font-size:12px;min-height:28px}

.jd-file-dialog .jd-file-body>img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;margin:auto}.jd-file-dialog .jd-storage-frame{min-height:0;height:100%}
