/* Tách nguyên văn từ public/index.php (giai đoạn 1 tái kiến trúc, 27/09/2026). */
/* ============================================================
   DOCX.VN — Theme "Mực & Giấy" (giấy ấm · mực navy · con dấu)
   Màu + phông (Inter): /assets/css/tokens.css (chung toàn site, 28/09)
   Toàn bộ biến màu/chữ nằm ở /assets/css/tokens.css
   ============================================================ */
/* reset, a, button, h1-h4, @keyframes spin: /assets/css/base.css (dùng chung) */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--t1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ============================================================ NAV */
.site-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 28px;
  height: 62px; display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-size: 20px; font-weight: 900; letter-spacing: -1px;
  display: flex; align-items: center;
}
.logo-accent {
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-right { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.nav-vip-short { display: none; }
.nav-user-name {
  font-size: 13px; font-weight: 600; color: var(--t2);
  padding: 0 8px;
}

.nav-role.vip {
  background: linear-gradient(135deg,var(--gold-wash),#EAD59B);
  color: var(--gold-ink); border-color: #E7CE97;
}

/* ============================================================ HERO */
.hero {
  background: var(--grad);
  position: relative; overflow: hidden; min-height: 580px;
}
.hero::before {
  content: ''; position: absolute;
  width: 700px; height: 700px; border-radius: 50%;
  background: rgba(255,255,255,.05);
  top: -300px; right: -200px; pointer-events: none;
}
.hero::after {
  content: ''; position: absolute;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -150px; left: -80px; pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 580px;
  position: relative; z-index: 1;
}

/* Hero Left */
.hero-left {
  padding: 80px 52px 80px 0;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 99px;
  margin-bottom: 26px; width: fit-content; letter-spacing: .3px;
}
.hero h1 {
  font-size: 54px; font-weight: 900; line-height: 1.06;
  letter-spacing: -2.5px; color: #fff; margin-bottom: 20px;
}
.hero-desc {
  font-size: 16px; color: rgba(255,255,255,.78);
  line-height: 1.78; max-width: 400px; margin-bottom: 36px;
}
.hero-btns {
  display: flex; gap: 12px; align-items: center; margin-bottom: 44px; flex-wrap: wrap;
}
.btn-hero-main {
  height: 50px; padding: 0 28px; border-radius: 12px;
  font-size: 15px; font-weight: 700; color: var(--v1);
  border: none; background: #fff;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  box-shadow: 0 4px 20px rgba(0,0,0,.15); transition: .2s;
}
.btn-hero-main:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.2); }
.btn-hero-sec {
  height: 50px; padding: 0 24px; border-radius: 12px;
  font-size: 15px; font-weight: 600; color: #fff;
  border: 1.5px solid rgba(255,255,255,.35); background: transparent;
  font-family: var(--font-body); transition: .15s;
}
.btn-hero-sec:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.6); }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.92); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 99px;
}

/* Hero Right */
.hero-right {
  background: #fff;
  padding: 56px 0 56px 60px;
  display: flex; align-items: center;
  clip-path: polygon(44px 0, 100% 0, 100% 100%, 0 100%);
}

/* ============================================================ UPLOAD CARD */
.upload-card {
  width: 100%; max-width: 390px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 24px; padding: 8px;
  box-shadow: var(--shadow-lg);
}
.dropzone {
  border: 1.5px dashed #B6CBE8;
  border-radius: 18px;
  padding: 40px 24px;
  text-align: center; cursor: pointer; transition: .2s;
  background: #fff;
  display: block;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--v1);
  background: var(--bg-3);
}
.dz-blob {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(14,44,78,.3);
  transition: transform .2s;
}
.dropzone:hover .dz-blob { transform: translateY(-4px); }
.dz-title { font-size: 16px; font-weight: 700; color: var(--t1); margin-bottom: 7px; }
.dz-hint { font-size: 13px; color: var(--t3); margin-bottom: 20px; }
.btn-up {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 24px; border-radius: 12px;
  font-size: 14px; font-weight: 700; color: #fff;
  border: none; background: var(--grad);
  font-family: var(--font-body);
  box-shadow: 0 4px 16px rgba(14,44,78,.3); transition: .2s;
}
.btn-up:hover { box-shadow: 0 6px 24px rgba(14,44,78,.4); transform: translateY(-1px); }
#file { display: none; }
.card-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 8px 4px;
}
.card-meta-label { font-size: 12px; color: var(--t3); }
.fmt-row { display: flex; gap: 4px; }
.fmt {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 6px; padding: 2px 8px;
  font-size: 11px; font-weight: 700; color: var(--v1);
}
.free-info {
  background: var(--bg-3);
  border-radius: 12px; margin-top: 4px;
  padding: 11px 14px;
  font-size: 13px; color: var(--t2); font-weight: 500;
  text-align: center;
}
.free-info b, .free-info #freeRemain { color: var(--v1); font-weight: 800; }

