:root {
  --ink: #18262d;
  --muted: #697378;
  --paper: #f3efe4;
  --surface: #fffdf7;
  --line: #d9d4c8;
  --orange: #e76532;
  --orange-soft: #f4c5a8;
  --teal: #1f6f68;
  --yellow: #e7c75b;
  --shadow: 0 18px 50px rgba(33, 45, 49, 0.1);
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 8%, rgba(231, 199, 91, 0.24), transparent 22rem),
    linear-gradient(115deg, #ece6d7 0%, var(--paper) 42%, #f7f3e9 100%);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.shell { display: grid; grid-template-columns: 76px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s ease; }
.shell.sidebar-pinned { grid-template-columns: 248px minmax(0, 1fr); }

.sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  width: 76px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 34px 12px 24px;
  color: #f7f0df;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    #18343a;
  background-size: 28px 28px;
  overflow: hidden;
  transition: width .2s ease, padding .2s ease, box-shadow .2s ease;
}
.sidebar:hover,
.sidebar-pinned .sidebar { width: 248px; padding-right: 22px; padding-left: 22px; box-shadow: 18px 0 40px rgba(13,31,35,.24); }

.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; padding: 0 4px 34px; white-space: nowrap; }
.brand-mark { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; color: var(--ink); background: var(--yellow); border-radius: 50% 50% 48% 42%; font: 800 14px/1 "Avenir Next"; transform: rotate(-4deg); }
.brand > span:last-child { opacity: 0; transform: translateX(-8px); transition: opacity .15s ease, transform .2s ease; }
.sidebar:hover .brand > span:last-child,
.sidebar-pinned .brand > span:last-child { opacity: 1; transform: translateX(0); }
.brand strong, .brand small { display: block; }
.brand strong { font: 600 20px/1.2 "Iowan Old Style", "Songti SC", serif; letter-spacing: .02em; }
.brand small { margin-top: 3px; color: #aac0bf; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }

.nav { display: grid; gap: 7px; }
.nav-item { display: grid; grid-template-columns: 32px 0fr auto; align-items: center; width: 100%; padding: 12px 10px; border: 0; border-radius: 9px; color: #b8c9c7; background: transparent; text-align: left; transition: grid-template-columns .2s ease, background .15s ease; }
.nav-icon { display: grid; width: 32px; place-items: center; color: #8eaaa7; }
.nav-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-label { overflow: hidden; font-size: 14px; font-weight: 650; white-space: nowrap; opacity: 0; transition: opacity .15s ease; }
.sidebar:hover .nav-item,
.sidebar-pinned .nav-item { grid-template-columns: 32px 1fr auto; }
.sidebar:hover .nav-label,
.sidebar-pinned .nav-label { opacity: 1; }
.nav-item small { display: none; font-size: 9px; color: #6f918e; }
.sidebar:hover .nav-item small,
.sidebar-pinned .nav-item small { display: block; }
.nav-item.active { color: #fff; background: rgba(255,255,255,.09); box-shadow: inset 3px 0 var(--orange); }
.nav-item.active .nav-icon { color: #f7f0df; }
.nav-item:disabled { cursor: default; opacity: .72; }

.sidebar-footer { margin-top: auto; display: grid; gap: 10px; }
.shop-switcher { display: none; gap: 8px; padding: 12px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(0,0,0,.08); }
.sidebar:hover .shop-switcher,
.sidebar-pinned .shop-switcher { display: grid; }
.shop-switcher label { display: grid; gap: 6px; color: #8caaa7; font-size: 10px; font-weight: 700; }
.shop-switcher select { width: 100%; padding: 8px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; color: #f7f0df; background: #12282c; font-size: 12px; }
.shop-switcher-actions { display: flex; gap: 6px; }
.shop-switcher-actions button { flex: 1; padding: 7px 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; color: #d5e4e2; background: transparent; font-size: 10px; font-weight: 700; }
.shop-dialog-field { display: grid; gap: 6px; margin: 0 23px; color: #536065; font-size: 10px; font-weight: 700; }
.shop-dialog-field small { color: #9a958b; font-size: 10px; font-weight: 500; line-height: 1.5; }
.shop-dialog-field input { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; }
.sidebar-logout { display: none; align-items: center; gap: 10px; width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; color: #f7f0df; background: rgba(0,0,0,.16); font-size: 12px; font-weight: 700; overflow: hidden; }
.sidebar-logout svg { flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-logout span { overflow: hidden; white-space: nowrap; opacity: 0; }
body.supplier-portal .sidebar-logout,
body.admin-session .sidebar-logout { display: flex; }
.sidebar:hover .sidebar-logout,
.sidebar-pinned .sidebar-logout { width: 100%; }
.sidebar:hover .sidebar-logout span,
.sidebar-pinned .sidebar-logout span { opacity: 1; }
body.supplier-preview .sidebar-logout { display: none !important; }
body.supplier-portal .shop-switcher,
body.supplier-portal .sidebar-mode-toggle,
body.supplier-portal .nav-item:not([data-page-target="suppliers"]),
body.supplier-portal #supplier-role-filter { display: none !important; }
body.supplier-portal .nav { grid-template-columns: 1fr; }
body.booting .shell { display: none !important; }
.supplier-login { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background:
    radial-gradient(circle at 85% 8%, rgba(231, 199, 91, 0.24), transparent 22rem),
    linear-gradient(115deg, #ece6d7 0%, var(--paper) 42%, #f7f3e9 100%); }
.supplier-login-card { display: grid; gap: 12px; width: min(420px, 100%); padding: 28px 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.supplier-login-card h1 { margin: 0; font: 600 36px/1 "Iowan Old Style", "Songti SC", serif; }
.supplier-login-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.supplier-login-card label { display: grid; gap: 6px; color: #536065; font-size: 10px; font-weight: 700; }
.supplier-login-card input, .supplier-login-card select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.sidebar-mode-toggle { display: grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; color: #91aaa8; background: rgba(0,0,0,.1); transition: color .15s ease, background .15s ease, border-color .15s ease; }
.sidebar-mode-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-mode-toggle:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-mode-toggle.active { color: #f7f0df; border-color: rgba(231,199,91,.65); background: rgba(231,199,91,.16); }

.main { padding: 32px clamp(24px, 3vw, 52px) 12px; overflow: hidden; }
.app-page.hidden { display: none; }
.topbar { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.supplier-workbench-topbar { align-items: center; margin-bottom: 16px; }
.supplier-workbench-heading { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.supplier-workbench-topbar h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.03em; }
.workbench-identity { display: none; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
body.supplier-portal .workbench-identity { display: inline-flex; }
.workbench-identity-icon { display: grid; place-items: center; width: 15px; height: 15px; color: var(--teal); }
.workbench-identity-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { margin: 0 0 6px; color: var(--teal); font: 700 10px/1 monospace; letter-spacing: .17em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font: 600 clamp(36px, 5vw, 58px)/.95 "Iowan Old Style", "Songti SC", serif; letter-spacing: -.04em; }
h2 { margin-bottom: 0; font: 600 27px/1.1 "Iowan Old Style", "Songti SC", serif; }

.primary-button, .secondary-button, .ghost-button { border-radius: 8px; padding: 11px 17px; font-weight: 650; border: 1px solid transparent; }
.primary-button { color: white; background: var(--orange); box-shadow: 0 6px 0 #b74720; }
.primary-button:hover { transform: translateY(-1px); }
.primary-button:active { transform: translateY(3px); box-shadow: 0 3px 0 #b74720; }
.primary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.secondary-button { color: white; background: var(--teal); }
.ghost-button { color: var(--ink); border-color: var(--line); background: transparent; }

.intake-overview { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: stretch; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px 5px 5px 5px; background: rgba(255,253,247,.8); overflow: hidden; }
.stage-identity { display: flex; gap: 13px; align-items: center; padding: 16px 18px; color: white; background: var(--teal); }
.stage-identity > span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; font: 750 11px/1 monospace; }
.stage-identity strong, .stage-identity small { display: block; }
.stage-identity strong { font-size: 15px; }
.stage-identity small { margin-top: 3px; color: #b9d4d0; font-size: 9px; }
.intake-overview dl { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); margin: 0; }
.intake-overview dl div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-right: 1px solid var(--line); }
.intake-overview dt { color: var(--muted); font-size: 10px; }
.intake-overview dd { margin: 0; font: 600 21px/1 "Iowan Old Style", serif; }
.intake-overview .daily-order-count { background: #fff5d9; }
.daily-order-count dt { color: var(--ink); font: 700 10px/1 monospace; }
.daily-order-count dd { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.daily-order-count dd span { color: var(--muted); font: 700 9px/1 "Avenir Next", sans-serif; }
.daily-order-count dd b { color: var(--orange); font: 650 23px/1 "Iowan Old Style", serif; }
.connection-chip { display: flex; gap: 7px; align-items: center; padding: 0 18px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.connection-chip i { width: 7px; height: 7px; border-radius: 50%; background: #55a679; box-shadow: 0 0 0 4px rgba(85,166,121,.12); }

.workspace-card { border: 1px solid var(--line); border-radius: 6px 6px 22px 6px; background: var(--surface); box-shadow: var(--shadow); }

/* Configuration uses compact cards instead of the fulfillment table's horizontal timeline. */
.settings-topbar { margin-bottom: 18px; }
.settings-health { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 10px; }
.settings-health i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px rgba(231,199,91,.15); }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 155px); overflow: hidden; border: 1px solid var(--line); border-radius: 16px 6px 24px 6px; background: rgba(255,253,247,.82); box-shadow: var(--shadow); }
.settings-nav { display: flex; flex-direction: column; gap: 6px; padding: 18px 12px; border-right: 1px solid var(--line); background: #eee8da; }
.settings-nav button { display: grid; grid-template-columns: 30px 1fr; gap: 2px 9px; padding: 13px 12px; border: 0; border-radius: 10px; color: #59666a; background: transparent; text-align: left; }
.settings-nav button b { grid-row: 1 / 3; align-self: center; color: #9b9589; font: 750 9px/1 monospace; }
.settings-nav button span { font-size: 12px; font-weight: 750; }
.settings-nav button small { color: #8b918f; font-size: 8px; }
.settings-nav button.active { color: white; background: var(--teal); box-shadow: inset 3px 0 var(--orange); }
.settings-nav button.active b, .settings-nav button.active small { color: #c9ddda; }
.settings-content { min-width: 0; padding: 22px; }
.settings-panel-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-panel-heading > div { display: grid; grid-template-columns: auto 1fr; column-gap: 11px; align-items: center; }
.settings-panel-heading > div > span { grid-row: 1 / 3; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: white; background: var(--teal); font: 750 10px/1 monospace; }
.settings-panel-heading h2 { font-size: 25px; }
.settings-panel-heading p { grid-column: 2; margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.integration-card { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fffdf8; }
.integration-card header { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-bottom: 18px; }
.integration-card header h3 { margin: 0 0 3px; font-size: 14px; }
.integration-card header small { color: var(--muted); font-size: 8px; }
.integration-card header button { padding: 6px 8px; border: 1px solid #b9cdc7; border-radius: 6px; color: var(--teal); background: #f3faf7; font-size: 8px; font-weight: 750; }
.integration-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: white; font-weight: 800; }
.gmail-mark { background: #d95b43; }
.yun-mark { background: var(--teal); font-size: 10px; }
.integration-card label, .config-form-grid label { display: grid; gap: 6px; margin-bottom: 12px; color: #536065; font-size: 9px; font-weight: 700; }
.integration-card input, .integration-card select, .config-form-grid input, .config-form-grid select, .config-form-grid textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; font-size: 10px; }
.integration-card input[readonly] { color: var(--muted); background: #f3f1eb; }
.settings-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settings-note { margin: 3px 0 0; padding: 10px; color: var(--muted); background: #f6f2e9; font-size: 8px; line-height: 1.5; }
.gmail-action-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 3px 0 10px; }
.gmail-action-row button { padding: 7px 9px; border: 1px solid #b9cdc7; border-radius: 6px; color: var(--teal); background: #f3faf7; font-size: 8px; font-weight: 750; }
.gmail-action-row button:disabled { opacity: .45; cursor: default; }
.gmail-action-row .quiet-danger { margin-left: auto; color: #9a5a43; border-color: #dfc9bc; background: #fff8f2; }
.credential-summary { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #e5dfd4; font-size: 9px; }
.credential-summary span { color: var(--muted); }
.credential-summary strong { color: var(--teal); }
.mapping-list, .partner-list { display: grid; gap: 10px; margin-top: 16px; }
.mapping-entry { display: grid; grid-template-columns: 54px minmax(180px, 1.5fr) minmax(120px, .8fr) minmax(150px, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; }
.mapping-thumb { display: grid; width: 52px; height: 52px; place-items: center; overflow: hidden; border: 1px solid #ddd5c6; border-radius: 9px; color: #9a9387; background: #f3eee3; font-size: 8px; }
.mapping-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mapping-entry strong, .mapping-entry small { display: block; }
.mapping-entry strong { font-size: 10px; }
.mapping-entry small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.mapping-entry code { color: #795c31; font: 750 10px/1.3 monospace; }
.mapping-entry button, .partner-entry button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--teal); background: white; font-size: 8px; font-weight: 750; }
.partner-actions { display: grid; gap: 6px; }
.partner-entry button.partner-delete { color: #a34232; border-color: #e4c8bc; }
.settings-empty { display: grid; place-items: center; gap: 5px; margin-top: 16px; min-height: 220px; border: 1px dashed #d5ccbb; border-radius: 12px; color: var(--muted); text-align: center; }
.settings-empty strong { color: var(--ink); font-size: 13px; }
.settings-empty span { font-size: 9px; }
.partner-entry { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(140px, 1fr) minmax(170px, 1.2fr) minmax(120px, .8fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fffdf8; }
.partner-entry h3 { margin: 0 0 5px; font-size: 12px; }
.partner-entry span, .partner-entry small { display: block; color: var(--muted); font-size: 8px; line-height: 1.5; }
.partner-entry strong { display: block; margin-bottom: 4px; font-size: 9px; }
.partner-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.partner-badges em { padding: 4px 7px; border-radius: 9px; color: #35685f; background: #e4f0ec; font-size: 10px; font-style: normal; font-weight: 750; }
.partner-badges em.priority { color: #8a572e; background: #f5e1cf; }
.config-dialog { width: min(760px, calc(100vw - 32px)); }
.config-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 0 23px; }
.config-form-grid label small { color: #9a958b; font-size: 10px; font-weight: 500; line-height: 1.45; }
.config-form-grid .wide-field { grid-column: 1 / -1; }
.yun-config-sections { display: grid; gap: 16px; margin-top: 18px; }
.yun-config-section { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fffdf8; }
.yun-config-section-heading { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 66px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #f7f4ec; }
.yun-config-section-number { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: white; background: var(--teal); font: 750 10px/1 monospace; }
.yun-config-section-heading h3 { margin: 0; font-size: 14px; }
.yun-config-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.yun-config-section-heading > button, .yun-subheading button { padding: 8px 10px; border: 1px solid #bfd1cc; border-radius: 7px; color: var(--teal); background: #f8fcfa; font-size: 10px; font-weight: 750; }
.yun-required-chip { padding: 5px 8px; border-radius: 12px; color: #8b542d; background: #f6e3d2; font-size: 10px; font-weight: 750; }
.yun-basic-section .yun-config-section-heading { background: #edf3f0; }
.yun-basic-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; }
.yun-field-preview { min-height: 93px; padding: 15px 16px; border-right: 1px solid #e4ded2; border-bottom: 1px solid #e4ded2; }
.yun-field-preview:nth-child(3n) { border-right: 0; }
.yun-field-preview:nth-last-child(-n + 3) { border-bottom: 0; }
.yun-field-preview small, .yun-field-preview strong, .yun-field-preview span { display: block; }
.yun-field-preview small { color: var(--muted); font-size: 10px; font-weight: 700; }
.yun-field-preview strong { margin-top: 9px; font-size: 11px; }
.yun-field-preview span { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.yun-weight-field > div { display: flex; gap: 6px; align-items: center; margin-top: 7px; }
.yun-weight-field > div span { margin: 0 auto 0 0; }
.yun-weight-field input { width: 64px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 10px; }
.yun-weight-field b { color: var(--muted); font-size: 10px; }
.yun-weight-field button { padding: 7px 8px; border: 1px solid #c4d4cf; border-radius: 6px; color: var(--teal); background: white; font-size: 10px; font-weight: 750; }
.yun-auto-note { background: #fbf6e9; }
.yun-sender-section .yun-config-section-heading { background: #eef4f1; }
.yun-sender-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px 14px; padding: 16px; }
.yun-sender-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.yun-sender-grid input, .yun-sender-grid textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 11px; }
.yun-sender-wide { grid-column: 1 / -1; }
.yun-declaration-section .yun-config-section-heading { background: #faf1df; }
.declaration-mapping-summary { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: #fffaf0; font-size: 11px; font-weight: 700; }
.declaration-mapping-summary::before { content: "SKU 自动映射"; flex: 0 0 auto; padding: 4px 7px; border-radius: 99px; color: var(--teal); background: #e3f0ec; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.yun-declaration-labels { display: grid; grid-template-columns: 1.1fr 1.35fr .8fr 56px; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f8f5ee; font-size: 11px; font-weight: 750; }
.yun-declaration-list { gap: 0; margin: 0; }
.yun-declaration-list .template-entry { border: 0; border-bottom: 1px solid #e4ded2; border-radius: 0; background: transparent; }
.yun-declaration-list .template-entry:last-child { border-bottom: 0; }
.yun-declaration-list .declaration-template-entry { grid-template-columns: 1.1fr 1.35fr .8fr 56px; gap: 12px; padding: 14px; }
.declaration-template-entry > div { min-width: 0; }
.declaration-template-entry strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.declaration-template-entry small { overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.declaration-template-entry .cargo { margin-right: 5px; }
.declaration-template-entry .declaration-values { display: grid; align-content: center; }
.sku-mapping-field { display: grid; gap: 6px; }
.sku-mapping-title { display: flex; align-items: center; justify-content: space-between; }
.sku-mapping-title b { padding: 4px 7px; border-radius: 99px; color: var(--teal); background: #e3f0ec; font-size: 10px; }
.sku-mapping-field small, .sku-mapping-field em { color: var(--muted); font-size: 10px; font-style: normal; line-height: 1.5; }
.sku-mapping-field em { padding: 7px 9px; border-left: 3px solid #d7aa67; background: #fcf6eb; }
.declaration-bound-sku-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 31px; padding: 6px 8px; border: 1px solid #e3ddd1; border-radius: 7px; background: #fffdfa; }
.bound-sku-label, .bound-sku-empty { color: var(--muted); font-size: 10px; font-weight: 700; }
.bound-sku-tag { display: inline-flex; align-items: center; gap: 2px; padding: 5px 6px 5px 8px; border: 1px solid #bdd8d1; border-radius: 99px; color: var(--teal); background: #e9f3f0; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; line-height: 1; }
.bound-sku-tag button { display: grid; width: 14px; height: 14px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #996046; background: transparent; font-size: 13px; line-height: 1; opacity: 0; pointer-events: none; transform: scale(.75); transition: opacity .15s ease, transform .15s ease, background .15s ease; }
.bound-sku-tag:hover button, .bound-sku-tag button:focus-visible { opacity: 1; pointer-events: auto; transform: scale(1); background: #f6dfd1; outline: none; }
.declaration-match-summary { display: grid; gap: 7px; margin: 20px 23px; padding: 16px; border: 1px solid #d9d2c5; border-radius: 10px; background: #f7f4ed; }
.declaration-match-summary small { color: var(--muted); font-size: 10px; font-weight: 700; }
.declaration-match-summary strong { color: var(--teal); font-family: "IBM Plex Mono", monospace; font-size: 17px; }
.declaration-match-summary span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.declaration-match-dialog .assignment-shell > label { margin: 0 23px 18px; }
.yun-rules-section .yun-config-section-heading { background: #eef2f2; }
.yun-field-rules-section .yun-config-section-heading { background: #f3eee6; }
.country-extra-rules { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.country-extra-rule { display: grid; gap: 8px; padding: 16px; border-right: 1px solid var(--line); }
.country-extra-rule:last-child { border-right: 0; }
.country-extra-rule strong { font-size: 13px; }
.country-extra-rule p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.country-extra-rule label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.country-extra-rule label div { display: flex; gap: 6px; align-items: center; }
.country-extra-rule input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 11px; }
.country-extra-rule button { padding: 8px 10px; border: 1px solid #c4d4cf; border-radius: 6px; color: var(--teal); background: white; font-size: 10px; font-weight: 750; }
.address-extra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 23px 12px; }
.address-extra-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.address-extra-grid label:last-child { grid-column: 1 / -1; }
.address-phone-line { display: block; margin-top: 4px; color: #526064; font-size: 10px; }
.yunexpress-pending span.field-check-missing { color: #8a3b2a; }
.yunexpress-pending span.field-check-missing::before { content: "!"; color: #c45c38; }
.yunexpress-pending .field-check-action { margin-top: 4px; }
.yunexpress-pending .field-check-action::before { content: none; }
.yun-rules-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr); }
.yun-rule-column, .yun-catalog-column { min-width: 0; padding: 14px; }
.yun-rule-column { border-right: 1px solid var(--line); }
.yun-catalog-column { background: #faf8f2; }
.yun-subheading { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #e3ddd1; }
.yun-subheading h4 { margin: 0; font-size: 12px; }
.yun-subheading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.yun-catalog-count { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 4px; color: var(--muted); font-size: 10px; }
.yun-catalog-count strong { color: var(--ink); font-size: 11px; }
.yun-catalog-column #yun-product-catalog-list { display: grid; gap: 6px; padding-top: 8px; }
.yun-catalog-column #yun-product-catalog-list span { display: flex; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid #e0dbcf; border-radius: 7px; color: #596468; background: white; font-size: 10px; }
.yun-catalog-column #yun-product-catalog-list b { color: var(--teal); font-family: monospace; font-size: 10px; }
.yun-template-summary { display: grid; grid-template-columns: 1fr 1.15fr 1.35fr; gap: 10px; margin: 18px 0 12px; }
.yun-template-summary article { min-height: 86px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; }
.yun-template-summary small, .yun-template-summary span { display: block; color: var(--muted); font-size: 10px; }
.yun-template-summary strong { display: block; margin: 7px 0; font-size: 12px; }
.yun-template-summary article:nth-child(2) { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.yun-template-summary label { position: relative; display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.yun-template-summary input { width: 100%; padding: 9px 34px 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.yun-template-summary label b { position: absolute; right: 10px; bottom: 10px; color: #8b918f; font-size: 10px; }
.yun-template-summary button, .yun-template-card header button { padding: 8px 10px; border: 1px solid #c9d8d4; border-radius: 7px; color: var(--teal); background: #f7fbf9; font-size: 10px; font-weight: 750; }
.yun-template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yun-template-card, .yun-product-catalog { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,248,.9); }
.yun-template-card > header, .yun-product-catalog > header { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.yun-template-card h3, .yun-product-catalog h3 { margin: 0; font-size: 13px; }
.yun-template-card p, .yun-product-catalog p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.template-list { display: grid; gap: 7px; margin-top: 10px; }
.template-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid #e1dacd; border-radius: 8px; background: white; }
.template-entry strong, .template-entry small { display: block; }
.template-entry strong { font-size: 11px; }
.template-entry small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.template-entry button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--teal); background: white; font-size: 10px; font-weight: 750; }
.template-entry .cargo { display: inline-block; margin-right: 4px; padding: 2px 5px; border-radius: 8px; color: #38695f; background: #e3efeb; }
.template-entry .cargo.battery { color: #92532f; background: #f6dfce; }
.compact-empty { min-height: 125px; }
.yun-product-catalog { margin-top: 12px; }
.yun-product-catalog > header > span { color: var(--muted); font-size: 10px; }
.yun-product-catalog-list, #yun-product-catalog-list { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 11px; }
#yun-product-catalog-list span { padding: 7px 9px; border: 1px solid #d5dedb; border-radius: 6px; color: #536865; background: #f3f8f6; font-size: 10px; }
#yun-product-catalog-list b { margin-left: 5px; font-family: monospace; }

@media (max-width: 980px) {
  .settings-layout { grid-template-columns: 1fr; }
  .country-extra-rules { grid-template-columns: 1fr; }
  .country-extra-rule { border-right: 0; border-bottom: 1px solid var(--line); }
  .country-extra-rule:last-child { border-bottom: 0; }
  .settings-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-nav button { min-width: 185px; }
  .integration-grid { grid-template-columns: 1fr; }
  .mapping-entry, .partner-entry { grid-template-columns: 1fr 1fr; }
  .yun-template-summary, .yun-template-grid { grid-template-columns: 1fr; }
}
.section-heading { display: flex; justify-content: space-between; align-items: center; padding: 19px 22px 16px; border-bottom: 1px solid var(--line); }
.section-heading > div > small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.table-tools { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 11px; }
.table-tools button { border: 0; color: var(--teal); background: transparent; font-weight: 700; }
.gmail-sync-button { padding: 7px 10px; border: 1px solid #b8d0c9; border-radius: 6px; color: #215f58; background: #eff7f3; font-size: 9px; font-weight: 750; white-space: nowrap; }
.gmail-sync-button:hover { border-color: var(--teal); background: #e3f1eb; }
.gmail-sync-button:disabled { opacity: .6; cursor: wait; }
.topbar-gmail-sync { box-shadow: 0 4px 0 #215d56; }
.order-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f5f1e7; }
.order-tabs button { display: flex; gap: 6px; align-items: center; padding: 7px 10px; border-radius: 5px; color: var(--muted); font-size: 10px; }
.order-tabs button.active { color: white; background: var(--teal); }
.order-tabs b { display: inline-grid; min-width: 17px; height: 17px; padding: 0 4px; place-items: center; border-radius: 9px; color: inherit; background: rgba(255,255,255,.2); font: 700 8px/1 monospace; }
.date-filter { display: flex; align-items: center; gap: 7px; padding-right: 10px; border-right: 1px solid var(--line); }
.date-filter-label { color: var(--muted); font-size: 9px; white-space: nowrap; }
.date-filter i { color: var(--muted); font-size: 9px; font-style: normal; }
.date-filter input { width: 148px; min-width: 148px; padding: 6px 28px 6px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fffdf7; font: 650 11px/1.2 "Avenir Next", "PingFang SC", sans-serif; }
.date-filter button { padding: 5px 2px; font-size: 9px; white-space: nowrap; }
.date-filter button:disabled { color: #aaa69d; cursor: default; }
.tracking-filter { display: flex; align-items: center; grid-template-columns: none; gap: 7px; padding-right: 10px; border-right: 1px solid var(--line); }
.tracking-filter span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.tracking-filter select { width: 155px; padding: 6px 25px 6px 8px; border-radius: 5px; background: #fffdf7; font-size: 9px; }
.stage-roadmap { display: flex; align-items: center; gap: 9px; padding: 10px 22px; border-bottom: 1px solid var(--line); color: #99958c; background: #fbf8ef; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.stage-roadmap::-webkit-scrollbar { display: none; }
.stage-roadmap span { font-size: 9px; }
.stage-roadmap span b { margin-right: 5px; font-family: monospace; }
.stage-roadmap span.active { padding: 5px 9px; border-radius: 4px; color: #215d58; background: #dcece7; font-weight: 750; }
.stage-roadmap i { color: #b6b0a5; font-style: normal; }
.table-wrap { position: relative; min-height: 310px; overflow-x: auto; }
.process-table-wrap { height: clamp(760px, calc(100vh - 130px), 1260px); min-height: 760px; overflow: auto; scrollbar-color: var(--orange) #e9e3d7; scrollbar-width: thin; }
.process-table-wrap::-webkit-scrollbar { height: 12px; }
.process-table-wrap::-webkit-scrollbar-track { background: #e9e3d7; }
.process-table-wrap::-webkit-scrollbar-thumb { border: 3px solid #e9e3d7; border-radius: 20px; background: var(--orange); }
.process-table { --item-row-height: 72px; width: 2905px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.process-table th { padding: 11px 13px; color: #697174; border-right: 1px solid #ddd8cc; background: #f4f1e8; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-align: left; white-space: nowrap; }
.process-table td { min-height: 98px; padding: 13px; border-top: 1px solid #e5e0d5; border-right: 1px solid #eee9de; font-size: 11px; line-height: 1.35; vertical-align: middle; background: var(--surface); }
.process-table tbody tr:nth-child(even) td { background: #fcfaf4; }
.process-table .stage-header th { position: sticky; top: 0; z-index: 7; height: 39px; padding: 8px 13px; color: #35484a; border-bottom: 1px solid #cfc8ba; background: #e7eadf; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.process-table .stage-header th span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; color: white; background: var(--teal); font: 750 8px/1 monospace; }
.process-table .stage-header .intake-stage-header { position: sticky; left: 0; z-index: 9; border-right: 1px solid #cfc8ba; background: #e7eadf; box-shadow: 8px 0 14px rgba(49,56,57,.06); }
.process-table .stage-header .intake-stage-fill { padding: 0; }
.process-table .column-header th { position: sticky; top: 39px; z-index: 6; box-shadow: inset 0 -1px #d9d4c8; }
.process-table col:nth-child(1) { width: 125px; }
.process-table col:nth-child(2) { width: 135px; }
.process-table col:nth-child(3) { width: 370px; }
.process-table col:nth-child(4) { width: 170px; }
.process-table col:nth-child(5) { width: 70px; }
.process-table col:nth-child(6) { width: 190px; }
.process-table col:nth-child(7) { width: 100px; }
.process-table col:nth-child(8) { width: 90px; }
.process-table col:nth-child(9) { width: 115px; }
.process-table col:nth-child(10) { width: 220px; }
.process-table col:nth-child(11) { width: 170px; }
.process-table col:nth-child(12) { width: 125px; }
.process-table col:nth-child(13) { width: 125px; }
.process-table col:nth-child(14) { width: 155px; }
.process-table col:nth-child(15) { width: 205px; }
.process-table col:nth-child(16) { width: 160px; }
.process-table col:nth-child(17) { width: 180px; }
.process-table col:nth-child(18) { width: 200px; }
.process-table col:nth-child(19) { width: 175px; }
.process-table .column-header th:nth-child(5),
.process-table td:nth-child(5) { text-align: center; }
.process-table .sticky-order { position: sticky; left: 0; z-index: 4; border-right: 1px solid #cfc8ba; background: #fffaf0; box-shadow: 8px 0 14px rgba(49,56,57,.06); }
.process-table tbody .sticky-order { z-index: 2; }
.process-table .column-header .sticky-order { z-index: 8; background: #f2eee3; }
.shipping-stage-header { border-left: 2px solid #7faaa1 !important; background: #edf3ef !important; }
.process-table .stage-header .shipping-stage-header { padding-right: 7px; }
.shipping-stage-content { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.shipping-stage-title { display: flex; align-items: center; min-width: 0; }
.shipping-stage-title strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.process-table .stage-header .shipping-stage-title span { flex: 0 0 auto; margin-right: 5px; }
.process-table td.yunexpress-cell { border-left: 2px solid #b7c9c5; background: #f8faf7; }
.process-table tbody tr:nth-child(even) td.yunexpress-cell { background: #f4f7f3; }
.order-cell { position: relative; }
.order-cell strong { color: var(--teal); font-size: 12px; }
.order-cell.has-date-marker .order-number-line { padding-top: 18px; }
.order-date-marker { position: absolute; top: -1px; left: -1px; z-index: 1; padding: 6px 8px 5px; border-radius: 0 0 7px 0; color: #fffaf2; background: linear-gradient(135deg, #eb7b43, var(--orange)); box-shadow: 2px 3px 0 rgba(184, 75, 34, .18); font: 800 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.order-number-line { display: flex; gap: 6px; align-items: center; min-width: 0; }
.order-number-line strong { min-width: 0; font-size: 11px; white-space: nowrap; }
.order-more-button { position: absolute; top: 9px; right: 8px; padding: 0 3px 2px; border: 0; border-radius: 4px; color: #9a958b; background: transparent; font: 800 9px/1 sans-serif; letter-spacing: -1px; cursor: pointer; }
.order-more-button:hover,
.order-more-button:focus-visible { color: var(--teal); background: #e3efeb; outline: 0; }
.order-milestone { display: grid; grid-template-columns: 7px minmax(0, 1fr); gap: 6px; align-items: start; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e5dfd3; }
.order-milestone > i { width: 7px; height: 7px; margin-top: 2px; border-radius: 50%; background: #aaa398; box-shadow: 0 0 0 3px rgba(170,163,152,.12); }
.order-milestone span { display: block; color: var(--ink); font-size: 10px; font-weight: 750; line-height: 1.25; }
.order-milestone small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.3; }
.order-milestone.milestone-working > i { background: #d99345; box-shadow: 0 0 0 3px rgba(217,147,69,.13); }
.order-milestone.milestone-awaiting > i { background: var(--orange); box-shadow: 0 0 0 3px rgba(222,106,60,.13); }
.order-milestone.milestone-active > i { background: var(--teal); box-shadow: 0 0 0 3px rgba(50,117,110,.13); }
.order-milestone.milestone-complete > i { background: #4d9b70; box-shadow: 0 0 0 3px rgba(77,155,112,.13); }
.order-milestone.milestone-exception > i { background: #b44732; box-shadow: 0 0 0 3px rgba(180,71,50,.13); }
.order-milestone.milestone-terminated > i { background: #77716a; box-shadow: 0 0 0 3px rgba(119,113,106,.13); }
.order-milestone.milestone-cancelled > i { background: #c43b2e; box-shadow: 0 0 0 3px rgba(196,59,46,.16); }
.order-milestone.milestone-cancelled span { color: #c43b2e; font-weight: 800; }
.copy-order-button { position: relative; flex: 0 0 17px; width: 17px; height: 17px; padding: 0; border: 0; border-radius: 4px; color: #8b9696; background: transparent; }
.copy-order-button::before,
.copy-order-button::after { content: ""; position: absolute; width: 7px; height: 8px; border: 1px solid currentColor; border-radius: 2px; background: #fffaf0; }
.copy-order-button::before { top: 3px; left: 3px; }
.copy-order-button::after { top: 6px; left: 6px; }
.copy-order-button:hover,
.copy-order-button:focus-visible { color: var(--teal); background: #e3efeb; outline: 0; }
.date-reconciliation { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 20px; padding: 7px 18px; border-bottom: 1px solid var(--line); background: #f8f2e4; overflow: visible; }
.date-quick-filters,
.date-reconciliation-summary { display: flex; align-items: center; white-space: nowrap; }
.date-quick-filters { gap: 5px; }
.date-quick-filters button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid transparent; border-radius: 5px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 700; }
.date-quick-filters button b { display: inline-grid; min-width: 17px; height: 17px; margin-left: 0; place-items: center; border-radius: 9px; color: #776f62; background: #e7dfd0; font: 750 8px/1 monospace; }
.date-quick-filters button:hover { color: var(--teal); background: #eef2e9; }
.date-quick-filters button.active { color: white; border-color: var(--teal); background: var(--teal); }
.date-quick-filters button.active b { color: var(--teal); background: white; }
.order-calendar-control { position: relative; display: inline-flex; align-items: center; }
.date-quick-filters .order-calendar-trigger { display: inline-flex; gap: 5px; align-items: center; margin-left: 2px; padding-inline: 7px; color: var(--teal); border-color: #d8d0c0; background: #fffdf7; }
.order-calendar-trigger svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.order-calendar-trigger span { white-space: nowrap; }
.order-calendar-popover { position: absolute; top: calc(100% + 7px); left: 0; z-index: 30; width: 294px; padding: 11px; border: 1px solid #d7d0c3; border-radius: 10px; background: #fffdf7; box-shadow: 0 14px 36px rgba(38, 48, 47, .18); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .14s ease, transform .14s ease, visibility .14s; }
.order-calendar-control:hover .order-calendar-popover,
.order-calendar-control:focus-within .order-calendar-popover,
.order-calendar-control.force-open .order-calendar-popover { opacity: 1; visibility: visible; transform: translateY(0); }
.order-calendar-popover::before { position: absolute; top: -8px; left: 18px; width: 14px; height: 14px; border-top: 1px solid #d7d0c3; border-left: 1px solid #d7d0c3; background: #fffdf7; content: ""; transform: rotate(45deg); }
.order-calendar-popover header { position: relative; display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; margin-bottom: 8px; }
.order-calendar-popover header strong { color: var(--ink); font-size: 11px; text-align: center; }
.date-quick-filters .order-calendar-popover header button { padding: 4px; color: var(--teal); border: 0; background: transparent; font-size: 18px; line-height: 1; }
.order-calendar-weekdays,
.order-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.order-calendar-weekdays { margin-bottom: 4px; color: var(--muted); font-size: 8px; text-align: center; }
.date-quick-filters .order-calendar-day { display: grid; min-height: 38px; padding: 4px 2px; place-content: center; gap: 2px; border: 1px solid transparent; border-radius: 6px; color: #9b978e; background: #f5f1e8; text-align: center; }
.date-quick-filters .order-calendar-day span { font: 700 9px/1 monospace; }
.date-quick-filters .order-calendar-day b { display: block; min-width: 0; height: auto; margin: 0; color: #aaa69d; background: transparent; font: 700 7px/1 monospace; }
.date-quick-filters .order-calendar-day.has-orders { color: var(--ink); border-color: #e2cbb6; background: #fff0e3; }
.date-quick-filters .order-calendar-day.has-orders b { color: var(--orange); }
.date-quick-filters .order-calendar-day:hover,
.date-quick-filters .order-calendar-day.selected { color: white; border-color: var(--teal); background: var(--teal); }
.date-quick-filters .order-calendar-day:hover b,
.date-quick-filters .order-calendar-day.selected b { color: white; background: transparent; }
.order-calendar-popover footer { display: flex; gap: 6px; align-items: center; margin-top: 9px; padding-top: 8px; border-top: 1px solid #e5dfd3; color: var(--muted); font-size: 8px; }
.order-calendar-popover footer i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.order-calendar-blank { min-height: 38px; }
.date-reconciliation-summary { gap: 15px; color: var(--muted); font-size: 9px; }
.date-reconciliation-summary strong { color: var(--ink); font: 650 14px/1 "Iowan Old Style", "Songti SC", serif; }
.date-reconciliation-summary span { padding-left: 15px; border-left: 1px solid #d8d0c0; }
.date-reconciliation-summary b { color: var(--ink); font-size: 10px; }
.batch-yunexpress-button { display: inline-flex; gap: 5px; align-items: center; margin-left: auto; padding: 5px 7px; border: 1px solid #b8cfc8; border-radius: 6px; color: #255f57; background: #f8fcf9; font-size: 8px; font-weight: 800; white-space: nowrap; }
.batch-yunexpress-button em { font-style: normal; }
.batch-yunexpress-button b { display: inline-grid; min-width: 17px; height: 17px; place-items: center; border-radius: 9px; color: white; background: var(--orange); font: 750 7px/1 monospace; }
.batch-yunexpress-button:hover:not(:disabled) { border-color: var(--orange); background: #fff0df; }
.batch-yunexpress-button:disabled { color: #aaa49a; border-color: #ddd7cc; background: #f1eee7; cursor: default; }
.batch-yunexpress-button:disabled b { background: #b9b3a8; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); }
.process-table td.product-cell,
.process-table td.variant-cell,
.process-table td.quantity-cell { vertical-align: top; }
.product-entry { display: grid; grid-template-columns: 54px minmax(0, 1fr); height: var(--item-row-height); box-sizing: border-box; gap: 10px; align-items: center; }
.product-entry + .product-entry,
.variant-entry + .variant-entry,
.quantity-entry + .quantity-entry,
.supplier-entry + .supplier-entry,
.internal-sku-entry + .internal-sku-entry,
.assignment-entry + .assignment-entry { margin-top: 0; padding-top: 8px; border-top: 1px solid #dcd5c8; }
.product-entry img { width: 54px; height: 54px; border: 1px solid #ddd5c7; border-radius: 7px; object-fit: cover; background: #f3ede1; }
.product-entry strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; color: #20292b; font-size: 10px; font-weight: 700; line-height: 1.25; }
.product-entry small { font-family: monospace; font-size: 8px; }
.more-items { display: block; margin-top: 7px; color: var(--teal); font-size: 9px; font-weight: 700; }
.variant-entry,
.supplier-entry,
.internal-sku-entry,
.assignment-entry { display: flex; height: var(--item-row-height); box-sizing: border-box; flex-direction: column; justify-content: center; }
.variant-option { display: flex; gap: 4px; align-items: baseline; line-height: 1.45; }
.variant-option span { color: var(--muted); font-size: 9px; }
.variant-option strong { display: inline; color: #20292b; font-size: 10px; font-weight: 700; line-height: 1.25; }
.variant-entry .no-variant { color: var(--muted); font-size: 9px; }
.quantity-entry { display: flex; height: var(--item-row-height); box-sizing: border-box; align-items: center; justify-content: center; gap: 3px; }
.quantity-entry strong { display: inline; font: 600 22px/1 "Iowan Old Style", serif; }
.quantity-entry span { color: var(--muted); font-size: 9px; }
.quantity-cell > small { margin-top: 8px; padding-top: 8px; border-top: 1px solid #dcd5c8; white-space: nowrap; }
.address-cell strong { margin-bottom: 6px; font-size: 12px; }
.address-heading > strong { min-width: 0; }
.address-footer-actions { display: flex; min-height: 25px; margin-top: 9px; align-items: center; justify-content: space-between; gap: 8px; }
.address-action-group { display: flex; gap: 6px; align-items: center; }
.address-edit-button,
.original-address-button { display: inline-flex; height: 22px; padding: 0 6px; border: 1px solid #d5d9d5; border-radius: 5px; align-items: center; justify-content: center; gap: 4px; color: #7b8381; background: #fafbf9; cursor: pointer; }
.address-edit-button { width: 21px; height: 21px; padding: 0; border-color: #c7ceca; color: #737d7a; background: #f4f6f4; }
.address-edit-button svg,
.original-address-button svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.address-edit-button svg { width: 10px; height: 10px; }
.original-address-button span { font-size: 8px; font-weight: 800; }
.address-edit-button:hover,
.original-address-button:hover { color: #5e6b68; border-color: #bdc7c3; background: #f0f3f0; box-shadow: none; }
.original-address-control { position: relative; }
.original-address-popover { position: absolute; z-index: 30; top: 31px; left: 0; display: none; width: 210px; padding: 12px; border: 1px solid #d8d0c2; border-radius: 9px; color: var(--ink); background: #fffdf8; box-shadow: 0 14px 30px rgba(32,41,43,.18); }
.original-address-control:hover .original-address-popover,
.original-address-control:focus-within .original-address-popover { display: grid; gap: 4px; }
.original-address-popover b { margin-bottom: 4px; font-size: 10px; }
.original-address-popover span { color: var(--muted); font-size: 9px; line-height: 1.35; }
.original-address-popover button { width: fit-content; margin-top: 7px; padding: 5px 8px; border: 1px solid #b9d2ca; border-radius: 5px; color: var(--teal); background: #edf5f1; font-size: 8px; font-weight: 800; cursor: pointer; }
.address-modified-badge { display: inline-flex; padding: 4px 7px; border-radius: 10px; color: #96502f; background: #f5dfd1; font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.address-lines { display: grid; gap: 2px; color: var(--muted); }
.address-lines span { display: block; }
.missing-value { color: #a29f98; font-size: 10px; }
.intake-status { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 20px; font-size: 9px; font-weight: 750; }
.intake-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.intake-status.success { color: #27684b; background: #dcecdf; }
.intake-status.complete { color: #1f6258; background: #d4ebe5; }
.intake-status.warning { color: #93472e; background: #f5d9ce; }
.supplier-stage-header { border-left: 2px solid #c89045; background: #f4e8cf !important; }
.supplier-cell,
.internal-sku-cell,
.assignment-status-cell { vertical-align: top !important; background: #fffaf0 !important; }
.supplier-cell { border-left: 2px solid #ddc99e; }
.supplier-entry button,
.internal-sku-entry button { width: fit-content; max-width: 100%; padding: 5px 7px; border: 1px solid #d9caa8; border-radius: 5px; overflow: hidden; color: var(--teal); background: #fffdf7; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.internal-sku-entry button { color: #8a6331; border-style: dashed; }
.internal-sku-row { display: flex; min-width: 0; align-items: center; gap: 4px; }
.internal-sku-entry .copy-order-button { flex: 0 0 17px; width: 17px; height: 17px; padding: 0; border: 0; border-radius: 4px; color: #8b9696; background: transparent; }
.internal-sku-entry .copy-order-button:hover,
.internal-sku-entry .copy-order-button:focus-visible { color: var(--teal); background: #e3efeb; outline: 0; }
.assignment-badge { display: inline-flex; width: fit-content; padding: 5px 7px; border-radius: 15px; font-size: 8px; font-weight: 750; }
.assignment-badge.assigned { color: #27684b; background: #dcecdf; }
.assignment-badge.pending { color: #8a6331; background: #f5e7ca; }
.assignment-entry small { font-size: 8px; }
.pickup-stage-header { border-left: 2px solid #8ca9a2; background: #e7efeb !important; }
.pickup-cell { border-left: 2px solid #c6d7d2; background: #fafcf9 !important; }
.process-table tbody tr:nth-child(even) td.pickup-cell { background: #f6f9f6 !important; }
.pickup-cell > strong,
.pickup-cell > small { display: block; }
.pickup-cell > strong { margin-top: 7px; font-size: 9px; }
.pickup-cell > small { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.pickup-state { display: inline-flex; width: fit-content; padding: 6px 8px; border-radius: 5px; font-size: 9px; font-weight: 750; }
.pickup-state.pending { color: #7b6b51; background: #ece7da; }
.pickup-state.automatic { color: #245e55; background: #dcece6; }
.pickup-arrangement-button { display: grid; width: 100%; gap: 5px; padding: 10px; border: 1px solid #ddcaa7; border-radius: 8px; color: #745632; background: #fbf4e8; text-align: left; }
.pickup-arrangement-button span { font-size: 10px; font-weight: 800; }
.pickup-arrangement-button strong { overflow: hidden; color: var(--ink); font: 750 9px/1.3 monospace; text-overflow: ellipsis; white-space: nowrap; }
.pickup-arrangement-button small { color: var(--muted); font-size: 8px; }
.pickup-arrangement-button.arranged { color: #245e55; border-color: #bdd5ce; background: #e9f3ef; }
.pickup-arrangement-button:hover { border-color: #ad9670; box-shadow: 0 4px 12px rgba(55,65,62,.08); }
.pickup-arrangement-button.arranged:hover { border-color: #7fa99f; }
.routing-stage-header { border-left: 2px solid #bda779; background: #f7edd9 !important; }
.route-cell,
.supplier-progress-cell,
.handoff-cell { background: #fffcf5 !important; }
.process-table tbody tr:nth-child(even) .route-cell,
.process-table tbody tr:nth-child(even) .supplier-progress-cell,
.process-table tbody tr:nth-child(even) .handoff-cell { background: #fcf8ee !important; }
.route-cell { border-left: 2px solid #d8c8a5; }
.route-badge,
.handoff-result { display: inline-flex; width: fit-content; padding: 6px 8px; border-radius: 5px; font-size: 9px; font-weight: 750; }
.route-badge.pending { color: #7b6b51; background: #ece7da; }
.route-badge.direct { color: #245e55; background: #dcece6; }
.route-badge.consolidation { color: #844723; background: #f6dfcf; }
.progress-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 5px 0; }
.progress-line + .progress-line { border-top: 1px solid #dfe9e3; }
.progress-line strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.progress-badge { padding: 4px 6px; border-radius: 10px; color: #6f685c; background: #ece8df; font-size: 8px; font-weight: 750; white-space: nowrap; }
.progress-badge.status-handed_to_yunexpress,
.progress-badge.status-sent_to_consolidator { color: #27684b; background: #dcecdf; }
.progress-badge.status-picking,
.progress-badge.status-label_attached { color: #855526; background: #f3e3c9; }
.handoff-result { color: #765b37; background: #eee5d6; }
.handoff-result.complete { color: #21634f; background: #d6ebe1; }
.tracking-stage-header { border-left: 2px solid #829da4; background: #e8eef0 !important; }
.international-tracking-cell { border-left: 2px solid #c4d1d4; background: #f8fafb !important; }
.process-table tbody tr:nth-child(even) .international-tracking-cell { background: #f3f7f8 !important; }
.etsy-stage-header { border-left: 2px solid #d79a73 !important; background: #f8e8dc !important; }
.etsy-column-header { border-left: 2px solid #e1b493 !important; background: #fbf0e7 !important; }
.etsy-backfill-cell { border-left: 2px solid #e1b493; background: #fff7f1 !important; }
.process-table tbody tr:nth-child(even) .etsy-backfill-cell { background: #fcefe6 !important; }
.etsy-backfill-state { display: grid; gap: 5px; align-content: center; min-height: 88px; text-align: left; }
.etsy-backfill-state strong { color: #223033; font-size: 11px; }
.etsy-backfill-state span { color: var(--muted); font-size: 9px; }
.etsy-backfill-state code { color: #263b3d; font: 700 9px/1.4 monospace; overflow-wrap: anywhere; }
.etsy-backfill-state button { width: fit-content; padding: 7px 10px; border: 1px solid #c8d7d2; border-radius: 7px; color: var(--teal); background: #f7fbf9; font: 700 9px/1 sans-serif; cursor: pointer; }
.etsy-backfill-detail { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; align-items: center; }
.etsy-backfill-detail small { grid-column: 1; color: var(--muted); font-size: 8px; }
.etsy-backfill-detail strong, .etsy-backfill-detail code { grid-column: 1; min-width: 0; }
.etsy-backfill-detail .copy-order-button { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.etsy-backfill-state.ready .etsy-backfill-detail .copy-order-button { width: 17px; height: 17px; padding: 0; border: 0; border-radius: 4px; color: #8b9696; background: transparent; }
.etsy-backfill-state.ready button { border-color: #d86d3e; color: white; background: #dd7040; }
.etsy-backfill-state.complete strong { color: var(--teal); }
.tracking-compact { display: grid; width: 100%; gap: 5px; padding: 9px 10px; border: 1px solid #cbd6d8; border-radius: 8px; color: #355a60; background: #f9fcfc; text-align: left; cursor: pointer; }
.tracking-compact:hover { border-color: #7f9da3; box-shadow: 0 5px 14px rgba(38,72,77,.1); }
.tracking-compact span { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; }
.tracking-compact span i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(77,115,121,.1); }
.tracking-compact strong { overflow: hidden; color: var(--ink); font: 750 8px/1.2 monospace; text-overflow: ellipsis; white-space: nowrap; }
.tracking-compact em { overflow: hidden; color: #49656a; font: 750 8px/1.2 monospace; text-overflow: ellipsis; white-space: nowrap; }
.tracking-compact small { color: var(--muted); font-size: 8px; }
.tracking-compact.unavailable { color: #8a857b; border-style: dashed; background: transparent; cursor: default; }
.tracking-compact.status-delivered { color: #27684b; border-color: #bcd6c5; background: #edf6ef; }
.tracking-compact.status-local_carrier_received { color: #245e55; border-color: #9fc8bc; background: #e4f2ed; box-shadow: inset 3px 0 #4e9b86; }
.tracking-compact.status-destination_arrived { color: #3c6570; border-color: #b7ccd1; background: #edf4f5; }
.tracking-compact.status-exception { color: #a24b2d; border-color: #e5b9a8; background: #fff3ee; }

.tracking-drawer { width: min(470px, 100vw); max-width: none; height: 100vh; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; color: var(--ink); background: #fcfaf4; box-shadow: -20px 0 60px rgba(10,28,32,.2); }
.tracking-drawer[open] { animation: tracking-drawer-in .24s ease-out; }
.tracking-drawer::backdrop { background: rgba(10,28,32,.32); backdrop-filter: blur(2px); }
.tracking-drawer-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; }
.tracking-drawer-shell > header { display: flex; justify-content: space-between; align-items: center; padding: 25px 27px; border-bottom: 1px solid var(--line); background: #f7f3e9; }
.tracking-drawer-shell h2 { font: 600 30px/1.1 "Iowan Old Style", serif; }
.tracking-drawer-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px 27px; border-bottom: 1px solid var(--line); }
.tracking-drawer-summary > div { display: grid; gap: 5px; min-width: 0; padding: 12px; border: 1px solid #d8d5cb; border-radius: 8px; background: #fffefb; }
.tracking-drawer-summary .tracking-summary-status { grid-column: 1 / -1; color: #315f61; border-color: #bfd2d2; background: #eaf3f1; }
.tracking-drawer-summary small { color: var(--muted); font-size: 8px; }
.tracking-drawer-summary strong { overflow-wrap: anywhere; font-size: 11px; }
.tracking-drawer-summary .tracking-summary-status strong { font: 600 25px/1.1 "Iowan Old Style", serif; }
.tracking-drawer-summary .last-mile-carrier-card { grid-column: 1 / -1; gap: 9px; padding: 15px; border-color: #d9c79e; background: #fff9e9; }
.tracking-drawer-summary .last-mile-carrier-card.confirmed { border-color: #a9cbbf; background: #edf6f1; }
.last-mile-heading, .last-mile-number, .last-mile-meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.last-mile-heading span { padding: 4px 7px; border-radius: 10px; color: #286455; background: #d8ebe3; font-size: 8px; font-weight: 800; }
.last-mile-carrier-card > strong { font-size: 17px; }
.last-mile-number code { overflow-wrap: anywhere; color: var(--ink); font: 800 11px/1.3 monospace; }
.last-mile-number button { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #a9c8bd; border-radius: 5px; color: #27675a; background: #fff; font-size: 8px; font-weight: 800; cursor: pointer; }
.last-mile-meta { color: var(--muted); font-size: 8px; }
.last-mile-meta b { color: #267052; }
.last-mile-meta a { color: var(--teal); font-weight: 800; }
.tracking-timeline { overflow-y: auto; padding: 23px 29px 30px; }
.tracking-event { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 12px; min-height: 90px; }
.tracking-event::before { content: ""; position: absolute; top: 15px; bottom: -2px; left: 5px; width: 1px; background: #cbd4d2; }
.tracking-event:last-child::before { display: none; }
.tracking-event > i { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 3px solid #fcfaf4; border-radius: 50%; background: #9eaaa8; box-shadow: 0 0 0 1px #9eaaa8; }
.tracking-event.latest > i { background: var(--orange); box-shadow: 0 0 0 1px var(--orange), 0 0 0 5px #f6dfd2; }
.tracking-event div { display: grid; align-content: start; gap: 6px; padding-bottom: 20px; }
.tracking-event time { color: var(--muted); font: 700 8px/1.2 monospace; }
.tracking-event strong { font-size: 11px; line-height: 1.45; }
.tracking-event span { color: var(--muted); font-size: 9px; }
.tracking-empty, .tracking-loading, .tracking-error { display: grid; gap: 7px; padding: 25px; border: 1px dashed #cbd1ce; border-radius: 10px; color: var(--muted); text-align: center; }
.tracking-empty strong { color: var(--ink); font-size: 12px; }
.tracking-drawer-shell > footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 16px 27px; border-top: 1px solid var(--line); background: #f7f3e9; }
.tracking-drawer-shell > footer span { color: var(--muted); font-size: 8px; }
@keyframes tracking-drawer-in { from { opacity: .5; transform: translateX(35px); } to { opacity: 1; transform: translateX(0); } }

/* Keep the order workspace dense so the queue, not repeated headings, owns the viewport. */
@media (min-width: 901px) {
  #orders-page .topbar { align-items: center; margin-bottom: 10px; }
  #orders-page .topbar .eyebrow { margin-bottom: 3px; font-size: 8px; }
  #orders-page .topbar h1 { font-size: 36px; line-height: 1; }
  #orders-page .topbar .primary-button { padding: 9px 15px; font-size: 11px; box-shadow: 0 4px 0 #b74720; }
  #orders-page .topbar-actions > button { display: inline-flex; align-items: center; justify-content: center; min-width: 126px; min-height: 36px; padding: 9px 15px; font-size: 11px; }
  #orders-page .topbar-actions .secondary-button { box-shadow: 0 4px 0 #215d56; }

  #orders-page .intake-overview { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 9px; border-radius: 8px 4px 4px; }
  #orders-page .stage-identity { display: none; }
  #orders-page .intake-overview dl div { min-height: 48px; padding: 8px 14px; }
  #orders-page .intake-overview dt { font-size: 8px; }
  #orders-page .intake-overview dd { font-size: 17px; }
  #orders-page .daily-order-count dd b { font-size: 19px; }
  #orders-page .connection-chip { padding: 0 13px; }

  #orders-page .section-heading { justify-content: flex-end; gap: 18px; min-height: 50px; padding: 8px 15px; }
  #orders-page .section-heading > div:first-child { display: none; }
  #orders-page .section-heading .stage-roadmap { flex: 1; gap: 7px; margin-right: auto; padding: 0; border: 0; background: transparent; }
  #orders-page .stage-roadmap span.active { padding: 4px 7px; }
  #orders-page .date-reconciliation { min-height: 42px; padding: 5px 14px; }
}

.role-filter { width: 220px; }
.supplier-role-tools { display: flex; align-items: center; gap: 10px; }
.supplier-role-tools .ghost-button { padding: 8px 12px; font-size: 11px; white-space: nowrap; }
.supplier-preview-bar { display: none; align-items: center; justify-content: space-between; gap: 16px; margin: -8px 0 14px; padding: 8px 12px; border: 1px solid #e4d3b4; border-radius: 8px; background: #fff6e4; color: #6d5545; font-size: 12px; font-weight: 650; }
body.supplier-preview .supplier-preview-bar { display: flex; }
.supplier-preview-bar b { font-weight: 800; }
.supplier-preview-bar button { padding: 6px 10px; border: 1px solid #d7c4a4; border-radius: 6px; background: #fff; color: #6d5545; font-size: 11px; font-weight: 750; cursor: pointer; }
.portal-intro { display: flex; justify-content: space-between; gap: 28px; align-items: center; margin-bottom: 18px; padding: 18px 21px; border: 1px solid var(--line); border-radius: 13px 5px 13px 5px; background: rgba(255,253,247,.82); }
body.supplier-portal .portal-intro { display: none; }
.portal-intro span,
.portal-intro strong { display: block; }
.portal-intro span { margin-bottom: 5px; color: var(--muted); font: 700 9px/1 monospace; letter-spacing: .08em; }
.portal-intro strong { font: 600 19px/1.2 "Iowan Old Style", "Songti SC", serif; }
.portal-intro p { max-width: 470px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: right; }
.supplier-intro { border-left: 6px solid var(--teal); }
.consolidator-intro { border-left: 6px solid var(--orange); }
.supplier-workspace.hidden,
.consolidator-workspace.hidden { display: none; }
.supplier-table-wrap { min-height: 0; }
.supplier-task-table { width: 100%; min-width: 980px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.supplier-task-table col:nth-child(1) { width: 17%; }
.supplier-task-table col:nth-child(2) { width: 35%; }
.supplier-task-table col:nth-child(3) { width: 15%; }
.supplier-task-table col:nth-child(4) { width: 15%; }
.supplier-task-table col:nth-child(5) { width: 18%; }
.consolidator-task-table col:nth-child(1) { width: 15%; }
.consolidator-task-table col:nth-child(2) { width: 35%; }
.consolidator-task-table col:nth-child(3) { width: 21%; }
.consolidator-task-table col:nth-child(4) { width: 14%; }
.consolidator-task-table col:nth-child(5) { width: 15%; }
.supplier-task-table th { padding: 12px 16px; border-right: 1px solid #ddd8cc; border-bottom: 1px solid var(--line); color: #697174; background: #f4f1e8; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-align: left; }
.supplier-task-table td { padding: 13px 16px; border-right: 1px solid #eee9de; border-bottom: 1px solid #e5e0d5; background: var(--surface); font-size: 10px; vertical-align: middle; }
.supplier-task-table tr:last-child td { border-bottom: 0; }
.supplier-order-cell { position: relative; }
.supplier-order-cell.has-date-marker { padding-top: 28px; }
.supplier-order-cell strong,
.supplier-order-cell span,
.supplier-order-cell small,
.supplier-customer-cell strong,
.supplier-customer-cell span,
.supplier-route-cell strong { display: block; }
.supplier-order-cell > strong { color: var(--teal); font-size: 13px; }
.supplier-order-cell span { margin-top: 6px; color: var(--ink); font-weight: 750; }
.supplier-order-cell small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.supplier-table-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 68px; }
.supplier-item-qty { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.item-receipt-tag { padding: 3px 6px; border-radius: 4px; color: #8a4f2a; background: #f3ddc8; font: 750 8px/1 "Avenir Next", sans-serif; font-style: normal; white-space: nowrap; }
.supplier-table-item + .supplier-table-item { padding-top: 8px; border-top: 1px solid #dcd5c8; }
.supplier-table-item .supplier-image,
.supplier-table-item .supplier-image-frame,
.supplier-table-item .supplier-image img { width: 54px; }
.supplier-table-item .supplier-image-frame,
.supplier-table-item .supplier-image img { height: 54px; }
.supplier-table-item .supplier-image span { right: 2px; bottom: 2px; left: 2px; padding: 2px; font-size: 6px; }
.supplier-table-item .replace-image-button { padding: 3px 4px; font-size: 6px; }
.supplier-table-item .supplier-option { margin-bottom: 2px; }
.supplier-table-item .supplier-option span { font-size: 8px; }
.supplier-table-item .supplier-option strong,
.supplier-table-item .supplier-option-value { font-size: 10px; }
.supplier-table-item .supplier-item-detail small { margin-top: 4px; font-size: 8px; }
.supplier-table-item .task-quantity { font-size: 22px; }
.supplier-customer-cell strong { margin-bottom: 5px; font-size: 11px; }
.supplier-customer-cell span { color: var(--muted); font-size: 9px; }
.supplier-route-entry,
.supplier-action-entry { padding: 7px 0; }
.supplier-route-entry + .supplier-route-entry,
.supplier-action-entry + .supplier-action-entry { border-top: 1px solid #dcd5c8; }
.supplier-route-entry > span,
.supplier-action-entry > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; }
.supplier-route-entry > strong { display: block; color: var(--teal); font-size: 10px; }
.supplier-route-entry > strong.supplier-route-express { display: inline-flex; gap: 6px; align-items: center; color: #c45e2c; background: none; box-shadow: none; padding: 0; font-size: 10px; font-weight: 800; letter-spacing: .01em; }
.supplier-route-express-icon { flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.supplier-route-express span { min-width: 0; line-height: 1.3; }
.supplier-action-cell .tracking-action { width: 100%; flex-direction: column; }
.supplier-action-cell .tracking-action input { width: 100%; min-width: 0; }
.supplier-action-cell .compact-button { width: 100%; box-shadow: none; }
.supplier-action-cell .completed-action { text-align: left; }
.consolidator-product-group,
.consolidator-parcel-line { min-height: calc(68px * var(--package-items)); box-sizing: border-box; }
.consolidator-product-group + .consolidator-product-group { border-top: 1px solid #dcd5c8; }
.consolidator-parcel-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0; }
.consolidator-parcel-line + .consolidator-parcel-line { border-top: 1px solid #e4ded2; }
.consolidator-parcel-line strong,
.consolidator-parcel-line small,
.consolidator-parcel-line em { display: block; }
.consolidator-parcel-line strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.consolidator-parcel-line em { margin-top: 3px; color: #795c38; font-size: 8px; font-style: normal; font-weight: 700; }
.consolidator-parcel-line small { margin-top: 4px; color: #566166; font-size: 9px; font-weight: 600; }
.consolidator-parcel-line .compact-button { width: auto; padding: 6px 8px; font-size: 8px; }
.consolidator-parcel-line .parcel-state { margin: 0; font-size: 8px; }
.consolidator-action-cell .completed-action small { display: block; margin-top: 4px; }
.supplier-control-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,253,247,.88); }
.supplier-control-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.supplier-control-bar .date-filter input { width: 148px; min-width: 148px; }
.supplier-control-bar .date-filter button { border: 0; color: var(--teal); background: transparent; font-weight: 700; }
.supplier-complete-action { display: flex; align-items: center; gap: 8px; }
.supplier-complete-action input { min-width: 0; width: 150px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fffdf7; font-size: 9px; }
.supplier-complete-action small { flex: 1; margin: 0; font-size: 9px; }
.supplier-action-cell .supplier-complete-action { width: 100%; flex-direction: column; align-items: stretch; }
.supplier-action-cell .supplier-complete-action input { width: 100%; }
.supplier-hub-actions { display: grid; gap: 8px; }
.supplier-hub-actions small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.supplier-hub-actions .parcel-state,
.supplier-hub-actions .compact-button { width: 100%; }
.undo-task-button { padding: 8px 11px; border: 1px solid #d8c8af; border-radius: 7px; color: #795c38; background: #f7efe1; font-weight: 700; white-space: nowrap; }
.task-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.task-card { overflow: hidden; border: 1px solid var(--line); border-radius: 7px 7px 20px 7px; background: var(--surface); box-shadow: var(--shadow); }
.task-card > header { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 19px 21px; border-bottom: 1px solid var(--line); background: #f8f4e9; }
.task-card h2 { font-size: 25px; }
.task-kicker { margin-bottom: 4px; color: var(--teal); font: 750 9px/1 monospace; letter-spacing: .08em; }
.task-route { max-width: 210px; padding: 7px 9px; border-radius: 5px; font-size: 9px; font-weight: 750; text-align: center; }
.task-route.direct { color: #245e55; background: #dcece6; }
.task-route.consolidation { color: #844723; background: #f6dfcf; }
.task-check { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-bottom: 1px solid var(--line); }
.task-check div { padding: 13px 17px; border-right: 1px solid var(--line); }
.task-check div:last-child { border-right: 0; }
.task-check dt { margin-bottom: 5px; color: var(--muted); font-size: 8px; }
.task-check dd { margin: 0; font-size: 11px; font-weight: 750; }
.supplier-item-list,
.parcel-list { display: grid; gap: 0; padding: 6px 21px; }
.supplier-task-item { display: grid; grid-template-columns: 88px minmax(0, 1fr) 54px; gap: 15px; align-items: center; padding: 14px 0; }
.supplier-task-item + .supplier-task-item,
.parcel-row + .parcel-row { border-top: 1px solid var(--line); }
.supplier-image { display: grid; width: 88px; gap: 5px; }
.supplier-image-frame { position: relative; width: 88px; height: 88px; }
.supplier-image img { display: block; width: 88px; height: 88px; border: 1px solid #ded5c5; border-radius: 7px; object-fit: cover; background: #f2ecdf; }
.supplier-image span { position: absolute; right: 4px; bottom: 4px; left: 4px; padding: 4px; border-radius: 4px; color: white; background: rgba(24,38,45,.78); font-size: 7px; font-weight: 750; text-align: center; pointer-events: none; }
.replace-image-button { width: 100%; padding: 5px 6px; border: 1px solid #d4cec0; border-radius: 5px; color: #536166; background: #f8f5ed; font-size: 7px; font-weight: 800; cursor: pointer; }
.replace-image-button:hover { color: var(--teal); background: #fff; }
.external-image-dialog { width: min(560px, calc(100vw - 32px)); }
.external-image-preview { display: grid; place-items: center; min-height: 210px; margin: 0 23px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f5f1e7; }
.external-image-preview img { display: block; width: min(100%, 300px); max-height: 300px; border-radius: 8px; object-fit: contain; }
.external-image-paste-zone { display: grid; gap: 5px; margin: 12px 23px 0; padding: 13px 16px; border: 1px dashed #bcb3a3; border-radius: 8px; color: #566469; background: #faf8f1; cursor: text; outline: none; }
.external-image-paste-zone strong { color: var(--ink); font-size: 11px; }
.external-image-paste-zone small { color: var(--muted); font-size: 8px; }
.external-image-paste-zone:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(51,119,111,.12); }
.external-image-paste-zone.has-image { border-style: solid; border-color: #8ebaae; background: #edf6f1; }
.external-image-memory-note { margin-top: 10px !important; padding: 10px 12px; border-radius: 7px; background: #edf4f0; color: #49615d; font-size: 9px; }
.external-image-default-setting { display: flex !important; align-items: flex-start; gap: 9px; margin-top: 8px !important; padding: 10px 12px; border: 1px solid #d7cdbb; border-radius: 7px; background: #fbf7ed; color: var(--ink); }
.external-image-default-setting input { width: auto; margin: 2px 0 0; }
.external-image-default-setting span { display: grid; gap: 3px; }
.external-image-default-setting strong { font-size: 10px; }
.external-image-default-setting small { color: var(--muted); font-size: 8px; }
.external-image-delete-mapping { display: flex !important; align-items: center; gap: 8px; margin-top: 8px !important; color: #75533f; font-size: 9px; }
.external-image-delete-mapping input { width: auto; margin: 0; }
.image-hover-preview { position: fixed; z-index: 5000; display: none; width: 280px; height: 320px; padding: 10px; border: 1px solid #d6cbb8; border-radius: 10px; background: #fffdf7; box-shadow: 0 22px 65px rgba(10,27,32,.3); pointer-events: none; }
.image-hover-preview.visible { display: grid; place-items: center; }
.image-hover-preview img { display: block; width: 100%; height: 100%; border-radius: 6px; object-fit: contain; }
.supplier-option { display: flex; gap: 5px; align-items: baseline; margin-bottom: 5px; }
.supplier-option span { color: var(--muted); font-size: 10px; }
.supplier-option strong,
.supplier-option-value { font-size: 12px; font-weight: 700; }
.supplier-item-detail small { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }
.task-quantity { color: var(--orange); font: 600 29px/1 "Iowan Old Style", serif; text-align: center; }
.task-quantity small { display: block; margin-top: 4px; color: var(--muted); font: 700 8px/1 "Avenir Next", sans-serif; }
.task-card > footer { display: flex; justify-content: space-between; gap: 18px; align-items: center; min-height: 72px; padding: 13px 21px; border-top: 1px solid var(--line); background: #faf7ef; }
.task-current-status span,
.task-current-status strong { display: block; }
.task-current-status span { margin-bottom: 4px; color: var(--muted); font-size: 8px; }
.task-current-status strong { font-size: 11px; }
.compact-button { padding: 9px 12px; font-size: 10px; }
.tracking-action { display: flex; gap: 8px; width: min(100%, 350px); }
.tracking-action input { min-width: 150px; padding: 8px 9px; font-size: 9px; }
.tracking-action button { flex: 0 0 auto; }
.completed-action { text-align: right; }
.completed-action strong,
.completed-action small { display: block; }
.completed-action strong { color: var(--teal); font-size: 10px; }
.completed-action small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.parcel-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: center; min-height: 76px; padding: 12px 0; }
.parcel-row strong,
.parcel-row small,
.parcel-row span { display: block; }
.parcel-row strong { font-size: 10px; }
.parcel-row small,
.parcel-row span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.parcel-state { padding: 6px 8px; border-radius: 12px; font-weight: 750; white-space: nowrap; }
.parcel-state.waiting { color: #806846; background: #eee7d9; }
.parcel-state.received { color: #27684b; background: #dcecdf; }
.portal-empty { padding: 70px 30px; border: 1px dashed #cfc7b8; border-radius: 13px; color: var(--muted); background: rgba(255,253,247,.55); font-size: 12px; text-align: center; }
.portal-empty.hidden { display: none; }

.empty-state { display: grid; place-items: center; align-content: center; min-height: 310px; padding: 35px; text-align: center; }
.empty-state.hidden { display: none; }
.empty-state h3 { margin-bottom: 6px; font: 600 22px/1.1 "Iowan Old Style", serif; }
.empty-state p { max-width: 390px; margin-bottom: 0; color: var(--muted); font-size: 12px; }

.import-dialog { width: min(1080px, calc(100vw - 36px)); max-height: calc(100vh - 36px); padding: 0; border: 0; border-radius: 8px 8px 24px 8px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 100px rgba(8,22,27,.35); }
.import-dialog::backdrop { background: rgba(11,28,33,.6); backdrop-filter: blur(5px); }
.dialog-shell > header { display: flex; justify-content: space-between; align-items: center; padding: 22px 25px; border-bottom: 1px solid var(--line); }
.dialog-grid { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 590px; }
.mail-form { display: grid; align-content: start; gap: 12px; padding: 22px 25px; border-right: 1px solid var(--line); }
label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .03em; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; color: var(--ink); background: #fffefb; outline: 0; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,111,104,.1); }
textarea { resize: vertical; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; line-height: 1.5; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 9px; margin-top: 4px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; font-size: 25px; }
.preview-panel { padding: 26px; background: #f6f1e5; overflow: auto; }
.preview-placeholder { display: grid; place-items: center; align-content: center; min-height: 100%; color: var(--muted); text-align: center; }
.preview-placeholder span { color: var(--orange); font: 42px/1 "Iowan Old Style", serif; }
.preview-placeholder p { margin: 13px 0 5px; color: var(--ink); font-weight: 700; }
.preview-placeholder small { max-width: 280px; line-height: 1.5; }
.result-banner { padding: 14px; border-radius: 7px; color: #155148; background: #dcece6; font-size: 12px; font-weight: 700; }
.result-banner.error { color: #853b2a; background: #f5d8cd; }
.preview-order { margin-top: 18px; }
.preview-order h3 { margin-bottom: 3px; font: 600 27px/1.1 "Iowan Old Style", serif; }
.preview-meta { color: var(--muted); font-size: 11px; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 18px 0; }
.detail-list div { padding: 12px; border: 1px solid #ded8ca; background: rgba(255,255,255,.52); }
.detail-list span, .detail-list strong { display: block; }
.detail-list span { margin-bottom: 5px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.detail-list strong { font-size: 12px; }
.item-preview { padding: 12px 0; border-top: 1px solid var(--line); }
.item-preview strong, .item-preview small { display: block; }
.item-preview strong { font-size: 12px; line-height: 1.4; }
.item-preview small { margin-top: 5px; color: var(--muted); font-size: 10px; }

.assignment-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 8px 8px 22px 8px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 100px rgba(8,22,27,.35); }
.assignment-dialog::backdrop { background: rgba(11,28,33,.6); backdrop-filter: blur(5px); }
#manual-order-dialog { width: min(680px, calc(100vw - 32px)); }
.manual-order-form { display: grid; gap: 16px; margin: 0 23px; }
.manual-order-form section { display: grid; gap: 10px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; }
.manual-order-form h3 { margin: 0; color: var(--ink); font-size: 12px; }
.manual-order-form .config-form-grid { margin: 0; gap: 12px 14px; }
.manual-order-form .config-form-grid label { grid-template-rows: auto auto; align-content: start; margin-bottom: 0; }
.manual-order-form .config-form-grid label small { min-height: 16px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.manual-order-form .config-form-grid input,
.manual-order-form .config-form-grid select { height: 40px; min-height: 40px; }
.manual-order-form .config-form-grid textarea { height: 88px; min-height: 88px; resize: vertical; }
.route-setting-button { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.route-setting-button small,
.route-setting-button em { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; font-style: normal; line-height: 1.35; }
.route-setting-button em { color: var(--teal); }
.route-setting-button:hover .route-badge { box-shadow: 0 0 0 3px rgba(45, 112, 105, .12); }
.progress-badge-button { border: 0; font: inherit; cursor: pointer; }
.progress-badge-button:hover { box-shadow: 0 0 0 3px rgba(45, 112, 105, .12); }
.route-order-summary { display: grid; grid-template-columns: 1fr auto; gap: 5px 18px; margin: 0 23px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7f4ec; }
.route-order-summary strong { font-size: 17px; }
.route-order-summary span { color: var(--teal); font-weight: 700; }
.route-order-summary small { grid-column: 1 / -1; color: var(--muted); }
.route-mode-help { margin: 0 23px; padding: 13px 15px; border-left: 3px solid var(--teal); background: #edf3ef; color: #42545a; font-size: 13px; line-height: 1.6; }
.assignment-shell { display: grid; gap: 18px; padding-bottom: 22px; }
.assignment-shell > header { display: flex; justify-content: space-between; align-items: center; padding: 21px 23px; border-bottom: 1px solid var(--line); }
.assignment-shell > label { margin: 0 23px; }
.assignment-shell > label small { color: #aaa39a; font-weight: 500; }
.assignment-product { display: grid; grid-template-columns: 66px 1fr; gap: 13px; align-items: center; margin: 0 23px; padding: 13px; border: 1px solid #e0d8c8; border-radius: 8px; background: #faf5e9; }
.assignment-product img { width: 66px; height: 66px; border: 1px solid #ded4c2; border-radius: 7px; object-fit: cover; background: #f3ede1; }
.assignment-product strong,
.assignment-product small,
.assignment-product span { display: block; }
.assignment-product strong { font-size: 11px; line-height: 1.4; }
.assignment-product small { margin-top: 4px; color: var(--teal); font-size: 9px; }
.assignment-product span { margin-top: 6px; color: var(--muted); font-size: 9px; }
.assignment-shell footer { display: flex; justify-content: flex-end; gap: 9px; padding: 3px 23px 0; }
.dialog-error { margin: -5px 23px 0; padding: 10px 12px; border: 1px solid #e5b49f; border-radius: 7px; color: #8b321f; background: #fff0e9; font-size: 10px; font-weight: 700; line-height: 1.55; }
.order-lifecycle-dialog { width: min(520px, calc(100vw - 32px)); }
.order-lifecycle-summary { display: grid; grid-template-columns: 1fr auto; gap: 5px 16px; margin: 0 23px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #f8f5ed; }
.order-lifecycle-summary small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.order-lifecycle-summary strong { font-size: 17px; }
.order-lifecycle-summary span { align-self: center; color: var(--teal); font-size: 10px; font-weight: 750; }
.order-lifecycle-help { margin: 0 23px; padding: 12px 14px; border-left: 3px solid #d19b57; color: #5c615f; background: #faf3e6; font-size: 10px; line-height: 1.6; }
.danger-link-button { margin-right: auto; padding: 8px 5px; border: 0; color: #a34232; background: transparent; font: 750 10px/1 sans-serif; cursor: pointer; }
.danger-link-button:hover { color: #7f291c; text-decoration: underline; }
.danger-link-button:disabled { opacity: .5; }
.etsy-backfill-state.terminated strong { color: #6d5545; }
.etsy-backfill-state.terminated { padding: 8px; border-radius: 8px; background: #f5e9da; }
.etsy-backfill-state.cancelled strong { color: #c43b2e; font-weight: 800; }
.etsy-backfill-state.cancelled span { color: #a34232; }
.etsy-backfill-state.cancelled { padding: 8px; border-radius: 8px; color: #c43b2e; background: #fdecea; }

.yunexpress-create-button { display: grid; gap: 5px; width: 100%; padding: 9px 10px; border: 1px solid #d8c8af; border-radius: 8px; color: #755632; background: #faf2e5; text-align: left; cursor: pointer; }
.yunexpress-create-button span { font-size: 10px; font-weight: 800; }
.yunexpress-create-button strong { overflow: hidden; color: var(--ink); font: 750 9px/1.25 monospace; text-overflow: ellipsis; }
.yunexpress-create-button small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.yunexpress-create-button.ready { border-color: #bad8cc; color: #216658; background: #e7f2ed; }
.yunexpress-create-button:hover { box-shadow: 0 0 0 3px rgba(45,112,105,.1); }
.yunexpress-dialog { width: min(610px, calc(100vw - 32px)); }
.yunexpress-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 23px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.yunexpress-summary div { min-height: 65px; padding: 13px 15px; background: #f8f5ed; }
.yunexpress-summary small, .yunexpress-summary strong { display: block; }
.yunexpress-summary small { margin-bottom: 6px; color: var(--muted); font-size: 8px; }
.yunexpress-summary strong { font-size: 12px; }
.yunexpress-checklist { margin: 0 23px; }
.yunexpress-pending, .yunexpress-result { display: grid; gap: 7px; padding: 15px; border: 1px solid #d9d2c4; border-radius: 9px; background: #fffdf7; }
.yunexpress-pending strong { margin-bottom: 2px; font-size: 12px; }
.yunexpress-pending span { color: #526064; font-size: 10px; }
.yunexpress-pending span::before { content: "✓"; margin-right: 7px; color: var(--teal); font-weight: 800; }
.yunexpress-result span { width: max-content; padding: 4px 7px; border-radius: 12px; color: #216658; background: #dcece6; font-size: 8px; font-weight: 800; }
.yunexpress-result strong { font: 800 18px/1.2 monospace; letter-spacing: .03em; }
.yunexpress-result small { color: var(--muted); font-size: 9px; }
.yunexpress-result a, .packer-label-link { color: var(--teal); font-weight: 800; text-decoration: none; }
.yunexpress-result a { margin-top: 5px; font-size: 11px; }
.yunexpress-result a.yunexpress-label-button { display: inline-flex; align-items: center; justify-content: center; width: max-content; margin-top: 8px; padding: 8px 14px; color: white; font-size: 11px; font-weight: 750; text-decoration: none; }
.yunexpress-customer-reference b { color: var(--ink); font-family: monospace; }
.yunexpress-history { display: grid; gap: 8px; margin-top: 10px; padding: 13px; border: 1px solid #ddd5c8; border-radius: 9px; background: #f4f1ea; }
.yunexpress-history-heading { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 7px; border-bottom: 1px solid #ddd5c8; }
.yunexpress-history-heading strong { font-size: 10px; }
.yunexpress-history-heading small { color: var(--muted); font-size: 8px; }
.yunexpress-history-entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) auto; gap: 10px; align-items: center; padding: 8px 9px; border-radius: 7px; background: #fffdf8; }
.yunexpress-history-entry div { min-width: 0; }
.yunexpress-history-entry span,
.yunexpress-history-entry small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; }
.yunexpress-history-entry strong,
.yunexpress-history-entry b { display: block; overflow: hidden; font: 750 9px/1.3 monospace; text-overflow: ellipsis; }
.yunexpress-history-entry em { padding: 4px 6px; border-radius: 10px; color: #8c5b39; background: #f3e5d5; font-size: 8px; font-style: normal; font-weight: 750; white-space: nowrap; }
.yunexpress-reissue-field select { margin-top: 7px; }
.address-dialog { width: min(610px, calc(100vw - 32px)); }
.address-original-summary { display: grid; gap: 4px; margin: 0 23px; padding: 13px 15px; border: 1px dashed #d6c7ae; border-radius: 9px; background: #faf6ec; }
.address-original-summary span { margin-bottom: 3px; color: #8b8174; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.address-original-summary strong { color: #566267; font-size: 9px; line-height: 1.35; }
.packer-label-link { display: grid; gap: 3px; margin-bottom: 8px; padding: 8px; border: 1px solid #bcd8ce; border-radius: 7px; background: #edf6f1; text-align: left; }
.packer-label-link span, .packer-label-link small { font-size: 8px; }
.packer-label-link strong { overflow: hidden; font: 750 9px/1.2 monospace; text-overflow: ellipsis; }
.label-waiting { padding: 9px; border: 1px dashed #d6c7ae; border-radius: 7px; background: #faf4e8; }
.batch-yunexpress-dialog { width: min(500px, calc(100vw - 32px)); }
.batch-yunexpress-summary { display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; align-items: center; margin: 0 23px; padding: 18px; border: 1px solid #dfd5c5; border-radius: 10px; background: #fff9ec; }
.batch-yunexpress-summary span { color: var(--muted); font-size: 9px; }
.batch-yunexpress-summary strong { font-size: 14px; text-align: right; }
.batch-yunexpress-summary b { color: var(--orange); font: 700 28px/1 "Iowan Old Style", serif; }
.batch-yunexpress-summary small { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid #e5dccd; color: #586468; font-size: 10px; }

.supplier-task-table tr,
.process-table tr { transition: opacity .32s ease, transform .32s ease; }
.supplier-task-table tr.completion-pending td,
.process-table tr.completion-pending td { background: #edf6ef; }
.supplier-task-table tr.completion-leaving,
.process-table tr.completion-leaving { transform: translateX(14px); opacity: 0; }
.completion-transition-banner { display: block; width: max-content; margin-top: 8px; padding: 4px 7px; border-radius: 12px; color: #27684b; background: #d7eadc; font-size: 8px; font-weight: 750; white-space: nowrap; }
.completion-count-pulse { animation: completion-tab-pulse .9s ease; }
@keyframes completion-tab-pulse {
  35% { color: #fff; background: var(--orange); box-shadow: 0 0 0 5px rgba(219,105,56,.16); }
}
.toast { position: fixed; inset: auto 28px 28px auto; z-index: 1000; display: flex; width: auto; max-width: min(480px, calc(100vw - 32px)); margin: 0; gap: 18px; align-items: center; transform: translateY(20px); padding: 12px 16px; border: 0; border-radius: 7px; color: white; background: var(--ink); opacity: 0; pointer-events: none; transition: .2s ease; box-shadow: var(--shadow); font-size: 12px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.show.with-action { pointer-events: auto; }
.toast button { padding: 4px 0; border: 0; color: #f4cf65; background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.toast button:disabled { opacity: .55; }

@media (max-width: 900px) {
  .shell,
  .shell.sidebar-pinned { grid-template-columns: 1fr; }
  .sidebar,
  .sidebar:hover,
  .sidebar-pinned .sidebar { position: static; width: 100%; height: auto; padding: 18px; box-shadow: none; }
  .brand > span:last-child { opacity: 1; transform: none; }
  .nav-item,
  .sidebar:hover .nav-item,
  .sidebar-pinned .nav-item { grid-template-columns: 28px 1fr auto; }
  .nav-label { opacity: 1; }
  .brand { padding-bottom: 16px; }
  .nav { grid-template-columns: repeat(4, 1fr); overflow-x: auto; }
  .nav-item { min-width: 130px; }
  .shop-switcher { display: grid; max-width: 280px; }
  .sidebar-mode-toggle { display: none; }
  .main { padding: 28px 18px 50px; }
  .intake-overview { grid-template-columns: 1fr; }
  .intake-overview dl { grid-template-columns: repeat(4, minmax(105px, 1fr)); overflow-x: auto; }
  .connection-chip { padding: 10px 18px; border-top: 1px solid var(--line); }
  .dialog-grid { grid-template-columns: 1fr; }
  .mail-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .preview-panel { min-height: 390px; }
  .section-heading { align-items: flex-start; gap: 15px; }
  .table-tools { flex-wrap: wrap; justify-content: flex-end; }
  .date-reconciliation { align-items: flex-start; flex-direction: column; }
  .portal-intro { align-items: flex-start; flex-direction: column; }
  .portal-intro p { text-align: left; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-nav button { min-width: 170px; }
  .yun-basic-grid { grid-template-columns: 1fr 1fr; }
  .yun-field-preview:nth-child(3n) { border-right: 1px solid #e4ded2; }
  .yun-field-preview:nth-child(2n) { border-right: 0; }
  .yun-field-preview:nth-last-child(-n + 3) { border-bottom: 1px solid #e4ded2; }
  .yun-field-preview:nth-last-child(-n + 2) { border-bottom: 0; }
  .yun-rules-layout { grid-template-columns: 1fr; }
  .yun-rule-column { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 580px) {
  .topbar { align-items: center; }
  .topbar .primary-button { padding: 10px 12px; font-size: 11px; }
  .intake-overview dl { grid-template-columns: repeat(2, 1fr); }
  .intake-overview dl div:nth-child(2) { border-right: 0; }
  .intake-overview dl div { border-top: 1px solid var(--line); }
  .dialog-shell > header, .mail-form, .preview-panel { padding: 18px; }
  .form-actions { justify-content: stretch; }
  .form-actions button { flex: 1; }
  .task-check { grid-template-columns: 1fr; }
  .task-check div { border-right: 0; border-bottom: 1px solid var(--line); }
  .task-card > footer,
  .tracking-action { align-items: stretch; flex-direction: column; }
  .supplier-task-item { grid-template-columns: 76px minmax(0, 1fr) 44px; gap: 10px; }
  .supplier-image,
  .supplier-image-frame,
  .supplier-image img { width: 76px; }
  .supplier-image-frame,
  .supplier-image img { height: 76px; }
  .parcel-row { grid-template-columns: 1fr; gap: 7px; }
  .supplier-task-table { min-width: 820px; }
  .settings-content { padding: 14px; }
  .yun-config-section-heading { grid-template-columns: 32px minmax(0, 1fr); padding: 12px; }
  .yun-config-section-heading > button, .yun-required-chip { grid-column: 2; justify-self: start; }
  .yun-basic-grid, .yun-sender-grid { grid-template-columns: 1fr; }
  .yun-field-preview, .yun-field-preview:nth-child(2n), .yun-field-preview:nth-child(3n) { border-right: 0; border-bottom: 1px solid #e4ded2; }
  .yun-field-preview:last-child { border-bottom: 0; }
  .yun-declaration-labels { display: none; }
  .yun-declaration-list .declaration-template-entry { grid-template-columns: 1fr auto; }
  .declaration-template-entry .declaration-identity,
  .declaration-template-entry .declaration-names,
  .declaration-template-entry .declaration-values { grid-column: 1; }
  .declaration-template-entry > button { grid-column: 2; grid-row: 1 / 4; }
  .address-extra-grid, .country-extra-rules, .manual-order-form .config-form-grid { grid-template-columns: 1fr; }
  .country-extra-rule { border-right: 0; border-bottom: 1px solid var(--line); }
  .country-extra-rule:last-child { border-bottom: 0; }
}
