/* ============================================================================
   商用平台端统一视觉层  commercial-refresh.css
   版本 20261109-commercial-r1

   覆盖范围：平台管理后台全部页面（总览、机构管理、套餐与计费、订单、
   APP 更新、课程管理、短信、安全设置等）与机构工作台。

   加载顺序（index.php render_head，735 行）：
     assets/style.css                 ← 基础骨架
     assets/platform-operations.css   ← 列表/表单微调
     assets/commercial-billing.css    ← 计费与服务页
     assets/commercial-ui.css         ← 商用覆盖层
     assets/registration.css
     ▸ commercial-refresh.css         ← 本文件，必须最后

   设计目标与 business/assets/partner-refresh.css 完全一致：
   中性灰底、单一深松绿强调色、1px 边框表达层级、6/10/14/18 四档圆角、
   阴影只给浮层、字重收敛到 400/500/600。只改表现，不动任何布局结构与
   业务逻辑（表单提交、权限、计费计算均不涉及）。
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. 令牌
   ------------------------------------------------------------------------- */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas,
    "PingFang SC", monospace;

  --ink: #1d1d1f;
  --ink-2: #3a3a3c;
  --muted: #6e6e73;
  --faint: #8e8e93;

  --page: #f5f5f7;
  --card: #ffffff;
  --fill: #f0f0f2;
  --fill-2: #e8e8ed;

  --line: #e3e3e6;
  --line-strong: #d2d2d7;

  --accent: #146b45;
  --accent-hover: #0f5436;
  --accent-soft: #eaf4ee;
  --accent-line: #bfdccb;

  --ok: #1c7a4a;
  --ok-soft: #e9f5ee;
  --warn: #96620f;
  --warn-soft: #fdf3e2;
  --danger: #b3261e;
  --danger-soft: #fdeceb;
  --info: #1c5f8a;
  --info-soft: #e9f2f8;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 160ms;

  /* 兼容旧变量名，让尚未重写的模块继续取到中性值 */
  --green: var(--accent);
  --green-deep: var(--accent-hover);
  --green-soft: var(--accent-soft);
  --teal: #1c5f5a;
  --amber: var(--warn);
  --red: var(--danger);
  --red-soft: var(--danger-soft);
  --cream: var(--page);
  --paper: var(--card);
  --sans: var(--font-sans);
  --display: var(--font-sans);
  --shadow: var(--shadow-2);

  color-scheme: light;
}

/* ---------------------------------------------------------------------------
   2. 基础排版
   ------------------------------------------------------------------------- */

html {
  background: var(--page);
}

html body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}

html body.ps-body {
  background: var(--page);
  color: var(--ink);
}

html body :is(h1, h2, h3, h4, h5, h6) {
  margin-top: 0;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.011em;
  line-height: 1.3;
}

html body h1 {
  font-size: 26px;
  letter-spacing: -0.02em;
}

html body h2 {
  font-size: 20px;
  letter-spacing: -0.015em;
}

html body h3 {
  font-size: 16px;
  letter-spacing: -0.008em;
}

html body :is(p, li) {
  line-height: 1.65;
}

html body a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

html body a:hover {
  color: var(--accent-hover);
}

html body :is(strong, b) {
  font-weight: 600;
}

html body :is(code, pre, kbd, samp) {
  font-family: var(--font-mono);
}

html body ::selection {
  background: rgba(20, 107, 69, 0.16);
  color: var(--ink);
}

html body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

html body * {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

/* ---------------------------------------------------------------------------
   3. 外壳：侧边栏与主区
   ------------------------------------------------------------------------- */

html body .app-frame {
  display: flex;
  min-height: 100vh;
  background: var(--page);
}

html body .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 4;
  display: flex;
  width: 248px;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fcfcfd;
  color: var(--ink);
  box-shadow: none;
}

html body .side-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--line);
}

html body .side-brand img,
html body .side-brand .partner-brand-logo,
html body .side-brand > svg {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: var(--r-sm);
}

html body .side-brand strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

html body .side-brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

