/* ===================================================
   assets/style.css  -  分类信息站全站样式
   =================================================== */

/* ---------- 基础重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    background: #f5f6f8;
}
a { color: #2b6cb0; text-decoration: none; }
a:hover { color: #1a4e8a; }
img { max-width: 100%; vertical-align: middle; }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; font-size: 14px; outline: none; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部导航 ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    display: flex; align-items: center; gap: 20px;
    height: 64px;
}
.logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 20px; font-weight: 700; color: #1a4e8a; white-space: nowrap;
}
.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: linear-gradient(135deg, #2b6cb0, #4299e1);
    color: #fff; font-size: 15px; font-weight: 800; letter-spacing: 1px;
}
.search-box { flex: 1; display: flex; max-width: 460px; }
.search-box input {
    flex: 1; height: 38px; padding: 0 14px;
    border: 2px solid #2b6cb0; border-right: none;
    border-radius: 6px 0 0 6px;
}
.search-box button {
    height: 38px; padding: 0 22px; border: none; cursor: pointer;
    background: #2b6cb0; color: #fff; border-radius: 0 6px 6px 0;
    transition: background .2s;
}
.search-box button:hover { background: #1a4e8a; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a {
    padding: 8px 12px; border-radius: 6px; color: #444; white-space: nowrap;
    transition: all .2s;
}
.main-nav a:hover { background: #eef4fc; color: #2b6cb0; }
.main-nav .btn-nav {
    background: #2b6cb0; color: #fff; padding: 8px 18px;
}
.main-nav .btn-nav:hover { background: #1a4e8a; color: #fff; }

.cat-bar { background: #fafbfc; border-top: 1px solid #f0f0f0; }
.cat-bar .container { display: flex; gap: 6px; height: 42px; align-items: center; flex-wrap: wrap; }
.cat-bar a {
    padding: 4px 14px; border-radius: 14px; color: #555; font-size: 13px;
}
.cat-bar a:hover { background: #eef4fc; color: #2b6cb0; }

/* ---------- 主区域 ---------- */
.main { min-height: 60vh; padding: 24px 16px 48px; }

