/* 聚创AI授权管理系统 · 基础样式（摘自聚创AI生图后台色板与布局） */
:root {
  /* UnivDesign ant-design.md — 色彩、间距、阴影、圆角阶梯（github.com/Yue-Zeyi/UnivDesign） */
  --unit: 4px;
  --token-bg: #ffffff;
  --token-surface: #f5f5f5;

  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-dark: var(--primary-active);
  --primary-soft: rgba(22, 119, 255, 0.1);
  --primary-rgb: 22, 119, 255;

  --success: #52c41a;
  --success-soft: rgba(82, 196, 26, 0.12);
  --success-rgb: 82, 196, 26;

  --warning: #faad14;
  --warning-soft: rgba(250, 173, 20, 0.12);
  --warning-rgb: 250, 173, 20;

  --danger: #ff4d4f;
  --danger-soft: rgba(255, 77, 79, 0.1);
  --danger-rgb: 255, 77, 79;

  --bg: var(--token-surface);
  --surface: var(--token-bg);
  --surface-soft: #fafafa;

  --text: rgba(0, 0, 0, 0.88);
  --text-soft: rgba(0, 0, 0, 0.65);
  --muted: rgba(0, 0, 0, 0.45);

  --line: #d9d9d9;
  --line-secondary: #f0f0f0;
  --line-strong: #bfbfbf;

  /* 深度 1 卡片 / 2 下拉 / 3 弹窗 */
  --shadow-1:
    0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
  --shadow-2: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12);
  --shadow-3:
    0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);

  --shadow-soft: var(--shadow-1);
  --shadow: var(--shadow-3);

  --focus-ring: 0 0 0 2px rgba(5, 145, 255, 0.1);

  --radius-xs: 2px;
  --radius-sm-comp: 4px;
  --radius-btn: 6px;
  --radius-card: 8px;
  --radius: var(--radius-card);
  --radius-sm: var(--radius-btn);
  --radius-lg: var(--radius-card);

  /* 排版：正文 14 / 400 / 1.57；标题 600（宪法） */
  --font-h1: 600 38px/1.3 ui-sans-serif, system-ui, sans-serif;
  --font-h2: 600 30px/1.3 ui-sans-serif, system-ui, sans-serif;
  --font-h3: 600 24px/1.3 ui-sans-serif, system-ui, sans-serif;
  --font-h4: 600 20px/1.3 ui-sans-serif, system-ui, sans-serif;

  --space: calc(var(--unit) * 2);

  /* 全站弹窗：蒙层、圆角、描边与阴影（居中叠层共用） */
  --modal-overlay-bg: rgba(15, 23, 42, 0.46);
  --modal-overlay-blur: 12px;
  --modal-radius: 14px;
  --modal-panel-border: 1px solid rgba(226, 232, 240, 0.98);
  --modal-panel-shadow: 0 24px 64px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5714285714285714;
  letter-spacing: 0;
}

code,
kbd,
pre,
samp {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

body.has-dialog,
body.is-generating {
  overflow: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(var(--unit) * 4) 0 calc(var(--unit) * 10);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-card);
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.45);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  display: block;
}

