*{box-sizing:border-box} body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Yu Gothic","Meiryo",Arial,sans-serif;margin:0;background:#f5f6f8;color:#111}.topbar{height:56px;background:#222;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 22px}.topbar a,.topbar span{color:#fff;text-decoration:none;margin-left:16px}.topbar .sub{opacity:.65;margin-left:8px}.container{max-width:1180px;margin:24px auto;padding:0 18px}.card{background:#fff;border:1px solid #ddd;border-radius:10px;padding:22px;margin-bottom:18px;box-shadow:0 1px 2px rgba(0,0,0,.04)}.admin-card{border-color:#bfc8ff}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.stats{display:flex;gap:24px;background:#fff;border:1px solid #ddd;border-radius:10px;padding:14px 20px;margin-bottom:18px}.muted{color:#666;font-size:13px}.warn-text{color:#b05a00}.bad{color:#c00;font-weight:700}.alert{padding:12px 14px;border-radius:8px;margin-bottom:16px}.alert.success{background:#eaf7ee;color:#116329;border:1px solid #bfe5ca}.alert.error{background:#ffecec;color:#b00020;border:1px solid #ffc4c4}button,.btn{border:1px solid #ccc;background:#fff;padding:9px 14px;border-radius:7px;cursor:pointer;text-decoration:none;color:#111;display:inline-block}.primary{background:#2563eb;color:#fff;border-color:#2563eb}input[type=text],input[type=password],input:not([type]){width:100%;padding:10px;border:1px solid #ccc;border-radius:6px;margin:6px 0 14px}input[type=file]{display:block;margin:10px 0 14px}.search-form{display:flex;gap:10px}.search-form input{margin:0;max-width:480px}table{width:100%;border-collapse:collapse;font-size:14px}th,td{border-bottom:1px solid #e5e5e5;padding:9px;vertical-align:top}th{background:#f8f8f8;text-align:left}.login-body{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#eef2ff}.login-box{width:360px;background:#fff;border-radius:14px;padding:30px;box-shadow:0 10px 30px rgba(0,0,0,.12)}.login-box h1{margin:0}.login-box button{width:100%;margin-top:8px}.search-card{max-width:none}.mini-info{margin-top:14px;padding:12px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:8px}.result-table td:nth-child(3){min-width:170px}.result-table td:nth-child(6){min-width:260px}
@media(max-width:800px){.grid2{grid-template-columns:1fr}.search-form{display:block}.search-form button{margin-top:10px}}

