/* ============================================================
   金笑天教学工具平台 - 公共样式
   包含：基础变量 / 布局 / 导航 / 卡片 / 内页 / 表单 / 后台
   ============================================================ */

:root {
    --primary: #0052D9;
    --primary-dark: #003bb3;
    --primary-light: #1677FF;
    --primary-50: #e6f0ff;
    --primary-100: #d6e4ff;
    --bg: #f5f7fa;
    --card: #ffffff;
    --border: #eef0f4;
    --border-strong: #e2e6ec;
    --text: #1a1a1a;
    --text-2: #555555;
    --muted: #666666;
    --muted-2: #888888;
    --muted-3: #999999;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, .06);
    --shadow-hover: 0 8px 24px rgba(0, 82, 217, .12);
    --danger: #ff4d4f;
    --success: #00b42a;
    --warning: #ff9a2e;
    --sidebar: #1f2430;
}

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

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

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-primary { color: var(--primary); }
.muted { color: var(--muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ===================== 导航栏 ===================== */
.navbar {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 64px;
    gap: 24px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--primary); }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-2); font-size: 15px; font-weight: 500; transition: color .3s; padding: 4px 0; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); position: relative; }
.nav-links a.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
    height: 2px; background: var(--primary); border-radius: 2px;
}

.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-search {
    display: flex; align-items: center; background: var(--bg);
    border-radius: 20px; padding: 0 12px; height: 36px; width: 200px;
    border: 1px solid transparent; transition: all .3s;
}
.nav-search:focus-within { border-color: var(--primary-100); background: #fff; }
.nav-search input { border: none; background: transparent; outline: none; font-size: 13px; width: 100%; }
.nav-search span { color: var(--muted-3); font-size: 14px; }

/* 用户菜单 */
.user-menu { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 4px 10px 4px 4px; border-radius: 20px; border: 1px solid var(--border-strong);
    background: #fff; font-size: 14px; color: var(--text-2); transition: all .3s;
}
.user-btn:hover { border-color: var(--primary-100); }
.user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.dropdown {
    position: absolute; right: 0; top: 46px; background: #fff;
    border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    border: 1px solid var(--border); min-width: 168px; padding: 6px;
    display: none; z-index: 20;
}
.dropdown.show { display: block; }
.dropdown a, .dropdown button {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 9px 12px; border-radius: 6px; font-size: 14px; color: var(--text-2);
    background: none; border: none; cursor: pointer; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--primary-50); color: var(--primary); }
.dropdown .divider { height: 1px; background: var(--border); margin: 6px 0; }

/* ===================== 按钮 ===================== */
.btn {
    padding: 10px 24px; border-radius: var(--radius-sm); font-size: 15px;
    font-weight: 600; cursor: pointer; transition: all .3s; display: inline-flex;
    align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 82, 217, .25); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary-100); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-50); }
