﻿:root {
  --brand: #157a4d;
  --brand-2: #24a06a;
  --brand-dark: #0d3b28;
  --brand-soft: #e8f5ee;
  --accent: #f08c1a;
  --danger: #d64545;
  --warn: #d98b00;
  --ink: #1b2a22;
  --muted: #6b7f74;
  --line: #e3ebe6;
  --bg: #f3f7f4;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 54, 38, .05), 0 8px 24px rgba(16, 54, 38, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9d8cf; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-brand {
  position: relative; overflow: hidden; padding: 64px 60px; color: #fff;
  background: radial-gradient(1200px 600px at 10% 0%, #2a9b68 0%, #157a4d 40%, #0b3a27 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand:after {
  content: ""; position: absolute; right: -180px; bottom: -220px; width: 620px; height: 620px;
  border-radius: 50%; background: rgba(255,255,255,.06);
}
.login-brand h1 { font-size: 40px; line-height: 1.25; margin: 0 0 16px; letter-spacing: 2px; }
.login-brand p.slogan { font-size: 15px; opacity: .78; margin: 0; max-width: 420px; line-height: 1.9; }
.brand-logo { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.brand-logo .mark {
  width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.14);
  display: grid; place-items: center; font-size: 22px; border: 1px solid rgba(255,255,255,.25);
}
.login-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; max-width: 520px; }
.login-feats div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 14px 16px; font-size: 13px; }
.login-feats b { display: block; font-size: 15px; margin-bottom: 4px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { margin: 0 0 6px; font-size: 24px; }
.login-card .sub { color: var(--muted); margin: 0 0 26px; font-size: 13px; }
.tabs { display: flex; gap: 6px; background: var(--bg); padding: 4px; border-radius: 10px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #fbfdfb; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(36,160,106,.12); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-weight: 600; white-space: nowrap; transition: .15s;
}
.btn:hover { border-color: #bcd4c6; background: #f8fbf9; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #126a43; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: #fff; color: var(--danger); border-color: #f0c7c7; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.login-tip { margin-top: 18px; padding: 12px 14px; background: var(--brand-soft); border-radius: 9px; font-size: 12px; color: #266648; line-height: 1.8; }

/* ---------- 框架 ---------- */
.app { display: grid; grid-template-columns: 218px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #10291f 0%, #0b211a 100%); color: #cfe3d8; padding: 18px 12px 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .logo { display: flex; gap: 10px; align-items: center; padding: 4px 8px 20px; color: #fff; font-weight: 700; letter-spacing: 1px; font-size: 16px; }
.sidebar .logo .mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #2fb377, #157a4d); display: grid; place-items: center; font-size: 18px; }
.nav-group { margin: 10px 0 2px; }
.nav-group-title { display: flex; align-items: center; justify-content: space-between; padding: 5px 10px; font-size: 11px; letter-spacing: 2px; color: #6f9a85; cursor: pointer; user-select: none; }
.nav-group-title:hover { color: #cfe3d8; }
.nav-group-title .arrow { transition: transform .15s; font-size: 10px; }
.nav-group.collapsed .arrow { transform: rotate(-90deg); }
.nav-group.collapsed .nav-items { display: none; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px; color: #cfe3d8; cursor: pointer; font-size: 13.5px; margin: 1px 0; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.on { background: linear-gradient(90deg, rgba(47,179,119,.28), rgba(47,179,119,.1)); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #35c98a; }
.nav-item .ico { width: 18px; text-align: center; opacity: .9; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar .crumb { font-weight: 700; font-size: 16px; }
.topbar .right { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.content { padding: 22px 24px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { margin: 0 0 4px; font-size: 21px; }
.page-head .desc { color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片 / KPI ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-hd { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-hd h3 { margin: 0; font-size: 15px; }
.card-bd { padding: 16px 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.kpi .val { font-size: 26px; font-weight: 700; letter-spacing: .5px; font-family: "DIN Alternate", "Segoe UI", sans-serif; }
.kpi .val small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi:after { content: ""; position: absolute; right: -20px; top: -20px; width: 78px; height: 78px; border-radius: 50%; background: var(--brand-soft); opacity: .8; }
.kpi.green .val { color: var(--brand); }
.kpi.orange .val { color: var(--accent); }
.kpi.red .val { color: var(--danger); }
.grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.grid2eq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mt { margin-top: 14px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
thead th {
  position: sticky; top: 0; background: #f6faf7; color: #476355; font-weight: 600; text-align: left;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 2;
}
tbody td { padding: 9px 12px; border-bottom: 1px solid #eef3ef; vertical-align: middle; }
tbody tr:hover td { background: #f8fbf9; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.row-new td { background: #fff7d6 !important; }
.row-new:hover td { background: #fff2bd !important; }
.row-sub td { background: #fafcfb; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.badge.gray { background: #eef1ef; color: #64756b; }
.badge.green { background: #e4f6ec; color: #157a4d; }
.badge.orange { background: #fdf0dd; color: #b26a00; }
.badge.blue { background: #e6f0fb; color: #2563a8; }
.badge.red { background: #fbe7e7; color: #bb3535; }
.badge.purple { background: #f0e9fb; color: #6d3fb3; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.toolbar input, .toolbar select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: 0; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--brand-2); }
.toolbar .spacer { flex: 1; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.search { min-width: 220px; }
.mini { font-size: 12px; color: var(--muted); }
.tag { font-size: 11px; background: var(--brand-soft); color: var(--brand); padding: 2px 6px; border-radius: 5px; }

/* ---------- 弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(12, 30, 22, .45); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 5vh 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 30px 80px rgba(0,0,0,.25); animation: pop .16s ease-out; }
.modal.wide { max-width: 860px; }
.modal.xwide { max-width: 1060px; }
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: .6; } }
.modal-hd { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-hd h3 { margin: 0; font-size: 16px; }
.modal-bd { padding: 18px 20px; max-height: 68vh; overflow-y: auto; }
.modal-ft { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.close { border: 0; background: none; font-size: 22px; color: #98a89e; cursor: pointer; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #17342a; color: #fff; padding: 10px 18px; border-radius: 9px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: pop .18s; }
.toast.err { background: #8f2b2b; }
.toast.ok { background: #17603f; }

/* ---------- 各页 ---------- */
.hero { background: linear-gradient(120deg, #0f5c3c, #1d8a5b 55%, #2aa26b); color: #fff; border-radius: 16px; padding: 26px 28px; display: flex; justify-content: space-between; gap: 20px; align-items: center; box-shadow: 0 14px 40px rgba(20,90,60,.22); }
.hero h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: 1px; }
.hero p { margin: 0; opacity: .8; font-size: 13px; }
.hero .big { text-align: right; }
.hero .big b { font-size: 32px; display: block; font-family: "DIN Alternate", sans-serif; }
.hero .big span { font-size: 12px; opacity: .8; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .t { font-size: 12px; color: var(--muted); }
.stat .n { font-size: 20px; font-weight: 700; margin-top: 6px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 10px; }
.bar-item { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bar { width: 100%; max-width: 44px; background: linear-gradient(180deg, #43c08a, #1c8055); border-radius: 6px 6px 3px 3px; min-height: 3px; transition: .3s; }
.bar-item .lbl { font-size: 11px; color: var(--muted); }
.bar-item .v { font-size: 11px; color: var(--brand); font-weight: 600; }
.list-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #e8efe9; font-size: 13px; }
.list-row:last-child { border: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); display: inline-block; margin-right: 8px; }
.todo { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid #f0f4f1; cursor: pointer; }
.todo:last-child { border: 0; }
.todo b { font-size: 19px; color: var(--brand); }
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 14px; }
.steps { display: flex; gap: 0; margin: 6px 0 18px; }
.flow-bar {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow);
}
.flow-step { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 10px; cursor: pointer; transition: .15s; }
.flow-step:hover { background: var(--brand-soft); transform: translateY(-1px); }
.flow-step .n {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2fb377, #157a4d); color: #fff; font-weight: 700; font-size: 13px;
}
.flow-step b { font-size: 13px; }
.quick-goods { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.quick-goods:empty { display: none; }
.smart-box { background: linear-gradient(180deg, #f5fcf8, #fff); border: 1px solid #cfe6d8; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.smart-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.smart-box textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: 0; resize: vertical; font-family: inherit; font-size: 13px; background: #fff; }
.smart-box textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(36,160,106,.12); }
.smart-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid #d7e7dd; background: #f7fcf9;
  color: var(--ink); padding: 5px 10px; border-radius: 20px; cursor: pointer; font-size: 12.5px;
}
.chip:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.chip b { color: var(--danger); font-weight: 600; }
.oe-q::-webkit-outer-spin-button, .oe-q::-webkit-inner-spin-button,
.oe-p::-webkit-outer-spin-button, .oe-p::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.oe-q, .oe-p { -moz-appearance: textfield; appearance: textfield; }
.help-step { padding: 8px 0; border-bottom: 1px dashed #e8efe9; }
.help-step:last-of-type { border-bottom: 0; }
.menu-btn { display: none; }
.step { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 26px; }
.step:before { content: ""; position: absolute; top: 8px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: #dce7e0; transform: translateX(-50%); }
.step:after { content: ""; position: absolute; top: 12px; left: 50%; width: 100%; height: 2px; background: #e8efe9; }
.step:last-child:after { display: none; }
.step.done { color: var(--brand); font-weight: 600; }
.step.done:before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.step.done:after { background: #b8e2ca; }

.shop-shell { min-height: 100vh; background: #f6f8f5; }
.shop-top { background: #fff; border-bottom: 1px solid var(--line); padding: 0 26px; height: 62px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; }
.shop-top .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--brand); font-size: 16px; }
.shop-top .logo .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.shop-body { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }
.shop-grid { display: grid; grid-template-columns: 1fr 330px; gap: 18px; align-items: start; }
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-tabs button { border: 1px solid var(--line); background: #fff; padding: 6px 14px; border-radius: 20px; cursor: pointer; font-size: 13px; }
.cat-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.goods-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.goods-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.goods-card .thumb { height: 84px; border-radius: 9px; background: linear-gradient(135deg, #eaf6ef, #d7efe1); display: grid; place-items: center; font-size: 30px; }
.goods-card h4 { margin: 0; font-size: 14px; }
.goods-card .spec { color: var(--muted); font-size: 12px; }
.goods-card .price { color: var(--danger); font-weight: 700; font-size: 18px; }
.goods-card .price small { font-size: 11px; color: var(--muted); font-weight: 400; }
.goods-card .row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.qty-box { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.qty-box button { width: 26px; height: 28px; border: 0; background: #f6faf7; cursor: pointer; }
.qty-box input { width: 42px; height: 28px; border: 0; text-align: center; outline: 0; }
.cart { position: sticky; top: 82px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cart-hd { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; justify-content: space-between; }
.cart-bd { max-height: 340px; overflow-y: auto; padding: 8px 16px; }
.cart-item { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px dashed #edf2ee; font-size: 13px; }
.cart-ft { padding: 14px 16px; border-top: 1px solid var(--line); }
.cart-ft .total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 12px; font-size: 17px; color: var(--danger); }
.order-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.order-card .hd { padding: 12px 16px; background: #fafcfb; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 13px; }
.order-card .bd { padding: 10px 16px; }
.order-line { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: #395044; }
.shop-notice { background: #fff8e6; border: 1px solid #f4e2b8; color: #8a5a00; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.shop-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 26px 0 10px; }
.shop-footer a { color: var(--muted); margin: 0 2px; }

.print-area { display: none; }
.label-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.label {
  border: 1px dashed #9fb3a7; border-radius: 8px; padding: 10px 12px; font-size: 12px; page-break-inside: avoid; background: #fff;
}
.label .lh { display: flex; justify-content: space-between; border-bottom: 1px solid #e8efe9; padding-bottom: 5px; margin-bottom: 5px; font-weight: 700; }
.label .big { font-size: 16px; font-weight: 700; margin: 4px 0; }
.label .barcode { height: 30px; margin-top: 6px; background: repeating-linear-gradient(90deg, #111 0 2px, #fff 2px 4px, #111 4px 5px, #fff 5px 8px); }

@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { display: block !important; position: absolute; left: 0; top: 0; width: 100%; padding: 10mm; }
  .label-sheet { grid-template-columns: repeat(3, 1fr); }
  @page { size: A4; margin: 8mm; }
}

@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .goods-grid { grid-template-columns: repeat(2, 1fr); }
  .grid2, .two-col { grid-template-columns: 1fr; }
  .flow-bar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; top: 0; left: 0; z-index: 120; width: 245px; height: 100vh; }
  .sidebar.open { display: block; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
  .menu-btn { display: inline-flex; }
  .flow-bar { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 12px; }
  .topbar .right > span { display: none; }
  .content { padding: 14px 12px 30px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .kpis, .stat-row { grid-template-columns: 1fr 1fr; }
  .shop-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

.oe-suggest { position: fixed; z-index: 400; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 34px rgba(0,0,0,.16); max-height: 280px; overflow: auto; display: none; padding: 4px; }
.oe-suggest-item { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.oe-suggest-item:hover, .oe-suggest-item.active { background: var(--brand-soft); }

.shop-banner { margin-bottom: 12px; border-radius: 14px; overflow: hidden; }
.shop-banner img { width: 100%; display: block; max-height: 220px; object-fit: cover; }


/* AI 录单客户分栏 */
.ai-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.ai-cust-list { position: sticky; top: 10px; }
.ai-cust-items { max-height: calc(100vh - 250px); overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.ai-cust-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 9px; border: 1px solid transparent; border-radius: 8px; background: #f7faf8; cursor: pointer; font: inherit; color: var(--text); }
.ai-cust-item:hover { background: var(--brand-soft); }
.ai-cust-item.active { background: var(--brand-soft); border-color: var(--brand); }
.ai-cust-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ai-text { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 9px; font-family: inherit; resize: vertical; }
@media (max-width: 900px) { .ai-layout { grid-template-columns: 1fr; } .ai-cust-list { position: static; } .ai-cust-items { max-height: 220px; } }


/* 智能识别未识别内容 */
.oe-unmatched { display: none; margin-top: 10px; border: 1px solid #efb3a4; background: #fff6f1; border-radius: 10px; padding: 10px; }
.oe-unmatched-title { color: #b43d20; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.oe-unmatched-item { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.oe-unmatched-item input { flex: 1; min-width: 140px; padding: 7px 9px; border: 1px solid #e3a18e; border-radius: 7px; background: #fffdfa; font-family: inherit; }
.oe-unmatched-item input.bad { border-color: #d33; background: #fff0f0; }

.ai-cust-state { font-size: 10px; color: #888; white-space: nowrap; }
.ai-cust-state.loading { color: #d98200; }
.ai-cust-state.pending { color: #1a8f4c; }
.ai-cust-state.error { color: #c0392b; }

#ai-text.dragover, #oe-smart.dragover { border-color: var(--brand); background: #eef9f2; box-shadow: 0 0 0 3px rgba(34,139,84,.12); }

.mem-stars { color: #f2b01e; letter-spacing: 2px; font-size: 16px; white-space: nowrap; }

/* 商品档案：批量操作条 / 行内操作按钮 */
.goods-batch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; background: #eef9f2; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink); }
.goods-batch[hidden] { display: none; }
.goods-batch b { color: var(--brand); font-size: 14px; }
.goods-batch .mini { color: var(--muted); }
.row-ops { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; }
.row-ops .btn.sm { padding: 4px 8px; font-size: 12px; }
.gi-batch-hd { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 2px 10px; font-size: 12.5px; }
.gi-batch-hd .spacer { flex: 1; }
.gi-batch-table { width: 100%; border-collapse: collapse; }
.gi-batch-table th { background: #f5f8f6; font-size: 12px; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.gi-batch-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12.5px; vertical-align: middle; }
.gi-batch-table tr:last-child td { border-bottom: 0; }
.gi-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); display: inline-block; }
.gi-thumb.empty { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); background: #f5f8f6; }
.gi-batch-table .gi-row-url { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; outline: 0; font-family: inherit; }
.gi-batch-table .gi-row-url:focus { border-color: var(--brand-2); }
.gi-batch-table .gi-row-ops { white-space: nowrap; }
