/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #4F46E5;
  --primary-dark:  #4338CA;
  --primary-light: #EEF2FF;
  --success:       #10B981;
  --danger:        #EF4444;
  --excel-green:   #1D6F42;
  --gray-900:      #111827;
  --gray-700:      #374151;
  --gray-500:      #6B7280;
  --gray-300:      #D1D5DB;
  --gray-100:      #F3F4F6;
  --white:         #FFFFFF;
  --border:        #E5E7EB;
  --radius:        12px;
  --shadow:        0 2px 16px rgba(0,0,0,.08);
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-size: 20px; font-weight: 800; color: var(--gray-900); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav-brand span { color: var(--primary); }
.nav-brand-icon {
  width: 32px; height: 32px; background: var(--primary); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--gray-700); font-size: 15px; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--primary); }
.nav-email { font-size: 13px; color: var(--gray-500); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all .15s; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline { background: transparent; color: var(--gray-700); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { opacity: .85; text-decoration: none; }
.btn-lg { padding: 13px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary-sm { background: var(--primary); color: var(--white); padding: 7px 16px; font-size: 14px; border-radius: 7px; font-weight: 600; text-decoration: none; }
.btn-primary-sm:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline-sm { background: transparent; color: var(--gray-700); border: 1.5px solid var(--border); padding: 6px 14px; font-size: 14px; border-radius: 7px; font-weight: 500; text-decoration: none; }
.btn-outline-sm:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* 选择文件蓝色按钮 */
.btn-select {
  display: inline-block; padding: 10px 28px; background: var(--primary); color: var(--white);
  border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
  margin-top: 14px; transition: background .15s;
}
.btn-select:hover { background: var(--primary-dark); }

/* 文字链接按钮 */
.link-btn {
  background: none; border: none; color: var(--primary); font-size: 14px;
  font-weight: 500; cursor: pointer; padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* ── 主页面整体 ─────────────────────────────────────────────────────────────── */
.page-wrap {
  max-width: 640px; margin: 0 auto; padding: 48px 24px 64px;
  display: flex; flex-direction: column; align-items: center;
}

/* 标题区 */
.page-title-area { text-align: center; margin-bottom: 32px; width: 100%; }
.page-title { font-size: clamp(32px, 5vw, 48px); font-weight: 800; line-height: 1.2; letter-spacing: -.5px; margin-bottom: 12px; }
.page-sub { font-size: 16px; color: var(--gray-500); line-height: 1.7; max-width: 500px; margin: 0 auto 20px; }

/* 配额条 */
.quota-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; }
.quota-text { font-size: 14px; color: var(--gray-500); }
.quota-text strong { color: var(--primary); font-weight: 700; }
.quota-track { width: 120px; height: 5px; background: var(--gray-100); border-radius: 99px; overflow: hidden; }
.quota-fill { height: 100%; background: linear-gradient(90deg, #6366F1, #4F46E5); border-radius: 99px; transition: width .4s; }

/* ── 上传卡片 ────────────────────────────────────────────────────────────────── */
.upload-card {
  width: 100%; background: var(--white);
  border: 1.5px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}

/* 正常状态：拖放区 */
.drop-zone {
  padding: 48px 32px; text-align: center; cursor: pointer;
  border: 2px dashed #C7D2FE; border-radius: 14px; margin: 12px;
  background: #F8F7FF; transition: all .2s;
}
.drop-zone:hover, .drop-zone.drag-over {
  background: #EDE9FE; border-color: var(--primary);
}
.cloud-icon { margin-bottom: 10px; }
.drop-title { font-size: 16px; font-weight: 600; color: var(--gray-700); margin-bottom: 2px; }

/* 锁定状态 */
.upload-locked-card {
  padding: 48px 32px; text-align: center; color: var(--gray-500);
}
.locked-title { font-size: 16px; font-weight: 600; color: var(--gray-700); margin: 12px 0 6px; }
.locked-sub { font-size: 14px; color: var(--gray-500); }

/* 进度 */
.file-info { font-size: 13px; color: var(--gray-500); margin-bottom: 12px; padding: 16px 24px 0; }
.prog-bar { height: 5px; background: var(--gray-100); border-radius: 99px; overflow: hidden; margin: 0 24px 10px; }
.prog-fill { height: 100%; width: 0; background: linear-gradient(90deg, #6366F1, #4F46E5); border-radius: 99px; transition: width .3s; }
.prog-text { font-size: 13px; color: var(--gray-500); text-align: center; padding-bottom: 16px; }
.result-title { font-size: 18px; font-weight: 700; margin: 10px 0 16px; }
.error-msg { font-size: 14px; color: var(--danger); margin: 8px 0 16px; line-height: 1.5; }

/* ── 开关区（卡片外面） ───────────────────────────────────────────────────────── */
.toggle-area { width: 100%; margin-top: 16px; }
.toggle-row { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.toggle-item { display: flex; align-items: center; gap: 8px; }
.toggle-label { font-size: 14px; font-weight: 500; color: var(--gray-700); cursor: pointer; }
.toggle-hint { text-align: center; font-size: 12px; color: var(--gray-300); margin-top: 8px; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--gray-300); border-radius: 99px; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; bottom: 3px;
  background: var(--white); border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── 功能特性横条 ─────────────────────────────────────────────────────────────── */
.feat-strip {
  width: 100%; display: flex; justify-content: center;
  gap: 0; margin-top: 36px;
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; background: var(--white);
}
.feat-strip-item {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 8px;
  font-size: 12px; color: var(--gray-500); font-weight: 500;
  border-right: 1px solid var(--border); white-space: nowrap;
}
.feat-strip-item:last-child { border-right: none; }
.feat-strip-item svg { flex-shrink: 0; color: var(--primary); }

/* ── 步骤行 ──────────────────────────────────────────────────────────────────── */
.steps-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 28px; flex-wrap: wrap; justify-content: center;
}
.step-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.step-icon-box {
  width: 44px; height: 44px; border: 1.5px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; background: var(--white);
}
.step-icon-excel { background: var(--excel-green); border-color: var(--excel-green); }
.step-item span { font-size: 13px; font-weight: 500; color: var(--gray-500); }
.step-arrow { font-size: 16px; color: var(--gray-300); padding-bottom: 20px; }

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.4); backdrop-filter: blur(3px);
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--white); border-radius: 16px; padding: 40px 36px;
  max-width: 360px; width: 90%; text-align: center; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.18); animation: modal-in .2s ease;
}
@keyframes modal-in { from { transform: scale(.93); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; color: var(--gray-300); cursor: pointer; padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--gray-700); }
.modal-icon { font-size: 38px; margin-bottom: 10px; }
.modal-box h3 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.modal-perks { text-align: left; background: var(--gray-100); border-radius: 10px; padding: 14px 18px; margin-bottom: 16px; }
.perk-item { font-size: 14px; color: var(--gray-700); padding: 3px 0; font-weight: 500; }
.modal-contact { background: #F0EFFF; border-radius: 10px; padding: 14px 18px; }
.modal-contact p { font-size: 14px; color: var(--gray-500); margin-bottom: 4px; }
.wechat-id { font-size: 17px !important; color: var(--gray-900) !important; font-weight: 700 !important; margin: 0 !important; }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }
.badge-blue { background: #DBEAFE; color: #1D4ED8; }
.badge-member { background: linear-gradient(135deg,#667eea,#764ba2); color:#fff; font-size:11px; padding:2px 8px; }

/* ── Auth ────────────────────────────────────────────────────────────────────── */
.auth-page { min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.auth-logo { text-align: center; margin-bottom: 8px; font-size: 22px; font-weight: 800; }
.auth-logo span { color: var(--primary); }
.auth-card h2 { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.auth-desc { text-align: center; font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--gray-500); overflow: hidden; }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-group label small { font-weight: 400; color: var(--gray-500); }
.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=password] {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 15px; outline: none; transition: border-color .15s;
}
.form-group input:focus { border-color: var(--primary); }

/* ── Alerts ──────────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; line-height: 1.5; }
.alert-error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }

/* ── Blog ────────────────────────────────────────────────────────────────────── */
.blog-page { max-width: 800px; margin: 0 auto; padding: 60px 24px; }
.blog-header { text-align: center; margin-bottom: 56px; }
.blog-header h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.blog-header p { color: var(--gray-500); font-size: 16px; }
.blog-card { padding: 32px 0; border-bottom: 1px solid var(--border); }
.blog-card:last-child { border-bottom: none; }
.blog-meta { font-size: 13px; color: var(--gray-500); margin-bottom: 8px; }
.blog-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.blog-card h2 a { color: var(--gray-900); }
.blog-card h2 a:hover { color: var(--primary); text-decoration: none; }
.blog-summary { color: var(--gray-500); font-size: 15px; margin-bottom: 12px; line-height: 1.6; }
.blog-read { font-size: 14px; font-weight: 600; color: var(--primary); }
.blog-empty { text-align: center; color: var(--gray-500); padding: 80px 0; font-size: 16px; }
.post-page { max-width: 800px; margin: 0 auto; padding: 60px 24px; }
.post-meta { font-size: 13px; color: var(--gray-500); margin-bottom: 12px; }
.post-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; line-height: 1.2; margin-bottom: 32px; }
.post-back { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; }

/* ── Admin ───────────────────────────────────────────────────────────────────── */
.admin-page { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.admin-header h1 { font-size: 26px; font-weight: 700; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 10px 16px; background: var(--gray-100); border-bottom: 2px solid var(--border); font-weight: 600; color: var(--gray-700); white-space: nowrap; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 20px 24px; background: var(--white); margin-top: auto; }
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; font-size: 13px; color: var(--gray-500); }
.footer-inner a { color: var(--gray-500); }
.footer-inner a:hover { color: var(--primary); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media(max-width: 600px) {
  .feat-strip { flex-direction: column; }
  .feat-strip-item { border-right: none; border-bottom: 1px solid var(--border); justify-content: flex-start; padding: 10px 16px; }
  .feat-strip-item:last-child { border-bottom: none; }
  .step-arrow { display: none; }
  .toggle-row { gap: 20px; }
}