/* ---------- 提示条 ---------- */
.alert {
    padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px;
    border-left: 4px solid;
}
.alert-success { background: #f0fff4; border-color: #38a169; color: #276749; }
.alert-error   { background: #fff5f5; border-color: #e53e3e; color: #9b2c2c; }
.alert-warn    { background: #fffaf0; border-color: #dd6b20; color: #9c4221; }

/* ---------- 首页 Hero ---------- */
.hero {
    background: linear-gradient(135deg, #2b6cb0, #4299e1);
    color: #fff; border-radius: 12px; padding: 48px 32px;
    text-align: center; margin-bottom: 28px;
}
.hero h1 { font-size: 30px; margin-bottom: 12px; letter-spacing: 1px; }
.hero p  { font-size: 15px; opacity: .92; margin-bottom: 24px; }

/* ---------- 按钮 ---------- */
.btn-primary {
    display: inline-block; padding: 10px 26px; border: none; cursor: pointer;
    background: #2b6cb0; color: #fff; border-radius: 6px; font-size: 15px;
    transition: background .2s, transform .1s;
}
.btn-primary:hover { background: #1a4e8a; color: #fff; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: #cbd5e0; cursor: not-allowed; }
.btn-block { display: block; width: 100%; text-align: center; }

.btn-danger { background: #e53e3e; }
.btn-danger:hover { background: #c53030; }
.btn-plain { background: #e2e8f0; color: #444; }
.btn-plain:hover { background: #cbd5e0; color: #333; }

.btn-mini {
    display: inline-block; padding: 3px 10px; border-radius: 4px;
    background: #eef4fc; color: #2b6cb0; font-size: 12px; border: none;
    cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-mini:hover { background: #d6e6fa; color: #1a4e8a; }
.btn-danger-mini { background: #fff5f5; color: #e53e3e; }
.btn-danger-mini:hover { background: #fed7d7; color: #c53030; }

/* ---------- 分类卡片 ---------- */
.cat-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px; margin-bottom: 32px;
}
.cat-card {
    background: #fff; border-radius: 10px; padding: 22px 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05); transition: all .2s;
    border: 1px solid #edf2f7;
}
.cat-card:hover {
    transform: translateY(-3px); box-shadow: 0 6px 18px rgba(43,108,176,.14);
    border-color: #bee3f8;
}
.cat-card h3 { font-size: 17px; color: #1a4e8a; margin-bottom: 6px; }
.cat-card span { font-size: 13px; color: #888; }

/* ---------- 区块 ---------- */
.block { background: #fff; border-radius: 10px; padding: 20px 24px; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.block-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0;
}
.block-head h2 { font-size: 18px; color: #1a4e8a; }
.block-head a  { font-size: 13px; }

/* ---------- 信息列表 ---------- */
.post-list { background: #fff; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.05); overflow: hidden; }
.post-list li {
    padding: 16px 24px; border-bottom: 1px solid #f2f4f7;
    transition: background .15s;
}
.post-list li:last-child { border-bottom: none; }
.post-list li:hover { background: #fafcff; }
.post-list .empty { text-align: center; color: #999; padding: 40px 0; }
.post-title { font-size: 16px; font-weight: 600; color: #1a4e8a; display: inline-block; }
.post-title:hover { color: #2b6cb0; text-decoration: underline; }
.post-desc { font-size: 13px; color: #777; margin: 4px 0 6px; }
.post-meta { font-size: 12px; color: #999; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.post-meta em {
    font-style: normal; background: #eef4fc; color: #2b6cb0;
    padding: 1px 8px; border-radius: 10px; font-size: 12px;
}

/* ---------- 筛选 & 分页 ---------- */
.filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    background: #fff; padding: 12px 16px; border-radius: 8px;
    margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.filter-bar a {
    padding: 4px 14px; border-radius: 14px; font-size: 13px; color: #555;
}
.filter-bar a:hover { background: #eef4fc; color: #2b6cb0; }
.filter-bar a.active { background: #2b6cb0; color: #fff; }
.filter-bar input, .filter-bar select {
    height: 34px; padding: 0 10px; border: 1px solid #dcdfe6;
    border-radius: 6px; background: #fff;
}
.filter-bar button {
    height: 34px; padding: 0 18px; border: none; border-radius: 6px;
    background: #2b6cb0; color: #fff; cursor: pointer;
}
.filter-bar button:hover { background: #1a4e8a; }

.result-tip { color: #666; margin-bottom: 12px; font-size: 13px; }
.result-tip b { color: #e53e3e; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pager a {
    min-width: 34px; height: 34px; line-height: 34px; text-align: center;
    padding: 0 8px; border: 1px solid #e2e8f0; border-radius: 6px;
    background: #fff; color: #555;
}
.pager a:hover { border-color: #2b6cb0; color: #2b6cb0; }
.pager a.active { background: #2b6cb0; border-color: #2b6cb0; color: #fff; }

/* ---------- 详情页 ---------- */
.detail {
    background: #fff; border-radius: 10px; padding: 28px 32px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.detail h1 { font-size: 24px; color: #1a2b47; margin-bottom: 14px; line-height: 1.4; }
.detail-meta {
    display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
    font-size: 13px; color: #888; padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0; margin-bottom: 20px;
}
.detail-meta .tag {
    background: #eef4fc; color: #2b6cb0; padding: 2px 12px;
    border-radius: 12px; font-size: 12px;
}
.detail-content {
    font-size: 15px; line-height: 2; color: #333; margin-bottom: 28px;
    word-break: break-word;
}

.contact-box {
    background: #f7fafd; border: 1px solid #d6e6fa; border-radius: 10px;
    padding: 20px 24px;
}
.contact-box h3 { font-size: 15px; color: #1a4e8a; margin-bottom: 12px; }
.contact-box p { margin-bottom: 8px; font-size: 14px; }
.contact-box label { color: #888; display: inline-block; min-width: 70px; }
.contact-box .phone { color: #e53e3e; font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.contact-box .tip { font-size: 12px; color: #a0aec0; margin-top: 10px; }

/* ---------- 表单卡片 ---------- */
.form-card {
    background: #fff; border-radius: 10px; padding: 32px 36px;
    max-width: 460px; margin: 32px auto; box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.form-card.wide { max-width: 720px; }
.form-card h2 { font-size: 20px; color: #1a2b47; margin-bottom: 22px; text-align: center; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: #555; font-weight: 500; }
.field label .req { color: #e53e3e; }
.field input[type=text], .field input[type=password], .field input[type=number],
.field select, .field textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #dcdfe6;
    border-radius: 6px; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: #2b6cb0; box-shadow: 0 0 0 3px rgba(43,108,176,.12);
}
.field small { display: block; color: #999; font-size: 12px; margin-top: 4px; }

.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }

.checkbox {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #666; margin: 14px 0 20px; cursor: pointer;
}
.checkbox input { width: 15px; height: 15px; }

.form-foot { text-align: center; font-size: 13px; color: #888; margin-top: 18px; }

/* ---------- 个人中心布局 ---------- */
.user-layout { display: flex; gap: 20px; align-items: flex-start; }
.user-side {
    width: 190px; flex-shrink: 0; background: #fff; border-radius: 10px;
    padding: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.05); position: sticky; top: 84px;
}
.user-side a {
    display: block; padding: 10px 14px; border-radius: 6px;
    color: #555; font-size: 14px; transition: all .15s;
}
.user-side a:hover { background: #eef4fc; color: #2b6cb0; }
.user-body { flex: 1; background: #fff; border-radius: 10px; padding: 24px 28px; box-shadow: 0 1px 6px rgba(0,0,0,.05); min-width: 0; }
.user-body h2 { font-size: 19px; color: #1a2b47; margin-bottom: 20px; }

/* ---------- 信息网格 & 统计 ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; margin-bottom: 24px; }
.info-item {
    display: flex; justify-content: space-between; padding: 10px 0;
    border-bottom: 1px dashed #eef1f5; font-size: 14px;
}
.info-item label { color: #888; }
.info-item span { color: #333; font-weight: 500; }

.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.stat {
    flex: 1; min-width: 120px; text-align: center; background: #f7fafd;
    border: 1px solid #e6eef8; border-radius: 8px; padding: 16px 10px;
}
.stat b { display: block; font-size: 24px; color: #2b6cb0; margin-bottom: 4px; }
.stat span { font-size: 13px; color: #888; }

.sub-title { font-size: 16px; color: #1a2b47; margin: 26px 0 14px; padding-left: 10px; border-left: 3px solid #2b6cb0; }

/* ---------- 表格 ---------- */
.table {
    width: 100%; border-collapse: collapse; background: #fff;
    border-radius: 8px; overflow: hidden; font-size: 13px;
}
.table thead th {
    background: #f5f8fc; color: #555; font-weight: 600;
    padding: 11px 12px; text-align: left; white-space: nowrap;
    border-bottom: 1px solid #e8eef5;
}
.table tbody td { padding: 11px 12px; border-bottom: 1px solid #f2f4f7; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafcff; }
.table .empty { text-align: center; color: #999; padding: 30px 0; }

/* ---------- 套餐卡片 ---------- */
.pkg-list { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }
.pkg-card {
    flex: 1; min-width: 220px; background: #fff; border: 2px solid #e8eef5;
    border-radius: 12px; padding: 24px 20px; text-align: center;
    position: relative; transition: all .2s;
}
.pkg-card:hover { border-color: #bee3f8; box-shadow: 0 6px 20px rgba(43,108,176,.12); transform: translateY(-3px); }
.pkg-card.current { border-color: #2b6cb0; background: #f7fafd; }
.pkg-card h3 { font-size: 17px; color: #1a4e8a; margin-bottom: 12px; }
.pkg-card .price { color: #e53e3e; margin-bottom: 16px; }
.pkg-card .price em { font-size: 16px; font-style: normal; }
.pkg-card .price { font-size: 34px; font-weight: 800; }
.pkg-card .price span { font-size: 13px; color: #999; font-weight: 400; margin-left: 2px; }
.pkg-card ul { text-align: left; margin: 0 auto 18px; max-width: 200px; }
.pkg-card ul li { font-size: 13px; color: #666; padding: 5px 0 5px 20px; position: relative; }
.pkg-card ul li::before { content: "✓"; position: absolute; left: 0; color: #38a169; font-weight: 700; }
.pkg-current {
    position: absolute; top: -1px; right: -1px;
    background: #2b6cb0; color: #fff; font-size: 12px;
    padding: 3px 10px; border-radius: 0 10px 0 10px;
}

.quota-bar {
    background: #f7fafd; border: 1px solid #d6e6fa; border-radius: 8px;
    padding: 12px 16px; margin-bottom: 20px; font-size: 14px; color: #555;
}
.quota-bar b { color: #e53e3e; }

/* ---------- 徽章 ---------- */
.badge {
    display: inline-block; padding: 2px 10px; border-radius: 10px;
    font-size: 12px; line-height: 1.6;
}
.badge-0 { background: #fffaf0; color: #dd6b20; }
.badge-1 { background: #f0fff4; color: #38a169; }
.badge-2 { background: #fff5f5; color: #e53e3e; }
.badge-3 { background: #fff5f5; color: #c53030; }

/* ---------- 协议文档 ---------- */
.doc { background: #fff; border-radius: 10px; padding: 32px 40px; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.doc h1 { font-size: 22px; color: #1a2b47; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid #f0f0f0; }
.doc-body { font-size: 15px; line-height: 2; color: #444; }
.doc-body p { margin-bottom: 14px; }

/* ---------- 弹窗 ---------- */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 999; padding: 20px;
}
.modal-box {
    background: #fff; border-radius: 12px; padding: 26px 30px;
    width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-box.modal-wide { max-width: 720px; }
.modal-box h3 { font-size: 18px; color: #1a2b47; margin-bottom: 16px; }
.modal-box p { margin-bottom: 8px; font-size: 14px; }
.modal-content {
    background: #f7f8fa; border-radius: 8px; padding: 14px 16px;
    font-size: 14px; line-height: 1.9; color: #444;
    max-height: 320px; overflow-y: auto; margin-bottom: 16px;
    white-space: pre-wrap; word-break: break-word;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal-actions button { padding: 8px 22px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; }

.idcard-imgs { display: flex; gap: 16px; margin: 14px 0; }
.idcard-imgs figure { flex: 1; text-align: center; }
.idcard-imgs img { border-radius: 6px; border: 1px solid #e2e8f0; max-height: 160px; }
.idcard-imgs figcaption { font-size: 12px; color: #999; margin-top: 6px; }

/* ---------- 页脚 ---------- */
.site-footer {
    background: #1a2b47; color: #a8b6cc; padding: 30px 0 24px;
    margin-top: 40px; font-size: 13px; text-align: center;
}
.footer-links {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 6px 18px; margin-bottom: 16px;
}
.footer-links a { color: #cdd9ea; font-size: 13px; }
.footer-links a:hover { color: #fff; }
.site-footer p { margin-bottom: 6px; line-height: 1.8; }
.site-footer .copyright { color: #7b8aa3; margin-top: 10px; }

/* ===================================================
   后台管理
   =================================================== */
body.admin { background: #eef1f5; }
.admin-header {
    background: #1a2b47; color: #fff; height: 56px;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.admin-header-inner { display: flex; align-items: center; height: 56px; gap: 24px; }
.admin-logo { font-size: 16px; font-weight: 700; color: #fff; white-space: nowrap; }
.admin-header nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.admin-header nav a {
    padding: 6px 14px; border-radius: 6px; color: #cdd9ea; font-size: 13px;
}
.admin-header nav a:hover { background: rgba(255,255,255,.12); color: #fff; }

.admin-main { padding: 24px 16px 48px; min-height: 70vh; }
.admin-main h2 { font-size: 20px; color: #1a2b47; margin-bottom: 20px; }

.admin-login {
    background: linear-gradient(135deg, #2b6cb0, #1a2b47);
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.admin-login .form-card { margin: 0; }

.ops { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .user-layout { flex-direction: column; }
    .user-side { width: 100%; position: static; display: flex; flex-wrap: wrap; }
    .user-side a { flex: 0 0 auto; }
}
@media (max-width: 768px) {
    .header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 10px; }
    .search-box { order: 3; flex: 1 1 100%; max-width: none; }
    .main-nav { margin-left: 0; flex-wrap: wrap; }
    .main-nav a { padding: 6px 8px; font-size: 13px; }
    .hero { padding: 32px 20px; }
    .hero h1 { font-size: 22px; }
    .detail { padding: 20px; }
    .detail h1 { font-size: 19px; }
    .form-card { padding: 24px 20px; margin: 16px auto; }
    .field-row { flex-direction: column; gap: 0; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
    .admin-header-inner { flex-wrap: wrap; height: auto; padding: 8px 0; }
    .admin-header nav { margin-left: 0; }
}