html body .side-label {
  flex: 0 0 auto;
  padding: 16px 20px 8px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

html body .side-nav {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 2px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 10px 12px;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

html body .side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-left: 0;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

html body .side-link:hover {
  background: var(--fill);
  color: var(--ink);
}

html body .side-link.active,
html body .side-link.is-active {
  border-left-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  box-shadow: none;
}

html body .side-link :is(.icon, svg) {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: currentColor;
}

html body .side-bottom {
  flex: 0 0 auto;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

html body .side-admin {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

html body .side-admin b {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}

html body .side-admin small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 10.5px;
}

html body .side-admin .avatar {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

html body .side-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
}

html body .side-logout:hover {
  background: var(--fill);
  color: var(--ink);
}

html body .main-area {
  width: calc(100% - 248px);
  max-width: 1440px;
  margin-left: 248px;
  padding: 0 clamp(20px, 3vw, 40px) 56px;
}

html body .topbar {
  display: flex;
  max-width: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
  padding: 32px 0 18px;
  border-bottom: 1px solid var(--line);
}

html body .topbar h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

html body .kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

html body .topbar-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

html body .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
   4. 卡片与面板
   ------------------------------------------------------------------------- */

html body :is(
    .panel,
    .stat-block,
    .tenant-hero,
    .tenant-card,
    .billing-panel,
    .cb-panel,
    .service-plan,
    .service-checkout aside,
    .pc-settings-section
  ) {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  background-image: none;
  box-shadow: none;
}

/* 统计块：去掉顶部彩色边条，改用中性边框 */
html body .stat-block {
  position: relative;
  min-width: 0;
  min-height: 116px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

html body .stat-block.accent-green,
html body .stat-block.accent-teal,
html body .stat-block.accent-amber,
html body .stat-block.accent-red {
  border-top-color: var(--line);
}

html body .stat-block > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

html body .stat-block > strong {
  display: block;
  margin: 10px 0 5px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

html body .stat-block small {
  display: block;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.4;
}

html body .stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: none;
  margin: 0 0 20px;
}

html body .content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  max-width: none;
  margin: 0 0 20px;
}

html body .panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

html body .panel-form .panel-head {
  padding: 0 0 16px;
}

html body .panel-head h2,
html body .panel-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.008em;
}

html body .panel-head h2 + p,
html body .panel-head p:not(.kicker) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

html body .panel-copy {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

html body .panel-side,
html body .panel-form {
  padding: 20px;
}

html body .tenant-hero {
  display: flex;
  max-width: none;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 20px;
  padding: 24px;
  color: var(--ink);
}

html body .tenant-hero h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

html body .tenant-hero p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

html body .tenant-hero .kicker {
  color: var(--faint);
}

html body .hero-status {
  display: grid;
  justify-items: end;
  min-width: 120px;
}

html body .hero-status strong {
  margin-top: 10px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

html body .hero-status small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 11px;
}

html body .meter-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

html body .meter-block > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12.5px;
}

html body .meter-block b {
  color: var(--ink);
  font-weight: 600;
}

html body .progress,
html body .mini-progress {
  overflow: hidden;
  border-radius: 999px;
  background: var(--fill-2);
}

html body .progress {
  height: 6px;
  margin: 10px 0 8px;
}

html body .mini-progress {
  height: 4px;
  margin-top: 7px;
}

html body .progress i,
html body .mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

html body .meter-block small {
  color: var(--faint);
  font-size: 11px;
}

html body .empty-action {
  padding: 13px 14px;
  border-radius: var(--r-sm);
  background: var(--fill);
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------------------------------------------------------------------------
   5. 按钮
   ------------------------------------------------------------------------- */

html body :is(.button, .copy-button, .text-link) {
  font-family: inherit;
}

html body .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), opacity var(--dur) var(--ease);
  transform: none;
}

html body .button:active {
  transform: none;
  opacity: 0.88;
}

html body .button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

html body .button-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #fff;
  box-shadow: none;
}

html body .button-ghost,
html body .button-secondary {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--ink-2);
}

html body .button-ghost:hover,
html body .button-secondary:hover {
  border-color: var(--faint);
  background: var(--fill);
  color: var(--ink);
}

html body .button-quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--ink-2);
}

html body .button-quiet:hover {
  border-color: var(--line-strong);
  background: var(--fill);
  color: var(--ink);
}

html body .button-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

html body .button-danger:hover {
  border-color: #981f19;
  background: #981f19;
  color: #fff;
}

html body .button:disabled,
html body .button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

html body .button-large {
  min-height: 42px;
  font-size: 14px;
}

html body .button-small {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}

html body :is(.text-link, .copy-button) {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

html body :is(.text-link, .copy-button):hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

html body .copy-button.is-copied {
  color: var(--ok);
}

html body :is(.danger-link, .cs-delete) {
  color: var(--danger);
}

/* ---------------------------------------------------------------------------
   6. 表单
   ------------------------------------------------------------------------- */

html body :is(.form-stack, .form-two, .cb-fields, .cb-form) {
  display: grid;
  gap: 16px;
}

html body .form-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

html body :is(.form-stack label, .panel-form label, .cb-form label, .form-two label) {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

html body :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select,
    textarea
  ) {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

html body :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select,
    textarea
  ):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 107, 69, 0.12);
  outline: none;
}

html body textarea {
  min-height: 88px;
  padding: 8px 10px;
  resize: vertical;
}