.brand-mark img,
.center-auth-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.brand-mark .icon-frame,
.brand-mark .icon-line,
.brand-mark .icon-dot {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark .ai-spark {
  fill: #93c5fd;
  stroke: #ffffff;
  stroke-width: 0.6;
}

.brand-mark .ai-spark.small {
  fill: #ffffff;
  stroke: none;
  opacity: 0.92;
}

body.page-admin .admin-layout-sidebar-mark.brand-mark {
  width: 36px;
  height: 36px;
  box-shadow: 0 2px 10px rgba(22, 119, 255, 0.22);
}

body.page-admin .admin-layout-sidebar-mark.brand-mark svg {
  width: 26px;
  height: 26px;
}

.eyebrow,
.brand-copy .eyebrow {
  margin: 0 0 var(--unit);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.67;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  overflow: hidden;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.card {
  padding: calc(var(--unit) * 6);
}

.section-card {
  margin-top: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  margin-bottom: 16px;
}

.card-head h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.card-head>div {
  min-width: 0;
}

.card-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.form {
  display: grid;
  gap: 14px;
}

.field,
.field-grid {
  display: grid;
  gap: 8px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field span {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.67;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  outline: none;
  background: #fff;
  color: var(--text);
  font-weight: 400;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input,
select {
  height: 32px;
  padding: var(--unit) calc(var(--unit) * 3 - 1px);
  font-size: 14px;
}

textarea {
  min-height: 120px;
  padding: calc(var(--unit) * 2);
  resize: vertical;
  border-radius: var(--radius-btn);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--primary-hover);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: var(--focus-ring);
}

input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

.button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  padding: var(--unit) calc(var(--unit) * 4 - 1px);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.button.large {
  min-height: 40px;
  padding: calc(var(--unit) + 2px) calc(var(--unit) * 4 - 1px);
}

.button.primary {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-btn);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
}

.button.primary:hover {
  background: var(--primary-hover);
}

.button.primary:active {
  background: var(--primary-active);
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--text-soft);
}

.button.secondary:hover,
.button.secondary.active {
  border-color: rgba(var(--primary-rgb), 0.30);
  background: var(--primary-soft);
  color: var(--primary);
}

.button.secondary.disabled {
  pointer-events: none;
  opacity: 0.5;
}

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

.button.danger:hover {
  background: var(--danger-soft);
}

.button.small {
  min-height: 24px;
  padding: 0 calc(var(--unit) * 2 - 1px);
  font-size: 12px;
  font-weight: 500;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.badge,
.status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

/* 顶部余额：桌面/移动端统一蓝色高亮 */
.badge[data-balance-display] {
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: rgba(var(--primary-rgb), 0.10);
  color: var(--primary);
}

.status.succeeded,
.alert.success,
.inline-message.success {
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-active);
  border-color: rgba(var(--primary-rgb), 0.28);
}

.status.failed,
.alert.error,
.inline-message.error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #fecaca;
}

.status.running,
.auth-pro-page {
  width: 100%;
}

.auth-pro-shell {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  overflow: hidden;
  border: 1px solid #e4e9f1;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 26px 60px rgba(20, 43, 75, 0.12);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
}

.auth-pro-showcase {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(32px, 6vw, 58px);
  background:
    radial-gradient(circle at 18% 10%, rgba(56, 189, 248, 0.2), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(var(--primary-rgb), 0.08), transparent 32%),
    linear-gradient(180deg, #f0f8ff 0%, #eaf5ff 100%);
}

.auth-pro-brand {
  width: fit-content;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-top: -20px;
  color: #101828;
  text-decoration: none;
}

.auth-pro-brand > span {
  display: grid;
  align-content: start;
  gap: 4px;
  padding-top: 0;
}

.auth-pro-mark {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22) 0%, rgba(var(--primary-rgb), 0.18) 100%);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.18);
}

.auth-pro-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.auth-pro-mark svg {
  width: 42px;
  height: 42px;
}

.auth-pro-brand strong {
  display: block;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
}

.auth-pro-brand small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.auth-pro-tag {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e8f8;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #3b82b1;
  font-size: 12px;
  font-weight: 760;
}

.auth-pro-showcase h1 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: clamp(40px, 4.3vw, 62px);
  font-weight: 920;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.auth-pro-showcase p {
  max-width: 600px;
  margin: 0;
  color: #475467;
  font-size: 17px;
  line-height: 1.72;
}

.auth-pro-metrics {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.auth-pro-metrics article {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid #dce6f3;
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}

.auth-pro-metrics strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 880;
}

.auth-pro-metrics span {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.auth-pro-form-side {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.9);
}

.auth-pro-mobile-brand {
  display: none;
}

.auth-pro-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-height: 54px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  padding: 6px;
  background: #eef2f7;
}

.auth-pro-tabs a {
  min-height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #667085;
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.auth-pro-tabs a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.26);
}

.auth-pro-tabs a:not(.active):hover {
  color: #344054;
  background: rgba(255, 255, 255, 0.66);
}

.auth-pro-tabs a:hover {
  transform: translateY(-1px);
}

.auth-pro-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 42px;
  font-weight: 900;
}

.auth-pro-header p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 15px;
  font-weight: 600;
}

.auth-pro-form {
  display: grid;
  gap: 12px;
}

.auth-pro-login-panel {
  display: grid;
  gap: 12px;
}

.auth-pro-login-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 0;
  flex-wrap: wrap;
}