.btn-ghost { background: var(--bg); color: var(--text-2); }
.btn-ghost:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #d9363e; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.btn-transparent { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .5); }
.btn-transparent:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* ===================== 首页 Banner ===================== */
.banner {
    background: linear-gradient(135deg, #0052D9 0%, #0066FF 50%, #1677FF 100%);
    color: #fff; padding: 80px 20px; text-align: center; position: relative; overflow: hidden;
}
.banner::before {
    content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px;
    background: rgba(255, 255, 255, .05); border-radius: 50%;
}
.banner::after {
    content: ''; position: absolute; bottom: -30%; left: -5%; width: 400px; height: 400px;
    background: rgba(255, 255, 255, .05); border-radius: 50%;
}
.banner-content { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.banner h1 { font-size: 42px; font-weight: 700; margin-bottom: 16px; letter-spacing: -.5px; }
.banner p { font-size: 18px; opacity: .9; margin-bottom: 32px; }
.banner-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* 首页搜索条 */
.banner-search {
    max-width: 560px; margin: 0 auto 20px; display: flex; background: #fff;
    border-radius: 10px; padding: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    position: relative; z-index: 1;
}
.banner-search input { flex: 1; border: none; outline: none; padding: 0 14px; font-size: 15px; }
.banner-search button { padding: 10px 26px; }

/* ===================== 通用区块 ===================== */
.section { max-width: 1200px; margin: 0 auto; padding: 56px 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 12px; }
.section-title {
    font-size: 28px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 12px;
}
.section-title .icon {
    width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; flex-shrink: 0;
}
.section-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.view-more { color: var(--primary); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.view-more:hover { text-decoration: underline; }

.column-section { background: #fff; border-bottom: 1px solid #f0f0f0; }
.column-section.alt { background: #fafbfc; }

/* ===================== 卡片网格 ===================== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card {
    background: #fff; border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); transition: all .3s; cursor: pointer;
    border: 1px solid #f0f0f0; display: flex; flex-direction: column; position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-100); }
.card-icon {
    width: 48px; height: 48px; background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 16px;
}
.card h3 { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-meta .tag { font-size: 12px; padding: 2px 8px; background: #f5f5f5; color: var(--muted-2); border-radius: 4px; }
.download-btn {
    padding: 6px 16px; background: var(--primary); color: #fff; border: none;
    border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .3s;
}
.download-btn:hover { background: var(--primary-dark); }

.card-wrapper { position: relative; }
.hot-badge, .new-badge {
    position: absolute; top: 12px; right: 12px; color: #fff; font-size: 11px;
    padding: 2px 8px; border-radius: 4px; font-weight: 600; z-index: 2;
}
.hot-badge { background: var(--danger); }
.new-badge { background: var(--success); }

.hot-tools {
    background: #fff; position: relative; z-index: 10;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .05);
}
.hot-tools .card-icon { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; }

/* 统计数字条 */
.stats-bar { background: #fff; border-bottom: 1px solid var(--border); }
.stats-inner { max-width: 1200px; margin: 0 auto; padding: 28px 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-item { text-align: center; }
.stat-num { font-size: 30px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--muted-2); margin-top: 4px; }

/* ===================== 内页 页头 ===================== */
.page-hero {
    background: linear-gradient(135deg, #0052D9 0%, #1677FF 100%);
    color: #fff; padding: 44px 20px 48px; position: relative; overflow: hidden;
}
.page-hero::after {
    content: ''; position: absolute; right: -60px; top: -80px; width: 300px; height: 300px;
    background: rgba(255, 255, 255, .06); border-radius: 50%;
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero h1 { font-size: 30px; font-weight: 700; margin-bottom: 8px; }
.page-hero p { font-size: 15px; opacity: .88; max-width: 720px; }

.breadcrumb {
    max-width: 1200px; margin: 0 auto; padding: 16px 20px 0;
    font-size: 13px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted-2); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #c4c8cf; }

/* ===================== 筛选栏 ===================== */
.filter-bar {
    background: #fff; border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow); margin-bottom: 20px; border: 1px solid var(--border);
}
.filter-row { display: flex; align-items: flex-start; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.filter-row:last-child { border-bottom: none; }
.filter-row:first-child { padding-top: 0; }
.filter-label { font-size: 14px; color: var(--muted-2); width: 56px; flex-shrink: 0; padding-top: 4px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chip {
    padding: 5px 14px; border-radius: 16px; font-size: 13px; color: var(--text-2);
    background: var(--bg); cursor: pointer; transition: all .25s; border: 1px solid transparent;
    white-space: nowrap;
}
.chip:hover { background: var(--primary-50); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; }

.sort-tabs { display: flex; gap: 4px; }
.sort-tabs .chip { background: transparent; }
.sort-tabs .chip.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }

.result-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.result-count { font-size: 14px; color: var(--muted); }
.result-count b { color: var(--primary); font-size: 16px; }

/* ===================== 列表行卡片 ===================== */
.list-item {
    background: #fff; border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow); border: 1px solid var(--border);
    display: flex; gap: 18px; transition: all .3s; cursor: pointer; margin-bottom: 14px;
}
.list-item:hover { box-shadow: var(--shadow-hover); border-color: var(--primary-100); transform: translateY(-2px); }
.list-icon {
    width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.list-body { flex: 1; min-width: 0; }
.list-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-body p { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.list-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.list-foot { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--muted-2); flex-wrap: wrap; }
.list-foot span { display: flex; align-items: center; gap: 4px; }
.list-action { display: flex; flex-direction: column; justify-content: center; gap: 8px; flex-shrink: 0; }

/* 标签 */
.tag {
    display: inline-block; font-size: 12px; padding: 2px 8px;
    background: var(--bg); color: var(--muted-2); border-radius: 4px;
}
.tag-blue { background: var(--primary-50); color: var(--primary); }
.tag-green { background: #e8f8ec; color: var(--success); }
.tag-orange { background: #fff3e6; color: #d97706; }
.tag-red { background: #ffece8; color: var(--danger); }
.tag-purple { background: #f3e8ff; color: #7c3aed; }

/* 评分星 */
.stars { color: #ffa000; font-size: 13px; letter-spacing: 1px; }

/* ===================== 详情页 ===================== */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.panel {
    background: #fff; border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 20px;
}
.panel-title {
    font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
    padding-left: 10px; border-left: 4px solid var(--primary);
}
.detail-hero { display: flex; gap: 20px; align-items: flex-start; }
.detail-hero .big-icon {
    width: 88px; height: 88px; border-radius: 18px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center; font-size: 42px; color: #fff;
}
.detail-hero h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.detail-hero .sub { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.detail-hero .badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; margin-top: 16px; }
.info-item { display: flex; font-size: 14px; }
.info-item .k { color: var(--muted-2); width: 78px; flex-shrink: 0; }
.info-item .v { color: var(--text-2); font-weight: 500; }

.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.feature-item {
    background: var(--bg); border-radius: var(--radius-sm); padding: 14px 16px;
    border-left: 3px solid var(--primary);
}
.feature-item b { display: block; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.feature-item span { font-size: 13px; color: var(--muted); }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shot {
    border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border);
}
.shot-img {
    height: 130px; background: linear-gradient(135deg, var(--primary-50), #eaf1ff);
    display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--primary);
}
.shot p { font-size: 13px; color: var(--muted); padding: 8px 10px; text-align: center; background: #fafbfc; }

.article-body { font-size: 15px; color: #333; line-height: 1.9; }
.article-body h2 { font-size: 19px; font-weight: 700; margin: 28px 0 12px; color: var(--text); }
.article-body h3 { font-size: 16px; font-weight: 600; margin: 20px 0 10px; color: var(--text); }
.article-body p { margin-bottom: 14px; }
.article-body ul { margin: 0 0 14px 20px; list-style: disc; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
    border-left: 4px solid var(--primary-100); background: var(--primary-50);
    padding: 12px 16px; border-radius: 0 8px 8px 0; margin-bottom: 14px; color: var(--muted);
}
.article-body code {
    background: #f2f4f7; padding: 2px 6px; border-radius: 4px;
    font-family: Consolas, Monaco, monospace; font-size: 13px; color: #c7254e;
}

/* 大纲目录 */
.toc { position: sticky; top: 84px; }
.toc a {
    display: block; padding: 8px 12px; font-size: 14px; color: var(--muted);
    border-radius: 6px; border-left: 2px solid transparent;
}
.toc a:hover { background: var(--primary-50); color: var(--primary); }
.toc a.active { color: var(--primary); font-weight: 600; border-left-color: var(--primary); background: var(--primary-50); }

/* 侧边小卡 */
.side-card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 16px; }
.side-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.side-list a { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; color: var(--text-2); }
.side-list a:last-child { border-bottom: none; }
.side-list a:hover { color: var(--primary); }
.side-list .no { width: 20px; height: 20px; border-radius: 4px; background: var(--bg); color: var(--muted-2); font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.side-list .no.top { background: var(--primary); color: #fff; }
.side-list .txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================== 社区问答 ===================== */
.community { background: linear-gradient(135deg, #f0f5ff 0%, #e6f0ff 100%); }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }
.qa-card {
    background: #fff; border-radius: var(--radius); padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04); transition: all .3s; cursor: pointer;
}
.qa-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.qa-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qa-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 600;
}
.qa-user { font-size: 14px; font-weight: 500; color: #333; }
.qa-time { font-size: 12px; color: var(--muted-3); margin-left: auto; }
.qa-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.5; }
.qa-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.qa-footer { display: flex; gap: 16px; font-size: 13px; color: var(--muted-2); }
.qa-footer span { display: flex; align-items: center; gap: 4px; }

.ask-btn {
    display: block; width: 220px; margin: 32px auto 0; padding: 12px 24px;
    background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm);
    font-size: 16px; font-weight: 600; cursor: pointer; transition: all .3s;
}
.ask-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 82, 217, .3); }

/* 问题详情 */
.q-block { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.q-block h1 { font-size: 22px; font-weight: 700; margin-bottom: 12px; line-height: 1.5; }
.q-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted-2); padding-bottom: 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.q-content { font-size: 15px; line-height: 1.9; color: #333; padding: 16px 0; }
.q-actions { display: flex; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }

/* 富文本渲染内容（提问描述 / 回答 / 官方答复，均经 sanitizeHtml 消毒） */
.rich-body { line-height: 1.9; word-break: break-word; }
.rich-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 8px 0; }
.rich-body a { color: var(--primary); text-decoration: underline; word-break: break-all; }
.rich-body blockquote { border-left: 3px solid var(--primary-100); margin: 8px 0; padding: 2px 12px; color: var(--muted); background: #fafbfc; border-radius: 0 6px 6px 0; }
.rich-body ul { list-style: disc; padding-left: 22px; margin: 6px 0; }
.rich-body ol { list-style: decimal; padding-left: 22px; margin: 6px 0; }
.rich-body li { margin: 2px 0; }
.rich-body h3 { font-size: 17px; margin: 10px 0 4px; }
.rich-body h4 { font-size: 15px; margin: 10px 0 4px; }
.rich-body div { margin: 0; }

.answer-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.answer-item:last-child { border-bottom: none; }
.answer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.answer-body { font-size: 15px; line-height: 1.9; color: #333; }
.answer-foot { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; }
.act-btn {
    background: none; border: none; cursor: pointer; color: var(--muted-2);
    font-size: 13px; display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px;
}
.act-btn:hover { background: var(--primary-50); color: var(--primary); }
.act-btn.on { color: var(--primary); font-weight: 600; }
.accepted-flag { background: #e8f8ec; color: var(--success); font-size: 12px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }

/* ===================== 表单 ===================== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.form-group label .req { color: var(--danger); }
.form-control {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
    outline: none; transition: all .25s; background: #fff; color: var(--text);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 82, 217, .1); }
textarea.form-control { min-height: 120px; resize: vertical; line-height: 1.7; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--muted-3); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.form-group.has-error .form-control { border-color: var(--danger); }
.form-group.has-error .form-error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 登录卡片 */
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: linear-gradient(135deg, #f0f5ff 0%, #e6f0ff 100%); }
.auth-card { background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 82, 217, .12); width: 100%; max-width: 420px; padding: 36px 32px; }
.auth-card h2 { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--muted-2); font-size: 14px; margin-bottom: 26px; }
.auth-tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.auth-tabs button { flex: 1; padding: 9px; border: none; background: none; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--muted-2); cursor: pointer; transition: all .3s; }
.auth-tabs button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.auth-tip { background: var(--primary-50); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; color: var(--primary-dark); margin-bottom: 20px; line-height: 1.7; }

/* ===================== 分页 ===================== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.pagination button {
    min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong);
    background: #fff; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; color: var(--text-2);
    transition: all .25s;
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }

/* ===================== 空状态 ===================== */
.empty { text-align: center; padding: 60px 20px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.empty .ico { font-size: 52px; margin-bottom: 12px; opacity: .5; }
.empty p { color: var(--muted-2); font-size: 15px; }

/* ===================== 提示 Toast ===================== */
.toast-wrap { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
    background: rgba(26, 26, 46, .92); color: #fff; padding: 10px 20px;
    border-radius: var(--radius-sm); font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    animation: toastIn .3s ease;
}
.toast.success { background: rgba(0, 180, 42, .94); }
.toast.error { background: rgba(255, 77, 79, .94); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ===================== 弹窗 Modal ===================== */
.modal-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 2000;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
    background: #fff; border-radius: 14px; width: 100%; max-width: 560px;
    max-height: 88vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: modalIn .25s ease;
}
.modal-lg { max-width: 780px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-close { border: none; background: none; font-size: 22px; color: var(--muted-2); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ===================== 页脚 ===================== */
.footer { background: #1a1a2e; color: #aaa; padding: 40px 20px 20px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-section h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-section a { display: block; color: #aaa; font-size: 14px; margin-bottom: 10px; transition: color .3s; }
.footer-section a:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 20px; border-top: 1px solid #333; text-align: center; font-size: 13px; }

/* ===================== 个人中心 ===================== */
.profile-head { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); display: flex; align-items: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; flex-shrink: 0; }
.profile-info h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.profile-info p { font-size: 13px; color: var(--muted-2); }
.profile-stats { display: flex; gap: 32px; margin-left: auto; flex-wrap: wrap; }
.profile-stats div { text-align: center; }
.profile-stats b { display: block; font-size: 20px; color: var(--primary); }
.profile-stats span { font-size: 12px; color: var(--muted-2); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { padding: 10px 18px; border: none; background: none; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--primary); }
.tabs button.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* ===================== 后台 ===================== */
.admin-body { background: #f2f4f7; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-side {
    width: 220px; background: var(--sidebar); color: #b9bfcc; flex-shrink: 0;
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; overflow-y: auto;
}
.admin-side .brand { padding: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.admin-side .brand img { width: 34px; height: 34px; border-radius: 8px; }
.admin-side .brand b { color: #fff; font-size: 16px; }
.admin-side .brand small { display: block; color: #7a8290; font-size: 11px; font-weight: 400; }
.admin-nav { padding: 12px 10px; flex: 1; }
.admin-nav .nav-group { font-size: 11px; color: #6b7280; padding: 14px 12px 6px; letter-spacing: 1px; }
.admin-nav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
    font-size: 14px; color: #b9bfcc; margin-bottom: 2px; cursor: pointer; transition: all .25s;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-nav a.active { background: var(--primary); color: #fff; font-weight: 500; }
.admin-nav a .ico { width: 18px; text-align: center; }
.admin-nav a .badge-n {
    margin-left: auto; background: var(--danger); color: #fff; font-size: 11px;
    padding: 1px 7px; border-radius: 10px; font-weight: 600;
}
.admin-main { flex: 1; margin-left: 220px; display: flex; flex-direction: column; min-width: 0; }
.admin-top {
    height: 60px; background: #fff; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
    position: sticky; top: 0; z-index: 50;
}
.admin-top h1 { font-size: 18px; font-weight: 700; }
.admin-top .right { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--text-2); }
.admin-content { padding: 24px; flex: 1; }

.admin-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 20px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.admin-card-head h3 { font-size: 16px; font-weight: 700; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.admin-stat { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); display: flex; align-items: center; gap: 16px; }
.admin-stat .ic { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.admin-stat .num { font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--text); }
.admin-stat .lab { font-size: 13px; color: var(--muted-2); }
.admin-stat .sub { font-size: 12px; color: var(--success); margin-top: 2px; }

.admin-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.admin-toolbar input, .admin-toolbar select { padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 14px; outline: none; font-family: inherit; }
.admin-toolbar input:focus, .admin-toolbar select:focus { border-color: var(--primary); }
.admin-toolbar .grow { flex: 1; min-width: 160px; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { background: #fafbfc; text-align: left; padding: 11px 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 13px; }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
.admin-table tbody tr:hover { background: #fafbff; }
.admin-table .cell-main { display: flex; align-items: center; gap: 10px; }
.admin-table .cell-main .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--primary-50); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.admin-table .cell-main b { font-size: 14px; color: var(--text); font-weight: 600; }
.admin-table .cell-main small { display: block; color: var(--muted-3); font-size: 12px; font-weight: 400; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 2px 4px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.table-wrap { overflow-x: auto; }

.switch { position: relative; width: 42px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #cfd4dc; border-radius: 22px; cursor: pointer; transition: .3s; }
.switch .slider::before { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .3s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.chart-box { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 10px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.chart-bar { width: 100%; max-width: 42px; background: linear-gradient(180deg, var(--primary-light), var(--primary)); border-radius: 6px 6px 0 0; min-height: 4px; transition: height .5s; }
.chart-col span { font-size: 12px; color: var(--muted-2); }
.chart-col b { font-size: 12px; color: var(--primary); }

.login-admin { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f2430 0%, #0052D9 100%); padding: 20px; }
.login-admin .box { background: #fff; border-radius: 16px; padding: 40px 36px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.login-admin h2 { font-size: 22px; text-align: center; margin-bottom: 4px; }
.login-admin .sub { text-align: center; color: var(--muted-2); font-size: 13px; margin-bottom: 26px; }

.recent-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.recent-list li:last-child { border-bottom: none; }
.recent-list .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.recent-list .txt { flex: 1; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list .tm { font-size: 12px; color: var(--muted-3); flex-shrink: 0; }

/* ===================== 响应式 ===================== */
@media (max-width: 992px) {
    .detail-layout { grid-template-columns: 1fr; }
    .toc { position: static; }
    .admin-side { width: 64px; }
    .admin-side .brand b, .admin-side .brand small, .admin-nav a span.txt, .admin-nav .nav-group { display: none; }
    .admin-nav a { justify-content: center; }
    .admin-main { margin-left: 64px; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-search { display: none; }
    .banner h1 { font-size: 28px; }
    .banner p { font-size: 16px; }
    .section-title { font-size: 22px; }
    .section { padding: 40px 20px; }
    .card-grid { grid-template-columns: 1fr; }
    .qa-grid { grid-template-columns: 1fr; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .list-item { flex-direction: column; }
    .list-action { flex-direction: row; }
    .info-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .detail-hero { flex-direction: column; }
    .profile-stats { margin-left: 0; gap: 20px; }
    .admin-content { padding: 14px; }
}