html body select {
  padding-right: 26px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

html body :is(input, textarea)::placeholder {
  color: var(--faint);
  opacity: 1;
}

html body :is(input, select, textarea):disabled {
  border-color: var(--line);
  background: var(--fill);
  color: var(--muted);
  cursor: not-allowed;
}

html body :is(input[type="checkbox"], input[type="radio"]) {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  accent-color: var(--accent);
  vertical-align: -2px;
}

html body .form-stack .pc-check,
html body .cb-form label.cb-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-weight: 400;
}

html body .form-stack .pc-check input,
html body .cb-form .cb-check input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

html body .form-stack small,
html body .cb-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

html body .form-error {
  margin: 0 0 16px;
  padding: 11px 12px;
  border: 1px solid #f0c2be;
  border-left: 3px solid var(--danger);
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  color: #8a1d17;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.55;
}

/* ---------------------------------------------------------------------------
   7. 表格
   ------------------------------------------------------------------------- */

html body .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  -webkit-overflow-scrolling: touch;
}

html body .table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

html body .table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
}

html body .table-wrap td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.55;
  vertical-align: middle;
  white-space: normal;
}

html body .table-wrap tr:last-child td {
  border-bottom: 0;
}

html body .table-wrap tbody tr:hover {
  background: #fafafa;
}

html body .table-wrap td b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

html body .table-sub {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
}

html body .empty-cell {
  color: var(--muted) !important;
  text-align: center !important;
}

html body .row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

html body .row-actions form {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

html body .row-actions select {
  min-height: 30px;
  padding: 0 22px 0 6px;
  font-size: 12.5px;
}

html body .row-actions .compact-input {
  width: 72px !important;
  min-height: 30px !important;
  padding: 4px 6px !important;
  font-size: 13px !important;
}

html body .tenants-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

html body .redeem-code {
  margin-right: 8px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------------------
   8. 状态与提示
   ------------------------------------------------------------------------- */

html body :is(.status-pill, .badge, .tag) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 20px;
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--fill);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}

html body .status-ok {
  border-color: var(--accent-line);
  background: var(--ok-soft);
  color: var(--ok);
}

html body .status-warn {
  border-color: #ecd7b0;
  background: var(--warn-soft);
  color: var(--warn);
}

html body .status-danger {
  border-color: #f0c2be;
  background: var(--danger-soft);
  color: var(--danger);
}

html body .status-off {
  border-color: var(--line);
  background: var(--fill);
  color: var(--faint);
}

html body :is(.notice, .alert) {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.6;
  box-shadow: none;
}

html body .notice-ok {
  border-left-color: var(--ok);
  background: var(--ok-soft);
  color: #14563a;
}

html body .notice-warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
  color: #6f4a0b;
}

html body .notice-danger {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: #8a1d17;
}

html body .notice strong {
  color: inherit;
  font-weight: 600;
}

html body .side-callout {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  background: #fafafa;
}

html body .side-callout b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

html body .side-callout p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

html body .check-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 20px;
  padding: 0;
  list-style: none;
}

html body .check-list li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

