/* 顶部居中 */
/* 顶栏位置由 app.css 统一控制（fixed），这里只负责内容居中 */
.topbar { justify-content: center; }
.topbar .brand { margin: 0 auto; }
.topbar-actions { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.brand-text { align-items: center; text-align: center; }
.brand-text strong { font-size: 17px; letter-spacing: .5px; }

/* 无刷新切换的滑动过渡 */
main.view {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* pjax 之后关闭逐元素入场动画，只保留滑动 */
body.pjax-mode .section,
body.pjax-mode .home-head,
body.pjax-mode .app-hero,
body.pjax-mode .page-head,
body.pjax-mode .profile,
body.pjax-mode .auth-wrap,
body.pjax-mode .app-card {
  animation: none !important;
}

.section, .home-head, .app-hero, .page-head, .profile, .auth-wrap {
  animation: fadeUp .26s ease both;
}
.app-card { animation-duration: .3s; }

html { background: #f5f7fb; }

a, button { -webkit-tap-highlight-color: transparent; }
.tabbar .tab { transition: background .18s ease, color .18s ease, transform .18s ease; }

/* 签名记录列表 */
.rec-list { display: grid; gap: 2px; }
.rec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid #f1f4fa;
}
.rec-item:last-child { border-bottom: 0; }
.rec-main { display: flex; flex-direction: column; min-width: 0; }
.rec-main strong { font-size: 14.5px; font-weight: 600; color: var(--text); }
.rec-main small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rec-side { display: flex; align-items: center; gap: 10px; flex: none; }
.rec-side small { color: var(--muted); font-size: 12px; }

/* IPA 上传区 */
.upload-zone {
  display: block;
  padding: 26px 16px;
  border: 2px dashed #d9e0ee;
  border-radius: 14px;
  background: #fafbff;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.upload-zone:hover { border-color: var(--primary); background: #f4f6ff; }
.upload-zone:active { transform: scale(.995); }
.upload-zone input[type=file] { display: none; }
.upload-tip strong { display: block; font-size: 14.5px; color: var(--text); margin-bottom: 4px; }
.upload-tip small { color: var(--muted); font-size: 12.5px; }
.upload-zone.has-file { border-color: var(--primary); background: var(--primary-soft); }
.upload-zone.has-file .upload-tip strong { color: var(--primary-dark); }

/* 桌面端底部导航：居中浮动胶囊 */
@media (min-width: 960px) {
  .tabbar {
    display: flex;
    justify-content: center;
    gap: 4px;
    left: 50%;
    right: auto;
    bottom: 20px;
    transform: translateX(-50%);
    width: auto;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(14px);
  }
  .tabbar .tab {
    flex-direction: row;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13.5px;
    color: var(--text-2);
  }
  .tabbar .tab svg { width: 18px; height: 18px; }
  .tabbar .tab.on { background: var(--primary-soft); color: var(--primary); }
  .tabbar .tab:hover { background: var(--bg); }
  .app-shell { padding-bottom: 110px; }
  .toast { bottom: 96px; }
}

@media (max-width: 640px) {
  .brand-text strong { font-size: 16px; }
  .brand-text small { display: none; }
  .topbar-actions .btn { padding: 7px 12px; font-size: 13px; }
}

/* 验证码输入行 */
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { flex: none; white-space: nowrap; }
/* 直签时的应用信息卡 */
.sign-app {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line);
}
.sign-app strong { display: block; font-size: 15px; }
.sign-app small { color: var(--muted); font-size: 12.5px; }
/* 应用锁定 */
.lock-badge {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
}
.lock-panel { max-width: 520px; }
.lock-form { display: flex; gap: 10px; }
.lock-form input {
  flex: 1; height: 42px; padding: 0 14px; font-size: 15px; letter-spacing: 2px;
  border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.lock-form input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.lock-form .btn { height: 42px; padding: 0 22px; }
.card-lock {
  position: absolute; top: 8px; right: 8px; font-size: 12px;
  background: #fef3c7; color: #92400e; border-radius: 999px; padding: 1px 8px;
}

/* UDID 行 */
.udid-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13px; margin-bottom:12px; color:var(--text-2); }

/* 签名进度条 */
.sign-progress { margin-top: 8px; }
.sign-bar {
  height: 6px; border-radius: 999px; background: #e5e7eb; overflow: hidden;
}
.sign-bar i {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width .4s ease;
}
.sign-text { display: block; margin-top: 5px; font-size: 11.5px; color: var(--text-2); }

/* 签名详情页进度 */
.sd-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-bottom: 8px; }
.sd-label { color: var(--text-2); }
.sd-pct { font-weight: 700; color: #111; font-size: 15px; }
.sd-bar { height: 8px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.sd-bar i {
  display: block; height: 100%; width: 2%;
  background: linear-gradient(90deg, #10b981, #22c55e);
  border-radius: 999px; transition: width .35s ease;
}
.sd-text { margin: 10px 0 0; font-size: 12.5px; color: var(--text-2); }

/* ===== 签名安装页：手机上收紧，卡片不要太大 ===== */
@media (max-width: 640px) {
  .sign-page { margin-top: 14px !important; gap: 12px !important; }
  .sign-page .panel {
    padding: 14px !important;
    border-radius: 14px !important;
  }
  .sign-page .panel h2 { font-size: 15px !important; margin-bottom: 10px !important; }
  .sign-page .form { gap: 10px !important; }
  .sign-page .form label { font-size: 12.5px !important; }
  .sign-page .form input,
  .sign-page .form select {
    height: 42px; padding: 0 12px;
  }
  .sign-page .upload-zone { padding: 16px 12px !important; }
  .sign-page .upload-tip strong { font-size: 13.5px !important; }
  .sign-page .upload-tip small { font-size: 11.5px !important; }
  .sign-page .sign-app { padding: 10px !important; gap: 10px !important; }
  .sign-page .sign-app .app-icon { width: 36px; height: 36px; font-size: 15px; }
  .sign-page .rec-item { padding: 10px 12px !important; }
  .sign-page .card-foot { margin-top: 12px !important; }
}
