/* MediBase 商户中心 — 「青瓷诊室」
   只用在意 shop/ 这一个模块：merchant.php 与 blank.php 在 app.css 之后加载本文件，
   运营后台与公开站点仍按 app.css 渲染，这里不碰它们。
   做法：先把 :root 令牌换成青瓷一档，再收紧商户实际用到的组件的尺寸与字级。
   字级四档：20（页面标题）/ 15（卡片与分区标题）/ 14（正文与控件）/ 13（说明与元信息）。
   13 是下限，正文之上不再出现 12、11.5、10.5。 */

:root {
  color-scheme: light;
  --bg: #f9faf9;
  --bg-sunken: #f2f4f2;
  --bg-elev: #ffffff;
  --bg-hover: #edf0ee;
  --bg-active: #e5e9e7;
  --border: #e1e5e3;
  --border-strong: #cdd3d0;
  --text: #191b1a;
  --text-muted: #4d5250;
  --text-subtle: #616865;
  --accent: #1f6b5f;
  --accent-hover: #185348;
  --accent-soft: #e6efec;
  --accent-fg: #ffffff;
  --green: #256b45;
  --green-soft: #e4f0e8;
  --amber: #8a5a12;
  --amber-soft: #f8efdf;
  --red: #a63a30;
  --red-soft: #f8e8e6;
  --blue: #255e86;
  --blue-soft: #e6eef5;
  --violet: #6d46c8;
  --violet-soft: #f1ebfd;
  --radius: 4px;
  --radius-lg: 6px;
  --shadow: 0 1px 2px rgba(25, 27, 26, .05);
  --shadow-lg: 0 10px 30px rgba(25, 27, 26, .10);
  --sidebar-w: 220px;

  --fs-1: 16px;
  --fs-2: 16px;
  --fs-3: 14px;
  --fs-4: 13px;
  --ctl-h: 32px;
  --ctl-h-sm: 28px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111413;
    --bg-sunken: #0d100f;
    --bg-elev: #181c1a;
    --bg-hover: #1c211f;
    --bg-active: #232a27;
    --border: #262c29;
    --border-strong: #343b37;
    --text: #eef1ef;
    --text-muted: #a3aaa6;
    --text-subtle: #8b938f;
    --accent: #5fb8a6;
    --accent-hover: #79c9b8;
    --accent-soft: #16302b;
    --accent-fg: #08120f;
    --green: #6cc397;
    --green-soft: #14291f;
    --amber: #d9a463;
    --amber-soft: #2a2113;
    --red: #e08c85;
    --red-soft: #2c1815;
    --blue: #7fb3d5;
    --blue-soft: #14222c;
    --violet: #b39ae8;
    --violet-soft: #221b33;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  }
}

