/* =====================================================================
   资源发布页样式
   版式取自 cnoo.top 实际线上样式（薄荷底 + 橙色收藏卡 + 白色胶囊卡 + 青绿下载键）
   ===================================================================== */

* { box-sizing: border-box; }

/* 元素自带 display 会覆盖 UA 的 [hidden]，这里强制生效 */
[hidden] { display: none !important; }

:root {
  --text: #171a1a;
  --teal: #08a99d;
  --teal-dark: #078d89;
  --orange: #ff8a00;
  --radius: 28px;

  /* 压在背景上的文字配色。默认深色 —— 适合浅底 / 没设背景图。
     一旦设了背景图、或背景色本身偏暗，main.js 会给 <html> 加 .on-dark-bg 切到白色。 */
  --on-bg: #171a1a;
  --on-bg-soft: #5a6560;
  --on-bg-line: #ced6d2;
  --on-bg-shadow: none;
}

/* 深色背景：白字 + 柔光描边，任何花底图上都读得清 */
:root.on-dark-bg {
  --on-bg: #ffffff;
  --on-bg-soft: rgba(255, 255, 255, 0.88);
  --on-bg-line: rgba(255, 255, 255, 0.45);
  --on-bg-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 0, 0, 0.32);
}

html, body { margin: 0; padding: 0; }

