:root{
  --ink:#16221d;
  --muted:#68726d;
  --paper:#f3f5f0;
  --card:#fff;
  --line:#e3e8e1;
  --green:#147a4f;
  --green-dark:#0e5e3c;
  --green-soft:#e6f3eb;
  --orange:#ed7838;
  --yellow:#f2b94b;
  --shadow:0 8px 24px rgba(26,52,40,.08);
  color:var(--ink);
  background:#dfe5df;
  font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif;
  font-synthesis:none;
}

*{box-sizing:border-box}
html{min-height:100%;background:#dfe5df;scroll-behavior:smooth}
body{min-height:100%;margin:0;background:#dfe5df;-webkit-font-smoothing:antialiased}
html,body{
  scrollbar-width:none;
  -ms-overflow-style:none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar{
  display:none;
  width:0;
  height:0;
}
button,input,select{font:inherit}
button{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
[hidden]{display:none!important}

.app-shell{
  width:min(100%,440px);
  min-height:100vh;
  margin:0 auto;
  overflow-x:hidden;
  padding-bottom:calc(78px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 100% -20px,rgba(241,185,75,.15),transparent 180px),
    var(--paper);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:calc(9px + env(safe-area-inset-top)) 11px 7px;
}

.brand{display:flex;align-items:center;gap:8px}
.brand-mark{
  display:grid;
  width:34px;
  height:34px;
  flex:0 0 34px;
  place-items:center;
  border-radius:10px;
  background:var(--ink);
  color:#fff;
  font-size:16px;
  font-weight:800;
}
.brand h1,.brand p{margin:0}
.brand h1{font-size:17px;letter-spacing:-.3px}
.brand p{margin-top:1px;color:var(--muted);font-size:10px}

.round-button{
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:50%;
  background:rgba(255,255,255,.8);
  color:var(--ink);
  font-size:12px;
  font-weight:800;
}

.overview{
  display:flex;
  min-height:82px;
  align-items:center;
  justify-content:space-between;
  margin:0 10px 8px;
  padding:10px 14px;
  overflow:hidden;
  border-radius:16px;
  background:linear-gradient(135deg,rgba(255,255,255,.05),transparent),var(--ink);
  color:#fff;
  box-shadow:0 8px 20px rgba(22,34,29,.14);
}
.eyebrow{
  margin:0 0 6px;
  color:var(--green);
  font-size:11px;
  font-weight:800;
  letter-spacing:1.4px;
}
.overview .eyebrow{margin-bottom:2px;color:#aebdb5;font-size:9px}
.big-number{display:flex;align-items:flex-end;margin:-2px 0 0;line-height:1}
.big-number>span{font-size:34px;font-weight:800;letter-spacing:-2px}
.big-number small{margin-left:4px;padding-bottom:2px;color:#ced7d2;font-size:12px;font-weight:700}
.muted{margin:3px 0 0;color:#aebdb5;font-size:10px}
.progress-visual{
  --progress:0deg;
  display:grid;
  width:58px;
  height:58px;
  flex:0 0 58px;
  place-items:center;
  border-radius:50%;
  background:conic-gradient(var(--yellow) var(--progress),#34443d 0);
}
.progress-visual::before{
  width:46px;
  height:46px;
  grid-area:1/1;
  border-radius:50%;
  background:var(--ink);
  content:"";
}
.progress-visual div{z-index:1;display:grid;grid-area:1/1;text-align:center}
.progress-visual strong{font-size:14px}
.progress-visual span{margin-top:0;color:#aebdb5;font-size:8px}

.sticky-controls{
  position:sticky;
  z-index:10;
  top:0;
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(132px,.85fr);
  gap:6px;
  padding:0 10px 6px;
  background:linear-gradient(var(--paper) 88%,transparent);
}
.search-box{
  display:flex;
  height:38px;
  align-items:center;
  gap:6px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(255,255,255,.94);
  box-shadow:0 5px 18px rgba(31,54,43,.04);
}
.search-box>span{
  color:var(--green);
  font-size:21px;
  font-weight:700;
  line-height:1;
  transform:rotate(-20deg);
}
.search-box input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ink);
  font-size:12px;
}
.search-box input::placeholder{color:#9ca49f}
.search-box button{padding:0;border:0;background:transparent;color:#929c96;font-size:18px}

.scope-row{margin-top:0}
.date-picker{
  display:grid;
  height:38px;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:4px;
  padding:0 8px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  color:var(--muted);
}
.date-picker>span{font-size:9px;font-weight:700}
.date-picker select{
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ink);
  font-size:10px;
  font-weight:800;
}
.date-picker b{
  padding:2px 5px;
  border-radius:10px;
  background:var(--green-soft);
  color:var(--green);
  font-size:8px;
}

.building-scroll{
  display:flex;
  grid-column:1/-1;
  gap:5px;
  margin:0 -10px;
  padding:0 10px 2px;
  overflow-x:auto;
  scrollbar-width:none;
}
.building-scroll::-webkit-scrollbar{display:none}
.building-scroll button{
  height:28px;
  flex:0 0 auto;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.72);
  color:var(--muted);
  font-size:10px;
  font-weight:700;
}
.building-scroll button.selected{border-color:var(--green);background:var(--green);color:#fff}

.task-list{padding:0 10px}
.route-group{margin-bottom:13px}
.group-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 2px 5px;
}
.group-heading>div{display:flex;align-items:center;gap:5px}
.group-heading strong{font-size:14px}
.group-heading span:not(.route-dot),.group-heading small{color:var(--muted);font-size:10px}
.route-dot{
  width:7px;
  height:7px;
  border:2px solid #fff;
  border-radius:50%;
  background:var(--orange);
  box-shadow:0 0 0 1px var(--orange);
}
.cards{display:grid;gap:5px}

.task-card{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) 92px;
  align-items:stretch;
  gap:8px;
  padding:9px 10px 8px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--card);
  box-shadow:0 3px 10px rgba(26,52,40,.05);
}
.card-info{min-width:0}
.card-topline{
  display:flex;
  min-width:0;
  min-height:23px;
  align-items:center;
  gap:7px;
}
.stall{display:flex;flex:0 0 auto;align-items:baseline;gap:5px}
.stall span{color:var(--muted);font-size:9px}
.stall strong{
  font-size:18px;
  letter-spacing:-.3px;
  line-height:1.2;
  white-space:nowrap;
}
.card-topline-actions{display:flex;min-width:0;align-items:center;gap:6px}
.tag{
  display:inline-flex;
  min-height:20px;
  align-items:center;
  padding:0 7px;
  border-radius:20px;
  font-size:8px;
  font-weight:800;
}
.status-tone-green{background:var(--green-soft);color:var(--green)}
.status-tone-orange{background:#fff0df;color:#a95c00}
.status-tone-amber{background:#fff5cf;color:#8b6500}
.status-tone-purple{background:#f3eafa;color:#71439a}
.status-tone-red{background:#fde9e7;color:#ad342b}
.status-tone-gray{background:#eef0ee;color:#606962}
.status-tone-blue{background:#e7f1fb;color:#24679d}
.note-text-button{
  display:block;
  min-width:0;
  height:22px;
  flex:1 1 0;
  padding:0;
  overflow:hidden;
  border:0;
  background:transparent;
  color:#9a6a0e;
  font-size:9px;
  font-weight:750;
  line-height:22px;
  text-align:left;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.note-text-button:active{color:#6f4c08}
.sku-lines{display:grid;margin:3px 0 6px}
.sku-line{
  display:flex;
  min-width:0;
  min-height:24px;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  padding:4px 0;
  border-bottom:1px solid #f0f2ef;
}
.sku-line:last-child{border-bottom:0}
.sku-line strong{
  min-width:0;
  overflow:visible;
  font-size:13px;
  line-height:1.3;
  overflow-wrap:anywhere;
  text-overflow:clip;
  white-space:normal;
  word-break:break-word;
}
.sku-line strong b{color:var(--orange);font-size:13px}
.sku-line strong small{
  display:block;
  margin-top:2px;
  color:#8b958f;
  font-size:8px;
  font-weight:650;
}
.sku-line>span{flex:0 0 auto;color:var(--muted);font-size:9px}
.sku-meta{display:flex;align-items:center;gap:4px;margin-top:2px}
.status-chip{
  display:inline-flex;
  min-height:17px;
  align-items:center;
  padding:0 5px;
  border-radius:8px;
  font-size:8px;
  font-style:normal;
  font-weight:800;
}
.details{display:grid;grid-template-columns:1.15fr .85fr;gap:8px}
.details div{display:flex;min-width:0;align-items:baseline;gap:3px}
.details span{flex:0 0 auto;color:#8b958f;font-size:9px}
.details strong{overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.card-actions{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:6px;
  padding-left:8px;
  border-left:1px dashed #e2e6e1;
}
.done-button{
  width:100%;
  height:42px;
  border:0;
  border-radius:9px;
  background:var(--green);
  color:#fff;
  font-size:11px;
  font-weight:800;
}
.done-button:active{background:var(--green-dark);transform:translateY(1px)}
.status-button{
  display:flex;
  width:100%;
  min-height:29px;
  align-items:center;
  justify-content:center;
  gap:4px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#f6f7f4;
  color:var(--muted);
  font-size:9px;
  font-weight:800;
}
.status-button span{font-size:14px}

.empty-state{padding:58px 20px;text-align:center}
.empty-state>span{
  display:grid;
  width:56px;
  height:56px;
  margin:0 auto 15px;
  place-items:center;
  border-radius:50%;
  background:var(--green-soft);
  color:var(--green);
  font-size:25px;
}
.empty-state h2{margin:0;font-size:18px}
.empty-state p{margin:7px auto 0;max-width:300px;color:var(--muted);font-size:13px;line-height:1.6}

.refresh-fab{
  position:fixed;
  z-index:15;
  right:max(12px,calc((100vw - 430px)/2 + 12px));
  bottom:calc(12px + env(safe-area-inset-bottom));
  display:flex;
  height:42px;
  align-items:center;
  padding:0 14px;
  border:0;
  border-radius:22px;
  background:var(--ink);
  color:#fff;
  font-size:11px;
  font-weight:800;
  box-shadow:0 10px 28px rgba(22,34,29,.26);
}
.refresh-fab:disabled{cursor:wait;opacity:.78}
.refresh-fab span{margin-right:5px;color:var(--yellow);font-size:17px}
.refresh-fab.is-refreshing span{display:inline-block;animation:spin 700ms linear infinite}

.access-page{
  display:grid;
  min-height:100vh;
  place-items:center;
  padding:16px;
  background:
    radial-gradient(circle at 10% 10%,rgba(242,185,75,.22),transparent 280px),
    radial-gradient(circle at 90% 90%,rgba(20,122,79,.14),transparent 320px),
    var(--paper);
}
.access-card{
  width:min(100%,430px);
  padding:28px 22px;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(255,255,255,.96);
  box-shadow:0 28px 80px rgba(22,34,29,.14);
}
.access-card .brand-mark{margin-bottom:24px}
.access-card h1{margin:0 0 9px;font-size:25px;letter-spacing:-1px}
.access-card>p:not(.eyebrow,.access-error){margin:0;color:var(--muted);font-size:14px;line-height:1.7}
.access-form{display:grid;gap:8px;margin-top:22px}
.access-form label{margin-top:5px;color:var(--muted);font-size:11px;font-weight:800}
.access-form input{
  height:50px;
  padding:0 15px;
  border:1px solid var(--line);
  border-radius:13px;
  outline:0;
  background:#fafbf9;
  color:var(--ink);
}
.access-form input:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(20,122,79,.1)}
.access-form button{
  height:50px;
  margin-top:8px;
  border:0;
  border-radius:13px;
  background:var(--green);
  color:#fff;
  font-weight:800;
}
.access-form button:disabled{opacity:.55}
.access-error{
  margin:12px 0 0;
  padding:10px 12px;
  border-radius:10px;
  background:#fcebea;
  color:#a84238;
  font-size:12px;
}

.sheet-backdrop{
  position:fixed;
  z-index:30;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:12px;
  background:rgba(10,19,15,.48);
  backdrop-filter:blur(3px);
  animation:fade-in 160ms ease-out;
}
.bottom-sheet,
.bottom-dialog{
  width:min(100%,430px);
  padding:9px 16px calc(18px + env(safe-area-inset-bottom));
  border:0;
  border-radius:24px 24px 18px 18px;
  background:#fff;
  color:var(--ink);
  box-shadow:0 -12px 50px rgba(11,30,21,.18);
  animation:slide-up 220ms ease-out;
}
.bottom-dialog{
  position:fixed;
  inset:auto 12px 12px;
  max-height:calc(100vh - 24px);
  margin:auto;
  padding:0;
  overflow:auto;
}
.bottom-dialog::backdrop{background:rgba(10,19,15,.48);backdrop-filter:blur(3px)}
.bottom-dialog form{padding:9px 16px calc(18px + env(safe-area-inset-bottom))}
.sheet-handle{width:40px;height:4px;margin:0 auto 17px;border-radius:3px;background:#d9ded9}
.sheet-title{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:11px}
.sheet-title h2{margin:0;font-size:20px}
.sheet-title>button{
  width:34px;
  height:34px;
  border:0;
  border-radius:50%;
  background:#f0f2ef;
  color:var(--muted);
  font-size:21px;
}
.sheet-subtitle{margin:4px 0 0;color:var(--muted);font-size:11px}
.sku-picker-list{
  display:grid;
  max-height:45vh;
  overflow:auto;
  border-top:1px solid var(--line);
}
.status-picker-list{
  display:grid;
  max-height:56vh;
  overflow:auto;
  border-top:1px solid var(--line);
}
.status-picker-row{
  display:grid!important;
  min-height:64px;
  grid-template-columns:minmax(0,1fr) 112px;
  align-items:center;
  gap:12px;
  margin:0!important;
  padding:9px 0;
  border-bottom:1px solid var(--line);
}
.status-picker-row>span{display:grid;gap:4px;min-width:0}
.status-picker-row strong{
  overflow:visible;
  color:var(--ink);
  font-size:14px;
  overflow-wrap:anywhere;
  text-overflow:clip;
  white-space:normal;
  word-break:break-word;
}
.status-picker-row small{color:var(--muted);font-size:10px}
.status-picker-row select{
  width:112px;
  height:42px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:10px;
  outline:0;
  background:#f6f7f4;
  color:var(--ink);
  font-size:13px;
  font-weight:800;
}
.sku-picker-row{
  display:grid!important;
  min-height:64px;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin:0!important;
  padding:9px 0;
  border-bottom:1px solid var(--line);
}
.sku-picker-row>span:first-child{display:grid;gap:4px;min-width:0}
.sku-picker-row>span:first-child strong{
  overflow:visible;
  color:var(--ink);
  font-size:14px;
  overflow-wrap:anywhere;
  text-overflow:clip;
  white-space:normal;
  word-break:break-word;
}
.sku-picker-row small{color:var(--muted);font-size:10px}
.wheel-field{
  display:flex;
  height:96px;
  align-items:center;
  gap:6px;
  padding:0 8px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#f6f7f4;
}
.quantity-wheel{
  position:relative;
  display:block;
  width:62px;
  height:96px;
  overflow-x:hidden;
  overflow-y:auto;
  outline:0;
  scroll-behavior:smooth;
  scroll-snap-type:y mandatory;
  scrollbar-width:none;
  touch-action:pan-y;
  -webkit-overflow-scrolling:touch;
  background:linear-gradient(
    to bottom,
    transparent 31px,
    rgba(20,122,79,.22) 31px,
    rgba(20,122,79,.22) 32px,
    rgba(20,122,79,.06) 32px,
    rgba(20,122,79,.06) 64px,
    rgba(20,122,79,.22) 64px,
    rgba(20,122,79,.22) 65px,
    transparent 65px
  );
  mask-image:linear-gradient(to bottom,transparent,#000 30%,#000 70%,transparent);
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 30%,#000 70%,transparent);
}
.quantity-wheel::-webkit-scrollbar{display:none}
.wheel-spacer{
  display:block;
  height:32px;
  pointer-events:none;
}
.wheel-option{
  display:grid;
  height:32px;
  place-items:center;
  color:var(--ink);
  font-size:16px;
  font-weight:800;
  scroll-snap-align:center;
  scroll-snap-stop:always;
  user-select:none;
  -webkit-user-select:none;
}
.wheel-field b{color:var(--muted);font-size:11px}
.bottom-dialog label{display:block;margin:12px 0 6px;color:var(--muted);font-size:11px;font-weight:800}
.bottom-dialog input{
  width:100%;
  height:48px;
  padding:0 13px;
  border:1px solid var(--line);
  border-radius:12px;
  outline:0;
  background:#fafbf9;
  color:var(--ink);
  font-size:16px;
  font-weight:700;
}
.bottom-dialog input:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(20,122,79,.1)}
.sheet-actions{display:grid;grid-template-columns:.7fr 1.3fr;gap:8px;margin-top:14px}
.sheet-actions button{
  height:43px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#f6f7f4;
  color:var(--muted);
  font-weight:800;
}
.sheet-actions .primary{border-color:var(--green);background:var(--green);color:#fff}
.sheet-actions button:disabled{opacity:.5}

.tool-row{
  display:grid;
  width:100%;
  grid-template-columns:42px 1fr 18px;
  align-items:center;
  gap:11px;
  padding:13px 5px;
  border:0;
  border-top:1px solid var(--line);
  background:transparent;
  color:var(--ink);
  text-align:left;
}
.tool-row>span{
  display:grid;
  width:39px;
  height:39px;
  place-items:center;
  border-radius:12px;
  background:var(--green-soft);
  color:var(--green);
  font-size:20px;
  font-weight:800;
}
.tool-row div{display:grid;gap:4px}
.tool-row strong{font-size:14px}
.tool-row small{color:var(--muted);font-size:11px}
.tool-row>b{color:#9da59f;font-size:23px}
.danger-tool>span{background:#f7eeee;color:#aa4d4d}

.note-popover{
  position:fixed;
  z-index:45;
  width:min(300px,calc(100vw - 20px));
  max-height:min(180px,calc(100vh - 20px));
  padding:10px 12px;
  overflow:auto;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  background:rgba(22,34,29,.97);
  color:#fff;
  box-shadow:0 12px 30px rgba(13,25,19,.28);
  font-size:11px;
  font-weight:650;
  line-height:1.55;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}

.toast{
  position:fixed;
  z-index:50;
  right:50%;
  bottom:calc(72px + env(safe-area-inset-bottom));
  max-width:calc(100vw - 32px);
  padding:11px 17px;
  border-radius:22px;
  background:rgba(22,34,29,.94);
  color:#fff;
  font-size:12px;
  font-weight:700;
  line-height:1.45;
  text-align:left;
  white-space:normal;
  box-shadow:var(--shadow);
  transform:translateX(50%);
  animation:toast-in 170ms ease-out;
}

@keyframes slide-up{from{opacity:0;transform:translateY(30px)}}
@keyframes fade-in{from{opacity:0}}
@keyframes toast-in{from{opacity:0;transform:translate(50%,8px)}}
@keyframes spin{to{transform:rotate(360deg)}}

body.pickup-preview-mode #openTools{display:none}
body.pickup-preview-mode [data-pick-group]:disabled,
body.pickup-preview-mode [data-status-group]:disabled{
  cursor:default;
  opacity:.58;
}

@media(min-width:601px){
  body{padding:24px 0}
  .app-shell{
    min-height:calc(100vh - 48px);
    overflow:clip;
    border-radius:24px;
    box-shadow:0 24px 80px rgba(23,42,33,.12);
  }
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}