html body .check-list li:before {
  position: absolute;
  left: 0;
  color: var(--accent);
  content: "✓";
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
   9. 计费与服务页
   ------------------------------------------------------------------------- */

html body .cb-content {
  max-width: none;
  margin: 0 0 20px;
  display: grid;
  gap: 16px;
}

html body .cb-panel-body {
  padding: 0 20px 20px;
}

html body .cb-summary {
  gap: 14px;
  margin-bottom: 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

html body .cb-total {
  color: var(--accent);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

html body .cb-plan-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

html body .cb-plan-features {
  border-top: 1px solid var(--line);
}

html body .cb-plan-features legend {
  color: var(--muted);
  font-size: 12.5px;
}

html body .cb-store-row {
  border-bottom: 1px solid var(--line);
}

html body .cb-store-row b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

html body .service-body {
  background: var(--page);
}

html body .service-brand {
  color: var(--ink);
  font-weight: 600;
}

html body .service-brand span {
  color: var(--muted);
  font-weight: 400;
}

html body .service-intro h1,
html body .payment-example h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

html body .service-price strong {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

html body .service-checkout aside strong {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

html body .checkout-lines li {
  border-bottom: 1px solid var(--line);
}

html body .auth-service-link a {
  color: var(--accent);
}

/* ---------------------------------------------------------------------------
   10. 登录与机构选择
   ------------------------------------------------------------------------- */

html body .auth-body {
  background: var(--page);
}

html body .auth-intro {
  background: var(--page);
  color: var(--ink);
}

html body .auth-intro h1 {
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
}

html body .auth-intro h1 em {
  color: var(--accent);
  font-style: normal;
}

html body .auth-lead,
html body .auth-line {
  color: var(--muted);
}

html body .auth-line span {
  background: var(--line-strong);
}

html body .auth-intro:after {
  display: none;
}

html body .auth-panel {
  background: var(--page);
}

html body .auth-panel-head h2 {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

html body .auth-panel-head > p:not(.kicker) {
  color: var(--muted);
}

html body .auth-footnote,
html body .auth-admin-link {
  color: var(--muted);
}

html body .mi-selection-body {
  background: var(--page);
  color: var(--ink);
}

html body .mi-selection h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

html body .mi-greeting h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

html body .mi-greeting p {
  color: var(--muted);
  font-size: 14px;
}

html body .mi-choice {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
}

html body .mi-choice-row:hover {
  background: #fafafa;
}

html body .mi-choice-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

html body .mi-name {
  font-size: 16px;
  font-weight: 500;
}

html body .mi-code {
  color: var(--muted);
  font-size: 13px;
}

html body .mi-person {
  font-size: 14px;
}

html body .mi-person small {
  color: var(--faint);
}

html body .mi-arrow {
  color: var(--faint);
}

html body .mi-relogin {
  color: var(--muted);
}

html body .mi-verify input {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
}

/* ---------------------------------------------------------------------------
   11. 机构工作台（tenant-body）与设置分区
   ------------------------------------------------------------------------- */

html body .pc-settings-section {
  max-width: none;
  margin: 22px 0;
  padding-bottom: 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

html body .pc-settings-section > .panel-head {
  padding: 0 0 16px;
  border-bottom: 0;
}

html body .pc-settings-section h2 {
  font-size: 19px;
  font-weight: 600;
}

html body .pc-support-preview,
html body .platform-ad-preview,
html body .platform-ad-preview-empty,
html body .platform-ad-thumb,
html body .platform-ad-thumb-empty {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--fill);
  color: var(--muted);
}

html body .pc-notice-detail summary {
  color: var(--accent);
}

html body .mi-search input {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  font: inherit;
  font-size: 14px;
}

/* 机构列表在中等宽度下折为卡片式，标签与间距对齐新系统 */
html body .pc-tenants-layout .row-actions {
  gap: 8px;
}

html body .pc-tenants-layout .row-actions .tenant-action-form {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fafafa;
}

html body .pc-tenants-layout .row-actions .compact-input {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
}

/* ---------------------------------------------------------------------------
   12. 响应式
   ------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  html body .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body .content-grid,
  html body .tenants-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1000px) {
  html body .cb-plan-grid,
  html body .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html body .cb-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  html body .app-frame {
    display: block;
  }

  html body .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  html body .side-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 12px 12px;
  }

  html body .side-link {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 12px;
  }

  html body .side-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
  }

  html body .side-admin {
    margin: 0;
  }

  html body .main-area {
    width: auto;
    max-width: none;
    margin-left: 0;
    padding: 0 14px 36px;
  }

  html body .topbar {
    align-items: flex-start;
    padding: 22px 0 16px;
  }

  html body .topbar h1 {
    font-size: 22px;
  }

  html body .topbar-meta {
    font-size: 0;
  }

  html body .topbar-meta .status-pill {
    font-size: 11px;
  }

  html body .stat-grid {
    gap: 10px;
  }

  html body .stat-block {
    min-height: 100px;
    padding: 14px;
  }

  html body .stat-block > strong {
    font-size: 22px;
  }

  html body .panel-head {
    padding: 16px 16px 12px;
    flex-wrap: wrap;
  }

  html body .panel-form,
  html body .panel-side {
    padding: 16px;
  }

  html body .table-wrap th,
  html body .table-wrap td {
    padding: 10px 12px;
  }

  html body .tenant-hero {
    display: block;
    padding: 18px 16px;
  }

  html body .hero-status {
    justify-items: start;
    margin-top: 18px;
  }

  html body .form-two,
  html body .cb-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 16px 输入字号，避免 iOS 聚焦时自动放大 */
  html body :is(
      input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
      select,
      textarea
    ) {
    font-size: 16px;
  }

  html body .button {
    min-height: 40px;
    font-size: 14px;
  }

  html body .row-actions {
    min-width: 0;
  }
}

@media (max-width: 420px) {
  html body .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------------------------
   13. 无障碍与打印
   ------------------------------------------------------------------------- */

@media (prefers-reduced-transparency: reduce) {
  html body .sidebar {
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body *,
  html body *::before,
  html body *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  html body {
    background: #fff;
  }

  html body :is(.sidebar, .topbar-meta) {
    display: none !important;
  }

  html body .app-frame {
    display: block;
  }

  html body .main-area {
    width: auto;
    margin: 0;
    padding: 0;
  }

  html body :is(.panel, .stat-block, .table-wrap) {
    border-color: #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
}
