/* 前台样式 css/style.css */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #2b3440;
  background: #f4f6fa;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: #3b7cff; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* 按钮 */
.btn {
  display: inline-block; padding: 9px 18px; border-radius: 8px; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; line-height: 1.4; text-align: center;
  background: #eef1f7; color: #3b4757; transition: all .18s;
}
.btn:hover { opacity: .9; }
.btn-primary { background: #3b7cff; color: #fff; }
.btn-primary:hover { background: #2f6ae6; opacity: 1; }
.btn-line { background: #fff; border-color: #d4dbe8; color: #3b4757; }
.btn-line:hover { border-color: #3b7cff; color: #3b7cff; opacity: 1; }
.btn-ghost { background: rgba(59,124,255,.1); color: #3b7cff; }
.btn-ghost:hover { background: rgba(59,124,255,.18); opacity: 1; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* 顶部 */
.site-header { background: #fff; border-bottom: 1px solid #eaeef5; }
.header-inner { height: 62px; display: flex; align-items: center; gap: 14px; }
.logo { font-size: 18px; font-weight: 700; color: #1d2530; }
.header-brand { color: #8892a6; font-size: 15px; padding-left: 14px; border-left: 1px solid #e2e8f0; }

/* 首页 */
.home-hero { background: linear-gradient(135deg, #3b7cff, #6aa3ff); color: #fff; padding: 56px 0 64px; }
.home-hero h1 { margin: 0 0 10px; font-size: 30px; }
.home-hero p { margin: 0; opacity: .92; font-size: 15px; }
.section-title { font-size: 18px; margin: 34px 0 18px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding-bottom: 40px; }
.brand-card { background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 6px 20px rgba(28,45,80,.06); transition: transform .2s, box-shadow .2s; }
.brand-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(28,45,80,.12); }
.brand-card-top { height: 64px; display: flex; align-items: center; margin-bottom: 14px; }
.brand-card-top img { max-height: 64px; }
.brand-logo-ph { width: 60px; height: 60px; border-radius: 14px; background: #eaf1ff; color: #3b7cff; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; }
.brand-card h3 { margin: 0 0 8px; font-size: 18px; }
.brand-intro { color: #8892a6; font-size: 14px; margin: 0 0 14px; min-height: 22px; }
.brand-count { font-size: 13px; color: #5a6473; margin-bottom: 16px; }
.brand-card-actions { display: flex; gap: 10px; align-items: center; }

/* 品牌页 */
.brand-hero { background: #fff; border-bottom: 1px solid #eaeef5; padding: 30px 0; }
.hero-inner { display: flex; align-items: center; gap: 20px; }
.hero-logo { max-height: 72px; max-width: 200px; }
.hero-logo.placeholder { width: 68px; height: 68px; border-radius: 16px; background: #eaf1ff; color: #3b7cff; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.hero-text { flex: 1; }
.hero-text h1 { margin: 0 0 6px; font-size: 24px; }
.hero-intro { margin: 0; color: #8892a6; font-size: 14px; }
.doc-wrap { padding: 30px 20px 50px; }
.doc-list { display: flex; flex-direction: column; gap: 14px; }
.doc-card { background: #fff; border-radius: 12px; padding: 18px 22px; display: flex; align-items: center; gap: 18px; box-shadow: 0 4px 14px rgba(28,45,80,.05); }
.doc-icon { width: 46px; height: 46px; border-radius: 10px; background: #fdecec; color: #e2483d; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-main { flex: 1; min-width: 0; }
.doc-title { margin: 0 0 6px; font-size: 16px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 16px; color: #8892a6; font-size: 13px; }
.doc-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* 空状态 */
.empty-wrap { padding: 60px 20px; }
.empty { background: #fff; border-radius: 14px; padding: 50px 20px; text-align: center; color: #8892a6; }
.empty h2 { color: #2b3440; margin: 0 0 8px; font-size: 18px; }

/* 页脚 */
.site-footer { border-top: 1px solid #eaeef5; background: #fff; padding: 22px 0; color: #96a0b5; font-size: 13px; text-align: center; }

/* 二维码弹层 */
.modal { display: none; position: fixed; inset: 0; background: rgba(20,28,42,.55); z-index: 99; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: #fff; border-radius: 16px; padding: 26px; width: 320px; max-width: 100%; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-box h3 { margin: 0 0 16px; font-size: 16px; }
.qr-box { display: flex; justify-content: center; padding: 10px; min-height: 240px; align-items: center; }
.qr-url { font-size: 12px; color: #96a0b5; word-break: break-all; margin: 12px 0; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }

/* 在线查看页 */
.page-view { background: #525659; }
.view-bar { background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; flex-wrap: wrap; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.view-bar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.view-back { color: #3b7cff; font-size: 14px; white-space: nowrap; }
.view-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.view-bar-right { display: flex; align-items: center; gap: 10px; }
.view-meta { color: #8892a6; font-size: 13px; }
.view-frame { height: calc(100vh - 58px); }
.view-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 720px) {
  .doc-card { flex-wrap: wrap; }
  .doc-actions { width: 100%; }
  .doc-actions .btn { flex: 1; }
  .hero-inner { flex-wrap: wrap; }
  .view-title { max-width: 100%; }
  .view-bar { padding: 10px 12px; }
}
