/* 狗蛋APP管理系统 - Art-Design-Pro 风格管理后台
   设计语言源自 Element Plus 设计规范 · 大圆角 · 柔和阴影 · 分层留白 · 移动端优先 */

/* ============ 设计令牌 ============ */
:root {
  /* 主色 - Element Plus 经典蓝 */
  --c-primary: #409eff;
  --c-primary-hover: #337ecc;
  --c-primary-active: #2b6cb0;
  --c-primary-light: rgba(64, 158, 255, 0.10);
  --c-primary-soft: rgba(64, 158, 255, 0.06);
  --c-primary-lighter: #ecf5ff;
  --c-primary-border: rgba(64, 158, 255, 0.28);

  /* 兼容旧别名（历史模板引用） */
  --c-blue: var(--c-primary);
  --c-blue-hover: var(--c-primary-hover);

  /* 状态色 */
  --c-success: #67c23a;
  --c-success-light: #f0f9eb;
  --c-success-hover: #529b2e;
  --c-green: var(--c-success);
  --c-warning: #e6a23c;
  --c-warning-light: #fdf6ec;
  --c-warning-hover: #b88230;
  --c-orange: var(--c-warning);
  --c-danger: #f56c6c;
  --c-danger-light: #fef0f0;
  --c-danger-hover: #c45656;
  --c-red: var(--c-danger);
  --c-info: #909399;
  --c-info-light: #f4f4f5;

  /* 中性色 - 对齐 Element Plus 文本层级 */
  --c-bg: #f0f2f5;
  --c-bg-alt: #e8eaee;
  --c-card: #ffffff;
  --c-text: #303133;
  --c-text2: #606266;
  --c-text3: #909399;
  --c-text4: #c0c4cc;
  --c-text-light: var(--c-text3);
  --c-border: #ebeef5;
  --c-border-strong: #dcdfe6;
  --c-sep: var(--c-border);
  --c-fill: #f5f7fa;
  --c-fill2: #ebeef5;
  --c-gray: var(--c-text3);

  /* 尺寸 - 大圆角 + 分层柔和阴影 */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow: 0 1px 2px rgba(31, 45, 61, 0.05);
  --shadow-card: 0 2px 12px rgba(31, 45, 61, 0.06);
  --shadow-hover: 0 8px 28px rgba(31, 45, 61, 0.12);
  --shadow-pop: 0 12px 48px rgba(31, 45, 61, 0.16);
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
  --max-w: 1200px;
  --topbar-h: 64px;
  --sidebar-w: 208px;

  /* ---- KaiUI Admin 风格令牌：扁平、细边、紧凑 ---- */
  --k-sidebar-bg: #ffffff;
  --k-page-bg: #f6f7f9;
  --k-nav-h: 44px;
  --k-nav-h-active: 46px;
  --k-active-bar: 3px;
  --k-mobile-tab-h: 58px;
}

/* ============ 基础 ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d7de; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b9bec9; }
html { scrollbar-width: thin; scrollbar-color: #d4d7de transparent; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue", sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body { min-height: 100vh; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-primary-hover); }
img { max-width: 100%; display: block; }
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--c-fill);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--c-text2);
}
h1, h2, h3, h4 { font-weight: 600; color: var(--c-text); line-height: 1.4; letter-spacing: -0.01em; }

/* ============ 顶部导航 ============ */
.topbar {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(235, 238, 245, 0.9);
  position: sticky; top: 0; z-index: 100;
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 24px;
}
.brand {
  font-size: 16.5px; font-weight: 700;
  color: var(--c-text);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.brand .logo-img {
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover;
  box-shadow: 0 3px 10px rgba(64, 158, 255, 0.28);
}
.brand:hover { color: var(--c-text); }

.nav-menu { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav-menu a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px;
  color: var(--c-text2);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.nav-menu a .ni { width: 17px; height: 17px; flex-shrink: 0; stroke-width: 1.9; }
.nav-menu a:hover { background: var(--c-fill); color: var(--c-text); }
.nav-menu a.active { color: var(--c-primary); background: var(--c-primary-lighter); font-weight: 600; }

.nav-user { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-user .quota { font-size: 12.5px; color: var(--c-text3); }
.nav-user > a:not(.btn) {
  font-size: 13.5px; color: var(--c-text2); font-weight: 500;
  padding: 7px 12px; border-radius: 9px;
  transition: background var(--transition), color var(--transition);
}
.nav-user > a:not(.btn):hover { background: var(--c-fill); color: var(--c-text); }

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: none; background: none; cursor: pointer; padding: 0;
  flex-shrink: 0;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--c-text2); border-radius: 2px; transition: all .3s cubic-bezier(.4,0,.2,1); }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ 容器 ============ */
.container { max-width: var(--max-w); margin: 28px auto; padding: 0 24px; }
.container-sm { max-width: 470px; margin: 72px auto; padding: 0 20px; }

/* ============ 卡片 ============ */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 18px;
}
.card-title {
  font-size: 16px; font-weight: 650;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  color: var(--c-text);
}
.card-title .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-title .actions a { font-size: 13px; }

/* ---- KaiUI 风格内容卡片：扁平白卡 + 内置标题栏 + 表头 ---- */
.admin-main > .card {
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(31, 45, 61, 0.04);
  border-color: #eceef2;
  padding: 0;
  min-width: 0;
  /* 只裁圆角，不建立内容裁剪上下文：内容区必须能随页面正常增长，
     否则内部宽表格/表单会被静默切掉右侧，表现为「右侧主内容显示不全」。 */
  overflow: clip;
  overflow-clip-margin: 0;
}
.admin-main > .card > .card-title {
  margin: 0; padding: 18px 22px;
  border-bottom: 1px solid #f0f1f4;
  font-size: 16.5px;
}
.admin-main > .card > .card-title .card-title-ico { font-size: 16.5px; }
.admin-main > .card > .card-title .card-title-ico svg { width: 18px; height: 18px; }
.admin-main > .card > :not(.card-title) { padding-left: 22px; padding-right: 22px; }
.admin-main > .card > table.table { margin: 0; }
.admin-main > .card > .empty { padding: 20px 22px; }
.admin-main > .card > .pagination { padding: 14px 22px 18px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px;
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  background: var(--c-card);
  color: var(--c-text2);
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--c-primary-lighter); border-color: var(--c-primary-border); color: var(--c-primary); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--c-primary-light); }

