/* ============================================================
   应用软件销售团队裂变系统 - 全局样式
   ============================================================ */

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

:root {
  --bg:       #0a0e1a;
  --bg2:      #111827;
  --bg3:      #1e293b;
  --card:     rgba(255,255,255,0.04);
  --border:   rgba(255,255,255,0.08);
  --accent:   #6366f1;
  --accent2:  #8b5cf6;
  --accent3:  #06b6d4;
  --gold:     #f59e0b;
  --green:    #10b981;
  --red:      #ef4444;
  --text:     #f1f5f9;
  --muted:    #94a3b8;
  --dim:      #64748b;
  --r:        10px;
  --sidebar-w: 220px;
  --nav-h:     60px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'PingFang SC','Microsoft YaHei',-apple-system,BlinkMacSystemFont,sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }
code { background: rgba(99,102,241,.15); color: #a5b4fc; padding: 2px 8px; border-radius: 4px; font-size: .9em; }

/* ─── 顶部导航 ──────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--nav-h);
  background: rgba(10,14,26,.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(180%);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 24px;
}
.nav-logo { font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.nav-logo span { color: #a5b4fc; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  padding: 6px 14px; border-radius: 6px; font-size: 14px; color: var(--muted);
  transition: color .15s, background .15s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.nav-active { color: var(--text); background: rgba(255,255,255,.07); }
#nav-user-area { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nav-btn { background: var(--accent); color: #fff; border: none; padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .2s; }
.nav-btn:hover { opacity: .85; }
.nav-btn-outline { background: transparent; color: var(--muted); border: 1px solid var(--border); padding: 6px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: border-color .2s, color .2s; }
.nav-btn-outline:hover { border-color: var(--accent); color: var(--text); }

/* ─── 主内容区 ──────────────────────────────────────────── */
#app-content { padding-top: var(--nav-h); min-height: 100vh; }

/* ─── 容器 ──────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ─── Hero 区 ────────────────────────────────────────────── */
.hero-section {
  position: relative; overflow: hidden;
  min-height: 80vh; display: flex; align-items: center;
  padding: 80px 0 60px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(99,102,241,.25) 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 80% 100%, rgba(139,92,246,.15) 0%, transparent 60%),
              linear-gradient(180deg, var(--bg) 0%, #0f172a 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 30%, transparent 80%);
}
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-badge { display: inline-block; background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.3); border-radius: 100px; padding: 6px 16px; font-size: 13px; color: #a5b4fc; margin-bottom: 24px; }
.hero-title { font-size: clamp(2rem,5vw,3.2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 16px; }
.gradient-text { background: linear-gradient(135deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { font-size: 1.1rem; color: var(--muted); margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 1.4rem; font-weight: 700; color: #a5b4fc; }
.stat-label { font-size: 12px; color: var(--dim); }

.ref-banner { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); border-radius: 8px; padding: 10px 16px; font-size: 13px; color: #6ee7b7; margin-bottom: 20px; }

/* ─── Section ────────────────────────────────────────────── */
.section { padding: 60px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-label { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section-title { font-size: clamp(1.4rem,3vw,2rem); font-weight: 700; letter-spacing: -.01em; }
.section-desc { color: var(--muted); margin-top: 10px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 600; font-size: 14px;
  padding: 12px 28px; border-radius: 8px; border: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(99,102,241,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,.45); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); font-weight: 500; font-size: 14px;
  padding: 11px 24px; border-radius: 8px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 16px !important; font-size: 13px !important; }
.btn-copy { background: var(--accent); color: #fff; border: none; padding: 8px 14px; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap; }
.btn-copy:hover { background: var(--accent2); }
.btn-sms { background: transparent; border: 1px solid var(--accent); color: var(--accent); padding: 0 14px; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 13px; white-space: nowrap; transition: background .2s; }
.btn-sms:hover:not(:disabled) { background: rgba(99,102,241,.1); }
.btn-sms:disabled { opacity: .5; cursor: not-allowed; }

.action-btn { background: rgba(255,255,255,.07); color: var(--muted); border: 1px solid var(--border); padding: 4px 10px; border-radius: 5px; cursor: pointer; font-size: 12px; transition: all .15s; margin-right: 4px; }
.action-btn:hover { background: rgba(255,255,255,.12); color: var(--text); }
.action-success { border-color: rgba(16,185,129,.3); color: #6ee7b7; }
.action-success:hover { background: rgba(16,185,129,.1); }
.action-danger { border-color: rgba(239,68,68,.3); color: #fca5a5; }
.action-danger:hover { background: rgba(239,68,68,.1); }

/* ─── Products ────────────────────────────────────────────── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px; }
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); border-color: rgba(99,102,241,.3); box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.product-card-inner { padding: 20px; display: flex; gap: 16px; }
.product-icon { font-size: 36px; flex-shrink: 0; }
.product-info { flex: 1; min-width: 0; }
.product-category { font-size: 11px; color: var(--accent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.product-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.product-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-features { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.feature-tag { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 4px; padding: 2px 8px; font-size: 11px; color: var(--muted); }
.product-footer { display: flex; align-items: flex-end; justify-content: space-between; }
.price-current { font-size: 18px; font-weight: 800; color: var(--accent); }
.price-current small { font-size: 12px; font-weight: 400; }
.price-original { font-size: 12px; color: var(--dim); text-decoration: line-through; margin-left: 6px; }
.product-meta { font-size: 11px; color: var(--dim); display: flex; gap: 8px; }

/* ─── Category Tabs ──────────────────────────────────────── */
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tab { background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--muted); padding: 7px 16px; border-radius: 100px; font-size: 13px; cursor: pointer; transition: all .15s; }
.cat-tab:hover, .cat-tab.active { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.4); color: #a5b4fc; }

/* ─── Page Header ────────────────────────────────────────── */
.page-header { background: linear-gradient(to right, rgba(99,102,241,.1), rgba(139,92,246,.08)); border-bottom: 1px solid var(--border); padding: 32px 0; }
.page-title { font-size: 1.8rem; font-weight: 700; }
.page-desc { color: var(--muted); margin-top: 6px; }

/* ─── Product Detail ─────────────────────────────────────── */
.breadcrumb { font-size: 13px; color: var(--dim); margin-bottom: 24px; }
.breadcrumb a { color: var(--muted); transition: color .15s; }
.breadcrumb a:hover { color: var(--text); }
.product-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
@media(max-width:768px) { .product-detail-grid { grid-template-columns: 1fr; } }
.product-detail-hero { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.product-detail-icon { font-size: 56px; }
.detail-section { margin-bottom: 28px; }
.detail-section-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.video-placeholder { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 40px 20px; text-align: center; cursor: pointer; transition: background .2s; }
.video-placeholder:hover { background: rgba(255,255,255,.07); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 8px; }
.feature-item { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2); border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #6ee7b7; }
.review-item { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 10px; }

.purchase-panel { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; position: sticky; top: 76px; }
.ref-info { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2); border-radius: 6px; padding: 8px 12px; font-size: 12px; color: #6ee7b7; margin-bottom: 16px; }
.price-display { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.price-big { font-size: 2rem; font-weight: 800; color: var(--accent); }
.price-unit { color: var(--dim); font-size: 14px; }
.price-save { font-size: 12px; color: var(--green); margin-bottom: 20px; }
.purchase-include { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; font-size: 13px; color: var(--muted); }
.share-panel { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.share-title { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.share-link-box { display: flex; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.share-input { background: var(--bg2); color: var(--muted); border: none; padding: 9px 12px; flex: 1; font-size: 12px; min-width: 0; }
.share-input-sm { border-radius: 4px 0 0 4px !important; }

/* ─── Steps ──────────────────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 20px; }
.step-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; text-align: center; position: relative; }
.step-num { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; background: var(--accent); color: #fff; border-radius: 50%; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-icon { font-size: 36px; margin-bottom: 12px; display: block; }
.step-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ─── Reviews ────────────────────────────────────────────── */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 16px; }
.review-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.review-stars { font-size: 14px; margin-bottom: 8px; }
.review-content { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 10px; }
.review-user { font-size: 13px; font-weight: 600; color: var(--text); }
.review-date { font-size: 11px; color: var(--dim); margin-top: 2px; }

/* ─── Commission Table ────────────────────────────────────── */
.commission-table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: rgba(99,102,241,.1); color: #a5b4fc; font-size: 12px; font-weight: 600; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 11px 16px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,.025); }
.text-accent { color: var(--accent); font-weight: 600; }
.text-green  { color: var(--green); font-weight: 600; }

/* ─── Level Badge ────────────────────────────────────────── */
.level-badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }

/* ─── Auth Pages ─────────────────────────────────────────── */
.auth-page { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 16px; padding: 36px; width: 100%; max-width: 440px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-header p { color: var(--muted); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-footer { text-align: center; font-size: 13px; color: var(--dim); margin-top: 20px; }
.demo-hint { background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2); border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #94a3b8; margin-bottom: 20px; line-height: 1.7; }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--muted); }
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 14px; border-radius: 8px; font-size: 14px; transition: border-color .2s;
  -webkit-appearance: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-hint { font-size: 11px; color: var(--dim); }
.input-row { display: flex; }
.input-row input { border-radius: 6px 0 0 6px; border-right: none; }
.form-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); }
.form-check input { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.link { color: var(--accent); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ─── Agent Layout ───────────────────────────────────────── */
.agent-layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: calc(100vh - var(--nav-h)); }
@media(max-width:768px) { .agent-layout { grid-template-columns: 1fr; } }
.agent-sidebar { background: var(--bg2); border-right: 1px solid var(--border); position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; display: flex; flex-direction: column; }
@media(max-width:768px) { .agent-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); } }
.agent-main { padding: 24px; max-width: 900px; }
.agent-profile { padding: 20px 16px; border-bottom: 1px solid var(--border); text-align: center; }
.agent-avatar { width: 56px; height: 56px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin: 0 auto 10px; }
.agent-name { font-weight: 700; font-size: 16px; }
.agent-phone { font-size: 12px; color: var(--dim); margin-top: 2px; }
.agent-nav { padding: 12px 8px; flex: 1; }
.agent-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; font-size: 14px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; margin-bottom: 2px; }
.agent-nav-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.agent-nav-item.active { background: rgba(99,102,241,.15); color: #a5b4fc; font-weight: 600; }

/* ─── Dashboard Cards ────────────────────────────────────── */
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 14px; margin-bottom: 20px; }
.dash-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; transition: transform .2s, box-shadow .2s; }
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.dash-card-primary { background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.3); }
.dash-icon { font-size: 22px; margin-bottom: 8px; }
.dash-val { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.dash-label { font-size: 12px; color: var(--dim); margin-top: 4px; }

/* ─── Agent Card ─────────────────────────────────────────── */
.agent-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 20px; }
.agent-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.agent-card-header h3 { font-size: 15px; font-weight: 700; }
.page-section-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

/* ─── Level Info ─────────────────────────────────────────── */
.level-info-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 16px; margin-top: 14px; }
.level-stat { text-align: center; }
.level-stat-val { display: block; font-size: 1.2rem; font-weight: 700; color: #a5b4fc; }
.level-stat-label { font-size: 11px; color: var(--dim); margin-top: 2px; display: block; }

/* ─── Progress ───────────────────────────────────────────── */
.progress-bar { height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; transition: width .5s ease; }

/* ─── Quick Actions ──────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media(max-width:600px) { .quick-actions { grid-template-columns: repeat(2,1fr); } }
.quick-btn { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--muted); transition: all .2s; }
.quick-btn:hover { background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.3); color: var(--text); transform: translateY(-2px); }

/* ─── Promote Page ───────────────────────────────────────── */
.tpl-btn { padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; transition: border-color .2s; }
.tpl-btn-active { border-color: #6366f1 !important; }
.info-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 13px; }
.info-label { color: var(--dim); min-width: 80px; }
.info-code { background: rgba(99,102,241,.15); color: #a5b4fc; padding: 3px 10px; border-radius: 4px; font-size: 14px; letter-spacing: .05em; }

/* ─── Admin Layout ───────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--nav-h)); }
.admin-sidebar { background: #0d1117; border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; }
.admin-main { padding: 24px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-title { font-size: 20px; font-weight: 700; }
.admin-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 20px; }
.admin-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.admin-card-header h3 { font-size: 15px; font-weight: 700; }
.admin-quick-btn { background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--muted); padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: all .2s; display: flex; align-items: center; gap: 6px; }
.admin-quick-btn:hover { background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.3); color: var(--text); }

/* ─── KPI Grid ───────────────────────────────────────────── */
.admin-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 16px; margin-bottom: 20px; }
.admin-kpi-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 20px; position: relative; overflow: hidden;
  border-left: 3px solid var(--accent, #6366f1);
  transition: transform .2s;
}
.admin-kpi-card:hover { transform: translateY(-2px); }
.kpi-icon { font-size: 24px; margin-bottom: 8px; }
.kpi-val { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-sub { font-size: 11px; color: var(--dim); margin-top: 4px; }

/* ─── Config Fields ──────────────────────────────────────── */
.level-config-card { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.level-config-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 14px; }
.config-field label { display: block; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
.config-input { width: 100%; background: var(--bg2); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.config-input:focus { outline: none; border-color: var(--accent); }
.config-input:disabled { opacity: .4; cursor: not-allowed; }

/* ─── Table Wrap ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border); }

/* ─── Loading ────────────────────────────────────────────── */
.loading-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--nav-h)); gap: 16px;
}
.spinner { width: 40px; height: 40px; border: 3px solid rgba(99,102,241,.2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Text center ────────────────────────────────────────── */
.text-center { text-align: center; }

/* ─── 手机菜单按钮 ────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  background: none; border: none; color: var(--text); font-size: 24px;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: background .15s;
}
.mobile-menu-btn:hover { background: rgba(255,255,255,.08); }

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links {
    display: none; flex-direction: column; position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,14,26,.98); border-bottom: 1px solid var(--border);
    padding: 12px 16px; gap: 4px; z-index: 499;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; border-radius: 8px; font-size: 15px; }
  #nav-user-area { margin-left: auto; }
}

/* ====== 公司简介 ====== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.about-text p { color: var(--muted); line-height: 1.8; margin-bottom: 16px; font-size: 15px; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.af-item { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--muted); font-size: 13px; }
.about-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.av-card { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 16px; padding: 24px 20px; text-align: center; transition: transform .2s; }
.av-card:hover { transform: translateY(-3px); }
.av-card h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.av-card p { color: var(--dim); font-size: 13px; }

/* ====== 投诉热线 ====== */
.complaint-contact { display: flex; justify-content: center; gap: 32px; margin-top: 16px; flex-wrap: wrap; }
.cc-item { background: white; border: 1px solid #fecaca; border-radius: 12px; padding: 14px 24px; font-size: 16px; color: #991b1b; }

/* ====== 产品详情 ====== */
.product-detail { max-width: 800px; margin: 0 auto; }
.pd-header { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 40px; }
.pd-icon { font-size: 56px; min-width: 80px; text-align: center; }
.pd-section { margin-bottom: 32px; padding: 24px; background: rgba(255,255,255,.02); border: 1px solid var(--border); border-radius: 16px; }
.pd-section h3 { color: var(--text); font-size: 18px; margin-bottom: 16px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.feature-item { background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.15); border-radius: 8px; padding: 10px 14px; color: var(--text); font-size: 14px; }
.video-placeholder { text-align: center; }

/* ====== 注册引导步骤 ====== */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 16px; padding: 28px 20px; text-align: center; transition: transform .2s; }
.step-card:hover { transform: translateY(-2px); }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: white; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; margin: 0 auto 12px; }
.step-card h3 { color: var(--text); font-size: 16px; margin-bottom: 8px; }
.step-card p { color: var(--dim); font-size: 13px; line-height: 1.6; }

/* ====== 推荐横幅 ====== */
.ref-banner { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; padding: 12px 20px; border-radius: 12px; margin-bottom: 20px; text-align: center; font-size: 14px; }

/* ====== 导航用户区 ====== */
.nav-user-name { color: var(--text); font-size: 14px; cursor: pointer; padding: 6px 12px; border-radius: 8px; background: rgba(255,255,255,.05); }

/* ====== Toast 通知 ====== */
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 9999; padding: 12px 24px; border-radius: 12px; font-size: 14px; color: white; animation: toastIn .3s ease; }
.toast-info { background: var(--accent); }
.toast-success { background: var(--green); }
.toast-warning { background: var(--gold); color: #1e293b; }
.toast-error { background: var(--red); }
@keyframes toastIn { from { opacity:0; transform: translateX(-50%) translateY(-10px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* ====== Modal ====== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.modal-card { background: var(--bg2); border-radius: 16px; padding: 28px; max-width: 420px; width: 100%; border: 1px solid var(--border); }
.modal-card h3 { color: var(--text); font-size: 18px; margin-bottom: 12px; }

/* ====== 演示提示 ====== */
.demo-hint { background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2); border-radius: 10px; padding: 14px; margin-bottom: 20px; font-size: 13px; color: var(--muted); }
.demo-hint code { background: rgba(0,0,0,.3); padding: 2px 8px; border-radius: 4px; color: var(--accent2); }

/* ====== 微型工具区 ====== */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-card { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 16px; padding: 24px 20px; position:relative; transition: all .2s; }
.tool-card:hover { border-color: rgba(16,185,129,.3); transform: translateY(-2px); }
.tool-icon { font-size: 36px; margin-bottom: 12px; }
.tool-badge { position:absolute; top:12px; right:12px; background:linear-gradient(135deg,#10b981,#34d399); color:white; padding:3px 10px; border-radius:12px; font-size:11px; font-weight:600; }
.tool-name { color: var(--text); font-size: 15px; font-weight:600; margin-bottom: 8px; }
.tool-desc { color: var(--dim); font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.tool-bottom { display:flex; align-items:center; gap:10px; }
.tool-price-orig { text-decoration:line-through; color: var(--dim); font-size:13px; }
.tool-price-free { background:rgba(16,185,129,.12); color:#10b981; padding:3px 10px; border-radius:8px; font-size:12px; font-weight:600; }

/* ====== 日报预览 ====== */
.report-preview { max-width:680px; margin:0 auto; background:white; border-radius:16px; overflow:hidden; box-shadow:0 4px 24px rgba(0,0,0,.1); border:1px solid #e2e8f0; }
.report-header-bar { background:linear-gradient(135deg,#6366f1,#8b5cf6); color:white; padding:14px 20px; display:flex; justify-content:space-between; align-items:center; font-size:14px; }
.report-logo { font-weight:700; font-size:15px; }
.report-date { opacity:.85; font-size:12px; }
.report-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:0; }
.report-item { padding:16px; text-align:center; border-bottom:1px solid #f1f5f9; border-right:1px solid #f1f5f9; }
.report-item:last-child { border-right:none; }
.ri-label { font-size:12px; color:#64748b; margin-bottom:6px; }
.ri-value { font-size:22px; font-weight:700; color:#1e293b; }
.ri-value.up { color:#10b981; }
.ri-value.up span { font-size:13px; font-weight:400; color:#10b981; }
.report-summary { padding:16px 20px; font-size:13px; line-height:1.8; color:#475569; border-bottom:1px solid #f1f5f9; }
.report-footer-bar { padding:12px 20px; font-size:12px; color:#94a3b8; text-align:center; background:#f8fafc; }

/* ====== 行业案例 ====== */
.cases-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.case-card { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 16px; padding: 20px; transition: all .2s; }
.case-card:hover { border-color: rgba(99,102,241,.3); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.case-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.case-icon { font-size: 32px; }
.case-industry { font-size:12px; color:var(--accent); background:rgba(99,102,241,.1); display:inline-block; padding:2px 8px; border-radius:6px; margin-bottom:4px; }
.case-client { color: var(--text); font-size:14px; font-weight:600; }
.case-service { font-size:12px; color:var(--muted); margin-bottom:12px; padding:8px; background:rgba(255,255,255,.03); border-radius:8px; }
.case-result { font-size:14px; color:#fbbf24; margin-bottom:10px; line-height:1.6; }
.case-detail { font-size:12px; color:var(--dim); margin-bottom:10px; line-height:1.6; }
.case-evidence { font-size:12px; color:var(--green); font-weight:600; padding:8px 10px; background:rgba(16,185,129,.08); border-radius:8px; border-left:3px solid var(--green); }

/* ====== 购买氛围 ====== */
.btn-glow { animation: glowPulse 2s infinite; }
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 8px rgba(99,102,241,.4); }
  50% { box-shadow: 0 0 24px rgba(99,102,241,.8), 0 0 48px rgba(139,92,246,.4); }
}
.live-buy-bar { margin-top:24px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius:12px; padding:12px 20px; display:flex; align-items:center; gap:12px; justify-content:center; flex-wrap:wrap; color:white; font-size:14px; }
.live-dot { width:8px; height:8px; background:#10b981; border-radius:50%; animation: liveDot 1s infinite; }
@keyframes liveDot { 0%,100%{opacity:1} 50%{opacity:.3} }
.sale-tag { background:#fef2f2; color:#dc2626; padding:4px 10px; border-radius:20px; font-size:12px; font-weight:700; }
.link-elifai { display:inline-block; margin-top:16px; padding:12px 22px; background:rgba(99,102,241,.15); border:1px solid rgba(99,102,241,.3); border-radius:10px; color:#a5b4fc; text-decoration:none; font-size:14px; transition:all .2s; }
.link-elifai:hover { background:rgba(99,102,241,.25); color:white; }

/* ====== 弹窗咨询 ====== */
.chat-popup-mini { position:fixed; bottom:24px; right:24px; z-index:9998; background:linear-gradient(135deg,#6366f1,#8b5cf6); color:white; border-radius:50px; padding:12px 20px; display:flex; align-items:center; gap:8px; cursor:pointer; box-shadow:0 4px 20px rgba(99,102,241,.5); animation:chatBounce 2s infinite; }
@keyframes chatBounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
.chat-popup-icon { font-size:24px; }
.chat-popup-badge { width:10px; height:10px; background:#10b981; border-radius:50%; position:absolute; top:8px; right:8px; animation:liveDot 1.5s infinite; }
.chat-popup-text { font-size:14px; font-weight:600; }
.chat-window-hidden { display:none; }
.chat-window-open { display:flex; flex-direction:column; position:fixed; bottom:20px; right:20px; z-index:9999; width:360px; max-width:calc(100vw - 40px); height:480px; max-height:calc(100vh - 100px); background:white; border-radius:16px; box-shadow:0 8px 40px rgba(0,0,0,.3); overflow:hidden; animation:slideUp .3s ease; }
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
.chat-header { background:linear-gradient(135deg,#6366f1,#8b5cf6); color:white; padding:16px; display:flex; align-items:center; justify-content:space-between; }
.chat-header-left { display:flex; align-items:center; gap:12px; }
.chat-avatar { font-size:36px; }
.chat-name { font-weight:700; font-size:15px; }
.chat-status { font-size:12px; opacity:.8; }
.chat-close { background:none; border:none; color:white; font-size:20px; cursor:pointer; padding:4px 8px; }
.chat-body { flex:1; overflow-y:auto; padding:16px; background:#f8fafc; }
.chat-msg { margin-bottom:12px; padding:10px 14px; border-radius:12px; font-size:14px; line-height:1.6; max-width:85%; word-break:break-word; }
.chat-msg.bot { background:white; border:1px solid #e2e8f0; border-bottom-left-radius:4px; }
.chat-msg.user { background:linear-gradient(135deg,#6366f1,#8b5cf6); color:white; margin-left:auto; border-bottom-right-radius:4px; }
.chat-input-area { display:flex; padding:12px; border-top:1px solid #e2e8f0; background:white; gap:8px; }
.chat-input { flex:1; border:1px solid #e2e8f0; border-radius:24px; padding:10px 16px; font-size:14px; outline:none; }
.chat-input:focus { border-color:#6366f1; }
.chat-send { background:linear-gradient(135deg,#6366f1,#8b5cf6); color:white; border:none; border-radius:24px; padding:10px 20px; font-size:14px; cursor:pointer; white-space:nowrap; }

/* ====== 响应式 ====== */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { grid-template-columns: 1fr 1fr; gap: 12px; }
  .about-features { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 16px; }
  .complaint-contact { flex-direction: column; align-items: center; }
  .pd-header { flex-direction: column; align-items: center; text-align: center; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .cases-grid { grid-template-columns: 1fr 1fr; }
  .report-header-bar { flex-direction:column; gap:4px; text-align:center; }
  .chat-popup-text { display: none; }
  .chat-popup-mini { padding:14px; bottom:16px; right:16px; }
  .chat-window-open { width:100%; bottom:0; right:0; border-radius:16px 16px 0 0; height:65vh; }
}
