/* ================================================================
   Trang chủ — landing / marketing page
   ================================================================ */

/* Khi chưa đăng nhập, .content-auth ép flex-center toàn màn hình —
   trang landing cần layout block bình thường để cuộn nhiều section. */
.content-auth:has(.lp) {
  display: block;
  align-items: unset;
  justify-content: unset;
  min-height: auto;
  padding: 0;
}

.lp { color: var(--text); }
.lp * { box-sizing: border-box; }
.lp a { text-decoration: none; color: inherit; }
.lp section { padding: 64px 24px; }
.lp .lp-wrap { max-width: 1080px; margin: 0 auto; }

/* ── Topbar marketing ──────────────────────────────────────────── */
.lp-topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.lp-topbar .lp-wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.lp-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: var(--text); }
.lp-logo .lp-logo-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.lp-nav-links { display: flex; align-items: center; gap: 28px; }
.lp-nav-links a { font-size: 13.5px; font-weight: 600; color: var(--muted); transition: color .15s; }
.lp-nav-links a:hover { color: var(--primary); }
.lp-cta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff !important; font-weight: 700; font-size: 13.5px;
  padding: 10px 20px; border-radius: 9px; transition: opacity .15s, transform .1s;
}
.lp-cta-btn:hover { opacity: .92; }
.lp-cta-btn:active { transform: scale(.97); }
.lp-cta-btn.ghost { background: transparent; color: var(--primary) !important; border: 1.5px solid var(--border); }

/* ── Hero ──────────────────────────────────────────────────────── */
.lp-hero {
  background: radial-gradient(circle at top right, #e1f0ff 0%, #f7fbff 45%, #f8fafc 100%);
  text-align: center; padding: 88px 24px 72px;
}
/* Đã đăng nhập: .lp-topbar (marketing) không render, .content đã có
   padding-top để né topbar chung rồi — bớt đệm trên để khỏi cộng dồn. */
.lp > .lp-hero:first-child {
  padding-top: 40px;
}
.lp-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #dbeafe; color: #1d4ed8; font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px; margin-bottom: 22px;
}
.lp-hero h1 { font-size: 40px; font-weight: 800; line-height: 1.2; margin: 0 0 18px; letter-spacing: -.5px; overflow-wrap: break-word; }
.lp-hero h1 span { color: var(--primary); }
.lp-hero p.lp-sub { font-size: 16px; color: var(--muted); max-width: 600px; margin: 0 auto 32px; line-height: 1.6; }
.lp-hero-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.lp-hero-actions .lp-cta-btn { padding: 13px 26px; font-size: 14.5px; }

