/* ==========================================================================
   爱工作资源站 · UI 重设计 v3（亮色 / 高对比）
   结构：前台「左侧信息栏 + 右侧内容区」，卡片 2:3 海报铺满
   原则：正文一律用深墨色，次要文字不用浅灰；小字最小 11.5px
   本文件只做覆盖：style.css 兜底布局，JS 依赖的 id / class / data-* 未改动
   ========================================================================== */

:root {
  /* 主色：深翡翠绿（白底上对比度 ≥ 4.5，可作正文链接色） */
  --brand: #047857;
  --brand-2: #065f46;
  --brand-soft: #e7f4ee;
  --brand-line: #a7d9c4;

  /* 中性色：纸张白 + 深墨字 */
  --bg: #f4f6f8;
  --bg-2: #eef1f4;
  --surface: #ffffff;
  --surface-2: #f4f7f8;
  --surface-3: #eaeff2;
  --cover-bg: #e9edf1;

  --text: #0e1620;
  --text-2: #38434f;
  --muted: #5b6672;

  --border: #e2e7ec;
  --border-strong: #ccd4dc;

  --success: #047857;
  --success-soft: #e7f4ee;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --warn: #92400e;
  --warn-soft: #fdf3e3;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 26, 38, .05);
  --shadow-lg: 0 24px 60px rgba(16, 26, 38, .18);

  --rail-w: 264px;
  --topbar-h: 62px;
}

/* ==========================================================================
   1. 基础
   ========================================================================== */