.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; box-shadow: 0 3px 10px rgba(64, 158, 255, 0.3); }
.btn-primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); color: #fff; box-shadow: 0 5px 16px rgba(64, 158, 255, 0.4); }
.btn-success { background: var(--c-success); border-color: var(--c-success); color: #fff; box-shadow: 0 3px 10px rgba(103, 194, 58, 0.28); }
.btn-success:hover { background: var(--c-success-hover); border-color: var(--c-success-hover); color: #fff; box-shadow: 0 5px 16px rgba(103, 194, 58, 0.36); }
.btn-warning { background: var(--c-warning); border-color: var(--c-warning); color: #fff; box-shadow: 0 3px 10px rgba(230, 162, 60, 0.28); }
.btn-warning:hover { background: var(--c-warning-hover); border-color: var(--c-warning-hover); color: #fff; box-shadow: 0 5px 16px rgba(230, 162, 60, 0.36); }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; box-shadow: 0 3px 10px rgba(245, 108, 108, 0.28); }
.btn-danger:hover { background: var(--c-danger-hover); border-color: var(--c-danger-hover); color: #fff; box-shadow: 0 5px 16px rgba(245, 108, 108, 0.36); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 13px 30px; font-size: 15.5px; border-radius: 12px; }
.btn-block { display: flex; width: 100%; }
.btn-round { border-radius: 999px; }

/* ============ 表单 ============ */
.form-group { margin-bottom: 18px; }
.form-group > label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 8px; color: var(--c-text2);
}
.form-group > label .req { color: var(--c-danger); margin-left: 2px; }
.form-group .hint { font-size: 12.5px; color: var(--c-text3); margin-top: 6px; line-height: 1.55; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  font-size: 14px; font-family: inherit;
  background: var(--c-card);
  color: var(--c-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-control::placeholder { color: var(--c-text4); }
.form-control:hover { border-color: var(--c-text4); }
.form-control:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-light);
}
select.form-control {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23909399'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 34px;
  cursor: pointer;
}
textarea.form-control { resize: vertical; min-height: 96px; line-height: 1.65; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row > * { min-width: 0; }
.form-check { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.form-check label { margin: 0; font-size: 14px; color: var(--c-text2); cursor: pointer; }
.form-check input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--c-primary); cursor: pointer; flex-shrink: 0; }
.form-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--c-border);
}

/* 卡密兑换 / 生成卡密 内联表单 */
.redeem-form, .cards-gen-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.redeem-form .form-control { flex: 1; min-width: 200px; }
.cards-gen-form select { flex: 1; min-width: 200px; }
.cards-gen-form input[type=number] { width: 120px; flex-shrink: 0; }

/* 开关组件 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; vertical-align: middle; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--c-border-strong); border-radius: 999px;
  transition: background var(--transition);
}
.slider:before {
  position: absolute; content: ""; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(31, 45, 61, 0.25);
  transition: transform var(--transition);
}
.switch input:checked + .slider { background: var(--c-primary); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px var(--c-primary-light); }

/* 分区卡片（开屏广告 / iOS 描述文件） */
.sub-card {
  margin: 22px 0; padding: 20px;
  border: 1px solid var(--c-primary-border);
  background: linear-gradient(135deg, var(--c-primary-soft) 0%, rgba(255, 255, 255, 0.6) 100%);
  border-radius: var(--radius);
}
.sub-card-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.sub-card-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sub-card-ico {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--c-primary) 0%, #66b1ff 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(64, 158, 255, 0.32);
}
.sub-card-ico.ico-ios { background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%); box-shadow: 0 3px 10px rgba(20, 184, 166, 0.32); }
.sub-card-name { font-weight: 650; color: var(--c-text); font-size: 15px; }
.sub-card-sub { font-size: 12.5px; color: var(--c-text3); margin-top: 3px; line-height: 1.5; }
.sub-card-head:not(:last-child) { margin-bottom: 18px; }
.build-hint { margin-top: 12px; font-size: 13px; color: var(--c-text3); line-height: 1.65; }

/* ============ 文件上传 ============ */
.upload-box {
  display: block;
  border: 1.5px dashed var(--c-border-strong);
  border-radius: var(--radius); padding: 24px;
  text-align: center; cursor: pointer;
  transition: all var(--transition); background: var(--c-fill);
}
.upload-box:hover { border-color: var(--c-primary); background: var(--c-primary-lighter); }
.upload-box input { display: none; }
.upload-box .preview {
  width: 96px; height: 96px; margin: 0 auto 10px;
  border-radius: 22%;
  background: var(--c-primary-lighter);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--c-primary); overflow: hidden;
}
.upload-box .preview img { width: 100%; height: 100%; object-fit: contain; }
.upload-box .tip { font-size: 12.5px; color: var(--c-text3); }
.upload-box.media { border: 1.5px dashed var(--c-border-strong); background: var(--c-card); }
.upload-box.media .preview {
  width: 100%; max-width: 300px; aspect-ratio: 9/16; height: auto;
  border-radius: var(--radius); background: var(--c-fill);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; overflow: hidden;
}
.upload-box.media .preview img,
.upload-box.media .preview video { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); display: block; }
.upload-box.media .preview .up-center { text-align: center; color: var(--c-text3); padding: 10px; }
.upload-box.media .preview .up-plus { font-size: 36px; line-height: 1; margin-bottom: 8px; }
.upload-box.media .preview .up-main { font-size: 13.5px; color: var(--c-text2); font-weight: 550; }
.upload-box.media .preview .up-note { font-size: 12px; color: var(--c-text3); margin-top: 5px; }

/* 截图上传 */
.shots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; }
.shot-item {
  aspect-ratio: 9/16; background: var(--c-fill);
  border: 1.5px dashed var(--c-border-strong);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; position: relative;
  transition: all var(--transition);
}
.shot-item:hover { border-color: var(--c-primary); background: var(--c-primary-lighter); }
.shot-item img { width: 100%; height: 100%; object-fit: cover; }
.shot-item .plus { font-size: 24px; color: var(--c-text3); }
.shot-item input { display: none; }

/* 详情页截图展示 */
.dl-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; }
.dl-shots img { border-radius: var(--radius); border: 1px solid var(--c-border); width: 100%; }

/* ============ 提示 ============ */
.alert {
  padding: 13px 17px; border-radius: 10px;
  margin-bottom: 18px; font-size: 13.5px;
  border: 1px solid transparent; line-height: 1.6;
}
.alert-error { background: var(--c-danger-light); color: var(--c-danger-hover); border-color: rgba(245, 108, 108, 0.28); }
.alert-success { background: var(--c-success-light); color: var(--c-success-hover); border-color: rgba(103, 194, 58, 0.28); }
.alert-info { background: var(--c-primary-lighter); color: var(--c-primary-hover); border-color: var(--c-primary-border); }
.alert-warning { background: var(--c-warning-light); color: var(--c-warning-hover); border-color: rgba(230, 162, 60, 0.28); }