body {
  color: #222828;
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Segoe UI", "Microsoft YaHei", sans-serif;
  /* 背景挂到 body 上，页脚才能透出同一张图（挂在 .landing 上时页脚是块死色） */
  background-color: var(--bg, #f3f4f2);
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #18bced; outline-offset: 3px; }

/* ---------------------------------------------------------------------
   顶部公告条
   --------------------------------------------------------------------- */
.site-notice {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 11px 18px;
  border-bottom: 1px solid #edc875;
  background: #fff8e9;
  color: #895d20;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
}
.site-notice span { max-width: 760px; }

/* ---------------------------------------------------------------------
   页面主体
   --------------------------------------------------------------------- */
.landing {
  position: relative;
  min-height: calc(100vh - 116px);
  padding: 28px 22px 70px;
  color: var(--text);
  background: transparent;
}

.public-page {
  max-width: 510px;
  margin: 0 auto;
  text-align: center;
}

.loading {
  padding: 80px 0;
  text-align: center;
  color: var(--on-bg-soft);
  text-shadow: var(--on-bg-shadow);
}

/* ---------------------------------------------------------------------
   头像 / 标题 / 收藏卡 / 简介
   --------------------------------------------------------------------- */
.avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #deedf2;
  font-size: 33px;
  box-shadow: 0 5px 20px #4553;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

.public-page > h1 {
  font-size: clamp(23px, 4vw, 29px);
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--title-color, var(--on-bg));
  text-shadow: var(--on-bg-shadow);
}

.bookmark-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  margin: 0 auto 16px;
  padding: 10px 12px;
  border: 2px solid #ff9a18;
  border-radius: 14px;
  background: #fff7dc;
  box-shadow: 0 6px 18px #dc8c1930;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.bookmark-bar::before {
  content: "⭐ 建议先收藏本站，方便下次找到";
  flex: 0 0 100%;
  color: #a55300;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.bookmark-bar > span { font-weight: 700; opacity: 1; }

.bookmark-address {
  font-weight: 900;
  font-size: 14px;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  max-width: 100%;
  user-select: text;
}

.bookmark-bar button {
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  opacity: 1;
  box-shadow: 0 4px 10px #d96d0038;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bookmark-bar button:hover { transform: translateY(-1px); box-shadow: 0 6px 14px #d96d0044; }

.bookmark-bar .today-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  margin-left: 2px;
  padding: 3px 9px;
  border: 1px solid #ff6c83;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7f8, #ffe9ed);
  color: #e34e68;
  font-weight: 400;
  box-shadow: 0 2px 8px #d8475d20;
}
.bookmark-bar .today-like:hover { background: linear-gradient(135deg, #fff, #ffe0e6); }
.today-like span { font-size: 13px; line-height: 1; }
.today-like b { font-size: 10px; }
.today-like em { font-style: normal; font-size: 9px; padding-left: 4px; border-left: 1px solid #f4a7b4; }
.today-like.liked { background: linear-gradient(135deg, #ff7188, #ec526c); color: #fff; border-color: #e94e68; }
.today-like.liked em { border-left-color: #ffffff80; }
.today-like:disabled { cursor: default; }

.bio {
  font-size: 14px;
  line-height: 2.1;
  white-space: pre-line;
  margin: 0 0 24px;
  color: var(--bio-color, var(--on-bg));
  text-shadow: var(--on-bg-shadow);
}

/* ---------------------------------------------------------------------
   资源条目
   --------------------------------------------------------------------- */
.public-links { text-align: initial; }

.public-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  padding: 0 12px;
  min-height: 43px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 3px 6px #182c3b30;
}

.public-resource-home { margin-top: 8px; }
.public-resource-home .public-link {
  border: 1px solid #ffffffb8;
  box-shadow: 0 7px 20px #263b4430;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.public-resource-home .public-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px #263b4438;
}

.resource-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 50px 18px;
  gap: 8px;
  padding: 0 10px;
}

.resource-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #fff1dc;
  color: #e57b12;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}

.public-link.resource-link > a.resource-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 12px 0;
  font-size: 12px;
  color: var(--text);
  text-align: center;
}

.resource-title span { min-width: 0; text-align: center; overflow-wrap: anywhere; }

.download-label,
.public-link > a.download-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 50px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.public-link > a.download-label:hover { background: var(--teal-dark); }

.resource-link .more { padding: 8px 0; text-align: center; }

.more {
  font-size: 16px;
  line-height: 1;
  color: #8b9491;
  transition: color 0.15s ease;
}
.more:hover { color: var(--teal); }

/* 分组入口（资源合集 X） */
.public-group-home { margin-top: 6px; }
.public-group-home .public-link { border: 1px solid #ffffffb8; box-shadow: 0 7px 20px #263b4430; }

.group-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding-right: 34px;
}
.group-entry-title {
  flex: 1;
  padding: 12px 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}
.group-entry .more {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 2px;
}

/* 分组详情页 */
.public-group-back {
  display: block;
  margin: 2px 0 10px;
  padding: 7px 2px;
  color: #147f98;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.public-search {
  position: relative;
  margin: 0 0 20px;
  padding: 38px 12px 12px;
  border: 2px solid #08afa8;
  border-radius: 18px;
  background: #effffb;
}
.public-search::before {
  content: "快速搜索本组资源";
  position: absolute;
  top: 8px;
  left: 15px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}
.public-search span {
  position: absolute;
  left: 22px;
  bottom: 25px;
  font-size: 14px;
  line-height: 20px;
  color: #08a7a1;
}
.public-search input {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 42px;
  border: 1px solid #79d8d3;
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.public-search input:focus { border-color: #08afa8; box-shadow: 0 0 0 3px #08afa822; }
.public-search input::placeholder { color: #89969a; opacity: 1; }

/* 空状态 */
.empty {
  padding: 48px 26px;
  text-align: center;
  color: var(--on-bg-soft);
  border: 1px dashed var(--on-bg-line);
  border-radius: 20px;
  text-shadow: var(--on-bg-shadow);
}
.empty h3 { color: var(--on-bg); margin: 0 0 6px; font-size: 17px; }
.empty p { margin: 0; font-size: 13px; }
.empty .retry {
  margin-top: 14px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.hide { display: none !important; }

/* ---------------------------------------------------------------------
   页脚 / 免责声明
   --------------------------------------------------------------------- */
.site-footer {
  padding: 22px 16px 24px;
  /* 透明：让 body 的背景图一直铺到底，换图不会被一条灰底截断 */
  background: transparent;
  color: var(--on-bg);
  text-align: center;
  font-size: 13px;
}

/* 免责声明是唯一的实心板块，边框 + 浅底让它从背景图上"浮"出来 */
.site-disclaimer {
  max-width: 760px;
  margin: 0 auto 18px;
  padding: 16px 18px;
  border: 1px solid #e6cf91;
  border-radius: 14px;
  background: #fffaf0;
  color: #796137;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.site-disclaimer h2 { margin: 0 0 8px; font-size: 15px; color: #80591f; }
.site-disclaimer p { margin: 0; font-size: 12px; line-height: 1.9; }

.site-footer-brand {
  letter-spacing: 1px;
  color: var(--footer-color, var(--on-bg));
  text-shadow: var(--on-bg-shadow);
}

/* ---------------------------------------------------------------------
   联系客服
   --------------------------------------------------------------------- */
.chat-entry {
  position: fixed;
  right: 0;
  bottom: 28%;
  z-index: 35;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 52px;
  padding: 12px 9px;
  border-radius: 13px 0 0 13px;
  background: #4169e1;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 25px #263d8d45;
}
.chat-entry span { font-size: 16px; line-height: 1.3; writing-mode: vertical-rl; letter-spacing: 3px; }
.chat-entry b { font-size: 20px; }

.chat-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 18px;
  background: #0008;
}
.chat-mask.show { display: grid; }

.chat-box {
  display: flex;
  flex-direction: column;
  width: min(100%, 420px);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  color: #222;
  box-shadow: 0 20px 60px #0005;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  border-bottom: 1px solid #eee;
  background: #fff;
  text-align: left;
}
.chat-head h2 { margin: 0; font-size: 19px; }
.chat-head small { color: #999; font-size: 12px; }
.chat-head > button { padding: 2px 7px; color: #777; font-size: 27px; line-height: 1; }
.chat-head > button:hover { color: #222; }

.chat-qr { padding: 20px 18px 22px; text-align: center; }.chat-qr img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
}
.chat-qr p { margin: 12px 0 0; color: #8a9290; font-size: 12px; }

/* 公告弹窗（复用客服弹窗的遮罩与卡片外壳） */
.popup-body {
  padding: 16px 20px 6px;
  max-height: 52vh;
  overflow: auto;
  color: #3c4542;
  font-size: 14px;
  line-height: 1.9;
  text-align: left;
  white-space: pre-line;
}
.popup-actions { padding: 14px 20px 20px; }
.popup-actions button {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.popup-actions button:hover { background: var(--teal-dark); }

/* ---------------------------------------------------------------------
   Toast
   --------------------------------------------------------------------- */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 100;
  transform: translateX(-50%) translateY(20px);
  max-width: 90vw;
  padding: 12px 24px;
  border-radius: 12px;
  background: #1b3430;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}
#toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------------------------------------------------------------------
   响应式
   --------------------------------------------------------------------- */
@media (max-width: 600px) {
  .landing { padding-left: 16px; padding-right: 16px; }
  .public-page > h1 { font-size: 24px; }
  .bookmark-bar { padding: 9px 10px; }
  .bookmark-bar::before { font-size: 12px; }
  .bookmark-address { font-size: 13px; }
  .bio { font-size: 13px; line-height: 2; }

  .public-resource-home { margin-top: 4px; }
  .public-resource-home .public-link { min-height: 50px; margin-bottom: 13px; border-radius: 18px; }
  .public-resource-home .public-link > a { min-height: 48px; font-size: 15px; font-weight: 700; }

  .public-page .resource-link { grid-template-columns: 42px minmax(0, 1fr) 50px 16px; gap: 6px; padding: 0 8px; }
  .public-page .public-link.resource-link > a.resource-title { min-height: 48px; padding: 8px 0; font-size: 14px; line-height: 1.35; }
  .public-page .resource-title.long-title span { font-size: 12px; line-height: 1.35; }
  .public-page .public-link > a.download-label { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; min-height: 0; padding: 5px 8px; font-size: 12px; font-weight: 700; }

  .group-entry { min-height: 50px; }
  .group-entry-title { font-size: 15px; }

  .site-notice { min-height: 50px; padding: 8px 12px; font-size: 12px; line-height: 1.5; }
  .site-notice span { max-width: 360px; }
  .site-footer { padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); font-size: 12px; }
  .site-disclaimer { margin-bottom: 14px; padding: 13px 14px; border-radius: 12px; }
  .site-disclaimer h2 { font-size: 14px; margin-bottom: 6px; }
  .site-disclaimer p { font-size: 11px; line-height: 1.75; }
}

@media (max-width: 520px) {
  .chat-entry {
    right: 14px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    display: flex;
    width: auto;
    min-width: 132px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 17px;
    border-radius: 999px;
    background: linear-gradient(135deg, #5572f2, #315ee8);
    box-shadow: 0 10px 28px #315ee859;
  }
  .chat-entry span { font-size: 16px; line-height: 1; writing-mode: horizontal-tb; letter-spacing: 0; }
  .chat-entry b { font-size: 20px; line-height: 1; }
}

/* =====================================================================
   后台管理（不对外，配色沿用青绿主色）
   ===================================================================== */
.admin-body { background: #f4f6f5; }

.admin-page { max-width: 1080px; margin: 0 auto; padding: 26px 20px 60px; }

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e6eae8;
}

.admin-top .brand { display: flex; align-items: center; gap: 10px; }
.admin-top .logo {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 11px; background: linear-gradient(150deg, #16c2b4, #08a99d);
  color: #fff; font-size: 18px; font-weight: 800;
}
.admin-top .brand-text h1 { margin: 0; font-size: 17px; font-weight: 700; }
.admin-top .brand-text p { margin: 2px 0 0; font-size: 12px; color: #8a9290; }

.admin-user { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #8a9290; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 360px; padding: 30px 26px 28px;
  background: #fff; border: 1px solid #e9ebea; border-radius: 18px;
  box-shadow: 0 6px 18px -8px rgba(21, 23, 28, 0.12);
}
.login-card .logo {
  width: 44px; height: 44px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 13px; background: linear-gradient(150deg, #16c2b4, #08a99d);
  color: #fff; font-size: 22px; font-weight: 800;
}
.login-card h1 { margin: 0; font-size: 19px; font-weight: 700; text-align: center; }
.login-card .sub { margin: 6px 0 22px; font-size: 12px; color: #8a9290; text-align: center; }

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #4b5563; }
.field-hint { margin: 6px 0 0; font-size: 11px; line-height: 1.7; color: #8a91a0; }
.field-hint b { color: #c0281c; font-weight: 700; }

.input, .select {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid #dfe2e9; border-radius: 9px;
  background: #fff; color: #15171c; font-size: 14px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 169, 157, 0.14); }
.input::placeholder { color: #b6bcc8; }

.form-error {
  display: none; margin-bottom: 12px; padding: 8px 11px;
  border-radius: 8px; background: #fdecea; color: #c0281c; font-size: 12px; line-height: 1.5;
}
.form-error.show { display: block; }

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5563; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--teal); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px;
  font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 6px 14px -8px rgba(8, 169, 157, 0.9); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: #fff; color: #4b5563; border-color: #dfe2e9; }
.btn-ghost:hover { color: #15171c; border-color: #cfd4dd; background: #fafbfc; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.tabs { display: flex; gap: 4px; margin: 18px 0; padding: 4px; background: #eceef2; border-radius: 10px; width: fit-content; }
.tab { height: 30px; padding: 0 16px; border-radius: 7px; color: #4b5563; font-size: 13px; font-weight: 600; }
.tab.is-active { background: #fff; color: #15171c; box-shadow: 0 1px 2px rgba(21, 23, 28, 0.04); }

.panel { display: none; }
.panel.is-active { display: block; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.toolbar h2 { margin: 0; font-size: 14px; font-weight: 700; }
.toolbar .hint { font-size: 12px; color: #8a91a0; font-weight: 400; margin-left: 8px; }

.table-wrap {
  background: #fff; border: 1px solid #e9ebea; border-radius: 14px;
  overflow-x: auto; box-shadow: 0 1px 2px rgba(21, 23, 28, 0.04);
}

table.data { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
table.data th {
  padding: 11px 14px; text-align: left; font-size: 12px; font-weight: 600;
  color: #8a91a0; background: #fafbfc; border-bottom: 1px solid #e9ebea; white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid #f2f4f7; vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #fcfcfd; }

.cell-title { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cell-nowrap { max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-url {
  display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: #8a91a0; font-size: 12px;
}
.cell-actions { display: flex; gap: 6px; white-space: nowrap; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: 1px solid #dfe2e9; border-radius: 7px;
  background: #fff; color: #4b5563; font-size: 12px;
}
.icon-btn:hover:not([disabled]) { border-color: #cfd4dd; color: #15171c; background: #fafbfc; }
.icon-btn[disabled] { opacity: 0.35; cursor: not-allowed; }

.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.pill-on { background: #e9f8ef; color: #16a34a; }
.pill-off { background: #f1f2f5; color: #8a91a0; }

.table-empty { padding: 40px 16px; text-align: center; color: #8a91a0; font-size: 13px; }

.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17, 19, 24, 0.42); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 440px;
  padding: 22px; background: #fff; border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(21, 23, 28, 0.28);
  text-align: left;
}
.modal-card h3 { margin: 0 0 16px; font-size: 16px; font-weight: 700; }
.form-grid { display: grid; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: #fff; border: 1px solid #e9ebea; border-radius: 12px;
}
.cat-item .cat-name { flex: 1 1 auto; font-weight: 600; font-size: 14px; min-width: 0; }
.cat-item .cat-count { flex: 0 0 auto; font-size: 12px; color: #8a91a0; }
.cat-add { display: flex; gap: 8px; margin-top: 14px; max-width: 420px; }

.footer-link { color: #8a91a0; transition: color 0.15s ease; }
.footer-link:hover { color: var(--teal); }

/* 站点设置面板 */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}

.settings-card {
  padding: 18px;
  background: #fff;
  border: 1px solid #e9ebea;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(21, 23, 28, 0.04);
}
.settings-card h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f2f4;
}
.settings-card .field:last-child { margin-bottom: 0; }

.settings-hint {
  margin: -6px 0 14px;
  font-size: 12px;
  line-height: 1.65;
  color: #8a91a0;
}

/* 文字颜色：文本框 + 系统取色器 + 一键回自动 */
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row .input { flex: 1 1 auto; min-width: 0; }

.swatch {
  flex: 0 0 auto;
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1px solid #dfe3e6;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.swatch::-webkit-color-swatch-wrapper { padding: 3px; }
.swatch::-webkit-color-swatch { border: 0; border-radius: 6px; }
.swatch::-moz-color-swatch { border: 0; border-radius: 6px; }

.textarea {
  height: auto;
  min-height: 72px;
  padding: 8px 11px;
  line-height: 1.6;
  resize: vertical;
}

.image-field .image-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.image-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.thumb {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #d5dade;
  border-radius: 10px;
  background: #f7f9f9;
  color: #9aa3a0;
  font-size: 11px;
  text-align: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-thumb { width: 64px; height: 64px; border-radius: 50%; }
.avatar-thumb img { border-radius: 50%; }
.qr-thumb { width: 64px; height: 64px; }
.bg-thumb { width: 96px; height: 64px; }
.thumb.has-image { border-style: solid; border-color: #e4e8e6; }

.save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e6eae8;
}
.save-hint { font-size: 12px; color: #8a91a0; }

@media (max-width: 560px) {
  .admin-page { padding: 18px 14px 48px; }
  .admin-top { flex-wrap: wrap; }
  .toolbar { flex-wrap: wrap; }
  .settings-grid { grid-template-columns: 1fr; }
  .save-bar { flex-direction: column; align-items: stretch; }
  .save-hint { text-align: center; }
}