/* ---------- 字体与字级 ---------- */
body {
  font-size: var(--fs-3);
  line-height: 1.6;
  letter-spacing: -0.006em;
}
h1 { font-size: var(--fs-1); font-weight: 600; letter-spacing: -0.022em; }
h2 { font-size: var(--fs-2); font-weight: 600; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-3); font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: var(--fs-3); font-weight: 600; letter-spacing: 0; }
/* 第三套字体（等宽）在商户中心没有用处：数字靠表格数字对齐，不靠换字体。 */
code, .mono, pre {
  font-family: var(--font);
  font-size: var(--fs-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* ---------- 侧栏 ---------- */
.sidebar__brand { padding: 16px 14px 10px; gap: 8px; }
.sidebar__logo {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-fg); font-size: var(--fs-4);
}
.sidebar__name { font-size: var(--fs-3); font-weight: 600; }
.sidebar__nav { padding: 4px 6px 14px; }
.nav__group { margin-top: 12px; }
/* 全大写 + 加字距的小标签是最难读的一类文本，改成正常大小写的分组名。 */
.nav__label {
  padding: 6px 8px 4px; font-size: var(--fs-4); font-weight: 500;
  text-transform: none; letter-spacing: 0; color: var(--text-muted);
}
.nav__item {
  gap: 8px; padding: 7px 8px; border-radius: var(--radius);
  font-size: var(--fs-3); color: var(--text-muted);
}
.nav__item.is-active { background: var(--bg-active); color: var(--text); font-weight: 600; }
.nav__icon { width: 16px; flex: 0 0 16px; font-size: var(--fs-4); opacity: .8; }
.nav__badge { font-size: var(--fs-4); font-weight: 600; padding: 0 5px; }
.sidebar__foot { padding: 8px; }
.user { padding: 6px; gap: 8px; }
.user__avatar { width: 26px; height: 26px; flex: 0 0 26px; font-size: var(--fs-4); }
.user__name { font-size: var(--fs-3); }
.user__role { font-size: var(--fs-4); color: var(--text-subtle); }

/* ---------- 内容区 ---------- */
.page-head { gap: 14px; margin-bottom: 16px; }
.page-head__sub { font-size: var(--fs-4); margin-top: 2px; }
.card__head { padding: 11px 14px; gap: 8px; }
.card__title { font-size: var(--fs-2); font-weight: 600; letter-spacing: -0.01em; }
.card__body { padding: 14px; }
.card__foot { padding: 10px 14px; }
.card { box-shadow: var(--shadow); }
/* app.css 没有 .section__title（那是主站 web.css 的类），商户视图一直在用 → 以前落到浏览器 h2 默认 1.5em。 */
.section__title { font-size: var(--fs-2); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }
.section__title--sm { font-size: var(--fs-3); margin-bottom: 6px; }

/* ---------- 表单控件 ---------- */
.btn {
  height: var(--ctl-h); padding: 0 12px; border-radius: var(--radius);
  font-size: var(--fs-3); font-weight: 500;
}
.btn--primary { font-weight: 600; }
.btn--sm { height: var(--ctl-h-sm); font-size: var(--fs-4); padding: 0 10px; }
.btn--icon { width: var(--ctl-h); }
.input, .select { height: var(--ctl-h); padding: 0 10px; border-radius: var(--radius); font-size: var(--fs-3); }
.textarea { min-height: 84px; padding: 8px 10px; border-radius: var(--radius); font-size: var(--fs-3); }
.field { margin-bottom: 14px; }
.field__label { font-size: var(--fs-3); color: var(--text-muted); margin-bottom: 5px; }
.field__hint { font-size: var(--fs-4); }
.field__error { font-size: var(--fs-4); }

/* ---------- 表格 ---------- */
table.tbl { font-size: var(--fs-3); }
.tbl th { font-size: var(--fs-4); font-weight: 500; padding: 9px 12px; }
.tbl td { padding: 10px 12px; }
.tbl__sub { font-size: var(--fs-4); }
.tbl__actions { gap: 6px; }

/* ---------- 杂项 ---------- */
.tag {
  height: 22px; padding: 0 7px; border-radius: 3px;
  font-size: var(--fs-4); font-weight: 500;
}
.flash { padding: 10px 12px; border-radius: var(--radius); font-size: var(--fs-3); margin-bottom: 12px; }
.pager { font-size: var(--fs-4); }
.pager__item { min-width: var(--ctl-h-sm); height: var(--ctl-h-sm); }
.timeline__time { font-size: var(--fs-4); }
.timeline__text { font-size: var(--fs-3); }
.empty__title { font-size: var(--fs-2); }
.empty__hint { font-size: var(--fs-4); }
.dot { width: 6px; height: 6px; }

/* ---------- 商户概览页（原 dashboard.php 的页内样式） ---------- */
.ov-todo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); }
.ov-todo + .ov-todo { border-top: 1px solid var(--border); }
.ov-todo__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-subtle); flex: 0 0 7px; }
.ov-todo__dot.is-amber { background: var(--amber); }
.ov-todo__dot.is-red { background: var(--red); }
.ov-todo__dot.is-accent { background: var(--accent); }
.ov-todo__text { min-width: 0; flex: 1; }
.ov-todo__t { font-size: var(--fs-3); font-weight: 600; }
.ov-todo__s { font-size: var(--fs-4); color: var(--text-subtle); margin-top: 2px; }
.ov-clear { padding: 18px 14px; text-align: center; }
.ov-clear__t { font-size: var(--fs-3); color: var(--text-muted); font-weight: 500; }
.ov-clear__s { font-size: var(--fs-4); color: var(--text-subtle); margin-top: 3px; }
.ov-num {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
  padding: 10px 12px; border-radius: var(--radius); color: inherit;
}
.ov-num + .ov-num { border-top: 1px solid var(--border); }
a.ov-num:hover { background: var(--bg-hover); }
.ov-num__k { font-size: var(--fs-4); color: var(--text-muted); }
.ov-num__v { font-size: var(--fs-1); font-weight: 600; text-align: right; line-height: 1.25; font-variant-numeric: tabular-nums; }
.ov-num__s { grid-column: 1 / -1; font-size: var(--fs-4); color: var(--text-subtle); }
/* ---------- 登录页（原 login.php 的页内样式） ---------- */
.mb-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: var(--bg-sunken);
  color: var(--text);
  position: relative;
}
.mb-panel { width: 100%; display: flex; justify-content: center; }
.mb-lang { position: absolute; top: 22px; right: 26px; font-size: var(--fs-4); z-index: 2; }
.mb-card {
  width: 100%; max-width: 400px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 28px;
}
.mb-card__title { font-size: var(--fs-1); font-weight: 600; letter-spacing: -0.022em; margin: 0; }
.mb-card__sub { font-size: var(--fs-4); color: var(--text-muted); margin: 6px 0 20px; }
.mb-flash { font-size: var(--fs-3); line-height: 1.55; border-radius: var(--radius); padding: 10px 12px; margin: 0 0 14px; }
.mb-flash--error { background: var(--red-soft); border: 1px solid var(--border); color: var(--red); }
.mb-flash--ok { background: var(--green-soft); border: 1px solid var(--border); color: var(--green); }

