/* ── CSS Variables ── */
:root {
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --cream: #F4F7FF;
  --white: #FFFFFF;
  --ink: #0F172A;
  --ink-light: #475569;
  --ink-muted: #94A3B8;
  --accent: #2563EB;
  --accent-soft: #EFF4FF;
  --accent-light: #BFCFFD;
  --teal: #0891B2;
  --teal-soft: #E0F7FA;
  --gold: #D97706;
  --gold-soft: #FEF3C7;
  --border: #E8EDF5;
  --border-strong: #CBD5E1;
  --shadow-sm: 0 1px 4px rgba(15,23,42,0.05);
  --shadow-md: 0 4px 20px rgba(15,23,42,0.08);
  --shadow-lg: 0 16px 48px rgba(15,23,42,0.11);
  --radius: 14px;
  --radius-lg: 22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav#mainNav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 48px; height: 66px;
  display: flex; align-items: center; justify-content: space-between;
  transition: box-shadow .3s;
}
nav#mainNav.scrolled { box-shadow: var(--shadow-md); }
.nav-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.logo-mark {
  width: 34px; height: 34px; background: var(--accent);
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-text {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; color: var(--ink);
}
.logo-text span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a, .nav-links button {
  padding: 7px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink-light);
  text-decoration: none; transition: all .2s; cursor: pointer;
  border: none; background: none; font-family: inherit;
}
.nav-links a:hover { color: var(--ink); background: var(--cream); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-user { font-size: 14px; color: var(--ink-light); font-weight: 500; }
.btn-outline {
  padding: 8px 18px; border-radius: 9px;
  border: 1.5px solid var(--border-strong);
  background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 500;
  font-family: var(--font-body); cursor: pointer; transition: all .2s;
  text-decoration: none; display: inline-block;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-filled {
  padding: 8px 18px; border-radius: 9px;
  border: none; background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600;
  font-family: var(--font-body); cursor: pointer; transition: all .2s;
  text-decoration: none; display: inline-block;
}
.btn-filled:hover { background: #1a4fcc; box-shadow: 0 4px 14px rgba(37,99,235,.3); }

/* ── FLASH MESSAGE ── */
.flash-success {
  background: #F0FDF4; border-bottom: 1px solid #BBF7D0;
  padding: 12px 48px; display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; color: #166534; font-weight: 500;
}
.flash-success button {
  background: none; border: none; cursor: pointer;
  color: #166534; font-size: 16px; opacity: .7;
}

/* ── PAGE HERO ── */
.page-hero { background: var(--white); border-bottom: 1px solid var(--border); padding: 64px 48px 60px; }
.page-hero-inner { max-width: 1100px; margin: 0 auto; }
.page-hero-title { font-family: var(--font-display); font-size: 44px; font-weight: 700; color: var(--ink); margin-bottom: 14px; line-height: 1.2; }
.page-hero-desc { font-size: 18px; color: var(--ink-light); max-width: 600px; }

/* ── SECTION ── */
.section { padding: 80px 48px; max-width: 1100px; margin: 0 auto; }
.section-alt { background: var(--accent-soft); max-width: 100%; padding: 80px 48px; }
.section-alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-alt .section-tag,
.section-alt .section-title,
.section-alt .section-desc,
.section-alt .products-grid { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 700; color: var(--ink);
  margin-bottom: 14px; line-height: 1.25;
}
.section-desc { font-size: 17px; color: var(--ink-light); max-width: 540px; line-height: 1.7; }

/* ── HERO ── */
.hero-wrap { background: linear-gradient(160deg, #fff 55%, #EFF4FF 100%); }
.hero {
  padding: 96px 48px 80px; max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-soft); color: var(--teal);
  padding: 5px 14px 5px 8px; border-radius: 100px;
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.hero-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: pulse 2s infinite; }
.hero-title {
  font-family: var(--font-display);
  font-size: 52px; line-height: 1.13; font-weight: 700; color: var(--ink); margin-bottom: 20px;
}
.hero-title em { color: var(--accent); font-style: normal; }
.hero-desc { font-size: 17px; color: var(--ink-light); line-height: 1.7; margin-bottom: 34px; max-width: 460px; }
.hero-actions { display: flex; align-items: center; gap: 14px; }
.btn-hero {
  padding: 14px 28px; border-radius: 12px;
  background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600; border: none;
  font-family: var(--font-body); cursor: pointer; transition: all .25s;
  box-shadow: 0 4px 20px rgba(37,99,235,.28); text-decoration: none; display: inline-block;
}
.btn-hero:hover { background: #1a4fcc; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(37,99,235,.36); }
.btn-ghost {
  padding: 14px 22px; border-radius: 12px; background: transparent; color: var(--ink);
  font-size: 15px; font-weight: 500; border: none; font-family: var(--font-body);
  cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-ghost svg { width: 18px; height: 18px; }
.btn-ghost:hover { color: var(--accent); }

/* ── HERO VISUAL ── */
.hero-visual { position: relative; }
.data-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.data-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.data-card-title { font-size: 14px; font-weight: 600; color: var(--ink-light); }
.data-card-badge { background: var(--teal-soft); color: var(--teal); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 100px; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 80px; }
.bar {
  flex: 1; border-radius: 5px 5px 0 0;
  background: var(--accent-light); position: relative; overflow: hidden;
  animation: growBar .8s ease forwards; transform-origin: bottom;
}
.bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-light) 100%); opacity: .6; }
.bar.bar-accent { background: var(--accent); }
.bar.bar-accent::after { opacity: 0; }
.stat-row { display: flex; gap: 12px; margin-top: 20px; }
.stat-pill {
  flex: 1; background: var(--accent-soft); border-radius: 10px;
  padding: 12px 14px; border: 1px solid var(--border);
}
.stat-val { font-size: 20px; font-weight: 700; color: var(--ink); }
.stat-val.up { color: var(--teal); }
.stat-label { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }
.floating-tag {
  position: absolute; background: var(--white); border-radius: 10px;
  padding: 10px 14px; box-shadow: var(--shadow-md); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
  animation: floatAnim 4s ease-in-out infinite;
}
.tag1 { top: -18px; right: 16px; animation-delay: 0s; }
.tag2 { bottom: -14px; left: 10px; animation-delay: 2s; }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; }
.tag-dot.green { background: var(--teal); }
.tag-dot.gold { background: var(--gold); }

/* ── STATS BAND ── */
.stats-band {
  background: var(--accent-soft);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 44px 48px;
}
.stats-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr);
  text-align: center;
}
.stat-item { padding: 0 20px; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-num { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-num sup { font-size: 20px; vertical-align: super; }
.stat-desc { font-size: 14px; color: var(--ink-muted); margin-top: 6px; }

/* ── FEATURES GRID ── */
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin-top: 52px; }
.feature-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 32px; border: 1px solid var(--border);
  transition: all .3s; position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; font-size: 24px; }
