:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --navy-900: #0f172a;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --white: #ffffff;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--navy-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  color: var(--navy-900);
}

.logo .logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.logo:hover { text-decoration: none; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--navy-900);
  font-size: 14.5px;
  font-weight: 500;
}
.main-nav a:hover { color: var(--blue-600); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle { display: none; }

/* ---------- Language switcher ---------- */
.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--slate-200);
  border-radius: 7px;
  overflow: hidden;
  margin-right: 4px;
}
.lang-switch button {
  border: none;
  background: transparent;
  color: var(--slate-500);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 10px;
  cursor: pointer;
  font-family: var(--font);
}
.lang-switch button.lang-active {
  background: var(--blue-50);
  color: var(--blue-700);
}
.lang-switch button + button { border-left: 1px solid var(--slate-200); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--blue-600);
  color: white;
}
.btn-primary:hover { background: var(--blue-700); }

.btn-outline {
  background: white;
  color: var(--navy-900);
  border-color: var(--slate-200);
}
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-600); }

.btn-ghost {
  background: transparent;
  color: var(--navy-900);
}
.btn-ghost:hover { color: var(--blue-600); }

.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); color: white; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
  padding: 92px 0 80px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 52px;
  line-height: 1.12;
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.hero h1 span { color: var(--blue-600); }

.hero p.lead {
  font-size: 19px;
  color: var(--slate-500);
  max-width: 620px;
  margin: 0 auto 34px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 18px;
}

.hero-note {
  font-size: 13.5px;
  color: var(--slate-500);
}

.trust-strip {
  padding: 28px 0;
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
  text-align: center;
}
.trust-strip p {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  font-weight: 600;
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}

.section-head .eyebrow { margin-bottom: 14px; }

.section-head h2 {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--slate-500);
  font-size: 16.5px;
  line-height: 1.6;
}