.auth-pro-login-mode-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--primary-hover);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.auth-pro-login-mode-link:hover {
  text-decoration: underline;
}

.auth-pro-login-bottom .auth-pro-switch {
  margin: 0;
  text-align: right;
}

.auth-pro-field {
  display: grid;
  gap: 7px;
}

.auth-pro-field span {
  color: #344054;
  font-size: 13px;
  font-weight: 760;
}

.auth-pro-field input {
  width: 100%;
  height: 50px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 0 14px;
  background: #eaf2ff;
  color: #101828;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.auth-pro-field input::placeholder {
  color: #98a2b3;
}

.auth-pro-field input:hover {
  border-color: #9ca3af;
}

.auth-pro-field input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

/* 验证码/短信行：单外框 + 柔分隔；左右同色系，避免「两块拼贴」感 */
.auth-pro-captcha-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 50px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.auth-pro-captcha-row:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

.auth-pro-captcha-row input {
  flex: 1 1 auto;
  min-width: 0;
  height: auto;
  min-height: 50px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 14px;
  padding-right: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-pro-captcha-row input:hover {
  border-color: transparent;
}

.auth-pro-captcha-row input:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.auth-pro-captcha-trigger {
  flex: 0 0 128px;
  width: 128px;
  min-height: 50px;
  height: auto;
  align-self: stretch;
  border: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  /* 与左侧输入区同色系，避免灰色块偏「沉」 */
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.auth-pro-captcha-trigger img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fafbfc;
}

.auth-pro-captcha-trigger:hover {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-left-color: rgba(148, 163, 184, 0.32);
  color: #1e293b;
}

.auth-pro-captcha-trigger:hover img {
  background: #f4f6f9;
}

.auth-pro-captcha-trigger:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.45);
  outline-offset: -2px;
  z-index: 1;
}

.auth-pro-check {
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.auth-pro-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.auth-pro-check span {
  color: #475467;
  font-size: 13px;
  font-weight: 640;
}

.auth-pro-check a {
  color: #0284c7;
  font-weight: 780;
}

.auth-pro-check--muted span {
  font-size: 12px;
  font-weight: 520;
  color: #667085;
  line-height: 1.45;
}

.auth-pro-submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 860;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.18);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.24s ease, filter 0.2s ease;
}

.auth-pro-submit:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.22);
}

.auth-pro-submit:active {
  transform: translateY(0) scale(0.988);
}

.auth-pro-submit::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -32%;
  width: 28%;
  height: 190%;
  opacity: 0;
  transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.admin-nav-shell {
  margin-bottom: 16px;
}

.admin-nav-shell .admin-nav {
  margin-bottom: 0;
}

.admin-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 0;
}

.admin-nav-toggle-icon {
  display: inline-flex;
  line-height: 0;
}

.admin-nav-toggle-text {
  font-weight: 780;
}

.admin-nav-links .admin-nav-account-link:first-of-type {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-nav-drawer {
  position: relative;
}

.admin-nav-drawer-backdrop {
  display: none;
}

.admin-nav-drawer-head {
  display: none;
}

.admin-nav-drawer-panel {
  position: relative;
}

.admin-nav-drawer-close {
  display: none;
}

/* 管理后台：左侧导航 + 右侧操作区（桌面）；手机仍为抽屉 */
.admin-layout {
  display: grid;
  grid-template-columns: minmax(220px, 268px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 8px;
}

.admin-layout-main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.admin-layout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  align-self: start;
  position: sticky;
  top: 96px;
}

.admin-layout-sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-layout-sidebar-title {
  font-size: 17px;
  font-weight: 850;
  color: var(--text);
  text-decoration: none;
  line-height: 1.25;
}

.admin-layout-sidebar-title:hover {
  color: var(--primary);
}

.admin-layout-sidebar-sub {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.3;
}

.admin-layout-sidebar-brand-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.admin-layout-sidebar-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-layout-sidebar-platform {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-layout-sidebar-brand-main:hover .admin-layout-sidebar-platform {
  color: var(--primary);
}

.admin-layout-sidebar .admin-nav-shell {
  margin-bottom: 0;
}

.admin-layout-sidebar .admin-nav.admin-nav-links {
  margin-bottom: 0;
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 16px;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.1;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: none;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-1);
}

body.page-admin .table-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

body.page-admin .table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: none;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-1);
}

