/* Targeted layout fixes loaded after the main styles. */
#outboundPanel .inbound-table-head,
#outboundPanel .outbound-row {
  grid-template-columns: minmax(310px, 1.7fr) 120px minmax(180px, 1fr) 90px minmax(210px, 1.1fr) minmax(170px, .9fr);
  column-gap: 24px;
}

#outboundPanel .outbound-row > *,
#outboundPanel .outbound-row > div {
  min-width: 0;
}

#outboundPanel .outbound-row strong,
#outboundPanel .outbound-row small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#outboundPanel .outbound-row > div:nth-child(5) strong {
  color: #163a67;
  letter-spacing: .01em;
}

#outboundPanel .outbound-row > div:nth-child(6) strong,
#outboundPanel .outbound-row > div:nth-child(6) small {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1350px) {
  #outboundPanel .inbound-table-head,
  #outboundPanel .outbound-row {
    grid-template-columns: minmax(270px, 1.5fr) 105px minmax(150px, .9fr) 72px minmax(170px, 1fr) minmax(155px, .9fr);
    column-gap: 16px;
  }
}

@media (max-width: 1100px) {
  #outboundPanel .inbound-table-head,
  #outboundPanel .outbound-row {
    grid-template-columns: minmax(250px, 2fr) 110px minmax(150px, 1fr) 80px;
  }
}

.list-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 18px 20px;
  border-top: 1px solid #e5ebf4;
  background: #fbfcfe;
}

.list-pager > div {
  display: grid;
  gap: 2px;
  margin-right: auto;
  color: #1d385d;
}

.list-pager > div span {
  color: #8190a8;
  font-size: 12px;
}

.list-pager label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6d7f99;
  font-size: 13px;
}

.list-pager select,
.list-pager button {
  height: 36px;
  border: 1px solid #cfdaea;
  border-radius: 9px;
  background: #fff;
  color: #24476f;
  padding: 0 12px;
  font: inherit;
}