/* 印刷面单 */
.print-body{background:#e5e5e5;margin:0;font-family:"Yu Gothic","Meiryo",Arial,sans-serif}.print-actions{padding:12px;background:#222;color:#fff;display:flex;gap:10px;align-items:center}.label-sheet{width:100mm;height:150mm;margin:14px auto;background:#fff;border:1px solid #bbb;padding:4mm 4mm 5mm 4mm;position:relative;color:#00112b}.label-header{display:flex;height:22mm;align-items:flex-start}.top-barcode{width:42mm;height:17mm;overflow:hidden;margin-left:4mm;margin-top:2mm}.top-barcode .barcode-svg{width:38mm;height:16mm}.sort-code{margin-left:auto;font-size:18mm;line-height:20mm;letter-spacing:1mm;color:#000}.sort-code.missing-sort{font-size:12mm;color:#c00;letter-spacing:0}.tracking-line{text-align:center;font-size:4.3mm;height:7mm;color:#000}.main-box{border:0.4mm solid #222;height:101mm;display:grid;grid-template-columns:8mm 13mm 1fr;grid-template-rows:44mm 22mm 25mm 10mm;position:relative}.side-title{grid-column:1;writing-mode:vertical-rl;text-orientation:upright;font-weight:700;font-size:5mm;display:flex;align-items:center;justify-content:center;border-right:.35mm solid #222}.side-title.dest{grid-row:1/3}.side-title.sender{grid-row:3/5;border-top:.35mm solid #222}.dest-content{grid-column:2/4;grid-row:1;border-bottom:.35mm solid #222;padding:2mm 3mm 0 3mm}.tel-post{display:flex;justify-content:space-between;font-size:4.4mm;color:#000}.address{font-weight:700;font-size:5mm;margin-top:12mm;line-height:1.25}.name-line{display:flex;justify-content:space-between;align-items:flex-end;font-size:5.2mm;font-weight:700;margin-top:11mm}.sama{font-size:4.5mm}.note-label{grid-column:2;grid-row:2;border-right:.35mm solid #222;border-bottom:.35mm solid #222;font-weight:700;font-size:4.5mm;display:flex;align-items:center;justify-content:center;line-height:1.1}.note-content{grid-column:3;grid-row:2;border-bottom:.35mm solid #222;padding:8mm 3mm;font-size:4.2mm;color:#000}.sender-content{grid-column:2/4;grid-row:3;border-bottom:.35mm solid #222;padding:2mm 3mm 0 3mm;font-size:4.3mm}.sender-address{margin-top:7mm;line-height:1.12;font-size:4.1mm}.sender-name{display:flex;justify-content:space-between;margin-top:5mm}.item-label{grid-column:2;grid-row:4;border-right:.35mm solid #222;font-weight:700;font-size:4.5mm;display:flex;align-items:center;justify-content:center}.item-content{grid-column:3;grid-row:4;font-size:5mm;padding:2mm 3mm;font-weight:700}.footer-label{display:flex;height:22mm;margin-top:3mm;align-items:center}.logo-box{width:31mm;text-align:center;color:#183a71;font-family:Georgia,serif}.logo-arc{font-size:10mm;font-weight:bold;border-top:2mm solid #2276bd;border-radius:50% 50% 0 0;line-height:7mm}.logo-small{font-size:3mm}.bottom-barcode{margin-left:10mm;text-align:center}.bottom-barcode .barcode-svg{width:58mm;height:17mm}.barcode-caption{font-family:monospace;font-size:3.4mm;letter-spacing:1.4mm;color:#000;margin-top:1mm}@page{size:100mm 150mm;margin:0}@media print{html,body{width:100mm;height:150mm;background:#fff}.print-actions{display:none}.label-sheet{margin:0;border:none;width:100mm;height:150mm;page-break-after:always}.topbar,.container{display:none}}
.locked-card{border-color:#ddd;background:#fff}.locked-box{padding:8px 0}.unlock-form{max-width:360px}.unlock-form input{margin-bottom:10px}.admin-card .btn{margin-left:8px}.admin-card input[disabled]{opacity:.55}
.bulk-actions{display:flex;gap:14px;align-items:center;margin:12px 0 14px}.bulk-actions label{font-weight:700}.bottom-actions{justify-content:flex-start;margin-top:16px}.result-table td:nth-child(8){min-width:260px}.result-table th:first-child,.result-table td:first-child{text-align:center;width:54px}.label-sheet:last-of-type{page-break-after:auto}
@media print{.label-sheet:last-of-type{page-break-after:auto}}


/* v8 検索結果・画面幅調整 */
.table-wrap{width:100%;overflow-x:auto}.result-card{padding:22px}.compact-result{max-width:1180px}.wide-result{width:min(1500px, calc(100vw - 36px));margin-left:calc((1180px - min(1500px, calc(100vw - 36px)))/2)}.result-table{min-width:1080px}.result-table th{white-space:nowrap}.result-table td{line-height:1.45}.single-result{min-width:1000px}.single-actions{display:flex;gap:14px;align-items:center;margin:10px 0 16px}.single-actions .btn{min-width:110px;text-align:center}.single-result td:nth-child(1),.mawb-result td:nth-child(2){min-width:130px}.single-result td:nth-child(2),.mawb-result td:nth-child(3){min-width:110px}.single-result td:nth-child(3),.mawb-result td:nth-child(4){min-width:120px}.single-result td:nth-child(4),.mawb-result td:nth-child(5){min-width:90px}.single-result td:nth-child(5),.mawb-result td:nth-child(6){min-width:120px}.single-result td:nth-child(6),.mawb-result td:nth-child(7){min-width:300px}.single-result td:nth-child(7),.mawb-result td:nth-child(8){min-width:210px}.single-result td:nth-child(8),.mawb-result td:nth-child(9){min-width:80px;text-align:center}.mawb-result{min-width:1180px}.mawb-result th:first-child,.mawb-result td:first-child{width:62px;text-align:center}.small-btn{padding:7px 12px}.selected-badge{background:#f1f5f9;border:1px solid #dbe3ef;border-radius:999px;padding:8px 12px}.pagination{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:18px}.pagination .active-page{background:#2563eb;color:#fff;border-color:#2563eb}.page-gap{color:#777;padding:0 4px}
@media(max-width:1220px){.wide-result{width:auto;margin-left:0}}


/* v9 単票検索画面の幅とボタン位置をMAWB画面寄せに調整 */
.single-actions{display:flex;gap:16px;align-items:center;margin:12px 0 18px}.single-actions .selected-badge{order:1}.single-actions .btn{order:2;min-width:160px;text-align:center;padding:12px 22px}.single-result{width:100%;min-width:0;table-layout:auto}.single-result th,.single-result td{white-space:normal}.single-result td:nth-child(1){min-width:120px}.single-result td:nth-child(2){min-width:105px}.single-result td:nth-child(3){min-width:120px}.single-result td:nth-child(4){min-width:90px}.single-result td:nth-child(5){min-width:130px}.single-result td:nth-child(6){min-width:320px}.single-result td:nth-child(7){min-width:220px}.single-result td:nth-child(8){min-width:80px;text-align:center}.result-card.wide-result{width:min(1500px, calc(100vw - 36px));margin-left:calc((1180px - min(1500px, calc(100vw - 36px)))/2)}.result-card.wide-result .table-wrap{overflow-x:visible}@media(max-width:1220px){.result-card.wide-result{width:auto;margin-left:0}.result-card.wide-result .table-wrap{overflow-x:auto}}

/* v10 印刷面单实际尺寸调校：纸张103×153mm，面单实框100×150mm */
.print-body .label-sheet{
  box-sizing:border-box;
  width:100mm;
  height:150mm;
  margin:14px auto;
  background:#fff;
  border:.25mm solid #aaa;
  padding:3mm 3.2mm 3.1mm 3.2mm;
  position:relative;
  color:#00112b;
}
.print-body .label-header{height:20.5mm;display:flex;align-items:flex-start}
.print-body .top-barcode{width:40mm;height:16.5mm;overflow:hidden;margin-left:3.8mm;margin-top:2.3mm}
.print-body .top-barcode .barcode-svg{width:38mm;height:15.5mm}
.print-body .sort-code{margin-left:auto;font-size:15.8mm;line-height:18mm;letter-spacing:.8mm;color:#000;font-weight:400}
.print-body .sort-code.missing-sort{font-size:10.5mm;color:#c00;letter-spacing:0;line-height:15mm}
.print-body .tracking-line{text-align:center;font-size:4.0mm;height:6.8mm;color:#000;line-height:6.3mm}
.print-body .main-box{border:.35mm solid #222;height:101mm;display:grid;grid-template-columns:7.5mm 13mm 1fr;grid-template-rows:44mm 22mm 25mm 10mm;position:relative}
.print-body .side-title{grid-column:1;writing-mode:vertical-rl;text-orientation:upright;font-weight:700;font-size:4.8mm;display:flex;align-items:center;justify-content:center;border-right:.32mm solid #222;letter-spacing:.2mm}
.print-body .side-title.dest{grid-row:1/3}
.print-body .side-title.sender{grid-row:3/5;border-top:.32mm solid #222}
.print-body .dest-content{grid-column:2/4;grid-row:1;border-bottom:.32mm solid #222;padding:1.8mm 2.8mm 0 2.8mm}
.print-body .tel-post{display:flex;justify-content:space-between;font-size:4.2mm;color:#000;line-height:5mm}
.print-body .address{font-weight:700;font-size:4.85mm;margin-top:11.2mm;line-height:1.23;color:#000}
.print-body .name-line{display:flex;justify-content:space-between;align-items:flex-end;font-size:5.1mm;font-weight:700;margin-top:10.8mm;color:#000}
.print-body .sama{font-size:4.3mm}
.print-body .note-label{grid-column:2;grid-row:2;border-right:.32mm solid #222;border-bottom:.32mm solid #222;font-weight:700;font-size:4.4mm;display:flex;align-items:center;justify-content:center;line-height:1.05;color:#000}
.print-body .note-content{grid-column:3;grid-row:2;border-bottom:.32mm solid #222;padding:7.8mm 2.8mm;font-size:4.0mm;color:#000;line-height:1.2}
.print-body .sender-content{grid-column:2/4;grid-row:3;border-bottom:.32mm solid #222;padding:1.9mm 2.8mm 0 2.8mm;font-size:4.0mm;color:#000;line-height:1.18}
.print-body .sender-address{margin-top:6.7mm;line-height:1.12;font-size:3.95mm;color:#000}
.print-body .sender-name{display:flex;justify-content:space-between;margin-top:4.7mm;color:#000}
.print-body .item-label{grid-column:2;grid-row:4;border-right:.32mm solid #222;font-weight:700;font-size:4.4mm;display:flex;align-items:center;justify-content:center;color:#000}
.print-body .item-content{grid-column:3;grid-row:4;font-size:4.75mm;padding:1.6mm 2.8mm;font-weight:700;color:#000}
.print-body .footer-label{display:flex;height:18.8mm;margin-top:2mm;align-items:center}
.print-body .logo-box{width:30mm;text-align:center;color:#183a71;font-family:Georgia,serif}
.print-body .logo-arc{font-size:9mm;font-weight:bold;border-top:1.8mm solid #2276bd;border-radius:50% 50% 0 0;line-height:6.5mm}
.print-body .logo-small{font-size:2.8mm}
.print-body .bottom-barcode{margin-left:8.5mm;text-align:center}
.print-body .bottom-barcode .barcode-svg{width:57mm;height:16mm}
.print-body .barcode-caption{font-family:monospace;font-size:3.25mm;letter-spacing:1.35mm;color:#000;margin-top:.6mm}
@page{size:103mm 153mm;margin:0}
@media print{
  html,body{width:103mm;height:153mm;background:#fff;margin:0;padding:0}
  .print-actions{display:none}
  .label-sheet{width:100mm!important;height:150mm!important;margin:1.5mm auto!important;border:.25mm solid #aaa!important;page-break-after:always;break-after:page}
  .label-sheet:last-of-type{page-break-after:auto;break-after:auto}
  .topbar,.container{display:none}
}

/* v11 面单字体与位置再调校：靠近用户提供的原始面单，保留KSB logo */
.print-body .label-sheet{
  padding:3.0mm 3.4mm 3.0mm 3.4mm;
}
.print-body .label-header{
  height:21.5mm;
  display:flex;
  align-items:flex-start;
  overflow:visible;
}
.print-body .top-barcode{
  flex:0 0 39mm;
  width:39mm;
  height:16.5mm;
  margin-left:3.8mm;
  margin-top:2.0mm;
  overflow:hidden;
}
.print-body .top-barcode .barcode-svg{
  width:37.5mm;
  height:15.8mm;
}
.print-body .sort-code{
  flex:0 0 51mm;
  width:51mm;
  margin-left:auto;
  padding-right:1.2mm;
  text-align:right;
  white-space:nowrap;
  word-break:keep-all;
  overflow:visible;
  font-size:13.9mm;
  line-height:17.2mm;
  letter-spacing:.45mm;
  color:#000;
  font-weight:400;
}
.print-body .sort-code.missing-sort{
  font-size:9.5mm;
  line-height:15mm;
  letter-spacing:0;
  white-space:nowrap;
}
.print-body .tracking-line{
  text-align:center;
  font-size:3.7mm;
  height:5.6mm;
  line-height:5.2mm;
  color:#000;
  margin-top:-.5mm;
}
.print-body .main-box{
  height:101mm;
  grid-template-columns:7.4mm 13mm 1fr;
  grid-template-rows:44mm 22mm 25mm 10mm;
  border:.32mm solid #222;
}
.print-body .side-title{
  font-size:4.45mm;
  letter-spacing:.05mm;
  border-right:.30mm solid #222;
}
.print-body .side-title.sender{border-top:.30mm solid #222}
.print-body .dest-content{
  padding:1.7mm 2.7mm 0 2.7mm;
  border-bottom:.30mm solid #222;
}
.print-body .tel-post{
  font-size:3.95mm;
  line-height:4.8mm;
  font-weight:400;
}
.print-body .address{
  font-weight:700;
  font-size:4.35mm;
  margin-top:11.5mm;
  line-height:1.23;
  color:#000;
}
.print-body .name-line{
  font-size:4.55mm;
  font-weight:700;
  margin-top:10.6mm;
  color:#000;
}
.print-body .sama{font-size:4.05mm}
.print-body .note-label{
  font-size:4.15mm;
  border-right:.30mm solid #222;
  border-bottom:.30mm solid #222;
}
.print-body .note-content{
  border-bottom:.30mm solid #222;
  padding:7.6mm 2.7mm;
  font-size:3.75mm;
  line-height:1.2;
}
.print-body .sender-content{
  border-bottom:.30mm solid #222;
  padding:1.8mm 2.7mm 0 2.7mm;
  font-size:3.75mm;
  line-height:1.16;
}
.print-body .sender-address{
  margin-top:6.7mm;
  line-height:1.13;
  font-size:3.65mm;
  color:#000;
  word-break:normal;
  overflow-wrap:break-word;
}
.print-body .sender-name{
  margin-top:4.8mm;
  font-size:3.8mm;
}
.print-body .item-label{
  font-size:4.15mm;
  border-right:.30mm solid #222;
}
.print-body .item-content{
  font-size:4.35mm;
  padding:1.8mm 2.7mm;
  font-weight:700;
}
.print-body .footer-label{
  height:19.5mm;
  margin-top:2.0mm;
  align-items:center;
}
.print-body .bottom-barcode{
  margin-left:9.5mm;
}
.print-body .bottom-barcode .barcode-svg{
  width:56.5mm;
  height:16.3mm;
}
.print-body .barcode-caption{
  font-size:3.1mm;
  letter-spacing:1.25mm;
  margin-top:.45mm;
}
@media print{
  .label-sheet{margin:1.5mm auto!important}
}


/* v12 面单细调：配送備考固定显示 sold on Temu，区域高度与字体更靠近原面单 */
.print-body .main-box{
  height:101mm;
  grid-template-columns:7.4mm 13mm 1fr;
  grid-template-rows:44mm 17mm 30mm 10mm;
  border:.30mm solid #222;
}
.print-body .label-header{
  height:21.4mm;
}
.print-body .top-barcode{
  margin-left:3.7mm;
  margin-top:2.0mm;
  width:39mm;
  height:16.2mm;
}
.print-body .top-barcode .barcode-svg{
  width:37.5mm;
  height:15.6mm;
}
.print-body .sort-code{
  flex:0 0 51mm;
  width:51mm;
  font-size:13.6mm;
  line-height:16.8mm;
  letter-spacing:.42mm;
  padding-right:1.3mm;
}
.print-body .tracking-line{
  font-size:3.65mm;
  height:5.7mm;
  line-height:5.3mm;
  margin-top:-.45mm;
}
.print-body .side-title{
  font-size:4.35mm;
  border-right:.28mm solid #222;
}
.print-body .side-title.sender{border-top:.28mm solid #222}
.print-body .dest-content{
  padding:1.65mm 2.7mm 0 2.7mm;
  border-bottom:.28mm solid #222;
}
.print-body .tel-post{
  font-size:3.9mm;
  line-height:4.8mm;
}
.print-body .address{
  font-size:4.25mm;
  margin-top:11.0mm;
  line-height:1.22;
}
.print-body .name-line{
  font-size:4.55mm;
  margin-top:10.7mm;
}
.print-body .note-label{
  font-size:4.05mm;
  border-right:.28mm solid #222;
  border-bottom:.28mm solid #222;
}
.print-body .note-content{
  border-bottom:.28mm solid #222;
  padding:5.7mm 2.7mm 0 2.7mm;
  font-size:3.8mm;
  line-height:1.2;
}
.print-body .sender-content{
  position:relative;
  border-bottom:.28mm solid #222;
  padding:1.8mm 2.7mm 0 2.7mm;
  font-size:3.75mm;
  line-height:1.16;
}
.print-body .sender-address{
  margin-top:6.2mm;
  line-height:1.13;
  font-size:3.65mm;
  max-width:78mm;
}
.print-body .sender-name{
  position:absolute;
  left:2.7mm;
  right:2.7mm;
  bottom:1.4mm;
  margin-top:0;
  font-size:3.8mm;
}
.print-body .item-label{
  font-size:4.1mm;
  border-right:.28mm solid #222;
}
.print-body .item-content{
  font-size:4.35mm;
  padding:1.8mm 2.7mm;
}
.print-body .footer-label{
  height:19.5mm;
  margin-top:2.0mm;
}
.print-body .logo-box{width:30mm}
.print-body .bottom-barcode{margin-left:9.5mm}
.print-body .bottom-barcode .barcode-svg{
  width:56.5mm;
  height:16.2mm;
}
.print-body .barcode-caption{
  font-size:3.05mm;
  letter-spacing:1.25mm;
  margin-top:.45mm;
}

/* v13 面单细调：分拣码缩小、底部条码说明上移、除Logo外文字加黑 */
.print-body .label-sheet{
  color:#000;
  padding:3.0mm 3.4mm 3.0mm 3.4mm;
}
.print-body .label-sheet .tracking-line,
.print-body .label-sheet .main-box,
.print-body .label-sheet .main-box *,
.print-body .label-sheet .barcode-caption,
.print-body .label-sheet .sort-code{
  color:#000 !important;
}
.print-body .tel-post,
.print-body .sender-content,
.print-body .sender-address,
.print-body .sender-name,
.print-body .barcode-caption{
  font-weight:500;
}
.print-body .label-header{
  height:20.8mm;
  overflow:hidden;
}
.print-body .top-barcode{
  flex:0 0 38mm;
  width:38mm;
  height:16mm;
  margin-left:3.9mm;
  margin-top:1.9mm;
}
.print-body .top-barcode .barcode-svg{
  width:36.8mm;
  height:15.2mm;
}
.print-body .sort-code{
  flex:0 0 49mm;
  width:49mm;
  font-size:11.8mm;
  line-height:15.5mm;
  letter-spacing:.28mm;
  padding-right:1.6mm;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  font-weight:400;
}
.print-body .tracking-line{
  font-size:3.65mm;
  height:5.7mm;
  line-height:5.3mm;
  margin-top:0mm;
}
.print-body .main-box{
  margin-top:.2mm;
}
.print-body .footer-label{
  height:17.3mm;
  margin-top:1.4mm;
  align-items:center;
  overflow:hidden;
}
.print-body .logo-box{
  width:30mm;
  color:#183a71 !important;
}
.print-body .logo-box *{
  color:#183a71 !important;
}
.print-body .logo-arc{
  font-size:8.8mm;
  line-height:6.2mm;
}
.print-body .logo-small{
  font-size:2.6mm;
}
.print-body .bottom-barcode{
  margin-left:9.5mm;
  text-align:center;
  transform:translateY(-.8mm);
}
.print-body .bottom-barcode .barcode-svg{
  width:55.5mm;
  height:14.7mm;
}
.print-body .barcode-caption{
  font-size:2.65mm;
  line-height:2.65mm;
  letter-spacing:1.05mm;
  margin-top:.05mm;
}
@media print{
  .print-body .label-header{overflow:hidden}
  .print-body .bottom-barcode{transform:translateY(-.8mm)}
}


/* v14 面单细调：品名留空、分拣码缩小但加粗，避免右侧裁切 */
.print-body .sort-code{
  flex:0 0 52mm;
  width:52mm;
  font-size:10.4mm;
  line-height:14.2mm;
  letter-spacing:.12mm;
  padding-right:.6mm;
  font-weight:600;
  white-space:nowrap;
  overflow:visible;
}
.print-body .top-barcode{
  flex:0 0 37mm;
  width:37mm;
  margin-left:3.4mm;
}
.print-body .top-barcode .barcode-svg{
  width:36.2mm;
}
.print-body .item-content{
  color:#000!important;
  font-weight:500;
}
@media print{
  .print-body .sort-code{
    font-size:10.4mm;
    font-weight:600;
    overflow:visible;
  }
}
