/* ============================================================
   copenn 进销存 Demo · 设计系统
   浅米/白底 + 可配置品牌主色（CSS 变量，模拟 M10 品牌配置）
   ============================================================ */
:root {
  --primary: #211C17;
  --primary-deep: #100D0A;
  --primary-soft: #ECE8E2;
  --primary-softer: #F5F2ED;
  --bg: #F6F3EE;
  --surface: #FFFFFF;
  --ink: #2B2620;
  --ink-2: #776E62;
  --ink-3: #A69C8E;
  --line: #E8E1D6;
  --line-soft: #F0EAE0;
  --green: #3E7C4F;
  --green-soft: #E7F1E9;
  --red: #B4432E;
  --red-soft: #F8EAE6;
  --amber: #A9741D;
  --amber-soft: #F7EFD9;
  --blue: #3E6E8E;
  --blue-soft: #E7EEF4;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(43,38,32,.05), 0 4px 16px rgba(43,38,32,.06);
  --shadow-lg: 0 8px 40px rgba(43,38,32,.18);
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--primary-soft); }

/* ---------- 布局骨架 ---------- */
.app-shell { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.sidebar {
  background: #1B1815;
  color: #C6C1B8;
  padding: 0 12px 20px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-logo {
  display: flex; align-items: baseline; gap: 8px;
  padding: 22px 12px 6px;
}
.side-logo .logo-main {
  font-family: var(--serif); font-size: 21px; letter-spacing: .22em;
  color: #F3EDE4; font-weight: 400;
}
.side-logo .logo-sub { font-size: 10px; letter-spacing: .1em; color: #8D8272; }
.side-tag {
  margin: 6px 12px 16px; font-size: 10.5px; color: #8B857B; letter-spacing: .05em;
  border-bottom: 1px solid #33302B; padding-bottom: 14px;
}
.nav-section {
  font-size: 10.5px; color: #857A6B; letter-spacing: .12em;
  padding: 14px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7.5px 12px; border-radius: 8px; color: #C9BFB1;
  cursor: pointer; font-size: 13.5px; margin-bottom: 1px;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: #2E2A25; color: #EFE8DD; }
.nav-item.active { background: #EFEAE2; color: #1B1815; font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; font-size: 14px; }
.nav-item .cnt {
  margin-left: auto; font-size: 11px; background: rgba(255,255,255,.12);
  border-radius: 20px; padding: 0 7px; line-height: 17px;
}
.nav-item.active .cnt { background: rgba(27,24,21,.14); color: #1B1815; }
.side-foot { margin-top: 18px; padding: 12px; border-top: 1px solid #33302B; font-size: 11px; color: #8B857B; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 0 28px; height: 54px; position: sticky; top: 0; z-index: 40;
}
.topbar .crumb { font-size: 13px; color: var(--ink-2); }
.topbar .crumb b { color: var(--ink); font-weight: 600; font-size: 14px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.page { padding: 26px 28px 60px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 600; letter-spacing: .01em; }
.page-sub { color: var(--ink-2); font-size: 12.5px; margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 18px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-bottom: 1px solid var(--line-soft);
}
.card-title { font-size: 14.5px; font-weight: 600; }
.card-head .sub { font-size: 12px; color: var(--ink-2); }
.card-head .more { margin-left: auto; font-size: 12.5px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }

.grid-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-label { font-size: 12px; color: var(--ink-2); }
.stat-num { font-size: 26px; font-weight: 650; margin-top: 4px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-num small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.stat-foot { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.stat-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.stat-accent.red { background: var(--red); } .stat-accent.amber { background: var(--amber); }
.stat-accent.blue { background: var(--blue); } .stat-accent.green { background: var(--green); }

.dash-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--ink-2);
  padding: 9px 14px; background: #FBF9F5; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: #FBF8F3; }
.tbl tr.rowlink { cursor: pointer; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }
.tbl .strong { font-weight: 600; }
.tbl .sub-line { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.tbl tfoot td { padding: 10px 14px; background: #FBF9F5; font-weight: 600; }
.tbl tr.hl td { background: var(--red-soft); }
.link-id { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--primary); font-weight: 600; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 500; padding: 2px 9px;
  border-radius: 20px; white-space: nowrap; line-height: 1.5;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.b-gray  { background: #EFECE6; color: #7A7265; }
.b-blue  { background: var(--blue-soft); color: var(--blue); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-green { background: var(--green-soft); color: var(--green); }
.b-red   { background: var(--red-soft); color: var(--red); }
.b-brand { background: var(--primary-soft); color: var(--primary-deep); }
.b-line  { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 9px; padding: 7px 15px; font-size: 13px; cursor: pointer;
  font-family: inherit; transition: all .12s; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); background: #FCFAF7; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }
.btn-primary:hover { background: var(--primary-deep); border-color: var(--primary-deep); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-sm { padding: 4px 11px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 12px 20px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12.5px; font-family: inherit; padding: 0; }
.btn-link:hover { text-decoration: underline; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.label .req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 12px; font-size: 13.5px; font-family: inherit;
  background: var(--surface); color: var(--ink); outline: none;
  transition: border .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(138,90,59,.13);
}
.textarea { resize: vertical; min-height: 70px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span2 { grid-column: span 2; }
.form-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.search-box { position: relative; }
.search-box .input { padding-left: 30px; }
.search-box::before {
  content: "⌕"; position: absolute; left: 10px; top: 50%; transform: translateY(-52%);
  color: var(--ink-3); font-size: 15px;
}
.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.filter-bar .spacer { flex: 1; }
.chip {
  padding: 4.5px 13px; border-radius: 20px; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: all .12s; font-family: inherit;
}
.chip:hover { border-color: var(--ink-3); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 详情页 ---------- */
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.kv .kv-item { padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13px; display: flex; }
.kv .k { width: 92px; flex-shrink: 0; color: var(--ink-2); font-size: 12.5px; }
.kv .v { flex: 1; min-width: 0; word-break: break-all; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .two-col { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; }
.tab {
  padding: 12px 16px; font-size: 13.5px; color: var(--ink-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s;
  display: flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary-deep); font-weight: 600; border-bottom-color: var(--primary); }
.tab .mini-cnt { font-size: 11px; background: var(--line-soft); border-radius: 12px; padding: 0 7px; line-height: 16px; color: var(--ink-2); }
.tab.active .mini-cnt { background: var(--primary-soft); color: var(--primary-deep); }

.steps { display: flex; align-items: center; flex-wrap: wrap; gap: 0; padding: 14px 18px; }
.step { display: flex; align-items: center; }
.step .s-dot {
  width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; background: var(--line-soft); color: var(--ink-3); flex-shrink: 0;
}
.step .s-label { font-size: 12px; color: var(--ink-3); margin: 0 10px 0 6px; white-space: nowrap; }
.step.done .s-dot { background: var(--primary); color: #fff; }
.step.done .s-label { color: var(--ink-2); }
.step.now .s-dot { background: var(--ink); color: #fff; box-shadow: 0 0 0 4px rgba(43,38,32,.1); }
.step.now .s-label { color: var(--ink); font-weight: 600; }
.s-line { width: 22px; height: 1.5px; background: var(--line); }
.step.done + .s-line, .s-line.done { background: var(--primary); }

.timeline { padding: 4px 0; }
.tl-item { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: 6px; top: 26px; bottom: -6px; width: 1.5px; background: var(--line-soft);
}
.tl-item:last-child::before { display: none; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--primary-soft); border: 2.5px solid var(--primary); flex-shrink: 0; margin-top: 4px; }
.tl-item.gray .tl-dot { background: var(--line-soft); border-color: var(--ink-3); }
.tl-body { font-size: 13px; }
.tl-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

.ratio-bar { height: 7px; border-radius: 6px; background: var(--line-soft); overflow: hidden; display: flex; }
.ratio-bar .seg { height: 100%; }
.ratio-bar .seg.paid { background: var(--green); }
.ratio-bar .seg.part { background: var(--amber); }

.hash-chip {
  font-family: ui-monospace, Menlo, monospace; font-size: 11px;
  background: #F4F1EA; border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 7px; word-break: break-all; color: var(--ink-2);
}
.stockbar { height: 5px; border-radius: 5px; background: var(--line-soft); min-width: 90px; overflow: hidden; }
.stockbar .fill { height: 100%; border-radius: 5px; background: var(--green); }
.stockbar .fill.low { background: var(--red); }
.stockbar .fill.mid { background: var(--amber); }

.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); font-size: 13px; }
.empty .big { font-size: 34px; margin-bottom: 10px; opacity: .5; }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(34,28,22,.44); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .15s ease;
}
.modal {
  background: var(--surface); border-radius: 16px; width: 100%; max-width: 560px;
  max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg);
  animation: slideUp .18s ease;
}
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; padding: 16px 22px 12px; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { margin-left: auto; cursor: pointer; border: none; background: none; font-size: 18px; color: var(--ink-3); padding: 4px 8px; border-radius: 8px; }
.modal-close:hover { background: var(--line-soft); color: var(--ink); }
.modal-body { padding: 6px 22px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Toast ---------- */
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #2B2620; color: #F5F1EA; padding: 10px 20px; border-radius: 12px;
  font-size: 13px; box-shadow: var(--shadow-lg); animation: slideUp .2s ease;
  max-width: 80vw;
}
.toast.success { background: var(--green); color: #fff; }
.toast.warn { background: var(--amber); color: #fff; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(33,28,23,.09), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(33,28,23,.07), transparent 55%),
    var(--bg);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 860px; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface); border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(43,38,32,.14); border: 1px solid var(--line);
  min-height: 500px;
}
.login-left {
  background: linear-gradient(160deg, #14120E 0%, #262220 60%, #3B362F 100%);
  color: #EFE7DA; padding: 44px 40px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.login-left::after {
  content: ""; position: absolute; right: -70px; bottom: -70px; width: 240px; height: 240px;
  border-radius: 50%; border: 1px solid rgba(239,231,218,.16);
}
.login-left::before {
  content: ""; position: absolute; right: -30px; bottom: -30px; width: 240px; height: 240px;
  border-radius: 50%; border: 1px solid rgba(239,231,218,.24);
}
.login-brand { font-family: var(--serif); font-size: 30px; letter-spacing: .24em; font-weight: 400; }
.login-slogan { font-size: 10.5px; letter-spacing: .14em; color: #A9A29A; margin-top: 10px; line-height: 1.8; }
.login-left .desc { margin-top: auto; font-size: 13px; line-height: 2; color: #B5AFA6; position: relative; z-index: 1; }
.login-left .desc b { color: #F0E7D8; font-weight: 500; }
.login-feats { margin-top: 22px; display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; color: #B5AFA6; position: relative; z-index: 1; }
.login-feats span::before { content: "◆"; font-size: 7px; color: #A9A29A; margin-right: 9px; vertical-align: 2px; }
.login-right { padding: 46px 44px; display: flex; flex-direction: column; justify-content: center; }
.login-right h2 { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.login-right .sub { font-size: 12.5px; color: var(--ink-2); margin-bottom: 26px; }
.login-tip {
  margin-top: 18px; font-size: 12px; color: var(--ink-2);
  background: var(--primary-softer); border: 1px dashed var(--line);
  border-radius: 10px; padding: 10px 14px; line-height: 1.7;
}
@media (max-width: 760px) { .login-card { grid-template-columns: 1fr; } .login-left { display: none; } }

/* ---------- 手机壳 ---------- */
.phone-wrap { display: flex; justify-content: center; padding: 34px 16px 60px; }
.phone {
  width: 392px; background: #17130F; border-radius: 44px; padding: 10px;
  box-shadow: 0 30px 80px rgba(43,38,32,.35), 0 0 0 1px rgba(255,255,255,.06) inset;
  position: relative;
}
.phone-screen {
  background: var(--bg); border-radius: 36px; overflow: hidden; height: 780px;
  display: flex; flex-direction: column; position: relative;
}
.phone-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 26px; background: #17130F; border-radius: 16px; z-index: 60;
}
.ph-status {
  height: 40px; flex-shrink: 0; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 26px 4px; font-size: 11px; color: var(--ink-2); font-weight: 600;
}
.ph-body { flex: 1; overflow-y: auto; scrollbar-width: none; }
.ph-body::-webkit-scrollbar { display: none; }
.phone-caption { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 16px; line-height: 1.8; }

/* ---------- 移动端页面 ---------- */
.m-page { min-height: 100%; display: flex; flex-direction: column; }
.m-hero {
  background: linear-gradient(165deg, #191613, #37322C); color: #F2EBDF;
  padding: 22px 22px 26px; position: relative; overflow: hidden;
}
.m-hero::after { content: ""; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; border: 1px solid rgba(242,235,223,.18); }
.m-hero .hello { font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.m-hero .hello-sub { font-size: 12px; color: #B0AAA1; margin-top: 5px; letter-spacing: .04em; }
.m-hero-stats { display: flex; gap: 26px; margin-top: 18px; position: relative; z-index: 1; }
.m-hero-stats .s { font-size: 20px; font-weight: 650; }
.m-hero-stats .s small { display: block; font-size: 10.5px; font-weight: 400; color: #B0AAA1; margin-top: 2px; letter-spacing: .06em; }
.m-body { padding: 14px 14px 30px; }
.m-sec-title { font-size: 12px; color: var(--ink-3); letter-spacing: .1em; margin: 16px 4px 8px; font-weight: 600; }
.m-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 15px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(43,38,32,.04);
}
.m-todo { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.m-todo .t-ico {
  width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.m-todo .t-title { font-size: 13.5px; font-weight: 550; }
.m-todo .t-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.m-todo .t-num { margin-left: auto; font-size: 20px; font-weight: 650; color: var(--primary-deep); font-variant-numeric: tabular-nums; }
.m-todo .t-num.alert { color: var(--red); }
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.m-act {
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 4px 10px; text-align: center; cursor: pointer; transition: transform .1s;
}
.m-act:active { transform: scale(.95); }
.m-act .a-ico { font-size: 20px; }
.m-act .a-txt { font-size: 11px; margin-top: 5px; color: var(--ink-2); }
.m-ord { display: flex; gap: 12px; cursor: pointer; align-items: center; }
.m-ord .o-no { font-size: 12px; font-family: ui-monospace, Menlo, monospace; color: var(--ink-2); }
.m-ord .o-cust { font-size: 14px; font-weight: 550; margin-top: 2px; }
.m-ord .o-amt { margin-left: auto; text-align: right; font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums; }
.m-tabbar {
  flex-shrink: 0; display: flex; background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 6px 6px 4px;
}
.m-tab { flex: 1; text-align: center; font-size: 10px; color: var(--ink-3); cursor: pointer; padding: 3px 0; }
.m-tab .i { font-size: 17px; display: block; }
.m-tab.on { color: var(--primary-deep); font-weight: 600; }
.m-fab {
  position: absolute; right: 16px; bottom: 68px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 8px 22px rgba(33,28,23,.4); cursor: pointer; z-index: 30; border: none;
}
.m-nav-back {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 10px 16px 12px;
  background: var(--bg);
}
.m-nav-back .bk { cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 8px 4px 0; }
.m-nav-back .tt { font-size: 15.5px; font-weight: 600; }

/* ---------- 签收页 ---------- */
.sign-hero {
  background: linear-gradient(170deg, #171412, #3B362F); color: #F2EBDF;
  padding: 26px 22px 20px; text-align: center; position: relative; overflow: hidden;
}
.sign-hero::before { content: ""; position: absolute; left: -40px; top: -60px; width: 160px; height: 160px; border-radius: 50%; border: 1px solid rgba(242,235,223,.15); }
.sign-hero .sh-brand { font-family: var(--serif); letter-spacing: .3em; font-size: 15px; color: #D5CFC7; }
.sign-hero .sh-title { font-size: 20px; font-weight: 600; margin-top: 12px; letter-spacing: .04em; }
.sign-hero .sh-no { font-size: 12px; color: #A9A29A; margin-top: 5px; font-family: ui-monospace, Menlo, monospace; letter-spacing: .06em; }
.sign-state { margin: 14px auto 0; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; background: rgba(242,235,223,.13); border: 1px solid rgba(242,235,223,.25); padding: 6px 16px; border-radius: 30px; }
.sign-tipbar {
  margin: 14px; padding: 11px 15px; border-radius: 12px; font-size: 12.5px; line-height: 1.75;
  background: var(--amber-soft); color: #7A5413; border: 1px solid #EBDDB4;
}
.sign-actions { padding: 4px 16px 30px; display: flex; flex-direction: column; gap: 12px; }
.canvas-wrap { border: 1.5px dashed var(--ink-3); border-radius: 12px; background: #FFF; position: relative; overflow: hidden; }
.canvas-wrap canvas { display: block; width: 100%; height: 190px; touch-action: none; cursor: crosshair; }
.canvas-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 13px; letter-spacing: .1em; pointer-events: none;
}
.canvas-hint::after { content: "✎"; margin-left: 8px; }
.sig-clear { position: absolute; right: 8px; top: 8px; z-index: 5; }
.verify-page { text-align: center; padding: 34px 24px; }
.verify-ok {
  width: 66px; height: 66px; border-radius: 50%; background: var(--green-soft);
  display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--green);
  margin: 0 auto 16px;
}
.verify-hash { background: #FBF9F5; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: left; font-size: 11px; font-family: ui-monospace, Menlo, monospace; color: var(--ink-2); word-break: break-all; margin-top: 16px; }

/* ---------- 演示导航浮标 ---------- */
.demo-pill {
  position: fixed; right: 18px; bottom: 18px; z-index: 150;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.demo-pill .dp-main {
  background: #221C16; color: #EFE8DD; border-radius: 30px; padding: 9px 18px;
  font-size: 12.5px; cursor: pointer; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 7px; border: none; font-family: inherit;
}
.demo-pill .dp-menu {
  background: #221C16; border-radius: 14px; padding: 8px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 2px; min-width: 168px;
  animation: slideUp .16s ease;
}
.demo-pill .dp-menu button {
  background: none; border: none; color: #CFC5B8; text-align: left; padding: 8px 12px;
  font-size: 13px; border-radius: 9px; cursor: pointer; font-family: inherit; display: flex; gap: 8px; align-items: center;
}
.demo-pill .dp-menu button:hover { background: #352D24; color: #fff; }
.demo-pill .dp-menu .dp-note { font-size: 10.5px; color: #857A6B; padding: 6px 12px 4px; border-top: 1px solid #383028; margin-top: 4px; }
.demo-pill .dp-menu .dp-reset { color: #D89283; }

/* ---------- 其他 ---------- */
.mono { font-family: ui-monospace, Menlo, monospace; }
.muted { color: var(--ink-3); }
.muted2 { color: var(--ink-2); }
.right { text-align: right; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; } .mt20 { margin-top: 20px; }
.mb8 { margin-bottom: 8px; } .mb14 { margin-bottom: 14px; }
.fs12 { font-size: 12px; } .fs13 { font-size: 13px; }
.w100 { width: 100%; }
.low-tag { color: var(--red); font-weight: 600; }
.att-item { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; margin-bottom: 8px; background: #FDFCFA; }
.att-item .ico { font-size: 15px; }
.att-item .meta { margin-left: auto; color: var(--ink-3); font-size: 11.5px; }
.notice {
  background: var(--primary-softer); border: 1px solid #EBDFD2; color: #6E5643;
  border-radius: 12px; padding: 12px 16px; font-size: 12.5px; line-height: 1.8; margin-bottom: 16px;
}
.notice.warn { background: var(--red-soft); border-color: #EDD2C8; color: #8C3A28; }
.print-note { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #2B2620; color: #EFE8DD; border-radius: 10px 10px 0 0; font-size: 12.5px; }
.print-note .sp { flex: 1; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 64px 1fr; }
  .side-logo .logo-main, .side-logo .logo-sub, .side-tag, .nav-section, .nav-item .txt, .nav-item .cnt, .side-foot { display: none; }
  .side-logo { justify-content: center; padding: 18px 0 10px; }
  .nav-item { justify-content: center; padding: 10px 0; }
  .nav-item .ico { font-size: 17px; }
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .page { padding: 20px 16px 50px; }
  .two-col, .kv { grid-template-columns: 1fr; }
}
