/* HAAVK — clean, modern, mobile-responsive. No framework. */
:root {
  --primary: #1a56db;
  --primary-dark: #1443ad;
  --accent: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --success: #059669;
  --error: #dc2626;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(17, 24, 39, 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- layout ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

header.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 1px;
}
.logo span {
  color: var(--primary);
}
nav.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
nav.site-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--primary);
  text-decoration: none;
}

main {
  min-height: calc(100vh - 64px - 120px);
  padding: 32px 0 64px;
}

footer.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
  text-align: center;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
}
.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: #eff6ff;
  text-decoration: none;
}
.btn-danger {
  background: #fff;
  color: var(--error);
  border: 1px solid #fecaca;
  padding: 8px 16px;
  font-size: 14px;
}
.btn-danger:hover {
  background: #fef2f2;
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 15px;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  transition: border-color 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}
.form-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
details.optional-fields {
  margin: 12px 0 4px;
}
details.optional-fields > summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--primary);
  user-select: none;
}

/* ---------- cards / alerts ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}
.card h2,
.card h3 {
  margin-bottom: 16px;
}

.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin: 16px 0;
  font-size: 15px;
}
.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.loading::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -3px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #eff6ff;
  color: var(--primary);
}
.badge-green {
  background: #ecfdf5;
  color: #065f46;
}
.badge-amber {
  background: #fffbeb;
  color: #92400e;
}
.badge-red {
  background: #fef2f2;
  color: #991b1b;
}
.badge-gray {
  background: #f3f4f6;
  color: var(--muted);
}

/* ---------- hero (landing) ---------- */
.hero {
  text-align: center;
  padding: 72px 20px 56px;
  background: linear-gradient(135deg, #1a56db 0%, #3b82f6 60%, #60a5fa 100%);
  color: #fff;
  border-radius: 0 0 32px 32px;
  margin: -32px -20px 0;
}
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.hero h1 .pct {
  color: #fde68a;
}
.hero p.sub {
  font-size: 18px;
  opacity: 0.92;
  max-width: 640px;
  margin: 0 auto 28px;
}
.hero .cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .btn-outline {
  border-color: #fff;
  color: #fff;
  background: transparent;
}
.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}
.hero .btn-primary {
  background: #fff;
  color: var(--primary);
}
.hero .btn-primary:hover {
  background: #f3f4f6;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 48px 0;
}
.step {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  text-align: center;
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.step h3 {
  margin-bottom: 8px;
  font-size: 18px;
}
.step p {
  color: var(--muted);
  font-size: 15px;
}
.step code {
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 700;
}

.brands {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 32px 0 48px;
  flex-wrap: wrap;
}
.brand-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 48px;
  font-size: 22px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
}
.faq-a {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 15px;
  display: none;
}
.faq-item.open .faq-a {
  display: block;
}

/* ---------- auth ---------- */
.auth-wrap {
  max-width: 440px;
  margin: 40px auto;
}
.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}
.auth-card h2 {
  text-align: center;
  margin-bottom: 8px;
}
.auth-card p.desc {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 13px;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- dashboard ---------- */
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.dash-head h2 {
  font-size: 24px;
}
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

.table-wrap {
  overflow-x: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.data th,
table.data td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
table.data th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
table.data tr:last-child td {
  border-bottom: none;
}
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.email-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  flex-wrap: wrap;
}
.email-row:last-child {
  border-bottom: none;
}
.email-addr {
  font-weight: 600;
  word-break: break-all;
}
.email-meta {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- tutorial ---------- */
.tutorial-step {
  display: flex;
  gap: 18px;
  margin-bottom: 28px;
}
.tutorial-step .step-num {
  flex-shrink: 0;
}
.tutorial-body h3 {
  margin-bottom: 6px;
}
.tutorial-body p,
.tutorial-body li {
  color: #374151;
  font-size: 15px;
}
.tutorial-body ul {
  padding-left: 20px;
  margin: 8px 0;
}
.tip-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 15px;
}
.tip-box strong {
  color: #92400e;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero p.sub {
    font-size: 16px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  nav.site-nav {
    gap: 12px;
  }
  nav.site-nav a {
    font-size: 14px;
  }
  .card {
    padding: 20px;
  }
  .brand-card {
    padding: 18px 32px;
    font-size: 18px;
  }
  .dash-head h2 {
    font-size: 20px;
  }
}
