/* ZENGUE Aftercare production UI refresh — presentation only. */
:root {
  --green: #176b49;
  --green-strong: #0f5136;
  --green-soft: #e9f4ed;
  --ink: #17231d;
  --muted: #6f7d75;
  --line: #dce5df;
  --surface: #ffffff;
  --canvas: #f4f6f3;
  --warning: #a95e16;
  --danger-strong: #b42318;
  color-scheme: light;
}

html { background: var(--canvas); }

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 88% -12%, rgba(73, 135, 99, .12), transparent 30rem),
    linear-gradient(180deg, #f8faf7 0, var(--canvas) 22rem);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea { transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease; }

button {
  min-height: 40px;
  border-radius: 11px;
  padding: 9px 15px;
  box-shadow: 0 1px 2px rgba(16, 52, 34, .08);
}

button:hover { background: #115f3e; transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { cursor: not-allowed; opacity: .58; transform: none; }

.ghost {
  border: 1px solid #d5e3da;
  background: #f5f9f6;
  color: #245c40;
  box-shadow: none;
}

.ghost:hover { border-color: #b9d2c2; background: #eaf4ed; color: #164f34; }
.danger { border: 1px solid #f0cac6; background: #fff4f2; color: var(--danger-strong); box-shadow: none; }
.danger:hover { border-color: #e9aba5; background: #ffe9e6; color: #981b12; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(42, 132, 87, .2);
  outline-offset: 2px;
}

input,
select,
textarea {
  min-height: 42px;
  border-color: #d8e2dc;
  border-radius: 11px;
  background: #fbfcfb;
  color: var(--ink);
}

input:hover,
select:hover,
textarea:hover { border-color: #bbcfc2; background: #fff; }

input:focus,
select:focus,
textarea:focus {
  border-color: #4c9b72;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(42, 132, 87, .10);
}

::placeholder { color: #97a49c; }

.layout { grid-template-columns: 258px minmax(0, 1fr); }

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 16px 28px;
  background:
    radial-gradient(circle at 20% 0, rgba(107, 177, 139, .18), transparent 18rem),
    linear-gradient(175deg, #142c21 0%, #10251b 68%, #0b1d15 100%);
  border-right: 1px solid rgba(255, 255, 255, .05);
}

.brand {
  margin: 0 8px 27px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #72b58c, #2e8058);
  color: white;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

.brand-name { font-size: 18px; font-weight: 850; letter-spacing: .08em; }
.brand-sub { margin-top: 2px; color: #a9c3b5; font-size: 10px; font-weight: 700; letter-spacing: .13em; }

.nav { gap: 4px; }

.nav-label {
  margin: 19px 11px 6px;
  color: #7fa08f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}

.nav-label:first-child { margin-top: 0; }

.nav button {
  position: relative;
  min-height: 43px;
  padding: 11px 13px 11px 32px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #cfddd5;
  font-size: 14px;
  font-weight: 650;
  box-shadow: none;
}

.nav button::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1.5px solid #7ea08e;
  border-radius: 50%;
  transform: translateY(-50%);
}

.nav button:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: none; }
.nav button.on {
  border-color: rgba(150, 213, 177, .16);
  background: linear-gradient(90deg, rgba(88, 166, 120, .27), rgba(255, 255, 255, .06));
  color: #fff;
  box-shadow: inset 3px 0 #72c091;
}
.nav button.on::before { border-color: #96d2ae; background: #78c394; box-shadow: 0 0 0 4px rgba(120, 195, 148, .12); }

.main { max-width: 1540px; padding: 27px 30px 48px; }

.top {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 76px;
  margin: -27px -30px 22px;
  padding: 18px 30px 14px;
  border-bottom: 1px solid rgba(216, 226, 220, .85);
  background: rgba(248, 250, 247, .9);
  backdrop-filter: blur(14px);
}

.top h1 { color: #172d22; font-size: clamp(23px, 2vw, 29px); line-height: 1.15; letter-spacing: -.025em; }
.top #subtitle { margin-top: 5px; }
.workspace-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #cce0d3;
  border-radius: 999px;
  background: #eff8f2;
  color: #276246;
  font-size: 12px;
  font-weight: 750;
}
.workspace-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2ea568; box-shadow: 0 0 0 4px rgba(46, 165, 104, .10); }
.stat,
.panel {
  border-color: rgba(214, 224, 218, .92);
  border-radius: 17px;
  box-shadow: 0 7px 24px rgba(22, 57, 38, .055);
}

.panel { padding: 19px; margin-bottom: 17px; }
.stat { padding: 17px; }
.stat b { color: #173d2a; letter-spacing: -.025em; }

.warehouse-quick {
  position: relative;
  overflow: hidden;
  padding: 25px 26px 23px;
  border: 0 !important;
  background:
    radial-gradient(circle at 93% 10%, rgba(135, 213, 164, .22), transparent 17rem),
    linear-gradient(135deg, #153e2b 0%, #1f6b47 65%, #2d8058 100%);
  color: #fff;
  box-shadow: 0 16px 38px rgba(21, 72, 47, .20);
}

.warehouse-quick::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -54px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, .035), 0 0 0 58px rgba(255, 255, 255, .025);
  pointer-events: none;
}

.warehouse-quick-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.warehouse-quick h2 { margin: 4px 0 5px !important; font-size: 25px; letter-spacing: -.025em; }
.warehouse-quick .muted { color: #d8e9df; }
.eyebrow { color: #a9d8bd; font-size: 10px; font-weight: 850; letter-spacing: .17em; }
.flow-badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
  color: #ecf7f0;
  font-size: 12px;
  font-weight: 750;
}

.warehouse-quick .tracking-entry { position: relative; z-index: 1; gap: 10px; }
.warehouse-quick .tracking-entry input {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 13px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(6, 40, 24, .16);
  color: #153c29;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 760;
  letter-spacing: .02em;
}
.warehouse-quick .tracking-entry input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, .17), 0 8px 24px rgba(6, 40, 24, .18); }
.warehouse-quick .scan-button { min-height: 58px; border: 1px solid rgba(255, 255, 255, .18); background: #fff; color: #165739; box-shadow: 0 8px 20px rgba(6, 40, 24, .14); }
.warehouse-quick .scan-button:hover { background: #edf7f0; }
.warehouse-quick .scan-button.ghost { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.warehouse-quick .scan-button.ghost:hover { background: rgba(255, 255, 255, .19); }
.warehouse-quick .recent-scan { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .10); color: #e9f6ee; }
.warehouse-quick .recent-scan:hover { background: rgba(255, 255, 255, .17); }
.warehouse-quick .recent-scans .muted { color: #bfd8ca !important; }

.workbench-panel { padding: 0; overflow: hidden; }
.workbench-panel .workbench-filter-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 19px 13px;
}
.workbench-panel .workbench-filter-head h2 { margin: 0; font-size: 18px; }
.workbench-panel .workbench-filter-head p { margin: 4px 0 0; }
.workbench-panel > .toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(175px, .25fr) minmax(190px, .28fr);
  padding: 0 19px 14px;
}
.workbench-panel > .toolbar input { min-width: 0; }
.workbench-panel > .sync-hint { margin: 0; padding: 11px 19px; border-top: 1px solid #edf2ef; border-bottom: 1px solid #edf2ef; background: #f8faf8; }
.workbench-panel > div[style*="overflow"] { padding: 0 15px 13px; }

.table { margin-top: 0; }
.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 9px;
  background: #f7f9f7;
  color: #6d7a72;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.table td { padding: 13px 9px; vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr:hover { background: #f6faf7; }
.order-link { color: #135f3e; text-decoration: underline; text-decoration-color: #b6d3c1; text-underline-offset: 3px; }
.order-link:hover { color: #0c472e; text-decoration-color: #3a8d61; }

.pill { border: 1px solid #dbe6df; background: #f2f6f3; color: #41574a; font-weight: 650; }
.problem-pill { border-color: #f0d1c2; background: #fff3ed; color: #974321; }
.shortage-pill { border-color: #efd7a8; background: #fff4dc; color: #8d4a0f; }
.packing-summary { border: 1px solid #d4e8da; background: #f0f8f3; }
.row-packed { opacity: .78; }

.drawer {
  width: min(840px, 100vw);
  padding: 22px 24px 34px;
  background: #f4f7f4;
  box-shadow: -22px 0 60px rgba(9, 33, 21, .24);
}
.drawer-head {
  top: -22px;
  margin: 0 -24px 17px;
  padding: 18px 24px 15px;
  border-bottom: 1px solid #dce5df;
  background: rgba(244, 247, 244, .94);
  backdrop-filter: blur(12px);
}
.drawer-head h2 { color: #143c29; font-size: 24px; letter-spacing: -.025em; }
.drawer .panel { box-shadow: 0 5px 18px rgba(22, 57, 38, .045); }
.drawer .panel h3 { color: #1b3f2c; }
.item { border: 1px solid #e5ece8; background: #fafcfb; }
.item img { width: 58px; height: 58px; border: 1px solid #e3ebe6; background: #fff; }
.note, .task { border: 1px solid #e3ebe6; border-left: 4px solid #78a98c; background: #f8faf8; }
.note.important { border-color: #f0d5cc; border-left-color: #e25445; background: #fff7f5; }

.packing-done { border-color: #a9d8ba; border-radius: 12px; background: #edf9f1; }
.packing-pending { border-color: #e8cc95; border-radius: 12px; background: #fff8e8; }
.refund-stop-panel { border-width: 2px; border-radius: 15px; background: linear-gradient(135deg, #fff4f2, #ffe9e6); }
.note-alert-panel { border-width: 1px; border-color: #e9ca91; background: #fffaf0; }

.overlay {
  padding: 20px;
  background:
    radial-gradient(circle at 80% 15%, rgba(113, 187, 142, .18), transparent 24rem),
    linear-gradient(145deg, #edf4ef, #f8faf8 48%, #e9f0eb);
}
.login {
  position: relative;
  width: min(420px, 92vw);
  padding: 38px;
  border: 1px solid rgba(207, 220, 212, .9);
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(23, 57, 38, .16);
}
.login::before {
  content: "Z";
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  border-radius: 14px;
  background: linear-gradient(145deg, #3b9668, #145d3d);
  color: white;
  font-size: 21px;
  font-weight: 900;
  box-shadow: 0 9px 24px rgba(20, 93, 61, .22);
}
.login h2 { margin: 0 0 6px; color: #153c29; font-size: 26px; }
.login p { margin: 0 0 22px; }
.login label { display: grid; gap: 6px; margin-top: 12px; color: #4f6056; font-size: 13px; font-weight: 700; }
.login input { margin: 0; }
.login button { margin-top: 18px; min-height: 48px; font-size: 15px; }

.toast {
  bottom: 28px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  background: #143c29;
  box-shadow: 0 13px 36px rgba(9, 35, 22, .25);
  font-weight: 700;
}

.scanner-box { border: 1px solid rgba(255, 255, 255, .1); border-radius: 21px; box-shadow: 0 24px 70px rgba(0, 0, 0, .34); }
.scanner-video-wrap { border: 1px solid rgba(255, 255, 255, .1); }

.catalog-card,
.shortage-product-card,
.employee-card { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.catalog-card:hover,
.shortage-product-card:hover,
.employee-card:hover { border-color: #bfd4c6; box-shadow: 0 12px 28px rgba(22, 57, 38, .09); transform: translateY(-2px); }

@media (max-width: 1050px) {
  .layout { grid-template-columns: 230px minmax(0, 1fr); }
  .main { padding-inline: 20px; }
  .top { margin-inline: -20px; padding-inline: 20px; }
  .workbench-panel > .toolbar { grid-template-columns: minmax(230px, 1fr) 170px; }
  .workbench-panel > .toolbar select:last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { background: #f4f6f3; }
  .layout { display: block; }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(286px, 84vw);
    height: 100dvh;
    padding: 20px 13px 26px;
    box-shadow: 18px 0 50px rgba(7, 28, 18, .30);
  }
  .side:not(.mobile-open) { display: none; }
  .brand { margin-bottom: 20px; }
  .main { padding: 10px 10px 34px; }
  .top {
    position: sticky;
    min-height: auto;
    margin: -10px -10px 12px;
    padding: 12px 10px 10px;
  }
  .top > div:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 9px; }
  .top h1 { align-self: center; font-size: 22px; }
  .top #subtitle { grid-column: 1 / -1; }
  .top > .toolbar { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .workspace-badge { justify-self: start; min-height: 36px; padding-inline: 9px; font-size: 0; }
  .workspace-badge::before { margin: 0; }
  .panel { padding: 13px; border-radius: 14px; }
  .warehouse-quick { position: static !important; padding: 19px 15px 16px; border-radius: 16px; }
  .warehouse-quick-head { display: block; margin-bottom: 12px; }
  .warehouse-quick h2 { font-size: 22px; }
  .flow-badge { display: inline-block; margin-top: 10px; }
  .warehouse-quick .tracking-entry { display: grid; grid-template-columns: 1fr 1fr; }
  .warehouse-quick .tracking-entry input { min-height: 54px; font-size: 17px !important; }
  .warehouse-quick .scan-button { min-height: 48px; }
  .workbench-panel { padding: 0; }
  .workbench-panel .workbench-filter-head { padding: 15px 13px 10px; }
  .workbench-panel > .toolbar { display: grid; grid-template-columns: 1fr; padding: 0 13px 12px; }
  .workbench-panel > .toolbar select:last-child { grid-column: auto; }
  .workbench-panel > .sync-hint { padding: 10px 13px; }
  .workbench-panel > div[style*="overflow"] { padding: 0 9px 10px; }
  #ordersPage .table td::before { display: block; margin-bottom: 2px; color: #829087; font-size: 10px; font-weight: 800; letter-spacing: .05em; }
  #ordersPage .table td:nth-child(1)::before { content: "订单"; }
  #ordersPage .table td:nth-child(2)::before { content: "客户"; }
  #ordersPage .table td:nth-child(3)::before { content: "金额 / 商品"; }
  #ordersPage .table td:nth-child(4)::before { content: "仓库状态 / 运单"; }
  #ordersPage .table td:nth-child(5)::before { content: "问题与备注"; }
  #ordersPage .table td:nth-child(6)::before { content: "内部状态"; }
  #ordersPage .table td:nth-child(7)::before { content: "处理标记"; }
  #ordersPage .table td:first-child { padding-top: 6px; }
  .drawer { padding: 10px 10px 26px; }
  .drawer-head { top: -10px; margin: 0 -10px 12px; padding: 11px 10px; }
  .drawer-head h2 { font-size: 21px; }
  .login { padding: 28px 24px; border-radius: 20px; }
  .toast { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
