/* ===== 语信IDC财务管理系统 - 用户端样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; background: #f5f7fa; color: #333; }
a { text-decoration: none; color: #2563eb; }
.clearfix::after { content: ""; display: block; clear: both; }
.container { width: 1100px; margin: 0 auto; }

/* 顶部导航 */
.topbar { background: #1e293b; color: #fff; padding: 14px 0; }
.topbar .brand { font-size: 18px; font-weight: 700; float: left; color: #fff; }
.topbar .nav { float: right; }
.topbar .nav a { color: #cbd5e1; margin-left: 20px; }
.topbar .nav a:hover { color: #fff; }

/* Hero */
.hero { text-align: center; padding: 70px 20px 50px; background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff; border-radius: 10px; margin-top: 20px; margin-bottom: 30px; }
.hero h1 { font-size: 34px; margin-bottom: 12px; }
.hero p { color: #dbeafe; margin-bottom: 8px; }
.hero .btn { margin: 0 6px; }

/* 按钮 */
.btn { display: inline-block; padding: 8px 22px; background: #2563eb; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn:hover { background: #1d4ed8; }
.btn-outline { background: transparent; border: 1px solid #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 12px 40px; font-size: 16px; }

/* 通知 */
.notice { background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; padding: 10px 16px; border-radius: 8px; margin: 16px 0; }

/* 分类卡片 */
.section-title { font-size: 20px; font-weight: 700; margin: 30px 0 16px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: #fff; border-radius: 10px; padding: 24px; border: 1px solid #e5e7eb; color: #333; transition: all .2s; }
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); transform: translateY(-2px); border-color: #2563eb; }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card-desc { color: #6b7280; font-size: 13px; }

/* 认证表单 */
.auth-wrap { display: flex; justify-content: center; padding: 50px 0; }
.auth-box { background: #fff; padding: 36px; border-radius: 12px; width: 420px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.auth-box h2 { text-align: center; margin-bottom: 24px; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; margin-bottom: 6px; font-size: 14px; color: #4b5563; }
.form-item input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.form-item input:focus { outline: none; border-color: #2563eb; }
.form-links { display: flex; justify-content: space-between; font-size: 13px; margin-top: 8px; }

/* 提示 */
.tip { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.tip.success { background: #ecfdf5; border: 1px solid #10b981; color: #065f46; }
.tip.error { background: #fef2f2; border: 1px solid #ef4444; color: #991b1b; }

/* 用户中心 */
.sidebar { float: left; width: 200px; background: #fff; border-radius: 10px; padding: 16px 0; margin-top: 20px; }
.sidebar-user { text-align: center; padding: 8px 0 16px; border-bottom: 1px solid #f0f0f0; margin-bottom: 8px; }
.sidebar-user .avatar { width: 52px; height: 52px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 24px; line-height: 52px; margin: 0 auto 8px; }
.sidebar a { display: block; padding: 11px 20px; color: #374151; font-size: 14px; }
.sidebar a:hover { background: #f3f4f6; color: #2563eb; }
.sidebar a.active { background: #eff6ff; color: #2563eb; border-left: 3px solid #2563eb; }
.main { float: right; width: 870px; margin-top: 20px; }
.main h3 { margin-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 10px; padding: 22px; border: 1px solid #e5e7eb; }
.stat-num { font-size: 26px; font-weight: 700; color: #2563eb; }
.stat-label { color: #6b7280; margin-top: 6px; font-size: 13px; }
.panel { background: #fff; border-radius: 10px; border: 1px solid #e5e7eb; margin-bottom: 20px; }
.panel-title { padding: 14px 20px; border-bottom: 1px solid #f0f0f0; font-weight: 700; }
.panel-body { padding: 20px; }
.panel-body .btn { margin-right: 10px; margin-top: 10px; }

/* 页脚 */
.footer { text-align: center; color: #9ca3af; padding: 30px 0; font-size: 13px; }

/* ===== 产品中心 ===== */
.page-head { text-align: center; padding: 40px 0 20px; }
.page-head h2 { font-size: 28px; color: #111827; }
.page-head p { color: #6b7280; margin-top: 8px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; background: #fff; transition: box-shadow .2s; }
.product-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.product-name { font-size: 16px; font-weight: bold; color: #111827; margin-bottom: 8px; }
.rec-tag { display: inline-block; background: #fee2e2; color: #dc2626; font-size: 12px; padding: 1px 8px; border-radius: 10px; margin-left: 6px; font-weight: normal; }
.product-desc { color: #6b7280; font-size: 13px; min-height: 40px; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-size: 22px; font-weight: bold; color: #dc2626; margin-bottom: 14px; }
.price-unit { font-size: 12px; color: #9ca3af; font-weight: normal; margin-left: 4px; }
.empty-tip { color: #9ca3af; padding: 20px 0; }

/* ===== 产品详情页 ===== */
.detail-box { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; margin-top: 20px; overflow: hidden; }
.detail-head { padding: 28px 32px; background: linear-gradient(135deg, #f8fafc, #f1f5f9); border-bottom: 1px solid #e5e7eb; }
.detail-head h2 { font-size: 26px; color: #111827; margin-bottom: 10px; }
.detail-head p { color: #6b7280; font-size: 14px; line-height: 1.6; }

.panel-section { padding: 24px 32px; border-bottom: 1px solid #f0f0f0; margin: 0; }
.panel-section:last-child { border-bottom: none; }
.panel-section .section-title { font-size: 18px; color: #111827; margin-bottom: 18px; padding-left: 10px; border-left: 4px solid #2563eb; }

.config-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.config-item { display: flex; padding: 10px 14px; background: #f9fafb; border-radius: 8px; }
.config-key { color: #6b7280; font-size: 14px; min-width: 100px; }
.config-val { color: #111827; font-size: 14px; font-weight: 500; flex: 1; }

.period-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.period-item { display: flex; flex-direction: column; padding: 16px; border: 2px solid #e5e7eb; border-radius: 10px; cursor: pointer; transition: all .2s; position: relative; }
.period-item:hover { border-color: #93c5fd; background: #f8fafc; }
.period-item input[type="radio"] { position: absolute; opacity: 0; }
.period-item:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.period-name { font-size: 15px; font-weight: 600; color: #111827; margin-bottom: 6px; }
.period-price { font-size: 22px; font-weight: 700; color: #dc2626; }
.period-setup { font-size: 12px; color: #f59e0b; margin-top: 4px; }

.buy-tip { color: #6b7280; font-size: 13px; margin-top: 12px; }

/* ===== 首页优化 ===== */
.news-list { list-style: none; }
.news-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.news-list li:last-child { border-bottom: none; }
.news-list a { color: #374151; font-size: 14px; }
.news-list a:hover { color: #2563eb; }
.news-time { color: #9ca3af; font-size: 13px; }
.news-more { text-align: right; padding-top: 10px; }
.news-more a { color: #2563eb; font-size: 14px; }

/* ===== 文章中心 ===== */
.category-tabs { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.category-tab { padding: 8px 20px; background: #fff; border: 1px solid #e5e7eb; border-radius: 20px; color: #6b7280; font-size: 14px; transition: all .2s; }
.category-tab:hover { border-color: #2563eb; color: #2563eb; }
.category-tab.active { background: #2563eb; border-color: #2563eb; color: #fff; }

.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; transition: all .2s; }
.article-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); border-color: #93c5fd; }
.article-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.article-category { display: inline-block; padding: 3px 12px; background: #eff6ff; color: #2563eb; border-radius: 12px; font-size: 12px; }
.article-date { color: #9ca3af; font-size: 13px; }
.article-title { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.article-title a { color: #111827; }
.article-title a:hover { color: #2563eb; }
.article-summary { color: #6b7280; font-size: 14px; line-height: 1.7; margin-bottom: 14px; }
.article-card-footer { border-top: 1px solid #f0f0f0; padding-top: 14px; }
.read-more { color: #2563eb; font-size: 14px; }
.read-more:hover { text-decoration: underline; }

.empty-state { text-align: center; padding: 60px 0; color: #9ca3af; }

.pager { text-align: center; margin-top: 30px; }
.pager a, .pager span { display: inline-block; padding: 6px 14px; margin: 0 4px; border: 1px solid #e5e7eb; border-radius: 6px; color: #374151; font-size: 14px; }
.pager a:hover { border-color: #2563eb; color: #2563eb; }
.pager .current { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ===== 文章详情页 ===== */
.article-detail-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 40px; margin-top: 20px; }
.article-detail-header { text-align: center; margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid #f0f0f0; }
.article-detail-title { font-size: 28px; font-weight: 700; color: #111827; margin: 16px 0; line-height: 1.4; }
.article-detail-meta { display: flex; justify-content: center; gap: 30px; color: #9ca3af; font-size: 14px; }
.article-detail-content { font-size: 16px; line-height: 1.9; color: #374151; }
.article-detail-content p { margin-bottom: 16px; }
.article-detail-content h1, .article-detail-content h2, .article-detail-content h3 { margin: 24px 0 16px; }
.article-detail-content img { max-width: 100%; border-radius: 8px; margin: 16px 0; }
.article-detail-content pre { background: #f9fafb; padding: 16px; border-radius: 8px; overflow-x: auto; margin: 16px 0; }
.article-detail-content code { background: #f9fafb; padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article-detail-content blockquote { border-left: 4px solid #2563eb; padding-left: 16px; color: #6b7280; margin: 16px 0; }

.article-detail-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid #f0f0f0; }
.article-nav { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.article-nav-prev, .article-nav-next { color: #374151; font-size: 14px; max-width: 45%; }
.article-nav-prev:hover, .article-nav-next:hover { color: #2563eb; }
.back-to-list { text-align: center; }
.back-to-list a { color: #6b7280; font-size: 14px; }
.back-to-list a:hover { color: #2563eb; }

/* ===== 相关文章 ===== */
.related-articles { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-top: 20px; }
.related-title { font-size: 18px; font-weight: 600; color: #111827; margin-bottom: 16px; padding-left: 10px; border-left: 4px solid #2563eb; }
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.related-item:last-child { border-bottom: none; }
.related-item a { color: #374151; font-size: 14px; flex: 1; }
.related-item a:hover { color: #2563eb; }
.related-date { color: #9ca3af; font-size: 13px; margin-left: 16px; }

/* ===== 文章中心左右布局 ===== */
.article-layout { display: flex; gap: 24px; align-items: flex-start; }
.article-sidebar { width: 240px; flex-shrink: 0; position: sticky; top: 20px; }
.article-main { flex: 1; min-width: 0; }

.sidebar-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; }
.sidebar-title { font-size: 16px; font-weight: 600; color: #111827; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #2563eb; }

.category-nav { list-style: none; padding: 0; margin: 0; }
.category-item { margin-bottom: 4px; }
.category-item > a { display: block; padding: 8px 12px; color: #374151; font-size: 14px; border-radius: 6px; transition: all .2s; }
.category-item > a:hover { background: #eff6ff; color: #2563eb; }
.category-item.active > a { background: #2563eb; color: #fff; }

.category-subnav { list-style: none; padding: 0; margin: 4px 0 4px 12px; border-left: 2px solid #e5e7eb; padding-left: 8px; }
.category-subitem { margin-bottom: 2px; }
.category-subitem > a { display: block; padding: 6px 10px; color: #6b7280; font-size: 13px; border-radius: 4px; transition: all .2s; }
.category-subitem > a:hover { background: #f3f4f6; color: #2563eb; }
.category-subitem.active > a { background: #dbeafe; color: #2563eb; font-weight: 500; }

.current-category-info { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px 24px; margin-bottom: 20px; }
.current-category-info h3 { font-size: 20px; font-weight: 600; color: #111827; margin: 0 0 8px; }
.current-category-info p { color: #6b7280; font-size: 14px; margin: 0; }

.empty-state { text-align: center; padding: 60px 0; color: #9ca3af; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
.empty-state p { margin-bottom: 16px; }
.empty-state .btn { display: inline-block; padding: 8px 20px; background: #2563eb; color: #fff; border-radius: 6px; font-size: 14px; }
.empty-state .btn:hover { background: #1d4ed8; }

/* 响应式 */
@media (max-width: 768px) {
  .article-layout { flex-direction: column; }
  .article-sidebar { width: 100%; position: static; }
}

/* ===== 新版用户中心侧边栏样式 ===== */
.user-container { display: flex; gap: 24px; padding: 24px 0; }
.user-sidebar { width: 220px; flex-shrink: 0; }
.user-main { flex: 1; min-width: 0; }
.user-info-card { background: #fff; border-radius: 12px; padding: 24px; text-align: center; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.user-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: bold; margin: 0 auto 12px; }
.user-name { font-size: 18px; font-weight: 600; color: #1e293b; margin-bottom: 8px; }
.user-balance { font-size: 14px; color: #64748b; }
.user-menu { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.user-menu a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; color: #475569; text-decoration: none; font-size: 14px; transition: all 0.2s; }
.user-menu a:hover { background: #f1f5f9; color: #667eea; }
.user-menu a.active { background: #eef2ff; color: #667eea; font-weight: 600; }
