/* ===== QTOOL.VN - trang công khai ===== */
:root { --brand: #2f5bea; --dark: #0f172a; --ink: #0f172a; --text: #1e293b; --muted: #64748b; --line: #e2e8f0; --soft: #f1f5f9; --bg: #ffffff; --ok: #15803d; --err: #b91c1c; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: 'Be Vietnam Pro', system-ui, sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 34px; letter-spacing: -.5px; }
.h2, h2 { font-size: 26px; }
input, select, textarea, button { font: inherit; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-sm { padding: 32px 0 56px; }
.section.alt { background: var(--soft); }
.center { text-align: center; } .right { text-align: right; } .r { text-align: right; }
.muted { color: var(--muted); } .small { font-size: 14px; } .mt { margin-top: 18px; }
.hp { position: absolute; left: -9999px; }

/* nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 10px; cursor: pointer; line-height: 1.2; transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 24px; font-size: 17px; border-radius: 12px; }
.btn-sm { padding: 7px 13px; font-size: 14px; border-radius: 8px; }
.btn-outline { background: #fff; color: var(--brand); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text); }
.btn-block { display: flex; width: 100%; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.hd { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 21px; }
.logo img { max-height: 40px; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #7c3aed); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav > a, .dd-btn { color: var(--text); font-weight: 600; font-size: 15px; }
.main-nav > a.on { color: var(--brand); }
.main-nav .btn { color: #fff; } .main-nav .btn-outline { color: var(--brand); }
.acc { width: 36px; height: 36px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--brand) !important; text-transform: uppercase; }
.dd { position: relative; }
.dd-menu { display: none; position: absolute; top: 100%; left: -16px; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(15,23,42,.12); padding: 8px; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu { display: block; }
.dd-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.dd-menu a:hover { background: var(--soft); }
.dd-menu i { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--muted); background: var(--soft); border-radius: 99px; padding: 1px 8px; }
.menu-btn { display: none; border: 0; background: var(--soft); width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
.flash-wrap { padding-top: 16px; }

/* thông báo */
.alert { padding: 12px 15px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* hero */
.hero { padding: 64px 0 56px; background: radial-gradient(1000px 420px at 85% -10%, rgba(124,58,237,.10), transparent), radial-gradient(800px 400px at 0% 0%, rgba(47,91,234,.10), transparent); }
.hero.small { padding: 40px 0 36px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 44px; letter-spacing: -1px; }
.hero.small h1 { font-size: 34px; display: flex; align-items: center; gap: 12px; }
.eyebrow { display: inline-block; font-weight: 700; color: var(--brand); background: rgba(47,91,234,.08); padding: 4px 12px; border-radius: 99px; font-size: 14px; margin-bottom: 14px; }
.lead { font-size: 18.5px; color: #475569; max-width: 760px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: #475569; font-size: 15px; }
.ticks li::before { content: '✓ '; color: var(--ok); font-weight: 800; }
.hero-shot img { border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(15,23,42,.18); }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); } .breadcrumb .sep { margin: 0 6px; }

/* giải pháp */
.sec-title { text-align: center; font-size: 30px; margin-bottom: 30px; }
.sec-title.left { text-align: left; font-size: 23px; margin: 10px 0 14px; }
.sol-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sol-card { display: flex; flex-direction: column; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: #fff; color: var(--text); transition: transform .15s, box-shadow .15s; border-top: 4px solid var(--c, var(--brand)); }
.sol-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15,23,42,.10); }
.sol-card h3 { margin: 10px 0 6px; font-size: 19px; }
.sol-card p { color: var(--muted); font-size: 15px; flex: 1; margin: 0 0 14px; }
.sol-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; font-size: 24px; }
.sol-ic.big { width: 54px; height: 54px; font-size: 30px; display: inline-grid; }
.sol-go { font-weight: 700; color: var(--c, var(--brand)); }
.sol-card.soon { opacity: .8; } .sol-card.soon .sol-go { color: var(--muted); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat-grid > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.feat-grid b { font-size: 17px; color: var(--ink); }
.feat-grid p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.steps ol { list-style: none; counter-reset: s; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 30px; }
.steps li { counter-increment: s; background: var(--soft); border-radius: 14px; padding: 22px 20px 20px; position: relative; }
.steps li::before { content: counter(s); position: absolute; top: -14px; left: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps b { display: block; font-size: 17px; color: var(--ink); margin-top: 4px; }
.steps span { color: var(--muted); font-size: 15px; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: 99px; background: var(--soft); }
.soon-tag { background: #fef3c7; color: #92400e; }

/* card, form */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 18px; }
.card h3 { margin-bottom: 14px; }
label { display: block; font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 12px; }
label > input, label > select, label > textarea { display: block; width: 100%; margin-top: 5px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { border: 1px solid #cbd5e1; border-radius: 9px; padding: 10px 12px; background: #fff; color: var(--ink); font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(47,91,234,.18); border-color: var(--brand); }
input:disabled { background: var(--soft); color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.auth-wrap { padding: 48px 20px 70px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 430px; padding: 30px; box-shadow: 0 20px 50px rgba(15,23,42,.07); }
.auth-card h1 { font-size: 27px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 600; margin: 6px 0 4px; }
.btn-google:hover { background: var(--soft); }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.acc-grid, .stores-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.empty-box { border: 1px dashed #cbd5e1; border-radius: 14px; padding: 28px; text-align: center; color: var(--muted); }
.empty-box b { color: var(--ink); font-size: 18px; }

/* cửa hàng của tôi */
.store-list { display: flex; flex-direction: column; gap: 12px; }
.store-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-left: 5px solid var(--c, var(--brand)); border-radius: 14px; background: #fff; color: var(--text); transition: box-shadow .15s; }
.store-card:hover { box-shadow: 0 10px 28px rgba(15,23,42,.08); }
.store-card img, .sc-ic { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; flex: none; }
.sc-ic { background: var(--soft); display: grid; place-items: center; font-size: 26px; }
.sc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc-body b { font-size: 18px; color: var(--ink); }
.sc-body small { color: var(--muted); }
.store-card em { font-style: normal; font-weight: 700; color: var(--brand); white-space: nowrap; }
.lic-tag { display: inline-block; margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: #eff6ff; color: #1e40af; align-self: flex-start; }
.lic-tag.st-active { background: #f0fdf4; color: #166534; } .lic-tag.st-expiring { background: #fffbeb; color: #92400e; }
.lic-tag.st-expired, .lic-tag.st-locked { background: #fef2f2; color: #991b1b; }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.type-pick label { margin: 0; }
.type-pick input { position: absolute; opacity: 0; }
.type-pick span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 12px; font-size: 14px; text-align: center; cursor: pointer; }
.type-pick span i { font-style: normal; font-size: 22px; }
.type-pick span small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.type-pick input:checked + span { border-color: var(--brand); background: rgba(47,91,234,.06); color: var(--brand); }
.type-pick label.off span { opacity: .5; cursor: not-allowed; }

/* bảng giá */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 30px; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.price-table th { background: var(--soft); font-size: 14px; color: #334155; white-space: nowrap; }
.price-table th small { display: block; font-weight: 600; color: var(--ok); }
.price-table th.r, .price-table td.r { text-align: right; }
.price-table tr:last-child td { border-bottom: 0; }
.free { color: var(--ok); }

/* bài hướng dẫn */
.guide { background: #f8fafc; border-top: 1px solid var(--line); padding: 44px 0 64px; scroll-margin-top: 70px; }
.guide-title { font-size: 28px; margin: 0 0 22px; }
.guide-grid { display: grid; grid-template-columns: 250px minmax(0, 860px); gap: 36px; align-items: start; }
.toc { position: sticky; top: 90px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; max-height: calc(100vh - 120px); overflow: auto; }
.toc b { display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.toc li { margin-bottom: 5px; }
.toc a { color: #334155; }
.toc a.on, .toc a:hover { color: var(--brand); font-weight: 600; }
.prose { font-size: 16.5px; line-height: 1.75; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.prose td, .prose th { border: 1px solid var(--line); padding: 9px; }
.guide-body h2 { font-size: 23px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 1.8em; scroll-margin-top: 80px; }
.guide-body h2:first-of-type { border-top: 0; margin-top: .4em; }
.guide-body h3 { font-size: 18.5px; }
.guide-body figure { margin: 18px 0 26px; }
.guide-body figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.10); cursor: zoom-in; background: #fff; }
.guide-body figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.guide-body table td:first-child { white-space: nowrap; width: 1%; }
.guide-body code { background: var(--soft); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
.lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(15,23,42,.88); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* footer */
.site-footer { background: var(--dark); color: #cbd5e1; padding: 48px 0 20px; margin-top: 0; }
.ft { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 30px; }
.site-footer .logo { color: #fff; margin-bottom: 10px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer a { display: block; color: #cbd5e1; font-size: 15px; margin-bottom: 6px; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 14.5px; color: #94a3b8; }
.copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 16px; font-size: 13.5px; color: #94a3b8; }

@media (max-width: 960px) {
    .hero-grid, .acc-grid, .stores-grid, .guide-grid { grid-template-columns: 1fr; }
    .sol-grid { grid-template-columns: 1fr 1fr; }
    .feat-grid { grid-template-columns: 1fr 1fr; }
    .ft { grid-template-columns: 1fr 1fr; }
    .toc { position: static; max-height: none; }
    .menu-btn { display: block; }
    .main-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 18px; border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px rgba(15,23,42,.08); }
    body.nav-open .main-nav { display: flex; }
    .main-nav > a, .dd-btn { padding: 10px 0; display: block; }
    .main-nav .btn { margin-top: 8px; }
    .dd-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 6px 8px; min-width: 0; }
    .acc { display: none !important; }
}
@media (max-width: 640px) {
    h1, .hero.small h1 { font-size: 27px; }
    .hero h1 { font-size: 31px; }
    .lead { font-size: 16.5px; }
    .section { padding: 44px 0; }
    .sol-grid, .feat-grid, .steps ol, .ft, .grid-2 { grid-template-columns: 1fr; }
    .sec-title { font-size: 24px; }
    .btn-lg { width: 100%; }
}