body.page-admin .table-wrap table,
body.page-admin .table-scroll table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  table-layout: auto;
}

body.page-admin .table-wrap th,
body.page-admin .table-wrap td,
body.page-admin .table-scroll th,
body.page-admin .table-scroll td {
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

/* 管理后台 · 生成记录表：整表不随提示词撑出视口，提示词列省略号（操作列留在屏内） */
body.page-admin .table-wrap table[data-admin-records] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

body.page-admin .table-wrap table[data-admin-records] td.admin-prompt-cell,
body.page-admin .table-wrap table[data-admin-records] th:nth-child(7) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* 管理后台 · 精选审核：提示词 2 行省略（悬停 title 看全文），避免长文案撑乱表格 */
body.page-admin .table-wrap table[data-admin-featured] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

body.page-admin .table-wrap table[data-admin-featured] td.admin-featured-prompt-cell {
  min-width: 0;
  vertical-align: top;
}

body.page-admin .table-wrap table[data-admin-featured] .admin-featured-prompt-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
  font-size: 13px;
  color: var(--text-soft);
}

body.page-admin .admin-users-table-wrap {
  overflow-x: visible;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

body.page-admin .admin-users-table-wrap .admin-users-unified-table {
  width: 100%;
  min-width: min(100%, 880px);
  max-width: none;
  table-layout: fixed;
}

body.page-admin .admin-users-table-wrap .admin-users-unified-table th,
body.page-admin .admin-users-table-wrap .admin-users-unified-table td {
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

.admin-table-scroll-hint {
  display: none;
}

@media (max-width: 720px) {
  body.page-admin .admin-table-scroll-hint {
    display: block;
    margin: 0 0 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 750;
    color: var(--muted);
    line-height: 1.45;
    border-radius: 10px;
    border: 1px dashed rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.06);
  }
}

table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line-secondary);
  padding: 17px 16px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5714285714285714;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom-color: var(--line-secondary);
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

tbody tr {
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

/* 管理后台：手机端抽屉导航 */
@media (max-width: 768px) {
  .admin-nav-shell {
    margin-bottom: 12px;
  }

  .admin-nav-toggle {
    display: inline-flex;
  }

  body.page-admin .admin-nav-shell > .admin-nav-toggle {
    display: none !important;
  }

  .admin-nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 10070;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.3s linear;
  }

  .admin-nav-shell.is-open .admin-nav-drawer {
    pointer-events: auto;
    visibility: visible;
  }

  .admin-nav-drawer-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .admin-nav-shell.is-open .admin-nav-drawer-backdrop {
    opacity: 1;
  }

  .admin-nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 12px 14px 16px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
    background: #fff;
  }

  .admin-nav-drawer-title {
    font-weight: 850;
    font-size: 16px;
    color: var(--text);
  }

  .admin-nav-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 40px;
    margin: -6px -4px -6px 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
  }

  .admin-nav-drawer-close:hover {
    background: rgba(148, 163, 184, 0.16);
  }

  .admin-nav-drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: min(88vw, 300px);
    height: 100%;
    max-height: 100%;
    background: #fff;
    box-shadow: 8px 0 36px rgba(15, 23, 42, 0.2);
    transform: translateX(-105%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
  }

  .admin-nav-shell.is-open .admin-nav-drawer-panel {
    transform: translateX(0);
  }

  .admin-nav-shell .admin-nav.admin-nav-links {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    margin-bottom: 0;
    padding: 12px 12px 24px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .admin-nav-shell .admin-nav-links .button {
    width: 100%;
    justify-content: flex-start;
    flex-shrink: 0;
    white-space: normal;
    text-align: left;
    min-height: 40px;
  }

  .admin-nav-shell .admin-nav-links .admin-nav-link {
    width: 100%;
    min-height: 40px;
  }

  body.page-admin .admin-layout {
    grid-template-columns: 1fr;
    /* 1fr 在多数引擎中等价于 minmax(auto,1fr)，第二行最小高度=子项内容高，会撑破视口且 main 无法出现滚动条 */
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    min-height: 0;
  }

  body.page-admin .admin-layout-sidebar {
    position: static;
    top: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 0;
  }

  body.page-admin .admin-layout-sidebar-brand {
    display: none;
  }

  body.page-admin .admin-layout {
    height: 100%;
    max-height: 100%;
  }

  body.page-admin .admin-layout-workspace {
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }

  body.page-admin .admin-layout-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  body.page-admin .admin-layout-main > .grid {
    min-height: 0;
  }
}

