/* ============================================================
   base.css — 统一设计令牌（字体 / 按钮尺寸）
   所有页面在 main.css 之前引入，确保跨页视觉一致。
   本文件只统一「尺寸与排版」，不改动各页配色
   （背景 / 边框 / 文字色由各页 .btn-* 等类保留）。
   ============================================================ */
:root{
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;

  /* 字号阶梯（UI 主字号 14px） */
  --fs-xs:   12px;
  --fs-sm:   13px;
  --fs-base: 14px;
  --fs-md:   15px;
  --fs-lg:   16px;
  --fs-xl:   18px;

  /* 标准按钮尺寸 */
  --btn-h:       40px;
  --btn-h-sm:    32px;
  --btn-h-lg:    46px;
  --btn-pad:     0 18px;
  --btn-pad-sm:  0 12px;
  --btn-pad-lg:  0 24px;
  --btn-fs:      14px;
  --btn-radius:  8px;

  /* 标签页 / 分段控件尺寸 */
  --tab-h:       34px;
  --tab-pad:     0 14px;
  --tab-fs:      13px;
  --tab-radius:  8px;
}

/* 统一基础字体（所有页面一致） */
body{
  font-family: var(--font-sans) !important;
  font-size: var(--fs-base) !important;
  line-height: 1.5;
}
input, select, textarea, button{
  font-family: var(--font-sans) !important;
}
/* 移动端输入体验：≥16px 防止 iOS 聚焦自动放大；消双击 300ms 延迟；禁用长按系统菜单 */
input, textarea, select { font-size: 16px !important; touch-action: manipulation; -webkit-touch-callout: none; }
@media (max-width: 480px) { body { line-height: 1.6; } }

/* ---------- 统一「标准按钮」尺寸（保留各页配色） ---------- */
.btn, .btn-primary, .btn-outline, .btn-accent, .btn-success, .btn-block,
.withdraw-btn, .copy-btn{
  min-height: var(--btn-h) !important;
  padding: var(--btn-pad) !important;
  font-size: var(--btn-fs) !important;
  line-height: 1 !important;
  border-radius: var(--btn-radius) !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap;
}
.btn-sm, .btn-xs{
  min-height: var(--btn-h-sm) !important;
  padding: var(--btn-pad-sm) !important;
  font-size: var(--fs-sm) !important;
}
.btn-lg{
  min-height: var(--btn-h-lg) !important;
  padding: var(--btn-pad-lg) !important;
  font-size: var(--fs-lg) !important;
}
.btn-block, .withdraw-btn{
  width: 100% !important;
  display: flex !important;
}

/* ---------- 统一「标签页 / 分段控件」（保留各页配色） ---------- */
.auth-tab, .doc-cat-tab, .fault-brand-tab, .share-tag{
  min-height: var(--tab-h) !important;
  padding: var(--tab-pad) !important;
  font-size: var(--tab-fs) !important;
  line-height: 1 !important;
  border-radius: var(--tab-radius) !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap;
}

/* ---------- 统一底部导航（各身份入口 + 审核台，便于发现） ---------- */
.app-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  display: flex; gap: 2px;
  background: linear-gradient(180deg, #14121F, #0E0E14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-top: 1px solid rgba(139,124,246,.2);
  box-shadow: 0 -1px 8px rgba(0,0,0,.4);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.app-footer a {
  flex: 1 0 auto; min-width: 54px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: rgba(230,230,239,.62); text-decoration: none;
  font-size: 11px; padding: 4px 6px; border-radius: 10px;
  white-space: nowrap; transition: all .15s;
}
.app-footer a:hover { color: #fff; background: rgba(139,124,246,.12); }
.app-footer a.active { color: #cbbcff; background: rgba(139,124,246,.2); font-weight: 700; }
.app-footer a.active .ico { filter: drop-shadow(0 0 4px rgba(34,211,238,.7)); color: #cbbcff; }
.app-footer a .ico { font-size: 18px; line-height: 1; }
body { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
@media print { .app-footer { display: none !important; } body { padding-bottom: 0 !important; } }

/* 低性能/减少动态偏好设备：降级毛玻璃，避免低端 Android 重绘卡顿 */
@media (prefers-reduced-motion: reduce) {
  .top-nav, .app-footer { -webkit-backdrop-filter: none; backdrop-filter: none; background: #0E0E14; }
}

/* ---------- 滚动收起导航（仅移动端，PC 保持常显；只收起底栏，顶栏常驻） ---------- */
@media (max-width: 820px) {
  .app-footer { transition: transform .3s ease; will-change: transform; }
  .app-footer.nav-hidden { transform: translateY(100%); }
  body { transition: padding-bottom .3s ease; }
  body.nav-hidden-bottom { padding-bottom: 0 !important; }
}
