/* =====================================================
   积分通行证 - 全站样式（暗色玻璃拟态 · 渐变光效）
   ===================================================== */
:root {
  --bg0: #070b16;
  --bg1: #0b1020;
  --card: rgba(255,255,255,.045);
  --card2: rgba(255,255,255,.07);
  --bd: rgba(255,255,255,.09);
  --bd2: rgba(255,255,255,.16);
  --tx: #e8ecf4;
  --tx2: #aeb6ca;
  --tx3: #7c86a0;
  --p1: #6366f1;
  --p2: #22d3ee;
  --p3: #8b5cf6;
  --grad: linear-gradient(135deg, #6366f1, #8b5cf6 50%, #22d3ee);
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --info: #60a5fa;
  --r: 16px;
  --shadow: 0 18px 50px rgba(0,0,0,.4);
  --orb1: #4338ca55;
  --orb2: #0e749055;
  --orb3: #7c3aed40;
  --head-bd: var(--bd);
  --lnk: #8fa0f5;
  --lnkh: #b3c0ff;
}

/* ============ 主题切换（html[data-theme]） ============ */
html[data-theme="ocean"]  { --p1:#0ea5e9; --p2:#22d3ee; --p3:#3b82f6; --grad:linear-gradient(135deg,#0ea5e9,#3b82f6 50%,#22d3ee); --orb1:#0e749055; --orb2:#1d4ed855; --orb3:#0891b245; }
html[data-theme="emerald"]{ --p1:#10b981; --p2:#84cc16; --p3:#14b8a6; --grad:linear-gradient(135deg,#10b981,#14b8a6 50%,#84cc16); --orb1:#04785755; --orb2:#16653455; --orb3:#65a30d45; }
html[data-theme="sunset"] { --p1:#f59e0b; --p2:#ef4444; --p3:#ec4899; --grad:linear-gradient(135deg,#f59e0b,#ef4444 50%,#ec4899); --orb1:#c2410c55; --orb2:#be123c55; --orb3:#ea580c45; }
html[data-theme="rose"]   { --p1:#ec4899; --p2:#f43f5e; --p3:#a855f7; --grad:linear-gradient(135deg,#ec4899,#f43f5e 50%,#a855f7); --orb1:#be185d55; --orb2:#9d174d55; --orb3:#7e22ce45; }
html[data-theme="light"]  {
  --bg0: #eef1f8; --bg1: #ffffff; --card: rgba(15,23,42,.045); --card2: rgba(15,23,42,.07);
  --bd: rgba(15,23,42,.10); --bd2: rgba(15,23,42,.18);
  --tx: #1f2430; --tx2: #4b5563; --tx3: #7c86a0;
  --p1:#6366f1; --p2:#0ea5e9; --p3:#8b5cf6; --grad:linear-gradient(135deg,#6366f1,#8b5cf6 50%,#0ea5e9);
  --lnk:#4f46e5; --lnkh:#7c3aed;
  --shadow: 0 14px 40px rgba(15,23,42,.10);
  --orb1:#6366f13a; --orb2:#0ea5e942; --orb3:#8b5cf638;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg0);
  color: var(--tx);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 60px; /* 为底部悬浮站点页脚预留高度（移动端由 @media 720px 覆盖为 82px） */
}
a { color: var(--lnk); text-decoration: none; transition: .2s; }
a:hover { color: var(--lnkh); }

/* ---------- 背景光斑 ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  animation: orbFloat 18s ease-in-out infinite alternate;
}
.bg-orbs span:nth-child(1) { width: 480px; height: 480px; background: var(--orb1); top: -140px; left: -120px; }
.bg-orbs span:nth-child(2) { width: 420px; height: 420px; background: var(--orb2); bottom: -120px; right: -100px; animation-delay: -6s; }
.bg-orbs span:nth-child(3) { width: 300px; height: 300px; background: var(--orb3); top: 40%; left: 55%; animation-delay: -12s; }
@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, -40px) scale(1.12); }
  100% { transform: translate(-40px, 50px) scale(.94); }
}

/* =====================================================
   顶部导航
   ===================================================== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 26, .72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bd);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  height: 62px; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo {
  width: 30px; height: 30px; flex-shrink: 0;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent, #a5b4fc); font-size: 20px; font-weight: 700;
  font-style: normal;
  text-shadow: 0 0 12px rgba(99,102,241,.6);
}
.brand-img {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; object-fit: contain;
  box-shadow: 0 0 18px rgba(99,102,241,.4);
}
.brand-name {
  font-weight: 800; font-size: 17px; letter-spacing: .5px;
  background: linear-gradient(120deg, #c7d2fe, #a5f3fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
/* 桌面端(>768px)：顶栏内水平导航条；移动端抽屉样式由底部 @media(max-width:768px) 覆盖 */
.nav { display: flex; flex-direction: row; align-items: center; gap: 18px; position: static; width: auto; padding: 0; background: transparent; border-right: none; box-shadow: none; transform: none; overflow: visible; }
.nav.show { transform: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 7px 13px; border-radius: 9px; font-size: 13.5px; color: var(--tx2);
  white-space: nowrap; transition: .2s; position: relative;
}
.nav-link:hover { color: var(--tx); background: rgba(255,255,255,.06); }
.nav-link.on { color: #fff; background: rgba(99,102,241,.18); box-shadow: inset 0 0 0 1px rgba(129,140,248,.4); }
.nav-link.on::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 16px; height: 2px; border-radius: 2px; background: var(--grad);
}
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }

/* 通知铃铛 */
.bell { position: relative; }
.bell-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--bd);
  background: rgba(255,255,255,.04); color: var(--tx2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; position: relative; transition: .2s;
}
.bell-btn:hover { color: var(--tx); border-color: var(--bd2); }
.bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  background: linear-gradient(135deg, #f43f5e, #f97316); color: #fff; font-size: 10px; font-style: normal;
  border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700;
  box-shadow: 0 0 10px rgba(244,63,94,.6);
}
.bell-drop {
  position: fixed; left: 0; top: 0; width: 300px; max-width: calc(100vw - 24px); z-index: 120;
  background: rgba(15, 20, 36, .96); border: 1px solid var(--bd2); border-radius: 14px;
  box-shadow: var(--shadow); display: none; overflow: hidden;
  backdrop-filter: blur(20px);
}
.bell-drop.show { display: block; animation: dropIn .18s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bell-head { padding: 11px 14px; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--bd); color: var(--tx); display: flex; align-items: center; justify-content: space-between; }
.bell-item { display: block; padding: 10px 14px; font-size: 13px; color: var(--tx2); border-bottom: 1px solid rgba(255,255,255,.05); }
.bell-item:last-child { border-bottom: none; }
.bell-item:hover { background: rgba(99,102,241,.08); color: var(--tx); }
.bell-item time { display: block; font-size: 11px; color: var(--tx3); margin-top: 2px; }
.bell-empty { padding: 24px; text-align: center; color: var(--tx3); font-size: 12.5px; }

/* 用户信息 */
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px rgba(99,102,241,.45);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-meta b { font-size: 13px; }
.user-meta i { font-style: normal; font-size: 11px; color: var(--p2); }
.btn-logout {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--bd); color: var(--tx3); transition: .2s;
}
.btn-logout:hover { color: var(--err); border-color: rgba(248,113,113,.4); }

.nav-toggle { display: none; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--bd); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav-toggle span { width: 16px; height: 2px; background: var(--tx); border-radius: 2px; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =====================================================
   主容器 / 卡片
   ===================================================== */
.container {
  flex: 1; width: 100%; max-width: 1280px; margin: 0 auto;
  padding: 24px 20px 96px; position: relative; z-index: 1;
}
.card {
  background: var(--card); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 22px; margin-bottom: 18px; position: relative;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: .25s;
}
.card.hoverable:hover { border-color: var(--bd2); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-title {
  font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.card-title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--grad); }
.card-title .sub { font-size: 12px; color: var(--tx3); font-weight: 400; }
.card-title .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* 网格/表单分栏子项允许收窄，避免长域名/长编号把 1fr 轨道撑破导致横向溢出 */
.grid-2 > *, .form-grid > *, .stat { min-width: 0; }

/* 统计卡 */
.stat {
  border-radius: var(--r); padding: 18px 20px; border: 1px solid var(--bd);
  background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  position: relative; overflow: hidden; cursor: pointer; transition: .25s; display: block; color: var(--tx);
}
.stat:hover { transform: translateY(-3px); border-color: var(--bd2); box-shadow: var(--shadow); color: var(--tx); }
.stat::after {
  content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%;
  right: -50px; top: -50px; filter: blur(40px); opacity: .35;
}
.stat.s1::after { background: #6366f1; }
.stat.s2::after { background: #22d3ee; }
.stat.s3::after { background: #f59e0b; }
.stat.s4::after { background: #34d399; }
.stat .st-label { font-size: 12.5px; color: var(--tx2); display: flex; align-items: center; gap: 6px; }
.stat .st-value { font-size: 26px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .st-value.income { color: var(--ok); }
.stat .st-value.expense { color: var(--err); }
.stat .st-foot { font-size: 11px; color: var(--tx3); margin-top: 4px; }

/* =====================================================
   表单
   ===================================================== */
.f-row { margin-bottom: 18px; display: block; }
.f-label { display: block; font-size: 13px; color: var(--tx2); margin-bottom: 7px; }
.f-label b.req { color: var(--err); margin-left: 2px; }

input[type=text], input[type=password], input[type=email], input[type=number], input[type=url], input[type=date], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 11px;
  border: 1px solid #2a3050; background: #0d1120;
  color: var(--tx); font-size: 14px; outline: none; transition: .2s;
  font-family: inherit; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23aeb6ca' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
select option { background: #131a2e; color: var(--tx); }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,.16);
  background: #121830;
}
input::placeholder, textarea::placeholder { color: #5a6480; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.f-hint { font-size: 12px; color: var(--tx3); margin-top: 5px; line-height: 1.5; }
.f-inline { display: flex; gap: 10px; align-items: center; }
.f-inline > * { flex: 1; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: none; background: none; color: var(--tx3); cursor: pointer; border-radius: 7px;
}
.pw-eye:hover { color: var(--tx); }

/* 复选框美化 */
.check-line { display: flex; align-items: center; gap: 10px; padding: 9px 4px; cursor: pointer; }
.check-line input[type=checkbox] { width: 17px; height: 17px; accent-color: #6366f1; cursor: pointer; }
.check-line span { font-size: 13.5px; color: var(--tx2); }

/* =====================================================
   按钮
   ===================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: 11px; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 700;
  font-family: inherit; transition: .22s; position: relative; overflow: hidden;
  box-shadow: 0 6px 20px rgba(99,102,241,.3); text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(99,102,241,.45); color: #fff; }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { padding: 14px 30px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn-ghost { background: rgba(255,255,255,.06); border: 1px solid var(--bd2); box-shadow: none; color: var(--tx2); }
.btn-ghost:hover { background: rgba(255,255,255,.1); box-shadow: none; color: var(--tx); }
.btn-danger { background: linear-gradient(135deg, #f43f5e, #f97316); box-shadow: 0 6px 20px rgba(244,63,94,.3); }
.btn-ok { background: linear-gradient(135deg, #10b981, #22d3ee); box-shadow: 0 6px 20px rgba(16,185,129,.3); }
.btn-warn { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 6px 20px rgba(245,158,11,.3); }

/* =====================================================
   表格（移动端卡片化）
   ===================================================== */
.table-wrap { overflow: hidden; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.tb th {
  text-align: left; padding: 10px 12px; color: var(--tx3); font-size: 12px; font-weight: 600;
  border-bottom: 1px solid var(--bd2); white-space: nowrap; letter-spacing: .4px;
}
.tb td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.tb tr:last-child td { border-bottom: none; }
.tb tbody tr { transition: .15s; }
.tb tbody tr:hover { background: rgba(99,102,241,.06); }
.tb .num { font-variant-numeric: tabular-nums; }
.tb .mono { font-family: "SF Mono", Consolas, monospace; font-size: 12px; }

/* 徽章 */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.b-green { background: rgba(52,211,153,.14); color: #6ee7b7; box-shadow: inset 0 0 0 1px rgba(52,211,153,.3); }
.b-blue  { background: rgba(96,165,250,.14); color: #93c5fd; box-shadow: inset 0 0 0 1px rgba(96,165,250,.3); }
.b-yellow{ background: rgba(251,191,36,.14); color: #fcd34d; box-shadow: inset 0 0 0 1px rgba(251,191,36,.3); }
.b-red   { background: rgba(248,113,113,.14); color: #fca5a5; box-shadow: inset 0 0 0 1px rgba(248,113,113,.3); }
.b-gray  { background: rgba(148,163,184,.12); color: #aeb6ca; box-shadow: inset 0 0 0 1px rgba(148,163,184,.25); }
.b-violet{ background: rgba(139,92,246,.14); color: #c4b5fd; box-shadow: inset 0 0 0 1px rgba(139,92,246,.3); }
.amount-plus { color: var(--ok); font-weight: 700; }
.amount-minus { color: var(--err); font-weight: 700; }

/* =====================================================
   提示条 / 分页 / 标签页
   ===================================================== */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-size: 13.5px; position: relative; animation: dropIn .25s ease; }
.flash-ok { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.35); color: #6ee7b7; }
.flash-err { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.35); color: #fca5a5; }
.flash-warn { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.35); color: #fcd34d; }
.flash-x { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; opacity: .6; }
.flash-x:hover { opacity: 1; }

.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.pg {
  min-width: 32px; height: 32px; padding: 0 9px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--bd); color: var(--tx2); font-size: 13px;
}
.pg:hover { color: var(--tx); border-color: var(--bd2); }
.pg.on { background: var(--grad); border: none; color: #fff; font-weight: 700; }
.pg.dots { border: none; background: none; }
.pg-info { font-size: 12px; color: var(--tx3); margin-left: 6px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  padding: 8px 16px; border-radius: 10px; font-size: 13px; color: var(--tx2);
  background: rgba(255,255,255,.04); border: 1px solid var(--bd); transition: .2s;
}
.tab:hover { color: var(--tx); }
.tab.on { background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(34,211,238,.2)); border-color: rgba(129,140,248,.5); color: #fff; }

/* 搜索栏 */
.searchbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.searchbar .field { flex: 1; min-width: 150px; }

/* =====================================================
   登陆 / 注册页
   ===================================================== */
.auth-wrap { max-width: 960px; margin: 30px auto 0; }
.auth-card {
  display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--bd); background: var(--card); backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.auth-side {
  padding: 40px 34px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(99,102,241,.22), rgba(34,211,238,.1) 60%, transparent);
  display: flex; flex-direction: column; justify-content: center;
}
.auth-side::before {
  content: "◈"; position: absolute; font-size: 210px; opacity: .05; right: -30px; bottom: -60px; color: #fff;
}
.auth-side h1 { font-size: 25px; font-weight: 800; margin-bottom: 14px; line-height: 1.4; }
.auth-side h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side p { color: var(--tx2); font-size: 13.5px; line-height: 1.9; }
.auth-side .feat { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.auth-side .feat span { font-size: 13px; color: var(--tx2); display: flex; gap: 9px; align-items: center; }
.auth-side .feat span::before { content: "✦"; color: var(--p2); }
.auth-form { padding: 40px 36px; }
.auth-form h2 { font-size: 19px; margin-bottom: 4px; }
.auth-form .auth-sub { font-size: 12.5px; color: var(--tx3); margin-bottom: 22px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 12.5px; }

/* =====================================================
   代码块 / APIKEY
   ===================================================== */
.code-box {
  background: rgba(2, 6, 18, .8); border: 1px solid var(--bd2); border-radius: 13px;
  overflow: hidden; margin: 12px 0;
}
.code-box pre {
  margin: 0; padding: 16px; overflow-x: auto; font-size: 12px; line-height: 1.7;
  font-family: "SF Mono", Consolas, "Courier New", monospace; color: #a5f3fc;
  max-height: 460px;
}
.code-head {
  display: flex; align-items: center; padding: 9px 14px; gap: 8px;
  border-bottom: 1px solid var(--bd); background: rgba(255,255,255,.03);
}
.code-head .dots { display: flex; gap: 5px; }
.code-head .dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.code-head .dots i:nth-child(1) { background: #f87171; }
.code-head .dots i:nth-child(2) { background: #fbbf24; }
.code-head .dots i:nth-child(3) { background: #34d399; }
.code-head .fname { font-size: 12px; color: var(--tx3); font-family: monospace; }
.copy-btn {
  margin-left: auto; padding: 4px 12px; font-size: 11.5px; border-radius: 7px;
  background: rgba(99,102,241,.16); border: 1px solid rgba(129,140,248,.35); color: #b7c1ff;
  cursor: pointer; transition: .2s; font-family: inherit;
}
.copy-btn:hover { background: rgba(99,102,241,.3); color: #fff; }
.apikey-box {
  display: flex; gap: 10px; align-items: center; background: rgba(2,6,18,.6);
  border: 1px dashed rgba(129,140,248,.4); border-radius: 12px; padding: 12px 14px; flex-wrap: wrap;
}
.apikey-box .key {
  font-family: "SF Mono", Consolas, monospace; font-size: 13px; color: #a5f3fc; flex: 1;
  word-break: break-all; min-width: 200px;
}
.apikey-box .key.masked { filter: blur(5px); user-select: none; }

/* =====================================================
   关键词标签
   ===================================================== */
.kw-tags { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.kw-tag {
  display: inline-block;
  font-size: 11px; padding: 2px 9px; border-radius: 20px;
  background: rgba(139,92,246,.13); color: #c4b5fd; box-shadow: inset 0 0 0 1px rgba(139,92,246,.25);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: middle;
}

/* =====================================================
   可折叠区块
   =====================================================
   使用原生 <details>/<summary> 实现，完全脱离 JS 依赖，默认折叠、
   点击标题展开/收起必然生效。用法：
     <details class="card co">
       <summary class="card-title co-head">标题 <span class="co-arrow"></span></summary>
       <div class="co-body">…内容…</div>
     </details>
*/
details.co > summary.co-head {
  cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none;
}
details.co > summary.co-head::-webkit-details-marker { display: none; }
details.co > summary.co-head::marker { content: ''; display: none; }
details.co > summary.co-head:focus { outline: none; }
details.co > summary.co-head:hover .co-arrow { color: var(--ac); border-color: var(--ac); opacity: 1; }
.co-arrow {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--tx3);
  background: rgba(128,128,160,.10); border: 1px solid var(--bd2);
  border-radius: 6px; padding: 1px 8px; opacity: .8; transition: opacity .15s ease;
}
.co-arrow::before { content: '展开 ▾'; }
details.co[open] > summary.co-head .co-arrow::before { content: '收起 ▴'; }
details.co[open] > summary.co-head .co-arrow { color: var(--ac); border-color: var(--ac); }
details.co > .co-body { animation: coFade .18s ease; }
@keyframes coFade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
/* 单条说明折叠为单行省略（悬停显示完整内容） */
.txt-ellipsis { display: inline-block; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

/* =====================================================
   单条记录小卡片（每条带可见折叠按钮）
   =====================================================
   用法：把原来撑得很高的列表记录改为“紧凑摘要一行 + 详情”，
   每条记录自带一个醒目的「详情/收起」折叠按钮，默认只显示摘要，
   点击展开完整字段，从而一屏看更多信息、节省大量纵向空间。
     <details class="co-item">
       <summary>
         <span class="badge b-green">收入</span>
         <span class="i-kv"><b>来源</b></span>
         <span class="i-v num">+100</span>
         <span class="i-arrow"></span>
       </summary>
       <div class="i-body">
         <div class="cell"><span class="k">时间</span><span class="v">…</span></div>
         …
       </div>
     </details>
*/
.co-item {
  border: 1px solid var(--bd); border-radius: 11px; background: var(--card);
  margin-bottom: 8px; overflow: hidden;
}
.co-item > summary {
  cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none;
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px;
  padding: 9px 12px; font-size: 13px;
}
.co-item > summary::-webkit-details-marker { display: none; }
.co-item > summary::marker { content: ''; display: none; }
.co-item > summary:focus { outline: none; }
.co-item > summary:hover { background: rgba(128,128,160,.05); }
.co-item > summary .i-kv { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; min-width: 0; }
.co-item > summary .i-kv .k { color: var(--tx3); font-size: 12px; }
.co-item > summary .i-kv b { color: var(--tx); font-weight: 600; }
.co-item > summary .i-time { color: var(--tx3); font-size: 12px; white-space: nowrap; }
.co-item > summary .i-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.co-item > summary .i-arrow {
  margin-left: auto; display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; color: var(--tx3);
  background: rgba(128,128,160,.12); border: 1px solid var(--bd2);
  border-radius: 7px; padding: 2px 9px; opacity: .95; transition: all .15s ease; flex: 0 0 auto;
}
.co-item > summary .i-arrow::before { content: '详情 ▾'; }
.co-item > summary:hover .i-arrow { color: var(--ac); border-color: var(--ac); opacity: 1; }
.co-item[open] > summary .i-arrow::before { content: '收起 ▴'; }
.co-item[open] > summary .i-arrow { color: var(--ac); border-color: var(--ac); }
.co-item > .i-body {
  padding: 11px 12px 13px; border-top: 1px solid var(--bd);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px 18px;
  font-size: 13px; animation: coFade .18s ease;
}
.co-item > .i-body .cell { min-width: 0; word-break: break-all; }
.co-item > .i-body .cell > .k { display: block; font-size: 11.5px; color: var(--tx3); margin-bottom: 2px; }
.co-item > .i-body .cell > .v { color: var(--tx); }
.co-item > .i-body .cell.full { grid-column: 1 / -1; }
html[data-theme="light"] .co-item > summary:hover { background: rgba(15,23,42,.03); }
html[data-theme="light"] .co-item > summary .i-arrow { color: #6b7280; }

/* =====================================================
   应用中心（应用宝式图标宫格）
   ===================================================== */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.app-card {
  position: relative;
  min-width: 0; /* 关键：允许网格项收窄，修复长名称把列撑破导致水平溢出 */
  overflow: visible;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px 10px; border-radius: 14px; text-align: center;
  background: transparent; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.app-card:hover { background: rgba(255,255,255,.05); border-color: var(--bd2); transform: translateY(-2px); }
/* 精选推荐：按分类分组的分组标题 */
.rec-cat { margin-bottom: 16px; }
.rec-cat:last-child { margin-bottom: 4px; }
.rec-cat-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--tx2); margin: 2px 0 8px;
}
.rec-cat-title::before {
  content: ''; width: 4px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--ac), var(--ac2));
}
.rec-cat .app-grid { margin-top: 0; }
.app-ico-wrap { position: relative; line-height: 0; flex-shrink: 0; }
.app-ico {
  width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,.28); background: rgba(255,255,255,.06);
  transition: transform .18s ease;
}
.app-feat { background: rgba(255,255,255,.05); }
.app-name {
  min-width: 0; max-width: 100%; width: 100%;
  font-size: 12px; font-weight: 600; color: var(--tx); line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-meta {
  min-width: 0; max-width: 100%; width: 100%;
  font-size: 10px; color: var(--tx3); line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-rank {
  position: absolute; top: -7px; left: -6px; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; font-style: normal; color: #fff; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.4); border: 2px solid var(--bg0);
}
.app-rank.r1 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.app-rank.r2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.app-rank.r3 { background: linear-gradient(135deg, #b45309, #d97706); }

/* 应用中心：站点图标选择器（创建/编辑站点） */
.icon-opt {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; padding: 6px; border-radius: 12px; border: 2px solid transparent;
  transition: border-color .15s ease, background .15s ease;
}
.icon-opt:hover { background: rgba(255,255,255,.05); }
.icon-opt input { display: none; }
.icon-opt:has(input:checked) { border-color: rgba(129,140,248,.7); background: rgba(99,102,241,.12); }
.icon-thumb {
  width: 46px; height: 46px; border-radius: 11px; object-fit: cover;
  box-shadow: none; background: transparent;
  display: block; pointer-events: none;
}
.icon-opt-name { font-size: 10.5px; color: var(--tx3); }
@media (max-width: 640px) { .icon-thumb { width: 42px; height: 42px; border-radius: 10px; } }

@media (max-width: 1024px) { .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* 过时的4列紧凑布局已移除，统一使用下方2列响应式布局 */

/* =====================================================
   站内信中心（公告 + 站内信融合收件箱）
   ===================================================== */
.mail-list { display: flex; flex-direction: column; }
.mail-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px;
  border-radius: 12px; color: var(--tx); transition: background .15s ease;
}
.mail-item:hover { background: rgba(255,255,255,.05); }
.mail-av { flex-shrink: 0; line-height: 0; }
.mail-ic { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; box-shadow: 0 3px 10px rgba(0,0,0,.28); }
.av-dot {
  width: 40px; height: 40px; border-radius: 10px; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.av-user { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-size: 15px; }
.av-ann { background: rgba(99,102,241,.15); font-style: normal; }
.mail-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mail-t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mail-t b { color: #a5b4fc; font-size: 12px; flex-shrink: 0; }
.mail-t b.tg-site { color: #5eead4; }
.mail-t em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mail-meta { font-size: 11px; color: var(--tx3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-new {
  flex-shrink: 0; font-style: normal; font-size: 10px; font-weight: 700; color: #fff;
  background: #f43f5e; padding: 1px 6px; border-radius: 8px;
}
.msg-bubble {
  border: 1px solid var(--bd); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 10px; background: rgba(255,255,255,.03);
}
.msg-bubble.me { border-color: rgba(99,102,241,.5); background: rgba(99,102,241,.08); }
.msg-hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.msg-hd b { color: #a5b4fc; font-size: 13px; }
.msg-hd .n-time { font-size: 11px; }
.msg-title { font-size: 13px; font-weight: 700; color: var(--tx); margin-bottom: 4px; }
.msg-body { font-size: 13.5px; color: var(--tx); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

/* 铃铛：融合公告 + 站内信 */
.bell-all { color: #8fa0f5; font-size: 11.5px; font-weight: 500; }
.bell-tag {
  flex-shrink: 0; font-size: 10px; font-weight: 700; color: #fff;
  padding: 1px 6px; border-radius: 8px; margin-right: 8px; max-width: 90px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bell-tag.t-ann { background: #6366f1; }
.bell-tag.t-user { background: #0ea5e9; }
.bell-tag.t-site { background: #10b981; }
.bell-tag.t-system { background: #64748b; }

/* 进度条 */
.progress { height: 7px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: var(--grad); transition: width .4s; }

/* 步骤 */
.steps-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.step-chip {
  flex: 1; min-width: 130px; padding: 12px 16px; border-radius: 13px;
  background: rgba(255,255,255,.04); border: 1px solid var(--bd); text-align: center;
}
.step-chip .sc-t { font-size: 12px; color: var(--tx3); }
.step-chip .sc-n { font-size: 15px; font-weight: 700; margin-top: 3px; }
.step-chip.on { border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.07); }
.step-chip.off { opacity: .55; }

/* =====================================================
   模态框
   ===================================================== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(2, 5, 14, .7); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-mask.show { display: flex; animation: dropIn .2s ease; }
.modal {
  width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  background: #0f1527; border: 1px solid var(--bd2); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); margin: 10px;
}
.modal-head {
  padding: 16px 22px; border-bottom: 1px solid var(--bd); display: flex; align-items: center;
  font-size: 15px; font-weight: 700; position: sticky; top: 0; background: #0f1527; z-index: 2;
}
.modal-head .modal-x { margin-left: auto; cursor: pointer; color: var(--tx3); font-size: 20px; }
.modal-head .modal-x:hover { color: var(--err); }
.modal-body { padding: 20px 22px; }

/* 空状态 */
.empty { text-align: center; padding: 42px 16px; color: var(--tx3); font-size: 13px; }
.empty::before { content: "⌘"; display: block; font-size: 30px; margin-bottom: 10px; opacity: .5; }

/* 注意事项列表 */
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice-item { padding: 14px 16px; border-radius: 13px; background: rgba(255,255,255,.03); border: 1px solid var(--bd); transition: .2s; }
.notice-item:hover { border-color: var(--bd2); background: rgba(255,255,255,.05); }
.notice-item h4 { font-size: 14px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice-item .n-time { font-size: 11.5px; color: var(--tx3); font-weight: 400; }
.notice-item .n-body { font-size: 13px; color: var(--tx2); line-height: 1.8; white-space: pre-wrap; word-break: break-all; }

/* 告警等级 */
.lvl { display: inline-flex; align-items: center; gap: 6px; }
.lvl i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lvl-0 i { background: #34d399; box-shadow: 0 0 8px #34d399; }
.lvl-1 i { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
.lvl-2 i { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.lvl-3 i { background: #f87171; box-shadow: 0 0 8px #f87171; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* 信息展示行 */
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--tx3); }
.kv dd { word-break: break-all; }

/* =====================================================
   响应式
   ===================================================== */
@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 26px; }
  .auth-side .feat { display: none; }
  .auth-form { padding: 28px 26px; }
}
@media (max-width: 768px) {
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-toggle { display: flex; }
  .nav {
    display: none; position: fixed; top: 0; left: 0; bottom: 0; width: 260px;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 70px 16px 20px;
    background: rgba(10, 14, 26, .98); border-right: 1px solid var(--bd);
    overflow-y: auto; z-index: 110; transition: transform .25s ease;
    transform: translateX(-100%); box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }
  .nav.show { transform: translateX(0); display: flex; }
  .nav-link.on::after { display: none; }
  .user-meta i { display: none; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .container { padding: 16px 14px 110px; }
  .card { padding: 16px; border-radius: 14px; }
  .kv { grid-template-columns: 92px 1fr; }

  /* 表格转卡片 */
  .table-wrap { overflow: visible; }
  table.tb.res thead { display: none; }
  table.tb.res, table.tb.res tbody { display: block; }
  table.tb.res tr {
    display: block; border: 1px solid var(--bd); border-radius: 13px;
    padding: 8px 6px; margin-bottom: 10px; background: rgba(255,255,255,.025);
  }
  table.tb.res td {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    border-bottom: 1px dashed rgba(255,255,255,.07); padding: 8px 10px; text-align: right;
  }
  table.tb.res td::before {
    content: attr(data-l); color: var(--tx3); font-size: 11.5px; flex-shrink: 0; text-align: left;
  }
  table.tb.res td:last-child { border-bottom: none; }
  table.tb.res td.t-actions { justify-content: flex-end; }
  /* 空状态行（colspan）：取消 flex 右对齐，改为块级居中 */
  table.tb.res td[colspan] {
    display: block; text-align: center; justify-content: center;
    padding: 42px 16px;
  }
  table.tb.res td[colspan]::before { display: none; }
}
@media (max-width: 480px) {
  .brand-name { display: none; }
  .stat .st-value { font-size: 22px; }
  .auth-side h1 { font-size: 21px; }
  .searchbar .field { min-width: 100%; }
}

/* =====================================================
   主题切换器（顶栏）
   ===================================================== */
.theme-wrap { position: relative; }
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid var(--bd); border-radius: 12px;
  background: rgba(255,255,255,.04); color: var(--tx2); cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.theme-btn:hover { background: rgba(255,255,255,.09); transform: translateY(-1px); }
.theme-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 150px; padding: 10px; border-radius: 14px;
  background: rgba(12,16,30,.96); border: 1px solid var(--bd2);
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
  display: none;
}
.theme-panel.show { display: block; animation: dropIn .18s ease; }
.theme-panel .tp-label { font-size: 11px; color: var(--tx3); margin: 2px 2px 8px; }
.theme-rows { display: flex; flex-direction: column; gap: 2px; }
.theme-opt {
  display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px;
  cursor: pointer; color: var(--tx2); font-size: 12.5px; transition: background .12s;
}
.theme-opt:hover { background: rgba(255,255,255,.06); }
.theme-opt.on { color: var(--tx); background: rgba(255,255,255,.08); }
.theme-opt .tick { width: 12px; text-align: center; color: var(--ok); opacity: 0; }
.theme-opt.on .tick { opacity: 1; }
.theme-dots { display: flex; gap: 6px; }
.theme-dots i {
  width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
html[data-theme="light"] .theme-panel, html[data-theme="light"] .nav { background: #ffffffcc; }
html[data-theme="light"] .nav { border-color: var(--bd); }
/* 浅色主题兼容：顶栏/输入/表格/次级表面 */
html[data-theme="light"] .topbar { background: rgba(255,255,255,.78); }
html[data-theme="light"] .theme-btn { background: rgba(15,23,42,.05); }
html[data-theme="light"] .field input, html[data-theme="light"] select,
html[data-theme="light"] textarea { background: #f4f6fb; border-color: var(--bd); color: var(--tx); }
html[data-theme="light"] table.tb th { background: rgba(15,23,42,.05); }
html[data-theme="light"] table.tb tr:nth-child(even), html[data-theme="light"] table.tb.res tr { background: rgba(15,23,42,.03); }
html[data-theme="light"] .kw-tag { background: rgba(15,23,42,.08); color: var(--tx2); box-shadow: inset 0 0 0 1px rgba(15,23,42,.12); }

/* =====================================================
   应用中心美化（改名卡片 · 使用量角标 · 悬浮光效）
   ===================================================== */
.app-card .app-ico-wrap { position: relative; }

/* 应用分类导航 */
.cat-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cat-nav a {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 20px;
  font-size: 12px; color: var(--tx3);
  background: rgba(255,255,255,.05);
  border: 1px solid transparent;
  text-decoration: none; white-space: nowrap;
  transition: all .2s ease;
}
html[data-theme="light"] .cat-nav a { background: rgba(15,23,42,.05); color: #6b7280; }
html[data-theme="light"] .cat-nav a:hover { background: rgba(15,23,42,.09); color: #1f2430; }
html[data-theme="light"] .cat-nav a.on {
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(14,165,233,.1));
  color: #4f46e5; border-color: rgba(99,102,241,.3);
}
.cat-nav a:hover { color: var(--tx); background: rgba(255,255,255,.08); }
.cat-nav a.on {
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(34,211,238,.2));
  color: var(--tx); font-weight: 600;
  border-color: rgba(99,102,241,.3);
}

/* 筛选栏 */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.filter-bar .fb-label {
  font-size: 13px; color: var(--tx3); white-space: nowrap;
}
.filter-bar select {
  padding: 8px 12px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--bd);
  color: var(--tx); font-size: 13px;
}

/* 视图切换按钮 */
.view-toggle {
  display: inline-flex; gap: 4px;
  padding: 3px; border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--bd);
  margin-left: auto;
}
html[data-theme="light"] .view-toggle { background: rgba(15,23,42,.05); }
}
.view-toggle button {
  padding: 5px 12px; border-radius: 8px;
  background: transparent; border: 0;
  color: var(--tx3); font-size: 12px;
  cursor: pointer; white-space: nowrap;
  transition: all .2s ease;
}
.view-toggle button:hover { color: var(--tx); }
.view-toggle button.on {
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(34,211,238,.2));
  color: var(--tx); font-weight: 600;
}

.app-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(120% 100% at 50% 0%, var(--p1)22, transparent 60%);
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.app-card:hover::before { opacity: 1; }
.app-card .app-name {
  display: block; width: 100%; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--tx);
}
.app-card .app-use {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--tx3);
  background: rgba(255,255,255,.06); border-radius: 20px; padding: 2px 9px;
}
html[data-theme="light"] .app-card .app-use { background: rgba(15,23,42,.06); }
.app-card:hover .app-ico { transform: translateY(-2px) scale(1.05); }

/* 应用卡片元信息：强制单行显示，防止窄屏换行截断 */
.app-card .rec-badge,
.app-card .app-updated,
.app-card .app-desc,
.app-card .app-cat,
.app-card .app-stars {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}
.app-card .app-use {
  white-space: nowrap;
  flex-shrink: 0;
}
/* 精选徽章定位优化 */
.app-card .rec-badge {
  position: absolute; top: 6px; left: 6px;
  font-size: 10px; padding: 2px 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245,158,11,.25), rgba(236,72,153,.2));
  color: #fbbf24;
  z-index: 1;
}

/* 移动端应用中心布局优化：小屏改为2列网格，避免内容过窄 */
@media (max-width: 640px) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .app-card {
    padding: 14px 10px 16px;
    align-items: flex-start;
    text-align: left;
    min-height: 0;
  }
  .app-card .app-ico-wrap {
    align-self: center;
  }
  .app-card .app-name {
    font-size: 12px;
    text-align: center;
  }
  .app-card .app-updated,
  .app-card .app-desc,
  .app-card .app-cat {
    font-size: 11px;
    line-height: 1.5;
    margin-top: 1px;
  }
  .app-card .app-use {
    font-size: 10px;
    padding: 2px 8px;
  }
}
@media (max-width: 380px) {
  .app-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .app-card {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }
  .app-card .app-ico-wrap {
    flex-shrink: 0;
  }
  .app-card .app-ico {
    width: 42px; height: 42px;
  }
  .app-card .app-name {
    text-align: left;
    font-size: 13px;
  }
  .app-card .app-meta-wrap {
    display: flex; flex-direction: column; gap: 4px;
    min-width: 0; flex: 1;
  }
}

/* =====================================================
   仪表盘 · 统计圆饼（上：切维按钮；下左：圆饼；下右：维度明细文字）
   ===================================================== */
.dash-btns { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-bottom: 14px; }
.dash-main { display: grid; grid-template-columns: 216px 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .dash-main { grid-template-columns: 1fr; justify-items: center; } }
.dash-left { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.donut-wrap {
  width: 216px; height: 216px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--card2), var(--card));
  box-shadow: inset 0 0 0 1px var(--bd), 0 14px 34px rgba(0,0,0,.25);
}
.donut-wrap svg { color: var(--tx); }
.dash-note { font-size: 12px; color: var(--tx3); margin-top: 4px; }
.dash-cmp-switch { display: inline-flex; gap: 6px; margin-top: 9px; padding: 3px; background: var(--card); border: 1px solid var(--bd); border-radius: 9px; }
.dash-cmp-btn {
  font: inherit; font-size: 12px; color: var(--tx3); cursor: pointer;
  background: transparent; border: 0; border-radius: 7px; padding: 4px 10px;
  transition: all .15s ease;
}
.dash-cmp-btn:hover { color: var(--tx); }
.dash-cmp-btn.on {
  background: linear-gradient(135deg, rgba(99,102,241,.22), rgba(34,211,238,.18));
  color: var(--tx); font-weight: 600;
}
html[data-theme="light"] .dash-cmp-btn { color: #4b5563; }
.dash-cmp { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.cmp-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--tx3);
  background: rgba(127,127,127,.08); border: 1px solid var(--bd);
  padding: 5px 10px; border-radius: 9px;
}
.cmp-lb { font-weight: 600; }
.cmp-item b { color: var(--tx); font-weight: 700; font-variant-numeric: tabular-nums; }
.cmp-item em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.cmp-item em.up { color: #34d399; }
.cmp-item em.down { color: #f87171; }
.cmp-item em.flat { color: var(--tx3); }
.dash-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 12.5px; color: var(--tx2); cursor: pointer;
  background: var(--card); border: 1px solid var(--bd); border-radius: 9px;
  padding: 6px 10px; transition: all .15s ease;
}
.dash-btn:hover { border-color: var(--bd2); color: var(--tx); }
.dash-btn.on {
  background: linear-gradient(135deg, rgba(99,102,241,.22), rgba(34,211,238,.18));
  border-color: rgba(99,102,241,.55); color: var(--tx); font-weight: 600;
}
.dash-bic { font-size: 14px; }
.dash-bv { color: var(--tx3); font-weight: 400; }
.dash-btn.on .dash-bv { color: var(--tx2); }
.dash-right { min-width: 0; }
.dash-detail { display: flex; flex-direction: column; gap: 8px; }
.dash-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--bd); margin-bottom: 4px;
}
.dash-ic { font-size: 16px; margin-right: 6px; }
.dash-lb { font-weight: 700; font-size: 15px; }
.dash-tot { font-size: 13px; color: var(--tx3); }
.dash-tot b { color: var(--tx); font-size: 17px; font-variant-numeric: tabular-nums; }
.dash-row {
  display: grid; grid-template-columns: 14px 1fr auto 46px minmax(60px,120px);
  align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 9px;
  background: var(--card); border: 1px solid var(--bd);
}
.d-dot { width: 10px; height: 10px; border-radius: 50%; }
.d-n { font-size: 13.5px; font-weight: 500; }
.d-v { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.d-p { font-size: 12px; color: var(--tx3); text-align: right; }
.d-bar { height: 6px; border-radius: 6px; background: rgba(128,128,160,.12); overflow: hidden; }
.d-bar i { display: block; height: 100%; border-radius: 6px; transition: width .3s ease; }
.dash-extra { margin-top: 16px; border-top: 1px dashed var(--bd); }
.dash-extra > summary { padding-top: 12px; user-select: none; }
.dash-extra.dash-alert > summary { color: var(--err); font-weight: 600; }
.dash-extra .right { margin-left: 8px; }
.dash-foot {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--bd);
  font-size: 12.5px; color: var(--tx3);
}
.dash-foot b { color: var(--tx); font-size: 15px; font-variant-numeric: tabular-nums; margin-left: 4px; }
html[data-theme="light"] .dash-btn { color: #4b5563; }
html[data-theme="light"] .donut-wrap { box-shadow: inset 0 0 0 1px var(--bd), 0 10px 26px rgba(15,23,42,.10); }

/* ===== 2026-09-08 更新：头像图 / 消息分类标签 / 授权管理开关 ===== */
img.avatar { object-fit: cover; background: none; box-shadow: none; }
.icon-thumb.avatar-alt { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--tx2); background: rgba(255,255,255,.06); }
.mail-t b.tg-msg { color: #fbbf24; }
.mail-t b.tg-ann { color: #a5b4fc; }
.bell-tag.t-sys { background: #64748b; }
/* 个人资料授权管理 */
.auth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.auth-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border: 1px solid var(--bd); border-radius: 12px; background: rgba(255,255,255,.03); }
.auth-item.forced { border-color: rgba(99,102,241,.4); background: rgba(99,102,241,.06); }
.auth-name { font-size: 13.5px; font-weight: 600; color: var(--tx); }
.auth-tag { font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: #6366f1; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
.auth-state.on { font-size: 12px; color: #34d399; font-weight: 700; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: rgba(255,255,255,.18); border-radius: 999px; transition: .2s; }
.slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--grad); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ===== 提示条（站点管理 → IP/域名白名单设置 / 黑名单设置 等卡片内说明） ===== */
.tip {
  margin: 0 0 14px; padding: 10px 13px; border-radius: 11px;
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.28);
  color: var(--tx2); font-size: 12.5px; line-height: 1.75;
}
.tip b { color: var(--tx); }
.tip code {
  display: inline-block; padding: 1px 6px; margin: 0 1px; border-radius: 5px;
  background: var(--card2); border: 1px solid var(--bd); color: var(--tx);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
}

/* ===== site footer ===== */
/* ===== 精致页脚（悬浮固定+极简折叠） ===== */
.site-footer{
  position:fixed;
  bottom:0;left:0;right:0;
  z-index:100;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  background:rgba(15,18,32,.92);
  border-top:1px solid rgba(129,140,248,.2);
  transition:max-height .3s ease;
  max-height:52px;
  overflow:hidden;
}
.site-footer.sf-expanded{ max-height:420px; }
.site-footer::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(129,140,248,.6), rgba(34,211,238,.6), rgba(129,140,248,.6), transparent);
}
.sf-inner{
  max-width:1200px;
  margin:0 auto;
  padding:7px 20px;
}
.sf-brand-line{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:24px;
  min-height:38px;
  flex-wrap:wrap;
}
.sf-brand-col{ width:100%; }
.sf-logo-row{
  cursor:pointer;
  text-decoration:none;
  transition:opacity .2s;
  display:flex;
  align-items:center;
  gap:8px;
}
.sf-logo-row:hover{ opacity:.85; }
.sf-logo-icon{
  width:28px;height:28px;
  border-radius:8px;
  background:transparent;
  display:flex;align-items:center;justify-content:center;
  color:var(--tx);
  font-weight:800;font-size:16px;
  flex-shrink:0;
}
.sf-logo-img{
  object-fit:contain;background:transparent;box-shadow:none;
  width:28px;height:28px;
}
.sf-brand-name{
  font-weight:700;font-size:14px;
  background:var(--grad);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
}
.sf-expand-icon{
  font-size:12px;color:var(--tx3);
  transition:transform .3s;
  display:inline-block;line-height:1;
}
.site-footer.sf-expanded .sf-expand-icon{ transform:rotate(180deg); }
.sf-beian{
  display:flex;align-items:center;
  gap:6px 12px;flex-wrap:wrap;
}
.sf-beian a{
  font-size:11px;color:var(--tx3);
  text-decoration:none;transition:.2s;
  white-space:nowrap;
}
.sf-beian a:hover{ color:var(--tx2); }
.sf-tagline{
  font-size:12px;color:var(--tx3);
  line-height:1.6;margin:0;
  max-height:0;opacity:0;overflow:hidden;
  transition:max-height .3s ease, opacity .3s ease, margin .3s ease;
}
.site-footer.sf-expanded .sf-tagline{
  max-height:50px;opacity:1;margin:6px 0 10px;
}
.sf-links-col{
  display:flex;gap:32px;flex-wrap:wrap;
  max-height:0;opacity:0;overflow:hidden;
  transition:max-height .3s ease, opacity .3s ease;
}
.site-footer.sf-expanded .sf-links-col{
  max-height:180px;opacity:1;
}
.sf-link-group{
  display:flex;flex-direction:column;gap:5px;
}
.sf-link-title{
  font-size:10px;font-weight:700;color:var(--tx2);
  text-transform:uppercase;letter-spacing:1px;margin-bottom:2px;
}
.sf-link-group a{
  font-size:12px;color:var(--tx3);
  text-decoration:none;transition:.2s;
}
.sf-link-group a:hover{ color:var(--tx); }
.sf-bottom{
  border-top:1px solid rgba(255,255,255,.06);
  padding-top:6px;margin-top:6px;
  text-align:center;font-size:10px;color:var(--tx3);
  max-height:0;opacity:0;overflow:hidden;
  transition:max-height .3s ease, opacity .3s ease, padding .3s ease, margin .3s ease;
}
.site-footer.sf-expanded .sf-bottom{
  max-height:24px;opacity:1;padding-top:6px;margin-top:6px;
}
@media (max-width:720px){
  .sf-brand-line{ flex-direction:column;align-items:center;gap:4px; }
  .site-footer{ max-height:74px; }
  .site-footer.sf-expanded{ max-height:520px; }
  body{ padding-bottom:82px; }
  .sf-inner{ padding:7px 16px; }
}


/* ===== 页脚链接设置 ===== */
.link-group-item {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  background: rgba(255,255,255,.02);
  transition: border-color .2s;
}
.link-group-item:hover { border-color: rgba(99,102,241,.3); }
.link-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.link-group-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--tx2);
  white-space: nowrap;
  flex-shrink: 0;
}
.link-group-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #2a3050;
  border-radius: 10px;
  background: #0d1120;
  color: var(--tx);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.link-group-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99,102,241,.16);
}
.link-rows { margin-bottom: 12px; }
.link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.link-row:last-child { margin-bottom: 0; }
.link-text-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #2a3050;
  border-radius: 10px;
  background: #0d1120;
  color: var(--tx);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.link-url-input {
  flex: 2;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #2a3050;
  border-radius: 10px;
  background: #0d1120;
  color: var(--tx);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.link-text-input:focus, .link-url-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99,102,241,.16);
}
.link-del-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* 移动端适配 */
@media (max-width: 640px) {
  .link-group-item { padding: 14px; }
  .link-group-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .link-group-label {
    width: 100%;
    margin-bottom: 4px;
  }
  .link-group-input {
    flex: 1;
  }
  .link-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .link-text-input, .link-url-input {
    flex: 1 1 100%;
  }
  .link-del-btn {
    position: absolute;
    right: 0;
    top: 0;
  }
  .link-row { position: relative; padding-right: 44px; }
}

/* =====================================================
   2026-09-21 更新：浅色主题完整适配 + 全站视觉美化
   ===================================================== */

/* ============ 一、浅色主题 flash 消息修复 ============ */
html[data-theme="light"] .flash-ok {
  color: #047857;
  background: rgba(16,185,129,.1);
  border-color: rgba(16,185,129,.3);
}
html[data-theme="light"] .flash-err {
  color: #b91c1c;
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.3);
}
html[data-theme="light"] .flash-warn {
  color: #b45309;
  background: rgba(245,158,11,.1);
  border-color: rgba(245,158,11,.3);
}

/* ============ 二、浅色主题 badge 徽章修复 ============ */
html[data-theme="light"] .b-green {
  color: #15803d;
  background: rgba(34,197,94,.12);
  box-shadow: inset 0 0 0 1px rgba(34,197,94,.3);
}
html[data-theme="light"] .b-blue {
  color: #1d4ed8;
  background: rgba(59,130,246,.12);
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.3);
}
html[data-theme="light"] .b-yellow {
  color: #a16207;
  background: rgba(234,179,8,.12);
  box-shadow: inset 0 0 0 1px rgba(234,179,8,.3);
}
html[data-theme="light"] .b-red {
  color: #b91c1c;
  background: rgba(239,68,68,.12);
  box-shadow: inset 0 0 0 1px rgba(239,68,68,.3);
}
html[data-theme="light"] .b-violet {
  color: #6d28d9;
  background: rgba(139,92,246,.12);
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.3);
}
html[data-theme="light"] .b-gray {
  color: #4b5563;
  background: rgba(107,114,128,.12);
  box-shadow: inset 0 0 0 1px rgba(107,114,128,.25);
}

/* ============ 三、浅色主题其他元素全面修复 ============ */

/* 导航栏文字 */
html[data-theme="light"] .brand-name {
  background: linear-gradient(120deg, #4f46e5, #0284c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .nav-link { color: #4b5563; }
html[data-theme="light"] .nav-link:hover {
  color: #1f2430;
  background: rgba(15,23,42,.06);
}
html[data-theme="light"] .nav-link.on {
  color: #4f46e5;
  background: rgba(99,102,241,.12);
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.35);
}
html[data-theme="light"] .nav-toggle {
  background: rgba(15,23,42,.05);
  border-color: var(--bd);
}
html[data-theme="light"] .nav-toggle span { background: #1f2430; }
html[data-theme="light"] .nav.show { background: rgba(255,255,255,.97); border-bottom-color: var(--bd); }
html[data-theme="light"] .nav.show .nav-link { color: #4b5563; }
html[data-theme="light"] .nav.show .nav-link:hover { background: rgba(15,23,42,.06); color: #1f2430; }
html[data-theme="light"] .nav.show .nav-link.on { color: #4f46e5; background: rgba(99,102,241,.12); }

/* 铃铛按钮和下拉 */
html[data-theme="light"] .bell-btn {
  background: rgba(15,23,42,.05);
  border-color: var(--bd);
  color: #4b5563;
}
html[data-theme="light"] .bell-btn:hover {
  color: #1f2430;
  border-color: var(--bd2);
}
html[data-theme="light"] .bell-drop {
  background: rgba(255,255,255,.97);
  border-color: var(--bd2);
}
html[data-theme="light"] .bell-head {
  border-bottom-color: var(--bd);
  color: #1f2430;
}
html[data-theme="light"] .bell-item {
  color: #4b5563;
  border-bottom-color: rgba(15,23,42,.06);
}
html[data-theme="light"] .bell-item:hover {
  background: rgba(99,102,241,.08);
  color: #1f2430;
}
html[data-theme="light"] .bell-item time { color: #6b7280; }
html[data-theme="light"] .bell-empty { color: #6b7280; }
html[data-theme="light"] .bell-all { color: #4f46e5; }

/* 用户信息 */
html[data-theme="light"] .user-meta b { color: #1f2430; }
html[data-theme="light"] .user-meta i { color: #4f46e5; }
html[data-theme="light"] .btn-logout {
  background: rgba(15,23,42,.05);
  border-color: var(--bd);
  color: #6b7280;
}
html[data-theme="light"] .btn-logout:hover {
  color: #dc2626;
  border-color: rgba(220,38,38,.35);
}

/* 主题切换器 */
html[data-theme="light"] .theme-btn {
  background: rgba(15,23,42,.05);
  border-color: var(--bd);
  color: #4b5563;
}
html[data-theme="light"] .theme-btn:hover {
  background: rgba(15,23,42,.09);
}
html[data-theme="light"] .theme-panel {
  background: rgba(255,255,255,.97);
  border-color: var(--bd2);
}
html[data-theme="light"] .theme-panel .tp-label { color: #6b7280; }
html[data-theme="light"] .theme-opt { color: #4b5563; }
html[data-theme="light"] .theme-opt:hover { background: rgba(15,23,42,.06); }
html[data-theme="light"] .theme-opt.on {
  color: #1f2430;
  background: rgba(15,23,42,.08);
}

/* 卡片和统计卡 */
html[data-theme="light"] .stat {
  background: linear-gradient(145deg, #ffffff, #f8f9fc);
  border-color: var(--bd);
}
html[data-theme="light"] .stat:hover {
  border-color: var(--bd2);
  box-shadow: 0 12px 32px rgba(15,23,42,.12);
}
html[data-theme="light"] .card {
  border-color: var(--bd);
}

/* 表单元素 */
html[data-theme="light"] input[type=text],
html[data-theme="light"] input[type=password],
html[data-theme="light"] input[type=email],
html[data-theme="light"] input[type=number],
html[data-theme="light"] input[type=url],
html[data-theme="light"] input[type=date],
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  border-color: #d1d9e6;
  background: #f8f9fc;
  color: #1f2430;
}
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.14);
  background: #ffffff;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #9ca3af;
}
html[data-theme="light"] select option {
  background: #ffffff;
  color: #1f2430;
}
html[data-theme="light"] .f-label { color: #4b5563; }
html[data-theme="light"] .f-hint { color: #6b7280; }

/* 按钮 */
html[data-theme="light"] .btn-ghost {
  background: rgba(15,23,42,.05);
  border-color: var(--bd2);
  color: #4b5563;
}
html[data-theme="light"] .btn-ghost:hover {
  background: rgba(15,23,42,.09);
  color: #1f2430;
}

/* 表格 */
html[data-theme="light"] .tb th {
  color: #6b7280;
  border-bottom-color: var(--bd2);
  background: rgba(15,23,42,.04);
}
html[data-theme="light"] .tb td {
  border-bottom-color: rgba(15,23,42,.06);
}
html[data-theme="light"] .tb tbody tr:hover {
  background: rgba(99,102,241,.06);
}
html[data-theme="light"] table.tb.res tr {
  background: #ffffff;
  border-color: var(--bd);
}
html[data-theme="light"] table.tb.res td {
  border-bottom-color: rgba(15,23,42,.08);
}

/* 分页和标签页 */
html[data-theme="light"] .pg {
  background: rgba(15,23,42,.05);
  border-color: var(--bd);
  color: #4b5563;
}
html[data-theme="light"] .pg:hover {
  color: #1f2430;
  border-color: var(--bd2);
  background: rgba(15,23,42,.08);
}
html[data-theme="light"] .pg.on {
  color: #ffffff;
}
html[data-theme="light"] .pg-info { color: #6b7280; }

html[data-theme="light"] .tab {
  color: #4b5563;
  background: rgba(15,23,42,.04);
  border-color: var(--bd);
}
html[data-theme="light"] .tab:hover { color: #1f2430; }
html[data-theme="light"] .tab.on {
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(14,165,233,.1));
  border-color: rgba(99,102,241,.4);
  color: #4f46e5;
}

/* 代码块保持深色背景（代码块始终深色是合理的） */
/* .code-box 和 .apikey-box 保持深色背景，无需修改 */

/* 模态框 */
html[data-theme="light"] .modal {
  background: #ffffff;
  border-color: var(--bd2);
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
}
html[data-theme="light"] .modal-head {
  background: #ffffff;
  border-bottom-color: var(--bd);
  color: #1f2430;
}
html[data-theme="light"] .modal-head .modal-x { color: #6b7280; }
html[data-theme="light"] .modal-head .modal-x:hover { color: #dc2626; }

/* 空状态 */
html[data-theme="light"] .empty { color: #6b7280; }

/* 注意事项 */
html[data-theme="light"] .notice-item {
  background: rgba(15,23,42,.03);
  border-color: var(--bd);
}
html[data-theme="light"] .notice-item:hover {
  border-color: var(--bd2);
  background: rgba(15,23,42,.05);
}
html[data-theme="light"] .notice-item h4 { color: #1f2430; }
html[data-theme="light"] .notice-item .n-time { color: #6b7280; }
html[data-theme="light"] .notice-item .n-body { color: #4b5563; }

/* 进度条 */
html[data-theme="light"] .progress {
  background: rgba(15,23,42,.1);
}

/* 步骤 */
html[data-theme="light"] .step-chip {
  background: rgba(15,23,42,.03);
  border-color: var(--bd);
}
html[data-theme="light"] .step-chip .sc-t { color: #6b7280; }
html[data-theme="light"] .step-chip .sc-n { color: #1f2430; }

/* 站内信 */
html[data-theme="light"] .mail-item:hover {
  background: rgba(15,23,42,.04);
}
html[data-theme="light"] .mail-t b { color: #4f46e5; }
html[data-theme="light"] .mail-t b.tg-site { color: #0d9488; }
html[data-theme="light"] .mail-t em { color: #1f2430; }
html[data-theme="light"] .mail-meta { color: #6b7280; }
html[data-theme="light"] .msg-bubble {
  background: rgba(15,23,42,.03);
  border-color: var(--bd);
}
html[data-theme="light"] .msg-bubble.me {
  border-color: rgba(99,102,241,.35);
  background: rgba(99,102,241,.07);
}
html[data-theme="light"] .msg-hd b { color: #4f46e5; }
html[data-theme="light"] .msg-title { color: #1f2430; }
html[data-theme="light"] .msg-body { color: #374151; }

/* 应用卡片 */
html[data-theme="light"] .app-card:hover {
  background: rgba(15,23,42,.04);
  border-color: var(--bd2);
}
html[data-theme="light"] .app-ico {
  box-shadow: 0 4px 12px rgba(15,23,42,.12);
  background: rgba(15,23,42,.04);
}
html[data-theme="light"] .app-feat { background: rgba(15,23,42,.04); }
html[data-theme="light"] .app-name { color: #1f2430; }
html[data-theme="light"] .app-meta { color: #6b7280; }
html[data-theme="light"] .rec-cat-title { color: #4b5563; }

/* 仪表盘 */
html[data-theme="light"] .dash-btn {
  background: rgba(15,23,42,.03);
  border-color: var(--bd);
}
html[data-theme="light"] .dash-btn:hover {
  border-color: var(--bd2);
  color: #1f2430;
}
html[data-theme="light"] .dash-btn.on {
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(14,165,233,.1));
  border-color: rgba(99,102,241,.4);
  color: #4f46e5;
}
html[data-theme="light"] .dash-head {
  background: rgba(15,23,42,.03);
  border-color: var(--bd);
}
html[data-theme="light"] .dash-lb { color: #1f2430; }
html[data-theme="light"] .dash-tot { color: #6b7280; }
html[data-theme="light"] .dash-tot b { color: #1f2430; }
html[data-theme="light"] .dash-row {
  background: rgba(15,23,42,.025);
  border-color: var(--bd);
}
html[data-theme="light"] .d-n { color: #374151; }
html[data-theme="light"] .d-v { color: #1f2430; }
html[data-theme="light"] .d-p { color: #6b7280; }
html[data-theme="light"] .d-bar { background: rgba(15,23,42,.1); }
html[data-theme="light"] .dash-note { color: #6b7280; }
html[data-theme="light"] .dash-foot {
  color: #6b7280;
  border-top-color: var(--bd);
}
html[data-theme="light"] .dash-foot b { color: #1f2430; }
html[data-theme="light"] .dash-extra { border-top-color: var(--bd); }
html[data-theme="light"] .cmp-item {
  background: rgba(15,23,42,.05);
  border-color: var(--bd);
  color: #4b5563;
}
html[data-theme="light"] .cmp-item b { color: #1f2430; }
html[data-theme="light"] .cmp-item em.up { color: #059669; }
html[data-theme="light"] .cmp-item em.down { color: #dc2626; }

/* 授权管理 */
html[data-theme="light"] .auth-item {
  background: rgba(15,23,42,.03);
  border-color: var(--bd);
}
html[data-theme="light"] .auth-item.forced {
  border-color: rgba(99,102,241,.35);
  background: rgba(99,102,241,.06);
}
html[data-theme="light"] .auth-name { color: #1f2430; }
html[data-theme="light"] .auth-state.on { color: #059669; }
html[data-theme="light"] .slider { background: rgba(15,23,42,.18); }

/* 提示条 */
html[data-theme="light"] .tip {
  background: rgba(245,158,11,.08);
  border-color: rgba(245,158,11,.28);
  color: #92400e;
}
html[data-theme="light"] .tip b { color: #78350f; }
html[data-theme="light"] .tip code {
  background: rgba(15,23,42,.06);
  border-color: var(--bd);
  color: #1f2430;
}

/* 页脚 */
html[data-theme="light"] .site-footer {
  background: rgba(255,255,255,.92);
  border-top-color: rgba(99,102,241,.18);
}
html[data-theme="light"] .sf-logo-icon { color: #4f46e5; }
html[data-theme="light"] .sf-expand-icon { color: #6b7280; }
html[data-theme="light"] .sf-beian a { color: #6b7280; }
html[data-theme="light"] .sf-beian a:hover { color: #1f2430; }
html[data-theme="light"] .sf-tagline { color: #6b7280; }
html[data-theme="light"] .sf-link-title { color: #4b5563; }
html[data-theme="light"] .sf-link-group a { color: #6b7280; }
html[data-theme="light"] .sf-link-group a:hover { color: #1f2430; }
html[data-theme="light"] .sf-bottom {
  border-top-color: rgba(15,23,42,.08);
  color: #6b7280;
}

/* 页脚链接设置 */
html[data-theme="light"] .link-group-item {
  border-color: var(--bd);
  background: rgba(15,23,42,.02);
}
html[data-theme="light"] .link-group-item:hover {
  border-color: rgba(99,102,241,.3);
}
html[data-theme="light"] .link-group-label { color: #4b5563; }
html[data-theme="light"] .link-group-input,
html[data-theme="light"] .link-text-input,
html[data-theme="light"] .link-url-input {
  border-color: #d1d9e6;
  background: #f8f9fc;
  color: #1f2430;
}
html[data-theme="light"] .link-group-input:focus,
html[data-theme="light"] .link-text-input:focus,
html[data-theme="light"] .link-url-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.14);
  background: #ffffff;
}

/* 可折叠项 */
html[data-theme="light"] .co-item {
  border-color: var(--bd);
  background: #ffffff;
}
html[data-theme="light"] .co-item > summary .i-kv .k { color: #6b7280; }
html[data-theme="light"] .co-item > summary .i-kv b { color: #1f2430; }
html[data-theme="light"] .co-item > summary .i-time { color: #6b7280; }
html[data-theme="light"] .co-item > .i-body {
  border-top-color: var(--bd);
}
html[data-theme="light"] .co-item > .i-body .cell > .k { color: #6b7280; }
html[data-theme="light"] .co-item > .i-body .cell > .v { color: #374151; }
html[data-theme="light"] .co-arrow {
  background: rgba(15,23,42,.06);
  border-color: var(--bd2);
  color: #6b7280;
}

/* 关键词标签 */
html[data-theme="light"] .kw-tag {
  background: rgba(99,102,241,.1);
  color: #4f46e5;
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.25);
}

/* 金额颜色 */
html[data-theme="light"] .amount-plus { color: #059669; }
html[data-theme="light"] .amount-minus { color: #dc2626; }

/* 等级指示灯 */
html[data-theme="light"] .lvl-0 i { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,.4); }
html[data-theme="light"] .lvl-1 i { background: #3b82f6; box-shadow: 0 0 6px rgba(59,130,246,.4); }
html[data-theme="light"] .lvl-2 i { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,.4); }
html[data-theme="light"] .lvl-3 i { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.4); }

/* =====================================================
   四、全站视觉美化优化（双主题通用）
   ===================================================== */

/* 卡片hover效果优化 */
.card.hoverable:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(0,0,0,.16);
}

/* 按钮active状态优化 */
.btn:active {
  transform: translateY(0) scale(.98);
  box-shadow: 0 3px 12px rgba(99,102,241,.25);
}
html[data-theme="light"] .card.hoverable:hover {
  box-shadow: 0 16px 40px rgba(15,23,42,.1);
}

/* 输入框focus优化（更柔和的阴影） */
input:focus, select:focus, textarea:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}

/* 表格斑马纹增强 */
table.tb tbody tr:nth-child(even) {
  background: rgba(255,255,255,.02);
}
html[data-theme="light"] table.tb tbody tr:nth-child(even) {
  background: rgba(15,23,42,.025);
}
html[data-theme="light"] table.tb tbody tr:nth-child(even):hover {
  background: rgba(99,102,241,.06);
}

/* 分页按钮优化 */
.pg {
  transition: all .18s ease;
}
.pg:hover {
  transform: translateY(-1px);
}

/* 标签页切换优化 */
.tab {
  transition: all .2s ease;
}
.tab:hover {
  transform: translateY(-1px);
}

/* 统计卡hover增强 */
.stat:hover {
  transform: translateY(-4px);
}

/* 链接颜色优化 */
html[data-theme="light"] .amount-plus,
html[data-theme="light"] .stat .st-value.income { color: #059669; }
html[data-theme="light"] .stat .st-value.expense { color: #dc2626; }

/* 代码块在浅色主题下保持深色，但边框调整 */
html[data-theme="light"] .code-box {
  border-color: rgba(15,23,42,.15);
}
html[data-theme="light"] .code-head {
  border-bottom-color: rgba(255,255,255,.08);
}

/* APIKEY盒子在浅色主题下保持深色背景 */
html[data-theme="light"] .apikey-box {
  border-color: rgba(99,102,241,.35);
}

/* 复选框优化 */
.check-line input[type=checkbox] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  transition: all .15s ease;
}
html[data-theme="light"] .check-line span { color: #4b5563; }

/* 开关slider在浅色主题下的未开启状态 */
html[data-theme="light"] .slider {
  background: rgba(15,23,42,.2);
}

/* =====================================================
   应用中心动态效果增强（2026-09-21）
   - 视图切换动画 / 卡片hover / staggered fade-in
   - skeleton 骨架屏 / 空状态微动效 / 搜索高亮渐变
   ===================================================== */

/* ---------- 1. 卡片 hover 增强 ---------- */
.app-card {
  transition:
    background .25s ease,
    border-color .25s ease,
    transform .25s cubic-bezier(.22,.61,.36,1),
    box-shadow .25s ease;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99,102,241,.45);
    box-shadow: 0 12px 28px rgba(99,102,241,.18), 0 4px 10px rgba(0,0,0,.18);
  }
  .app-card:hover .app-ico {
    transform: translateY(-2px) scale(1.08);
  }
}
html[data-theme="light"] .app-card:hover {
  box-shadow: 0 12px 28px rgba(99,102,241,.18), 0 4px 10px rgba(15,23,42,.08);
}
/* 移动端/触屏：active 反馈（无 hover） */
.app-card:active {
  transform: translateY(-1px) scale(.985);
  transition-duration: .1s;
}

/* ---------- 2. 视图切换：fade-out / fade-in ---------- */
.app-grid {
  transition: opacity .22s ease, transform .22s ease;
}
.app-grid.fade-out {
  opacity: 0;
  transform: translateY(8px) scale(.985);
  pointer-events: none;
}
.app-grid.fade-in {
  animation: gridFadeIn .32s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes gridFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 3. staggered 卡片逐个淡入（网格：中心缩放淡入；列表：左滑入） ---------- */
@keyframes cardFadeInGrid {
  from { opacity: 0; transform: scale(.92) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes cardFadeInList {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}
.app-grid.stagger-in .app-card {
  animation: cardFadeInGrid .38s cubic-bezier(.22,.61,.36,1) both;
}
.app-grid.view-list.stagger-in .app-card {
  animation-name: cardFadeInList;
}
/* 逐个延迟：前 12 个卡片 */
.app-grid.stagger-in .app-card:nth-child(1)  { animation-delay: 0ms; }
.app-grid.stagger-in .app-card:nth-child(2)  { animation-delay: 40ms; }
.app-grid.stagger-in .app-card:nth-child(3)  { animation-delay: 80ms; }
.app-grid.stagger-in .app-card:nth-child(4)  { animation-delay: 120ms; }
.app-grid.stagger-in .app-card:nth-child(5)  { animation-delay: 160ms; }
.app-grid.stagger-in .app-card:nth-child(6)  { animation-delay: 200ms; }
.app-grid.stagger-in .app-card:nth-child(7)  { animation-delay: 240ms; }
.app-grid.stagger-in .app-card:nth-child(8)  { animation-delay: 280ms; }
.app-grid.stagger-in .app-card:nth-child(9)  { animation-delay: 320ms; }
.app-grid.stagger-in .app-card:nth-child(10) { animation-delay: 360ms; }
.app-grid.stagger-in .app-card:nth-child(11) { animation-delay: 400ms; }
.app-grid.stagger-in .app-card:nth-child(12) { animation-delay: 440ms; }
.app-grid.stagger-in .app-card:nth-child(n+13) { animation-delay: 480ms; }

/* ---------- 4. 列表视图布局（view-list） ---------- */
.app-grid.view-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.app-grid.view-list .app-card {
  flex-direction: row;
  align-items: center;
  text-align: left;
  padding: 10px 14px;
  gap: 12px;
  border: 1px solid var(--bd);
  background: var(--card);
}
.app-grid.view-list .app-card .app-ico-wrap { flex-shrink: 0; align-self: center; }
.app-grid.view-list .app-card .app-name {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 13px;
}
.app-grid.view-list .app-card .app-meta-wrap {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; min-width: 0;
}
.app-grid.view-list .app-card .app-desc {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 11px; color: var(--tx3);
}
.app-grid.view-list .app-card .app-rank { top: -4px; left: -4px; }

/* ---------- 5. skeleton 骨架屏 ---------- */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.skeleton-card {
  position: relative;
  padding: 14px 8px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--bd);
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.skeleton-card .sk-ico {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255,255,255,.08);
}
.skeleton-card .sk-line {
  height: 11px; border-radius: 6px;
  background: rgba(255,255,255,.08);
}
.skeleton-card .sk-line.w80 { width: 80%; }
.skeleton-card .sk-line.w60 { width: 60%; }
.skeleton-card .sk-line.w40 { width: 40%; }
/* shimmer 高光扫过 */
.skeleton-card::after {
  content: '';
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,.08),
    transparent);
  animation: shimmer 1.4s infinite;
}
html[data-theme="light"] .skeleton-card::after {
  background: linear-gradient(90deg,
    transparent,
    rgba(15,23,42,.06),
    transparent);
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
/* 列表视图骨架 */
.skeleton-grid.list {
  display: flex; flex-direction: column; gap: 10px;
}
.skeleton-grid.list .skeleton-card {
  flex-direction: row; align-items: center; text-align: left;
  padding: 10px 14px; gap: 12px;
}
.skeleton-grid.list .sk-line { flex: 1; }
@media (max-width: 640px) {
  .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .skeleton-card .sk-ico { width: 38px; height: 38px; }
}

/* ---------- 6. 空状态微动效 ---------- */
.empty-big {
  padding: 40px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: emptyFadeIn .45s ease both;
}
.empty-big .eb-icon {
  font-size: 56px;
  line-height: 1;
  animation: floatY 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 18px rgba(99,102,241,.25));
}
.empty-big .eb-title {
  font-size: 16px; font-weight: 700; color: var(--tx);
  animation: emptyFadeIn .5s .1s ease both;
}
.empty-big .eb-desc {
  font-size: 13px; color: var(--tx3); max-width: 320px; line-height: 1.6;
  animation: emptyFadeIn .5s .2s ease both;
}
.empty-big .eb-actions {
  margin-top: 6px;
  animation: emptyFadeIn .5s .3s ease both;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes emptyFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 7. 搜索关键词高亮：渐变背景 ---------- */
mark.hl {
  background: linear-gradient(120deg,
    rgba(99,102,241,.28),
    rgba(34,211,238,.28));
  color: inherit;
  padding: 1px 3px;
  border-radius: 4px;
  font-weight: 600;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
html[data-theme="light"] mark.hl {
  background: linear-gradient(120deg,
    rgba(99,102,241,.18),
    rgba(14,165,233,.22));
}

/* ---------- 8. 页面级过渡：链接/表单提交时内容淡出 ---------- */
body.leaving .app-grid,
body.leaving .filter-bar,
body.leaving .pager {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
/* 页面加载完成时内容淡入（首屏） */
.app-grid.animate-in {
  animation: gridFadeIn .35s ease both;
}

/* ---------- 9. 分页按钮 hover 增强 ---------- */
.pager .pg {
  transition: all .18s ease;
}

/* ---------- 10. 分类标签 hover 微动 ---------- */
.cat-nav a {
  transition: all .22s cubic-bezier(.22,.61,.36,1);
}
.cat-nav a:not(.on):hover {
  transform: translateY(-1px);
}

/* ---------- 11. 尊重 prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .app-grid,
  .app-grid.fade-in,
  .app-grid.stagger-in .app-card,
  .empty-big,
  .empty-big .eb-icon,
  .empty-big .eb-title,
  .empty-big .eb-desc,
  .empty-big .eb-actions,
  .app-card,
  .app-card .app-ico,
  .skeleton-card::after,
  body.leaving .app-grid,
  body.leaving .filter-bar,
  body.leaving .pager,
  .cat-nav a {
    animation: none !important;
    transition: none !important;
  }
  .empty-big .eb-icon { animation: none !important; }
  .skeleton-card::after { display: none; }
}

/* ---------- 12. 搜索命中卡片脉冲 ---------- */
@keyframes searchPulse {
  0%   { box-shadow: 0 0 0 0 rgba(99,102,241,.35); }
  70%  { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
  100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
}
.app-card.search-pulse {
  animation: searchPulse .6s ease-out;
}


/* =====================================================
   ★★★ 应用中心全面优化 v2 (2026-09-21) ★★★
   覆盖：搜索区 / 分类导航 / 编辑精选 / 筛选栏 / 应用卡片 / 响应式
   ===================================================== */

/* ---------- 搜索区域 ---------- */
.search-card { padding: 16px 20px; }
body.app-index .searchbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: nowrap;
  margin-bottom: 0; width: 100%;
}
body.app-index .search-input-wrap {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center;
}
.search-icon {
  position: absolute; left: 14px; width: 18px; height: 18px;
  color: var(--tx3); pointer-events: none; flex-shrink: 0;
}
.search-input-wrap input {
  width: 100%; height: 42px; padding: 0 14px 0 42px;
  border-radius: 11px; border: 1px solid var(--bd);
  background: var(--card2, rgba(255,255,255,.06));
  color: var(--tx); font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
html[data-theme="light"] .search-input-wrap input {
  background: #f4f6fb; border-color: #d1d9e6; color: #1f2430;
}
.search-input-wrap input::placeholder { color: var(--tx3); }
.search-input-wrap input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99,102,241,.16);
  background: var(--card);
}
html[data-theme="light"] .search-input-wrap input:focus {
  background: #fff;
}
.search-btn {
  height: 42px; padding: 0 22px; flex-shrink: 0; font-size: 14px;
}

/* ---------- 分类导航（横向滚动） ---------- */
.cat-bar {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; margin-bottom: 14px;
  padding: 2px 0;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-nav {
  display: inline-flex; gap: 8px; flex-wrap: nowrap;
  padding: 2px 4px; min-width: max-content;
}
.cat-nav a {
  display: inline-flex; align-items: center; flex-shrink: 0;
  padding: 7px 16px; border-radius: 20px;
  font-size: 13px; color: var(--tx3);
  background: rgba(255,255,255,.05);
  border: 1px solid transparent;
  text-decoration: none; white-space: nowrap;
  transition: all .2s ease;
}
html[data-theme="light"] .cat-nav a { background: rgba(15,23,42,.05); color: #6b7280; }
.cat-nav a:hover { color: var(--tx); background: rgba(255,255,255,.08); }
.cat-nav a.on {
  background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(34,211,238,.2));
  color: var(--tx); font-weight: 600;
  border-color: rgba(99,102,241,.4);
}
html[data-theme="light"] .cat-nav a.on {
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(14,165,233,.1));
  color: #4f46e5; border-color: rgba(99,102,241,.3);
}

/* ---------- 区域标题 ---------- */
.section-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.section-title {
  font-size: 16px; font-weight: 700; color: var(--tx);
  display: flex; align-items: center; gap: 6px; margin: 0;
}
.section-sub { font-size: 12px; color: var(--tx3); }
.section-more {
  margin-left: auto; font-size: 12px; color: var(--ac);
  text-decoration: none; white-space: nowrap;
  transition: opacity .2s;
}
.section-more:hover { opacity: .8; }

/* ---------- 编辑精选卡片（横向布局） ---------- */
.rec-list {
  display: flex; flex-direction: column; gap: 10px;
}
.rec-item {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 14px;
  border: 1px solid var(--bd); background: var(--card);
  text-decoration: none; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.rec-item:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,.4);
  box-shadow: 0 8px 24px rgba(99,102,241,.15);
}
.rec-item .app-ico-wrap { flex-shrink: 0; }
.rec-item .app-ico {
  width: 64px; height: 64px; border-radius: 16px;
}
.rec-info {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0; flex: 1;
}
.rec-info .app-name {
  font-size: 15px; font-weight: 700; color: var(--tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rec-desc {
  font-size: 12.5px; color: var(--tx3); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rec-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--tx3);
}
.rec-stars { color: #fbbf24; letter-spacing: 1px; }
.rec-item .rec-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(245,158,11,.25), rgba(236,72,153,.2));
  color: #fbbf24; z-index: 1;
}

/* ---------- 筛选栏（排序控件） ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: nowrap; margin-bottom: 14px;
}
.sort-form { display: flex; align-items: center; gap: 0; margin: 0; }
.sort-select {
  padding: 8px 36px 8px 14px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--bd);
  color: var(--tx); font-size: 13px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23aeb6ca' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  min-width: 130px;
}
html[data-theme="light"] .sort-select {
  background-color: #f4f6fb; border-color: #d1d9e6; color: #1f2430;
}
.view-toggle {
  display: inline-flex; gap: 2px; margin-left: auto;
  padding: 3px; border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--bd);
}
html[data-theme="light"] .view-toggle { background: rgba(15,23,42,.05); }
.view-toggle button {
  width: 36px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: transparent; border: 0;
  color: var(--tx3); font-size: 14px; cursor: pointer;
  transition: all .2s ease;
}
.view-toggle button:hover { color: var(--tx); }
.view-toggle button.on {
  background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(34,211,238,.2));
  color: var(--tx);
}

/* ---------- 应用卡片：网格视图 ---------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.app-card {
  position: relative; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px 14px; border-radius: 16px; text-align: center;
  background: var(--card); border: 1px solid var(--bd);
  text-decoration: none;
  transition: transform .22s cubic-bezier(.22,.61,.36,1), box-shadow .22s ease, border-color .22s ease;
}
.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99,102,241,.4);
  box-shadow: 0 10px 28px rgba(99,102,241,.15), 0 3px 8px rgba(0,0,0,.12);
}
html[data-theme="light"] .app-card:hover {
  box-shadow: 0 10px 28px rgba(99,102,241,.12), 0 3px 8px rgba(15,23,42,.06);
}
.app-card .app-ico-wrap {
  position: relative; line-height: 0; flex-shrink: 0;
}
.app-card .app-ico {
  width: 64px; height: 64px; border-radius: 16px; object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: transform .18s ease;
}
.app-card:hover .app-ico { transform: scale(1.06); }
.app-card .app-name {
  font-size: 14px; font-weight: 700; color: var(--tx);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-card .app-stars {
  font-size: 12px; color: #fbbf24; letter-spacing: 1px;
}
.app-card .app-use {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--tx3);
  background: rgba(255,255,255,.06); border-radius: 20px; padding: 2px 10px;
}
html[data-theme="light"] .app-card .app-use { background: rgba(15,23,42,.06); }
.app-card .app-desc {
  font-size: 11.5px; color: var(--tx3); line-height: 1.4;
  max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.app-rank {
  position: absolute; top: -6px; left: -4px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; font-style: normal; color: #fff; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.4); border: 2px solid var(--bg0, #131a2e);
  z-index: 2;
}
.app-rank.r1 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.app-rank.r2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.app-rank.r3 { background: linear-gradient(135deg, #b45309, #d97706); }

/* ---------- 应用卡片：列表视图 ---------- */
.app-grid.view-list {
  display: flex; flex-direction: column; gap: 10px;
}
.app-grid.view-list .app-card {
  flex-direction: row; align-items: center; text-align: left;
  padding: 12px 16px; gap: 14px;
}
.app-grid.view-list .app-card .app-ico-wrap { flex-shrink: 0; }
.app-grid.view-list .app-card .app-ico { width: 52px; height: 52px; border-radius: 14px; }
.app-grid.view-list .app-card .app-name {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-grid.view-list .app-card .app-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.app-grid.view-list .app-rank { top: -4px; left: -4px; }

/* ---------- 响应式：平板 ---------- */
@media (max-width: 1024px) {
  .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 响应式：移动端 ---------- */
@media (max-width: 768px) {
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app-card { padding: 14px 8px 12px; gap: 5px; }
  .app-card .app-ico { width: 56px; height: 56px; border-radius: 14px; }
  .app-card .app-name { font-size: 13px; }
  .search-card { padding: 12px 14px; }
  .searchbar { gap: 8px; }
  .search-btn { padding: 0 16px; font-size: 13px; }
  .rec-item { padding: 12px; gap: 12px; }
  .rec-item .app-ico { width: 52px; height: 52px; border-radius: 14px; }
  .rec-info .app-name { font-size: 14px; }
  .section-title { font-size: 15px; }
  .filter-bar { gap: 8px; }
  .sort-select { min-width: 110px; font-size: 12.5px; padding: 7px 32px 7px 12px; }
}

/* ---------- 响应式：超小屏 ---------- */
@media (max-width: 380px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .app-card { padding: 12px 6px 10px; }
  .app-card .app-ico { width: 48px; height: 48px; border-radius: 12px; }
  .app-card .app-name { font-size: 12.5px; }
  .app-card .app-desc { font-size: 10.5px; }
  .search-btn { padding: 0 12px; }
}

/* ---------- 搜索高亮 ---------- */
mark.hl {
  background: linear-gradient(120deg, rgba(99,102,241,.3), rgba(14,165,233,.3));
  color: inherit; border-radius: 2px; padding: 0 1px;
}
html[data-theme="light"] mark.hl {
  background: linear-gradient(120deg, rgba(99,102,241,.18), rgba(14,165,233,.22));
}

/* ---------- 页面过渡（保留原有 sites.js 动画） ---------- */
body.leaving .app-grid,
body.leaving .filter-bar,
body.leaving .pager {
  opacity: 0; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.app-grid.animate-in { animation: gridFadeIn .35s ease both; }

/* ---------- 尊重 reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .app-card, .rec-item, .cat-nav a, .search-input-wrap input {
    transition: none !important;
  }
  .app-grid.animate-in, .app-grid.stagger-in .app-card { animation: none !important; }
}


/* =====================================================
   ★★★ 站点详情页样式 (detail.php) ★★★
   ===================================================== */
.w-content { max-width: 900px; margin: 0 auto; }

/* Hero 区域 */
.site-hero {
  background: var(--card); border: 1px solid var(--bd);
  border-radius: 18px; padding: 24px; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.site-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 0%, var(--p1)15, transparent 60%);
  pointer-events: none;
}
.site-hero-content { position: relative; display: flex; gap: 20px; align-items: flex-start; }
.site-hero-icon {
  width: 80px; height: 80px; border-radius: 20px; object-fit: cover;
  box-shadow: 0 8px 24px rgba(0,0,0,.3); flex-shrink: 0;
}
.site-hero-info { flex: 1; min-width: 0; }
.site-hero-title {
  font-size: 22px; font-weight: 800; color: var(--tx);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 6px;
}
.status-dot {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 4px;
}
.status-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-online { background: rgba(16,185,129,.15); color: #34d399; }
.status-online::before { background: #34d399; }
.status-pending { background: rgba(245,158,11,.15); color: #fbbf24; }
.status-pending::before { background: #fbbf24; }
.site-hero-domain {
  font-size: 13px; color: var(--tx3); margin-bottom: 8px;
}
.site-hero-desc {
  font-size: 14px; color: var(--tx2); line-height: 1.6; margin: 0 0 12px;
}
.site-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.kw-tag {
  font-size: 11px; padding: 3px 10px; border-radius: 12px;
  background: rgba(255,255,255,.06); color: var(--tx3);
}
html[data-theme="light"] .kw-tag { background: rgba(15,23,42,.06); }
.hero-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hm-item { font-size: 12px; color: var(--tx3); }
.hm-item b { color: var(--tx2); font-weight: 600; }

/* Hero 统计 */
.site-hero-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.site-hero-stat { text-align: center; }
.site-hero-stat .val {
  font-size: 20px; font-weight: 800; color: var(--tx); line-height: 1.2;
}
.site-hero-stat .lbl { font-size: 11px; color: var(--tx3); margin-top: 2px; }

/* Hero 操作按钮 */
.site-hero-actions {
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.btn-visit {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border-radius: 12px;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(99,102,241,.3);
  transition: transform .2s, box-shadow .2s;
}
.btn-visit:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(99,102,241,.45); color: #fff; }
.btn-ghost-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid var(--bd2);
  color: var(--tx2); font-size: 13px; text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s;
}
.btn-ghost-sm:hover { background: rgba(255,255,255,.1); color: var(--tx); }
html[data-theme="light"] .btn-ghost-sm { background: rgba(15,23,42,.05); }

/* 信息概览栏 */
.info-overview {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.io-item {
  background: var(--card); border: 1px solid var(--bd);
  border-radius: 14px; padding: 14px 16px; text-align: center;
}
.io-label { font-size: 11px; color: var(--tx3); margin-bottom: 4px; }
.io-val { font-size: 16px; font-weight: 700; color: var(--tx); }
.io-val.grad {
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}

/* 评分分布 */
.rating-dist {
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}
.rd-summary { text-align: center; flex-shrink: 0; min-width: 100px; }
.rd-avg {
  font-size: 36px; font-weight: 800; color: var(--tx); line-height: 1;
}
.rd-stars { font-size: 16px; color: #fbbf24; margin: 4px 0; letter-spacing: 2px; }
.rd-total { font-size: 12px; color: var(--tx3); }
.rd-bars { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.rd-row { display: flex; align-items: center; gap: 8px; }
.rd-star { font-size: 12px; color: var(--tx3); width: 28px; text-align: right; }
.rd-bar {
  flex: 1; height: 8px; background: rgba(255,255,255,.06);
  border-radius: 4px; overflow: hidden;
}
html[data-theme="light"] .rd-bar { background: rgba(15,23,42,.06); }
.rd-fill {
  height: 100%; background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 4px; transition: width .4s ease;
}
.rd-count { font-size: 11px; color: var(--tx3); width: 24px; }

/* 评价筛选 */
.review-filter {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
}
.rf-tab {
  padding: 6px 14px; border-radius: 18px; font-size: 12px;
  background: rgba(255,255,255,.05); color: var(--tx3);
  text-decoration: none; transition: all .2s;
}
html[data-theme="light"] .rf-tab { background: rgba(15,23,42,.05); }
.rf-tab:hover { color: var(--tx); background: rgba(255,255,255,.08); }
.rf-tab.on {
  background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(34,211,238,.2));
  color: var(--tx); font-weight: 600;
}

/* 评价列表 */
.review-item {
  padding: 16px 0; border-bottom: 1px solid var(--bd);
}
.review-item:last-child { border-bottom: 0; }
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.review-user { flex: 1; min-width: 0; }
.review-username { font-size: 13px; font-weight: 600; color: var(--tx); }
.review-time { font-size: 11px; color: var(--tx3); }
.review-stars { font-size: 13px; color: #fbbf24; letter-spacing: 1px; }
.review-content {
  font-size: 13.5px; color: var(--tx2); line-height: 1.6;
  padding-left: 46px;
}

/* 相关应用 */
.related-apps { overflow: hidden; }
.ra-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.ra-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--bd);
  text-decoration: none; transition: transform .2s, border-color .2s;
}
.ra-card:hover { transform: translateY(-2px); border-color: rgba(99,102,241,.4); }
.ra-icon {
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
}
.ra-info { flex: 1; min-width: 0; }
.ra-name {
  font-size: 13px; font-weight: 600; color: var(--tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ra-meta { font-size: 11px; color: var(--tx3); margin-top: 2px; display: flex; gap: 8px; }

/* 站点信息卡片 */
.site-info-card { overflow: hidden; }
.sic-grid { display: flex; flex-direction: column; }
.sic-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--bd);
}
.sic-row:last-child { border-bottom: 0; }
.sic-label { font-size: 13px; color: var(--tx3); }
.sic-value { font-size: 13px; font-weight: 600; color: var(--tx); }
.sic-value.mono { font-family: monospace; }

/* 分享栏 */
.share-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  padding: 8px 16px; border-radius: 10px; font-size: 12px;
  background: rgba(255,255,255,.06); border: 1px solid var(--bd);
  color: var(--tx2); cursor: pointer; transition: all .2s;
}
.share-btn:hover { background: rgba(255,255,255,.1); color: var(--tx); }
html[data-theme="light"] .share-btn { background: rgba(15,23,42,.05); }

/* 应用介绍 */
.detail-rich {
  font-size: 14px; color: var(--tx2); line-height: 1.8;
}

/* 响应式 */
@media (max-width: 768px) {
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .site-hero { padding: 16px; }
  .site-hero-content { flex-direction: column; }
  .site-hero-icon { width: 64px; height: 64px; border-radius: 16px; }
  .site-hero-title { font-size: 18px; }
  .site-hero-actions { flex-direction: row; width: 100%; }
  .btn-visit, .btn-ghost-sm { flex: 1; }
  .info-overview { grid-template-columns: repeat(2, 1fr); }
  .rating-dist { flex-direction: column; align-items: stretch; }
  .rd-summary { display: flex; align-items: center; gap: 12px; justify-content: center; }
  .ra-grid { grid-template-columns: 1fr; }
  .site-hero-stats { gap: 16px; }
  .site-hero-stat .val { font-size: 18px; }
}


/* =====================================================
   ===== R4 深度检查修复（追加覆盖层，级联于旧规则之上）=====
   ===================================================== */

/* --- 3.1 320px 极窄屏横向溢出：收紧边距并兜底禁止横向滚动 --- */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 340px) {
  .container { padding: 16px 12px 96px; }
  .card { padding: 16px 14px; border-radius: 16px; }
  .auth-form { padding: 24px 18px; }
  .sf-inner { padding: 7px 12px; }
}

/* --- 3.2 触摸目标 ≥40px（导航/视图切换/页脚链接） --- */
/* 视图切换（网格/列表）按钮：原 36×32 偏小，放大到 40×40 */
.view-toggle button {
  min-width: 40px; min-height: 40px; width: auto; height: auto;
  padding: 5px 12px;
}
/* 顶栏主题切换按钮 38×38 → 40×40 */
.theme-btn { width: 40px; height: 40px; }
/* 页脚可点链接：增加行高/内边距到可点高度 */
.site-footer .sf-link-group a {
  display: inline-block; padding: 8px 0; line-height: 1.4;
}
.sf-beian a { display: inline-block; padding: 8px 4px; line-height: 1.4; }
/* 页脚展开开关（logo 行）保证热区 */
.sf-logo-row { padding: 8px 4px; }

/* --- 3.3 最小字号：移动端正文小字段提到 11px --- */
.app-card .app-meta,
.app-card .app-meta-wrap { font-size: 11px; }
.app-card .app-use { font-size: 11px; padding: 2px 8px; }
.sf-bottom { font-size: 11px; }
/* 徽章类装饰小字保持紧凑，但不低于 10.5px */
.rec-badge, .app-badge { font-size: 10.5px; }

/* --- 3.4 积分记录筛选按钮：移动端整行、完整可点，不被遮挡 --- */
@media (max-width: 480px) {
  .searchbar { align-items: stretch; }
  .searchbar button[type="submit"] {
    width: 100%; height: 44px !important; margin-top: 6px;
  }
}

/* 侧边栏遮罩 */
.nav-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 105; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.nav-overlay.show { opacity: 1; pointer-events: auto; }

/* 移动端弹窗优化 */
@media (max-width: 640px) {
  .modal { max-height: 85vh; border-radius: 14px; margin: 8px; }
  .modal-head { padding: 14px 16px; font-size: 14px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; }
}
