/* Trang tra cứu công khai — cert.cfdways.com */

* { box-sizing: border-box; }
body.pv {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: #FBF9F4; color: #1B2A44;
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif; font-size: 15px; line-height: 1.55;
}
.pv a { color: #2B65B0; }
.pv-wrap { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.pv-en { color: #6B7385; font-style: italic; font-weight: 400; }

.pv-top { background: #fff; border-top: 3px solid #9C7A3C; border-bottom: 1px solid #E6E1D6; }
.pv-top-in { display: flex; align-items: center; gap: 14px; height: 60px; }
.pv-brand { display: flex; }
.pv-brand img { display: block; height: 24px; width: auto; }
.pv-tag { padding-left: 14px; border-left: 1px solid #D9D3C5; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Khe nội dung theo ngôn ngữ (lang.js tráo bên trong) — không tạo hộp riêng. */
.pv-slot { display: contents; }
.pv-lang { margin-left: auto; flex: none; display: inline-flex; padding: 2px; border: 1px solid #E0DACD; border-radius: 8px; background: #FBF9F4; }
.pv-lang a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 30px; padding: 0 8px;
  border-radius: 6px; color: #6B7385; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none;
}
.pv-lang a:hover { color: #1B2A44; }
.pv-lang a[aria-current] { background: #1B2A44; color: #fff; }

.pv-main { flex: 1; padding-top: 40px; padding-bottom: 56px; }

.pv-hero { text-align: center; padding: 28px 0 8px; }
.pv-hero h1 {
  margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600;
  font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: 0.02em;
}
.pv-sub { margin: 4px 0 0; font-size: 16px; }
.pv-lead { max-width: 560px; margin: 18px auto 0; color: #3E4A5E; }
.pv-hint { margin: 10px 0 0; color: #6B7385; font-size: 13.5px; }
.pv-code { font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }

.pv-form { display: flex; gap: 10px; max-width: 520px; margin: 22px auto 0; }
.pv-form input {
  flex: 1; min-width: 0; height: 50px; padding: 0 16px;
  border: 1.5px solid #C9C2B2; border-radius: 8px; background: #fff;
  font: inherit; font-size: 18px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #1B2A44;
}
.pv-form input::placeholder { color: #B5AE9F; font-weight: 500; }
.pv-form input:focus { outline: none; border-color: #2B65B0; box-shadow: 0 0 0 4px rgba(43, 101, 176, 0.14); }
.pv-form button {
  height: 50px; padding: 0 24px; border: 0; border-radius: 8px; background: #1B2A44; color: #fff;
  font: inherit; font-weight: 600; font-size: 16px; cursor: pointer;
}
.pv-form button:hover { background: #2B65B0; }
.pv-form-sm { margin-top: 36px; }
.pv-form-sm input { height: 44px; font-size: 16px; }
.pv-form-sm button { height: 44px; }

/* ---------- quét mã QR bằng camera (scan.js) ---------- */
.pv-scan {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; max-width: 520px; height: 48px; margin: 10px auto 0; padding: 0 18px;
  border: 1.5px solid #1B2A44; border-radius: 8px; background: #fff; color: #1B2A44;
  font: inherit; font-weight: 600; font-size: 16px; cursor: pointer;
}
.pv-scan[hidden] { display: none; }
.pv-scan:hover { background: #1B2A44; color: #fff; }
.pv-scan:focus-visible { outline: 3px solid rgba(43, 101, 176, 0.35); outline-offset: 2px; }
.pv-scan svg { flex: none; }
.pv-lookup-sm .pv-scan { height: 44px; font-size: 15px; }

body.pv-noscroll { overflow: hidden; }
.pv-scanner {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: #0B1220; color: #fff;
}
.pv-scan-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 18px; font-weight: 600; font-size: 16px;
}
.pv-scan-x {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12);
  color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
}
.pv-scan-x:hover { background: rgba(255, 255, 255, 0.22); }
.pv-scan-view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.pv-scan-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.pv-scan-frame {
  position: absolute; left: 50%; top: 50%; width: min(68vmin, 340px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 100vmax rgba(11, 18, 32, 0.55); border-radius: 14px;
}
.pv-scan-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #C9A867; }
.pv-scan-frame i:nth-child(1) { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.pv-scan-frame i:nth-child(2) { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.pv-scan-frame i:nth-child(3) { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.pv-scan-frame i:nth-child(4) { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.pv-scanner.ok .pv-scan-frame i { border-color: #3FBF75; }
.pv-scanner.err .pv-scan-frame { display: none; }
.pv-scan-msg { margin: 0; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); text-align: center; font-size: 15px; line-height: 1.5; }
.pv-scanner.err .pv-scan-msg { color: #FFD7D2; }

.pv-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.pv-steps div { padding: 16px 18px; background: #fff; border: 1px solid #E6E1D6; border-radius: 10px; }
.pv-steps b { display: block; margin-bottom: 4px; }
.pv-steps span { color: #5E6678; font-size: 14px; }

.pv-status {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 12px;
  border: 1px solid; background: #fff;
}
.pv-status h1 { margin: 0; font-size: 22px; line-height: 1.25; }
.pv-status .pv-en { margin: 2px 0 0; }
.pv-status p { margin: 8px 0 0; color: #3E4A5E; }
.pv-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.pv-ok { border-color: #A9D6BA; background: #F1FAF4; }
.pv-ok .pv-icon { background: #1E7A46; }
.pv-ok h1 { color: #17603A; }
.pv-bad { border-color: #EDB8B2; background: #FDF3F2; }
.pv-bad .pv-icon { background: #B3261E; }
.pv-bad h1 { color: #962019; }
.pv-warn { border-color: #EED79A; background: #FFF9E8; }
.pv-warn .pv-icon { background: #9A6B00; }
.pv-warn h1 { color: #7A5400; }

.pv-card { margin-top: 18px; padding: 6px 22px; background: #fff; border: 1px solid #E6E1D6; border-radius: 12px; }
.pv-facts { margin: 0; }
.pv-row { display: grid; grid-template-columns: 230px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid #F0ECE3; }
.pv-row:last-child { border-bottom: 0; }
.pv-row dt { color: #3E4A5E; font-weight: 500; }
.pv-row dt .pv-en { font-size: 13px; }
.pv-row dd { margin: 0; }
.pv-name { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-weight: 600; font-size: 24px; line-height: 1.2; }

.pv-cert { margin: 26px 0 0; }
.pv-cert .cert-fit {
  overflow: hidden; border-radius: 4px; background: #fff;
  box-shadow: 0 1px 2px rgba(27, 42, 68, 0.1), 0 14px 40px rgba(27, 42, 68, 0.14);
}
.pv-cert figcaption { margin-top: 10px; text-align: center; color: #6B7385; font-size: 13.5px; }

.pv-foot { border-top: 1px solid #E6E1D6; background: #fff; color: #6B7385; font-size: 13px; }
.pv-foot .pv-wrap { padding-top: 16px; padding-bottom: 16px; }

@media (max-width: 420px) {
  .pv-tag { display: none; }
}
@media (max-width: 720px) {
  .pv-main { padding-top: 24px; }
  .pv-tag .pv-en { display: none; }
  .pv-form { flex-direction: column; }
  .pv-form input { flex: none; }
  .pv-form button { width: 100%; }
  .pv-steps { grid-template-columns: minmax(0, 1fr); margin-top: 36px; }
  .pv-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pv-status { padding: 16px; }
  .pv-icon { width: 40px; height: 40px; }
}