.lp-hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 56px; flex-wrap: wrap; }
.lp-stat { text-align: center; }
.lp-stat b { display: block; font-size: 26px; font-weight: 800; color: var(--primary); }
.lp-stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ── Hai giải pháp ─────────────────────────────────────────────── */
.lp-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lp-pillar {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 32px; transition: transform .18s, box-shadow .18s;
}
.lp-pillar:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,42,.08); }
.lp-pillar-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; margin-bottom: 18px; color: #fff;
}
.lp-pillar-icon.blue { background: linear-gradient(135deg,#2563eb,#1d4ed8); }
.lp-pillar-icon.teal { background: linear-gradient(135deg,#0f766e,#0d9488); }
.lp-pillar h3 { font-size: 19px; font-weight: 800; margin: 0 0 8px; }
.lp-pillar p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0 0 18px; }
.lp-pillar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lp-pillar li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--text); }
.lp-pillar li svg { flex-shrink: 0; margin-top: 1px; color: var(--primary); }

/* ── Section heading ──────────────────────────────────────────── */
.lp-section-head { text-align: center; max-width: 560px; margin: 0 auto 44px; }
.lp-section-head .lp-eyebrow { font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; display: block; }
.lp-section-head h2 { font-size: 28px; font-weight: 800; margin: 0 0 10px; }
.lp-section-head p { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0; }

/* ── Feature grid ──────────────────────────────────────────────── */
.lp-features { background: var(--surface); }
.lp-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-feature {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px;
  transition: border-color .15s, transform .15s;
}
.lp-feature:hover { border-color: var(--primary); transform: translateY(-2px); }
.lp-feature-icon {
  width: 42px; height: 42px; border-radius: 11px; background: rgba(15,118,110,.1);
  color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.lp-feature h4 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.lp-feature p { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }

/* ── Vì sao chọn ──────────────────────────────────────────────── */
.lp-why { background: #f8fafc; }
.lp-why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.lp-why-item { text-align: center; }
.lp-why-icon {
  width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 1.5px solid var(--border);
  color: var(--primary); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.lp-why-item h4 { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.lp-why-item p { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; }

/* ── CTA banner ──────────────────────────────────────────────── */
.lp-cta-banner {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  text-align: center; border-radius: 24px; padding: 56px 32px;
  margin: 0 24px 64px;
}
.lp-cta-banner.lp-wrap { max-width: 1080px; }
.lp-cta-banner h2 { color: #fff; font-size: 26px; font-weight: 800; margin: 0 0 12px; }
.lp-cta-banner p { color: rgba(255,255,255,.85); font-size: 14px; margin: 0 0 26px; }
.lp-cta-banner .lp-cta-btn { background: #fff; color: var(--primary) !important; }

/* ── Hai ứng dụng (app cards) ──────────────────────────────────── */
.lp-app-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  max-width: 920px; margin: 0 auto;
}
.lp-app-card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 28px; display: flex; flex-direction: column;
  box-shadow: 0 2px 16px rgba(15, 23, 42, .04);
  transition: box-shadow .18s, transform .18s;
}
.lp-app-card:hover { box-shadow: 0 10px 32px rgba(15, 23, 42, .09); transform: translateY(-2px); }
.lp-app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.lp-app-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.lp-app-icon.sm { width: 38px; height: 38px; border-radius: 11px; }
.lp-app-icon.blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.lp-app-icon.teal { background: linear-gradient(135deg, #0f766e, #0d9488); }
.lp-app-head h2 { font-size: 21px; font-weight: 800; margin: 0; }
.lp-app-tagline { font-size: 13px; color: var(--muted); font-weight: 600; margin: 2px 0 0; }
.lp-app-desc { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0 0 18px; }
.lp-app-feats { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.lp-app-feats li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text); }
.lp-app-feats li svg { flex-shrink: 0; margin-top: 2px; color: var(--primary); }

/* ── Hàng nút tải ──────────────────────────────────────────────── */
.lp-dl-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.lp-dl-btn {
  display: inline-flex; align-items: center; gap: 11px; flex: 1 1 0; min-width: 150px;
  padding: 11px 16px; border-radius: 12px; text-decoration: none;
  background: var(--text); color: #fff !important;
  transition: opacity .15s, transform .1s, background .15s;
}
.lp-dl-btn:hover { opacity: .92; }
.lp-dl-btn:active { transform: scale(.98); }
.lp-dl-btn svg { flex-shrink: 0; }
.lp-dl-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lp-dl-text b { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.lp-dl-text small { font-size: 11px; opacity: .75; }
.lp-dl-btn.is-soon {
  background: #f1f5f9; color: var(--muted) !important;
  cursor: not-allowed; pointer-events: none;
}
.lp-dl-btn.web { background: linear-gradient(135deg, #0f766e, #0d9488); }

/* ── Nhãn loại ứng dụng (web / máy tính) ───────────────────────── */
.lp-tag-web, .lp-tag-desktop {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; vertical-align: middle;
  letter-spacing: .2px; text-transform: none; white-space: nowrap;
}
.lp-tag-web { background: #ccfbf1; color: #0f766e; }
.lp-tag-desktop { background: #dbeafe; color: #1d4ed8; }
.lp-app-head h2 .lp-tag-web { margin-left: 6px; }

/* ── Hướng dẫn sử dụng (web app) ───────────────────────────────── */
.lp-steps {
  list-style: none; counter-reset: step; padding: 0; margin: 0 0 18px;
  display: grid; gap: 12px;
}
.lp-steps li {
  position: relative; padding-left: 34px; counter-increment: step;
  font-size: 13.5px; color: var(--text); line-height: 1.55;
}
.lp-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: #ccfbf1; color: #0f766e; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.lp-steps li b { font-weight: 700; }

/* ── Hướng dẫn sử dụng (Guide section) ──────────────────────────────── */
.lp-guide {
  background: #f8fafc; padding: 88px 24px;
}
.lp-guide-content {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-top: 48px;
}
.lp-guide-col h3 {
  font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}

.lp-guide-list {
  display: grid; gap: 16px;
}
.lp-guide-list dt {
  font-weight: 700; color: var(--text); font-size: 13.5px;
}
.lp-guide-list dd {
  margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5;
}

.lp-guide-steps {
  list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px;
}
.lp-guide-steps li {
  position: relative; padding-left: 28px; counter-increment: step;
  font-size: 13.5px; color: var(--text); line-height: 1.55;
}
.lp-guide-steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.lp-guide-features {
  list-style: none; padding: 0; display: grid; gap: 12px;
}
.lp-guide-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--text); line-height: 1.5;
}
.lp-guide-features svg {
  flex-shrink: 0; margin-top: 2px; color: var(--primary);
}

.lp-guide-note {
  margin-top: 40px; padding: 16px; border-radius: 12px; background: #e0f2fe;
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px; color: #075985; line-height: 1.6;
}
.lp-guide-note svg {
  flex-shrink: 0; margin-top: 2px; color: #0369a1;
}

/* ── Khu vực tải ứng dụng ──────────────────────────────────────── */
.lp-download { background: #f1f5f9; }
.lp-dl-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  max-width: 820px; margin: 0 auto;
}
.lp-dl-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px;
}
.lp-dl-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.lp-dl-card-head b { font-size: 16px; font-weight: 800; }
.lp-dl-note {
  display: flex; align-items: flex-start; gap: 8px; justify-content: center;
  max-width: 600px; margin: 28px auto 0; text-align: left;
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.lp-dl-note svg { flex-shrink: 0; margin-top: 2px; color: var(--primary); }
.lp-dl-note b { color: var(--text); }

/* ── Footer ──────────────────────────────────────────────────── */
.lp-footer { background: #fff; border-top: 1px solid var(--border); padding: 32px 24px; }
.lp-footer .lp-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.lp-footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.lp-footer-links a { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.lp-footer-links a:hover { color: var(--primary); }
.lp-footer-copy { font-size: 12px; color: var(--muted); }

/* ── Logo + nav links khi gắn vào topbar chung (đã đăng nhập) ──── */
.lp-topbar-inline {
  display: flex; align-items: center; gap: 22px; margin-left: 6px; min-width: 0;
}
.lp-topbar-inline a { text-decoration: none; color: inherit; }
.lp-topbar-inline .lp-logo { font-size: 15px; gap: 6px; flex-shrink: 0; }
.lp-topbar-inline .lp-logo-mark { width: 26px; height: 26px; }
.lp-topbar-inline .lp-nav-links { gap: 16px; }
.lp-topbar-inline .lp-nav-links a { font-size: 12.5px; }

@media (max-width: 860px) {
  .lp-topbar-inline .lp-nav-links { display: none; }
  .lp-topbar-inline .lp-logo { font-size: 13px; }
  .lp-topbar-inline .lp-logo-mark { width: 22px; height: 22px; }
}
@media (max-width: 420px) {
  .lp-topbar-inline .lp-logo { font-size: 0; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .lp-pillars { grid-template-columns: 1fr; }
  .lp-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-why-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-app-grid { grid-template-columns: 1fr; max-width: 520px; }
  .lp-dl-cards { grid-template-columns: 1fr; max-width: 520px; }
  .lp-hero h1 { font-size: 30px; }

  /* Cố định topbar marketing trên mobile/tablet.
     Dùng fixed thay sticky vì body có overflow-x:hidden khiến sticky
     bị vô hiệu trên nhiều trình duyệt di động. */
  .lp-topbar {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 12px 16px;
    /* Đẩy nội dung xuống dưới vùng tai thỏ/Dynamic Island */
    padding-top: calc(12px + env(safe-area-inset-top));
  }
  /* Hero ngay sau topbar cần đệm trên để không bị topbar cố định che. */
  .lp-topbar + .lp-hero { padding-top: calc(78px + env(safe-area-inset-top)); }
}
@media (max-width: 600px) {
  .lp-nav-links { display: none; }
  .lp section { padding: 44px 16px; }
  .lp-hero { padding: 56px 16px 48px; }
  .lp > .lp-hero:first-child { padding-top: 24px; }
  .lp-hero h1 { font-size: 25px; }
  .lp-hero p.lp-sub { font-size: 14px; }
  .lp-hero-stats { gap: 28px; }
  .lp-feature-grid { grid-template-columns: 1fr; }
  .lp-why-grid { grid-template-columns: 1fr 1fr; }
  .lp-cta-banner { margin: 0 12px 44px; padding: 40px 20px; }
  .lp-cta-banner h2 { font-size: 21px; }
  .lp-footer .lp-wrap { flex-direction: column; align-items: flex-start; }
}
