:root{--bg:#f3f5f2;--ink:#243c35;--muted:#7a8780;--green:#17674e;--line:#e3e8e2}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.65 -apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',sans-serif}a{color:var(--green);text-decoration:none}a:hover{text-decoration:underline}aside{width:220px;position:fixed;inset:0 auto 0 0;background:#193e32;color:#fff;padding:35px 24px;display:flex;flex-direction:column}.brand{font-size:29px;color:#fff;font-weight:750;letter-spacing:3px}.brand span{color:#b7d79e}.brand small{font-size:9px;letter-spacing:2px;color:#b1c7b8}.navlabel{font-size:10px;letter-spacing:2px;color:#9ab3a3;margin:38px 0 12px}nav a{display:block;padding:12px;color:#d9e5dc;border-radius:7px}nav a:hover{background:#2b5143;color:#fff;text-decoration:none}.sidefoot{margin-top:auto;font-size:11px;color:#9ab3a3}main{margin-left:220px}header{height:76px;background:#fff;border-bottom:1px solid var(--line);padding:0 38px;display:flex;align-items:center;justify-content:space-between}header div{display:flex;gap:18px;align-items:center}header a,header button{font-size:12px}.content{padding:36px;max-width:1600px;margin:auto}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:#708876;margin:9px 0}h1{font-size:29px;line-height:1.3;margin:12px 0;font-weight:650}h2{font-size:17px;margin:0}h3{font-size:14px}.muted,.hint{color:var(--muted)}.hint{font-size:12px}.heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.card{background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:24px;overflow:hidden}.pad{padding:24px}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:20px;margin:24px 0}.stats .card{padding:24px;margin:0}.stats span{display:block;color:var(--muted);font-size:12px}.stats strong{display:block;font-size:29px;margin:12px 0}.stats small{color:var(--muted);font-size:11px}small{display:block}.sectionhead{display:flex;justify-content:space-between;align-items:center;padding:22px 24px;border-bottom:1px solid var(--line)}.sectionhead a{font-size:12px}.tablewrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{background:#fafbf9;font-weight:500;color:#7b887f;padding:14px 20px;white-space:nowrap}td{padding:17px 20px;border-top:1px solid #f0f2ed;vertical-align:top}td small{max-width:330px;margin-top:4px}td b{font-size:12px;font-weight:600}tr:hover td{background:#fcfdfa}.badge{display:inline-block;font-size:11px;background:#edf5ec;color:#46744c;padding:3px 10px;border-radius:4px;white-space:nowrap}.warning{color:#a26a1b}.empty{padding:38px;text-align:center;color:var(--muted)}button,.button{display:inline-block;border:1px solid #d7e0d7;border-radius:6px;padding:9px 15px;cursor:pointer;background:white;color:var(--ink);font:inherit;font-size:12px}button:hover,.button:hover{background:#eaf1e8;text-decoration:none}.primary{background:var(--green);color:#fff;border-color:var(--green)}.primary:hover{background:#124d3a;color:#fff}.textbutton{border:0;padding:0;color:var(--muted)}input,select,textarea{border:1px solid #d9e1d8;border-radius:5px;padding:10px 12px;font:inherit;color:var(--ink);background:#fff;max-width:100%}input:not([type=checkbox]),textarea,select{width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #87b59b;outline-offset:2px}input[type=checkbox]{width:18px;height:18px;vertical-align:middle}textarea{height:90px}label{display:block;font-size:12px;margin-bottom:6px}.helptext{font-size:11px;color:var(--muted)}.helptext ul{padding-left:18px}.errorlist{color:#a03434;background:#fff0ee;padding:12px 24px;border-radius:5px}.filters{display:flex;gap:10px;padding:20px;align-items:center;flex-wrap:wrap}.filters input{width:260px}.filters select{width:auto;min-width:130px}.pagination{padding:18px 24px;color:var(--muted);font-size:12px}.pagination a{margin-left:15px}.columns{display:grid;grid-template-columns:1.2fr 1fr;gap:24px}.compact{padding:15px 0}.compact strong{font-size:21px}.pre{white-space:pre-wrap}.notice{background:#edf3e4;border:1px solid #dce7d0;padding:15px 20px;border-radius:7px;margin-bottom:20px}.formcard{max-width:720px;padding:28px}.listrow{display:flex;align-items:center;gap:20px;padding:17px 24px;border-top:1px solid var(--line);font-size:12px}hr{border:0;border-top:1px solid var(--line);margin:25px 0}.guest{margin:0}.guest .content{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at 15% 10%,#dbe7d4,transparent 55%)}.login{background:#fff;border:1px solid var(--line);padding:48px;border-radius:16px;width:min(460px,100%);box-shadow:0 20px 80px #234b3510}.login form{margin:30px 0}.wide{width:100%}@media(max-width:1000px){aside{width:180px;padding:25px 15px}main{margin-left:180px}.content{padding:22px}.columns{grid-template-columns:1fr}.heading{align-items:flex-start}header{padding:0 22px}}@media(max-width:650px){aside{position:static;width:100%;padding:18px}aside .brand{font-size:22px}aside small,.sidefoot,.navlabel{display:none}nav{display:flex;flex-wrap:wrap}nav a{font-size:12px;padding:8px}main{margin:0}header{height:auto;padding:12px;gap:15px;flex-wrap:wrap}.content{padding:16px}h1{font-size:23px}.heading{display:block}.heading .button{margin-top:10px}.stats{grid-template-columns:1fr 1fr;gap:10px}.stats .card{padding:16px}.stats strong{font-size:22px}.login{padding:28px}.filters input{width:100%}}

.product-thumb{width:80px;height:80px;background:#f3f5f3;border:1px solid #dde4df;border-radius:8px;display:flex;align-items:center;justify-content:center;overflow:hidden}.product-thumb img{display:block;width:80px;height:80px;object-fit:contain;background:white}.product-thumb span{font-size:12px;color:#78877e}

.order-lines{min-width:1350px}.order-lines td{padding:15px 12px}.order-lines th{padding:14px 12px}.order-lines tr[data-detail-url]{cursor:pointer}.order-lines .nowrap{white-space:nowrap}.order-lines .channel-form{min-width:135px}.channel-form select{padding:6px;font-size:12px}.channel-form button{margin-top:6px;padding:4px 10px}

.copy-toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#193e32;color:white;padding:10px 20px;border-radius:8px;z-index:9999;max-width:90vw;pointer-events:none}

.copy-helper{position:fixed;left:-9999px;top:0;opacity:0}

.order-lines{min-width:1150px;table-layout:fixed}.order-lines th:first-child{width:155px}.order-lines th:nth-child(2){width:85px}.order-lines th:nth-child(3){width:145px}.order-lines th:nth-child(4){width:55px}.order-lines th:nth-child(6){width:150px}.order-lines th:nth-child(8){width:150px}.order-lines .order-number,.order-lines .sku-column{white-space:normal;overflow-wrap:anywhere}.order-lines .sku-column small{white-space:pre-wrap}.order-lines td,.order-lines th{padding:12px 8px}.copy-menu{position:fixed;z-index:10000;background:white;border:1px solid #cdd8d0;border-radius:7px;box-shadow:0 4px 18px #193e3226;padding:4px;min-width:100px}.copy-menu button{width:100%;border:0;text-align:left}

/* Bright, readable order workspace. */
:root{--bg:#f4f7fb;--ink:#203247;--muted:#62748a;--line:#d8e2ed;--green:#14634c}
body{font-size:14px;color:var(--ink)}
.content{max-width:1800px}.card{border-color:#d6e1ec;box-shadow:0 2px 8px #20324705}
.heading h1{color:#17324d}.heading p{color:#5b7087}
.sectionhead{background:#fbfdff;border-bottom-color:#d6e1ec}
.order-lines{font-size:13px;background:#fff}
.order-lines th{background:#eaf1f8;color:#304b66;font-size:13px;font-weight:650;border:1px solid #d2deeb;padding:15px 10px;vertical-align:middle}
.order-lines td{border:1px solid #dce5ee;padding:16px 10px;vertical-align:middle;line-height:1.65;color:#24384e}
.order-lines tbody tr:nth-child(even) td{background:#f8fbfe}
.order-lines tbody tr:hover td{background:#edf5fc}
.order-lines b{font-size:13px;font-weight:650}.order-lines small{font-size:12px;line-height:1.65;margin-top:6px}
.order-lines a{color:#176294;font-weight:600}.order-lines .muted{color:#62748a}
.order-lines .order-number a{font-size:14px}.order-lines .points-column b{color:#a66108}
.order-lines .points-column small{color:#334b64;font-weight:600}
.order-lines .badge{font-size:12px;border:1px solid #cce2d3;background:#eaf6ee;color:#21603b}
.channel-form select{border-color:#bccddd;background:#fff;color:#253d56}.channel-form button{border-color:#b9cddd;color:#205875;background:#f1f7fc}
.filters{background:#fbfdff;border-bottom:1px solid #d8e2ed}.filters input,.filters select{border-color:#c6d4e3}
.product-thumb{border-color:#d0dce9;background:#f6f9fc}.pagination{background:#fbfdff;border-top:1px solid #d8e2ed}

/* Compact rows aligned with the 80px thumbnails. */
.order-lines tbody td{padding:5px 8px;line-height:1.4;height:90px;vertical-align:middle}
.order-lines tbody td small{margin-top:3px;line-height:1.4}
.order-lines .sku-column{overflow-wrap:anywhere}
.order-lines th:nth-child(4){width:70px}
.order-lines td:nth-child(4) small{white-space:nowrap;font-size:11px}
.order-lines td:nth-child(2) small{display:none}
.order-lines .channel-form select{padding:5px 6px;min-height:30px}
.order-lines .channel-form button{margin-top:3px;padding:3px 10px}

.channel-form .channel-provider,.channel-form .channel-note{margin-top:3px;font-size:12px;padding:5px 6px}.channel-form [hidden]{display:none!important}.order-lines .channel-form{min-width:130px}.order-lines .channel-form button{padding:2px 10px;margin-top:3px}

dialog{border:1px solid #cddbea;border-radius:12px;padding:25px;width:min(560px,90vw);max-height:85vh;overflow:auto;color:var(--ink)}dialog::backdrop{background:#16314d66}.purchase-record{border:1px solid #d5e1ed;background:#f8fbff;border-radius:7px;padding:12px;margin-top:12px}.purchase-record p{margin:5px 0}.channel-save-status{color:#246d48;font-size:12px}.channel-save[hidden]{display:none}

.order-lines.expanded-orders{min-width:3550px}.expanded-orders th{width:125px!important}.expanded-orders th:first-child{width:160px!important}.expanded-orders th:nth-child(2){width:96px!important}.expanded-orders th:nth-child(3){width:155px!important}.expanded-orders th:nth-child(8){width:155px!important}.expanded-orders th:nth-child(21),.expanded-orders th:nth-child(22){width:210px!important}.expanded-orders .wrap-data{white-space:normal;overflow-wrap:anywhere}.cell-note{max-height:72px;overflow:auto;white-space:pre-wrap}.expanded-orders thead th{position:sticky;top:0;z-index:1}

/* Compact the seven identification columns without stretching them. */
.order-lines.expanded-orders{width:2943px;min-width:2943px}
.order-lines.expanded-orders th:nth-child(1){width:130px!important}
.order-lines.expanded-orders th:nth-child(2){width:90px!important}
.order-lines.expanded-orders th:nth-child(3){width:110px!important}
.order-lines.expanded-orders th:nth-child(4){width:48px!important}
.order-lines.expanded-orders th:nth-child(5){width:100px!important}
.order-lines.expanded-orders th:nth-child(6){width:65px!important}
.order-lines.expanded-orders th:nth-child(7){width:75px!important}
.expanded-orders th:nth-child(-n+7),.expanded-orders td:nth-child(-n+7){padding-left:5px;padding-right:5px}
.expanded-orders td:nth-child(1){font-size:12px}.expanded-orders td:nth-child(1) small{font-size:11px}
.expanded-orders td:nth-child(3) b{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:12px}
.expanded-orders td:nth-child(4) small{font-size:10px;letter-spacing:-.3px}
.expanded-orders td:nth-child(5) small{font-size:10px;white-space:normal}
.expanded-orders td:nth-child(7){white-space:normal;overflow-wrap:anywhere}

.inline-field[data-inline-field]{cursor:text;min-height:28px;border:1px dashed #b9ccdf;border-radius:4px;padding:4px;overflow-wrap:anywhere}.inline-field[data-inline-field]:hover,.inline-field[data-inline-field]:focus{background:#edf6ff;border-color:#4a8abd;outline:none}.inline-input{width:100%;min-width:0;padding:5px;font-size:12px}.inline-feedback{color:#3f6d90;font-size:10px}.inline-field .inline-display[hidden]{display:none}

.cargo-mode{font-size:11px;padding:4px 2px;margin-top:5px}.cargo-feedback{font-size:10px;color:#456e8c}

/* Compact three-panel order detail; full history stays in dialogs. */
.content:has(.detail-workspace){padding:16px 20px}
body:has(.detail-workspace) header{height:52px}
.detail-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.detail-top h1{font-size:21px;margin:4px 0}.detail-top small{font-size:11px;color:#5c7087}
.detail-actions{display:flex;gap:6px;flex-wrap:wrap}.detail-actions button{padding:6px 10px}
.detail-grid{display:grid;grid-template-columns:1fr 1fr 1.06fr;gap:12px;align-items:start}
.detail-panel{padding:13px;margin:0;min-width:0}.detail-panel h2{font-size:15px;margin:0 0 10px;padding-bottom:7px;border-bottom:1px solid #dce5ee}
.detail-panel h3{font-size:13px;margin:10px 0 6px}.detail-product{display:flex;gap:9px;align-items:center;min-height:80px}.detail-product>div{min-width:0}.detail-product b{overflow-wrap:anywhere;font-size:12px}
.detail-product .short-title{font-size:11px;margin:4px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.detail-product small{display:none}
.detail-metrics{display:flex;gap:7px;flex-wrap:wrap;background:#f0f6fc;border:1px solid #dce7f1;border-radius:5px;padding:7px;margin:8px 0;font-size:11px}
.detail-address{padding:8px 0;border-bottom:1px solid #dce5ee;font-size:12px}.detail-address p{margin:4px 0;overflow-wrap:anywhere}
.compact-form{margin:7px 0}.compact-fields{display:grid;grid-template-columns:1fr 1fr;gap:7px 9px}.compact-fields>div{min-width:0}.compact-fields .full{grid-column:1/-1}
.detail-workspace label{font-size:11px;margin:0 0 3px;color:#486079}.detail-workspace input,.detail-workspace select{padding:6px 7px;font-size:12px;height:32px}
.detail-workspace textarea{height:47px;min-height:40px;padding:6px 7px;font-size:12px;resize:vertical}
.detail-workspace button{font-size:11px;padding:6px 10px}.compact-form>button{margin-top:7px}
.detail-channel{display:grid;grid-template-columns:1fr 1fr;gap:5px}.detail-channel .channel-note{grid-column:1/-1}.detail-channel .channel-provider,.detail-channel .channel-note{margin:0}.detail-channel .channel-save-status{grid-column:1/-1}
.detail-note{padding-bottom:8px;border-bottom:1px solid #dce5ee}.detail-note textarea{display:block}.detail-status{font-size:12px;margin:8px 0}
.rate-summary{font-size:11px;color:#59708b;margin:7px 0}.profit-summary{display:grid;grid-template-columns:1.3fr 1fr;gap:6px;border:1px solid #cddfcf;background:#f0f8f0;border-radius:6px;padding:10px;margin:10px 0;font-size:11px}.profit-summary strong{display:block;font-size:21px;color:#1b684b;margin-top:2px}
.detail-workspace dialog{width:min(680px,92vw)}.detail-workspace .hint{font-size:10px;line-height:1.4}
@media(max-width:1150px){.detail-grid{grid-template-columns:1fr 1fr}.detail-panel:last-child{grid-column:1/-1}.detail-panel:last-child .compact-fields{grid-template-columns:repeat(4,1fr)}}
@media(max-width:760px){.detail-grid{grid-template-columns:1fr}.detail-panel:last-child{grid-column:auto}.detail-top{align-items:flex-start;flex-direction:column}.detail-panel:last-child .compact-fields{grid-template-columns:1fr 1fr}}
