/* ==========================================================================
   SOULMATE 门店 SaaS · 商家管理后台样式
   设计令牌：主色 #5C6B57 / 辅助 #B9C4A3 / 背景 #F6F6F4 / 文字 #2E2E2E / 弱化 #9A9A9A
   纯原生 CSS，无任何外部依赖。
   ========================================================================== */

/* ------------------------------- 1. 令牌 ------------------------------- */
:root {
  --primary: #5C6B57;
  --primary-dark: #46523F;
  --primary-light: #8A9A83;
  --accent: #B9C4A3;
  --accent-soft: #E7ECDD;
  --bg: #F6F6F4;
  --card: #FFFFFF;
  --text: #2E2E2E;
  --muted: #9A9A9A;
  --line: #ECECE8;
  --line-strong: #DFDFD9;
  --danger: #C0564F;
  --danger-soft: #FBEFEE;
  --warn: #C4832A;
  --warn-soft: #FDF5E7;
  --info: #4A6D8C;
  --info-soft: #EEF3F8;
  --ok: #4F7A54;
  --ok-soft: #EEF4EC;
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 16px;
  --radius-xl: 22px;
  --shadow-s: 0 1px 2px rgba(46, 46, 46, .05);
  --shadow: 0 6px 22px rgba(46, 46, 46, .06);
  --shadow-l: 0 18px 50px rgba(46, 46, 46, .14);
  --sidebar-w: 228px;
  --topbar-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

/* ------------------------------- 2. 基础 ------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, p, figure { margin: 0; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D8D8D2; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #C3C3BC; background-clip: content-box; }

.app-root { min-height: 100vh; }

/* 启动占位 */
.boot-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 12px; }
.boot-logo { font-size: 22px; letter-spacing: .28em; font-weight: 700; color: var(--primary); }
.boot-text { color: var(--muted); font-size: 13px; }

