/* Ảnh Thẻ Online – giao diện chung */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #ffffff; --bg-soft: #f4f6fb; --card: #ffffff; --text: #0f172a; --muted: #5b6475; --line: #e4e8f0;
  --accent: #2f5bea; --accent-2: #1f46c7; --accent-soft: #eaf0ff; --accent-ink: #ffffff;
  --sun: #ffc93c; --sun-soft: #fff6dc;
  --ok: #16a34a; --ok-soft: #e7f7ed; --warn: #b7791f; --warn-soft: #fff4dc; --bad: #dc2626; --bad-soft: #fdecec;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(47, 91, 234, .18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --bg-soft: #111831; --card: #141c36; --text: #eef2ff; --muted: #a3acc4; --line: #26304f;
    --accent: #7b9bff; --accent-2: #9db4ff; --accent-soft: #1c2752; --accent-ink: #0b1020;
    --sun: #ffd166; --sun-soft: #2e2715;
    --ok: #4ade80; --ok-soft: #12301f; --warn: #f2c14e; --warn-soft: #33290f; --bad: #f87171; --bad-soft: #3a1616;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
img, canvas, video { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Đầu trang */
header.site { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.logo::before { content: ""; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #7c5cff); box-shadow: inset 0 0 0 5px rgba(255,255,255,.85); }
.logo span { color: var(--accent); }
nav.menu { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 15px; font-weight: 500; }
nav.menu a { color: var(--text); text-decoration: none; }
nav.menu a:hover { color: var(--accent); }
nav.menu a.nut-menu { background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 999px; font-weight: 600; }
main { padding: 24px 0 48px; }

/* Chữ */
h1 { font-size: 34px; line-height: 1.2; margin: 8px 0 12px; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 26px; line-height: 1.3; margin: 36px 0 12px; letter-spacing: -.015em; font-weight: 800; }
h3 { font-size: 18px; margin: 22px 0 8px; font-weight: 700; }
.lead { font-size: 18px; color: var(--muted); margin-top: 0; }
.note { color: var(--muted); font-size: 14px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }

/* Khối */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px;
  padding: 13px 22px; font: 600 16px/1.2 inherit; cursor: pointer; text-decoration: none; min-height: 48px; transition: transform .15s, background .15s, box-shadow .15s; box-shadow: 0 6px 16px rgba(47, 91, 234, .25); }
.btn:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn.lon { padding: 16px 28px; font-size: 17px; border-radius: 14px; min-height: 56px; }
.btn.phu { background: var(--card); color: var(--accent); border: 1.5px solid var(--line); box-shadow: none; }
.btn.phu:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.cta { background: linear-gradient(135deg, var(--accent-soft), var(--sun-soft)); border-radius: var(--radius); padding: 18px 20px; margin: 24px 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cta p { margin: 0; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 8px 15px; font: 500 15px inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.check { list-style: none; padding: 0; margin: 10px 0; }
.check li { padding: 10px 12px; border-radius: var(--radius-sm); margin: 6px 0; display: flex; gap: 10px; align-items: flex-start; background: var(--bg-soft); }
.check li.ok { background: var(--ok-soft); } .check li.ok b { color: var(--ok); }
.check li.warn { background: var(--warn-soft); } .check li.warn b { color: var(--warn); }
.check li.bad { background: var(--bad-soft); } .check li.bad b { color: var(--bad); }
.check li b { min-width: 18px; }
label.field { display: block; margin: 12px 0; font-weight: 600; font-size: 15px; }
label.field input, label.field textarea, label.field select { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; background: var(--card); color: var(--text); font: 16px inherit; transition: border-color .15s, box-shadow .15s; }
label.field input:focus, label.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 10px 0; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.an { display: none !important; }

/* Camera + xem trước */
.cam-box { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; max-width: 420px; margin: 0 auto; aspect-ratio: 3/4; }
.cam-box video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-box svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam-hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #fff; font-weight: 700; text-shadow: 0 1px 3px #000; padding: 0 10px; }
.preview { text-align: center; }
.preview canvas { max-width: 260px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }

/* Trang chủ */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 28px 0 12px; }
.hero h1 { font-size: 46px; line-height: 1.1; margin: 14px 0 14px; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--accent), #7c5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 19px; max-width: 34em; }
.hero-nut { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 16px; }
.tin-tuong { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.tin-tuong li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 6px; }
.hero-anh { position: relative; min-height: 380px; }
.hero-anh .truoc, .hero-anh .sau { position: absolute; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.hero-anh .truoc { width: 62%; top: 0; left: 0; aspect-ratio: 1; }
.hero-anh .sau { width: 44%; right: 0; bottom: 0; aspect-ratio: 2/3; border: 6px solid #fff; }
.hero-anh img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-anh .nhan { position: absolute; left: 10px; top: 10px; background: rgba(15, 23, 42, .75); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.hero-anh .sau .nhan { background: var(--ok); }
.hero-anh .mui-ten { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #0f172a; box-shadow: var(--shadow); z-index: 2; }
.hero-anh .the-kiem { position: absolute; left: 4%; bottom: 6%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 14px; z-index: 2; }
.hero-anh .the-kiem div::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.khu { padding: 8px 0; }
.khu-mem { background: var(--bg-soft); border-radius: 24px; padding: 28px 20px; margin: 28px 0; }
.tieu-de-khu { text-align: center; max-width: 640px; margin: 0 auto 18px; }
.tieu-de-khu h2 { margin-top: 10px; }
.buoc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.buoc .so { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 18px; }
.buoc h3 { margin: 14px 0 6px; }
.buoc p { margin: 0; color: var(--muted); font-size: 15px; }
.loai-giay-to { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.loai-giay-to button { text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.loai-giay-to button:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.loai-giay-to b { display: block; font-size: 16px; }
.loai-giay-to span { color: var(--muted); font-size: 14px; }
.loi-ich { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.loi-ich div { padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.loi-ich b { display: block; font-size: 16px; margin-bottom: 4px; }
.loi-ich span { color: var(--muted); font-size: 15px; }
.bang-gia { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 760px; margin: 0 auto; }
.goi { background: var(--card); border: 1.5px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.goi.noi-bat { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.goi .gia { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0; }
.goi .gia small { font-size: 15px; font-weight: 500; color: var(--muted); }
.goi ul { padding-left: 18px; margin: 10px 0 18px; color: var(--muted); }
details.hoi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin: 10px 0; }
details.hoi summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.hoi summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 20px; line-height: 1; }
details.hoi[open] summary::after { content: "–"; }
details.hoi p { margin: 0 0 14px; color: var(--muted); }

/* Trang nội dung */
article.kien-thuc p, article.kien-thuc li { max-width: 72ch; }
.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
footer.site { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 14px; background: var(--bg-soft); }
footer.site a { color: var(--muted); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-nut, .tin-tuong { justify-content: center; }
  .hero-anh { min-height: 320px; max-width: 420px; margin: 0 auto; width: 100%; }
}
@media (max-width: 600px) {
  h1 { font-size: 27px; } h2 { font-size: 22px; }
  .hero h1 { font-size: 32px; }
  .hero-nut .btn { width: 100%; }
  nav.menu { gap: 12px; font-size: 14px; }
  nav.menu a:not(.nut-menu) { display: none; }
  .card { padding: 16px; }
}
