/* ========== 基础 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --primary: #4f7cff;
  --primary-2: #6a5cff;
  --text: #1f2430;
  --muted: #8a94a6;
  --border: #e7ecf3;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(31, 42, 80, 0.06);
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .85; }
img { max-width: 100%; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.empty.small { padding: 24px 0; }

/* ========== 顶栏 ========== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; padding: 12px 18px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; white-space: nowrap; background: linear-gradient(135deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-dot {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: inline-block; box-shadow: 0 2px 6px rgba(79, 124, 255, 0.35);
}
.logo-img { width: 24px; height: 24px; border-radius: 7px; object-fit: cover; flex-shrink: 0; }
.search-box { flex: 1; display: flex; max-width: 580px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 5px 5px 5px 8px; box-shadow: 0 2px 10px rgba(31, 42, 80, 0.06); transition: border-color .2s, box-shadow .2s; }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12), 0 6px 16px rgba(79, 124, 255, 0.12); }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; padding: 7px 4px; }
.search-box button { border: 0; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-radius: 999px; padding: 8px 24px; cursor: pointer; font-size: 14px; font-weight: 600; box-shadow: 0 3px 10px rgba(79, 124, 255, 0.35); transition: transform .15s, box-shadow .15s, opacity .15s; }
.search-box button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79, 124, 255, 0.42); opacity: .95; }
.engine-select {
  border: 1px solid var(--border); background-color: #f5f7fb; outline: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text); font-family: inherit;
  padding: 6px 26px 6px 12px; margin-right: 8px; border-radius: 999px;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%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' fill='none' stroke='%238a94a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 10px;
  transition: border-color .2s, background-color .2s;
}
.engine-select:hover { border-color: var(--primary); background-color: #eef3ff; }
.engine-select.eng-baidu { color: #4e6ef2; }
.engine-select.eng-sogou { color: #ff8b1f; }
.engine-select.eng-bing { color: #00809d; }
.top-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.act-btn { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; color: var(--text); }
.act-btn:hover { border-color: var(--primary); color: var(--primary); }
.act-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; }
.act-primary:hover { color: #fff; opacity: .9; }

/* 下拉面板 */
.panel {
  position: absolute; right: 18px; top: 62px; width: 320px; max-width: calc(100vw - 36px);
  background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(31, 42, 80, 0.14);
  padding: 10px; z-index: 60;
}
.panel h3 { font-size: 13px; color: var(--muted); padding: 6px 10px 8px; font-weight: 600; }
.panel-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); }
.panel-item:hover { background: #f0f4ff; }
.panel-item .pi-name { font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-item .pi-time { font-size: 11px; color: var(--muted); }
.panel-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 16px 0; }
.panel-icon { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 700; overflow: hidden; }
.panel-icon img { width: 100%; height: 100%; object-fit: cover; }

/* ========== 区块 ========== */
.section { margin: 26px 0; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.t-emoji { font-style: normal; }
.section-title .count { font-size: 12px; font-weight: 400; color: var(--muted); background: #eef1f7; padding: 1px 8px; border-radius: 999px; }

/* 快捷工具 */
.quick-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.quick-item {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 16px 10px 10px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.quick-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(31, 42, 80, 0.1); }
.quick-icon { width: 38px; height: 38px; border-radius: 10px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.quick-icon .letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 17px; font-style: normal; }
.quick-icon .favicon { position: relative; z-index: 1; width: 22px; height: 22px; object-fit: contain; }
.quick-name { font-size: 14px; font-weight: 600; }

/* 网址卡片 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.card-wrap { position: relative; }
.card {
  display: flex; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; height: 100%;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(31, 42, 80, 0.1); }
.card-icon { width: 46px; height: 46px; border-radius: 12px; position: relative; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.card-icon .letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 20px; font-style: normal; }
.card-icon .favicon { position: relative; z-index: 1; width: 26px; height: 26px; object-fit: contain; }
.card-body { min-width: 0; display: flex; flex-direction: column; }
.card-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.badge { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.badge.hot { background: #fff0e6; color: #ff6a00; }
.badge.cat { background: #eef1f7; color: var(--muted); }
.fav-btn {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 999px; border: 0;
  background: #fff; box-shadow: 0 1px 6px rgba(31, 42, 80, 0.14); cursor: pointer; font-size: 15px; color: #c6cdd9;
  opacity: 0; transition: opacity .15s, color .15s; z-index: 2; line-height: 1;
}
.card-wrap:hover .fav-btn { opacity: 1; }
.fav-btn:hover { color: #ffb400; }
.fav-btn.on { opacity: 1; color: #ffb400; }

/* 搜索页 */
.search-hero { padding: 22px 0 6px; }
.search-hero h1 { font-size: 22px; }

/* 页脚 */
.footer { margin-top: 48px; padding: 22px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; text-align: center; }
.footer p { margin: 3px 0; }
.footer-admin a { color: var(--muted); }
.friend-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-bottom: 12px; }
.friend-links .fl-title { font-weight: 600; }
.friend-links a { color: var(--muted); font-size: 13px; }
.friend-links a:hover { color: var(--primary); opacity: 1; }

/* ========== 表单 ========== */
.form-page { max-width: 620px; margin: 26px auto; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.form-page h1 { font-size: 22px; margin-bottom: 4px; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-full { grid-column: 1 / -1; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 13.5px; font-weight: 600; }
.form-row label b { color: #e5533c; }
.form-row input[type="text"], .form-row input[type="url"], .form-row input[type="password"], .form-row input[type="number"], .form-row input[type="file"], .form-row select, .form-row textarea {
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 14px; outline: none; background: #fff; font-family: inherit; width: 100%;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); }
.check-row { flex-direction: row; gap: 18px; align-items: center; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 400 !important; font-size: 14px !important; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border: 0; border-radius: 10px; padding: 10px 26px; font-size: 14px; cursor: pointer; font-weight: 600; }
.btn-primary:hover { opacity: .92; }
.btn-primary.btn-sm { padding: 5px 14px; font-size: 13px; border-radius: 8px; }
.btn-plain { background: #f0f3f9; color: var(--text); border: 0; border-radius: 10px; padding: 9px 18px; font-size: 13px; cursor: pointer; }
.btn-plain:hover { background: #e6ebf4; }
.icon-input { display: flex; gap: 8px; }
.icon-input input { flex: 1; }
.logo-preview { width: 28px; height: 28px; border-radius: 6px; vertical-align: middle; margin-left: 6px; border: 1px solid var(--border); object-fit: cover; }

/* 提示 */
.alert { border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.alert-error { background: #fdeeee; color: #c0392b; }
.alert-ok { background: #eafaf1; color: #16a34a; }
.alert-warn { background: #fff8e6; color: #b7791f; }

/* ========== 登录页 ========== */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eef3ff, #f6f0ff); padding: 18px; }
.login-box { width: 380px; max-width: 100%; background: #fff; border-radius: 18px; padding: 34px 30px; box-shadow: 0 18px 50px rgba(31, 42, 80, 0.12); }
.login-box h1 { font-size: 24px; text-align: center; }
.login-box > .muted { text-align: center; margin-top: 2px; }
.back-link { text-align: center; margin-top: 10px; }

/* ========== 后台 ========== */
.admin-body { display: flex; min-height: 100vh; }
.admin-side { width: 200px; flex-shrink: 0; background: #1c2333; color: #c7cede; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-logo { padding: 20px 18px 14px; font-size: 17px; font-weight: 800; color: #fff; display: flex; flex-direction: column; line-height: 1.3; }
.admin-logo:hover { color: #fff; opacity: .9; }
.admin-logo small { font-size: 12px; font-weight: 400; color: #7d879e; }
.admin-nav { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { color: #c7cede; padding: 9px 14px; border-radius: 10px; font-size: 14px; }
.admin-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; opacity: 1; }
.admin-nav a.active { background: var(--primary); color: #fff; }
.admin-side-foot { padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; }
.admin-side-foot a { color: #9aa3b8; }
.admin-side-foot a:hover { color: #fff; }
.admin-main { flex: 1; min-width: 0; padding: 24px; }
.admin-main-inner { max-width: 1080px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.admin-top-title { font-size: 15px; font-weight: 700; color: var(--text); }
.page-h1 { font-size: 22px; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.block-h2 { font-size: 16px; margin: 22px 0 12px; }
.panel-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.stat-num { font-size: 30px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat-warn .stat-num { color: #ff8f1f; }
.stat-label a { font-size: 12px; }

/* 图表 */
.chart-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.chart-box svg { display: block; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 14px; background: #f8fafd; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 14px; font-size: 13.5px; border-bottom: 1px solid #f1f4f9; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #fafcff; }
.td-title { font-weight: 600; }
.td-sub { font-weight: 400; color: var(--muted); font-size: 12px; }
.td-url { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-url a { color: var(--muted); }
.ops { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ops a { font-size: 13px; }
.inline-form { display: inline; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; font-size: 13px; padding: 0 2px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: #e5533c; }
.link-btn.ok { color: #16a34a; font-weight: 600; }

/* 标签 */
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: #eef1f7; color: var(--muted); }
.tag-ok { background: #eafaf1; color: #16a34a; }
.tag-warn { background: #fff5e6; color: #b7791f; }
.tag-blue { background: #eaf1ff; color: var(--primary); }
.tag-hot { background: #fff0e6; color: #ff6a00; }

/* 筛选条 / 分页 */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-form select, .filter-form input { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; outline: none; background: #fff; }
.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pager-item { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 4px 12px; font-size: 13px; color: var(--text); }
.pager-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.admin-main-inner.is-wide { max-width: 1120px; }

/* 资料页编辑 */
.doc-hint { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.doc-block { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; background: #fafbfd; }
.doc-block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.doc-block-head strong { font-size: 13px; }
.doc-textarea { min-height: 220px; font-size: 15px !important; line-height: 1.7 !important; font-family: Consolas, "Sarasa Mono SC", "Microsoft YaHei", monospace !important; }
.doc-extra { margin-top: 10px; font-size: 13px; color: var(--muted); }
.doc-extra summary { cursor: pointer; margin-bottom: 8px; }
.doc-file-list { list-style: none; font-size: 13px; margin: 6px 0 8px; }
.doc-file-list li { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.doc-url-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-url-box input { flex: 1; min-width: 220px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px; }

/* 资料页阅读：宽版、易划选 */
.topbar-inner-simple { justify-content: space-between; }
.container-doc { max-width: 1180px; }
.doc-read { background: #f4f6f8; }
.doc-sheet { padding: 28px 0 56px; user-select: text; }
.doc-hero { font-size: 34px; font-weight: 800; text-align: center; letter-spacing: .04em; line-height: 1.35; margin: 8px 0 32px; color: #151922; }
.doc-cat { position: relative; background: #fff; border: 1px solid #e6ebf2; border-radius: 14px; padding: 22px 26px 16px; margin: 0 0 18px; }
.doc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #151922; }
.doc-cat-head h2 { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: .04em; }
.doc-copy-src { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.doc-copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.doc-lines { display: flex; flex-direction: column; }
.doc-line { margin: 0 0 8px; padding: 12px 16px; background: #f7f8fb; border-radius: 8px; font-size: 16px; line-height: 1.75; color: #1b1f2a; white-space: pre-wrap; word-break: break-all; cursor: text; user-select: text; -webkit-user-select: text; font-family: Consolas, "Sarasa Mono SC", "Cascadia Mono", "Microsoft YaHei", monospace; }
.doc-line:hover { background: #eef3ff; }
.doc-gap { height: 8px; }
.doc-files { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.doc-files a { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; color: var(--text); background: #f8fafd; }
.doc-files a:hover { border-color: var(--primary); color: var(--primary); }
.doc-list { max-width: 980px; margin: 24px auto 48px; }
.doc-list-item { display: block; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 10px; color: var(--text); box-shadow: var(--shadow); }
.doc-list-item:hover { border-color: var(--primary); }
.doc-list-item h2 { font-size: 16px; margin-bottom: 4px; }
.doc-lock { max-width: 420px; margin: 60px auto; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
@media (max-width: 640px) {
  .doc-hero { font-size: 26px; }
  .doc-cat { padding: 16px 14px 12px; }
  .doc-cat-head { flex-wrap: wrap; }
  .doc-line { font-size: 15px; padding: 10px 12px; }
}

/* ========== 响应式 ========== */
html { -webkit-tap-highlight-color: transparent; }
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .search-box { order: 3; flex-basis: 100%; max-width: none; }
  .top-actions { margin-left: auto; }
  .dash-cols { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-body { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .admin-logo { padding: 12px 14px; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; padding: 4px 8px; }
  .admin-side-foot { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.08); flex-direction: row; padding: 12px 14px; }
  .admin-main { padding: 14px; }
}

/* 平板 / 大屏手机 */
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .topbar-inner { gap: 8px; padding: 10px 14px; }
  .logo { font-size: 17px; }
  .logo-dot { width: 20px; height: 20px; border-radius: 6px; }
  .search-box { padding: 4px 4px 4px 6px; }
  .search-box input { font-size: 13.5px; padding: 6px 2px; }
  .search-box button { padding: 7px 18px; font-size: 13.5px; }
  .engine-select { font-size: 13px; padding: 5px 22px 5px 10px; margin-right: 6px; background-position: right 8px center; }
  .top-actions { gap: 6px; }
  .act-btn { padding: 5px 10px; font-size: 12.5px; }
  .panel { top: 96px; right: 14px; width: calc(100vw - 28px); max-width: none; }
  .section { margin: 20px 0; }
  .section-title { font-size: 16px; margin-bottom: 11px; }
  .quick-grid { gap: 8px; }
  .quick-item { flex: 1 1 calc(50% - 8px); min-width: 0; padding: 9px 10px 9px 9px; gap: 8px; }
  .quick-icon { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
  .quick-icon .letter { font-size: 15px; }
  .quick-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
  .card { padding: 12px; gap: 10px; }
  .card-icon { width: 40px; height: 40px; border-radius: 10px; }
  .card-icon .letter { font-size: 17px; }
  .card-title { font-size: 14px; }
  .card-desc { font-size: 12px; }
  .form-page { padding: 20px; }
  .login-box { padding: 28px 22px; }
  .footer { padding: 18px 12px; }
  .stat-num { font-size: 26px; }
  .tbl th, .tbl td { padding: 8px 10px; }
  .admin-topbar { flex-wrap: wrap; }
}

/* 手机 */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .topbar-inner { padding: 8px 12px; }
  .logo { font-size: 16px; }
  .act-btn { padding: 4px 8px; font-size: 12px; }
  .section { margin: 16px 0; }
  .section-title { font-size: 15px; }
  .card-grid { grid-template-columns: 1fr; }
  .quick-grid { gap: 7px; }
  .quick-item { padding: 8px 9px 8px 8px; }
  .form-page { padding: 16px; border-radius: 12px; }
  .login-box { border-radius: 14px; padding: 24px 18px; }
  .footer { margin-top: 32px; }
}

/* 触屏设备：收藏按钮常显（无 hover） */
@media (hover: none), (max-width: 640px) {
  .fav-btn { opacity: 1; }
  .card:hover, .quick-item:hover { transform: none; }
}
