/* Trang đối tác: /ctv và /seller — cùng tone với /custom-webapp, /ve-chung-toi (RULES.md: không đổi màu) */
body.pp {
  --pp-ink: #0f172a; --pp-text: #334155; --pp-muted: #64748b; --pp-line: #e5e7eb; --pp-soft: #f8fafc;
  --pp-green: #10b981; --pp-green-h: #059669; --pp-green-d: #047857; --pp-green-bg: #d1fae5; --pp-bg: #f5f4ef;
  background: var(--pp-bg); color: var(--pp-text); line-height: 1.65;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.pp-main *, .pp-main *::before, .pp-main *::after, .pp-modal *, .pp-modal *::before, .pp-modal *::after { box-sizing: border-box; }
.pp-main h1, .pp-main h2, .pp-main h3, .pp-main h4, .pp-main p, .pp-modal h3, .pp-modal p { margin-top: 0; }
.pp-main svg, .pp-modal svg { flex: none; }

/* ── HERO ── */
.pp-hero { background: linear-gradient(180deg, #ecfdf5 0%, var(--pp-bg) 100%); padding: 56px 20px 64px; border-bottom: 1px solid var(--pp-line); }
.pp-hero__inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: start; }
.pp-hero__copy { padding-top: 8px; }
.pp-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--pp-green-bg); color: var(--pp-green-d); font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 20px; margin-bottom: 18px; }
.pp-h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 900; color: var(--pp-ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 16px; }
.pp-h1 em { font-style: normal; color: var(--pp-green); }
.pp-hero .pp-h1 { font-size: clamp(28px, 3.8vw, 44px); }
.pp-main .btn-main svg { width: 17px; height: 17px; }
.pp-lead { font-size: clamp(15px, 1.8vw, 17px); color: #475569; margin: 0 0 26px; max-width: 540px; }
.pp-points { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.pp-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--pp-muted); line-height: 1.55; }
.pp-points strong { display: block; color: var(--pp-ink); font-size: 14.5px; font-weight: 700; margin-bottom: 1px; }
.pp-ic { width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--pp-line); color: var(--pp-green-d); display: grid; place-items: center; flex: none; }
.pp-ic svg { width: 18px; height: 18px; }
.pp-kpis { display: flex; flex-wrap: wrap; gap: 10px; }
.pp-kpi { background: #fff; border: 1px solid var(--pp-line); border-radius: 12px; padding: 10px 16px; min-width: 128px; }
.pp-kpi b { display: block; font-size: 20px; font-weight: 900; color: var(--pp-ink); line-height: 1.25; }
.pp-kpi > span { font-size: 12px; color: var(--pp-muted); font-weight: 600; }

/* ── CARD / AUTH ── */
.pp-auth { position: sticky; top: 88px; }
.pp-card { background: #fff; border: 1px solid var(--pp-line); border-radius: 16px; box-shadow: 0 20px 48px rgba(15, 23, 42, .08); overflow: hidden; }
.pp-card__head { padding: 22px 24px 0; }
.pp-card__title { font-size: 18px; font-weight: 800; color: var(--pp-ink); margin: 0 0 4px; line-height: 1.35; }
.pp-card__sub { font-size: 13.5px; color: var(--pp-muted); margin: 0; line-height: 1.55; }
.pp-card__body { padding: 20px 24px 24px; }
.pp-card__icon { width: 48px; height: 48px; border-radius: 14px; background: var(--pp-green-bg); color: var(--pp-green-d); display: grid; place-items: center; margin-bottom: 14px; }
.pp-card__icon svg { width: 24px; height: 24px; }
.pp-seg { display: flex; gap: 4px; background: #f1f5f9; padding: 4px; border-radius: 12px; margin: 0 24px; }
.pp-seg + .pp-card__body { padding-top: 18px; }
.pp-seg__btn { flex: 1; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--pp-muted); cursor: pointer; }
.pp-seg__btn.active { background: #fff; color: var(--pp-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.pp-card__foot { border-top: 1px solid #f1f5f9; padding: 14px 24px; font-size: 12.5px; color: var(--pp-muted); text-align: center; background: var(--pp-soft); }

.pp-spinner { width: 34px; height: 34px; border: 3px solid #e2e8f0; border-top-color: var(--pp-green); border-radius: 50%; margin: 0 auto 12px; animation: ppSpin .8s linear infinite; }
@keyframes ppSpin { to { transform: rotate(360deg); } }

/* ── NÚT / LINK / THÔNG BÁO ── */
.pp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--pp-green); color: #fff; font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; text-decoration: none; transition: background .15s; }
.pp-btn:hover { background: var(--pp-green-h); color: #fff; }
.pp-btn:disabled { opacity: .6; cursor: not-allowed; }
.pp-btn svg { width: 17px; height: 17px; }
.pp-btn--block { width: 100%; }
.pp-btn--ghost { background: #fff; color: var(--pp-ink); border: 1.5px solid var(--pp-line); }
.pp-btn--ghost:hover { background: var(--pp-soft); color: var(--pp-ink); }
.pp-link { color: var(--pp-green-d); font-weight: 700; cursor: pointer; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; }
.pp-link:hover { text-decoration: underline; }
.pp-note { font-size: 12.5px; color: var(--pp-muted); line-height: 1.6; }
.pp-alert { border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.55; margin: 0 0 14px; }
.pp-alert--err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.pp-alert--ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.pp-alert--warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.pp-alert--info { background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; }

/* ── SECTION ── */
.pp-section { padding: 64px 20px; }
.pp-section--white { background: #fff; }
.pp-section__inner { max-width: 1080px; margin: 0 auto; }
.pp-eyebrow { display: block; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pp-green-d); margin-bottom: 8px; }
.pp-h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; color: var(--pp-ink); text-align: center; margin: 0 0 10px; line-height: 1.25; }
.pp-h2sub { font-size: 15px; color: var(--pp-muted); text-align: center; max-width: 600px; margin: 0 auto 36px; }
.pp-grid3, .pp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pp-grid4, .pp-steps--4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pp-feature, .pp-step { background: #fff; border: 1px solid var(--pp-line); border-radius: 16px; padding: 22px; }
.pp-section--white .pp-feature, .pp-section--white .pp-step { background: var(--pp-soft); }
.pp-feature__ic { width: 42px; height: 42px; border-radius: 12px; background: var(--pp-green-bg); color: var(--pp-green-d); display: grid; place-items: center; margin-bottom: 14px; }
.pp-feature__ic svg { width: 21px; height: 21px; }
.pp-step__n { width: 34px; height: 34px; border-radius: 50%; background: var(--pp-ink); color: #fff; font-weight: 800; font-size: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.pp-feature h3, .pp-step h3 { font-size: 15.5px; font-weight: 800; color: var(--pp-ink); margin: 0 0 6px; line-height: 1.4; }
.pp-feature p, .pp-step p { font-size: 13.5px; color: var(--pp-muted); margin: 0; line-height: 1.6; }
.pp-center { text-align: center; margin-top: 24px; font-size: 14px; color: var(--pp-muted); }

/* ── CẤP BẬC ── */
.pp-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pp-tier { position: relative; background: #fff; border: 1px solid var(--pp-line); border-radius: 16px; padding: 24px; }
.pp-tier--top { border: 2px solid var(--pp-green); box-shadow: 0 16px 36px rgba(16, 185, 129, .14); }
.pp-tier__flag { position: absolute; top: -12px; right: 18px; background: var(--pp-green); color: #fff; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 20px; }
.pp-tier__name { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 800; color: var(--pp-ink); }
.pp-tier__pct { font-size: 46px; font-weight: 900; color: var(--pp-ink); line-height: 1; margin: 16px 0 2px; letter-spacing: -.02em; }
.pp-tier__cap { font-size: 12.5px; color: var(--pp-muted); font-weight: 600; }
.pp-tier ul { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid #f1f5f9; display: grid; gap: 8px; }
.pp-tier li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--pp-muted); }
.pp-tier li b { color: var(--pp-ink); font-weight: 700; text-align: right; }
.pp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pp-dot--silver { background: #9ca3af; }
.pp-dot--gold { background: #f5a623; }
.pp-dot--diamond { background: #38bdf8; }

/* ── FAQ ── */
.pp-faq { max-width: 760px; margin: 0 auto; }
.pp-faq details { background: #fff; border: 1px solid var(--pp-line); border-radius: 12px; margin-bottom: 10px; }
.pp-section--white .pp-faq details { background: var(--pp-soft); }
.pp-faq summary { cursor: pointer; font-size: 14.5px; font-weight: 700; color: var(--pp-ink); padding: 16px 18px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pp-faq summary::-webkit-details-marker { display: none; }
.pp-faq summary::after { content: ''; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #eef2f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 12px no-repeat; transition: transform .2s; }
.pp-faq details[open] summary::after { transform: rotate(45deg); background-color: var(--pp-green-bg); }
.pp-faq .a { font-size: 14px; color: #475569; line-height: 1.7; padding: 0 18px 16px; }

/* ── LIÊN KẾT CHÉO ── */
.pp-cross { max-width: 1080px; margin: 0 auto; background: var(--pp-ink); border-radius: 20px; padding: 30px 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.pp-cross h3 { font-size: 20px; font-weight: 800; margin: 0 0 6px; color: #fff; }
.pp-cross p { margin: 0; color: #94a3b8; font-size: 14px; }
.pp-cross .pp-btn { background: #fff; color: var(--pp-ink); flex: none; }
.pp-cross .pp-btn:hover { background: #e2e8f0; color: var(--pp-ink); }

/* ── DASHBOARD ── */
.pp-dash { max-width: 1080px; margin: 0 auto; padding: 28px 20px 56px; }
.pp-dhead { position: relative; overflow: hidden; background: var(--pp-ink); border-radius: 20px; padding: 26px 28px; color: #fff; margin-bottom: 16px; }
.pp-dhead::after { content: ''; position: absolute; right: -90px; top: -90px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(16, 185, 129, .22), transparent 70%); pointer-events: none; }
.pp-dhead > * { position: relative; z-index: 1; }
.pp-dhead__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.pp-dhead__hello { font-size: 12.5px; color: #94a3b8; font-weight: 600; margin: 0 0 2px; }
.pp-dhead__name { font-size: 22px; font-weight: 800; margin: 0; color: #fff; line-height: 1.3; }
.pp-dhead__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-dbtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #e2e8f0; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pp-dbtn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.pp-dbtn svg { width: 15px; height: 15px; }
.pp-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: #fff; border: 1px solid var(--pp-line); border-radius: 14px; margin-bottom: 18px; scrollbar-width: none; }
.pp-tabs::-webkit-scrollbar { display: none; }
.pp-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--pp-muted); cursor: pointer; white-space: nowrap; user-select: none; }
.pp-tab svg { width: 16px; height: 16px; }
.pp-tab:hover { color: var(--pp-ink); background: var(--pp-soft); }
.pp-tab.active { background: var(--pp-ink); color: #fff; }
.pp-tbl { overflow-x: auto; }
.pp-tbl table { width: 100%; border-collapse: collapse; min-width: 520px; }
.pp-tbl th { background: var(--pp-soft); padding: 10px 14px; font-size: 11.5px; font-weight: 700; color: var(--pp-muted); text-align: left; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--pp-line); }
.pp-tbl td { padding: 12px 14px; font-size: 13.5px; border-bottom: 1px solid #f1f5f9; color: var(--pp-text); vertical-align: middle; }
.pp-tbl tr:last-child td { border-bottom: 0; }

/* ── MODAL ── */
.pp-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); overflow-y: auto; padding: 24px 16px; }
.pp-modal__box { background: #fff; border-radius: 16px; max-width: 760px; margin: 0 auto; padding: 0 24px 24px; box-shadow: 0 30px 60px rgba(15, 23, 42, .25); }
.pp-modal__head { position: sticky; top: 0; z-index: 2; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0 12px; border-bottom: 1px solid #f1f5f9; margin-bottom: 14px; }
.pp-modal__head h3 { font-size: 18px; font-weight: 800; color: var(--pp-ink); margin: 0; }
.pp-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f1f5f9; color: var(--pp-muted); display: grid; place-items: center; cursor: pointer; }
.pp-close:hover { background: #e2e8f0; color: var(--pp-ink); }
.pp-close svg { width: 16px; height: 16px; }

@media (max-width: 960px) {
  .pp-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pp-auth { position: static; max-width: 560px; }
  .pp-grid4, .pp-steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .pp-grid3, .pp-steps, .pp-tiers { grid-template-columns: minmax(0, 1fr); }
  .pp-tier--top { margin-top: 6px; }
  .pp-cross { flex-direction: column; align-items: flex-start; padding: 24px; }
}
@media (max-width: 560px) {
  .pp-hero { padding: 36px 16px 44px; }
  .pp-section { padding: 48px 16px; }
  .pp-grid4, .pp-steps--4 { grid-template-columns: minmax(0, 1fr); }
  .pp-kpi { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .pp-card__head { padding: 18px 18px 0; }
  .pp-card__body { padding: 18px; }
  .pp-seg { margin: 0 18px; }
  .pp-card__foot { padding: 12px 18px; }
  .pp-dash { padding: 18px 12px 44px; }
  .pp-dhead { padding: 20px 18px; border-radius: 16px; }
  .pp-modal { padding: 0; }
  .pp-modal__box { border-radius: 0; min-height: 100%; padding: 0 16px 20px; }
}
