/* ============================================================
 * 知知软件介绍站 —— 统一样式
 * 浅色主题 + 蓝紫渐变，响应式，无外部依赖
 * ============================================================ */

[hidden] { display: none !important; }

:root {
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-300: #a5b4fc;
  --accent: #06b6d4;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-soft: #64748b;
  --border: #e6e9f2;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 8px 24px rgba(79, 70, 229, .10);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .14);
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
               "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  cursor: pointer; border: none; transition: all .2s ease; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--primary-600); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.28); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary-300); }
.btn-outline:hover { background: #eef2ff; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); }
.logo-img { height: 38px; width: auto; display: block; border-radius: 8px; }
.admin-nav .logo-img { height: 34px; }
.footer .logo-img { height: 30px; }
.nav-links { display: flex; gap: 6px; margin-left: 8px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; color: var(--text-soft); font-weight: 500; font-size: 15px;
  transition: all .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: #eef2ff; }
.nav-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; min-width: 220px;
}
.nav-search input { border: none; outline: none; background: transparent; font-size: 14px; width: 100%; color: var(--text); }
.nav-search svg { flex: none; color: var(--text-soft); }
.nav-toggle { display: none; margin-left: auto; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #06b6d4 100%);
  color: #fff; padding: 84px 0 96px;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(8px); opacity: .35;
}
.hero::before { width: 360px; height: 360px; background: rgba(255,255,255,.25); top: -120px; right: -60px; }
.hero::after  { width: 280px; height: 280px; background: rgba(255,255,255,.18); bottom: -120px; left: -40px; }
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { font-size: 44px; line-height: 1.25; font-weight: 800; letter-spacing: .5px; }
.hero p { font-size: 18px; opacity: .92; margin: 18px 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 42px; flex-wrap: wrap; }
.hero-stats .num { font-size: 30px; font-weight: 800; }
.hero-stats .label { font-size: 14px; opacity: .85; }

/* ---------- 区块标题 ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .eyebrow { color: var(--primary); font-weight: 700; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; }
.section-head h2 { font-size: 32px; font-weight: 800; margin: 8px 0 10px; }
.section-head p { color: var(--text-soft); font-size: 16px; }

/* ---------- 分类筛选标签 ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.tab {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text-soft); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.tab:hover { border-color: var(--primary-300); color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 软件卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: all .2s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-300); }
.card .thumb {
  height: 170px; border-radius: 12px; margin-bottom: 16px;
  background: linear-gradient(135deg, #eef2ff, #e0f2fe);
  display: grid; place-items: center; font-size: 40px; position: relative; overflow: hidden;
}
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.card .card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.card .more { color: var(--primary); font-weight: 700; font-size: 14px; }
.card .hot-tag { font-size: 11px; background: #fef2f2; color: #ef4444; padding: 2px 8px; border-radius: 999px; font-weight: 700; }

/* ---------- 分类展示（首页） ---------- */
.cat-block { margin-bottom: 54px; }
.cat-block-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.cat-block-head .icon { font-size: 26px; }
.cat-block-head h3 { font-size: 22px; font-weight: 800; }
.cat-block-head .count { color: var(--text-soft); font-size: 14px; }
.cat-block-head a { margin-left: auto; color: var(--primary); font-weight: 600; font-size: 14px; }

/* ---------- 价格体系 ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; position: relative; box-shadow: var(--shadow-sm);
  transition: all .2s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card.hot { border: 2px solid var(--primary); box-shadow: var(--shadow-md); }
.price-card .ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 14px; border-radius: 999px;
}
.price-card .pname { font-size: 18px; font-weight: 800; }
.price-card .pdesc { color: var(--text-soft); font-size: 14px; margin: 8px 0 18px; min-height: 44px; }
.price-card .pnum { font-size: 38px; font-weight: 800; color: var(--primary); }
.price-card .pnum small { font-size: 15px; color: var(--text-soft); font-weight: 600; }
.price-card .btn { width: 100%; margin-top: 18px; }

/* ---------- 详情页 ---------- */
.detail-hero {
  background: linear-gradient(135deg, #4f46e5, #06b6d4); color: #fff; padding: 40px 0;
}
.breadcrumb { font-size: 14px; opacity: .9; margin-bottom: 14px; }
.breadcrumb a:hover { text-decoration: underline; }
.detail-hero h1 { font-size: 34px; font-weight: 800; }
.detail-body { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding: 44px 0; align-items: start; }
.detail-main h2 { font-size: 22px; font-weight: 800; margin: 30px 0 14px; }
.detail-main h2:first-child { margin-top: 0; }
.detail-main p { color: #334155; white-space: pre-line; margin-bottom: 12px; }
.feature-list { list-style: none; display: grid; gap: 10px; }
.feature-list li {
  display: flex; gap: 10px; align-items: flex-start; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
}
.feature-list li .ico { color: var(--primary); font-weight: 800; flex: none; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.shot {
  height: 130px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #06b6d4); box-shadow: var(--shadow-sm);
}
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-q { padding: 14px 16px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; background: #fff; }
.faq-q .arrow { transition: transform .2s; color: var(--primary); }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a { padding: 0 16px 14px; color: var(--text-soft); display: none; }
.faq-item.open .faq-a { display: block; }
.log-item { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.log-item .v { font-weight: 800; color: var(--primary); flex: none; width: 56px; }
.log-item .t { color: #334155; }

/* 侧栏 */
.detail-side .side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); position: sticky; top: 84px; }
.detail-side .side-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.detail-side .side-desc { color: var(--text-soft); font-size: 14px; margin-bottom: 16px; margin-top: 14px; }
.detail-side .side-note { background: #f1f5f9; color: var(--text-soft); font-size: 14px; padding: 14px 16px; border-radius: 10px; text-align: center; }
.detail-side .meta { font-size: 13.5px; color: var(--text-soft); margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.detail-side .meta div { display: flex; justify-content: space-between; padding: 4px 0; }

/* ---------- 文章正文（详情页，富文本渲染） ---------- */
.article { line-height: 1.85; color: var(--text); font-size: 15.5px; }
.article h2 { font-size: 22px; font-weight: 800; margin: 30px 0 14px; }
.article h3 { font-size: 18px; font-weight: 800; margin: 24px 0 10px; }
.article p { margin: 0 0 14px; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 24px; }
.article li { margin: 6px 0; }
.article img { max-width: 100%; height: auto; border-radius: 10px; margin: 10px 0; box-shadow: var(--shadow-sm); }
.article blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--primary); background: #f8fafc; color: var(--text-soft); border-radius: 0 10px 10px 0; }
.article a { color: var(--primary); text-decoration: underline; }

/* ---------- 后台富文本编辑器 ---------- */
.rte { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 8px 10px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.rte-toolbar button { min-width: 34px; height: 32px; padding: 0 10px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); }
.rte-toolbar button:hover { border-color: var(--primary); color: var(--primary); }
.rte-toolbar button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.rte-content { min-height: 360px; padding: 20px 22px; outline: none; font-size: 15px; line-height: 1.85; color: var(--text); }
.rte-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.rte-content:empty:before { content: attr(data-placeholder); color: #94a3b8; }
.rte-content:empty:before { content: attr(data-placeholder); color: #94a3b8; }
.rte-content img { max-width: 100%; height: auto; border-radius: 8px; }
.rte-content a { color: var(--primary); }

/* ---------- 页脚 ---------- */
.footer { background: #0f172a; color: #cbd5e1; padding: 48px 0 28px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer a { color: #cbd5e1; font-size: 14px; display: block; padding: 5px 0; }
.footer a:hover { color: #fff; }
.footer .about { font-size: 14px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 32px; padding-top: 18px; text-align: center; font-size: 13px; color: #64748b; }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; cursor: pointer; font-size: 20px;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: all .25s; z-index: 60;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--primary-600); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--text-soft); padding: 60px 0; grid-column: 1 / -1; }

/* ---------- 列表页布局 ---------- */
.list-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 36px 0; align-items: start; }
.sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); position: sticky; top: 84px; }
.sidebar h3 { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.sidebar .cat-link { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; color: var(--text-soft); cursor: pointer; font-size: 14px; font-weight: 500; }
.sidebar .cat-link:hover { background: #f1f5f9; color: var(--text); }
.sidebar .cat-link.active { background: #eef2ff; color: var(--primary); font-weight: 700; }
.sidebar .cat-link .cnt { margin-left: auto; font-size: 12px; color: var(--text-soft); }

/* ---------- 数字翻页 ---------- */
.pagination { display: none; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 36px 0 10px; }
.pagination.show { display: flex; }
.pg {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.pg:hover:not(.disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.pg.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-sm); cursor: default; }
.pg.disabled { color: #cbd5e1; background: #f8fafc; cursor: not-allowed; border-color: var(--border); }
.pg-ellipsis { color: var(--text-soft); padding: 0 4px; user-select: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .detail-body { grid-template-columns: 1fr; }
  .detail-side .side-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .list-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 720px) {
  .nav-links, .nav-search { display: none; }
  .nav-toggle { display: block; }
  .nav-links.show { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 10px 20px; border-bottom: 1px solid var(--border); }
  .hero h1 { font-size: 32px; }
  .section-head h2 { font-size: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * 图片展示（封面 / 截图）
 * ============================================================ */
.card .thumb-img { width: 100%; height: 100%; object-fit: contain; }
.card .thumb-fallback { font-size: 40px; }

.detail-hero-inner { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.detail-cover {
  width: 200px; height: 130px; border-radius: 14px; overflow: hidden; flex: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); border: 2px solid rgba(255,255,255,.5);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.shot { height: auto; min-height: 130px; padding: 0; background: #e2e8f0; color: #475569; overflow: hidden; }
.shot img { width: 100%; height: 100%; min-height: 130px; object-fit: cover; }

/* ============================================================
 * 软件类型（原创开发软件 / 免费分享软件）
 * ============================================================ */
/* 卡片类型徽标（右上角，与左上分类徽标错开） */
.card .type-badge {
  position: absolute; top: 10px; right: 10px; font-size: 11.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; color: #fff;
}
.type-badge.type-original { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.type-badge.type-free { background: linear-gradient(135deg, #0ea5e9, #06b6d4); }

/* ============================================================
 * 后台管理
 * ============================================================ */
.admin-nav { position: sticky; top: 0; z-index: 50; background: #0f172a; color: #fff; }
.admin-nav-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.admin-nav .logo { color: #fff; }
.admin-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.admin-actions .btn-link { color: #cbd5e1; font-size: 14px; font-weight: 600; }
.admin-actions .btn-link:hover { color: #fff; }
.admin-actions .btn-ghost {
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3);
  padding: 8px 16px; border-radius: 999px; font-size: 14px; cursor: pointer;
}
.admin-actions .btn-ghost:hover { background: rgba(255,255,255,.22); }

/* 登录 */
.login-view { min-height: calc(100vh - 60px); display: grid; place-items: center; background: linear-gradient(135deg, #4f46e5, #06b6d4); }
.login-box { width: 360px; max-width: 90vw; background: #fff; border-radius: 18px; padding: 34px 30px; box-shadow: var(--shadow-lg); }
.login-box h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.login-tip { color: var(--text-soft); font-size: 13px; margin-bottom: 18px; }
.login-tip code { background: #eef2ff; color: var(--primary); padding: 1px 6px; border-radius: 6px; }
.login-box input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 15px; margin-bottom: 14px; outline: none; }
.login-box input:focus { border-color: var(--primary); }
.login-box .btn-primary { width: 100%; }
.login-err { color: #ef4444; font-size: 13px; margin-top: 8px; min-height: 16px; }

/* 主布局 */
.admin-main { background: var(--bg); min-height: calc(100vh - 60px); padding: 26px 0; }
.admin-shell { display: flex; align-items: flex-start; gap: 22px; }
.admin-aside { flex: 0 0 200px; position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.aside-user { padding: 6px 8px 14px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.aside-user-name { font-weight: 800; font-size: 15px; }
.aside-user-sub { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.admin-menu { display: flex; flex-direction: column; gap: 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14.5px; cursor: pointer; transition: all .15s; user-select: none; }
.menu-item:hover { background: #f1f5f9; }
.menu-item.active { background: var(--primary); color: #fff; }
.menu-item .mi-ico { font-size: 16px; }
.admin-content { flex: 1 1 auto; min-width: 0; }
.view-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.content-msg { margin-bottom: 16px; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.content-msg.ok { background: #ecfdf5; color: #16a34a; border: 1px solid #a7f3d0; }
.content-msg.err { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }

/* 后台管理表格 */
.manage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.manage-head h2 { font-size: 20px; font-weight: 800; }
.manage-count { font-size: 13px; font-weight: 500; color: var(--text-soft); margin-left: 6px; }
.manage-tools { display: flex; gap: 10px; align-items: center; }
.side-search { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; min-width: 180px; }
.side-search:focus { border-color: var(--primary); }
.batch-bar { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
.batch-move { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); }
.batch-move select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.batch-bar .btn-ghost.danger { margin-left: auto; }
.batch-bar .btn-ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary-300); padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.batch-bar .btn-ghost:hover { background: #eef2ff; }
.batch-bar .btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
.sel-count { font-size: 12px; color: var(--text-soft); }
.admin-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.admin-pager .pg-info { font-size: 13px; color: var(--text-soft); margin-left: 8px; }
.aside-ver { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-soft); user-select: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; max-height: 64vh; }
.manage-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.manage-table th, .manage-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.manage-table thead th { background: #f8fafc; font-weight: 700; color: var(--text-soft); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.manage-table tbody tr { cursor: pointer; transition: background .15s; }
.manage-table tbody tr:hover { background: #f8fafc; }
.manage-table tbody tr.active { background: #eef2ff; }
.col-check { width: 38px; text-align: center; }
.col-hot { width: 84px; }
.col-ops { width: 132px; white-space: nowrap; }
.cell-name { font-weight: 700; }
.cell-id { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.hot-dot { color: #ef4444; font-weight: 700; font-size: 13px; }
.muted { color: var(--text-soft); }
.op-edit, .op-del { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; margin-right: 6px; }
.op-edit:hover { border-color: var(--primary); color: var(--primary); }
.op-del:hover { border-color: #ef4444; color: #ef4444; }
.rep-empty { text-align: center; color: var(--text-soft); padding: 26px 0; }
.btn-ghost.danger { background: #fff; color: #ef4444; border: 1px solid #fecaca; padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-ghost.danger:hover:not(:disabled) { background: #fef2f2; }
.btn-ghost.danger:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
.soft-form .field { margin-bottom: 18px; }
.soft-form .field-row { display: flex; gap: 16px; }
.soft-form .field-row .field { flex: 1; }
.soft-form label { display: block; font-size: 13.5px; font-weight: 700; color: #334155; margin-bottom: 7px; }
.soft-form input[type="text"], .soft-form input[type="url"], .soft-form select, .soft-form textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; font-size: 14.5px;
  font-family: inherit; color: var(--text); outline: none; background: #fff; transition: border-color .15s;
}
.soft-form input:focus, .soft-form select:focus, .soft-form textarea:focus { border-color: var(--primary); }
.soft-form textarea { resize: vertical; }

/* 开关 */
.switch { display: inline-flex; align-items: center; }
.switch input { display: none; }
.switch .slider { width: 46px; height: 26px; border-radius: 999px; background: #cbd5e1; position: relative; cursor: pointer; transition: background .2s; }
.switch .slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::after { transform: translateX(20px); }

/* 图片字段 */
.img-field { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.img-prev { width: 160px; height: 110px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: #f1f5f9; }
.img-controls { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 10px; }
.img-controls input[type="file"] { font-size: 13px; }
.img-controls input[type="url"] { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; }
.img-controls input[type="url"]:focus { border-color: var(--primary); }

/* 重复器 */
.repeater { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.rep-row { display: flex; gap: 8px; align-items: stretch; }
.rep-row input, .rep-row textarea { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; outline: none; }
.rep-row input:focus, .rep-row textarea:focus { border-color: var(--primary); }
.rep-rm { flex: none; width: 36px; border: 1px solid var(--border); background: #fff; border-radius: 10px; cursor: pointer; color: #ef4444; font-size: 15px; font-weight: 700; }
.rep-rm:hover { background: #fef2f2; }

/* 截图编辑器 */
.shots-editor { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.shot-row { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: #f8fafc; }
.shot-prev { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; flex: none; background: #e2e8f0; }
.shot-ctl { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.shot-ctl input[type="file"] { font-size: 12.5px; }
.shot-ctl input[type="url"] { padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; font-size: 13.5px; outline: none; }
.shot-ctl input[type="url"]:focus { border-color: var(--primary); }

/* 表单操作区（浅色按钮覆盖默认白字） */
.view-panel .btn-ghost {
  background: #fff; color: var(--primary); border: 1px solid var(--primary-300);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; cursor: pointer; font-weight: 600;
}
.view-panel .btn-ghost:hover { background: #eef2ff; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.form-msg { font-size: 14px; font-weight: 600; }
.form-msg.ok { color: #16a34a; }
.form-msg:not(.ok) { color: #ef4444; }

/* 站点设置 */
.settings-hint { color: var(--text-soft); font-size: 14px; line-height: 1.7; margin: 0 0 18px; }

/* 保存成功页 */
.success-box {
  max-width: 460px; margin: 60px auto; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 48px 36px; box-shadow: var(--shadow-sm);
}
.success-ico { font-size: 60px; line-height: 1; margin-bottom: 14px; }
.success-title { font-size: 24px; font-weight: 800; color: var(--primary); margin: 0 0 12px; }
.success-sub { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 8px; }
.success-tip { font-size: 13.5px; color: var(--text-soft); margin: 0 0 26px; line-height: 1.6; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* 后台响应式 */
@media (max-width: 880px) {
  .admin-shell { flex-direction: column; }
  .admin-aside { position: static; flex: 1 1 auto; width: 100%; }
  .soft-form .field-row { flex-direction: column; gap: 0; }
}