.mb-field { margin-bottom: 14px; }
.mb-field__row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.mb-field__label { font-size: var(--fs-3); color: var(--text-muted); font-weight: 500; }
.mb-field__link { font-size: var(--fs-4); color: var(--text-muted); text-decoration: none; }
.mb-field__link:hover { color: var(--accent); text-decoration: underline; }
.mb-input { position: relative; display: flex; align-items: center; }
.mb-input__icon {
  position: absolute; left: 11px; display: flex; color: var(--text-subtle);
  pointer-events: none; transition: color .15s;
}
.mb-input input {
  width: 100%; height: 40px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border-strong);
  color: var(--text); font-size: var(--fs-3); padding: 0 40px;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.mb-input input::placeholder { color: var(--text-subtle); }
.mb-input input:focus { border-color: var(--accent); background: var(--bg-elev); box-shadow: 0 0 0 3px var(--accent-soft); }
.mb-input:focus-within .mb-input__icon { color: var(--accent); }
.mb-input__toggle {
  position: absolute; right: 4px; height: 30px; width: 32px; border: 0; background: transparent;
  color: var(--text-subtle); cursor: pointer; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
}
.mb-input__toggle:hover { color: var(--text); background: var(--bg-hover); }
.mb-submit {
  width: 100%; height: 40px; border: 0; border-radius: var(--radius); margin-top: 4px;
  background: var(--accent); color: var(--accent-fg);
  font-size: var(--fs-3); font-weight: 600; cursor: pointer;
  transition: background .15s, transform .06s;
}
.mb-submit:hover { background: var(--accent-hover); }
.mb-submit:active { transform: translateY(1px); }
.mb-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--text-subtle); font-size: var(--fs-4); }
.mb-divider::before, .mb-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.mb-social { display: grid; gap: 8px; }
.mb-social__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; border-radius: var(--radius); text-decoration: none;
  font-size: var(--fs-3); font-weight: 500;
  color: var(--text); background: var(--bg-elev); border: 1px solid var(--border-strong);
  transition: background .15s, border-color .15s;
}
.mb-social__btn:hover { background: var(--bg-hover); border-color: var(--accent); }
.mb-social__btn svg { flex: 0 0 auto; }
.mb-apply {
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: var(--fs-4); color: var(--text-muted); text-align: center;
}
.mb-apply a { color: var(--accent); text-decoration: none; font-weight: 600; }
.mb-apply a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .mb-login { padding: 24px 16px; }
  .mb-lang { top: 16px; right: 16px; }
  .mb-card { padding: 24px 18px; box-shadow: var(--shadow); }
}

