/* ════════════════════════════════════════════════════════════════
   TawBao — design system (landing, auth, shared)
   Palette: blue → indigo → violet, soft "ink-wash" backgrounds.
   ════════════════════════════════════════════════════════════════ */
:root {
  --blue: #3b82f6;
  --indigo: #5b6bf5;
  --violet: #7b3ff2;
  --ink: #1b2a5b;
  --text: #233056;
  --muted: #6b7596;
  --line: #e7ebf5;
  --bg: #f6f8fe;
  --card: #ffffff;
  --grad: linear-gradient(135deg, #34a9ff 0%, #5b6bf5 50%, #7b3ff2 100%);
  --grad-soft: linear-gradient(135deg, #eef3ff 0%, #f3eeff 100%);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(45, 70, 150, 0.08);
  --shadow-lg: 0 24px 60px rgba(45, 70, 150, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1180px, 92%); margin-inline: auto; }
.muted { color: var(--muted); }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ── Brand ──────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { display: inline-flex; }
.brand-text { font-size: 26px; color: var(--ink); letter-spacing: -0.5px; }
.brand-dot { color: var(--blue); }
.brand.sm .brand-text { font-size: 20px; }
.brand.sm .brand-mark svg { width: 30px; height: 30px; }
.brand.on-dark .brand-text { color: #fff; }
.brand.on-dark .brand-dot { color: #bcd4ff; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 15px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(91, 107, 245, .35); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(91, 107, 245, .45); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: #eef2fe; }
.btn-light { background: #fff; color: var(--indigo); }
.btn-light:hover { box-shadow: var(--shadow); }

/* ── Header / nav ───────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.nav-links { display: flex; gap: 26px; margin-left: 10px; }
.nav-links a { color: var(--text); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--indigo); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative; padding: 72px 0 80px;
  background:
    radial-gradient(900px 500px at 85% -10%, #eaf1ff 0, transparent 60%),
    radial-gradient(700px 400px at 10% 0%, #f3edff 0, transparent 55%),
    var(--bg);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 50px; align-items: center; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  color: var(--indigo); background: #e9ecff; padding: 7px 14px; border-radius: 999px;
}
.hero h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.15; margin: 18px 0 14px; color: var(--ink); letter-spacing: -1px; }
.hero .lead { font-size: 17px; color: var(--muted); max-width: 520px; }
.hero-checks { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; max-width: 460px; }
.hero-checks li { position: relative; padding-left: 26px; font-weight: 500; }
.hero-checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 11px; display: grid; place-items: center; }
.hero-actions { display: flex; gap: 14px; margin: 6px 0 26px; flex-wrap: wrap; }
.hero-trust { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.avatars { display: flex; }
.avatars span { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; background: var(--grad-soft); box-shadow: var(--shadow); }
.avatars span:first-child { margin-left: 0; }

/* Mock dashboard visual */
.hero-visual { perspective: 1200px; }
.mock-dashboard { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; transform: rotateY(-6deg) rotateX(3deg); }
.mock-top { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mock-search { flex: 1; background: #f1f4fc; border-radius: 8px; padding: 8px 12px; color: #9aa3c0; font-size: 13px; }
.mock-user { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); }
.mock-body { display: grid; grid-template-columns: 120px 1fr; }
.mock-side { padding: 14px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--line); }
.mock-side span { font-size: 12px; color: var(--muted); padding: 6px 8px; border-radius: 7px; }
.mock-side .on { background: #eef2ff; color: var(--indigo); font-weight: 600; }
.mock-main { padding: 16px; }
.mock-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc { background: #f8faff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.mc small { color: var(--muted); font-size: 11px; }
.mc b { display: block; font-size: 15px; color: var(--ink); margin: 3px 0; }
.mc i { font-style: normal; font-size: 11px; font-weight: 600; }
.mc .up { color: #16a34a; }
.mock-charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; margin-top: 12px; }
.mock-chart, .mock-donut { background: #f8faff; border: 1px solid var(--line); border-radius: 12px; height: 120px; display: grid; place-items: center; }
.spark { width: 80%; height: 60px; background: linear-gradient(180deg, rgba(91,107,245,.25), transparent); clip-path: polygon(0 80%, 12% 60%, 28% 70%, 45% 35%, 60% 50%, 78% 20%, 100% 30%, 100% 100%, 0 100%); }
.donut { width: 72px; height: 72px; border-radius: 50%; background: conic-gradient(var(--blue) 0 45%, var(--indigo) 45% 70%, var(--violet) 70% 85%, #f59e0b 85% 100%); -webkit-mask: radial-gradient(circle 22px at center, transparent 99%, #000 100%); mask: radial-gradient(circle 22px at center, transparent 99%, #000 100%); }

/* ── Sections ───────────────────────────────────────────── */
.section { padding: 78px 0; }
.section-tint { background: var(--grad-soft); }
.eyebrow { text-align: center; color: var(--indigo); font-weight: 700; letter-spacing: 1px; font-size: 13px; margin: 0; }
.section-title { text-align: center; font-size: clamp(24px, 3vw, 34px); color: var(--ink); margin: 8px 0 10px; letter-spacing: -.5px; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 44px; }

.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.solution-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.solution-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.sc-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--c) 14%, #fff); margin-bottom: 14px; }
.solution-card h3 { margin: 0 0 6px; color: var(--ink); font-size: 18px; }
.solution-card p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.sc-link { color: var(--indigo); font-weight: 600; font-size: 14px; }

.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; }
.why-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); }
.why-icon { font-size: 30px; display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--grad-soft); margin-bottom: 8px; }
.why-card h4 { margin: 6px 0; color: var(--ink); }
.why-card p { margin: 0; color: var(--muted); font-size: 14px; }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.stat { text-align: center; }
.stat b { display: block; font-size: 30px; color: var(--ink); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { color: var(--muted); font-size: 14px; }

/* CTA band */
.cta-band { background: var(--grad); border-radius: 26px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 26px; color: #fff; box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; font-size: 28px; }
.cta-band p { margin: 0; opacity: .9; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cta-link { color: #fff; text-decoration: underline; opacity: .9; font-size: 14px; }

/* Footer */
.site-footer { background: #0f1633; color: #c7cfe6; padding: 56px 0 26px; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand .brand-text { color: #fff; }
.footer-brand p { color: #94a0c4; font-size: 14px; margin-top: 14px; max-width: 300px; }
.footer-col h5 { color: #fff; margin: 0 0 14px; font-size: 15px; }
.footer-col a { display: block; color: #94a0c4; font-size: 14px; margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #26305a; margin-top: 36px; padding-top: 20px; color: #7b88b0; font-size: 13px; text-align: center; }

/* ════════════════════════════════════════════════════════
   Auth (login / register) — split screen
   ════════════════════════════════════════════════════════ */
.auth-body { background: var(--bg); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { background: var(--grad); color: #fff; padding: 56px; display: flex; align-items: center; position: relative; overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 400px at 90% 10%, rgba(255,255,255,.15), transparent 60%); }
.auth-aside-inner { position: relative; z-index: 1; max-width: 420px; }
.auth-aside h2 { font-size: 34px; line-height: 1.2; margin: 28px 0 14px; }
.auth-aside p { opacity: .92; }
.aside-feats { list-style: none; padding: 0; margin: 26px 0; }
.aside-feats li { padding: 9px 0; font-size: 15.5px; border-bottom: 1px solid rgba(255,255,255,.18); }
.aside-stats { display: flex; gap: 30px; margin-top: 26px; }
.aside-stats b { display: block; font-size: 24px; }
.aside-stats span { opacity: .85; font-size: 13px; }
.dom { background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 6px; }

.auth-main { display: grid; place-items: center; padding: 40px; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 30px; color: var(--ink); margin: 0 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 26px; }
.form { display: grid; gap: 16px; }
.field span { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.field input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 15px; background: #fbfcff; transition: border .15s, box-shadow .15s; }
.field input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(91,107,245,.12); background: #fff; }
.auth-foot { margin-top: 22px; color: var(--muted); font-size: 14.5px; }
.auth-foot a { color: var(--indigo); font-weight: 600; }
.auth-demo { margin-top: 10px; font-size: 13px; color: var(--muted); }
.auth-demo code, .dom { font-size: 13px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #fdecec; color: #c0392b; border: 1px solid #f7c8c8; }
code { background: #eef2fe; padding: 1px 6px; border-radius: 6px; color: var(--indigo); font-family: ui-monospace, Menlo, monospace; }

/* Centered card (404 / notfound) */
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.center-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 44px; text-align: center; max-width: 440px; }
.big-emoji { font-size: 56px; }
.center-card h1 { color: var(--ink); margin: 10px 0; }
.center-card p { color: var(--muted); margin-bottom: 22px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 920px) {
  .hero-grid, .grid-cards, .why-grid, .footer-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .hero-visual { display: none; }
}
@media (max-width: 560px) {
  .stats-strip { grid-template-columns: 1fr; }
  .cta-actions { align-items: stretch; }
}
