@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #182724;
  --muted: #78827e;
  --line: #f3f5f3;
  --canvas: #fafbf9;
  --paper: #fff;
  --forest: #173c36;
  --forest-surface: #8b9d9a;
  --forest-light: #f4f9f6;
  --lime: #ebf6cf;
  --coral: #e57e5e;
  --amber: #d3a54c;
  --red: #c65b50;
  --radius: 8px;
  font-family: "DM Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; background: var(--canvas); color: var(--ink); font-size: 14px; }

button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar { width: 248px; position: fixed; inset: 0 auto 0 0; z-index: 4; display: flex; flex-direction: column; padding: 27px 17px 18px; color: #1f332c; background: var(--forest-surface); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; text-decoration: none; color: inherit; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 17px; font-weight: 600; }
.brand-copy small { color: #5b6e66; font-size: 11px; }
.nav-caption { margin: 53px 10px 12px; color: #667a71; font-size: 11px; }
.main-nav { display: grid; gap: 5px; }
.nav-item { height: 43px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #40544b; text-align: left; transition: background .18s, color .18s; }
.nav-item:hover { background: #92a4a0; color: #172622; }
.nav-item.active { background: #95aaa4; color: #172622; box-shadow: inset 3px 0 var(--lime); }
.nav-icon { width: 18px; color: #5c7a4e; font-size: 18px; text-align: center; }
.sidebar-bottom { margin-top: auto; }
.password-link { width: 100%; margin-bottom: 6px; padding: 9px 10px; border: 1px solid #ffffff24; border-radius: 3px; background: transparent; color: #3b5047; font-size: 11px; text-align: left; cursor: pointer; }
.password-link:hover { background: #ffffff14; color: #172622; }
.side-note { display: flex; align-items: center; gap: 8px; padding: 13px 10px 17px; color: #5b6e66; font-size: 11px; }
.live-dot, .status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #cae6c7; box-shadow: 0 0 0 3px #cae6c720; }
.profile { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 6px 2px; border: 0; border-top: 1px solid #ffffff20; background: transparent; color: #172622; text-align: left; }
.profile-copy { display: grid; gap: 3px; flex: 1; }
.profile-copy strong { font-size: 12px; font-weight: 500; }
.profile-copy small { color: #5b6e66; font-size: 10px; }
.logout-icon { color: #5b6e66; font-size: 17px; }
.main-area { min-height: 100vh; margin-left: 248px; }
.topbar { height: 67px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid #f4f6f4; background: #ffffffd9; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #8b9691; font-size: 12px; }
.breadcrumbs strong { color: #34443e; font-weight: 500; }
.crumb-sep { color: #c1c9c4; }
.topbar-right { display: flex; align-items: center; gap: 16px; color: #87918c; font-size: 11px; }
.topbar-divider { width: 1px; height: 18px; background: var(--line); }
.status-pill { display: flex; align-items: center; gap: 7px; color: #53665e; }
.status-pill i { width: 6px; height: 6px; }
.mobile-menu { display: none; }
.sidebar-mask { display: none; }
.content-wrap { max-width: 1400px; margin: 0 auto; padding: 37px 42px 25px; }
.page-section { display: none; animation: rise-in .3s ease both; }
.page-section.active { display: block; }
@keyframes rise-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 9px; color: #74837b; font-size: 11px; }
.eyebrow span { color: var(--coral); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; color: #1c302a; font-size: 29px; font-weight: 600; line-height: 1.25; }
.heading-note { margin: 0; color: #87918c; font-size: 12px; }
.button { min-height: 37px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 500; transition: transform .15s, background .15s, border-color .15s; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--forest-surface); color: #172622; }
.button-primary:hover { background: #92a9a3; }
.button-primary > span { font-size: 17px; line-height: 1; }
.button-soft { border-color: #f1f4f1; background: #ffffff; color: #4b5c54; }
.button-soft:hover { border-color: #e4ebe6; background: #fcfefc; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 23px; }
.stat-card { min-height: 147px; position: relative; overflow: hidden; padding: 17px 18px; border: 1px solid #f4f6f4; border-radius: var(--radius); background: var(--paper); }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #75817a; font-size: 11px; }
.stat-symbol { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: var(--forest-light); color: var(--forest); font-size: 17px; }
.stat-products .stat-symbol { background: #fcf6f4; color: #c46c4c; }
.stat-orders .stat-symbol { background: #fcf8ef; color: #a58435; }
.stat-revenue .stat-symbol { background: #f4f8f0; color: #618044; }
.stat-card > strong { display: block; margin-top: 10px; color: #20342e; font-size: 27px; font-weight: 600; line-height: 1; }
.stat-card > small { display: block; margin-top: 10px; color: #9aa39e; font-size: 10px; }
.stat-decoration { position: absolute; right: 12px; bottom: -16px; color: #f4f6f2; font-size: 72px; font-weight: 700; line-height: 1; }
.data-panel { border: 1px solid #f4f6f4; border-radius: var(--radius); background: var(--paper); }
.overview-panel { margin-top: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; }
.panel-heading h2 { margin: 0 0 5px; color: #273a33; font-size: 14px; font-weight: 600; }
.panel-heading p { margin: 0; color: #929b96; font-size: 10px; }
.text-button { border: 0; background: transparent; color: #537266; font-size: 11px; }
.text-button span { margin-left: 4px; font-size: 15px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { height: 37px; padding: 0 15px; background: #fcfcfb; color: #849089; font-size: 10px; font-weight: 500; }
td { height: 54px; padding: 8px 15px; border-top: 1px solid #f7f8f6; color: #4c5a54; font-size: 11px; }
tbody tr:hover { background: #fefefd; }
th:first-child, td:first-child { padding-left: 20px; }
.align-right { text-align: right; }
/* 操作列冻结在表格右侧（横向滚动时保持可见） */
th.align-right:last-child, td.align-right:last-child { position: sticky; right: 0; z-index: 1; box-shadow: -10px 0 12px -10px rgba(146, 154, 150, 0.25); }
td.align-right:last-child { background: #ffffff; }
tbody tr:hover td.align-right:last-child { background: #fefefd; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.result-count { color: #939d97; font-size: 10px; }
.user-cell, .product-cell { display: flex; align-items: center; gap: 9px; }
.product-thumb { width: 29px; height: 29px; display: grid; flex: none; place-items: center; border-radius: 7px; background: #f6faf6; color: #4d745e; font-size: 11px; }
.product-thumb { background: #fcf6f2; color: #b87353; }
.cell-main { display: grid; gap: 3px; }
.cell-main strong { color: #37463f; font-size: 11px; font-weight: 500; }
.cell-main small { color: #9aa39e; font-size: 9px; }
.money-text { color: #355b48; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; font-size: 9px; }
.status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-active, .status-completed { background: #f6faf5; color: #5c8655; }
.status-inactive, .status-cancelled { background: #f8f8f8; color: #8a928d; }
.status-pending { background: #fdf9f2; color: #b18536; }
.status-paid { background: #f4f8f7; color: #4d8170; }
.status-shipped { background: #f6f8fb; color: #6375a2; }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.action-button { min-height: 27px; padding: 0 7px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #63776c; font-size: 10px; }
.action-button:hover { border-color: #f2f5f2; background: #fafcfa; }
.action-button.danger { color: #ba6a5d; }
.action-button.danger:hover { border-color: #f8eeed; background: #fffcfa; }
.action-select { max-width: 95px; height: 27px; border: 1px solid #f2f4f2; border-radius: 4px; background: #ffffff; color: #5a6c61; font-size: 10px; }
.empty-row { height: 110px; color: #a1aaa4; text-align: center; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 18px; background: #88908fb0; animation: fade-in .16s ease; }
.modal-backdrop[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(480px, 100%); max-height: min(85vh, 700px); overflow: auto; padding: 24px; border: 1px solid #f4f6f4; border-radius: 9px; background: #ffffff; box-shadow: 0 20px 65px #88918e30; animation: modal-in .2s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.modal-heading .eyebrow { margin-bottom: 5px; }
.modal-heading h2 { margin: 0; color: #243a31; font-size: 19px; font-weight: 600; }
.icon-button { width: 29px; height: 29px; border: 1px solid #f4f6f4; border-radius: 5px; background: white; color: #718078; font-size: 20px; line-height: 1; }
.modal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: #586860; font-size: 11px; }
.field input, .field select, .text-input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #f0f3f0; border-radius: 5px; outline: 0; background: white; color: #243630; font-size: 12px; }
.field textarea { width: 100%; min-height: 72px; padding: 9px 10px; border: 1px solid #f0f3f0; border-radius: 5px; outline: 0; background: white; color: #243630; font-size: 12px; line-height: 1.6; resize: vertical; }
.field input:focus, .field select:focus, .text-input:focus { border-color: #c8d6ca; box-shadow: 0 0 0 3px #f2f6f2; }
.field textarea:focus { border-color: #c8d6ca; box-shadow: 0 0 0 3px #f2f6f2; }
.table-subline { display: block; margin-top: 4px; color: #929b96; font-size: 9px; }
.order-info-line { display: block; padding: 2px 0; color: #75817a; font-size: 10px; }
.form-hint { min-height: 16px; margin: 12px 0 0; color: #89968e; font-size: 10px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 15px; border-top: 1px solid #f6f8f6; }

/* ===== Drawer (商城选购抽屉) ===== */
.drawer-backdrop { position: fixed; inset: 0; z-index: 100; background: #88908fb0; animation: fade-in .18s ease; }
.drawer-backdrop[hidden] { display: none; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(440px, 92vw); background: #ffffff; box-shadow: -10px 0 45px #88918e30; display: flex; flex-direction: column; animation: drawer-in-right .28s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes drawer-in-right { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 14px; border-bottom: 1px solid #f6f8f6; flex-shrink: 0; }
.drawer-heading .eyebrow { margin-bottom: 5px; }
.drawer-heading h2 { margin: 0; color: #243a31; font-size: 19px; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.drawer-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.drawer-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 24px; border-top: 1px solid #f6f8f6; flex-shrink: 0; background: #fcfefc; }
.purchase-summary { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; background: #f8fbf8; border-radius: 7px; }
.purchase-summary span { color: #6b7a72; font-size: 11px; }
.purchase-summary strong { color: #2d5a3f; font-size: 20px; font-weight: 600; }
.purchase-summary small { margin-left: auto; color: #8a9790; font-size: 10px; }

/* 商品说明（drawer-body 底部） */
.product-intro { margin-top: 16px; padding: 14px 15px 13px; background: linear-gradient(180deg, #f8fcf8 0%, #f4faf6 100%); border: 1px solid #eef4ef; border-radius: 10px; }
.product-intro-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: #2d5a3f; font-size: 12px; font-weight: 600; letter-spacing: .3px; }
.product-intro-icon { width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; background: #96ac9f; color: #172622; font-size: 11px; font-style: normal; line-height: 1; }
.product-intro-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.product-intro-list li { position: relative; padding-left: 14px; color: #4a6355; font-size: 12px; line-height: 1.65; word-break: break-word; }
.product-intro-list li::before { content: ""; position: absolute; left: 3px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: #bfd8b4; box-shadow: 0 0 0 2px #ebf6cf; }
@media (max-width: 768px) {
  .product-intro { margin-top: 14px; padding: 12px 13px; }
  .product-intro-list li { font-size: 12.5px; }
  .drawer { top: auto; right: 0; bottom: 0; left: 0; width: 100%; height: min(86vh, 700px); border-radius: 18px 18px 0 0; animation: drawer-in-up .3s cubic-bezier(.4, 0, .2, 1) both; }
  @keyframes drawer-in-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .drawer-heading { padding: 18px 18px 12px; }
  .drawer-body { padding: 16px 18px; }
  .drawer-fields { grid-template-columns: 1fr; }
  .drawer-actions { padding: 12px 18px; }
}
.toast { position: fixed; right: 24px; bottom: 23px; z-index: 120; max-width: min(380px, calc(100vw - 32px)); padding: 11px 15px; border: 1px solid #f2f6f2; border-radius: 6px; background: #ffffff; color: #40564a; box-shadow: 0 8px 30px #8a9e9820; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #f8ecea; color: #aa554b; }

.login-page { min-height: 100vh; background: #fafaf8; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.login-main { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 48px max(50px, 8vw); }
.login-box { width: min(370px, 100%); margin: 0 auto; }
.login-box > .eyebrow { margin-bottom: 12px; color: #70877a; }
.login-box h2 { margin: 0 0 26px; color: #223b31; font-size: 25px; font-weight: 600; }
.field-label { display: block; margin-bottom: 8px; }
.password-label { margin-top: 19px; }
.text-input { height: 43px; }
.login-error { min-height: 15px; margin: 8px 0 7px; color: #b95049; font-size: 11px; }
.login-submit { width: 100%; height: 42px; justify-content: space-between; padding: 0 15px; }
.login-submit span { font-size: 17px; }

.shop-page { min-height: 100vh; background: #fafbf9; }
.shop-header { min-height: 76px; display: flex; align-items: center; gap: 42px; padding: 0 max(30px, calc((100vw - 1260px) / 2)); border-bottom: 1px solid #f3f6f2; background: #ffffff; }
.shop-brand { color: var(--forest); padding: 0; }
.shop-brand .brand-copy small { color: #83928a; }
.shop-nav { height: 76px; display: flex; align-items: stretch; gap: 25px; }
.shop-tab { position: relative; border: 0; background: transparent; color: #89948d; font-size: 12px; }
.shop-tab.active { color: #294b3e; }
.shop-tab.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: #b2c6b0; content: ""; }
.shop-account { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.shop-balance, .account-name { display: grid; gap: 3px; }
.shop-balance small, .account-name small { color: #9aa39e; font-size: 9px; }
.shop-balance strong { color: #355b48; font-size: 13px; }
.account-name strong { color: #41544a; font-size: 11px; font-weight: 500; }
.account-divider { width: 1px; height: 25px; background: #f4f6f4; }
.shop-account .button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.shop-logout { width: 29px; height: 29px; border: 1px solid #f3f6f3; border-radius: 5px; background: white; color: #63776c; font-size: 16px; }
.shop-content { width: min(1210px, calc(100% - 60px)); min-height: calc(100vh - 135px); margin: 0 auto; padding: 38px 0 54px; }
.shop-view { display: none; animation: rise-in .3s ease both; }
.shop-view.active { display: block; }
.shop-intro { min-height: 208px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 27px 43px; border-radius: 8px; background: #f4f8f4; }
.shop-intro::after { position: absolute; top: -118px; right: 115px; width: 325px; height: 325px; border: 1px solid #8b9e9a16; border-radius: 50%; content: ""; }
.shop-intro h1 { margin: 0 0 12px; color: #203d32; font-size: 31px; font-weight: 600; }
.shop-intro h1 span { color: #688260; }
.shop-intro > div:first-child > p:last-child { margin: 0; color: #78877c; font-size: 11px; }
.shop-intro-mark { position: relative; z-index: 1; color: #5e795e; font-size: 73px; font-weight: 600; line-height: 1; }
.shop-intro-mark span { display: block; margin-top: 9px; font-size: 9px; font-weight: 500; }
.shop-intro.compact { min-height: 155px; margin-bottom: 21px; }
.shop-intro-hero { padding: 0; }
.shop-intro-hero::after { display: none; }
.shop-intro-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.shop-section-title { display: flex; align-items: flex-end; justify-content: space-between; margin: 29px 0 14px; }
.shop-section-title h2 { margin: 0 0 5px; color: #293d33; font-size: 17px; font-weight: 600; }
.shop-section-title p { margin: 0; color: #929c95; font-size: 10px; }
.price-note { color: #89958d; font-size: 10px; }
.price-note strong { margin-left: 5px; color: #52724e; font-size: 12px; }
.shop-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.shop-product { overflow: hidden; border: 1px solid #f3f6f2; border-radius: 7px; background: white; animation: rise-in .35s ease both; animation-delay: calc(var(--card-index) * 55ms); }
.shop-product-art { height: 147px; position: relative; overflow: hidden; display: grid; place-items: center; background: #f3f6f2; color: #507159; }
.shop-product-art::before { position: absolute; right: -37px; bottom: -96px; width: 210px; height: 210px; border: 1px solid #a1b2a628; border-radius: 50%; content: ""; }
.shop-product-art::after { position: absolute; right: 33px; bottom: -72px; width: 160px; height: 160px; border: 1px solid #a1b2a620; border-radius: 50%; content: ""; }
.shop-product-art.art-1 { background: #f3f6f2; color: #9a6d4e; }
.shop-product-art.art-1::before, .shop-product-art.art-1::after { border-color: #c2ad9d22; }
.shop-product-art.art-2 { background: #f4f6f8; color: #607789; }
.shop-product-art.art-2::before, .shop-product-art.art-2::after { border-color: #a8b6c020; }
.art-category, .art-sku { position: absolute; z-index: 1; left: 17px; color: currentColor; font-size: 9px; }
.art-category { top: 15px; }
.art-sku { bottom: 15px; opacity: .8; }
.art-letter { position: relative; z-index: 1; display: grid; width: 69px; height: 69px; place-items: center; border: 1px solid currentColor; border-radius: 50% 50% 50% 8px; background: #ffffff60; font-size: 31px; }
.shop-product-copy { padding: 15px 16px 14px; }
.product-title-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-title-line h3 { overflow: hidden; margin: 0; color: #283b31; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.product-title-line > span { flex: none; color: #9aa39e; font-size: 9px; }
.product-description { min-height: 30px; margin: 9px 0 7px; color: #7e8981; font-size: 10px; line-height: 1.6; }
.product-remarks { min-height: 25px; margin: 0; padding: 6px 8px; border-radius: 4px; background: #fcfaf7; color: #9c8050; font-size: 9px; line-height: 1.5; }
.product-buy-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #f7f8f6; }
.product-buy-line > div { display: grid; gap: 4px; }
.product-buy-line strong { color: #365a45; font-size: 18px; font-weight: 600; }
.product-buy-line small { color: #9aa49c; font-size: 9px; }
.buy-button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.buy-button > span { font-size: 13px; }
.shop-empty { grid-column: 1 / -1; padding: 70px 20px; border: 1px dashed #eff3ef; border-radius: 7px; color: #909b93; text-align: center; font-size: 12px; }
.purchase-summary { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 5px; background: #f7faf6; color: #70816f; font-size: 11px; }
.purchase-summary strong { color: #3c6348; font-size: 18px; }
.purchase-summary small { margin-left: auto; color: #879689; font-size: 10px; }
.shop-catalog-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 29px; margin-top: 29px; }
.category-sidebar { align-self: start; padding: 2px 17px 0 0; border-right: 1px solid #f0f4f0; }
.category-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px 10px; color: #526459; font-size: 11px; font-weight: 600; }
.category-heading small { color: #a2ada4; font-size: 8px; font-weight: 500; }
.category-option { width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: #7e8b81; text-align: left; font-size: 10px; transition: background .16s, color .16s; }
.category-option strong { color: #a2aca4; font-size: 9px; font-weight: 500; }
.category-option:hover { background: #f6f8f5; color: #365444; }
.category-option.active { background: #f4f8f2; color: #31523d; font-weight: 600; }
.category-option.active strong { color: #587851; }
.catalog-main { min-width: 0; }
.shop-section-title { align-items: center; margin: 0 0 14px; }
.catalog-tools { display: flex; align-items: center; gap: 16px; }
.catalog-search { width: min(240px, 30vw); height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #f0f4f0; border-radius: 5px; background: #ffffff; color: #87948a; }
.catalog-search > span { font-size: 17px; }
.catalog-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #34493b; font-size: 10px; }
.catalog-search input::placeholder { color: #a4ada5; }
.shop-footer { display: flex; justify-content: flex-start; padding: 15px max(30px, calc((100vw - 1210px) / 2)); border-top: 1px solid #f2f5f2; color: #9aa49d; font-size: 9px; }


@media (max-width: 1050px) {
  .sidebar { width: 218px; }
  .main-area { margin-left: 218px; }
  .topbar { padding: 0 27px; }
  .content-wrap { padding: 31px 27px 22px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .sidebar { width: 248px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 10px 0 30px #8a969420; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask { display: block; position: fixed; inset: 0; z-index: 3; background: #88908f80; }
  .sidebar-mask[hidden] { display: none; }
  .main-area { margin-left: 0; }
  .topbar { height: 58px; justify-content: flex-start; gap: 13px; padding: 0 16px; }
  .mobile-menu { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #f2f4f2; border-radius: 6px; background: #ffffff; color: #496357; font-size: 17px; }
  .topbar-right { margin-left: auto; gap: 8px; }
  .today-label, .topbar-divider { display: none; }
  .content-wrap { padding: 25px 16px 20px; }
  .page-heading { align-items: flex-start; margin-bottom: 20px; }
  h1 { font-size: 25px; }
  .page-heading .button { flex: none; padding: 0 10px; min-height: 36px; font-size: 12px; }
  .stat-grid { gap: 9px; margin-bottom: 15px; }
  .stat-card { min-height: 132px; padding: 13px; }
  .stat-card > strong { font-size: 23px; }
  .stat-card > small { font-size: 10px; }
  .stat-top { font-size: 10px; }
  .stat-decoration { right: 6px; font-size: 57px; }
  .panel-heading { padding: 15px 13px 12px; }
  .panel-heading p { font-size: 11px; }
  th, td { padding-right: 11px; padding-left: 11px; }
  th { font-size: 11px; }
  td { height: 50px; font-size: 12px; }
  th:first-child, td:first-child { padding-left: 13px; }
  .cell-main strong { font-size: 12px; }
  .cell-main small { font-size: 10px; }
  .table-subline { font-size: 10px; }
  .order-info-line { font-size: 11px; }
  .status { font-size: 10px; padding: 4px 9px; }
  .action-button { min-height: 32px; padding: 0 9px; font-size: 11px; }
  .action-select { max-width: 110px; height: 32px; font-size: 11px; }
  .result-count { font-size: 11px; }
  /* 表单：加大字号，输入框 >=16px 防止 iOS 聚焦自动缩放 */
  .field label, .field-label { font-size: 12px; }
  .field input, .field select, .field textarea, .text-input { font-size: 16px; }
  .modal-heading h2 { font-size: 18px; }
  .form-hint { font-size: 11px; }
  .button { font-size: 13px; }
  .toast { right: 12px; left: 12px; bottom: 14px; max-width: none; text-align: center; }
  .login-main { min-height: auto; padding: 45px 24px 25px; }
  .shop-header { min-height: 65px; gap: 17px; padding: 0 15px; }
  .shop-nav { height: 65px; gap: 12px; }
  .shop-tab { font-size: 12px; }
  .shop-account { gap: 8px; }
  .account-divider { display: none; }
  .account-name { max-width: 92px; gap: 2px; }
  .account-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shop-account .button { padding: 0 9px; min-height: 32px; font-size: 11px; }
  .shop-content { width: calc(100% - 30px); padding: 19px 0 35px; }
  .shop-intro { min-height: 165px; padding: 23px; }
  .shop-intro-hero { padding: 0; }
  .shop-intro h1 { font-size: 25px; }
  .shop-intro-mark { font-size: 48px; }
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-product-art { height: 125px; }
  .shop-product-copy { padding: 12px; }
  .product-buy-line strong { font-size: 16px; }
  .shop-footer { padding: 13px 15px; }
  .shop-catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; margin-top: 20px; }
  .category-sidebar { min-width: 0; padding: 0 0 10px; border-right: 0; border-bottom: 1px solid #f0f4f0; }
  .category-heading { display: none; }
  #shop-categories { display: flex; gap: 5px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; }
  .category-option { width: auto; min-height: 34px; flex: 0 0 auto; justify-content: flex-start; margin: 0; padding: 0 12px; border-radius: 16px; white-space: nowrap; font-size: 11px; }
  .category-option strong { font-size: 10px; }
  .shop-catalog-layout > .category-sidebar > .category-option { width: auto; min-height: 34px; display: inline-flex; margin-bottom: 5px; border-radius: 16px; }
  .shop-section-title { gap: 10px; }
  .shop-section-title h2 { font-size: 16px; }
  .shop-section-title p { font-size: 11px; }
  .catalog-tools { flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
  .catalog-search { width: min(185px, 48vw); }
  .catalog-search input { font-size: 13px; }
}
/* 手机：商品卡片单列大卡片，表单单列 */
@media (max-width: 600px) {
  .modal { width: min(480px, 100%); }
  .modal-fields { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .shop-product-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .shop-product-art { height: 150px; }
  .art-letter { width: 62px; height: 62px; font-size: 27px; }
  .art-category, .art-sku { left: 15px; font-size: 10px; }
  .shop-product-copy { padding: 15px 16px 14px; }
  .product-title-line h3 { font-size: 15px; }
  .product-title-line > span { font-size: 10px; }
  .product-description { max-height: none; min-height: 30px; margin: 9px 0 7px; font-size: 11px; }
  .product-remarks { max-height: none; min-height: 25px; padding: 6px 8px; font-size: 10px; white-space: normal; }
  .product-buy-line { gap: 8px; margin-top: 12px; padding-top: 12px; }
  .product-buy-line strong { font-size: 20px; }
  .product-buy-line small { font-size: 10px; }
  .buy-button { min-height: 38px; padding: 0 14px; font-size: 12px; }
  .buy-button > span { font-size: 15px; }
}
@media (max-width: 420px) {
  .page-heading { gap: 8px; }
  .page-heading .button { min-height: 36px; font-size: 12px; }
  .heading-note { max-width: 235px; line-height: 1.6; font-size: 11px; }
  .stat-card { min-height: 124px; }
  .modal { padding: 20px 16px; }
  .shop-header { flex-wrap: wrap; gap: 0 15px; padding-top: 9px; }
  .shop-account { margin-left: auto; gap: 6px; }
  .account-name { max-width: 76px; }
  .account-name strong { font-size: 10px; }
  .account-name small { font-size: 8px; }
  .shop-account .button { display: none; }
  .shop-nav { height: 44px; order: 3; width: 100%; justify-content: center; }
  .shop-intro-mark { display: none; }
  .shop-intro h1 { font-size: 22px; }
  .shop-section-title { align-items: flex-start; }
}

/* 分站公告弹窗与授权横幅 */
.announce-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(139, 142, 140, 0.45); }
.announce-backdrop[hidden] { display: none; }
.announce-card { width: 100%; max-width: 420px; background: #ffffff; border: 1px solid #f0f2f1; border-top: 3px solid var(--forest-surface); padding: 26px 28px; box-shadow: 0 18px 48px rgba(139, 142, 140, 0.18); }
.qty-stepper { display: flex; align-items: stretch; gap: 6px; }
.qty-stepper input { flex: 1; min-width: 0; text-align: center; }
.qty-btn { width: 42px; flex-shrink: 0; border: 1px solid var(--line); background: #fafaf9; color: var(--forest); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 3px; }
.qty-btn:hover { background: #f4f6f2; }
.qty-btn:active { background: #eff4ed; }
.purchase-total { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 16px; padding: 15px 16px 15px 19px; border: 1px solid #eff4ec; border-left: 3px solid var(--forest-surface); border-radius: 4px; background: linear-gradient(135deg, #fcfcfa 0%, #f6f9f4 100%); box-shadow: 0 2px 12px rgba(139, 158, 154, 0.05); overflow: hidden; }
.purchase-total::after { content: ""; position: absolute; right: -26px; top: -30px; width: 86px; height: 86px; border-radius: 50%; background: rgba(139, 158, 154, 0.06); pointer-events: none; }
.purchase-total span { position: relative; z-index: 1; font-size: 12px; letter-spacing: .14em; color: #72857a; }
.purchase-total strong { position: relative; z-index: 1; font-size: 24px; font-weight: 600; line-height: 1.2; color: var(--forest); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
@media (max-width: 720px) { .purchase-total { padding: 13px 13px 13px 15px; } .purchase-total strong { font-size: 21px; } }
.form-error { margin: 0 0 12px; color: #b3261e; font-size: 13px; }
.form-pending { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; padding: 10px 12px; border: 1px dashed #e7f0e8; border-radius: 4px; background: #fafcfa; color: #2d5a3f; font-size: 12px; }
.form-pending[hidden] { display: none; }
.pending-spinner { width: 14px; height: 14px; flex-shrink: 0; border: 2px solid #e7f0e8; border-top-color: var(--forest-surface); border-radius: 50%; animation: pending-spin .8s linear infinite; }
@keyframes pending-spin { to { transform: rotate(360deg); } }
.button-primary.is-loading { opacity: .75; cursor: progress; }
.announce-head { display: flex; align-items: flex-start; gap: 14px; }
.announce-mark { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: var(--forest-surface); color: #172622; font-size: 18px; flex-shrink: 0; }
.announce-head h2 { margin: 2px 0 0; font-size: 18px; }
.announce-head .icon-button { margin-left: auto; }
.announce-body { margin: 18px 0 0; font-size: 14px; line-height: 1.9; color: #2b3733; white-space: pre-wrap; word-break: break-word; }
.announce-contact { margin-top: 18px; padding: 10px 14px; background: var(--forest-light); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.announce-contact span { padding: 1px 8px; border-radius: 4px; background: var(--forest-surface); color: #172622; font-size: 10px; flex-shrink: 0; }
.announce-contact strong { color: var(--forest); word-break: break-all; }
.announce-ok { width: 100%; margin-top: 22px; }
.shop-license-banner { padding: 10px max(30px, calc((100vw - 1210px) / 2)); background: #fef9f3; color: #a0662c; font-size: 12px; border-bottom: 1px solid #f9f0e4; }
.shop-license-banner.error { background: #fdf4f4; color: var(--red); border-color: #f8e8e6; }

/* 站点设置表单 */
.settings-form { padding: 18px 20px 22px; }
.settings-form .modal-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.settings-form .field.full { grid-column: 1 / -1; }
.settings-form .field label { display: block; margin-bottom: 6px; color: #68766f; font-size: 11px; }
.settings-form input, .settings-form textarea { width: 100%; padding: 9px 11px; border: 1px solid #eff2ef; border-radius: 6px; background: #fdfefd; font-size: 13px; color: var(--ink); }
.settings-form textarea { min-height: 74px; resize: vertical; }
.settings-form .modal-actions { justify-content: flex-end; padding: 14px 0 0; }

/* ===== 小屏补充（置于文件末尾保证覆盖优先级） ===== */
@media (max-width: 720px) {
  .shop-license-banner { padding: 10px 15px; font-size: 11px; }
  .settings-form { padding: 16px 14px 18px; }
  .settings-form input, .settings-form textarea { font-size: 16px; }
}
@media (max-width: 600px) {
  .settings-form .modal-fields { grid-template-columns: 1fr; }
  .settings-form .modal-actions .button { flex: 1; }
}

/* ===== 授权与余额卡片：任何宽度下一行排完，随屏宽等比缩小 ===== */
.stat-grid.stat-grid-license { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .stat-grid.stat-grid-license { gap: 8px; margin-bottom: 15px; }
  .stat-grid-license .stat-card { min-height: 88px; padding: 10px 12px; }
  .stat-grid-license .stat-top { font-size: 9px; }
  .stat-grid-license .stat-symbol { width: 20px; height: 20px; border-radius: 5px; font-size: 12px; }
  .stat-grid-license .stat-card > strong { margin-top: 7px; font-size: 16px; }
  .stat-grid-license .stat-card > small { margin-top: 6px; font-size: 8px; }
  .stat-grid-license .stat-decoration { right: 5px; bottom: -9px; font-size: 42px; }
}
@media (max-width: 420px) {
  .stat-grid.stat-grid-license { gap: 6px; }
  .stat-grid-license .stat-card { min-height: 74px; padding: 8px 10px; }
  .stat-grid-license .stat-card > strong { font-size: 13px; }
  .stat-grid-license .stat-card > small { font-size: 7px; }
  .stat-grid-license .stat-symbol { width: 17px; height: 17px; font-size: 10px; }
  .stat-grid-license .stat-decoration { font-size: 34px; bottom: -7px; }
}