/* Approved B UI v0.2: compact live sales and continuous full-session packing manifest */
.live-headbar{display:flex;align-items:center;gap:12px;padding:12px 16px;margin-bottom:9px;min-height:84px;flex-wrap:nowrap}
.live-brand{display:flex;align-items:center;gap:11px;min-width:0;max-width:330px;flex:1.2}
.live-logo{width:145px;height:67px;object-fit:contain;border-radius:8px;background:#f0f7ff;border:1px solid #e3edfb}
.live-logo-placeholder{display:grid;place-content:center;background:#edf5ff;color:#1670e8;border-radius:8px;width:145px;height:67px;text-align:center;font-size:27px;flex-shrink:0}
.live-logo-placeholder small{font-size:11px;display:block}
.live-session-name b{display:block;font-size:13px}
.live-session-name small{font-size:11px;color:#798ba6}
.live-select-stack{display:grid;gap:5px;min-width:145px;flex:1}
.live-select-stack label{display:grid;grid-template-columns:59px minmax(0,1fr);gap:5px;align-items:center;font-size:11px;font-weight:700;color:#627693}
.live-select-stack select{padding:6px;height:31px;font-size:12px;width:100%}
.live-top-settings{width:80px;flex:none}
.live-top-settings button{font-size:10px;white-space:normal;padding:6px}
.live-headitem{flex:1;border-left:1px solid #e8eff8;padding-left:12px;min-width:72px}
.live-headitem small{display:block;font-size:11px;color:#758ba8}
.live-headitem b{font-size:12px;display:block;margin-top:6px;white-space:nowrap}
.live-headitem strong{font-size:22px;color:#183053;display:block;margin-top:4px}
.live-session-picker{display:flex;gap:8px;align-items:center;margin:0 0 9px;padding:4px 3px;flex-wrap:wrap}
.live-session-picker select{min-width:195px;max-width:360px;padding:6px;font-size:11px;height:34px}
.live-session-picker .grow{flex:1}
.live-split{display:grid;grid-template-columns:minmax(0,65fr) minmax(0,35fr);gap:11px;align-items:start}
.live-entry,.live-merged{min-width:0;padding:14px}
.live-entry h3,.live-merged h3,.setting-panel h3{font-size:14px;color:#176ce5;margin:0 0 11px}
.live-entry>h3:not(:first-child){margin-top:16px}
.live-fields{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,.9fr) minmax(0,1.4fr);gap:8px}
.live-fields label,.live-order-fields label{display:grid;gap:5px;min-width:0;font-size:11px;font-weight:700;color:#243e63}
.live-fields input{height:39px;width:100%;font-weight:400}
.live-product-header{display:flex;gap:10px;align-items:center;padding:7px 0}
.live-product-header b{font-size:14px}
.live-product-area{display:grid;grid-template-columns:minmax(160px,41%) minmax(0,59%);gap:11px;min-width:0}
.live-main-photo{min-width:0}
.live-main-photo>img{display:block;width:100%;height:270px;background:#f5f7fa;object-fit:contain;border:1px solid #e7edf5;border-radius:9px}
.live-photo-strip{display:flex;gap:6px;margin-top:7px}
.live-photo-strip span{flex:1;min-width:0;display:block;max-width:64px;padding:3px;background:#f6f9fc;border:1px solid #e4e9f2;border-radius:7px}
.live-photo-strip img{height:39px;width:100%;object-fit:contain}
.live-colorlist{min-width:0}
.live-color-row{display:flex;align-items:center;gap:7px;border-bottom:1px solid #eaf0f8;padding:5px 0;min-height:53px}
.live-color-thumb img{width:43px;height:42px;object-fit:contain}
.live-color-row>b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:12px}
.live-quantity{white-space:nowrap;color:#7b8aa3;font-size:11px}
.live-quantity strong{color:#146de6;font-size:13px}
.live-color-row button{padding:9px 10px;font-size:11px;white-space:nowrap;flex:none}
.live-order-fields{display:grid;grid-template-columns:100px minmax(150px,1fr);gap:9px}
.live-order-fields input{width:100%}
.live-order-fields p{grid-column:1/-1;font-size:11px;color:#7d8ca1;margin:0;line-height:1.5}
.live-flow-header{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-top:15px;border-top:1px solid #edf1f6;padding-top:12px}
.live-flow-header h3{margin:0}
.live-flow-header small{font-size:10px;color:#8b9bb1}
.live-raw-wrap{overflow-x:auto;max-height:410px;overflow-y:auto}
.live-flow-table{font-size:11px}
.live-flow-table th{padding:9px 6px}
.live-flow-table td{padding:7px 6px}
.live-flow-product{display:flex;gap:4px;align-items:center}
.live-flow-product img{width:25px;height:25px}
.danger-text{color:#db424a!important}
.live-merged h3{color:#183053}
.live-merged>p{color:#8191a5;font-size:11px;line-height:1.5;margin-top:-5px}
.live-buyer{border:1px solid #e4eefa;border-radius:9px;margin:8px 0;overflow:hidden}
.live-buyer-head{display:flex;align-items:center;width:100%;gap:5px;justify-content:space-between;padding:10px 8px;background:#fff;text-align:left;border:0;border-radius:0}
.live-buyer-head>span:first-child{flex:1;min-width:0;font-size:11px}
.live-buyer-head b{font-size:12px}
.live-merge-hint{background:#f2f8ff;color:#4276ad;font-size:10px;padding:7px}
.live-buyer-expanded{padding:0 8px 9px}
.live-buyer-scroll{overflow-x:auto}
.live-buyer table{width:100%;border-collapse:collapse;font-size:10px;min-width:330px}
.live-buyer th{background:#f8faff;text-align:left;padding:8px 5px;color:#647a9a;white-space:nowrap}
.live-buyer td{border-bottom:1px solid #f1f4f9;padding:8px 5px;vertical-align:middle}
.live-buyer-foot{display:flex;align-items:center;justify-content:space-between;margin-top:6px}
.live-buyer-foot small{color:#91a1ba}
.session-manifest{padding:0 12px}
.manifest-customer{padding:12px 5px;border-bottom:2px solid #d1deef;break-inside:avoid-page}
.manifest-customer:last-child{border-bottom:0}
.manifest-usps{display:flex;align-items:center;gap:13px;min-width:0}
.manifest-index{width:30px;height:30px;background:#e4f0ff;color:#1269df;border-radius:50%;display:grid;place-items:center;flex:none;font-weight:800;font-size:15px}
.tracking-label{display:flex;align-items:center;gap:18px;flex:1;min-width:0}
.tracking-label>span{white-space:nowrap;font-weight:700;color:#234068}
.tracking-bar{width:min(680px,100%);min-width:0}
.tracking-bar svg{width:100%;height:47px;display:block}
.tracking-bar strong{display:block;text-align:center;font-size:13px;letter-spacing:1px;color:#172949}
.tracking-missing{background:#fff6e8;border:1px dashed #dca353;padding:12px;color:#9b6411}
.manifest-address{display:flex;align-items:center;gap:26px;flex-wrap:wrap;padding:9px 3px 8px;font-size:12px;line-height:1.5}
.manifest-address span:last-child{flex:1;min-width:180px;overflow-wrap:anywhere}
.manifest-address b{margin-right:4px;color:#183b74}
.manifest-itemscroll{overflow-x:auto;max-width:100%}
.manifest-table{width:100%;border-collapse:collapse;table-layout:fixed}
.manifest-table th{background:#eaf4ff;color:#4b6c91;font-size:11px;text-align:left;padding:7px 8px}
.manifest-table td{border-bottom:1px solid #e9eef7;padding:5px 8px;font-size:12px;overflow-wrap:anywhere}
.manifest-table tr:last-child td{border-bottom:0}
.manifest-color img{width:34px;height:34px;object-fit:contain}
.manifest-sku-barcode{display:flex;align-items:center;gap:8px;max-width:100%}
.manifest-sku-barcode svg{width:min(150px,72%);height:30px;flex:none}
.manifest-sku-barcode span{font-size:11px;white-space:nowrap}
.settings-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.setting-panel{padding:16px}
.setting-panel p{font-size:12px;line-height:1.6;color:#7890ac}
.option-line,.option-add{display:flex;align-items:center;gap:8px;border-top:1px solid #e8edf5;padding:10px 0}
.option-line b{font-size:12px}
.option-line .grow,.option-add input{flex:1}
.logo-admin-preview img{width:200px;max-width:100%;height:95px;object-fit:contain;border:1px solid #dce6f4}
.logo-admin-preview div{background:#f3f8ff;color:#8190a9;padding:20px}
#live-logo-upload{margin:10px 0;width:100%}
@media(max-width:1240px){.live-headbar{gap:8px;padding:9px}.live-brand{max-width:280px}.live-logo,.live-logo-placeholder{width:108px}.live-color-row{gap:4px}.live-color-row button{padding:7px 8px}.live-headitem{min-width:62px;padding-left:7px}}
@media(max-width:1050px){.live-split{grid-template-columns:1fr}.live-merged{max-height:none}.live-brand{max-width:none}.live-main-photo>img{height:265px}.live-headbar{flex-wrap:wrap}.live-headitem{min-width:110px}.settings-layout{grid-template-columns:1fr}}
@media(max-width:700px){.live-headbar{gap:8px;padding:10px}.live-brand{flex:1 1 100%;width:100%}.live-logo,.live-logo-placeholder{width:115px;height:65px}.live-top-settings{width:auto}.live-top-settings button{max-width:105px}.live-headitem{min-width:calc(50% - 8px);flex:1}.live-session-picker{font-size:11px}.live-session-picker select{max-width:100%;flex:1}.live-entry,.live-merged{padding:10px}.live-fields{grid-template-columns:1fr 1fr}.live-fields label:last-child{grid-column:1/-1}.live-product-area{grid-template-columns:1fr}.live-main-photo>img{height:200px}.live-photo-strip{justify-content:center}.live-color-row{gap:7px}.live-color-row button{padding:8px}.live-order-fields{grid-template-columns:100px 1fr}.session-manifest{padding:0 8px}.manifest-customer{padding:12px 0}.tracking-label{display:block}.tracking-bar{width:100%}.tracking-bar svg{height:40px}.manifest-address{gap:4px 12px;font-size:11px}.manifest-table{min-width:610px}.manifest-table th,.manifest-table td{padding:5px;font-size:11px}.manifest-sku-barcode svg{width:112px}.settings-layout{display:block}.setting-panel{margin-bottom:10px}}
@media print{.print-area .manifest-print-top{font-size:10pt;border-bottom:2px solid #222;padding:0 0 4mm;margin-bottom:4mm}.print-area .manifest-customer{padding:3mm 0;border-bottom:1px solid #333;break-inside:avoid}.print-area .manifest-index{display:none}.print-area .manifest-usps{display:block}.print-area .tracking-label{display:flex;gap:8mm}.print-area .tracking-bar{width:140mm;max-width:100%}.print-area .tracking-bar svg{height:14mm}.print-area .tracking-bar strong{font-size:10pt}.print-area .manifest-address{display:block;font-size:10pt;padding:3mm 0}.print-area .manifest-address span{margin-right:6mm}.print-area .manifest-table{min-width:0;table-layout:fixed}.print-area .manifest-table th,.print-area .manifest-table td{padding:1.5mm;font-size:9pt;border:1px solid #aaa}.print-area .manifest-color img{width:11mm;height:11mm}.print-area .manifest-sku-barcode{display:flex;gap:3mm}.print-area .manifest-sku-barcode svg{width:30mm;height:11mm}.print-area .tracking-missing{color:black;border:1px dashed #aaa}.print-area .manifest-customer:last-child{border-bottom:0}}

/* Uploaded product/color images must never escape card geometry. */
.product-card{overflow:hidden}
.product-top,.product-meta,.variant-row,.variant-list{min-width:0}
.variant-list{overflow:hidden}
.variant-row{overflow:hidden}
.variant-row .thumb{display:flex;width:28px;height:28px;max-width:28px;max-height:28px;overflow:hidden;align-items:center;justify-content:center;flex:none}
.variant-row .thumb img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
.variant-row>*{min-width:0}
.product-card img{max-width:100%}
.live-photo-strip .live-photo-tile{display:flex;align-items:center;justify-content:center;min-width:0;width:54px;height:52px;padding:3px;background:#f6f9fc;border:1px solid #e4e9f2;border-radius:7px}
.live-photo-strip .live-photo-tile.selected{border:2px solid #1769e8}
.live-photo-strip .live-photo-tile img{height:42px;width:100%;max-width:100%;object-fit:contain;display:block}
.live-photo-strip{flex-wrap:wrap;max-width:100%}
.live-product-area,.live-main-photo,.live-colorlist{min-width:0;overflow:hidden}
.live-main-photo>img{max-width:100%;object-fit:contain;display:block}
.live-color-thumb{width:43px;height:42px;min-width:43px;overflow:hidden}
.live-color-thumb img{width:100%;height:100%;object-fit:contain}
@media(max-width:700px){.variant-row .thumb{width:30px;height:30px;max-width:30px;max-height:30px}.live-photo-strip .live-photo-tile{width:52px}}

/* Cancellation controls belong only to the on-screen manifest, not the printout. */
.manifest-cancel-actions{margin-left:auto;display:flex;align-items:center;gap:8px;flex:none}
.manifest-cancel-btn,.manifest-cancel-line{border-color:#f3c8c8!important;color:#b73745!important;background:#fff7f7!important;white-space:nowrap}
.manifest-cancel-locked{font-size:12px;color:#976f28;white-space:nowrap}
.manifest-cancel-line{font-size:12px;padding:5px 8px}
.manifest-cancel-history{margin-top:14px;padding:14px}
.manifest-cancel-history h3{margin:0 0 6px;font-size:17px}
.manifest-cancel-history p{color:#6b7890;font-size:13px;margin:0 0 12px}
@media(max-width:800px){.manifest-usps{flex-wrap:wrap}.manifest-cancel-actions{width:100%;justify-content:flex-end}}
@media print{.manifest-cancel-actions,.manifest-cancel-line,.manifest-cancel-history{display:none!important}}

/* manifest-print-table-border-fix-20261028
   Print the entire last table row border. Screen CSS intentionally hides the
   final row's bottom rule, but that must never carry into the paper manifest.
   Also avoid clipping oversized package tables and split rows on long lists. */
@media print {
  .print-area .manifest-itemscroll {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-height: none !important;
    max-width: 100% !important;
  }
  .print-area .manifest-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
    border-collapse: collapse !important;
    border: 1px solid #444 !important;
  }
  .print-area .manifest-table th,
  .print-area .manifest-table td {
    border: 1px solid #444;
    vertical-align: middle;
    box-sizing: border-box;
  }
  .print-area .manifest-table tbody tr:last-child > td {
    border-bottom: 1px solid #444 !important;
  }
  .print-area .manifest-table thead { display: table-header-group; }
  .print-area .manifest-table tbody tr {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }
}

/* manifest-print-physical-bottom-rule-v2
   Independently close the table's bottom outside the collapsed-border
   painting algorithm (Chromium can omit the last collapsed row border in
   print preview even when computed cell border-bottom is 1px). */
@media print {
  .print-area .manifest-itemscroll {
    border-bottom: 1.5px solid #333 !important;
    box-sizing: border-box !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    display: block !important;
    overflow: visible !important;
  }
  .print-area .manifest-itemscroll > .manifest-table {
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
    page-break-after: auto;
    break-after: auto;
  }
}