/* ---------- 版面骨架（原商户布局的内联 <style>，2026-11-30 收进本文件） ---------- */

/* 商户页统一内边距：主站布局的 .main 自带内边距，商户布局当初漏了，内容会贴到窗口边。
   一次放这里，十个页面一起对齐；页面内要吸顶的条用等量负外边距铺满这一圈。 */
.main { padding: 18px 24px 32px; }
@media (max-width: 900px) { .main { padding: 14px 16px 28px; } }

/* 账户簇：套餐与退出。 */
.nav__group--me {
  border-top: 1px solid var(--border); padding-top: 10px; margin-top: 12px;
}
.shop-topbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.nav__lang { color: var(--text-muted); }

/* 窄屏顶栏：app.css 在 <=820px 隐藏了 .sidebar，以前等于导航/语言/退出一起消失。
   这里用同一条顶栏补齐：机构名 + 套餐 → 语言 + 退出 → 可横滑的导航。纯服务端渲染，不依赖 JS。 */
.mbar { display: none; }
@media (max-width: 820px) {
  .shop-topbar { display: none; }
  .mbar {
    display: block; position: sticky; top: 0; z-index: 20; background: var(--bg);
    border-bottom: 1px solid var(--border); margin: -14px -16px 14px;
  }
  .mbar__top { display: flex; align-items: center; gap: 10px; padding: 9px 12px 8px; }
  .mbar__brand { display: flex; align-items: center; gap: 8px; min-width: 0; color: inherit; }
  .mbar__logo {
    width: 24px; height: 24px; border-radius: var(--radius); flex: 0 0 24px; display: grid; place-items: center;
    background: var(--accent); color: var(--accent-fg); font-size: var(--fs-4); font-weight: 600;
  }
  .mbar__name {
    font-size: var(--fs-3); font-weight: 600; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 46vw;
  }
  .mbar__actions { margin-left: auto; display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
  .mbar__icon {
    display: inline-flex; align-items: center; justify-content: center; width: var(--ctl-h); height: var(--ctl-h);
    border: 1px solid transparent; border-radius: var(--radius); background: none;
    color: var(--text-muted); cursor: pointer;
  }
  .mbar__icon:hover { background: var(--bg-hover); color: var(--text); }
  .mnav { display: flex; gap: 2px; overflow-x: auto; padding: 0 8px 8px; scrollbar-width: none; }
  .mnav::-webkit-scrollbar { display: none; }
  .mnav__item {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
    font-size: var(--fs-4); color: var(--text-muted); white-space: nowrap;
  }
  .mnav__item:hover { background: var(--bg-hover); color: var(--text); }
  .mnav__item.is-active { background: var(--bg-active); color: var(--text); font-weight: 600; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* 商户工作台：以清晰的内容层级和宽松间距突出日常操作。 */
:root {
  --bg: #f3f7f8;
  --bg-sunken: #eef3f3;
  --bg-hover: #eef3f7;
  --bg-active: #e1eeef;
  --border: #dce5e7;
  --border-strong: #c7d2dd;
  --text: #18313b;
  --text-muted: #526573;
  --text-subtle: #607482;
  --accent: #126276;
  --accent-hover: #104c5b;
  --accent-soft: #dcefed;
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-w: 232px;
  --shadow: 0 4px 20px rgba(25, 48, 65, .045);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111b23; --bg-sunken: #0d171e; --bg-elev: #1a2832;
    --bg-hover: #22343e; --bg-active: #2a414b; --border: #30424b;
    --border-strong: #455962; --text: #edf5f6; --text-muted: #b5c8cc;
    --text-subtle: #a4b9bd; --accent: #79c9ca; --accent-hover: #9adada;
    --accent-soft: #203d40; --accent-fg: #102528;
  }
}
.sidebar { background: var(--bg-elev); border-right: 1px solid var(--border); }
.sidebar__brand { padding: 28px 20px 24px; gap: 12px; }
.sidebar__logo { width: 38px; height: 38px; flex-basis: 38px; border-radius: 10px; font-size: var(--fs-2); }
.sidebar__name { font-size: var(--fs-2); }
.sidebar__nav { padding: 0 12px 18px; }
.nav__label { padding-left: 12px; margin-bottom: 8px; }
.nav__item { min-height: 42px; border-radius: 8px; padding-left: 12px; }
.nav__item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.main { padding: 36px clamp(24px, 4vw, 64px) 56px; }
.page-head { align-items: center; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(26px, 2.4vw, 34px); font-weight: 700; letter-spacing: -.035em; }
.page-head__sub { margin-top: 7px; font-size: var(--fs-3); }
.card { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.card__head { padding: 20px 22px 15px; }
.card__title { font-size: var(--fs-2); font-weight: 700; }
.card__body { padding: 20px 22px; }
.btn { border-radius: 7px; min-height: 36px; }
.ov-todo { padding: 16px; border-radius: 0; }
.ov-todo__t { font-size: var(--fs-3); }
.ov-todo__s { line-height: 1.55; }
.ov-clear { padding: 32px 16px; text-align: left; }
.ov-num { padding: 14px 4px; }
.ov-num__v { font-size: var(--fs-2); color: var(--accent); }
.timeline__item { padding-block: 8px; }
@media (max-width: 820px) {
  .main { padding: 16px 16px 36px; }
  .mbar { margin: -16px -16px 24px; }
  .page-head { align-items: flex-start; gap: 14px; margin-bottom: 20px; }
  .page-head h1 { font-size: 26px; }
  .card__head { padding: 18px 18px 13px; }
  .card__body { padding: 18px; }
}


/* 资料与医生表单在小屏保留可填写的列宽。 */
.shop-form-grid { gap: 12px; }
.shop-site-domain { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.shop-site-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.shop-site-settings-grid > .card { min-width: 0; margin: 0; }
@media (max-width: 820px) { .shop-site-settings-grid { grid-template-columns: 1fr; } }
.shop-site-locale { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.shop-site-locale > span:last-child { margin-left: auto; }
.shop-site-approved { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--green-soft, #e5f6e9); color: var(--green, #18834a); font-weight: 700; }
.shop-site-template { display: flex; gap: 10px; align-items: flex-start; padding: 12px; margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.shop-site-template:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.shop-site-template input { margin-top: 4px; }
.shop-site-template__content { flex: 1; min-width: 0; }
.shop-site-template__summary, .shop-site-template__details { display: block; margin-top: 4px; font-size: 12px; }
.shop-site-template__swatches { display: flex; gap: 4px; margin-top: 8px; }
.shop-site-template__swatches i { width: 14px; height: 14px; border: 1px solid #0002; border-radius: 50%; }
.shop-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shop-form-grid > * { min-width: 0; }
.page-head__sub { max-width: 76ch; }
.field__label { line-height: 1.45; }
.table-wrap { max-width: 100%; }
@media (max-width: 600px) {
  .shop-form-grid--2, .shop-form-grid--3 { grid-template-columns: 1fr; }
  .price-toolbar { position: static; }
}

/* 商户中心：浅色导航和蓝绿色操作强调。 */
.sidebar { background: var(--bg-elev); color: var(--text); border-right: 1px solid var(--border); }
.sidebar__brand { min-height: 98px; padding: 24px 20px; border-bottom: 1px solid var(--border); }
.sidebar__logo { background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.sidebar__name { color: var(--text); line-height: 1.4; }
.sidebar .nav__label, .sidebar .nav__item { color: var(--text-muted); }
.sidebar .nav__group { margin-top: 22px; }
.sidebar .nav__item { margin: 3px 0; }
.sidebar .nav__item:hover { background: var(--bg-hover); color: var(--text); }
.sidebar .nav__item.is-active { background: var(--accent-soft); color: var(--accent-hover); }
.sidebar .nav__group--me { border-color: var(--border); }
.sidebar .langpick__trigger { color: inherit; }
.main { min-width: 0; }
.page-head { padding-bottom: 3px; }
.page-head__sub { line-height: 1.7; }
.card { overflow: visible; }
.card__head { border-bottom-color: var(--border); }
.card__title, .section__title { color: var(--text); }
.section__title--sm { font-size: var(--fs-2); margin-bottom: 14px; }
.input, .select { height: 40px; }
.textarea { line-height: 1.6; }
.field__label { color: var(--text); font-weight: 600; }
.btn { min-height: 38px; }
.btn--sm { min-height: 32px; }
.tbl th { background: var(--bg-sunken); font-weight: 600; }
.tbl td { padding-top: 14px; padding-bottom: 14px; vertical-align: middle; }
.table-wrap { border-radius: 8px; }
.table-wrap:has(> .shop-data-table) { border: 0; border-radius: 0; }
.table-wrap:has(> .shop-data-table) .tbl th { background: transparent; border-bottom: 1px solid var(--border); }
.ov-workspace { grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 16px; align-items: start; }
.ov-todo { min-height: 78px; }
.ov-num__v { font-size: var(--fs-2); }
.shop-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 18px; }
.shop-gallery__item { min-width: 0; overflow: hidden; background: var(--bg-elev); }
.shop-gallery__item .card__body { padding: 12px 0 !important; }
.dlg { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); border-radius: 12px; }
.dlg .card__body { max-height: calc(100dvh - 160px); overflow-y: auto; }
@media (max-width: 820px) {
  .ov-workspace { grid-template-columns: 1fr; }
  .mbar { background: var(--bg-elev); box-shadow: 0 4px 12px rgba(21,54,65,.05); }
  .mnav__item { min-height: 38px; }
  .shop-gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
}
@media (max-width: 600px) {
  .page-head { flex-wrap: wrap; }
  .ov-todo { align-items: flex-start; flex-wrap: wrap; }
  .ov-todo__text { flex-basis: calc(100% - 24px); }
  .ov-todo .btn { margin-left: 17px; }
  .dlg { width: calc(100vw - 24px); }
}

.shop-gallery__placeholder { height: 100%; display: grid; place-items: center; padding: 38px 12px 14px; line-height: 1.6; text-align: center; }
@media (max-width: 820px) {
  .shop-data-table { min-width: 720px; }
}

/* 概览以间距分组，避免每个区域都套用相同边框。 */
.ov-workspace > .card:first-child { background: transparent; border: 0; box-shadow: none; }
.ov-workspace > .card:first-child > .card__head { padding-inline: 0; }
.ov-workspace > .card:first-child > .card__body { padding: 6px 0 !important; }
.ov-workspace > .card:first-child .ov-todo { padding-inline: 0; }

/* 商户首页与独立分析页共用的数据面板。 */
.insight-hero { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:28px 34px; border-radius:14px; color:#ecf7f2; background:#15574f; }
.insight-hero h2 { margin:6px 0; color:#fff; font-size:clamp(22px,2.2vw,32px); }
.insight-hero p { margin:0; color:#d1e8df; }
.insight-hero__eyebrow { font-size:13px; letter-spacing:.12em; }
.insight-hero__score { display:flex; flex-direction:column; align-items:center; min-width:145px; padding:10px 22px; border-left:1px solid #ffffff55; white-space:nowrap; }
.insight-hero__score strong { font-size:38px; line-height:1.15; font-variant-numeric:tabular-nums; }
.insight-hero__score span { font-size:13px; color:#d1e8df; }
.insight-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.insight-kpi { display:flex; flex-direction:column; gap:4px; min-width:0; padding:20px 22px; border:1px solid var(--border); border-radius:10px; color:var(--text); background:var(--bg-elev); text-decoration:none; }
a.insight-kpi:hover { border-color:var(--accent); background:var(--accent-soft); }
.insight-kpi > span { color:var(--text-muted); font-size:13px; }
.insight-kpi strong { font-size:30px; line-height:1.25; font-variant-numeric:tabular-nums; }
.insight-kpi strong.insight-kpi__word { font-size:18px; overflow-wrap:anywhere; }
.insight-kpi small { color:var(--text-subtle); font-size:13px; }
.insight-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:stretch; }
.insight-grid > .card { min-width:0; }
.insight-grid .card__head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.insight-grid .card__head a { font-size:13px; white-space:nowrap; }
.insight-sections { display:grid; gap:13px; }
.insight-section { display:grid; grid-template-columns:88px minmax(30px,1fr) 40px; align-items:center; gap:12px; color:var(--text); text-decoration:none; }
.insight-section:hover { color:var(--accent); }
.insight-section strong { font-size:13px; text-align:right; font-variant-numeric:tabular-nums; }
.insight-meter { height:8px; overflow:hidden; border-radius:9px; background:var(--bg-sunken); }
.insight-meter > span { display:block; height:100%; border-radius:9px; background:var(--accent); }
.insight-chart { display:flex; align-items:stretch; gap:10px; height:190px; padding-top:8px; }
.insight-bar { display:flex; flex:1; min-width:0; flex-direction:column; align-items:center; gap:5px; }
.insight-bar__n,.insight-bar__day { font-size:12px; color:var(--text-subtle); font-variant-numeric:tabular-nums; white-space:nowrap; }
.insight-bar__track { display:flex; align-items:flex-end; flex:1; width:min(100%,38px); border-radius:5px 5px 0 0; background:var(--bg-sunken); overflow:hidden; }
.insight-bar__track > span { width:100%; background:var(--accent); border-radius:5px 5px 0 0; }
.insight-line { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid var(--border); }
.insight-line strong { font-variant-numeric:tabular-nums; }
.insight-social { display:flex; justify-content:space-between; gap:16px; padding:15px 0; border-bottom:1px solid var(--border); }
.insight-social__right { display:flex; gap:16px; align-items:center; color:var(--text-muted); white-space:nowrap; }
.insight-social__qr { display:block; width:72px; height:72px; margin-top:8px; object-fit:contain; border:1px solid var(--border); border-radius:5px; }
.insight-url { overflow-wrap:anywhere; }
@media (max-width:1050px) { .insight-grid { grid-template-columns:1fr; } }
@media (max-width:620px) { .insight-hero { padding:22px; align-items:flex-start; flex-direction:column; } .insight-hero__score { align-items:flex-start; border-left:0; border-top:1px solid #ffffff55; padding:12px 0 0; } .insight-kpis { grid-template-columns:1fr; } .insight-social,.insight-social__right { flex-wrap:wrap; } }
.shop-gallery__item > div:first-child { border-radius: 8px !important; }
.checkbox, .pager__jump-label, .pager__jump-input { font-size: var(--fs-3); }
@media (forced-colors: active) {
  .sidebar .nav__item.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* 品牌名称与机构名称分层，保持商户身份清晰。 */
.sidebar__identity { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sidebar__wordmark { color: var(--accent-hover); font-size: 20px; font-weight: 750; letter-spacing: -.035em; line-height: 1.2; }
.sidebar__name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-3); font-weight: 600; }
:root { --text-subtle: #526b78; --border-strong: #71858b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --border-strong: #899da3; }
}
.shop-scroll-hint, .mnav__hint { display: none; }
.table-wrap:focus-visible, .mnav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 820px) {
  .shop-scroll-hint, .mnav__hint { display: block; color: var(--text-muted); font-size: var(--fs-4); }
  .shop-scroll-hint { margin: 0 0 8px; }
  .mnav__hint { padding: 0 18px 8px; }
  .mnav { scrollbar-width: thin; }
  .mnav::-webkit-scrollbar { display: block; height: 4px; }
}

/* 分组只调整导航阅读顺序，移动端仍复用同一组入口。 */
.sidebar .nav__label--section { margin-top: 18px; }
.mb-input__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sidebar .nav__item.is-active { box-shadow: inset 3px 0 var(--accent); }
@media (max-width: 820px) {
  .mnav__item.is-active { box-shadow: inset 0 -3px var(--accent); }
}
@media (forced-colors: active) {
  .mnav__item.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
}