.icon-blue { background: var(--accent-soft); }
.icon-teal { background: var(--teal-soft); }
.icon-gold { background: var(--gold-soft); }
.feature-name { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.feature-desc { font-size: 14px; color: var(--ink-light); line-height: 1.65; }

/* ── PRODUCTS GRID ── */
.products-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; margin-top: 48px; }
.product-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px;
  border: 1px solid var(--border); transition: all .3s; position: relative; overflow: hidden;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.product-card-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.product-card-featured::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.product-card-dark { background: var(--ink); border-color: var(--ink); }
.product-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.product-icon-lg { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.product-plan { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.plan-starter { color: var(--teal); background: var(--teal-soft); padding: 4px 12px; border-radius: 100px; }
.plan-pro { color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 100px; }
.plan-enterprise { color: var(--gold); background: var(--gold-soft); padding: 4px 12px; border-radius: 100px; }
.product-name { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.product-desc { font-size: 15px; color: var(--ink-light); line-height: 1.65; margin-bottom: 20px; }
.product-features { list-style: none; margin-bottom: 24px; }
.product-features li { font-size: 14px; color: var(--ink-light); padding: 5px 0; display: flex; align-items: center; gap: 8px; }
.product-features li::before { content: '✓'; color: var(--teal); font-weight: 700; }
.product-price { margin-bottom: 20px; }
.price-num { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--ink); }
.price-period { font-size: 14px; color: var(--ink-muted); }
.btn-product {
  display: inline-block; padding: 11px 24px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  border: none; font-family: var(--font-body); cursor: pointer;
  transition: all .2s; text-decoration: none;
}
.btn-product:hover { background: #1a4fcc; box-shadow: 0 4px 16px rgba(37,99,235,.28); }
.btn-product-gold { background: var(--gold); }
.btn-product-gold:hover { background: #b45309; }
.btn-product-ghost { background: rgba(255,255,255,0.15); color: #fff; border: 1.5px solid rgba(255,255,255,0.3); }
.btn-product-ghost:hover { background: rgba(255,255,255,0.25); }

/* ── SERVICE STEPS ── */
.steps-row {
  display: flex; align-items: center; margin-top: 40px;
  max-width: 900px;
}
.step-item { text-align: center; flex: 1; padding: 0 10px; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--accent); color: var(--accent);
  font-size: 20px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 14px;
}
.step-num-filled { background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(37,99,235,.3); }
.step-num-teal { border-color: var(--teal); color: var(--teal); }
.step-line { flex: 0 0 60px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-light)); margin-bottom: 42px; }
.step-line-teal { background: linear-gradient(90deg, var(--accent-light), var(--teal-soft)); }
.step-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.step-desc { font-size: 13px; color: var(--ink-muted); line-height: 1.5; }

/* ── CTA BLOCK ── */
.cta-block {
  margin-top: 72px;
  background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
  border-radius: var(--radius-lg); padding: 52px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
}
.cta-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.cta-desc { font-size: 16px; color: rgba(255,255,255,.8); max-width: 480px; }
.cta-actions { display: flex; gap: 12px; flex-shrink: 0; }
.btn-cta-white {
  padding: 13px 28px; background: #fff; color: var(--accent);
  border: none; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); transition: all .2s;
  text-decoration: none; display: inline-block; white-space: nowrap;
}
.btn-cta-white:hover { box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.btn-cta-ghost {
  padding: 13px 28px; background: rgba(255,255,255,.15); color: #fff;
  border: 1.5px solid rgba(255,255,255,.4); border-radius: 10px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  font-family: var(--font-body); transition: all .2s;
  text-decoration: none; display: inline-block; white-space: nowrap;
}
.btn-cta-ghost:hover { background: rgba(255,255,255,.25); }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: start; }
.contact-info h3 { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--ink); margin-bottom: 14px; line-height: 1.3; }
.contact-info p { font-size: 15px; color: var(--ink-light); line-height: 1.7; margin-bottom: 32px; }
.contact-item { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.contact-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.contact-item-text strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.contact-item-text span { font-size: 14px; color: var(--ink-muted); }
.contact-form-card { background: var(--white); border-radius: var(--radius-lg); padding: 40px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-light); margin-bottom: 6px; }
.required { color: #EF4444; }
.form-input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border-strong); border-radius: 10px;
  font-size: 15px; font-family: var(--font-body);
  background: var(--white); color: var(--ink);
  transition: border-color .2s, box-shadow .2s; outline: none;
  appearance: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.form-input.is-error { border-color: #EF4444; }
.form-error-msg { font-size: 12px; color: #EF4444; margin-top: 4px; display: block; }
.form-error-banner {
  background: #FEF2F2; border: 1px solid #FECACA; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 20px; font-size: 14px; color: #B91C1C;
}
.form-error-banner p { margin: 0; }
.form-success-banner {
  background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 20px; font-size: 14px; color: #166534;
}
.form-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.form-link:hover { text-decoration: underline; }
textarea.form-input { resize: vertical; min-height: 120px; }

/* ── AUTH LAYOUT ── */
.auth-body { background: var(--white); }
.auth-page { display: grid; grid-template-columns: 480px 1fr; min-height: 100vh; }
.auth-left {
  background: linear-gradient(160deg, #1e3a8a 0%, #2563EB 60%, #0891b2 100%);
  padding: 48px 56px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.auth-left-body { margin: auto 0; }
.auth-quote {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700; color: #fff;
  line-height: 1.45; margin-bottom: 48px;
  border-left: 3px solid rgba(255,255,255,.4); padding-left: 20px;
}
.auth-left-stats { display: flex; gap: 32px; }
.auth-left-stat-num { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: #fff; }
.auth-left-stat-label { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 2px; }
.auth-deco {
  position: absolute; bottom: -80px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  border: 40px solid rgba(255,255,255,.07);
}
.auth-right {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; background: var(--white);
}
.auth-box { width: 100%; max-width: 420px; }
.auth-form-header { margin-bottom: 28px; }
.auth-form-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.auth-form-sub { font-size: 15px; color: var(--ink-muted); }
.btn-auth-submit {
  width: 100%; padding: 13px; background: var(--accent); color: #fff;
  border: none; border-radius: 10px; font-size: 15px; font-weight: 600;
  font-family: var(--font-body); cursor: pointer; transition: all .2s; margin-top: 4px;
}
.btn-auth-submit:hover { background: #1a4fcc; box-shadow: 0 4px 16px rgba(37,99,235,.3); }
.btn-auth-sso {
  width: 100%; padding: 12px; background: var(--white); color: var(--ink);
  border: 1.5px solid var(--border-strong); border-radius: 10px;
  font-size: 14px; font-weight: 500; font-family: var(--font-body);
  cursor: pointer; transition: all .2s; display: flex; align-items: center;
  justify-content: center; gap: 10px;
}
.btn-auth-sso:hover { border-color: var(--accent); background: var(--accent-soft); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-footer-text { text-align: center; margin-top: 22px; font-size: 14px; color: var(--ink-muted); }

/* ── ADMIN ── */
.admin-stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.admin-stat-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm);
}
.admin-stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.admin-stat-num { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--ink); }
.admin-stat-label { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.admin-actions-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.admin-action-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; text-align: center; transition: all .3s;
}
.admin-action-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.admin-action-icon { font-size: 36px; margin-bottom: 12px; }
.admin-action-name { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.admin-action-desc { font-size: 13px; color: var(--ink-muted); line-height: 1.55; }
.admin-activity-list { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-activity-item { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.admin-activity-item:last-child { border-bottom: none; }
.admin-activity-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.admin-activity-info { flex: 1; }
.admin-activity-name { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.admin-activity-meta { display: block; font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.admin-activity-time { font-size: 12px; color: var(--ink-muted); flex-shrink: 0; }

/* ── DOCS ── */
.docs-entry-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 36px; margin-bottom: 48px; }
.docs-entry-card {
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 24px 20px; text-align: center; text-decoration: none;
  transition: all .25s; display: block;
}
.docs-entry-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.docs-entry-active { border-color: var(--accent); background: var(--accent-soft); }
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.docs-sidebar {
  position: sticky; top: 84px; align-self: start;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.docs-nav-group {
  padding: 14px 18px 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-muted);
}
.docs-nav-item {
  display: block; padding: 9px 18px; font-size: 14px; color: var(--ink-light);
  text-decoration: none; transition: all .15s; border-left: 3px solid transparent;
}
.docs-nav-item:hover { background: var(--accent-soft); color: var(--ink); }
.docs-nav-item.active { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.docs-content { min-width: 0; }
.docs-breadcrumb { font-size: 13px; color: var(--ink-muted); margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.docs-breadcrumb a { color: var(--accent); text-decoration: none; }
.docs-breadcrumb span:not(:last-child) { color: var(--ink-muted); }
.docs-title { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.docs-meta { font-size: 13px; color: var(--ink-muted); margin-bottom: 28px; }
.docs-content p { font-size: 15px; color: var(--ink-light); line-height: 1.75; margin-bottom: 16px; }
.docs-content h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--ink); margin: 32px 0 12px; }
.docs-content ul { padding-left: 20px; margin-bottom: 16px; }
.docs-content ul li { font-size: 15px; color: var(--ink-light); line-height: 1.75; margin-bottom: 6px; }
.docs-content a { color: var(--accent); text-decoration: none; }
.docs-content a:hover { text-decoration: underline; }
.docs-content code { background: var(--accent-soft); color: var(--accent); padding: 2px 6px; border-radius: 5px; font-size: 13px; font-family: 'Courier New', monospace; }
.code-block { background: #0F172A; border-radius: 10px; overflow: hidden; margin: 16px 0 24px; }
.code-block-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.08); }
.code-block-header span { font-size: 12px; color: rgba(255,255,255,.5); font-weight: 500; }
.copy-btn { font-size: 12px; color: rgba(255,255,255,.5); background: none; border: none; cursor: pointer; font-family: var(--font-body); transition: color .2s; }
.copy-btn:hover { color: #fff; }
.code-block pre { padding: 16px; font-size: 13px; color: #93C5FD; font-family: 'Courier New', monospace; line-height: 1.65; overflow-x: auto; white-space: pre; }
.doc-tip { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px 16px; font-size: 14px; color: var(--ink-light); margin: 16px 0 24px; line-height: 1.6; }
.doc-tip-success { background: #F0FDF4; border-left-color: #22C55E; }
.docs-screenshot { margin: 16px 0 24px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.docs-screenshot img { display: block; width: 100%; height: auto; }
.docs-screenshot-caption { font-size: 12px; color: var(--ink-muted); text-align: center; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--border); }
.docs-screenshot-placeholder { margin: 16px 0 24px; border-radius: 10px; border: 2px dashed var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 8px; }
.docs-screenshot-placeholder span:first-child { font-size: 28px; }
.docs-screenshot-placeholder span:last-child { font-size: 13px; color: var(--ink-muted); }
.docs-table-wrap { overflow-x: auto; margin: 16px 0; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.docs-table thead tr { background: var(--accent-soft); }
.docs-table th { padding: 10px 14px; text-align: left; color: var(--ink); border-bottom: 2px solid var(--border); font-weight: 600; }
.docs-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--ink-light); vertical-align: middle; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; font-family: monospace; }
.badge-get { background: #DCFCE7; color: #166534; }
.badge-post { background: #DBEAFE; color: #1e40af; }
.badge-put { background: #FEF9C3; color: #854d0e; }
.badge-delete { background: #FEE2E2; color: #991b1b; }
.sdk-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 20px 0 28px; }
.sdk-card { border-radius: var(--radius); padding: 22px; text-align: center; }
.sdk-card-blue { background: var(--accent-soft); }
.sdk-card-teal { background: var(--teal-soft); }
.sdk-card-gold { background: var(--gold-soft); }
.docs-nav-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.docs-prev-link, .docs-next-link { color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 500; }
.docs-prev-link:hover, .docs-next-link:hover { text-decoration: underline; }

/* ── FOOTER ── */
footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 56px 48px 32px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-desc { font-size: 14px; line-height: 1.7; margin-top: 12px; color: rgba(255,255,255,.5); }
.footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.9); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,.55); text-decoration: none; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p, .footer-bottom a { font-size: 13px; color: rgba(255,255,255,.4); text-decoration: none;}

/* ── ANIMATIONS ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatAnim { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ═══════════════════════════════════════════════
   RESPONSIVE / MOBILE STYLES
   Breakpoints:
     768px  — tablet
     480px  — mobile
═══════════════════════════════════════════════ */

/* ── Mobile hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px;
  background: none; border: none; cursor: pointer; padding: 6px;
  border-radius: 8px; transition: background .2s;
}
.nav-hamburger:hover { background: var(--cream); }
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
/* Animate to X when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav drawer ── */
.mobile-nav-drawer {
  display: none;
  position: fixed; inset: 0; top: 66px; z-index: 99;
  background: rgba(15,23,42,.4);
  backdrop-filter: blur(4px);
}
.mobile-nav-drawer.open { display: block; animation: fadeIn .2s ease; }
.mobile-nav-inner {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 24px;
  display: flex; flex-direction: column; gap: 4px;
  animation: slideDown .25s ease;
}
.mobile-nav-inner a,
.mobile-nav-inner button {
  display: block; padding: 12px 14px; border-radius: 10px;
  font-size: 15px; font-weight: 500; color: var(--ink-light);
  text-decoration: none; background: none; border: none;
  font-family: var(--font-body); cursor: pointer; text-align: left;
  transition: all .15s; width: 100%;
}
.mobile-nav-inner a:hover,
.mobile-nav-inner button:hover { background: var(--cream); color: var(--ink); }
.mobile-nav-inner a.active { background: var(--accent-soft); color: var(--accent); }
.mobile-nav-divider { height: 1px; background: var(--border); margin: 8px 0; }
.mobile-nav-actions { display: flex; gap: 10px; padding: 4px 14px 0; }
.mobile-nav-actions a { flex: 1; text-align: center; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .hero { padding: 72px 32px 64px; gap: 40px; }
  .section { padding: 64px 32px; }
  .section-alt { padding: 64px 32px; }
  .page-hero { padding: 48px 32px 44px; }
  nav#mainNav { padding: 0 32px; }
  .flash-success { padding: 12px 32px; }
  .stats-band { padding: 36px 32px; }
  footer { padding: 48px 32px 28px; }

  .features-grid { grid-template-columns: repeat(2,1fr); }
  .admin-stats-grid { grid-template-columns: repeat(2,1fr); }
  .admin-actions-grid { grid-template-columns: repeat(2,1fr); }
  .docs-entry-grid { grid-template-columns: repeat(2,1fr); }
}

/* ── Tablet narrow (≤ 768px) ── */
@media (max-width: 768px) {

  /* Nav: hide links + actions, show hamburger */
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  nav#mainNav { padding: 0 20px; height: 60px; }
  .mobile-nav-drawer { top: 60px; }

  /* Hero: single column */
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 20px 40px;
    gap: 40px;
    text-align: center;
  }
  .hero-title { font-size: 38px; }
  .hero-desc { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-visual { order: -1; }
  .floating-tag.tag1 { top: -12px; right: 8px; font-size: 12px; padding: 8px 10px; }
  .floating-tag.tag2 { bottom: -10px; left: 4px; font-size: 12px; padding: 8px 10px; }

  /* Stats: 2x2 */
  .stats-inner { grid-template-columns: repeat(2,1fr); gap: 24px 0; }
  .stats-inner .stat-item { border-right: none; border-bottom: 1px solid var(--border); padding: 0 0 20px; }
  .stats-inner .stat-item:nth-child(odd) { border-right: 1px solid var(--border); }
  .stats-inner .stat-item:nth-child(3),
  .stats-inner .stat-item:nth-child(4) { border-bottom: none; padding-top: 20px; }
  .stats-band { padding: 32px 20px; }

  /* Section */
  .section { padding: 52px 20px; }
  .section-alt { padding: 52px 20px; }
  .section-title { font-size: 28px; }
  .page-hero { padding: 40px 20px 36px; }
  .page-hero-title { font-size: 32px; }
  .page-hero-desc { font-size: 16px; }

  /* Features: single column */
  .features-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; }

  /* Products: single column */
  .products-grid { grid-template-columns: 1fr; }

  /* Steps: vertical */
  .steps-row { flex-direction: column; align-items: center; gap: 0; max-width: 100%; }
  .step-item { width: 100%; max-width: 320px; margin-bottom: 16px; }
  .step-line,
  .step-line-teal {
    flex: none; width: 2px; height: 32px;
    background: linear-gradient(180deg, var(--accent), var(--accent-light));
    margin-bottom: 0;
  }
  .step-line-teal { background: linear-gradient(180deg, var(--accent-light), var(--teal-soft)); }

  /* CTA */
  .cta-block {
    flex-direction: column; align-items: flex-start;
    padding: 36px 24px; gap: 24px;
  }
  .cta-actions { flex-wrap: wrap; width: 100%; }
  .btn-cta-white, .btn-cta-ghost { flex: 1; text-align: center; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  /* Auth */
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 32px 20px; min-height: 100vh; align-items: flex-start; padding-top: 48px; }
  .auth-box { max-width: 100%; }

  /* Admin */
  .admin-stats-grid { grid-template-columns: repeat(2,1fr); gap: 14px; }
  .admin-actions-grid { grid-template-columns: repeat(2,1fr); gap: 14px; }

  /* Docs */
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; margin-bottom: 24px; }
  .docs-entry-grid { grid-template-columns: repeat(2,1fr); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  footer { padding: 40px 20px 28px; }

  /* Forms */
  .form-row-2 { grid-template-columns: 1fr; gap: 0; }

  /* Flash */
  .flash-success { padding: 12px 20px; }

  /* SDK cards: single col */
  .sdk-cards { grid-template-columns: 1fr; }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .hero-title { font-size: 30px; }
  .hero-badge { font-size: 12px; }
  .btn-hero { padding: 12px 22px; font-size: 15px; }
  .section-title { font-size: 24px; }
  .stat-num { font-size: 30px; }
  .page-hero-title { font-size: 26px; }

  .data-card { padding: 20px; }
  .stat-row { flex-direction: column; gap: 8px; }
  .stat-pill { padding: 10px 12px; }

  .product-card { padding: 24px; }
  .feature-card { padding: 24px; }
  .contact-form-card { padding: 24px; }

  .admin-stats-grid { grid-template-columns: 1fr; }
  .admin-actions-grid { grid-template-columns: 1fr; }

  .docs-entry-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .docs-entry-card { padding: 16px 12px; }

  .footer-grid { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; }
  .btn-cta-white, .btn-cta-ghost { width: 100%; }
}

/* ── Email input with inset send-code button ── */
.email-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.email-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}
.email-input-wrap.is-error {
  border-color: #EF4444;
}
.email-input-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--ink-muted);
  margin-left: 13px;
  pointer-events: none;
}
.email-input-field {
  flex: 1;
  min-width: 0;
  padding: 11px 10px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--ink);
}
.email-input-field::placeholder { color: var(--ink-muted); }

/* Vertical divider before button */
.email-input-wrap::after {
  content: '';
  display: block;
  /* width: 1px; */
  height: 22px;
  background: var(--border-strong);
  flex-shrink: 0;
}
.btn-send-code {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 16px;
  height: 100%;
  min-width: 96px;
  background: transparent;
  color: var(--accent);
  border: none;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, color .18s;
  border-radius: 0;
  border-left: 1px solid #ccc;
  height: 40px;
}
.btn-send-code:hover:not(:disabled) {
  background: var(--accent-soft);
}
.btn-send-code:active:not(:disabled) {
  background: var(--accent-light);
}
.btn-send-code:disabled {
  color: var(--ink-muted);
  cursor: not-allowed;
}
/* Countdown pulse ring */
.btn-send-code:disabled .btn-send-code-text {
  font-variant-numeric: tabular-nums;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Code sent feedback message ── */
.code-sent-msg {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
}
.code-sent-ok {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}
.code-sent-error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .btn-send-code {
    min-width: 80px;
    padding: 0 12px;
    font-size: 12px;
  }
}

/* ── Password reset pages ── */
.reset-sent-card {
  background: var(--accent-soft);
  border: 1.5px solid var(--accent-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
}
.reset-sent-icon { font-size: 48px; margin-bottom: 14px; }
.reset-sent-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--ink); margin-bottom: 12px;
}
.reset-sent-desc { font-size: 15px; color: var(--ink-light); line-height: 1.7; }
.reset-debug-box {
  margin-top: 20px; background: var(--white);
  border: 1px dashed var(--border-strong);
  border-radius: 8px; padding: 12px 14px;
  text-align: left;
}

/* Password field with toggle eye */
.password-input-wrap { position: relative; }
.password-input-wrap .form-input { padding-right: 44px; }
.btn-toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--ink-muted); padding: 4px; line-height: 0;
  transition: color .2s;
}
.btn-toggle-pw:hover { color: var(--accent); }
.eye-icon { width: 18px; height: 18px; }

/* Password strength bar */
.pw-strength-wrap {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.pw-strength-bar {
  flex: 1; height: 5px; background: var(--border);
  border-radius: 100px; overflow: hidden;
}
.pw-strength-bar > div {
  height: 100%; border-radius: 100px;
  transition: width .3s, background .3s;
  width: 0;
}
#pwStrengthLabel { font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ── Legal pages ── */
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}
.legal-toc {
  position: sticky; top: 84px; align-self: start;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; padding-bottom: 8px;
}
.legal-toc-title {
  padding: 16px 18px 10px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-muted);
}
.legal-toc-link {
  display: block; padding: 8px 18px;
  font-size: 13px; color: var(--ink-light);
  text-decoration: none; border-left: 3px solid transparent;
  transition: all .15s;
}
.legal-toc-link:hover { background: var(--accent-soft); color: var(--ink); }
.legal-toc-link.active { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 500; }

.legal-content { min-width: 0; }
.legal-section { margin-bottom: 48px; }
.legal-section h2 {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: var(--ink); margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.legal-section p { font-size: 15px; color: var(--ink-light); line-height: 1.8; margin-bottom: 14px; }
.legal-section ul { padding-left: 20px; margin-bottom: 14px; }
.legal-section ul li { font-size: 15px; color: var(--ink-light); line-height: 1.75; margin-bottom: 6px; }
.legal-section a { color: var(--accent); text-decoration: none; }
.legal-section a:hover { text-decoration: underline; }
.legal-tip {
  background: var(--gold-soft); border-left: 3px solid var(--gold);
  border-radius: 8px; padding: 12px 16px;
  font-size: 14px; color: var(--ink-light); line-height: 1.6;
  margin: 16px 0;
}
.legal-tip.legal-tip-blue { background: var(--accent-soft); border-left-color: var(--accent); }

@media (max-width: 768px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; margin-bottom: 24px; }
}

/* ── WeChat QR Card ── */
.wechat-qr-card {
  margin-top: 28px;
  background: linear-gradient(135deg, #F0FDF4 0%, #E6FAF4 100%);
  border: 1.5px solid #BBF7D0;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.wechat-qr-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.wechat-qr-icon {
  width: 40px; height: 40px;
  background: #f1f5f3;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wechat-qr-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.wechat-qr-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.wechat-qr-box {
  text-align: center;
}
.wechat-qr-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  border: 1px solid #E2E8F0;
}
.wechat-qr-id {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #07C160;
  letter-spacing: .02em;
}
.wechat-qr-tip {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 5px;
}