html { background: var(--bg); }
body { background-color: var(--bg); color: var(--text); font-size: 14.5px; }
a { color: var(--brand); }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { letter-spacing: -.02em; color: var(--text); }
::selection { background: #cdeadd; color: #06281d; }

* { scrollbar-width: thin; scrollbar-color: #c3ccd5 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #c3ccd5; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #a9b4bf; background-clip: content-box; }

/* ==========================================================================
   2. 表单 / 按钮
   ========================================================================== */
.field input, .field textarea, .field select, .input,
.admin-toolbar select, .toolbar-right select {
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field input, .field textarea, .field select, .input { padding: 9px 12px; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus,
.admin-toolbar select:focus, .toolbar-right select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, .14);
  outline: none;
}
input::placeholder, textarea::placeholder { color: #8b95a0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.field > span:first-child { color: var(--text-2); font-weight: 600; }
.field-hint, .admin-note { color: var(--muted); }

.btn {
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: #b6c0ca; color: var(--text); text-decoration: none; }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 650;
  box-shadow: 0 2px 6px rgba(4, 120, 87, .22);
}
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-outline { background: #fff; border-color: var(--border-strong); color: var(--text-2); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand); }
.btn-danger { background: #fff; border-color: #e8b4b0; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 6px 11px; font-size: 12px; }

/* ==========================================================================
   3. 顶栏
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .93);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { height: auto; min-height: var(--topbar-h); max-width: 1340px; }
.brand { color: var(--text); font-weight: 750; font-size: 15.5px; }
.brand-mark {
  background: linear-gradient(145deg, #059669, var(--brand));
  color: #fff; border-radius: 9px; font-weight: 800;
  box-shadow: 0 2px 8px rgba(4, 120, 87, .28);
}
.topnav a { color: var(--text-2); font-weight: 600; }
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--brand); }
.top-ext-links a { color: var(--text-2); font-weight: 600; }
.top-ext-links a:hover { color: var(--brand); }
.top-contact-btn { color: var(--brand); font-weight: 700; }
.top-contact-btn:hover { color: var(--brand-2); text-decoration: underline; }
.link-quiet { color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.link-quiet:hover { color: var(--brand); }

.search-box input {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 9px 14px 9px 34px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search-box input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(4, 120, 87, .12); }
.search-box::before { border-color: #6b7682; opacity: .9; }
.search-box::after { background: #6b7682; opacity: .9; }

.avatar { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
.user-name { color: var(--text-2); font-weight: 500; }
.user-chip.clickable:hover .user-name { color: var(--brand); }

/* ==========================================================================
   4. 前台骨架：左侧信息栏 + 右侧内容区
   ========================================================================== */
.wrap { max-width: 1340px; padding: 0 28px; }
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: 0;
  align-items: start;
  padding: 26px 0 0;
}

/* ---------- 左栏 ---------- */
.rail {
  position: sticky; top: calc(var(--topbar-h) + 18px);
  max-height: calc(100vh - var(--topbar-h) - 40px);
  overflow-y: auto;
  padding: 2px 26px 22px 2px;
}
.rail-head { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.rail-eyebrow {
  display: block; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; font-weight: 600;
}
.rail-name { font-size: 28px; line-height: 1.1; color: var(--text); letter-spacing: -.045em; font-weight: 800; }
.rail-tag { font-size: 13px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }

.rail-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin: 16px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.rail-stat strong {
  display: block; font-size: 20px; line-height: 1.2; color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; letter-spacing: -.03em;
}
.rail-stat span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }

.rail-label {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 9px; font-weight: 600;
}
.rail-chips { display: flex; flex-direction: column; gap: 2px; }
.rail-chips .chip {
  width: 100%; justify-content: flex-start; text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  padding: 8px 11px; font-size: 13px; font-weight: 550; color: var(--text-2);
}
.rail-chips .chip:hover { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.rail-chips .chip.active {
  background: var(--brand-soft); border-color: var(--brand-line);
  color: var(--brand); font-weight: 700; box-shadow: inset 2px 0 0 var(--brand);
}

.rail-note {
  margin-top: 20px; padding: 12px 13px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-left: 3px solid var(--brand);
  border-radius: 4px 10px 10px 4px;
  font-size: 12px; line-height: 1.75; color: #1e5745;
}
.rail-note:empty, .rail-note:has(> span:empty) { display: none; }

/* ---------- 右栏内容头 ---------- */
.main-col { min-width: 0; padding-left: 30px; border-left: 1px solid var(--border); }
.toolbar {
  position: sticky; top: var(--topbar-h); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 0 0 20px; padding: 12px 0;
  background: rgba(244, 246, 248, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.col-title { font-size: 16px; color: var(--text); font-weight: 750; letter-spacing: -.02em; }
.chips { gap: 7px; }
.toolbar-right { gap: 8px; }
.toolbar-right select { padding: 7px 10px; font-size: 12.5px; color: var(--text-2); background: #fff; }
.toolbar-right select:hover { border-color: var(--brand); color: var(--brand); }

/* 通用 chip（分页、收藏等） */
.chip {
  background: #fff; border: 1px solid var(--border-strong); color: var(--text-2);
  border-radius: 999px; padding: 6px 13px; font-weight: 600; font-size: 12.5px;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

/* ==========================================================================
   5. 卡片网格（2:3 竖版海报铺满）
   ========================================================================== */
.grid { grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 22px 18px; }
.card {
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  transition: transform .18s ease;
  overflow: visible;
}
.card:hover { transform: translateY(-4px); background: transparent; border: 0; box-shadow: none; }

/* 海报 */
.grid:not(.list-view) .cover {
  height: auto; min-height: 0; aspect-ratio: 2 / 3;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--cover-bg);
  box-shadow: 0 2px 8px rgba(16, 26, 38, .08);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.grid:not(.list-view) .cover img { height: 100%; width: 100%; max-height: none; object-fit: cover; transition: transform .35s ease; }
.card:hover .cover { border-color: var(--brand); box-shadow: 0 14px 30px rgba(16, 26, 38, .18); }
.card:hover .cover img { transform: scale(1.04); }

.grid:not(.list-view) .cover::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(180deg, rgba(8, 14, 20, 0), rgba(8, 14, 20, .45));
  pointer-events: none;
}
.cover-tag, .cover-pin, .cover-lock {
  padding: 3px 8px; font-size: 11px; line-height: 1.5; letter-spacing: 0; white-space: nowrap;
  border-radius: 6px; z-index: 1; font-weight: 650;
}
.cover-tag {
  background: rgba(255, 255, 255, .95); color: #1b2732;
  border: 1px solid rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(16, 26, 38, .18);
}
.cover-pin { background: var(--brand); color: #fff; box-shadow: 0 1px 4px rgba(4, 120, 87, .3); }

/* 卡片文字区 */
.card-body { padding: 11px 2px 0; background: transparent; }
.grid:not(.list-view) .card-title {
  font-size: 14.5px; line-height: 1.42; color: var(--text); font-weight: 700;
  white-space: normal; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 6px;
}
.card:hover .card-title { color: var(--brand); }
.card-summary { font-size: 12.5px; color: var(--muted); -webkit-line-clamp: 2; line-height: 1.65; }
.card-tags { margin-top: 9px; gap: 5px; }
.tag {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); border-radius: 5px; font-size: 11.5px; padding: 2px 7px; font-weight: 500;
}
.card-foot { border-top: 0; margin-top: 9px; padding-top: 0; font-size: 11.5px; color: var(--muted); }

/* 列表视图 */
.list-view { gap: 10px; }
.list-view .card {
  flex-direction: row; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px; gap: 16px; align-items: center; overflow: hidden;
  box-shadow: var(--shadow);
}
.list-view .card:hover { border-color: var(--brand); background: #fff; box-shadow: 0 8px 22px rgba(16, 26, 38, .1); }
.list-view .cover {
  width: 58px; height: 87px; min-height: 0; max-height: none; flex: none;
  border-radius: 7px; overflow: hidden; border: 1px solid var(--border); box-shadow: none;
}
.list-view .cover img { height: 100%; width: 100%; object-fit: cover; }
.list-view .cover::after { display: none; }
.list-view .card-body { padding: 0; min-width: 0; }
.list-view .card-title {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 14.5px; display: block; margin-bottom: 4px;
}
.list-view .card-summary { -webkit-line-clamp: 1; min-height: 0; font-size: 12.5px; }
.list-view .card-tags { margin-top: 7px; }
.list-view .card-foot { border-top: 0; margin-top: 7px; padding-top: 0; justify-content: flex-start; gap: 16px; }

/* 骨架 / 空状态 */
.skeleton {
  background: linear-gradient(90deg, #e8edf1, #f2f5f8, #e8edf1); background-size: 200% 100%;
  aspect-ratio: 2 / 3; height: auto; border-radius: 12px;
}
.empty {
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 14px;
  color: var(--muted);
}
.empty h3 { color: var(--text); font-size: 15px; }

/* 分页 */
.pager { gap: 6px; padding: 26px 0 4px; }
.pager-info { color: var(--muted); font-size: 12.5px; }
.pager .chip { padding: 5px 11px; }

/* 页脚 */
footer.site-foot {
  margin-top: 44px; border-top: 1px solid var(--border); padding: 22px 0 46px;
  color: var(--muted); font-size: 12px;
}

/* ==========================================================================
   6. 提示 / 弹窗 / 抽屉
   ========================================================================== */
.global-alert.error { background: var(--danger-soft); color: var(--danger); border: 1px solid #f3c9c5; }
.global-alert.info { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
.toast {
  background: #16202b; color: #fff; border: 1px solid #16202b;
  box-shadow: 0 12px 30px rgba(16, 26, 38, .28);
}
.toast.success { background: #04543d; border-color: #04543d; color: #fff; }
.toast.error { background: #8c1d18; border-color: #8c1d18; color: #fff; }

.modal-backdrop, .contact-pop-backdrop {
  background: rgba(16, 26, 38, .45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.modal, .contact-pop {
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg);
}
.modal-close { color: var(--muted); }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.contact-pop h3 { color: var(--text); font-size: 16px; }
.contact-pop p { color: var(--text-2); font-size: 14px; }
.tabs { background: var(--surface-2); border: 1px solid var(--border); }
.tab { color: var(--muted); }
.tab.active { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(16, 26, 38, .1); }
.auth-foot { color: var(--muted); }

.drawer-backdrop { background: rgba(16, 26, 38, .38); }
.drawer { background: #fff; border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.drawer-head { border-bottom: 1px solid var(--border); padding: 20px 24px 16px; }
.drawer-head h2 { color: var(--text); font-size: 18px; }
.drawer-body { padding: 20px 24px 32px; }
.detail-cover {
  background: var(--cover-bg); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border);
}
.detail-cover img { width: auto; max-width: 100%; max-height: 340px; margin: 0 auto; display: block; }
.detail-content { color: var(--text-2); font-size: 13.5px; }
.kv { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kv dt { color: var(--muted); }
.kv dd { color: var(--text-2); }
.badge { border-radius: 6px; font-size: 11.5px; padding: 2px 8px; font-weight: 600; }
.badge.gray { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge.gold { background: var(--warn-soft); color: var(--warn); border: 1px solid #f0d5a8; }
.avatar.is-member { background: var(--warn-soft); color: var(--warn); }

/* ==========================================================================
   7. 后台：登录页
   ========================================================================== */
.auth-page { background: var(--bg); }
.auth-page-side {
  background:
    radial-gradient(560px 400px at 18% 6%, rgba(16, 185, 129, .24), transparent 70%),
    linear-gradient(165deg, #063a2c 0%, #06281f 55%, #051c17 100%);
  border-right: 1px solid var(--border);
}
.auth-page-side::after { display: none; }
.auth-page-side .brand { color: #fff; }
.auth-page-intro h1 { color: #fff; letter-spacing: -.03em; }
.auth-page-intro p, .auth-page-intro li { color: #b9dccd; }
.auth-page-intro .badge {
  background: rgba(255, 255, 255, .12) !important; color: #d6f2e6 !important;
  border: 1px solid rgba(255, 255, 255, .22);
}
.auth-back { color: #d6f2e6; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; }
.auth-back:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.auth-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg);
}
.auth-card h2 { color: var(--text); }
.auth-page-foot { color: var(--muted); }

/* ==========================================================================
   8. 后台：主框架
   ========================================================================== */
.admin-shell {
  display: grid; grid-template-columns: 238px minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-h));
}
.admin-side {
  display: flex; flex-direction: column;
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 16px 12px 18px;
}
.side-label {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: #707c88; padding: 0 10px; margin: 16px 0 7px; font-weight: 700;
}
.side-label:first-child { margin-top: 4px; }
.side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: 9px; margin-bottom: 2px;
  color: var(--text-2); font-size: 13px; font-weight: 550;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.side-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-item.active {
  background: var(--brand-soft); color: var(--brand);
  border-color: var(--brand-line);
  box-shadow: inset 2px 0 0 var(--brand);
  font-weight: 700;
}
.side-icon { width: 16px; text-align: center; font-size: 13px; opacity: .8; }
.side-item.active .side-icon { opacity: 1; }
.side-tag {
  margin-left: auto; font-size: 10.5px; font-weight: 700; line-height: 1.7;
  min-width: 18px; text-align: center; padding: 0 5px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.side-item.active .side-tag { background: var(--brand); color: #fff; border-color: var(--brand); }

.side-foot {
  margin-top: auto; padding: 14px 12px 2px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.side-foot-title { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.side-foot-link { font-size: 12px; color: var(--brand); font-weight: 700; }

.admin-main { padding: 26px 30px 64px; max-width: none; width: 100%; box-sizing: border-box; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--border);
}
.page-head h1 { font-size: 22px; color: var(--text); letter-spacing: -.03em; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 12px; margin-top: 5px; }

.panel {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 16px;
}
.panel h3 {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; color: var(--text); font-weight: 750;
}
.panel h3::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); flex: none;
}
.panel > p.panel-desc { color: var(--muted); font-size: 12px; margin: 7px 0 16px; }
.panel-actions { margin-top: 14px; }
.panel > h3 + .admin-toolbar { margin-top: 14px; }

/* 表格：卡片内通栏 + 表头吸顶 */
.table-wrap { margin: 14px -22px -20px; border-top: 1px solid var(--border); overflow: auto; max-height: 70vh; }
table { font-size: 12.5px; }
th {
  position: sticky; top: 0; z-index: 2;
  background: #f6f8fa;
  color: var(--text-2); font-weight: 700; font-size: 11.5px; letter-spacing: .02em;
  padding: 10px 14px; border-bottom: 1px solid var(--border-strong); white-space: nowrap;
}
.table-wrap th:first-child, .table-wrap td:first-child { padding-left: 22px; }
.table-wrap th:last-child, .table-wrap td:last-child { padding-right: 22px; }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
tr:hover td { background: #f8fafb; }
tr:last-child td { border-bottom: 0; }
.table-title { color: var(--text); font-weight: 650; }
td.actions .btn { padding: 5px 10px; font-size: 12px; }

.admin-toolbar { gap: 9px; }
.seg-filter { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 3px; }
.seg-item { color: var(--text-2); font-size: 12px; font-weight: 600; }
.seg-item:hover { color: var(--brand); }
.seg-item.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(16, 26, 38, .12), inset 0 0 0 1px var(--brand-line); }
.seg-count { background: #e7ebef; color: var(--text-2); }
.seg-item.active .seg-count { background: var(--brand); color: #fff; }
.seg-count.warn { background: var(--warn-soft); color: var(--warn); }

.gate {
  background: #fff; border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg);
}
.gate h2 { color: var(--text); }
.gate p { color: var(--muted); }
.gate-icon { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
.file-drop { background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--muted); }

/* 后台零散小控件统一为亮色系 */
.cov-pill, .cfg-pill, .hub-chip, .hub-tab, .naming-frag, .scrape-opt, .pick-pill span,
.ai-model-card, .mz-card, .blk-cat, .cat-bind, .mm-plan, .ac-preview {
  background: var(--surface-2); border-color: var(--border); color: var(--text-2);
}
.cov-pill.active, .hub-tab.active, .scrape-opt.on, .naming-frag.on,
.cat-bind.is-on, .mm-plan.active, .ai-model-card.active, .pick-pill input:checked + span {
  background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand);
}
.cov-pill.active b { color: var(--brand); }
.api-desc code, .api-path, code, pre {
  background: var(--surface-2); border: 1px solid var(--border); color: #0b5c46; border-radius: 6px;
}
.api-row-offline { background: #f2faf6; border-color: var(--brand-line); }
.scrape-bar { background: #e7ebef; }
.scrape-bar i { background: linear-gradient(90deg, var(--brand), #10b981); }
.scrape-rich, .scrape-note, .naming-body, .member-zone, .lock-panel, .ac-preview, .mm-price {
  background: var(--surface-2); border-color: var(--border); color: var(--text-2);
}
.mm-price { color: var(--warn); }
.hub-table th { background: #f6f8fa; border-bottom: 1px solid var(--border-strong); }
.hub-table td { border-bottom: 1px solid var(--border); color: var(--text-2); }

/* ==========================================================================
   9. 网盘索引（前台搜索结果 + 后台模块）
   ========================================================================== */
.pan-results { margin-bottom: 22px; }
.pan-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pan-head h3 { font-size: 13.5px; color: var(--text); font-weight: 750; }
.pan-head-tip { font-size: 11.5px; color: var(--muted); }
.pan-list { display: flex; flex-direction: column; gap: 8px; }
.pan-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 14px; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.pan-card:hover { border-color: var(--brand); box-shadow: 0 8px 20px rgba(16, 26, 38, .09); }
.pan-badge {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
/* 索引表格：窄列定宽不换行，标题列吃掉剩余宽度并省略，避免「平台」被挤成竖排 */
table.pan-table { table-layout: fixed; width: 100%; }
table.pan-table th, table.pan-table td { overflow: hidden; }
.table-wrap table th.pan-plat, .table-wrap table td.pan-plat { width: 88px; white-space: nowrap; }
.table-wrap table th.pan-code, .table-wrap table td.pan-code { width: 84px; white-space: nowrap; }
.table-wrap table th.pan-link, .table-wrap table td.pan-link { width: 112px; white-space: nowrap; }
.table-wrap table th.pan-status, .table-wrap table td.pan-status { width: 84px; white-space: nowrap; }
.table-wrap table th.pan-time, .table-wrap table td.pan-time { width: 96px; white-space: nowrap; }
.table-wrap table th.pan-ops, .table-wrap table td.pan-ops { width: 150px; white-space: nowrap; }
.table-wrap table td.pan-plat .pan-badge { height: 20px; min-width: 34px; font-size: 10.5px; }
.pan-quark { background: #eaf3ff; color: #1a56a8; border: 1px solid #c7ddfb; }
.pan-baidu { background: #eef2ff; color: #3b3bb8; border: 1px solid #d3d8fb; }
.pan-uc { background: #fff4e8; color: #9a5b13; border: 1px solid #f6dcc0; }
.pan-other { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.pan-aliyun { background: #eef4ff; color: #1f5fbf; border: 1px solid #cfddf8; }
.pan-tianyi { background: #eaf6f4; color: #116b5b; border: 1px solid #c8e6df; }
.pan-p115 { background: #e9f1ff; color: #1c4fa1; border: 1px solid #cddcf7; }
.pan-p123 { background: #eef7ff; color: #1f6fb2; border: 1px solid #d0e5f8; }
.pan-lanzou { background: #eef6ff; color: #2b6cb0; border: 1px solid #d2e3f6; }
.pan-xunlei { background: #e9f2ff; color: #1558b0; border: 1px solid #cfdef5; }
.pan-guangya { background: #fff7e8; color: #a86414; border: 1px solid #f3ddb9; }
.pan-main { min-width: 0; flex: 1; }
.pan-title {
  font-size: 13.5px; font-weight: 650; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pan-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pan-meta b { color: var(--brand); font-weight: 700; letter-spacing: .04em; }
.pan-actions { flex: none; display: flex; gap: 6px; }

/* 后台：账号卡 + 帮助内容 */
.pan-accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.pan-account {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 15px; background: var(--surface-2);
}
.pan-account-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pan-account-head strong { font-size: 13.5px; color: var(--text); }
.pan-state {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted);
  background: #fff; border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 9px;
}
.pan-account .admin-note { margin-bottom: 10px; line-height: 1.7; }
.pan-account-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 多账号列表 */
.pan-acc-list { display: flex; flex-direction: column; gap: 7px; margin: 4px 0 10px; }
.pan-acc-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap; row-gap: 7px;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: #fff;
}
.pan-acc-idx {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-2); border: 1px solid var(--brand-line);
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.pan-acc-main { min-width: 0; flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px; }
.pan-acc-main strong { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pan-acc-note { font-size: 11.5px; color: var(--muted); }
.pan-acc-err { font-size: 11.5px; color: var(--danger); line-height: 1.5; }
.pan-acc-row .pan-state { margin-left: 0; }
@media (max-width: 680px) {
  .pan-acc-row { flex-wrap: wrap; }
  .pan-acc-row .btn { flex: 1; }
}
.pan-state.on { color: var(--brand-2); background: var(--brand-soft); border-color: var(--brand-line); }
.badge.green { background: var(--brand-soft); color: var(--brand-2); border: 1px solid var(--brand-line); }

/* 前台云盘搜索开关 */
.pan-public {
  display: flex; align-items: flex-start; gap: 16px;
  margin-top: 12px; padding: 13px 15px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.pan-public-main { min-width: 0; flex: 1; }
.pan-public-main strong { font-size: 13.5px; color: var(--text); }
.pan-public-main .admin-note { margin: 4px 0 0; line-height: 1.7; }
.pan-public-main .admin-note.warn-note { color: var(--warn); }
.pan-public-main .admin-note.warn-note b { color: var(--danger); }
.switch {
  flex: none; width: 46px; height: 26px; margin-top: 4px; padding: 0;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface-3); cursor: pointer; position: relative;
  transition: background .18s, border-color .18s;
}
.switch i {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 26, 38, .28);
  transition: transform .18s;
}
.switch.on { background: var(--brand); border-color: var(--brand); }
.switch.on i { transform: translateX(20px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }

/* 一键清理失效链接 */
.pan-clean-sum {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 2px 0 12px; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2);
  font-size: 13px; color: var(--text-2);
}
.pan-clean-sum b { font-size: 19px; color: var(--text); margin-right: 2px; }
.pan-clean-sum span { font-size: 12px; color: var(--muted); }
.pan-clean-progress {
  display: flex; align-items: center; gap: 9px;
  padding: 16px 4px; font-size: 13.5px; font-weight: 650; color: var(--text);
}
.spin {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--brand);
  animation: pan-spin .8s linear infinite;
}
@keyframes pan-spin { to { transform: rotate(360deg); } }
.pan-clean-stat { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pan-clean-stat span {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
}
.pan-clean-stat .ok { background: var(--brand-soft); color: var(--brand-2); border-color: var(--brand-line); }
.pan-clean-stat .dead { background: var(--danger-soft); color: var(--danger); border-color: #f3c9c4; }
.pan-clean-stat .unk { background: var(--warn-soft); color: var(--warn); border-color: #f0d5a8; }
.pan-clean-warn {
  margin: 0 0 10px; padding: 9px 12px; border-radius: 9px;
  background: var(--warn-soft); border: 1px solid #f0d5a8; color: var(--warn);
  font-size: 12.5px; line-height: 1.75;
}
.pan-clean-list-head {
  display: flex; align-items: center; gap: 6px; margin: 4px 0 8px;
  font-size: 13px; color: var(--text);
}
.pan-clean-list-head strong { margin-right: auto; }
.pan-clean-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 320px; overflow-y: auto; padding-right: 2px;
}
.pan-clean-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: #fff; cursor: pointer;
}
.pan-clean-item:hover { border-color: var(--brand); }
.pan-clean-item input { margin-top: 2px; flex: none; width: 15px; height: 15px; accent-color: var(--brand); }
.pan-clean-item.muted-item { cursor: default; background: var(--surface-2); }
.pan-clean-item.muted-item:hover { border-color: var(--border); }
.pc-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pc-title { font-size: 13px; font-weight: 650; color: var(--text); word-break: break-all; }
.pc-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted); word-break: break-all;
}
.pc-meta .pan-badge { min-width: 30px; height: 18px; font-size: 10px; padding: 0 6px; }
.pan-clean-more { margin-top: 12px; }
.pan-clean-more summary {
  cursor: pointer; font-size: 12.5px; color: var(--text-2);
  padding: 7px 0; font-weight: 650;
}
.pan-clean-more summary:hover { color: var(--brand); }
.pan-clean-more .pan-clean-list { margin-top: 6px; max-height: 200px; }

/* 扫码弹窗 */
.pan-qr-box {
  display: flex; align-items: center; justify-content: center;
  min-height: 262px; padding: 14px; margin: 4px 0 12px;
  border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2);
}
.pan-qr-box img {
  width: 240px; height: 240px; display: block;
  border-radius: 10px; background: #fff; box-shadow: 0 2px 10px rgba(16, 26, 38, .12);
}
.pan-qr-tip { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.7; padding: 0 16px; }

@media (max-width: 560px) {
  .pan-public { flex-direction: row; }
  .pan-qr-box img { width: 200px; height: 200px; }
}
.pan-help-pre {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 12px 14px; font-size: 12px; line-height: 1.9; color: var(--text-2);
  white-space: pre-wrap; margin: 0 0 12px; overflow-x: auto;
}
.pan-help-list { margin: 0 0 6px; padding-left: 20px; font-size: 12.5px; line-height: 1.95; color: var(--text-2); }
.pan-help-list li { margin-bottom: 4px; }
.pan-help-list code { font-size: 11.5px; }

@media (max-width: 640px) {
  .pan-card { flex-wrap: wrap; }
  .pan-actions { width: 100%; justify-content: flex-end; }
}

/* ==========================================================================
   10. 响应式
   ========================================================================== */
@media (max-width: 1100px) {
  :root { --rail-w: 228px; }
  .wrap { padding: 0 20px; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 0; padding-top: 18px; }
  .rail {
    position: static; max-height: none; overflow: visible;
    border-bottom: 1px solid var(--border);
    padding: 0 0 16px; margin-bottom: 16px;
  }
  .main-col { padding-left: 0; border-left: 0; }
  .rail-head { border-bottom: 0; padding-bottom: 0; }
  .rail-name { font-size: 23px; }
  .rail-stats { display: flex; gap: 0; margin: 14px 0 0; padding: 0; border-bottom: 0; }
  .rail-stat { padding-right: 22px; }
  .rail-stat + .rail-stat { border-left: 1px solid var(--border); padding-left: 22px; }
  .rail-sec { margin-top: 14px; }
  .rail-chips {
    flex-direction: row; gap: 6px; overflow-x: auto; padding-bottom: 2px;
    scrollbar-width: none;
  }
  .rail-chips::-webkit-scrollbar { display: none; }
  .rail-chips .chip {
    width: auto; white-space: nowrap; border: 1px solid var(--border-strong);
    border-radius: 999px; padding: 6px 12px; font-size: 12.5px; background: #fff;
  }
  .rail-chips .chip.active { box-shadow: none; }
  .rail-note { margin-top: 14px; }
  .toolbar { position: static; padding: 12px 0 10px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap;
    gap: 4px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border);
  }
  .side-label, .side-foot { display: none; }
  .side-item { padding: 7px 10px; margin: 0; }
  .admin-main { padding: 20px 16px 50px; max-width: none; }
}

@media (max-width: 640px) {
  .topbar-inner { min-height: 0; padding: 10px 14px; row-gap: 9px; }
  .top-ext-links { order: 4; flex: 1 0 100%; max-width: 100%; margin: 0; gap: 14px; }
  .wrap { padding: 0 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 18px 12px; }
  .grid:not(.list-view) .card-title { font-size: 13px; }
  .card-summary { display: none; }
  .col-title { font-size: 15px; }
  .toolbar-right { flex-wrap: wrap; }
  .pager .pager-info { width: 100%; text-align: center; margin: 0 0 6px; }
  .panel { padding: 16px 14px; }
  .table-wrap { margin: 12px -14px -16px; }
  .table-wrap th:first-child, .table-wrap td:first-child { padding-left: 14px; }
  .table-wrap th:last-child, .table-wrap td:last-child { padding-right: 14px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* shared netdisk dir modal */
.sd-bar{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin:6px 0 10px;font-size:13px}
.sd-bar select,.sd-bar input[type=number]{padding:6px 10px;border:1px solid #e5e7eb;border-radius:8px;background:#fff}
.sd-path{font-size:12px;color:#6b7280;background:#f8fafc;border-radius:8px;padding:6px 10px;margin-bottom:8px;word-break:break-all}
.sd-list{max-height:300px;overflow:auto;border:1px solid #e5e7eb;border-radius:10px;padding:8px}
.sd-item{display:block;width:100%;text-align:left;background:#fff;border:1px solid transparent;border-radius:8px;padding:8px 10px;font-size:13px;color:#111827;cursor:pointer}
.sd-item:hover{background:#f3f4f6;border-color:#e5e7eb}
.sd-up{color:#6b7280;margin-bottom:4px}

/* 网盘索引：批量勾选 */
.pan-sel-col{width:38px;text-align:center}
.pan-sel-col input{width:15px;height:15px;cursor:pointer;accent-color:#16a34a}
/* 固定列宽后，勾选列要给足内边距 + 复选框的宽度，否则会被裁剪 */
.table-wrap table th.pan-sel-col, .table-wrap table td.pan-sel-col {
  width: 58px; padding-left: 18px; padding-right: 10px; text-align: left; overflow: visible;
}
table tr.row-selected{background:#f0fdf4}
table tr.row-selected:hover{background:#e9fbf0}

/* 共享网盘目录：多选 + 任务进度 */
.sd-item-row{display:flex;align-items:center;gap:8px}
.sd-item-row>.sd-item{flex:1}
.sd-pick{width:16px;height:16px;cursor:pointer;accent-color:#16a34a;flex:none}
.pan-job{border:1px solid #e5e7eb;border-radius:10px;padding:10px 12px;margin-bottom:10px;background:#fff}
.pan-job-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.pan-job-bar{height:6px;border-radius:99px;background:#eef2f7;overflow:hidden;margin-bottom:6px}
.pan-job-bar>i{display:block;height:100%;background:linear-gradient(90deg,#34d399,#16a34a);border-radius:99px;transition:width .3s ease}
/* 封面工坊 */
.cw-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.cw-bar select{padding:6px 10px;border:1px solid #e5e7eb;border-radius:8px;background:#fff}
.cw-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.cw-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;max-height:420px;overflow:auto;padding:2px}
.cw-card{border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;cursor:pointer;background:#fff;transition:border-color .15s,box-shadow .15s}
.cw-card:hover{border-color:#16a34a;box-shadow:0 4px 14px rgba(22,163,74,.16)}
.cw-thumb{aspect-ratio:3/4;display:grid;place-items:center;background:#f8fafc;overflow:hidden}
.cw-thumb svg{width:100%;height:100%;display:block}
.cw-name{font-size:12px;color:#6b7280;text-align:center;padding:6px 4px;border-top:1px solid #f1f5f9}
/* 网盘索引：封面缩略图 */
.pan-title-cell{display:flex;align-items:center;gap:10px;min-width:0}
.pan-title-main{min-width:0;overflow:hidden}
.pan-title-main .table-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pan-title-main .admin-note{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pan-thumb{width:46px;height:46px;border-radius:9px;object-fit:cover;flex:none;border:1px solid #eef2f7;background:#f8fafc}
/* 自动同步面板 */
.pan-sync-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}
.pan-sync-bar .input{padding:6px 10px;border:1px solid #e5e7eb;border-radius:8px;background:#fff}
/* 共享任务：明细展开 */
.jd-wrap{margin-top:8px;padding:10px 12px;border:1px dashed #e5e7eb;border-radius:10px;background:#fbfcfd}
.jd-sub{font-size:12px;color:#6b7280;margin:0 0 6px}
.jd-list{list-style:none;margin:0;padding:0;max-height:220px;overflow:auto}
.jd-list li{display:flex;gap:10px;justify-content:space-between;font-size:12px;padding:4px 0;border-bottom:1px dashed #f1f5f9}
.jd-list li:last-child{border-bottom:none}
.jd-path{color:#374151;word-break:break-all}
.jd-meta{color:#6b7280;white-space:nowrap;flex:none}
.jd-err{color:#b91c1c;display:block;word-break:break-all}