:root {
  color-scheme: light;
  --ink: #15251f;
  --muted: #6f7e77;
  --line: #e5eae4;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --forest: #113b31;
  --jade: #2e8069;
  --lime: #cbe87a;
  --yellow: #f8d783;
  --rose: #e25c50;
  --shadow: 0 12px 35px rgba(20, 48, 38, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { max-width: 680px; min-height: 100vh; margin: auto; background: var(--paper); padding: env(safe-area-inset-top) 16px calc(90px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 17px 4px 14px; }
.brand { display: grid; gap: 2px; }
.brand strong { font-size: 20px; letter-spacing: -.5px; }
.brand span, .eyebrow { color: var(--muted); font-size: 12px; }
.mode { color: var(--jade); background: #e3f1e8; border-radius: 20px; padding: 6px 9px; font-size: 12px; }
.hero { overflow: hidden; position: relative; padding: 22px; color: #fff; background: var(--forest); border-radius: 24px; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 175px; height: 175px; right: -72px; top: -64px; border: 30px solid rgba(203,232,122,.36); border-radius: 50%; }
.hero h1 { position: relative; z-index: 1; margin: 5px 0 3px; font-size: 27px; line-height: 1.16; letter-spacing: -.8px; }
.hero p { position: relative; z-index: 1; margin: 0; color: #d3e5dc; font-size: 13px; }
.account-form { display: flex; gap: 9px; margin-top: 17px; }
.account-form input { min-width: 0; flex: 1; padding: 12px; border: 1px solid transparent; border-radius: 12px; background: #fff; color: var(--ink); }
.account-form button, .primary { border: 0; border-radius: 12px; padding: 11px 15px; background: var(--lime); color: #213520; font-weight: 700; }
.section { margin-top: 21px; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin: 0 3px 10px; }
.section-title h2 { margin: 0; font-size: 16px; }
.section-title a, .link-button { border: 0; padding: 0; color: var(--jade); background: transparent; font-size: 13px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.metric { min-width: 0; padding: 14px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.metric b { display: block; font-size: 25px; letter-spacing: -1px; }
.metric span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric.done b { color: var(--jade); }
.metric.pending b { color: #ba7a0f; }
.record, .filter-panel { padding: 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 17px; }
.record + .record { margin-top: 9px; }
.record-head, .record-meta, .row { display: flex; justify-content: space-between; gap: 10px; }
.record-title { display: flex; min-width: 0; align-items: center; gap: 9px; }
.record-name { min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.product-thumb { flex: 0 0 auto; width: 34px; height: 34px; object-fit: cover; border-radius: 8px; background: #eff3f0; }
.product-thumb.placeholder { display: grid; place-items: center; color: #6e8076; font-size: 10px; font-weight: 700; }
.record-meta { margin-top: 7px; color: var(--muted); font-size: 12px; align-items: center; }
.record-meta > span:last-child { text-align: right; }
.status { flex: 0 0 auto; align-self: start; padding: 5px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.status.pending { background: #fff0cf; color: #9f6505; }
.status.done { background: #dff2e7; color: #18704e; }
.status.other { background: #fbe3e0; color: #ae4035; }
.delivery-detail { display: grid; grid-template-columns: 36px 1fr; gap: 9px; align-items: center; margin-top: 12px; padding: 10px; background: #f6faf7; border-radius: 11px; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: var(--jade); border-radius: 50%; font-size: 13px; font-weight: 700; }
.delivery-detail b, .delivery-detail small { display: block; }
.delivery-detail small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.proof { margin-left: auto; padding: 5px 7px; border-radius: 7px; color: var(--jade); background: #e5f3eb; font-size: 11px; }
.filter-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.filter-panel label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
select, .text-input { width: 100%; min-width: 0; padding: 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.notice { display: flex; gap: 8px; margin-top: 13px; padding: 11px; color: #5f6e67; background: #eef4f0; border-radius: 11px; font-size: 12px; line-height: 1.45; }
.notice b { color: var(--forest); }
.select-record { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.select-record input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--jade); }
.factory-tag { padding: 3px 6px; color: var(--muted); background: #f0f2f0; border-radius: 6px; font-size: 11px; }
.bottom-nav { position: fixed; z-index: 5; bottom: 0; left: 50%; display: flex; width: min(680px, 100%); padding: 9px 18px calc(9px + env(safe-area-inset-bottom)); transform: translateX(-50%); border-top: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.nav-item { flex: 1; display: grid; place-items: center; gap: 3px; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.nav-icon { font-size: 18px; line-height: 1; }
.nav-item.active { color: var(--forest); font-weight: 700; }
.action-bar { position: fixed; z-index: 6; bottom: calc(67px + env(safe-area-inset-bottom)); left: 50%; display: flex; align-items: center; justify-content: space-between; width: min(640px, calc(100% - 32px)); padding: 10px 11px 10px 15px; color: #fff; background: var(--forest); border-radius: 15px; box-shadow: 0 10px 26px rgba(17,59,49,.25); transform: translateX(-50%); font-size: 13px; }
.action-bar .primary { padding: 9px 12px; }
.empty { padding: 30px 16px; text-align: center; color: var(--muted); border: 1px dashed #ccd7cf; border-radius: 16px; font-size: 14px; }
.modal-cover { position: fixed; z-index: 10; inset: 0; display: grid; align-items: end; background: rgba(7, 23, 16, .45); }
.modal { width: min(680px, 100%); padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); background: #fff; border-radius: 23px 23px 0 0; }
.modal h2 { margin: 0; font-size: 20px; }
.modal p { margin: 7px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.field { display: grid; gap: 7px; margin: 13px 0; color: #405048; font-size: 13px; font-weight: 700; }
.upload { display: grid; min-height: 82px; place-items: center; border: 1.5px dashed #9bb6a8; border-radius: 12px; color: var(--jade); background: #f6fbf8; text-align: center; font-size: 13px; }
.upload input { max-width: 100%; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 9px; margin-top: 18px; }
.secondary { border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 700; }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 102px; max-width: calc(100% - 32px); padding: 10px 13px; color: #fff; background: #20372e; border-radius: 10px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .2s ease; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 681px) { body { background: #e9eeea; } .shell { box-shadow: 0 0 0 1px #dce5de; } }