/* ---------- Cards / Grid ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.feature-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 18px;
  margin: 0 0 10px;
  font-weight: 700;
}

.feature-card p {
  color: var(--slate-500);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

.how-step {
  text-align: center;
}
.how-step .step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-600);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 16px;
}
.how-step h3 { font-size: 17px; margin: 0 0 8px; }
.how-step p { color: var(--slate-500); font-size: 14.5px; margin: 0; }

.section-alt { background: var(--blue-50); }

/* ---------- Pricing: category tabs + term table ---------- */
.pricing-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  background: var(--blue-50);
  border-radius: 12px;
  padding: 6px;
  max-width: 640px;
  margin: 0 auto 20px;
}
.pricing-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--slate-500);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pricing-tab:hover { color: var(--navy-900); }
.pricing-tab.active {
  background: white;
  color: var(--blue-700);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.pricing-meta {
  text-align: center;
  color: var(--slate-500);
  font-size: 14px;
  margin: 0 0 28px;
}

.pricing-users-label {
  text-align: center;
  font-weight: 600;
  color: var(--navy-900);
  font-size: 15px;
  margin: 0 0 10px;
}
.pricing-users { max-width: 520px; margin-bottom: 8px; }
.pricing-users .savings-pill { margin-left: 4px; }
.pricing-users-hint,
.pricing-users-note {
  text-align: center;
  color: var(--slate-500);
  font-size: 13px;
  margin: 0 0 6px;
}
.pricing-users-note { color: var(--blue-700); font-weight: 600; min-height: 18px; margin-bottom: 20px; }
@media (max-width: 480px) {
  .pricing-users { flex-wrap: wrap; }
  .pricing-users .pricing-tab { flex: 1 1 45%; }
}

.pricing-table-wrap {
  max-width: 780px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pricing-table { width: 100%; border-collapse: collapse; }
.pricing-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  font-weight: 600;
  background: #f8fafc;
  padding: 14px 20px;
  border-bottom: 1px solid var(--slate-200);
}
.pricing-table td {
  padding: 16px 20px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: middle;
}
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table tr.pricing-row-best { background: var(--blue-50); }
.pricing-table .price-cell { font-weight: 700; font-size: 16px; }
.permonth-suffix { color: var(--slate-500); font-size: 12.5px; }
.badge-best {
  display: inline-block;
  margin-left: 8px;
  background: var(--blue-600);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  vertical-align: middle;
}
.savings-pill {
  display: inline-block;
  background: #f0fdf4;
  color: var(--success);
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.pricing-usd-note {
  max-width: 780px;
  margin: 14px auto 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--slate-500);
}

@media (max-width: 640px) {
  .pricing-tabs { flex-wrap: wrap; }
  .pricing-table th:nth-child(3), .pricing-table td:nth-child(3) { display: none; }
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.plan-card.featured {
  border-color: var(--blue-600);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-600);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
}

.plan-card h3 { font-size: 18px; margin: 0 0 6px; }
.plan-card .plan-desc { color: var(--slate-500); font-size: 13.5px; margin: 0 0 18px; }

.plan-price {
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 4px;
}
.plan-price span { font-size: 15px; font-weight: 500; color: var(--slate-500); }

.plan-features {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
  flex: 1;
}
.plan-features li {
  font-size: 14px;
  padding: 7px 0;
  color: var(--navy-900);
  display: flex;
  gap: 8px;
}
.plan-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 26px;
}
.testimonial-card p.quote {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 18px;
}
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue-100); color: var(--blue-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.testimonial-author .name { font-weight: 600; font-size: 14px; }
.testimonial-author .role { font-size: 12.5px; color: var(--slate-500); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
  color: white;
  margin: 0 24px;
}
.cta-band h2 { font-size: 30px; margin: 0 0 12px; font-weight: 800; }
.cta-band p { opacity: 0.9; margin: 0 0 28px; }
.cta-band .btn-primary { background: white; color: var(--blue-700); }
.cta-band .btn-primary:hover { background: var(--blue-50); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: #cbd5e1;
  padding: 60px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #cbd5e1; font-size: 14px; }
.footer-grid a:hover { color: white; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: #94a3b8; max-width: 280px; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #94a3b8;
}
.footer-bottom .footer-links { display: flex; gap: 18px; }
.footer-bottom a { color: #94a3b8; }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-50);
  padding: 40px 20px;
}
.auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-card h1 { font-size: 24px; margin: 0 0 6px; }
.auth-card p.sub { color: var(--slate-500); font-size: 14.5px; margin: 0 0 28px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  font-size: 14.5px;
  font-family: var(--font);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-100);
}

.form-msg {
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}
.form-msg.error { display: block; background: #fef2f2; color: var(--danger); }
.form-msg.success { display: block; background: #f0fdf4; color: var(--success); }

.auth-switch { text-align: center; margin-top: 22px; font-size: 14px; color: var(--slate-500); }

/* ---------- Dashboard ---------- */
.dash-shell { display: flex; min-height: calc(100vh - 68px); }
.dash-sidebar {
  width: 230px;
  border-right: 1px solid var(--slate-200);
  padding: 24px 16px;
  flex-shrink: 0;
}
.dash-sidebar a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--navy-900);
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 4px;
}
.dash-sidebar a.active, .dash-sidebar a:hover {
  background: var(--blue-50);
  color: var(--blue-700);
  text-decoration: none;
}
.dash-main { flex: 1; padding: 32px 36px; background: #f8fafc; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.dash-header h1 { font-size: 24px; margin: 0; }
.dash-header p { color: var(--slate-500); font-size: 14px; margin: 4px 0 0; }

.paywall-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: white;
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 24px;
}
.paywall-banner h2 { font-size: 17px; margin: 0 0 4px; }
.paywall-banner p { margin: 0; font-size: 14px; opacity: 0.9; }
.paywall-banner .btn-primary { background: white; color: var(--blue-700); white-space: nowrap; }
.paywall-banner .btn-primary:hover { background: var(--blue-50); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: white; border: 1px solid var(--slate-200); border-radius: 10px; padding: 18px 20px; }
.stat-card .stat-label { font-size: 12.5px; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; margin-top: 6px; }

.panel {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-head h2 { font-size: 17px; margin: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; font-size: 14px; border-bottom: 1px solid var(--slate-200); }
th { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-500); font-weight: 600; }
td.price-up { color: var(--danger); font-weight: 600; }
td.price-down { color: var(--success); font-weight: 600; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-active { background: #f0fdf4; color: var(--success); }
.badge-inactive { background: #f1f5f9; color: var(--slate-500); }

.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  align-items: center; justify-content: center;
  z-index: 200;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: white;
  border-radius: 14px;
  padding: 30px;
  width: 100%;
  max-width: 460px;
}
.modal h2 { margin: 0 0 18px; font-size: 19px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---------- Legal pages ---------- */
.legal-content { max-width: 780px; margin: 0 auto; padding: 60px 24px 100px; }
.legal-content h1 { font-size: 32px; margin-bottom: 6px; }
.legal-content .updated { color: var(--slate-500); font-size: 13.5px; margin-bottom: 40px; }
.legal-content h2 { font-size: 20px; margin: 36px 0 12px; }
.legal-content p, .legal-content li { color: #334155; line-height: 1.75; font-size: 15px; }
.legal-content ul { padding-left: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav, .header-actions .btn-outline { display: none; }
  .hero h1 { font-size: 36px; }
  .grid-3, .grid-4, .pricing-grid { grid-template-columns: 1fr; }
  .plan-card.featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-shell { flex-direction: column; }
  .dash-sidebar { width: 100%; display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--slate-200); }
  .stat-row { grid-template-columns: 1fr 1fr; }
}
