/* ==========================================================================
   自助下单小店 · 样式表（移动端优先）
   前台 + 后台共用，后台样式以 .admin- 前缀区分
   ========================================================================== */

:root {
  --brand: #07c160;
  --brand-dark: #06a850;
  --brand-soft: #e8f8ee;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1b1c1e;
  --text-2: #5b6068;
  --muted: #9096a0;
  --border: #ebedf0;
  --danger: #e34d59;
  --danger-soft: #fdecee;
  --warn: #f5a623;
  --warn-soft: #fff6e5;
  --info: #3f8cff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 14px rgba(17, 24, 39, .06);
  --shadow-lg: 0 -6px 24px rgba(17, 24, 39, .10);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-dark); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0 0 6px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code {
  background: #f1f3f5; border-radius: 4px; padding: 1px 5px;
  font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.right { text-align: right; }
.text-danger { color: var(--danger); }
.req { color: var(--danger); }
.hint {
  color: var(--text-2); font-size: 13px; background: #fff;
  border-radius: var(--radius-sm); padding: 10px 12px; margin: 12px 0 0;
}

/* ---------------------------------------------------------------- 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 14px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.brand-logo {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), #34d27b);
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.brand-name {
  font-weight: 600; font-size: 16px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 46vw;
}
.topnav { display: flex; gap: 4px; flex: 0 0 auto; }
.topnav-link {
  padding: 5px 11px; border-radius: 999px; font-size: 13.5px;
  color: var(--text-2); white-space: nowrap;
}
.topnav-link.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }

/* ------------------------------------------------------------------ 布局 */
.page {
  max-width: 780px; margin: 0 auto;
  padding: 14px 12px calc(96px + var(--safe-bottom));
}
.page-title { font-size: 20px; margin: 4px 0 12px; }
.footer {
  max-width: 780px; margin: 0 auto; padding: 8px 16px 28px;
  text-align: center; color: var(--muted); font-size: 12px;
}
.footer p { margin: 2px 0; }

/* ------------------------------------------------------------------ 卡片 */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.card-head h2 { font-size: 15.5px; }
.link { color: var(--brand-dark); font-size: 13.5px; }
.link-danger { color: var(--danger); }
.link-success { color: var(--brand-dark); }
button.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 13.5px; color: var(--brand-dark); font-family: inherit;
}
button.link-danger { color: var(--danger); }

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: 1px solid transparent; border-radius: 999px;
  padding: 9px 18px; font-size: 14.5px; font-weight: 500;
  font-family: inherit; cursor: pointer; transition: .15s;
  background: #f2f3f5; color: var(--text); white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; border-color: #dfe2e6; color: var(--text-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-disabled, .btn[disabled] {
  background: #eef0f2; color: #b8bdc5; cursor: not-allowed; border-color: transparent;
}
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-xs { padding: 2px 8px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 12px 20px; font-size: 16px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------- flash 提示 */
.flash-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.flash {
  border-radius: var(--radius-sm); padding: 10px 13px;
  font-size: 13.5px; border: 1px solid transparent;
}
.flash-success { background: var(--brand-soft); color: #0d7a3f; border-color: #c6ecd6; }
.flash-error { background: var(--danger-soft); color: #a8242f; border-color: #f8ccd1; }
.flash-warn { background: var(--warn-soft); color: #96650a; border-color: #f7e3b8; }

/* ------------------------------------------------------------------ 表单 */
.form-card { }
.form-card-inner { padding: 0; }
.form-row { margin-bottom: 13px; }
.form-row label {
  display: block; font-size: 13.5px; color: var(--text-2);
  margin-bottom: 6px; font-weight: 500;
}
.form-row input[type="text"],
.form-row input[type="tel"],
.form-row input[type="password"],
.form-row input[type="search"],
.form-row input[type="number"],
.form-row textarea,
.filter-bar input {
  width: 100%; border: 1px solid #e2e5e9; background: #fbfcfd;
  border-radius: 10px; padding: 11px 12px; font-size: 15px;
  font-family: inherit; color: var(--text); transition: .15s;
}
.form-row input:focus, .form-row textarea:focus, .filter-bar input:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(7, 193, 96, .12);
}
.form-row textarea { resize: vertical; min-height: 62px; }
.form-row input[type="file"] {
  width: 100%; font-size: 13.5px; color: var(--text-2);
  background: #fbfcfd; border: 1px dashed #d8dce1; border-radius: 10px; padding: 9px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; margin-top: 28px; }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.form-actions form { display: inline; }

/* --------------------------------------------------------------- 首页公告 */
.notice-card {
  background: linear-gradient(160deg, #ffffff, #f7fdf9);
  border: 1px solid #e3f5ea; border-radius: var(--radius);
  padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.notice-label {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--brand-dark); background: var(--brand-soft);
  border-radius: 6px; padding: 1px 8px; margin-bottom: 8px;
}
.notice-text { font-size: 14.5px; color: var(--text); }
.notice-sub { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

/* ------------------------------------------------------------- 分类与商品 */
.cat-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  border: 1px solid #e2e5e9; background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 6px 15px; font-size: 13.5px;
  font-family: inherit; cursor: pointer; white-space: nowrap;
}
.cat-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.cat-section { margin-bottom: 18px; }
.cat-title {
  font-size: 15px; margin: 4px 2px 10px;
  display: flex; align-items: center; gap: 8px;
}
.cat-count {
  font-size: 11.5px; font-weight: 500; color: var(--muted);
  background: #eef0f2; border-radius: 999px; padding: 0 7px;
}
.product-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.product-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
}
.product-card.is-soldout { opacity: .62; }
.product-thumb {
  position: relative; aspect-ratio: 4 / 3; background: #f2f4f6;
  display: flex; align-items: center; justify-content: center;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { font-size: 30px; color: #c7ccd3; font-weight: 600; }
.cart-badge {
  position: absolute; top: 8px; right: 8px;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(7, 193, 96, .4);
}
.product-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-name { font-size: 14.5px; line-height: 1.35; }
.product-desc {
  font-size: 12px; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.price { color: #e8503a; font-weight: 700; }
.price small { font-size: 11px; margin-right: 1px; }
.stock { font-size: 11.5px; color: var(--muted); }
.stock-low { color: var(--warn); }
.stock-out { color: var(--danger); }
.product-actions { display: flex; gap: 6px; margin-top: auto; }
.product-actions .btn { flex: 1; padding: 7px 0; font-size: 13px; }

/* ------------------------------------------------------------- 底部购物车 */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-width: 780px; margin: 0 auto;
}
.cartbar[hidden] { display: none; }
.cartbar-info {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0; font-family: inherit;
  font-size: 14px; color: var(--text-2); cursor: pointer; text-align: left;
}
.cartbar-count {
  min-width: 20px; height: 20px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; padding: 0 6px;
}
.cartbar-total { margin-left: auto; font-size: 17px; font-weight: 700; color: #e8503a; }
.cartbar-go { flex: 0 0 auto; padding: 10px 22px; }

.sheet-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .38); z-index: 50;
}
.sheet-mask[hidden], .sheet[hidden] { display: none; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; border-radius: 16px 16px 0 0;
  max-width: 780px; margin: 0 auto; max-height: 72vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: sheet-up .2s ease-out;
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--border);
}
.sheet-head h3 { font-size: 15.5px; }
.sheet-body { overflow-y: auto; padding: 6px 16px; flex: 1; }
.sheet-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
}
.sheet-total { font-size: 14px; color: var(--text-2); }
.sheet-total strong { font-size: 18px; color: #e8503a; }

.cart-line {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px dashed var(--border);
}
.cart-line:last-child { border-bottom: 0; }
.cart-line-main { flex: 1; min-width: 0; }
.cart-line-name { font-size: 14.5px; }
.cart-line-price { font-size: 12.5px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid #dfe2e6;
  background: #fff; color: var(--text-2); font-size: 16px; line-height: 1;
  cursor: pointer; font-family: inherit;
}
.stepper button:disabled { color: #c9ced5; }
.stepper .qty { min-width: 22px; text-align: center; font-size: 14px; font-weight: 600; }
.cart-empty { padding: 30px 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- 结算页 */
.checkout-list { border-top: 1px solid var(--border); }
.checkout-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.checkout-row .name { flex: 1; min-width: 0; }
.checkout-row .qty { color: var(--muted); font-size: 13px; }
.checkout-row .sub { font-weight: 600; }
.checkout-total-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 12px; font-size: 14px; color: var(--text-2);
}
.price-lg { font-size: 22px; color: #e8503a; }
.sticky-action {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--border);
  max-width: 780px; margin: 0 auto;
}

/* ---------------------------------------------------------------- 付款页 */
.status-banner {
  border-radius: var(--radius); padding: 13px 15px; margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.status-banner strong { font-size: 15.5px; }
.status-banner span { font-size: 13px; opacity: .85; }
.status-pending { background: var(--warn-soft); color: #8a5c05; border: 1px solid #f7e3b8; }
.status-paid { background: #eaf3ff; color: #1e5aa8; border: 1px solid #cfe2fb; }
.status-completed { background: var(--brand-soft); color: #0d7a3f; border: 1px solid #c6ecd6; }
.status-cancelled { background: #f2f3f5; color: #6a7079; border: 1px solid #e2e5e9; }

.pay-card { text-align: center; }
.pay-amount { padding: 6px 0 4px; }
.pay-amount-label { font-size: 13px; color: var(--muted); }
.pay-amount-value {
  font-size: 38px; font-weight: 700; color: #e8503a; letter-spacing: -.5px;
  line-height: 1.15;
}
.pay-amount-value small { font-size: 20px; margin-right: 2px; }
.pay-orderno {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; color: var(--muted); margin-top: 2px;
}
.pay-orderno-value { font-family: ui-monospace, Menlo, Consolas, monospace; }
.pay-tail {
  margin: 14px 0 8px; padding: 12px; border-radius: 12px;
  background: #fff8e9; border: 1px dashed #f0cf92;
}
.pay-tail-label { font-size: 13px; color: #96650a; }
.pay-tail-value {
  font-size: 30px; font-weight: 700; letter-spacing: 6px;
  color: #b8750b; font-family: ui-monospace, Menlo, Consolas, monospace;
  margin: 2px 0 8px; text-indent: 6px;
}
.pay-tip { font-size: 13px; color: var(--text-2); margin: 10px 0 0; }
.qrcode-box { margin-top: 12px; }
.qrcode-img {
  width: 232px; max-width: 74vw; margin: 0 auto; border-radius: 12px;
  border: 1px solid var(--border); padding: 6px; background: #fff; cursor: zoom-in;
}
.qrcode-empty {
  margin-top: 12px; padding: 18px 12px; border-radius: 12px;
  background: var(--danger-soft); border: 1px dashed #f2c2c7;
}
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .88);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 96vw; max-height: 90vh; border-radius: 10px; }

.shot-preview { margin-top: 8px; }
.shot-preview img {
  max-width: 190px; border-radius: 10px; border: 1px solid var(--border);
}

.kv { margin: 0; display: grid; grid-template-columns: 84px 1fr; gap: 7px 10px; font-size: 14px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; word-break: break-all; }

.order-lines { margin-top: 10px; border-top: 1px solid var(--border); }
.order-lines li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.order-lines .line-name { flex: 1; min-width: 0; }
.order-lines .line-qty { color: var(--muted); font-size: 13px; }
.order-lines .line-sub { font-weight: 600; min-width: 62px; text-align: right; }
.order-lines.compact li { padding: 6px 0; font-size: 13.5px; }
.order-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 10px; font-size: 14px; color: var(--text-2);
}
.order-total strong { font-size: 20px; color: #e8503a; }
.pay-actions { display: flex; gap: 10px; }
.pay-actions .btn { flex: 1; }

/* ---------------------------------------------------------------- 查询页 */
.query-form { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.query-row { display: flex; gap: 10px; }
.query-row input {
  flex: 1; border: 1px solid #e2e5e9; background: #fbfcfd; border-radius: 10px;
  padding: 11px 12px; font-size: 15px; font-family: inherit;
}
.query-row input:focus { outline: none; border-color: var(--brand); background: #fff; }
.order-card .order-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.order-no { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--text-2); }
.order-card-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 8px 0; font-size: 14px;
}

/* ------------------------------------------------------------ 状态标签 */
.status-tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}
.status-tag.status-pending { background: var(--warn-soft); color: #96650a; }
.status-tag.status-paid { background: #eaf3ff; color: #1e5aa8; }
.status-tag.status-completed { background: var(--brand-soft); color: #0d7a3f; }
.status-tag.status-cancelled { background: #f2f3f5; color: #6a7079; }

/* ------------------------------------------------------------ 空状态 */
.empty-state {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 34px 20px; text-align: center;
}
.empty-title { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; }
.empty-state .btn { margin-top: 14px; }
.error-code { font-size: 44px; font-weight: 700; color: #d9dde2; margin: 0 0 4px; }

/* ==========================================================================
   后台管理
   ========================================================================== */
.admin-body { background: #f2f4f7; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
  width: 208px; flex: 0 0 208px; background: #fff;
  border-right: 1px solid var(--border); padding: 16px 12px;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh;
}
.admin-brand { display: flex; flex-direction: column; padding: 0 6px; }
.admin-brand strong { font-size: 15.5px; }
.admin-brand span { font-size: 12px; color: var(--muted); }
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-nav a {
  padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--text-2);
}
.admin-nav a:hover { background: #f5f6f8; }
.admin-nav a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.admin-logout { margin-top: auto; }
.admin-main { flex: 1; min-width: 0; padding: 18px 20px 40px; }
.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.admin-head h1 { font-size: 19px; }

.stat-grid {
  display: grid; gap: 10px; margin-bottom: 14px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 13px 15px;
  display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow);
}
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-size: 21px; font-weight: 700; }
.stat-sub { font-size: 11.5px; color: var(--muted); }
.stat-warn { background: linear-gradient(160deg, #fffdf7, #fff6e5); border: 1px solid #f7e3b8; }
.stat-warn .stat-value { color: #b8750b; }

.bar-chart {
  display: flex; align-items: flex-end; gap: 8px; height: 150px;
  padding-top: 18px;
}
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-col {
  flex: 1; width: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; gap: 4px;
}
.bar {
  width: 100%; max-width: 34px; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #48d68b, var(--brand));
  min-height: 2px;
}
.bar-value { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.bar-label { font-size: 11px; color: var(--muted); margin-top: 5px; }

.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
.data-table th, .data-table td {
  padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table thead th { background: #fafbfc; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfdfd; }
.data-table tfoot td { background: #fafbfc; font-weight: 600; }
.thumb-sm {
  width: 42px; height: 42px; border-radius: 8px; object-fit: cover;
  background: #f2f4f6; display: flex; align-items: center; justify-content: center;
  color: #c7ccd3; font-weight: 600;
}
.thumb-none { font-size: 16px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-actions form { display: inline; }
.inline-form { display: flex; align-items: center; gap: 4px; }
.stock-num { min-width: 26px; text-align: center; font-weight: 600; }

.status-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.status-tab {
  background: #fff; border: 1px solid #e2e5e9; border-radius: 999px;
  padding: 6px 14px; font-size: 13.5px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.status-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab-count { font-size: 11.5px; opacity: .8; }

.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.filter-bar input { max-width: 300px; padding: 8px 12px; font-size: 14px; }
.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px;
}

.detail-grid {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-bottom: 10px;
}
.detail-grid > div { display: flex; flex-direction: column; gap: 2px; }
.detail-grid strong { font-size: 15px; }
.detail-grid .price { font-size: 19px; }
.note-box {
  background: #fbfcfd; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 13.5px;
}
.current-image { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.current-image img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.qrcode-current { margin: 10px 0 14px; }
.qrcode-thumb {
  width: 148px; border-radius: 10px; border: 1px solid var(--border); padding: 4px; background: #fff;
}

/* --------------------------------------------------------------- 登录页 */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f2fbf6, #eef2f7 60%, #f7f8fa); padding: 20px;
}
.login-card {
  width: 100%; max-width: 380px; background: #fff;
  border-radius: 18px; box-shadow: 0 12px 40px rgba(17, 24, 39, .1);
  padding: 26px 22px;
}
.login-brand { text-align: center; margin-bottom: 18px; }
.login-brand .brand-logo { margin: 0 auto 10px; width: 46px; height: 46px; border-radius: 13px; font-size: 22px; }
.login-brand h1 { font-size: 19px; }

/* ------------------------------------------------------------- 响应式 */
@media (max-width: 760px) {
  .admin-shell { flex-direction: column; }
  .admin-side {
    width: auto; flex: none; height: auto; position: static;
    flex-direction: row; align-items: center; gap: 12px;
    padding: 10px 12px; overflow-x: auto; border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .admin-brand { flex: 0 0 auto; }
  .admin-brand strong { font-size: 14px; }
  .admin-nav { flex-direction: row; gap: 6px; flex: 1; }
  .admin-nav a { padding: 7px 11px; font-size: 13.5px; white-space: nowrap; }
  .admin-logout { margin: 0; flex: 0 0 auto; }
  .admin-logout .btn { padding: 6px 11px; }
  .admin-main { padding: 14px 12px 40px; }
  .data-table { min-width: 0; }
  .data-table th, .data-table td { padding: 9px 10px; }
}

@media (min-width: 620px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  .page { padding: 18px 16px 100px; }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
