:root {
  color-scheme: light;
  font: 14px/1.55 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #1a2b42;
  background: #f3f6fb;
  --ink: #1a2b42;
  --muted: #5b6f88;
  --line: #dce5ef;
  --blue: #2356c9;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 2px solid #527cf0; outline-offset: 3px; }
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
aside { background: #12233c; color: #d8e6fb; display: flex; flex-direction: column; padding: 26px 15px 18px; }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 7px 25px; white-space: nowrap; }
.brand strong { display: block; color: #fff; font-size: 15px; }
.brand small { color: #a4b7d1; }
.brand-mark { background: #3767e1; color: white; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; font-size: 19px; font-weight: 750; flex: none; }
.nav-title { padding: 15px 12px 7px; font-size: 12px; color: #a5b8d2; }
nav a { margin: 3px 0; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border-radius: 8px; }
nav a span { min-width: 18px; font-size: 17px; line-height: 1; text-align: center; }
nav a:hover { background: #203856; }
nav a[aria-current] { background: #2a4b86; color: white; font-weight: 700; }
nav a b { margin-left: auto; background: #793f52; padding: 0 6px; border-radius: 6px; }
.sidebar-footer { margin-top: auto; padding: 20px 12px 0; color: #c0d1e8; font-size: 12px; }
.dot { display: inline-block; border-radius: 50%; width: 8px; height: 8px; margin-right: 5px; background: #59d1a2; }
.top { min-height: 65px; padding: 10px 32px; background: white; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); gap: 8px; }
.top span { padding: 0 7px; color: #8292a8; }
.account { display: flex; align-items: center; gap: 12px; }
.account strong { color: var(--ink); }
.content { max-width: 1480px; margin: auto; padding: 14px 32px 60px; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h1, h2, p { margin: 0; }
h1 { font-size: 30px; letter-spacing: -.02em; }
h2 { font-size: 18px; }
p { color: var(--muted); }
.detail-heading p { margin-top: 3px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.metric { display: flex; align-items: center; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 11px; padding: 15px; }
.metric-mark { width: 5px; height: 40px; border-radius: 4px; background: #4269e0; }
.metric-mark.amber { background: #bf8324; }
.metric-mark.cyan { background: #2492b4; }
.metric-mark.green { background: #22a477; }
.metric div span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { font-size: 25px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.panel { background: white; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 16px; overflow: hidden; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px; }
.search { display: flex; flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; padding-left: 10px; width: min(100%, 300px); }
.search span { font-size: 20px; line-height: 1; }
.search input { border: 0; min-width: 0; width: 100%; }
.btn, input, select { padding: 7px 11px; border: 1px solid #cbd7e6; background: white; border-radius: 7px; color: var(--ink); min-height: 36px; }
.btn { display: inline-block; white-space: nowrap; font-weight: 600; }
.btn:hover { background: #edf3fb; }
.btn.primary { background: var(--blue); color: white; border-color: var(--blue); }
.btn.primary:hover { background: #1944a8; }
.btn.danger { color: #a12a3d; border-color: #edc8d0; }
.link { padding: 5px 0; border: 0; background: none; color: var(--blue); white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; text-align: left; border-collapse: collapse; }
th, td { padding: 4px 15px; line-height: 1.3; border-bottom: 1px solid #e8edf4; }
th { background: #f5f8fc; font-size: 12px; color: #4d617a; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
td small { display: block; color: var(--muted); margin-top: 1px; }
td .link { padding-block: 2px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.tag { display: inline-block; border-radius: 20px; padding: 2px 9px; font-size: 12px; white-space: nowrap; background: #eaf0f7; }
.tag.blue { background: #eaf0ff; color: #254ba0; }
.tag.amber { background: #fff2d8; color: #80510a; }
.tag.cyan { background: #e1f4fa; color: #165a71; }
.tag.green { background: #dcf5e9; color: #155c42; }
.tag.red, .callout { background: #fff0f0; color: #9b2937; }
.panel-title { padding: 15px; }
.detail { padding: 16px; }
.detail table { border: 1px solid var(--line); }
dl { display: flex; flex-wrap: wrap; gap: 12px 26px; padding: 12px 0; }
dt, .muted { color: var(--muted); }
dd { margin: 3px 0 0; }
.operations { display: flex; align-items: start; flex-direction: column; gap: 12px; padding: 15px 0; }
.button-row, .operation { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.operation input { width: min(100%, 205px); }
label { display: flex; flex-direction: column; gap: 3px; }
.operation:is([data-operation="sku_label"], [data-operation="ship_scan"]) > label {
  flex: 0 1 760px;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
  font-size: 16px;
}
.operation:is([data-operation="sku_label"], [data-operation="ship_scan"]) input {
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  font-size: 26px;
  line-height: 1.2;
}
summary { cursor: pointer; color: var(--blue); }
details[open] > summary { margin-bottom: 10px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; }
.assign-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.callout { border-radius: 7px; padding: 8px 12px; }
.empty { text-align: center; padding: 30px; }
.empty span { color: #607b9f; font-size: 25px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, #e0ebff, #f3f6fb 70%); }
.login-card { width: min(100%, 405px); background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 20px 50px #1a355a16; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login-card small { color: var(--muted); text-align: center; }
#notice.show { position: fixed; max-width: calc(100% - 32px); bottom: 16px; right: 16px; z-index: 2; padding: 10px 16px; border-radius: 8px; background: #164d3a; color: white; box-shadow: 0 5px 18px #0b19343d; }
#notice.show.error { background: #8c2637; }
#print-area { display: none; }
#confirm-dialog { border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; width: min(420px, calc(100% - 32px)); color: var(--ink); box-shadow: 0 12px 32px #0b19343d; }
#confirm-dialog::backdrop { background: #12233c66; }
#confirm-dialog p { line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.barcode { display: flex; width: max-content; padding: 0 4mm; margin: 2mm 0; }
.barcode i { height: 13mm; }
.barcode i.bar { background: #000; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
@media(max-width: 820px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  aside { padding: 12px; }
  .brand { padding-bottom: 7px; }
  nav { display: flex; flex-wrap: wrap; }
  nav a { padding: 7px; }
  .nav-title, .sidebar-footer { display: none; }
  .top,.content { padding-left: 14px; padding-right: 14px; }
  .top { flex-wrap: wrap; }
  .metrics { grid-template-columns: repeat(2,1fr); }
}
@media print {
  :root, body { background: white; color: black; }
  #app, #notice { display: none; }
  #print-area { display: block; padding: 10mm; }
  #print-area p { margin: 3mm 0; color: black; }
}

input[type="checkbox"] { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--blue); vertical-align: middle; }
.allocation-sheet { border-top: 1px solid var(--line); padding: 12px 15px; }
.allocation-sheet > a { margin-top: 12px; }
.station { padding: 15px; }
.station > * + * { margin-top: 10px; }
.sheet-code { margin: 4px 0 10px; }
textarea { font: inherit; padding: 7px 11px; border: 1px solid #cbd7e6; border-radius: 7px; }
.qr { display: block; width: 29mm; height: 29mm; padding: 4mm; background: white; image-rendering: pixelated; }
.queue-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; border-bottom: 1px solid var(--line); background: #f7f9fd; }
.queue-tabs button { padding: 8px 12px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; }
.queue-tabs button[aria-pressed="true"] { font-weight: 700; color: var(--blue); border-bottom-color: var(--blue); }
.queue-tabs button:hover { color: var(--blue); background: #eaf0fb; }
@media print {
  #print-area th, #print-area td { padding: 11px 15px; line-height: 1.55; }
  .print-label + .print-label { break-before: page; }
}
.record-actions { padding: 10px 14px; }
.record-methods { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.postal-options, .postal-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.postal-group { padding-left: 8px; border-left: 1px solid var(--line); }
.postal-label { color: var(--muted); font-size: 12px; }
.postal-option { max-width: 100%; overflow-wrap: anywhere; padding: 3px 8px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); }
.postal-option:hover, .postal-option[aria-pressed="true"] { background: #e4eef9; color: var(--blue); }
.postal-option[aria-pressed="true"] { border-color: var(--blue); }
.record-layout th, .record-layout td { padding-inline: 8px; white-space: nowrap; }
.record-layout td small { display: inline; margin: 0 0 0 6px; }
.record-layout tbody tr:nth-child(even) { background: #f5f8fb; }
.record-pages { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; }
.record-pages span { margin-right: auto; }
.record-pages label { display: flex; flex-direction: row; align-items: center; }

.data-source {
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid #dce4ed;
  border-radius: 6px;
  font-size: .875rem;
  line-height: 1.6;
}
.data-source .btn { margin-left: 8px; }

.cainiao-time { white-space: nowrap; }
.cainiao-skus { min-width: 130px; overflow-wrap: anywhere; }
.cainiao-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.integrations-bar {
  display: flex;
  flex-wrap: wrap;
  column-gap: 14px;
  row-gap: 4px;
  margin-bottom: 8px;
  padding: 5px 10px;
  color: #475d72;
  font-size: .8125rem;
  border-bottom: 1px solid #dce4ed;
}
.integrations-bar strong { color: #20364d; }