/* ------------------------------- 3. 通用工具类 ------------------------------- */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-gap { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.pos { color: var(--ok); }
.neg { color: var(--danger); }

/* ------------------------------- 4. 登录页 ------------------------------- */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  background: var(--bg);
}
.login-aside {
  position: relative; overflow: hidden; padding: 56px 60px; display: flex; flex-direction: column;
  justify-content: space-between; color: #fff;
  background:
    radial-gradient(1100px 520px at -10% 8%, rgba(185, 196, 163, .34), transparent 62%),
    radial-gradient(760px 460px at 108% 96%, rgba(185, 196, 163, .22), transparent 60%),
    linear-gradient(150deg, #5C6B57 0%, #46523F 58%, #333C2E 100%);
}
.login-aside::after {
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 0 0 46px rgba(255, 255, 255, .04), 0 0 0 110px rgba(255, 255, 255, .03);
}
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand__mark {
  width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .16);
  display: grid; place-items: center; font-weight: 700; letter-spacing: .04em;
  border: 1px solid rgba(255, 255, 255, .22);
}
.login-brand__name { font-size: 17px; font-weight: 700; letter-spacing: .1em; }
.login-brand__sub { font-size: 12px; opacity: .72; letter-spacing: .18em; }
.login-hero { position: relative; z-index: 1; max-width: 460px; margin: 40px 0; }
.login-hero h1 { font-size: 34px; line-height: 1.32; font-weight: 700; letter-spacing: .01em; }
.login-hero p { margin-top: 16px; font-size: 14px; line-height: 1.9; opacity: .8; }
.login-hero__tags { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.login-hero__tags span {
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
}
.login-foot { font-size: 12px; opacity: .6; position: relative; z-index: 1; }

.login-main { display: grid; place-items: center; padding: 40px 24px; }
.login-card {
  width: 100%; max-width: 388px; background: var(--card); border-radius: var(--radius-xl);
  padding: 38px 34px 30px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.login-card h2 { font-size: 21px; font-weight: 700; }
.login-card__sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.login-form { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.login-demo {
  margin-top: 22px; padding: 14px 16px; border-radius: var(--radius); background: #FAFAF7;
  border: 1px dashed var(--line-strong);
}
.login-demo__title { font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: .04em; }
.login-demo__item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-s); background: #fff; border: 1px solid var(--line);
  font-size: 12.5px; cursor: pointer; transition: border-color .16s, background .16s;
}
.login-demo__item + .login-demo__item { margin-top: 6px; }
.login-demo__item:hover { border-color: var(--accent); background: var(--accent-soft); }
.login-demo__item b { font-family: var(--mono); font-weight: 600; }

/* ------------------------------- 5. 后台框架 ------------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); position: sticky; top: 0; height: 100vh;
  background: linear-gradient(185deg, #3F4A39 0%, #333C2E 100%); color: #E9EDE4;
  display: flex; flex-direction: column; z-index: 30;
}
.sidebar__brand { padding: 20px 20px 18px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.sidebar__mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 36px;
  background: rgba(185, 196, 163, .2); border: 1px solid rgba(185, 196, 163, .3);
  font-weight: 700; font-size: 15px; color: #DCE5D0;
}
.sidebar__name { font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.sidebar__sub { font-size: 11px; color: rgba(233, 237, 228, .5); letter-spacing: .14em; }
.sidebar__tenant {
  margin: 14px 14px 6px; padding: 11px 12px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07);
}
.sidebar__tenant-name { font-size: 13px; font-weight: 600; }
.sidebar__tenant-meta { font-size: 11px; color: rgba(233, 237, 228, .55); margin-top: 3px; }
.sidebar__nav { flex: 1 1 auto; overflow-y: auto; padding: 10px 12px 20px; }
.sidebar__group { font-size: 11px; color: rgba(233, 237, 228, .42); padding: 14px 10px 6px; letter-spacing: .1em; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  color: rgba(240, 244, 235, .82); font-size: 13.5px; cursor: pointer; user-select: none;
  transition: background .15s, color .15s; margin-bottom: 2px; border: 0; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.is-active { background: var(--accent); color: #2E3528; font-weight: 600; }
.nav-item.is-active .nav-item__icon { opacity: 1; }
.nav-item__icon { width: 18px; height: 18px; flex: 0 0 18px; opacity: .82; }
.nav-item__badge {
  margin-left: auto; font-size: 11px; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 999px;
  background: #C0564F; color: #fff; display: grid; place-items: center; font-weight: 600;
}
.nav-item.is-active .nav-item__badge { background: #8C3B34; }
.sidebar__foot { padding: 12px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 11px; color: rgba(233, 237, 228, .45); }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h); position: sticky; top: 0; z-index: 20;
  background: rgba(246, 246, 244, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 22px;
}
.topbar__toggle { display: none; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); min-width: 0; }
.breadcrumb b { color: var(--text); font-weight: 600; font-size: 15px; }
.breadcrumb__sep { opacity: .5; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.account {
  display: flex; align-items: center; gap: 9px; padding: 6px 10px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; user-select: none; transition: border-color .15s, box-shadow .15s;
}
.account:hover { border-color: var(--accent); box-shadow: var(--shadow-s); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 30px;
  background: var(--accent); color: #3B4533; font-weight: 600; font-size: 13px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 46px; height: 46px; flex-basis: 46px; font-size: 17px; }
.account__name { font-size: 13px; font-weight: 600; line-height: 1.25; }
.account__role { font-size: 11px; color: var(--muted); line-height: 1.25; }
.menu-pop {
  position: absolute; right: 22px; top: calc(var(--topbar-h) - 6px); z-index: 60; min-width: 232px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-l); padding: 6px;
}
.menu-pop__head { padding: 11px 12px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.menu-pop__item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border: 0; background: none;
  border-radius: 9px; font-size: 13px; text-align: left; color: var(--text);
}
.menu-pop__item:hover { background: var(--bg); }
.menu-pop__sep { height: 1px; background: var(--line); margin: 5px 0; }

.content { padding: 22px 22px 60px; flex: 1 1 auto; min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 20px; font-weight: 700; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.page-head__actions { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* ------------------------------- 6. 卡片 / 面板 ------------------------------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 18px; box-shadow: var(--shadow-s);
}
.card--flat { box-shadow: none; }
.card--pad0 { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card__head h3 { font-size: 14.5px; font-weight: 600; }
.card__head .grow { min-width: 0; }
.card__sub { font-size: 12px; color: var(--muted); }
.grid { display: grid; gap: 14px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(208px, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--dash { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.grid--goods { grid-template-columns: 260px minmax(0, 1fr); }

/* 指标卡 */
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 16px 18px; box-shadow: var(--shadow-s); position: relative; overflow: hidden;
}
.stat__label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat__value { font-size: 25px; font-weight: 700; margin-top: 8px; letter-spacing: -.01em; }
.stat__value small { font-size: 14px; font-weight: 600; margin-left: 2px; color: var(--muted); }
.stat__foot { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat__icon {
  position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--primary);
}
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; padding: 1px 7px; border-radius: 999px; }
.delta--up { color: var(--ok); background: var(--ok-soft); }
.delta--down { color: var(--danger); background: var(--danger-soft); }
.delta--flat { color: var(--muted); background: #F2F2EE; }

/* ------------------------------- 7. 按钮 ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s, box-shadow .15s;
}
.btn:hover { background: #FAFAF7; border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--primary); }
.btn--ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: #A8483F; border-color: #A8483F; }
.btn--danger-ghost { color: var(--danger); border-color: #EFD5D3; background: #fff; }
.btn--danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn--lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--icon { width: 30px; height: 30px; padding: 0; border-radius: 8px; }
.btn--link { border: 0; background: none; padding: 0 2px; height: auto; color: var(--primary); font-size: 12.5px; }
.btn--link:hover { background: none; text-decoration: underline; }
.btn--link.danger { color: var(--danger); }
.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ------------------------------- 8. 表单 ------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 12.5px; color: #6B6B66; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.field__label .req { color: var(--danger); }
.field__hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #fff; transition: border-color .15s, box-shadow .15s; outline: none; font-size: 13px;
}
.textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(185, 196, 163, .3); }
.input:disabled, .select:disabled, .textarea:disabled { background: #F5F5F2; color: var(--muted); cursor: not-allowed; }
.select {
  appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%239A9A9A' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group .input-group__suffix {
  display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--line-strong); border-left: 0;
  border-radius: 0 10px 10px 0; background: #FAFAF7; color: var(--muted); font-size: 12.5px; white-space: nowrap;
}
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--1 { grid-template-columns: minmax(0, 1fr); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.checkbox { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; user-select: none; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 40px; height: 22px; border-radius: 999px; background: #DCDCD6; flex: 0 0 40px;
  transition: background .18s; position: relative;
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .18s;
}
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:disabled + .switch__track { opacity: .5; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.switch-row:last-child { border-bottom: 0; }
.switch-row__main { min-width: 0; }
.switch-row__title { font-size: 13px; font-weight: 500; }
.switch-row__desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.6; }
.color-input { display: flex; align-items: center; gap: 8px; }
.color-input input[type="color"] {
  width: 38px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; cursor: pointer;
}
.color-input .input { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; }
.image-input { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.image-input .input { flex: 1 1 150px; min-width: 120px; }
.image-thumb {
  width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line-strong); background: #FAFAF7;
  object-fit: cover; flex: 0 0 40px;
}
.image-thumb--empty { display: grid; place-items: center; color: var(--muted); font-size: 11px; }

/* ------------------------------- 9. 标签页 / 徽标 ------------------------------- */
.tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab {
  position: relative; padding: 9px 13px; border: 0; background: none; font-size: 13.5px; color: #6B6B66;
  border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.tab__count {
  font-size: 11px; min-width: 19px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: #F0F0EC; color: #6B6B66; display: grid; place-items: center; font-weight: 600;
}
.tab.is-active .tab__count { background: var(--accent-soft); color: var(--primary); }
.pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 9px;
  border-radius: 999px; background: #F2F2EE; color: #6B6B66; font-weight: 500; white-space: nowrap;
}
.pill--on { background: var(--ok-soft); color: var(--ok); }
.pill--off { background: #F2F2EE; color: var(--muted); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--danger { background: var(--danger-soft); color: var(--danger); }
.pill--info { background: var(--info-soft); color: var(--info); }
.pill--accent { background: var(--accent-soft); color: var(--primary); }
.pill--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-chip {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 6px;
  background: var(--accent-soft); color: var(--primary); margin-right: 4px;
}
.notice-bar {
  display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--warn-soft); border: 1px solid #F2E2C4; color: #8A6420; font-size: 13px; margin-bottom: 14px;
}
.notice-bar--info { background: var(--info-soft); border-color: #DCE7F1; color: var(--info); }
.notice-bar--ok { background: var(--ok-soft); border-color: #DDE9DA; color: var(--ok); }
.notice-bar--danger { background: var(--danger-soft); border-color: #F1D9D7; color: var(--danger); }
.notice-bar__icon { flex: 0 0 auto; display: grid; place-items: center; }
.notice-bar .grow { min-width: 0; }

/* ------------------------------- 10. 表格 ------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; font-size: 13px; }
table.tbl--wide { min-width: 980px; }
table.tbl th {
  text-align: left; font-weight: 600; font-size: 12.5px; color: #6B6B66; background: #FAFAF7;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #FBFBF8; }
table.tbl tr.is-clickable { cursor: pointer; }
table.tbl .cell-thumb {
  width: 42px; height: 42px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); background: #FAFAF7;
}
table.tbl .cell-thumb--ph {
  display: grid; place-items: center; color: var(--muted); font-size: 15px; font-weight: 600;
}
table.tbl .nowrap { white-space: nowrap; }
.table-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager__info { font-size: 12.5px; color: var(--muted); }
.pager__pages { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.pager__btn {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 12.5px; display: grid; place-items: center;
}
.pager__btn:hover:not(:disabled) { border-color: var(--accent); background: #FAFAF7; }
.pager__btn.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager__btn:disabled { opacity: .45; cursor: not-allowed; }

/* ------------------------------- 11. 状态与空态 ------------------------------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 46px 20px; color: var(--muted); text-align: center; }
.empty__icon { width: 56px; height: 56px; border-radius: 50%; background: #F2F2EE; display: grid; place-items: center; color: #C4C4BB; }
.empty__title { font-size: 13.5px; color: #6B6B66; }
.empty__desc { font-size: 12px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 46px 20px; color: var(--muted); font-size: 13px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong);
  border-top-color: var(--primary); animation: spin .7s linear infinite;
}
.spinner--light { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #F1F1ED 25%, #F7F7F4 37%, #F1F1ED 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ------------------------------- 12. Toast ------------------------------- */
.toast-host { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 12px; background: #333C2E; color: #fff;
  font-size: 13px; box-shadow: var(--shadow-l); max-width: min(92vw, 460px); animation: toastIn .22s ease;
}
.toast--error { background: #8C3B34; }
.toast--success { background: #3F5D42; }
.toast--warn { background: #8A6420; }
.toast__icon { flex: 0 0 16px; display: grid; place-items: center; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.toast.is-out { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }

/* ------------------------------- 13. 浮层：抽屉 / 弹窗 ------------------------------- */
.overlay-host { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.overlay { position: fixed; inset: 0; background: rgba(38, 42, 34, .42); opacity: 0; transition: opacity .2s; }
.overlay.is-in { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 480px; max-width: 94vw; background: #fff;
  box-shadow: var(--shadow-l); display: flex; flex-direction: column; transform: translateX(102%); transition: transform .26s cubic-bezier(.22, .61, .36, 1);
}
.drawer.is-in { transform: none; }
.drawer--wide { width: 620px; }
.drawer__head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer__title { font-size: 15.5px; font-weight: 600; }
.drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 16px 18px 22px; }
.drawer__foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; justify-content: flex-end; background: #FCFCFA; flex-wrap: wrap; }
.modal-wrap { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.modal {
  width: 100%; max-width: 560px; background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-l);
  display: flex; flex-direction: column; max-height: calc(100vh - 60px); transform: translateY(10px) scale(.99); opacity: 0;
  transition: transform .2s, opacity .2s; margin: auto;
}
.overlay.is-in .modal { transform: none; opacity: 1; }
.modal--sm { max-width: 420px; }
.modal--lg { max-width: 720px; }
.modal--xl { max-width: 940px; }
.modal__head { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.modal__title { font-size: 15.5px; font-weight: 600; }
.modal__body { padding: 18px 20px; overflow-y: auto; flex: 1 1 auto; }
.modal__foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 8px; background: #FCFCFA; border-radius: 0 0 var(--radius-l) var(--radius-l); flex-wrap: wrap; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; display: grid; place-items: center;
  color: var(--muted); margin-left: auto;
}
.icon-btn:hover { background: #F2F2EE; color: var(--text); }
.detail-list { display: grid; gap: 9px; }
.detail-row { display: flex; gap: 12px; font-size: 13px; align-items: flex-start; }
.detail-row__label { flex: 0 0 84px; color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.detail-row__value { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.section-title { font-size: 13px; font-weight: 600; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--primary-light); }
.section-title:first-child { margin-top: 0; }
.receipt {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-all;
  background: #FCFCF9; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 18px;
  color: #3A3A36; max-height: 62vh; overflow: auto;
}

/* ------------------------------- 14. 迷你列表 / 图表 ------------------------------- */
.rank-list { display: flex; flex-direction: column; gap: 9px; }
.rank-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.rank-item__no {
  width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; font-size: 11.5px;
  font-weight: 700; background: #F2F2EE; color: #7A7A74; flex: 0 0 20px;
}
.rank-item:nth-child(1) .rank-item__no { background: var(--primary); color: #fff; }
.rank-item:nth-child(2) .rank-item__no { background: var(--primary-light); color: #fff; }
.rank-item:nth-child(3) .rank-item__no { background: var(--accent); color: #3B4533; }
.rank-item__name { flex: 1 1 auto; min-width: 0; }
.rank-item__val { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 168px; padding: 8px 2px 0; }
.bar-chart__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar-chart__bar-wrap { width: 100%; flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; }
.bar-chart__bar {
  width: min(38px, 76%); border-radius: 8px 8px 4px 4px; min-height: 3px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  transition: height .35s ease; position: relative;
}
.bar-chart__bar--accent { background: linear-gradient(180deg, var(--accent), var(--primary-light)); }
.bar-chart__bar:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: #333C2E; color: #fff; font-size: 11.5px; padding: 4px 8px; border-radius: 7px; white-space: nowrap; z-index: 5;
}
.bar-chart__label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.bar-chart--tall { height: 220px; }
.bar-chart--hours .bar-chart__bar { width: min(18px, 70%); }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #6B6B66; }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__dot { width: 9px; height: 9px; border-radius: 3px; }
.stack-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #F2F2EE; margin: 12px 0 10px; }
.stack-bar__seg { height: 100%; transition: width .35s; }
.dist-list { display: flex; flex-direction: column; gap: 11px; }
.dist-item__top { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.dist-item__track { height: 7px; border-radius: 999px; background: #F2F2EE; overflow: hidden; }
.dist-item__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .35s; }

/* ------------------------------- 15. 装修编辑器 ------------------------------- */
.decorate-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: 12px 16px; box-shadow: var(--shadow-s);
}
.decorate-top__title { font-size: 15px; font-weight: 600; }
.editor { display: grid; grid-template-columns: 268px minmax(320px, 1fr) 386px; gap: 14px; align-items: start; }
.editor__col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-s); overflow: hidden; }
.panel__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel__head h3 { font-size: 13.5px; font-weight: 600; }
.panel__head .muted { font-size: 11.5px; }
.panel__body { padding: 14px; }
.panel__body--scroll { max-height: 420px; overflow-y: auto; }

.lib-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lib-item {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 11px 6px 9px;
  display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
}
.lib-item:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.lib-item__icon { color: var(--primary); height: 22px; display: grid; place-items: center; }
.lib-item__name { font-size: 11.5px; color: #6B6B66; text-align: center; line-height: 1.3; }

.struct-list { display: flex; flex-direction: column; gap: 5px; }
.struct-item {
  display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; transition: border-color .15s, background .15s;
}
.struct-item:hover { border-color: var(--accent); }
.struct-item.is-active { border-color: var(--primary); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(92, 107, 87, .1); }
.struct-item.is-dragging { opacity: .4; }
.struct-item.is-over { border-color: var(--primary); border-style: dashed; }
.struct-item__handle { color: #C4C4BB; cursor: grab; flex: 0 0 14px; display: grid; place-items: center; }
.struct-item__handle:active { cursor: grabbing; }
.struct-item__icon { flex: 0 0 16px; color: var(--primary-light); display: grid; place-items: center; }
.struct-item__name { flex: 1 1 auto; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.struct-item__ops { display: flex; align-items: center; gap: 1px; opacity: 0; transition: opacity .15s; }
.struct-item:hover .struct-item__ops, .struct-item.is-active .struct-item__ops { opacity: 1; }
.struct-op {
  width: 21px; height: 21px; border-radius: 6px; border: 0; background: none; display: grid; place-items: center;
  color: #8A8A83; padding: 0;
}
.struct-op:hover { background: #fff; color: var(--primary); box-shadow: var(--shadow-s); }
.struct-op.danger:hover { color: var(--danger); }
.sub-list { display: flex; flex-direction: column; gap: 10px; }
.sub-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 11px; background: #FCFCFA; }
.sub-item__head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.sub-item__title { font-size: 12.5px; font-weight: 600; }
.theme-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 9px; }
.theme-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.theme-card:hover { border-color: var(--accent); box-shadow: var(--shadow-s); }
.theme-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(92, 107, 87, .12); }
.theme-card__swatches { display: flex; gap: 5px; margin-bottom: 7px; }
.theme-card__swatch { width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(0, 0, 0, .06); }
.theme-card__name { font-size: 12px; color: #6B6B66; }

/* 手机预览 */
.phone-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone {
  width: 340px; max-width: 100%; height: 668px; border-radius: 38px; background: #1F241C; padding: 9px;
  box-shadow: 0 20px 46px rgba(46, 46, 46, .22); flex: 0 0 auto; position: relative;
}
.phone__screen {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: var(--pv-page, #F6F6F4); position: relative;
  display: flex; flex-direction: column;
}
.phone__status {
  height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; font-size: 11px; color: #2E2E2E; background: #fff; font-weight: 600;
}
.phone__notch {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 92px; height: 20px;
  background: #1F241C; border-radius: 0 0 14px 14px; z-index: 4;
}
.phone__scroll { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding-bottom: 8px; }
.phone__scroll::-webkit-scrollbar { width: 0; }
.phone__tabbar {
  flex: 0 0 54px; height: 54px; background: #fff; border-top: 1px solid #EFEFEC; display: flex; align-items: center;
  padding-bottom: 2px;
}
.phone__tab { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #9A9A9A; font-size: 10px; }
.phone__tab.is-active { color: var(--pv-primary, #5C6B57); }
.phone__label { font-size: 11.5px; color: var(--muted); }

/* 预览内部（还原小程序首页） */
.pv { font-size: 12px; color: var(--pv-text, #2E2E2E); }
.pv-section + .pv-section { margin-top: 10px; }
.pv-header { background: var(--pv-bg, #FFFFFF); padding: 14px 16px 12px; }
.pv-header--left { text-align: left; }
.pv-header--center { text-align: center; }
.pv-header__brand { display: flex; align-items: center; gap: 9px; justify-content: center; }
.pv-header--left .pv-header__brand { justify-content: flex-start; }
.pv-header__logo { width: 34px; height: 34px; border-radius: 11px; object-fit: cover; background: #F0F2EA; }
.pv-header__name { font-size: 17px; font-weight: 700; letter-spacing: .04em; }
.pv-header__en { font-size: 10px; letter-spacing: .28em; color: var(--pv-muted, #9A9A9A); margin-top: 1px; text-transform: uppercase; }
.pv-member-bar {
  margin-top: 12px; background: linear-gradient(100deg, var(--pv-primary), var(--pv-primary-dark, #46523F));
  border-radius: calc(var(--pv-radius, 16px) - 4px); padding: 10px 12px; display: flex; align-items: center; gap: 10px; color: #fff;
}
.pv-member-bar__text { font-size: 12px; font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-member-bar__btn { background: var(--pv-accent, #B9C4A3); color: #333C2E; border-radius: 999px; padding: 4px 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pv-nav { display: grid; gap: 8px; padding: 0 12px; }
.pv-nav__item {
  background: var(--pv-accent, #B9C4A3); border-radius: var(--pv-radius, 16px); padding: 12px 6px 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.pv-nav__icon { width: 26px; height: 26px; color: #3B4533; }
.pv-nav__label { font-size: 12px; font-weight: 600; color: #333C2E; }
.pv-nav__sub { font-size: 9px; letter-spacing: .1em; color: rgba(51, 60, 46, .6); }
.pv-notice {
  margin: 0 12px; background: #F5F6F1; border-radius: 999px; padding: 7px 12px; display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: #4A5540;
}
.pv-notice__icon { flex: 0 0 14px; color: var(--pv-primary); }
.pv-notice__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-notice--scroll .pv-notice__text { animation: pvScroll 9s linear infinite; }
@keyframes pvScroll { 0% { transform: translateX(14%); } 100% { transform: translateX(-14%); } }
.pv-notice__close { color: #A9B0A2; font-size: 12px; flex: 0 0 auto; }
.pv-coupon {
  margin: 0 12px; background: linear-gradient(112deg, var(--pv-primary), var(--pv-primary-dark, #46523F));
  border-radius: var(--pv-radius, 16px); padding: 13px 14px; display: flex; align-items: center; gap: 12px; color: #fff; position: relative; overflow: hidden;
}
.pv-coupon__left { flex: 1 1 auto; min-width: 0; }
.pv-coupon__title { font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.pv-coupon__sub { font-size: 10.5px; color: rgba(255, 255, 255, .78); margin-top: 3px; }
.pv-coupon__btn {
  display: inline-block; margin-top: 9px; background: var(--pv-accent, #B9C4A3); color: #333C2E;
  border-radius: 999px; padding: 4px 13px; font-size: 11px; font-weight: 600;
}
.pv-coupon__ticket { flex: 0 0 84px; height: 56px; border-radius: 8px; border: 1px dashed rgba(255, 255, 255, .55); position: relative; }
.pv-coupon__ticket::before, .pv-coupon__ticket::after {
  content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--pv-page, #F6F6F4);
  top: 50%; transform: translateY(-50%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .03);
}
.pv-coupon__ticket::before { left: -7px; }
.pv-coupon__ticket::after { right: -7px; }
.pv-coupon__ticket-inner { position: absolute; inset: 6px; border-radius: 5px; background: rgba(255, 255, 255, .1); }
.pv-banner {
  margin: 0 12px; border-radius: var(--pv-radius, 16px); overflow: hidden; position: relative; display: flex; flex-direction: column;
  justify-content: center; padding: 16px 18px; color: #fff;
}
.pv-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-banner__mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .18); }
.pv-banner__title { position: relative; font-size: 21px; font-weight: 700; letter-spacing: .1em; }
.pv-banner__sub { position: relative; font-size: 11.5px; margin-top: 5px; opacity: .9; letter-spacing: .06em; }
.pv-title-bar { margin: 0 12px; display: flex; align-items: flex-end; gap: 8px; }
.pv-title-bar__title { font-size: 14px; font-weight: 700; }
.pv-title-bar__sub { font-size: 10.5px; color: var(--pv-muted, #9A9A9A); }
.pv-title-bar__more { margin-left: auto; font-size: 11px; color: var(--pv-primary); }
.pv-rich { margin: 0 12px; font-size: 12px; line-height: 1.8; color: var(--pv-text, #4A4A46); background: var(--pv-bg, #FFFFFF); border-radius: 12px; padding: 12px; white-space: pre-wrap; }
.pv-goods { padding: 0 12px; display: grid; gap: 9px; }
.pv-goods--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pv-cat { display: flex; gap: 6px; padding: 0 12px 9px; overflow: hidden; }
.pv-cat__tab { font-size: 11px; padding: 4px 10px; border-radius: 999px; background: #fff; color: #8A8A83; border: 1px solid #EFEFEC; white-space: nowrap; }
.pv-cat__tab.is-active { background: var(--pv-primary); color: #fff; border-color: var(--pv-primary); font-weight: 600; }
.pv-goods-item { background: var(--pv-bg, #FFFFFF); border-radius: calc(var(--pv-radius, 16px) - 4px); padding: 9px; display: flex; gap: 9px; }
.pv-goods--grid .pv-goods-item { flex-direction: column; }
.pv-goods__thumb {
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: 10px; background: #F1F3EC; display: grid; place-items: center;
  color: var(--pv-primary); font-size: 19px; font-weight: 700; overflow: hidden;
}
.pv-goods--grid .pv-goods__thumb { width: 100%; height: 84px; flex-basis: 84px; }
.pv-goods__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pv-goods__main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.pv-goods__name { font-size: 12.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pv-goods__sub { font-size: 10px; color: var(--pv-muted, #9A9A9A); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-goods__tags { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.pv-goods__tag { font-size: 9px; padding: 1px 5px; border-radius: 4px; background: #F1F3EC; color: var(--pv-primary); }
.pv-goods__bottom { margin-top: auto; display: flex; align-items: center; gap: 6px; padding-top: 5px; }
.pv-goods__price { color: var(--pv-primary); font-weight: 700; font-size: 13px; }
.pv-goods__price small { font-size: 10px; }
.pv-goods__origin { font-size: 10px; color: #B5B5AE; text-decoration: line-through; }
.pv-goods__sales { margin-left: auto; font-size: 9.5px; color: var(--pv-muted, #A9A9A2); }
.pv-spacer { background: #F6F6F4; }
.pv-empty { margin: 0 12px; padding: 26px; text-align: center; color: var(--pv-muted, #B0B0A8); font-size: 11.5px; background: var(--pv-bg, #FFFFFF); border-radius: 12px; }

/* --- 搜索框（零售型行业） --- */
.pv-search {
  margin: 0 12px; height: 34px; border-radius: 999px; background: #F2F2EE; display: flex; align-items: center;
  gap: 7px; padding: 0 6px 0 12px;
}
.pv-search__icon { flex: 0 0 14px; color: #A2A29A; display: grid; place-items: center; }
.pv-search__ph { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: #A2A29A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-search__btn {
  flex: 0 0 auto; background: var(--pv-primary); color: #fff; border-radius: 999px; padding: 5px 13px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}

/* --- 分类宫格（零售/生鲜型行业） --- */
.pv-catgrid { margin: 0 12px; background: var(--pv-bg, #FFFFFF); border-radius: calc(var(--pv-radius, 16px) - 4px); padding: 12px 8px 6px; }
.pv-catgrid__title { font-size: 13px; font-weight: 700; padding: 0 6px 10px; }
.pv-catgrid__grid { display: grid; gap: 12px 4px; }
.pv-catgrid__item { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.pv-catgrid__icon {
  width: 38px; height: 38px; border-radius: 13px; background: var(--pv-page, #F6F6F4); display: grid; place-items: center;
  font-size: 19px; line-height: 1; color: var(--pv-primary); font-weight: 700;
}
.pv-catgrid__name {
  font-size: 10.5px; color: var(--pv-text, #4A4A46); max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* --- 服务项目（服务型行业） --- */
.pv-service { padding: 0 12px; }
.pv-service__title { font-size: 13.5px; font-weight: 700; margin-bottom: 9px; }
.pv-service__list { display: flex; flex-direction: column; gap: 9px; }
.pv-service-item {
  background: var(--pv-bg, #FFFFFF); border-radius: calc(var(--pv-radius, 16px) - 4px); padding: 11px 12px;
  display: flex; align-items: center; gap: 10px;
}
.pv-service-item__main { flex: 1 1 auto; min-width: 0; }
.pv-service-item__name { font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.pv-service-item__sub { font-size: 10px; color: var(--pv-muted, #9A9A9A); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-service-item__meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.pv-service-item__price { color: var(--pv-primary); font-weight: 700; font-size: 13px; }
.pv-service-item__price small { font-size: 10px; }
.pv-service-item__unit { font-size: 10px; font-weight: 500; color: var(--pv-muted, #9A9A9A); margin-left: 2px; }
.pv-service-item__dur { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: var(--pv-muted, #9A9A9A); }
.pv-service-item__dur b { font-weight: 500; }
.pv-service-item__btn {
  flex: 0 0 auto; background: var(--pv-primary); color: #fff; border-radius: 999px; padding: 6px 13px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}

/* ------------------------------- 16. 行业与模板 ------------------------------- */
.industry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; }
.industry-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l);
  overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.industry-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.industry-card.is-current { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(92, 107, 87, .14); }
.industry-card.is-dim { cursor: not-allowed; opacity: .62; }
.industry-card.is-dim:hover { transform: none; box-shadow: none; border-color: var(--line); }
.industry-card__bar { height: 5px; flex: 0 0 5px; }
.industry-card__body { padding: 12px 13px 13px; display: flex; flex-direction: column; flex: 1 1 auto; }
.industry-card__top { display: flex; align-items: center; gap: 8px; }
.industry-card__emoji { font-size: 21px; line-height: 1; flex: 0 0 auto; }
.industry-card__name { font-size: 13.5px; font-weight: 600; flex: 1 1 auto; min-width: 0; }
.industry-card__desc { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: 7px; min-height: 36px; }
.industry-card__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.industry-card__themes { display: flex; gap: 4px; margin-left: auto; }
.industry-card__dot { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .07); }
.industry-card__foot { margin-top: 11px; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--primary); font-weight: 600; }

/* 当前行业概览卡 */
.industry-hero { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.industry-hero__emoji {
  width: 54px; height: 54px; flex: 0 0 54px; border-radius: 17px; display: grid; place-items: center;
  font-size: 27px; line-height: 1; background: var(--accent-soft);
}
.industry-hero__main { flex: 1 1 260px; min-width: 0; }
.industry-hero__name { font-size: 17px; font-weight: 700; }
.industry-hero__desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.term-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; background: #F4F4F0; color: #5A5A54;
  border-radius: 999px; padding: 4px 11px;
}
.term-chip b { color: var(--primary); font-weight: 600; }

/* 分段控件（切换模式选择） */
.seg { display: inline-flex; background: #F1F1EC; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 3px; }
.seg__item {
  border: 0; background: transparent; border-radius: 999px; padding: 7px 16px; font-size: 12.5px;
  color: #6B6B66; white-space: nowrap;
}
.seg__item:hover { color: var(--text); }
.seg__item.is-active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow-s); }
.seg__item.is-active.is-danger { color: var(--danger); }

/* 手机预览的等比缩放容器（弹窗内并排展示） */
.phone-scale { width: 289px; height: 568px; flex: 0 0 auto; overflow: hidden; position: relative; }
.phone-scale > .phone { width: 340px; max-width: none; height: 668px; transform: scale(.85); transform-origin: top left; }

/* 行业模板库 / 行业切换弹窗的两栏布局 */
.tpl-lib { display: grid; grid-template-columns: minmax(0, 1fr) 305px; gap: 16px; align-items: start; }
.tpl-lib__side { position: sticky; top: 0; }
.tpl-list { display: flex; flex-direction: column; gap: 9px; }
.tpl-item {
  display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.tpl-item:hover { border-color: var(--accent); box-shadow: var(--shadow-s); }
.tpl-item.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(92, 107, 87, .12); }
.tpl-item.is-mine { background: #FCFDFA; }
.tpl-item__emoji {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; background: #F4F4F0; display: grid;
  place-items: center; font-size: 20px; line-height: 1;
}
.tpl-item__main { flex: 1 1 auto; min-width: 0; }
.tpl-item__head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tpl-item__name { font-size: 13px; font-weight: 600; }
.tpl-item__desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.tpl-item__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.tpl-item__ops { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.ind-preview-side { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ind-preview__cats { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------- 17. 响应式 ------------------------------- */
@media (max-width: 1440px) {
  .editor { grid-template-columns: 246px minmax(300px, 1fr) 360px; }
  .phone { width: 322px; height: 640px; }
}
@media (max-width: 1240px) {
  .editor { grid-template-columns: 240px minmax(0, 1fr); }
  .editor__col--preview { grid-column: 1 / -1; }
  .grid--dash { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .grid--goods { grid-template-columns: minmax(0, 1fr); }
  .login-page { grid-template-columns: minmax(0, 1fr); }
  .login-aside { display: none; }
  .tpl-lib { grid-template-columns: minmax(0, 1fr); }
  .tpl-lib__side { position: static; }
  .ind-preview-side { align-items: flex-start; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 214px; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .24s; }
  .shell.is-nav-open .sidebar { transform: none; box-shadow: var(--shadow-l); }
  .shell.is-nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(38, 42, 34, .38); z-index: 25; }
  .topbar__toggle { display: grid; }
  .content { padding: 16px 14px 50px; }
  .grid--4, .grid--3, .grid--2, .form-grid, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: span 1; }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .drawer { width: 100%; max-width: 100%; }
  .account__meta { display: none; }
}
@media (max-width: 560px) {
  .page-head h1 { font-size: 18px; }
  .stat__value { font-size: 22px; }
}

/* ================================================================
   商户端控制台 v2.3 新增模块样式（docs/MERCHANT-CONSOLE.md）
   ================================================================ */

/* 侧边栏：树形分组（一级可折叠 + 二级/三级子分组） */
.sidebar__group-head {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
  font-size: 11px; color: rgba(233, 237, 228, .52); padding: 14px 10px 6px;
  letter-spacing: .1em; font-weight: 600;
}
.sidebar__group-head:hover { color: rgba(233, 237, 228, .85); }
.sidebar__group-arrow { opacity: .6; transition: transform .16s ease; display: inline-flex; }
.sidebar__group-arrow.is-collapsed { transform: rotate(-90deg); }
.sidebar__sub-wrap { margin: 2px 0; }
.sidebar__sub-head {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
  font-size: 11.5px; color: rgba(233, 237, 228, .44); padding: 8px 10px 4px;
}
.sidebar__sub-head:hover { color: rgba(233, 237, 228, .8); }
.sidebar__sub .nav-item { padding-left: 30px; font-size: 13px; }
.sidebar__nav { overflow-y: auto; }

/* 筛选栏（报表 / 财务共用） */
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.filter-bar__item { display: flex; flex-direction: column; gap: 5px; min-width: 132px; }
.filter-bar__item > label { font-size: 11.5px; color: var(--muted); }
.filter-bar__item .input, .filter-bar__item select, .filter-bar__item input { min-width: 132px; }
.filter-bar__item--actions { min-width: auto; }

/* 指标卡补充 */
.grid--auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 12px; }
.grid--dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }

/* 表格：数字右对齐 + 合计行 */
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot td { background: var(--surface-2, #F5F6F2); font-weight: 600; border-top: 1px solid var(--line); }
.table .strong { font-weight: 600; }

/* 财务：结算日历 */
.settle-calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.settle-cell {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
  background: #fff; cursor: pointer; transition: box-shadow .15s ease;
}
.settle-cell:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .07); }
.settle-cell.is-draft { border-color: #D9B26A; background: #FDF8EE; }
.settle-cell.is-paid { border-color: #A9C6A1; background: #F3F8F1; }
.settle-cell__no { font-size: 11.5px; color: var(--muted); }
.settle-cell__amount { font-size: 16px; font-weight: 600; margin: 4px 0; font-variant-numeric: tabular-nums; }

/* 财务：资金流向图（分账介绍页） */
.fin-flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.fin-flow__step {
  flex: 1 1 168px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; background: #fff; position: relative;
}
.fin-flow__step:not(:last-child)::after {
  content: '→'; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 15px;
}
.fin-flow__no {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #2E3528;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700;
}
.fin-flow__title { font-weight: 600; margin: 6px 0 4px; font-size: 13.5px; }
.fin-flow__desc { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* 财务：公式条与对平提示 */
.formula-bar {
  background: var(--surface-2, #F5F6F2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.formula-bar b { font-variant-numeric: tabular-nums; }
.balance-ok { color: #3F7A46; }
.balance-bad { color: var(--danger); }

/* 财务：三段式对账布局 */
.diff-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; }
.kv-list { display: flex; flex-direction: column; gap: 6px; }
.kv-list__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.kv-list__row > span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }

/* 凭证分录表 */
.voucher-entries { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.entry-direction { font-weight: 600; }
.entry-direction--debit { color: #2F6B4F; }
.entry-direction--credit { color: #8C5A34; }

/* ============================================================
   网店域（§5.16）：装修预览节点（dp__*）+ 编辑器补充
   dp__* 用于「网店装修 / 小程序装修」的实时预览渲染
   ============================================================ */
.lib-item__icon { display: grid; place-items: center; margin-bottom: 4px; color: var(--primary); }

.deco-preview {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.deco-preview--mobile { width: 100%; max-width: 340px; margin: 0 auto; min-height: 420px; }
.deco-preview--pc { width: 100%; min-height: 320px; }

.dp__block { border-radius: 10px; overflow: hidden; }
.dp__row { display: flex; align-items: center; gap: 8px; }
.dp__gap { gap: 8px; }
.dp__label { font-size: 13px; font-weight: 600; color: var(--text); padding: 4px 2px; }
.dp__label--bar { border-left: 3px solid var(--primary); padding-left: 8px; }
.dp__sub { font-size: 11px; color: var(--muted); }
.dp__empty {
  border: 1px dashed var(--line); border-radius: 10px; padding: 18px;
  text-align: center; font-size: 12px; color: var(--muted); background: #fff;
}
.dp__grid { display: grid; gap: 8px; }
.dp__cell { display: grid; place-items: center; gap: 4px; padding: 8px 2px; background: #fff; border-radius: 8px; }
.dp__ico { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); }
.dp__topnav { background: #fff; padding: 8px 10px; border-radius: 10px; }
.dp__logo { width: 40px; height: 20px; border-radius: 4px; background: var(--primary); color: #fff; font-size: 9px; display: grid; place-items: center; }
.dp__search { flex: 1; background: var(--bg); border-radius: 14px; padding: 6px 10px; font-size: 11px; color: var(--muted); }
.dp__search--full { flex: none; width: 100%; }
.dp__cart { font-size: 15px; }
.dp__carousel { width: 100%; height: 100%; background: linear-gradient(120deg, #5C6B57, #8a9a84); color: #fff; display: grid; place-items: center; font-size: 12px; position: relative; }
.dp__dots { position: absolute; bottom: 6px; display: flex; gap: 4px; }
.dp__dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.dp__dot.is-on { background: #fff; }
.dp__notice { background: #FFF7E6; color: #8A6D3B; border-radius: 8px; padding: 7px 10px; font-size: 11.5px; }
.dp__coupon { flex: 1; background: #fff; border: 1px dashed var(--primary); border-radius: 8px; padding: 8px; font-size: 11px; text-align: center; color: var(--primary); }
.dp__goods { background: #fff; border-radius: 8px; padding: 6px; }
.dp__thumb { width: 100%; aspect-ratio: 1 / 1; background: var(--accent-soft); border-radius: 6px; margin-bottom: 6px; }
.dp__goods-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp__goods-price { font-size: 12px; font-weight: 600; color: var(--primary); }
.dp__countdown { background: #FDECEC; color: #B4433A; border-radius: 8px; padding: 8px 10px; font-size: 11.5px; }
.dp__video { background: #2B2F2A; color: #fff; border-radius: 10px; padding: 34px; text-align: center; font-size: 12px; }
.dp__rich { background: #fff; border-radius: 8px; padding: 10px; font-size: 12px; color: var(--text); }
.dp__footer { background: #fff; border-radius: 10px; padding: 10px; text-align: center; }
.dp__brand { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.dp__banner { background: linear-gradient(120deg, #5C6B57, #B9C4AE); color: #fff; border-radius: 10px; display: grid; place-items: center; font-size: 13px; }
.dp__spacer { background: transparent; }
.dp__tab { flex: 1; text-align: center; padding: 7px 0; font-size: 12px; background: #fff; border-radius: 16px; color: var(--muted); }
.dp__tab.is-on { background: var(--primary); color: #fff; }
.dp__sidebar { flex: 0 0 62px; background: var(--bg); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.dp__side-item { font-size: 11px; padding: 6px 4px; border-radius: 6px; color: var(--muted); text-align: center; }
.dp__side-item.is-on { background: #fff; color: var(--primary); font-weight: 600; }
.dp__side-body { flex: 1; background: #fff; border-radius: 8px; display: grid; place-items: center; font-size: 11px; color: var(--muted); min-height: 120px; }
.dp__cartbar { background: var(--primary); color: #fff; border-radius: 20px; padding: 10px 14px; font-size: 12px; text-align: center; }
.dp__mcard { background: linear-gradient(120deg, #5C6B57, #7E8F76); color: #fff; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.dp__mcard-name { font-size: 14px; font-weight: 700; }
.dp__mcard-sub { font-size: 11px; opacity: .9; }
.dp__asset { flex: 1; background: #fff; border-radius: 8px; padding: 10px 6px; text-align: center; font-size: 11px; color: var(--text); }
.dp__progress { height: 6px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.dp__progress-in { height: 100%; background: var(--primary); }
.dp__btn { background: var(--primary); color: #fff; border-radius: 16px; padding: 6px 12px; font-size: 11px; }

.kv-list__row span:last-child { text-align: right; word-break: break-all; }
.card--inner { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.col-gap { display: flex; flex-direction: column; gap: 8px; }
.text-center { text-align: center; }

/* ============================================================
   营销日历（§5.17.3）：月/周网格
   ============================================================ */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell {
  min-height: 96px; border: 1px solid var(--line); border-radius: 8px; padding: 6px;
  background: #fff; display: flex; flex-direction: column; gap: 3px;
}
.cal-cell--empty { background: transparent; border-color: transparent; }
.cal-cell.is-today { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(92, 107, 87, .08); }
.cal-cell__day { font-size: 11px; color: var(--muted); }
.cal-ev {
  display: flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 4px;
  border-radius: 5px; background: var(--accent-soft); color: var(--text); cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cal-ev:hover { background: var(--accent); }
.cal-ev.is-conflict { background: #FDECEC; color: #B4433A; border: 1px dashed #E0A9A3; }
.cal-ev__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: 0 0 5px; }
.cal-ev__text { overflow: hidden; text-overflow: ellipsis; }
.cal-cell__more { font-size: 10px; color: var(--muted); }