@media (min-width: 769px) {
  body.page-admin .app-shell {
    padding: 0;
  }

  body.page-admin .admin-layout {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    margin: 0;
    max-width: 100%;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  body.page-admin .admin-layout-sidebar {
    position: sticky;
    top: 0;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    padding: 16px 12px 20px;
    border: 0;
    border-radius: 0;
    border-right: 1px solid var(--admin-sidebar-border, #e8e8e8);
    background: var(--admin-sidebar-bg, #ffffff);
    box-shadow: none;
  }

  body.page-admin .admin-layout-sidebar-brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--admin-sidebar-border, #e8e8e8);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell {
    flex: 0 0 auto;
    margin-top: 0;
    margin-bottom: 0;
    overflow: visible;
  }

  body.page-admin .admin-layout-workspace {
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
  }

  body.page-admin .admin-layout-main {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 0 32px;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.page-admin .admin-layout-main .card,
  body.page-admin .admin-layout-main .stat-card {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.03),
      0 4px 14px rgba(15, 23, 42, 0.05);
    background: #fff;
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link {
    color: var(--admin-sidebar-nav-fg, rgba(0, 0, 0, 0.72));
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link:hover {
    background: var(--admin-sidebar-nav-hover-bg, rgba(0, 0, 0, 0.04));
    color: var(--text);
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link.active {
    background: var(--admin-sidebar-nav-active-pill, #e6f4ff);
    color: var(--admin-sidebar-nav-active-fg, #1677ff);
    font-weight: 750;
    padding-right: 20px;
    box-shadow: none;
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link.active::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 3px;
    height: 22px;
    margin-top: -11px;
    border-radius: 999px;
    background: var(--primary);
  }

  .admin-nav-shell .admin-nav-toggle {
    display: none !important;
  }

  .admin-nav-shell .admin-nav-drawer-head {
    display: none !important;
  }

  .admin-nav-shell .admin-nav-drawer-close {
    display: none !important;
  }

  .admin-nav-shell .admin-nav-drawer {
    position: relative;
    z-index: auto;
    pointer-events: auto;
    visibility: visible;
  }

  .admin-nav-shell .admin-nav-drawer-backdrop {
    display: none !important;
  }

  .admin-nav-shell .admin-nav-drawer-panel {
    position: static;
    width: auto;
    height: auto;
    max-height: none;
    transform: none !important;
    box-shadow: none;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .admin-layout-sidebar .admin-nav-shell .admin-nav.admin-nav-links {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: visible;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0;
    gap: 4px;
    flex: 0 0 auto;
    max-height: none;
  }

  .admin-layout-sidebar .admin-nav-shell .admin-nav.admin-nav-links::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    min-height: 40px;
  }
}

/* ========== 管理后台：Pro 壳（白侧栏 + 浮动顶栏 + 浅灰主区）========== */
html:has(body.page-admin) {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.page-admin {
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-soft: #e6f4ff;
  --primary-rgb: 22, 119, 255;
  --admin-sidebar-bg: #ffffff;
  --admin-sidebar-border: #e8e8e8;
  --admin-sidebar-nav-fg: rgba(0, 0, 0, 0.72);
  --admin-sidebar-nav-icon: rgba(0, 0, 0, 0.45);
  --admin-sidebar-nav-active-fg: #1677ff;
  --admin-sidebar-nav-active-icon: #1677ff;
  --admin-sidebar-nav-active-pill: #e6f4ff;
  --admin-sidebar-nav-hover-bg: rgba(0, 0, 0, 0.04);
  --admin-main-bg: #e8f2fc;
  --admin-main-bg-mid: #eef6fd;
  --admin-main-bg-soft: #f2f7fc;
  --brand-gradient: linear-gradient(135deg, var(--primary-active) 0%, var(--primary) 50%, var(--primary-hover) 100%);
  background: var(--admin-main-bg);
  background-image: linear-gradient(180deg, var(--admin-main-bg) 0%, var(--admin-main-bg-mid) 42%, var(--admin-main-bg-soft) 100%);
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 一屏布局：仅主内容区滚动，侧栏与顶栏固定 */
body.page-admin .app-shell {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.page-admin .admin-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/*
 * 少数页面把整块 admin-layout 包在 app-shell 下一层的 .grid 里。
 * 该包装层默认高度随内容增高，会使内部 main 无法形成「定高 + overflow」从而无法纵向滚动。
 */
body.page-admin .app-shell > .grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

body.page-admin .app-shell > .grid > .admin-layout {
  min-height: 0;
}

body.page-admin .admin-layout-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 8px 24px 0;
  gap: 10px;
  box-sizing: border-box;
  background: transparent;
}

body.page-admin .admin-layout-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
body.page-admin .admin-topbar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  min-height: 56px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

body.page-admin .admin-topbar-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

body.page-admin .admin-topbar-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  flex: 0 0 2px;
  min-height: 2px;
  max-height: 2px;
  box-sizing: border-box;
  border-radius: 1px;
  background: #262626;
}

body.page-admin .admin-topbar-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.page-admin .admin-topbar-title-text {
  font-size: 16px;
  font-weight: 750;
  color: #262626;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.page-admin .admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
  min-width: 0;
}

body.page-admin .admin-topbar-notify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #595959;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

body.page-admin .admin-topbar-notify:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--primary);
}

body.page-admin .admin-topbar-user-root {
  position: relative;
  flex-shrink: 0;
}

body.page-admin .admin-topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 4px 4px 8px;
  border-radius: 12px;
  transition: background 0.15s ease;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  box-sizing: border-box;
}

body.page-admin .admin-topbar-user:hover {
  background: rgba(0, 0, 0, 0.03);
}

body.page-admin .admin-topbar-user:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.45);
  outline-offset: 2px;
}

body.page-admin .admin-topbar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-active) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}

body.page-admin .admin-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

body.page-admin .admin-nav-link-icon {
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link:hover .admin-nav-link-icon {
    color: var(--primary);
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link.active {
    background: var(--admin-sidebar-nav-active-pill, #e6f4ff);
    color: var(--admin-sidebar-nav-active-fg, #1677ff);
    font-weight: 750;
    padding-right: 20px;
    box-shadow: none;
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link.active::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 3px;
    height: 22px;
    margin-top: -11px;
    border-radius: 999px;
    background: var(--primary);
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link.active .admin-nav-link-icon {
    color: var(--admin-sidebar-nav-active-icon, #1677ff);
  }

  body.page-admin .admin-nav-links .admin-nav-account-link:first-of-type {
    border-top-color: var(--admin-sidebar-border);
  }

  body.page-admin .admin-dash-stat-grid--kpi-pro {
    grid-template-columns: 1fr;
  }

  body.page-admin .admin-layout-main {
    background: transparent;
  }

  body.page-admin .admin-layout-main .card,
  body.page-admin .admin-layout-main .stat-card {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.03),
      0 4px 14px rgba(15, 23, 42, 0.05);
  }

body.page-admin .admin-topbar-user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.2;
}

body.page-admin .admin-topbar-user-name {
  font-size: 13px;
  font-weight: 700;
  color: #101828;
}

body.page-admin .admin-topbar-user-role {
  font-size: 11px;
  color: #98a2b3;
}

body.page-admin .admin-topbar-user-chevron {
  display: grid;
  place-items: center;
  color: #98a2b3;
  flex-shrink: 0;
}

body.page-admin .admin-topbar-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 120;
  min-width: 148px;
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  box-sizing: border-box;
}

body.page-admin .admin-topbar-user-menu[hidden] {
  display: none !important;
}

body.page-admin .admin-topbar-user-root.is-open .admin-topbar-user-menu {
  display: block !important;
}

body.page-admin .admin-topbar-user-menu__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  color: #262626;
  text-decoration: none;
  box-sizing: border-box;
}

body.page-admin .admin-topbar-user-menu__item:hover {
  background: #f5f7fa;
}

body.page-admin .admin-topbar-user-menu__item--danger {
  color: #cf1322;
}


/* ---------- 授权系统补充 ---------- */
.flash { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.flash--error { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }
.flash--success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.badge--ok { background: #f6ffed; color: #389e0d; }
.badge--warn { background: #fffbe6; color: #d48806; }
.badge--danger { background: #fff2f0; color: #cf1322; }
.badge--muted { background: #f5f5f5; color: #595959; }
.admin-empty-cell { text-align: center; color: #8c8c8c; padding: 24px !important; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-admin-form { display: inline; }
.admin-table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.license-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.license-quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.license-api-hint { margin-top: 8px; }
.license-code-block { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 10px; overflow: auto; font-size: 13px; }
.license-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.stats-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.auth-pro-page--center { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(180deg, #e8f2fc 0%, #f2f7fc 100%); }
.auth-pro-shell--narrow { max-width: 980px; width: 100%; }
.auth-pro-submit { width: 100%; margin-top: 8px; }
/* ---------- 安装向导（与生图站 auth-pro 同风格） ---------- */
body.page-install {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #e8f2fc 0%, #eef6fd 42%, #f2f7fc 100%);
}

body.page-install .auth-pro-page--center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 40px);
  box-sizing: border-box;
}

body.page-install .install-pro-shell {
  width: 100%;
  max-width: 1080px;
  min-height: 0;
}

body.page-install .install-pro-showcase h1 {
  font-size: clamp(32px, 3.6vw, 48px);
}

body.page-install .install-pro-metrics article strong {
  font-size: 22px;
  color: var(--primary);
}

body.page-install .install-pro-form-side {
  max-height: min(92vh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.page-install .install-pro-section {
  padding: 18px 0;
  border-bottom: 1px solid #eef2f6;
}

body.page-install .install-pro-section:first-of-type {
  padding-top: 4px;
}

body.page-install .install-pro-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 8px;
}

body.page-install .install-pro-section__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

body.page-install .install-pro-section__step {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.28);
}

body.page-install .install-pro-section__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

body.page-install .install-pro-section__head p {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #667085;
  line-height: 1.45;
}

body.page-install .install-pro-grid {
  display: grid;
  gap: 12px;
}

body.page-install .install-pro-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.page-install .install-pro-form .auth-pro-field {
  margin-bottom: 0;
}

body.page-install .install-pro-form .install-pro-grid + .auth-pro-field,
body.page-install .install-pro-form .auth-pro-field + .install-pro-grid {
  margin-top: 12px;
}

body.page-install .install-pro-submit {
  width: 100%;
  margin-top: 20px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.28);
}

body.page-install .flash {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

body.page-install .flash--error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
}

@media (max-width: 900px) {
  body.page-install .install-pro-shell {
    grid-template-columns: 1fr;
  }

  body.page-install .auth-pro-showcase {
    display: grid;
    padding: clamp(24px, 5vw, 36px);
  }

  body.page-install .install-pro-showcase h1 {
    font-size: 28px;
  }

  body.page-install .auth-pro-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.page-install .install-pro-grid--2 {
    grid-template-columns: 1fr;
  }

  body.page-install .auth-pro-metrics {
    grid-template-columns: 1fr;
  }

  body.page-install .install-pro-form-side {
    max-height: none;
  }
}
body.page-admin .admin-topbar-menu { display: none; }
body.page-admin .admin-topbar-user-btn { display: flex; align-items: center; gap: 8px; border: 1px solid #e8e8e8; border-radius: 10px; padding: 6px 10px; background: #fff; cursor: pointer; }
body.page-admin .admin-topbar-user-avatar { width: 28px; height: 28px; border-radius: 50%; background: #e6f4ff; color: #1677ff; display: grid; place-items: center; font-weight: 700; }
body.page-admin .admin-topbar-user-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 140px; background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 6px 0; z-index: 50; }
body.page-admin .admin-topbar-user-panel a { display: block; padding: 10px 14px; color: #262626; text-decoration: none; }
body.page-admin .admin-topbar-user-panel a:hover { background: #f5f5f5; }
body.page-admin .admin-topbar-user { position: relative; }
body.page-admin .admin-topbar h1 { margin: 0; font-size: 16px; font-weight: 750; }
body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link:hover { background: var(--admin-sidebar-nav-hover-bg); }
body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link.active { background: #e6f4ff; color: #1677ff; font-weight: 750; }
@media (max-width: 768px) {
  body.page-admin .admin-topbar-menu { display: inline-flex; }
  .stats-grid, .stats-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-pro-shell { grid-template-columns: 1fr; }
  .auth-pro-showcase { display: none; }
  body.page-install .auth-pro-showcase { display: grid; }
  body.page-install .install-pro-shell { grid-template-columns: 1fr; }
}