/* ============ 套餐卡片 ============ */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(255px, 100%), 1fr)); gap: 18px; }
.plan-card {
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 26px 24px; box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.plan-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-primary) 0%, #66b1ff 100%);
  opacity: 0; transition: opacity var(--transition);
}
.plan-card:hover { box-shadow: var(--shadow-hover); border-color: var(--c-primary-border); transform: translateY(-5px); }
.plan-card:hover::before { opacity: 1; }
.plan-name { font-size: 17px; font-weight: 650; margin-bottom: 12px; }
.plan-price { margin-bottom: 14px; display: flex; align-items: baseline; }
.price-now { font-size: 30px; color: var(--c-primary); font-weight: 700; letter-spacing: -0.03em; }
.price-now::before { content: "¥"; font-size: 17px; margin-right: 2px; font-weight: 600; }
.price-old { text-decoration: line-through; color: var(--c-text3); margin-left: 10px; font-size: 13.5px; }
.plan-desc { font-size: 13px; color: var(--c-text3); margin-bottom: 16px; flex: 1; line-height: 1.65; }
.plan-tags { margin-bottom: 16px; display: flex; gap: 7px; flex-wrap: wrap; }
.plan-cta {
  display: block; text-align: center; padding: 11px;
  background: var(--c-primary-lighter); color: var(--c-primary);
  border-radius: 10px; font-size: 13.5px; font-weight: 600;
  transition: all var(--transition);
}
.plan-cta:hover { background: var(--c-primary); color: #fff; }

/* 登录 / 注册 / 找回密码 */
/* 认证页整页：浅蓝灰底 + 垂直居中（对齐 KaiUI 授权系统风格） */
body:has(.auth-page) {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3fa 100%);
}
body:has(.auth-page) .topbar { display: none; }
body:has(.auth-page) .footer {
  margin-top: auto; padding: 20px 24px 26px;
  color: #98a2b3; font-size: 12.5px;
}
body:has(.auth-page) .footer a { color: #98a2b3; }
.auth-page {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  padding: 44px 20px; width: 100%;
}
.auth-wrap { width: 100%; max-width: 420px; }
.auth-card {
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 16px; padding: 40px 36px 34px;
  box-shadow: 0 10px 40px rgba(31, 45, 61, 0.07), 0 1px 3px rgba(31, 45, 61, 0.04);
}
.auth-head { text-align: center; margin-bottom: 30px; }
.auth-logo {
  width: 60px; height: 60px; border-radius: 16px; object-fit: cover;
  display: inline-block; margin-bottom: 18px;
}
.auth-title { font-size: 21px; font-weight: 700; color: #1f2d3d; margin: 0 0 8px; letter-spacing: -0.01em; }
.auth-sub { font-size: 13px; color: #8b95a5; margin: 0; line-height: 1.6; }

/* 极简下划线输入框 */
.auth-card .form-group { margin-bottom: 22px; }
.auth-card .form-group > label {
  display: block; font-size: 13px; font-weight: 600;
  color: #5a6a80; margin-bottom: 9px;
}
.auth-card .form-control {
  width: 100%; border: 1px solid #e3e8ef; border-radius: 9px;
  background: #fbfcfe; padding: 12px 14px;
  font-size: 14.5px; color: #1f2d3d;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-card .form-control::placeholder { color: #aab4c3; }
.auth-card .form-group .optional { color: #aab4c3; font-weight: 400; font-size: 12px; }
.auth-card .form-group .req { color: #f56c6c; font-weight: 400; }
.auth-card .form-group .hint { font-size: 12px; color: #aab4c3; margin-top: 7px; }
.auth-card .form-control:focus {
  outline: none; background: #fff;
  border-color: #409eff;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.12);
}
.auth-card .btn-lg {
  width: 100%; height: 46px; border-radius: 9px;
  font-size: 15px; font-weight: 600; letter-spacing: .04em;
  margin-top: 6px;
}

.auth-foot { margin-top: 22px; text-align: center; font-size: 13px; color: #8b95a5; }
.auth-foot a { font-weight: 600; color: #409eff; }
.auth-foot a:hover { color: #2b6cb0; }
/* 登录页底部：左「还没有账号？立即注册」/ 右「忘记密码？」 */
.auth-foot-split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.code-row { display: flex; gap: 10px; }
.code-row .form-control { flex: 1; min-width: 0; }
.code-btn { white-space: nowrap; min-width: 112px; flex-shrink: 0; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 18px; color: #aab4c3; font-size: 12.5px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: #eef1f6;
}
.auth-perks {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px;
  padding-top: 20px; border-top: 1px solid #f2f4f8;
}
.auth-perks span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #8b95a5;
  background: #f7f9fc; border: 1px solid #eef1f6;
  padding: 4px 11px; border-radius: 999px;
}
.auth-perks svg { width: 13px; height: 13px; color: #67c23a; }

/* 找回密码：步骤提示 */
.auth-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 24px;
}
.auth-steps .st {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #aab4c3; font-weight: 500;
}
.auth-steps .st i {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f2f4f8; color: #aab4c3;
  font-style: normal; font-size: 11.5px; font-weight: 700;
}
.auth-steps .st.on { color: #409eff; }
.auth-steps .st.on i { background: #409eff; color: #fff; }
.auth-steps .sep { width: 22px; height: 1px; background: #e3e8ef; }

@media (max-width: 620px) {
  .auth-page { padding: 24px 16px; align-items: flex-start; }
  .auth-card { padding: 28px 22px 24px; border-radius: var(--radius-lg); }
  .auth-title { font-size: 20px; }
  .auth-logo { width: 54px; height: 54px; border-radius: 16px; }
}

/* ============ 表格 ============ */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--c-border); }
.table th {
  background: var(--c-fill); font-weight: 600; color: var(--c-text2);
  font-size: 13px; white-space: nowrap;
}
.table thead tr:first-child th:first-child { border-top-left-radius: var(--radius-sm); }
.table thead tr:first-child th:last-child { border-top-right-radius: var(--radius-sm); }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover td { background: var(--c-primary-lighter); }
.table tbody tr:last-child td { border-bottom: none; }
.table td.url-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table td.url-cell a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.scroll-x .table td.url-cell { max-width: 320px; }
.table td > .btn + .btn { margin-left: 6px; }

/* KaiUI 风格表格：更扁、更克制的高亮 */
body:has(.admin-layout) .table { font-size: 13.5px; }
body:has(.admin-layout) .table th,
body:has(.admin-layout) .table td { padding: 12px 16px; border-bottom-color: #f2f3f6; }
body:has(.admin-layout) .table th {
  background: #fafbfc; color: var(--c-text3);
  font-size: 12.5px; font-weight: 600;
}
body:has(.admin-layout) .table thead tr:first-child th:first-child,
body:has(.admin-layout) .table thead tr:first-child th:last-child { border-radius: 0; }
body:has(.admin-layout) .table tbody tr:hover td { background: #f8fafd; }

.detail-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; table-layout: fixed; }
.detail-table th, .detail-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--c-border); }
.detail-table th { width: 118px; white-space: normal; vertical-align: middle; background: var(--c-fill); font-size: 13px; color: var(--c-text2); font-weight: 600; }
.detail-table td { vertical-align: middle; color: var(--c-text); word-break: break-word; }
.detail-table code { word-break: break-all; }
.detail-table tr:last-child th, .detail-table tr:last-child td { border-bottom: none; }

/* 详情/编辑页表单元素 */
.input-xs { width: 76px !important; }
.input-sm { width: 200px !important; }
.input-md { width: 300px !important; }
.input-lg { width: 100%; max-width: 500px; }
.input-xl { width: 100%; max-width: 620px; }
.muted { color: var(--c-text3); }
.field-label { font-size: 13.5px; color: var(--c-text2); font-weight: 600; margin-bottom: 6px; }
.file-input { font-size: 13px; color: var(--c-text2); margin-top: 6px; }
.check-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; color: var(--c-text2); cursor: pointer; }
.check-line input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--c-primary); cursor: pointer; }
.inline-fields { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.inline-fields .check-line { margin-top: 0; font-size: 14px; }
.inline-label { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--c-text2); }
.stack-fields { display: flex; flex-direction: column; gap: 14px; }
.media-current { margin-bottom: 10px; font-size: 13px; color: var(--c-text3); }
.media-icon { width: 68px; height: 68px; border-radius: 14px; vertical-align: middle; margin-left: 10px; display: inline-block; box-shadow: var(--shadow); }
.media-splash { max-width: 200px; border-radius: var(--radius-sm); vertical-align: middle; margin-left: 10px; display: inline-block; }
.shot-mini-grid { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.shot-mini { width: 84px; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--c-border); }

/* 通用工具类 */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.fs-12 { font-size: 12px; }
.text-primary { color: var(--c-primary); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.mono-sm { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--c-text3); }
.ellip-180 { display: inline-block; max-width: min(180px, 26vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.oaid-cell { display: inline-block; max-width: 100%; overflow-wrap: anywhere; word-break: break-all; white-space: normal; line-height: 1.45; vertical-align: bottom; }
.ellip-100 { display: inline-block; max-width: min(100px, 18vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.form-inline { display: inline; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-title-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager-info { font-size: 12.5px; color: var(--c-text3); }
.cards-codes { min-height: 300px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.8; }
.plan-info { padding: 13px 16px; background: var(--c-primary-lighter); border-radius: 10px; font-size: 13px; color: var(--c-primary-hover); border: 1px solid var(--c-primary-border); }
.hint-gap { margin-bottom: 18px; }
.form-static { background: var(--c-fill); color: var(--c-text3); cursor: default; }
.url-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.tag-success { background: var(--c-success-light); color: var(--c-success-hover); }
.tag-warning { background: var(--c-warning-light); color: var(--c-warning-hover); }
.tag-danger { background: var(--c-danger-light); color: var(--c-danger-hover); }
.tag-info { background: var(--c-primary-lighter); color: var(--c-primary-hover); }
.tag-gray { background: var(--c-info-light); color: var(--c-text3); }

/* ============ 重新打包进度条 ============ */
.build-progress { margin-top: 16px; padding: 16px 18px; background: var(--c-fill); border-radius: 12px; border: 1px solid var(--c-border); }
.build-progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.build-progress-label { font-size: 13px; font-weight: 600; color: var(--c-text1); }
.build-progress-pct { font-size: 13px; font-weight: 700; color: var(--c-primary); font-variant-numeric: tabular-nums; }
.build-progress-track { height: 8px; background: var(--c-border); border-radius: 999px; overflow: hidden; }
.build-progress-bar { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--c-primary), var(--c-primary-hover)); transition: width .45s ease, background .3s ease; }
.build-progress-hint { margin-top: 10px; font-size: 12px; color: var(--c-text3); }
.build-result { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 13px; line-height: 1.7; }
.build-result-err { background: var(--c-danger-light); color: var(--c-danger-hover); border: 1px solid rgba(245, 108, 108, .3); }
.meta-line { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--c-border); font-size: 13px; color: var(--c-text2); }
.meta-line b { color: var(--c-text1); }
.tag-force-on { color: var(--c-danger-hover); }
.tag-force-off { color: var(--c-text3); font-weight: 500; }

/* ============ 设备信息筛选 ============ */
.filter-cnt {
  display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: 999px;
  background: rgba(0, 0, 0, .06); font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 18px;
}
.btn-primary .filter-cnt { background: rgba(255, 255, 255, .24); }
/* OAID 未取到时，同一格里显示失败原因（暗红色，比正常 OAID 弱一点） */
.oaid-fail { color: var(--c-danger-hover); font-size: 12.5px; }

/* ============ 设备信息筛选栏 ============ */
.dev-filter { margin: 4px 0 16px; padding: 12px 14px; background: var(--c-fill); border: 1px solid var(--c-border); border-radius: 12px; }
.dev-filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dev-filter-input {
  flex: 1 1 260px; min-width: 200px;
  height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text1);
  font-size: 13px; font-family: inherit;
}
.dev-filter-input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-light, rgba(64,158,255,.14)); }
.dev-filter-select {
  flex: 0 1 auto; min-width: 128px; max-width: 220px;
  height: 36px; padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text1);
  font-size: 13px; font-family: inherit; cursor: pointer;
}
.dev-filter-select:focus { outline: none; border-color: var(--c-primary); }

.table-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }

/* ============ 空状态 / 分页 ============ */
.empty { text-align: center; padding: 56px 24px; color: var(--c-text3); }
.empty .icon { font-size: 42px; margin-bottom: 14px; opacity: .3; }
.empty p { margin-bottom: 16px; font-size: 14px; }
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 22px; }
.pagination a, .pagination span {
  padding: 7px 14px; border-radius: 9px;
  font-size: 13.5px; background: var(--c-card);
  border: 1px solid var(--c-border); color: var(--c-text2);
  transition: all var(--transition);
}
.pagination a:hover { background: var(--c-primary-lighter); border-color: var(--c-primary-border); color: var(--c-primary); }
.pagination .current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(64, 158, 255, 0.3); }

/* ============ 首页（新版） ============ */
.land-hero-wrap {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 460px at 78% -12%, rgba(64, 158, 255, 0.16), transparent 62%),
    radial-gradient(640px 400px at 8% 108%, rgba(103, 194, 58, 0.11), transparent 62%),
    #fff;
  border-bottom: 1px solid var(--c-border);
}
.land-hero-wrap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(64, 158, 255, 0.055) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(64, 158, 255, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 72% 12%, #000, transparent 74%);
  mask-image: radial-gradient(circle at 72% 12%, #000, transparent 74%);
}
.land-hero {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.06fr .94fr; gap: 56px; align-items: center;
  padding: 78px 0 86px;
}
.land-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
  background: var(--c-primary-lighter); color: var(--c-primary);
  border: 1px solid var(--c-primary-border); margin-bottom: 20px;
}
.land-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-primary); box-shadow: 0 0 0 3px rgba(64, 158, 255, .2); }
h1.land-title { font-size: 47px; line-height: 1.16; letter-spacing: -1.4px; font-weight: 800; margin-bottom: 19px; }
h1.land-title em {
  font-style: normal; position: relative;
  background: linear-gradient(120deg, #409eff, #2b6cb0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.land-sub { font-size: 16.5px; color: var(--c-text2); max-width: 520px; margin-bottom: 30px; line-height: 1.7; }
.land-cta { display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 32px; }
.land-stats { display: flex; gap: 34px; flex-wrap: wrap; padding-top: 26px; border-top: 1px dashed var(--c-border); }
.land-stat .n { font-size: 26px; font-weight: 800; letter-spacing: -.7px; color: var(--c-text); }
.land-stat .n span { font-size: 14px; color: var(--c-primary); margin-left: 2px; }
.land-stat .l { font-size: 12.5px; color: var(--c-text3); margin-top: 1px; }

.land-console {
  background: #1e2430; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-pop); border: 1px solid rgba(255, 255, 255, .07);
  transform: perspective(1400px) rotateY(-5deg) rotateX(2deg);
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
/* 3D 变换后左右探出的部分不裁切（容器需留出空间） */
.land-hero { overflow: visible; }
@media (max-width: 1100px) {
  .land-console { transform: none; }
}
.land-console:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.land-console-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: rgba(255, 255, 255, .05); border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.land-console-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.land-console-bar i:nth-child(1) { background: #ff5f57; }
.land-console-bar i:nth-child(2) { background: #febc2e; }
.land-console-bar i:nth-child(3) { background: #28c840; }
.land-console-bar .t { margin-left: 9px; font-size: 12px; color: #8b95a5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.land-console-body { padding: 20px 22px 24px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 2.05; color: #c8d0dc; }
.land-console-body .k { color: #7ec4ff; }
.land-console-body .s { color: #a5e075; }
.land-console-body .c { color: #5f6b7d; }
.land-console-body .f { color: #ffd479; }
.land-console-body .p { color: #c792ea; }
.land-console-badge {
  margin-top: 16px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .07);
  display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #8b95a5;
}
.land-console-badge .ok { color: #28c840; font-weight: 700; }

.land-section { padding: 74px 0; }
.land-section-gray { background: #fff; border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.land-sec-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.land-sec-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 2.2px;
  color: var(--c-primary); text-transform: uppercase; margin-bottom: 12px;
}
.land-sec-head h2 { font-size: 33px; font-weight: 750; letter-spacing: -.9px; margin-bottom: 13px; line-height: 1.25; }
.land-sec-head p { font-size: 15.5px; color: var(--c-text2); }

.land-feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.land-feat {
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 26px 23px; box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative; overflow: hidden;
}
.land-feat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-primary), #67c23a);
  transform: scaleX(0); transform-origin: left; transition: transform var(--transition);
}
.land-feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--c-primary-border); }
.land-feat:hover::before { transform: scaleX(1); }
.land-feat .fi {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  background: var(--c-primary-lighter); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--c-primary-border);
}
.land-feat .fi svg { width: 21px; height: 21px; }
.land-feat h3 { font-size: 16px; font-weight: 700; margin-bottom: 9px; letter-spacing: -.2px; }
.land-feat p { font-size: 13.5px; color: var(--c-text2); margin-bottom: 14px; line-height: 1.7; }
.land-feat .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.land-tag {
  font-size: 11.5px; font-weight: 600; padding: 3.5px 10px; border-radius: 7px;
  background: #f5f7fa; color: var(--c-text3); border: 1px solid var(--c-border);
}
.land-tag.b { background: var(--c-primary-lighter); color: var(--c-primary); border-color: var(--c-primary-border); }

.land-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.land-step {
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 23px 21px; box-shadow: var(--shadow-card);
}
.land-step .sn {
  font-size: 12px; font-weight: 800; font-family: ui-monospace, monospace; letter-spacing: 1px;
  color: var(--c-primary); margin-bottom: 11px; display: block;
}
.land-step h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 7px; }
.land-step p { font-size: 13.5px; color: var(--c-text2); line-height: 1.7; }

.land-cta-wrap { padding: 96px 0; }
.land-cta-band {
  border-radius: var(--radius-xl); padding: 56px 44px; text-align: center;
  background: linear-gradient(125deg, #2b6cb0, #409eff 55%, #5eb0ff);
  box-shadow: 0 18px 50px rgba(64, 158, 255, .3); position: relative; overflow: hidden;
}
.land-cta-band::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .55;
}
.land-cta-band > * { position: relative; z-index: 1; }
.land-cta-band h2 { color: #fff; font-size: 31px; font-weight: 750; letter-spacing: -.8px; margin-bottom: 12px; }
.land-cta-band p { color: rgba(255, 255, 255, .9); font-size: 15.5px; margin-bottom: 27px; max-width: 540px; margin-left: auto; margin-right: auto; line-height: 1.7; }
.land-cta-band .row { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }
.btn-white { background: #fff; color: var(--c-primary); border-color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .16); }
.btn-white:hover { background: #f5f9ff; border-color: #f5f9ff; color: var(--c-primary); transform: translateY(-1px); }

@media (max-width: 1100px) { .land-feat-grid { grid-template-columns: repeat(2, 1fr); } .land-flow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 980px) {
  .land-hero { grid-template-columns: 1fr; gap: 40px; padding: 54px 0 62px; }
  .land-console { transform: none; }
  h1.land-title { font-size: 36px; }
}
@media (max-width: 620px) {
  .land-feat-grid { grid-template-columns: 1fr; }
  .land-cta-wrap { padding: 64px 0; }
  .land-cta-band { padding: 40px 24px; }
  .land-section { padding: 52px 0; }
  .land-sec-head h2 { font-size: 26px; }
  h1.land-title { font-size: 31px; }
  .land-flow { grid-template-columns: 1fr; }
  .land-stats { gap: 22px; }
  .land-cta .btn { width: 100%; }
}

/* ============ 首页（旧版，保留兼容） ============ */
.hero {
  position: relative;
  background: linear-gradient(135deg, #eef6ff 0%, #ffffff 48%, #f4f9ff 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl); padding: 76px 40px;
  text-align: center; margin-bottom: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(64, 158, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero::before { width: 300px; height: 300px; top: -110px; right: -80px; }
.hero::after { width: 240px; height: 240px; bottom: -90px; left: -60px; background: radial-gradient(circle, rgba(103, 194, 58, 0.12) 0%, transparent 70%); }
.hero h1 { font-size: 40px; font-weight: 750; color: var(--c-text); margin-bottom: 16px; letter-spacing: -0.03em; position: relative; line-height: 1.25; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--c-primary-border);
  color: var(--c-primary); font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
  position: relative; box-shadow: 0 3px 12px rgba(64, 158, 255, 0.14);
}
.hero p { color: var(--c-text3); margin-bottom: 32px; font-size: 16px; max-width: 620px; margin-left: auto; margin-right: auto; position: relative; line-height: 1.7; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
/* 平板/小笔记本：3 列过窄，提前降 2 列 */
@media (max-width: 1024px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
.feature {
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature:hover { box-shadow: var(--shadow-hover); border-color: var(--c-primary-border); transform: translateY(-5px); }
.feature .ico {
  width: 50px; height: 50px; border-radius: 14px;
  background: linear-gradient(135deg, var(--c-primary) 0%, #66b1ff 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(64, 158, 255, 0.3);
}
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 16.5px; margin-bottom: 9px; font-weight: 650; }
.feature p { font-size: 13.5px; color: var(--c-text3); line-height: 1.7; }

.quick-entry { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
/* 平板/小笔记本：4 列过窄，提前降 2 列 */
@media (max-width: 1024px) {
  .quick-entry { grid-template-columns: repeat(2, 1fr); }
}
.quick-card {
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 24px 12px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  color: var(--c-text2);
}
.quick-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--c-primary-border); color: var(--c-primary); }
.quick-card .qi-ico {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--c-primary-lighter); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700;
  transition: all var(--transition);
}
.quick-card:hover .qi-ico { background: var(--c-primary); color: #fff; box-shadow: 0 4px 14px rgba(64, 158, 255, 0.35); }
.quick-card .qi-ico svg { width: 23px; height: 23px; }
.quick-card .qi-label { font-size: 14px; font-weight: 550; }

/* ============ 后台 ============ */
/* 布局目标：顶部品牌栏 + 左侧固定菜单 + 右侧独立滚动内容区。
   关键约束：只有 .admin-main 可以滚动，其余容器一律不许产生滚动条，
   避免出现「左侧菜单超出可视区、点不到」以及「右侧内容被裁切」两种问题。 */
body:has(.admin-layout) {
  height: 100vh; height: 100dvh;
  overflow: hidden;                /* 整页锁死，滚动只发生在 .admin-main 内 */
  display: flex; flex-direction: column;
}
body:has(.admin-layout) .topbar { flex-shrink: 0; position: static; }
.admin-layout {
  display: grid; grid-template-columns: var(--sidebar-w) 1fr; gap: 0;
  max-width: none; margin: 0; padding: 0;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;                   /* 允许 grid 子项在 flex 容器内正确收缩 */
  overflow: hidden;
}
/* 左侧菜单：占满 grid 行高，内部自己滚动（菜单项多于视口高度时可滚动到） */
.admin-side {
  background: var(--k-sidebar-bg);
  border-right: 1px solid var(--c-border);
  padding: 0;
  height: 100%;
  min-height: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.admin-side a {
  display: flex; align-items: center; gap: 11px;
  height: var(--k-nav-h);
  padding: 0 20px;
  color: var(--c-text2); font-size: 14px; font-weight: 500;
  border-left: var(--k-active-bar) solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.admin-side a:hover { background: var(--c-fill); color: var(--c-text); }
.admin-side a.active {
  background: var(--c-primary-lighter); color: var(--c-primary); font-weight: 600;
  border-left-color: var(--c-primary);
}
.admin-side a .si { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.9; }
.admin-side .back-link {
  margin-top: auto; border-top: 1px solid var(--c-border);
  color: var(--c-text3); font-size: 13.5px;
}
/* 右侧主内容区：唯一滚动容器；宽度允许收缩（min-width:0）以便内部自己处理横向滚动 */
.admin-main {
  min-width: 0;
  padding: 22px 26px 32px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  height: 100%;
  min-height: 0;
  display: block;                  /* 不用 flex column：避免卡片被纵向压缩裁切 */
}
/* 表格横向滚动容器：过宽时内部滚动，绝不裁切 */
.scroll-x {
  max-width: 100%; min-width: 0; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.scroll-x > .table th, .scroll-x > .table td { white-space: nowrap; }
.scroll-x > .table td.url-cell { max-width: none; }
body:has(.admin-layout) .scroll-x { max-width: 100%; min-width: 0; }
body:has(.admin-layout) .admin-main .footer {
  padding: 22px 0 6px;
}

/* ---- 用户侧边栏：KaiUI 风格 顶部账户 + 导航 ---- */
.user-side { padding: 0; }
.side-brand {
  display: flex; align-items: center; gap: 9px;
  height: var(--topbar-h);
  padding: 0 18px; flex-shrink: 0;
}
.sb-mark {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--c-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.sb-mark svg { width: 17px; height: 17px; }
.sb-name {
  font-size: 15.5px; font-weight: 700; color: var(--c-text);
  letter-spacing: -0.01em;
}
.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--c-border);
}
.side-avatar {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
  background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; text-transform: uppercase;
}
.side-user-info { min-width: 0; flex: 1; }
.side-user-name {
  font-size: 13.5px; font-weight: 600; color: var(--c-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-user-meta { font-size: 11.5px; color: var(--c-text3); margin-top: 1px; }
.side-user-meta b { color: var(--c-primary); font-weight: 650; }
.side-logout {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-text3) !important;
  padding: 0 !important; border-left: none !important;
  transition: background var(--transition), color var(--transition);
}
.side-logout:hover { background: var(--c-danger-light); color: var(--c-danger) !important; }
.side-logout svg { width: 17px; height: 17px; }

/* 底部固定区：返回首页 + 账户卡片 */
.side-foot {
  margin-top: auto; flex-shrink: 0;
}
.side-foot-link {
  display: flex; align-items: center; gap: 11px;
  height: var(--k-nav-h); padding: 0 20px;
  color: var(--c-text3); font-size: 13.5px;
  border-left: var(--k-active-bar) solid transparent;
  transition: background var(--transition), color var(--transition);
}
.side-foot-link:hover { background: var(--c-fill); color: var(--c-text); }
.side-foot-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* 侧栏导航：作为 flex item 必须 flex-shrink:0，否则被压缩后内容溢出到裁剪区，
   表现为「菜单项看得见却点不到」。这里显式声明并清掉 pico 的 nav{overflow:visible}。 */
.side-nav {
  display: block;
  padding: 8px 0;
  flex-shrink: 0;
  overflow: visible;
}

/* 「我的」按钮：桌面端隐藏，仅移动端显示 */
.side-more { display: none; }
/* 移动端底部弹出的账户面板（桌面端不渲染） */
.sheet-mask, .side-sheet { display: none; }
.sheet-mask {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(31, 45, 61, 0.42);
}
.side-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 131;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 8px 0 calc(var(--k-mobile-tab-h) + 10px + env(safe-area-inset-bottom, 0px));
  animation: sheetUp .26s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 -8px 32px rgba(31, 45, 61, 0.16);
  max-height: 76vh;
  max-height: 76dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-head {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 20px 16px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 6px;
}
.sheet-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  color: var(--c-text2); font-size: 14.5px; font-weight: 500;
}
.sheet-item .si { width: 19px; height: 19px; flex-shrink: 0; }
.sheet-item:active { background: var(--c-fill); }
.sheet-item.danger { color: var(--c-danger); }

/* 后台「更多」面板：九宫格布局，项多时不至于顶出屏幕 */
.sheet-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; padding: 4px 8px 8px;
}
.sheet-grid .sheet-item {
  flex-direction: column; gap: 7px;
  justify-content: center; text-align: center;
  padding: 14px 6px; border-radius: 12px;
  font-size: 12.5px; font-weight: 500;
}
.sheet-grid .sheet-item .si { width: 22px; height: 22px; }

/* 左右布局页面：隐藏顶部横向菜单，导航只走左侧栏（移动端走底部 Tab） */
body:has(.admin-layout) .nav-menu { display: none; }
body:has(.admin-layout) .nav-toggle { display: none; }
body:has(.admin-layout) .topbar { display: none; }
/* 注意：这里以前有一条 `height:100vh` 的高优先级规则覆盖 .admin-side{height:100%}，
   导致侧栏高过可视区、菜单项被裁掉点不到。已删除，由 .admin-side 的 height:100% 接管。 */
body:has(.admin-layout) { background: var(--k-page-bg); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 20px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
/* 中等宽度：4 列会挤扁，提前降列 */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; right: -24px; top: -24px;
  width: 88px; height: 88px; border-radius: 50%;
  background: radial-gradient(circle, var(--c-primary-light) 0%, transparent 70%);
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--c-primary-border); }
.stat-card .num { font-size: 30px; font-weight: 750; color: var(--c-text); letter-spacing: -0.03em; line-height: 1.2; }
.stat-card .label { font-size: 13px; color: var(--c-text3); margin-top: 6px; }
.stat-card .stat-ico {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--c-primary-lighter); color: var(--c-primary);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px; position: relative; z-index: 1;
}
.stat-card .stat-ico svg { width: 22px; height: 22px; }
.stat-card.ok .stat-ico { background: var(--c-success-light); color: var(--c-success); }
.stat-card.warn .stat-ico { background: var(--c-warning-light); color: var(--c-warning); }
.stat-card.info .stat-ico { background: #eef2f7; color: #7a879c; }

/* 页面标题区 */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.page-head h1 {
  font-size: 21px; font-weight: 700; color: var(--c-text);
  letter-spacing: -0.02em; margin: 0 0 4px; line-height: 1.3;
}
.page-head .desc { font-size: 13px; color: var(--c-text3); margin: 0; line-height: 1.6; }
.page-head .head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card-title-ico { display: inline-flex; align-items: center; gap: 8px; }
.card-title-ico svg { width: 17px; height: 17px; color: var(--c-primary); }

/* KaiUI 风格统计卡：更紧凑 */
body:has(.admin-layout) .stat-card {
  border-radius: 12px; padding: 18px;
  box-shadow: 0 1px 2px rgba(31, 45, 61, 0.04);
  border-color: #eceef2;
}
body:has(.admin-layout) .stat-card .stat-ico {
  width: 40px; height: 40px; border-radius: 11px; margin-bottom: 12px;
}
body:has(.admin-layout) .stat-card .num { font-size: 26px; }
body:has(.admin-layout) .stat-card .label { font-size: 12.5px; margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.order-list { display: flex; flex-direction: column; }
.order-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--c-border);
}
.order-item:last-child { border-bottom: none; padding-bottom: 0; }
.order-item .oi-main { min-width: 0; }
.order-item .oi-no {
  font-size: 13.5px; font-weight: 600; color: var(--c-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.order-item .oi-time { font-size: 12px; color: var(--c-text3); margin-top: 3px; }
.order-item .oi-right { text-align: right; flex-shrink: 0; }
.order-item .oi-amount { font-size: 14.5px; font-weight: 700; color: var(--c-text); margin-bottom: 4px; }

hr.sep { border: 0; border-top: 1px solid var(--c-border); margin: 24px 0; }
.sec-title { font-size: 14.5px; color: var(--c-text); margin: 0 0 16px; font-weight: 650; }
/* 详情页章节标题（app_detail.html 使用） */
.section-title { font-size: 15px; color: var(--c-text); font-weight: 650; margin: 26px 0 14px; }
.section-title:first-child { margin-top: 0; }

.quota-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--c-warning-light); color: var(--c-warning-hover); font-weight: 600; font-size: 12.5px;
  border: 1px solid rgba(230, 162, 60, 0.28);
}
.quota-badge .q-num {
  background: var(--c-warning); color: #fff;
  padding: 0 8px; border-radius: 999px; font-size: 11.5px; margin-left: 2px;
}
.quota-ops { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.quota-ops input[type=number] {
  width: 72px; padding: 6px 9px;
  border: 1px solid var(--c-border-strong); border-radius: 8px;
  font-size: 13px; font-family: inherit;
}
.quota-ops input[type=number]:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-light); }
.cost-tip {
  background: var(--c-primary-lighter); color: var(--c-primary-hover);
  border: 1px solid var(--c-primary-border);
  padding: 14px 18px; border-radius: 12px; margin-bottom: 20px;
  font-size: 13.5px; line-height: 1.65;
}

/* ============ 页脚 ============ */
.footer { text-align: center; padding: 28px 24px; color: var(--c-text3); font-size: 12.5px; }
.footer a { color: var(--c-text3); margin: 0 6px; }
.footer a:hover { color: var(--c-primary); }
.footer .sep { margin: 0 4px; }

/* ================================================
   响应式 - 移动端适配
   ================================================ */
@media (max-width: 900px) {
  /* 移动端：侧边栏 → 底部固定 Tab 导航栏 */
  .admin-layout { display: block; gap: 0; }

  /* 底部固定 Tab 栏（用 body:has 前缀对齐桌面规则优先级） */
  body:has(.admin-layout) .admin-side {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: auto;
    height: calc(var(--k-mobile-tab-h) + env(safe-area-inset-bottom, 0px));
    width: 100%;
    display: block; padding: 0 0 env(safe-area-inset-bottom, 0px);
    border-right: none; border-top: 1px solid var(--c-border);
    background: #fff; z-index: 120;
    overflow: visible;
    box-shadow: 0 -2px 12px rgba(31, 45, 61, 0.06);
  }
  /* 移动端隐藏品牌、账户卡片与次要入口 */
  body:has(.admin-layout) .admin-side .side-brand,
  body:has(.admin-layout) .admin-side .side-foot,
  body:has(.admin-layout) .admin-side .back-link { display: none; }

  /* 导航项横向铺满；不换行，超出时横向滚动，保证「更多」始终停在栏内 */
  body:has(.admin-layout) .admin-side .side-nav {
    display: flex; flex-wrap: nowrap;
    height: var(--k-mobile-tab-h); padding: 0;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  body:has(.admin-layout) .admin-side .side-nav::-webkit-scrollbar { display: none; }
  body:has(.admin-layout) .admin-side .side-nav > a {
    flex: 1 1 0; min-width: 56px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    height: 100%; padding: 0 2px;
    border-left: none;
    font-size: 11.5px; font-weight: 500;
    color: var(--c-text3);
    text-align: center;
  }
  body:has(.admin-layout) .admin-side .side-nav > a .si {
    width: 21px; height: 21px; stroke-width: 1.9;
  }
  body:has(.admin-layout) .admin-side .side-nav > a.active {
    background: transparent; color: var(--c-primary);
    border-left-color: transparent;
  }
  body:has(.admin-layout) .admin-side .side-nav > a.active .si { stroke-width: 2.2; }

  /* 「更多」/「我的」Tab 按钮：样式与导航项一致，且不参与压缩换行 */
  body:has(.admin-layout) .admin-side .side-more {
    display: flex; flex: 1 1 0;
    min-width: 56px; flex-shrink: 0;
    flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    height: var(--k-mobile-tab-h); padding: 0 2px;
    border: none; background: none; cursor: pointer;
    font-family: inherit; color: var(--c-text3);
    font-size: 11.5px; font-weight: 500; text-align: center;
  }
  body:has(.admin-layout) .admin-side .side-more .si {
    width: 21px; height: 21px; stroke-width: 1.9;
  }
  body:has(.admin-layout) .admin-side .side-more:active { color: var(--c-primary); }

  /* 账户面板：移动端显示 */
  body:has(.admin-layout) .sheet-mask.open { display: block; }
  body:has(.admin-layout) .side-sheet.open { display: block; }

  /* 内容区让出底部 Tab 高度 */
  .admin-main { padding: 14px 14px calc(var(--k-mobile-tab-h) + 18px); }
  .admin-main > .card > .card-title { padding: 15px 16px; font-size: 15.5px; }
  .admin-main > .card > :not(.card-title) { padding-left: 16px; padding-right: 16px; }
  .admin-main > .card > .pagination { padding: 12px 16px 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-main-side, .grid-2 { grid-template-columns: 1fr; }
  body:has(.admin-layout) .nav-toggle { display: none; }
  body:has(.admin-layout) { padding-bottom: var(--k-mobile-tab-h); }

  /* 移动端：顶部品牌条 */
  body:has(.admin-layout) .topbar {
    display: block; position: sticky; top: 0; z-index: 110;
    background: var(--c-primary-lighter);
    border-bottom: 1px solid #e3eefc;
  }
  body:has(.admin-layout) .topbar-inner {
    max-width: none; padding: 0 16px;
    height: 58px; gap: 12px;
  }
  body:has(.admin-layout) .brand { margin-right: auto; font-size: 16px; }
  body:has(.admin-layout) .brand .logo-img { width: 28px; height: 28px; border-radius: 8px; }
  body:has(.admin-layout) .nav-user { gap: 8px; }
  body:has(.admin-layout) .nav-user .quota-badge { display: none; }
  body:has(.admin-layout) .nav-user > a:not(.btn) { display: none; }
  body:has(.admin-layout) .nav-user .btn {
    padding: 8px 12px; border-radius: 9px;
  }
}

@media (max-width: 768px) {
  :root { --topbar-h: 58px; }
  .topbar-inner { padding: 0 16px; gap: 14px; }
  .nav-toggle { display: flex; order: 3; }
  .brand { margin-right: auto; font-size: 15.5px; }
  .brand .logo-img { width: 30px; height: 30px; }
  .nav-menu {
    position: fixed; top: var(--topbar-h); left: 0; right: 0;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    flex-direction: column; padding: 10px 14px 16px; gap: 3px;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-hover);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: all .25s cubic-bezier(.4,0,.2,1); z-index: 99;
    margin-right: 0;
    max-height: calc(100vh - var(--topbar-h));
    max-height: calc(100dvh - var(--topbar-h));
    overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu a { padding: 13px 16px; font-size: 15px; width: 100%; border-radius: 11px; }
  .nav-user { gap: 8px; }
  .nav-user .quota-badge { font-size: 11.5px; padding: 3px 9px; }
  .nav-user > a:not(.btn) { display: none; }

  /* 左右布局页面：移动端保持顶部品牌条 + 底部 Tab，不显示汉堡菜单 */
  body:has(.admin-layout) .nav-toggle { display: none !important; }
  body:has(.admin-layout) .nav-menu { display: none !important; }
  body:has(.admin-layout) .brand { font-size: 16px; }
  body:has(.admin-layout) .brand .logo-img { width: 28px; height: 28px; border-radius: 8px; }
  body:has(.admin-layout) .nav-user .quota-badge { display: none; }

  .container { margin: 16px auto; padding: 0 16px; }
  .container-sm { margin: 28px auto; padding: 0 18px; }
  .card { padding: 18px; border-radius: 14px; }
  .form-row { grid-template-columns: 1fr; gap: 16px; }
  .form-control { font-size: 16px; padding: 12px 14px; }
  .btn { padding: 10px 17px; font-size: 14px; }
  .btn-sm { padding: 6px 11px; font-size: 12.5px; }
  .btn-lg { padding: 13px 24px; font-size: 15px; }
  .form-actions .btn { flex: 1; min-width: 120px; }

  .hero { padding: 48px 22px; border-radius: 20px; }
  .hero h1 { font-size: 27px; }
  .hero p { font-size: 14.5px; }
  .hero .cta { flex-direction: column; gap: 12px; }
  .hero .cta .btn { width: 100%; }
  .features { grid-template-columns: 1fr; gap: 14px; }
  .feature { padding: 20px; }
  .quick-entry { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .quick-card { padding: 18px 10px; }

  /* 表格 → 移动端卡片 */
  .table { font-size: 13.5px; border-spacing: 0; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr {
    background: var(--c-card); border: 1px solid var(--c-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card); margin-bottom: 14px; padding: 4px 0;
  }
  .table td {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 16px;
    border-bottom: 1px solid var(--c-fill);
    text-align: right; gap: 14px;
    word-break: break-word;
  }
  .table td:last-child { border-bottom: none; }
  .table td::before {
    content: attr(data-label);
    font-weight: 600; color: var(--c-text3); font-size: 12.5px;
    text-align: left; flex-shrink: 0;
  }
  .table tbody tr:hover td { background: transparent; }
  .table td.url-cell { max-width: 100%; white-space: normal; word-break: break-all; overflow: visible; text-overflow: clip; }
  .table td:empty { display: none; }

  .detail-table, .detail-table tbody, .detail-table tr, .detail-table th, .detail-table td { display: block; width: 100%; }
  .detail-table tr {
    background: var(--c-card); border: 1px solid var(--c-border);
    border-radius: 14px; box-shadow: var(--shadow-card);
    margin-bottom: 14px; padding: 4px 0;
  }
  .detail-table th {
    background: none; padding: 10px 16px 3px; font-size: 12.5px;
    color: var(--c-text3); border-bottom: none; width: auto; white-space: normal;
  }
  .detail-table td { padding: 0 16px 12px; border-bottom: 1px solid var(--c-fill); text-align: left; }
  .detail-table td:last-child { border-bottom: none; }
  .detail-table input:not([type=checkbox]):not([type=radio]),
  .detail-table textarea, .detail-table select { width: 100% !important; max-width: 100% !important; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-card { padding: 18px; }
  .stat-card .num { font-size: 24px; }
  .shots-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
  .dl-shots { grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 10px; }
  .redeem-form, .cards-gen-form { flex-direction: column; align-items: stretch; }
  .redeem-form .form-control, .cards-gen-form select, .cards-gen-form input[type=number] { width: 100%; }
  .upload-box.media .preview { max-width: 100%; }
  .card-title { font-size: 15.5px; }
  .pagination { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .quick-entry { grid-template-columns: repeat(2, 1fr); }
  .feature .ico { width: 44px; height: 44px; font-size: 20px; }
  .hero h1 { font-size: 23px; }
  .hero { padding: 40px 18px; }
  .stat-card .num { font-size: 22px; }
}