.list-pager button { cursor: pointer; }
.list-pager button:hover:not(:disabled) { border-color: #2b70e7; color: #1760d2; }
.list-pager button:disabled { cursor: not-allowed; opacity: .42; }

@media (max-width: 720px) {
  .list-pager { flex-wrap: wrap; justify-content: center; }
  .list-pager > div { width: 100%; margin: 0 0 6px; text-align: center; }
  .list-pager label { width: 100%; justify-content: center; }
}

/* Updated Zegu brand lockup. */
.login-brand .logo {
  width: 300px;
  height: 92px;
  padding: 8px 14px;
  border-radius: 16px;
}

.login-brand .logo img {
  object-fit: contain;
}

aside .brand {
  min-height: 72px;
  padding: 9px;
}

aside .brand > b {
  flex: 1 1 auto;
  width: 100%;
  height: 52px;
  border-radius: 10px;
  padding: 6px 9px;
}

aside .brand > b img {
  object-fit: contain;
}

aside .brand > span {
  display: none;
}

@media (max-width: 720px) {
  .login-brand .logo { width: 245px; height: 76px; }
}
.order-api-setup,.api-sync-control{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:24px 28px;margin-bottom:18px}
.api-setup-copy{display:flex;align-items:center;gap:18px}.api-setup-copy h2,.api-sync-control h2{margin:2px 0 6px;font-size:20px}.api-setup-copy p,.api-sync-control p{margin:0;color:#6b7c99}
.api-logo{display:grid;place-items:center;width:54px;height:54px;border-radius:16px;background:linear-gradient(135deg,#2269ee,#7357ef);color:#fff;font-weight:800;letter-spacing:.06em;box-shadow:0 12px 28px rgba(42,101,226,.22)}
.api-setup-actions{display:flex;align-items:center;gap:12px}.api-state{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border-radius:999px;background:#edf2f8;color:#60718d;font-weight:700;font-size:13px}.api-state:before{content:"";width:8px;height:8px;border-radius:50%;background:#9aacbf}.api-state.success{background:#e8f8f0;color:#008a52}.api-state.success:before{background:#18bf79}.api-state.danger{background:#fff0f0;color:#c73b46}.api-state.danger:before{background:#e2505b}
.api-sync-fields{display:flex;align-items:end;gap:12px}.api-sync-fields label{display:grid;gap:6px;color:#62738f;font-size:12px;font-weight:700}.api-sync-fields input,.api-sync-fields select{height:42px;min-width:150px;border:1px solid #d7e0ee;border-radius:10px;background:#fff;padding:0 12px;color:#10284a;font:inherit}.api-sync-fields select{min-width:210px}
.api-order-progress{margin-bottom:18px}.ziniao-api-card{max-width:520px}
@media(max-width:900px){.order-api-setup,.api-sync-control{align-items:flex-start;flex-direction:column}.api-sync-fields{width:100%;flex-wrap:wrap}.api-sync-fields label,.api-sync-fields input,.api-sync-fields select{width:100%}}

/* API order statuses can be long; keep status and money in separate columns. */
.order-table-head,.order-row{grid-template-columns:minmax(250px,1.25fr) minmax(145px,.72fr) minmax(125px,.62fr) minmax(115px,.58fr) minmax(105px,.52fr) minmax(165px,.82fr) 140px}
.store-number{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#596b84;font-family:var(--font-tech);font-size:11px;background:#f3f6fa;border:1px solid #e5ebf3;border-radius:7px;padding:5px 8px;width:max-content;max-width:100%}
.order-row>.order-status{box-sizing:border-box;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;justify-self:stretch}
.order-row>.order-money{min-width:0;position:relative;z-index:1;background:inherit}
.after-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1100px){.after-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1100px){.order-table-head,.order-row{grid-template-columns:minmax(230px,1.2fr) 135px 125px 115px 105px minmax(165px,.8fr)}.order-table-head span:last-child,.order-row>small:last-child{display:none}}
@media(max-width:900px){.order-row{grid-template-columns:1fr auto}.order-row>.order-status{justify-self:start;width:auto;max-width:180px}.order-row>.store-number{justify-self:end}.order-row>.order-money,.order-row>small:last-child{grid-column:1/3}}

/* Official TikTok package merging: group only API-approved orders. */
.order-merge-workbench{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:18px;padding:20px 24px;background:linear-gradient(125deg,#f8fbff,#f4f1ff);border-color:#dce6f6}.order-merge-workbench h2{margin:2px 0 5px;color:#0f2a4d;font-size:20px}.order-merge-workbench p{margin:0;color:#70809a}.merge-metrics{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.merge-metrics>span{padding:10px 13px;border:1px solid #d9e4f4;border-radius:10px;background:#fff;color:#50627e;font-size:12px}.merge-metrics>span b{color:#1768e8;font-size:17px}.merge-order-group{margin:10px 12px;border:1px solid #cfe0fa;border-radius:13px;overflow:hidden;background:#fbfdff;box-shadow:0 8px 22px rgba(25,70,135,.06)}.merge-order-group>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;background:linear-gradient(90deg,#edf5ff,#f8fbff);border-bottom:1px solid #dce8f8}.merge-order-group.combined>header{background:linear-gradient(90deg,#e9fbf4,#f7fffb)}.merge-order-group>header>div{display:grid;grid-template-columns:auto auto;align-items:center;gap:3px 9px}.merge-order-group>header strong{color:#17365e}.merge-order-group>header small{grid-column:1/3;color:#70829b}.merge-state{padding:4px 8px;border-radius:999px;background:#dceaff;color:#1764ce;font-size:11px;font-weight:800}.combined .merge-state{background:#d8f5e8;color:#087b50}.merge-order-group .order-row{margin:0;border-radius:0;border:0;border-top:1px solid #edf1f6;box-shadow:none}.order-customer{min-width:0}.order-customer strong,.order-customer small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-customer strong{color:#193657;font-size:12px}.order-customer small{margin-top:3px;color:#8796aa;font-size:10px}.combine-group,.ship-group{white-space:nowrap}.ship-group{background:linear-gradient(135deg,#0a9b68,#12bd7f)!important}
@media(max-width:900px){.order-merge-workbench{align-items:flex-start;flex-direction:column}.merge-order-group>header{align-items:flex-start;flex-direction:column}.order-customer{grid-column:1/3}}

/* Keep translated after-sale reasons in their own readable column. */
.after-table-head,.after-row{grid-template-columns:minmax(255px,1.25fr) minmax(135px,.7fr) minmax(165px,.85fr) 110px 140px 90px}
.after-reason{display:block;color:#34455e;font-weight:650;line-height:1.45}
@media(max-width:900px){.after-row>.after-reason{grid-column:1/3;padding:8px 10px;background:#f7f9fc;border-radius:8px}}

/* Store center: management-first layout for multi-store operations. */
.store-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.store-tools select{height:40px;max-width:185px;border:1px solid #dfe6ef;border-radius:10px;background:#fff;color:#4e6078;padding:0 10px;font:inherit}
.store-table-head,.store-row{grid-template-columns:minmax(170px,1.1fr) 76px minmax(78px,.52fr) minmax(145px,.9fr) 68px minmax(95px,.58fr) 72px;gap:10px}
.store-lead{color:#183454;font-size:12px}.store-owner{min-height:34px;border:1px solid #dbe5f1;border-radius:8px;background:#f7f9fc;color:#245caa;font-size:12px;text-align:left;padding:7px 9px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.store-owner:hover{border-color:#8eb4f3;background:#eef5ff}.store-owner.unassigned{border-style:dashed;color:#9aa6b7;font-weight:500}.store-owner:disabled{cursor:default}
.store-env{min-width:0}.store-env strong,.store-env small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.store-env strong{color:#29415f;font-size:12px}.store-env small{margin-top:4px;color:#8795a8;font-size:11px}
.store-note.edit-note{width:100%;min-height:34px;border:1px dashed #d9e2ed;border-radius:8px;background:#fafbfd;text-align:left;padding:7px 9px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.store-note.edit-note:hover{border-color:#8eb4f3;background:#f3f7ff;color:#235fbd}.store-note.edit-note:disabled{cursor:default}
.store-actions{display:flex;justify-content:flex-end}.store-actions .open-store{min-width:78px}
@media(max-width:1250px){.store-table-head,.store-row{grid-template-columns:minmax(160px,1.05fr) 70px minmax(72px,.5fr) minmax(130px,.85fr) 64px minmax(90px,.55fr) 66px;gap:7px}.store-tools{flex-wrap:wrap}.open-store{padding:9px 8px}}
@media(max-width:900px){.store-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.store-table-head{display:none}.store-row{grid-template-columns:1fr auto}.store-main{grid-column:1/3}.store-env{grid-column:1/3}.store-note.edit-note{grid-column:1/3}.store-lead,.store-owner{align-self:center}.store-actions{display:flex}.store-tools select{flex:1;max-width:none}}
.order-merge-workbench{display:block!important}.merge-workbench-head{display:flex;align-items:center;justify-content:space-between;gap:24px}.merge-task-progress{margin-top:18px;padding:16px 18px;border:1px solid #cfe0ff;border-radius:16px;background:linear-gradient(135deg,#f8fbff,#f3f7ff);box-shadow:inset 0 1px 0 #fff}.merge-progress-title{display:flex;align-items:center;gap:12px}.merge-progress-title>div{display:grid;gap:3px;flex:1}.merge-progress-title small{color:#7183a5}.merge-progress-title>b{font-size:18px;color:#2367e8}.merge-task-progress .progress-track{margin:12px 0 10px;height:7px;border-radius:99px;overflow:hidden;background:#e5edf9}.merge-task-progress .progress-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#2377ef,#5b55ef);border-radius:inherit;transition:width .35s ease}.merge-progress-meta{display:flex;gap:22px;flex-wrap:wrap;color:#7183a5;font-size:13px}.merge-progress-meta b{color:#142a4a}.merge-task-progress[data-state='failed']{border-color:#ffd0d0;background:#fff8f8}.merge-task-progress[data-state='failed'] .merge-progress-title>b{color:#d63c4a}.merge-task-progress[data-state='done']{border-color:#bdebd6;background:#f5fffa}.merge-task-progress[data-state='done'] .merge-progress-title>b{color:#07945c}@media(max-width:900px){.merge-workbench-head{align-items:flex-start;flex-direction:column}.merge-metrics{width:100%;flex-wrap:wrap}.merge-progress-meta{gap:10px 18px}}