/* Upload status */
#status { margin-top: 14px; }
.processing {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px;
  font-size: 13.5px; font-weight: 600; color: var(--v1);
}
.spinner-premium {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 2.5px solid var(--border);
  border-top-color: var(--v1);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.success-box {
  background: var(--c-bg-emerald-50); color: var(--c-fg-emerald-700);
  border: 1.5px solid var(--c-ln-emerald-200);
  border-radius: 12px; padding: 12px 14px;
  font-size: 13.5px; font-weight: 700; text-align: center;
  margin-bottom: 10px;
}
.error-box {
  background: var(--c-bg-red-50); color: var(--c-fg-red-700);
  border: 1.5px solid var(--c-ln-red-200);
  border-radius: 12px; padding: 12px 14px;
  font-size: 13.5px; font-weight: 600; text-align: center;
}
.download-btn {
  display: block; text-align: center;
  background: var(--green); color: #fff;
  border-radius: 12px; padding: 14px;
  font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 16px rgba(16,185,129,.25);
  transition: .2s;
}
.download-btn:hover { background: #059669; box-shadow: 0 6px 24px rgba(16,185,129,.35); transform: translateY(-1px); }

/* ============================================================ SECTIONS */
.section { padding: 96px 0; }
.section.bg-alt { background:var(--o-bg-16); }
.section + .section { border-top: 1.5px solid var(--border); }
.sec-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--v1); margin-bottom: 12px;
}
.sec-title {
  font-size: 38px; font-weight: 900; letter-spacing: -1.5px;
  margin-bottom: 14px; color: var(--t1);
  font-family: var(--font-display);
}
.sec-sub {
  font-size: 15.5px; color:var(--o-tx-2); max-width: 540px; line-height: 1.75;
}
.sec-head { margin-bottom: 56px; }

/* ============================================================ STEPS */
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.step-card {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 22px; padding: 36px 28px;
  position: relative; overflow: hidden; transition: .25s;
}
.step-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: .3s;
}
.step-card:hover {
  border-color: transparent;
  box-shadow: 0 16px 48px rgba(14,44,78,.14);
  transform: translateY(-4px);
}
.step-card:hover::before { transform: scaleX(1); }
.step-badge {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-3); border: 1.5px solid var(--border);
  color: var(--v1); font-family: var(--font-display);
  font-size: 15px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.step-ico {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(14,44,78,.25);
}
.step-card h3 {
  font-size: 17px; font-weight: 800; margin-bottom: 10px; color: var(--t1);
}
.step-card p { font-size: 14px; color: var(--t2); line-height: 1.7; }

/* ============================================================ PRICING */
.price-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; max-width: 760px;
}
.price-card {
  border: 1.5px solid var(--border);
  border-radius: 24px; padding: 36px;
  background: #fff; display: flex; flex-direction: column;
}
.price-card.hl {
  background: var(--grad); color: #fff;
  border-color: transparent;
  box-shadow: 0 20px 60px rgba(14,44,78,.3);
  position: relative;
}
.price-card.hl::after {
  content: 'KHUYÊN DÙNG';
  position: absolute; top: -1px; right: 28px;
  background: #fff; color: var(--v1);
  font-size: 10px; font-weight: 800; letter-spacing: .8px;
  padding: 4px 14px; border-radius: 0 0 10px 10px;
}
.ptier {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--t3); margin-bottom: 14px;
}
.hl .ptier { color: rgba(255,255,255,.7); }
.pamount {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 900;
  letter-spacing: -2px; margin-bottom: 4px; line-height: 1; color: var(--t1);
}
.hl .pamount { color: #fff; }
.pamount small {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500; letter-spacing: 0;
  color: var(--t3);
}
.hl .pamount small { color: rgba(255,255,255,.65); }
.pdesc { font-size: 13px; color: var(--t3); margin-bottom: 28px; }
.hl .pdesc { color: rgba(255,255,255,.65); }
.pf { list-style: none; margin-bottom: 30px; flex: 1; }
.pf li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--t2);
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.hl .pf li { color: rgba(255,255,255,.85); border-bottom-color: rgba(255,255,255,.15); }
.pf li:last-child { border: none; }
.ico-ok { color: var(--green); flex-shrink: 0; margin-top: 1px; }
.hl .ico-ok { color: #6ee7b7; }
.ico-no { color: #d1d5db; flex-shrink: 0; margin-top: 1px; }
.btn-prc {
  width: 100%; height: 48px; border-radius: 12px;
  font-size: 14px; font-weight: 700;
  border: 1.5px solid var(--border); background: var(--bg-2); color: var(--t1);
  font-family: var(--font-body); transition: .15s;
}
.btn-prc:hover { background: var(--bg-3); border-color: var(--v1); color: var(--v1); }
.btn-prc.inv {
  background: #fff; color: var(--v1); border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.btn-prc.inv:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(0,0,0,.2); }

/* ============================================================ FAQ */
.faq-wrap { max-width: 680px; }
.faq-row { border-bottom: 1.5px solid var(--border); }
.faq-q {
  padding: 20px 0; font-size: 15px; font-weight: 700; color: var(--t1);
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; user-select: none;
}
.faq-dot {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: var(--bg-3); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--v1); font-weight: 400;
  transition: all .2s;
}
.faq-row.open .faq-dot {
  background: var(--grad); color: #fff; border: none;
  transform: rotate(45deg);
}
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s, padding .3s; }
.faq-row.open .faq-a { max-height: 220px; padding-bottom: 20px; }
.faq-a p { font-size: 14px; color: var(--t2); line-height: 1.8; }

/* ============================================================ CTA BAND */
.cta-band {
  background: var(--grad);
  border-radius: 28px; padding: 60px 48px;
  text-align: center; margin: 0 28px 96px;
  position: relative; overflow: hidden;
  box-shadow: 0 24px 64px rgba(14,44,78,.3);
}
.cta-band::before {
  content: ''; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(255,255,255,.05);
  top: -200px; right: -100px; pointer-events: none;
}
.cta-band h2 {
  font-size: 38px; font-weight: 900;
  color: #fff; letter-spacing: -1.5px; margin-bottom: 14px;
}
.cta-band p { font-size: 16px; color: rgba(255,255,255,.75); margin-bottom: 30px; }
.btn-cta {
  height: 52px; padding: 0 32px; border-radius: 14px;
  font-size: 15px; font-weight: 800; color: var(--v1);
  border: none; background:var(--o-bg-5);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  box-shadow:var(--o-sh-1); transition: .2s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow:var(--o-sh-2); }

/* ============================================================ OVERLAY MODALS */

/* Form boxes */

/* ============================================================ VIP MODAL */

/* ============================================================ PAYMENT MODAL */

/* ============================================================ FORGOT POPUP */

/* ============================================================ RESPONSIVE (TỐI ƯU TOÀN DIỆN CHO DI ĐỘNG & TABLET) */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; min-height: unset; }
  .hero-left { padding: 56px 0 36px; text-align: center; align-items: center; }
  .hero-chip { margin-left: auto; margin-right: auto; }
  .hero h1 { font-size: 40px; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-right {
    clip-path: none;
    padding: 0 0 48px;
    justify-content: center;
    background: var(--bg-sunken);
  }
  .steps-grid { grid-template-columns: 1fr; gap: 16px; }
  .price-grid { grid-template-columns: 1fr; }

  .cta-band { margin: 0 0 64px; border-radius: 0; padding: 48px 28px; }
  .cta-band h2 { font-size: 30px; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-inner { padding: 0 12px; height: 56px; }
  .nav-user-name { display: none !important; }
  .nav-right { gap: 4px; flex-wrap: nowrap !important; }
  .nav-right .nb { display: inline-flex !important; align-items: center; justify-content: center; height: 32px; padding: 0 8px; font-size: 12px; white-space: nowrap; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 32px; letter-spacing: -1.2px; }
  .sec-title { font-size: 26px; }
  .hero-btns { flex-direction: column; width: 100%; align-items: stretch; }
  .btn-hero-main, .btn-hero-sec { width: 100%; justify-content: center; }

  .dropzone { padding: 28px 16px; }
}
@media (max-width: 480px) {
  .nav-inner { padding: 0 8px; height: 54px; }
  .logo { font-size: 16px; letter-spacing: -0.5px; }
  .nav-right { gap: 3px; flex-wrap: nowrap !important; }

  .nav-right .nb { height: 30px; padding: 0 6px; font-size: 11px; }

  .nav-vip-full { display: none !important; }
  .nav-vip-short { display: inline !important; }
  .hero-left { padding: 36px 0 24px; }
  .hero h1 { font-size: 26px; letter-spacing: -0.8px; }
  .hero-desc { font-size: 13.5px; margin-bottom: 20px; }
  .dz-title { font-size: 15px; }
  .dz-desc { font-size: 11.5px; }
  .dropzone { padding: 20px 12px; }
}

/* ============================================================ SIGNATURE: CON DẤU */
.upload-card { position: relative; }
.doc-seal {
  position: absolute; top: -16px; right: -12px; z-index: 4;
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  text-align: center; color: var(--seal);
  background: var(--bg-raised);
  border: 2px solid var(--seal);
  box-shadow: inset 0 0 0 3px var(--bg-raised), inset 0 0 0 4px var(--seal),
              0 6px 18px rgba(14,44,78,.10);
  transform: rotate(-8deg);
  font-family: var(--font-mono); pointer-events: none;
}
.doc-seal-top { font-size: 8.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.doc-seal-mark { font-size: 21px; line-height: 1; margin: 1px 0; }
.doc-seal-bot { font-size: 7px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
/* mã định dạng file dùng mặt chữ dữ liệu (mono) */
.fmt { font-family: var(--font-mono); letter-spacing: .02em; }
@media (max-width: 640px) {
  .doc-seal { width: 70px; height: 70px; top: -12px; right: -6px; }
  .doc-seal-mark { font-size: 18px; }
}

/* User Profile Modal Styles */

/* Điện thoại (27/09): 3 tab chia đều bề ngang, chữ được xuống dòng (trước: tab 'Lịch sử chuyển đổi' khuất bên phải);
   bảng lịch sử -> mỗi tài liệu 1 THẺ 'tên cột: giá trị' (trước: tên tệp nowrap -> bảng 765px, trạng thái/nút tải bị khuất) */

