/* === Design System === */
:root {
  --primary: #1a56db;
  --primary-hover: #1648b8;
  --primary-light: rgba(26, 86, 219, 0.08);
  --primary-lighter: #eff4ff;
  --primary-border: rgba(26, 86, 219, 0.25);
  --accent: #e74694;
  --accent-light: rgba(231, 70, 148, 0.08);
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 60px -12px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 25px 80px -20px rgba(0, 0, 0, 0.2);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Base === */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Header === */
header {
  min-height: 3.5rem;
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.navbar-brand {
  color: var(--primary);
  font-weight: 700;
  line-height: normal;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.navbar-brand:hover { color: var(--primary-hover); }

/* === Layout === */
@media (min-width: 992px) {
  .container, .main { max-width: 752px; margin: 0 auto; }
}
@media (min-width: 768px) {
  .main .container { max-width: 752px; margin: 0 auto; }
}
main.main { margin-top: 56px; }
@media (min-width: 768px) { main.main { margin-top: 72px; } }

/* === Nav App Buttons === */
.nav-ios img { width: 95.731px; height: 32px; }
.nav-android img { width: 108px; height: 32px; }
.btn.btn-install {
  padding: 8px 14px;
  background: var(--primary-light);
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  line-height: 20px;
  color: var(--primary);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  align-items: center;
  display: flex;
  transition: var(--transition);
}
.btn.btn-install:hover {
  background: var(--primary);
  color: #fff;
}
.icon { width: 1em; height: 1em; fill: currentColor; position: relative; }
i.icon, i.icon + span { display: table-cell; }
.icon.icon-mobile { background: url(../images/phone_iphone.svg) center no-repeat; width: 20px; height: 20px; }

/* === Hero Section === */
.hero { margin-top: 12px; }
@media (min-width: 768px) { .hero { margin-top: 28px; } }

h1.title-1 {
  font-size: 20px;
  margin-bottom: 8px;
  margin-top: 0;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.02em;
}
@media (min-width: 992px) {
  .hero .title-1, h1.title-1 { font-size: 32px; margin: 32px 0 12px; }
}
.hero-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  text-align: center;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 992px) { .hero-subtitle { font-size: 15px; } }

/* === Tabs & Form Card === */
.tabs-check {
  background-color: var(--bg-card);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tab-links { background-color: var(--bg); }
.hero-button .btn {
  width: 50%;
  background-color: var(--bg);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 14px 16px;
  transition: var(--transition);
}
.hero-button .btn.active {
  background-color: var(--bg-card);
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.hero-button .btn:focus { box-shadow: none; }
.hero-button .btn:hover:not(.active) {
  color: var(--text-secondary);
  background-color: #f8fafc;
}
.hero-csgt {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  padding: 10px 16px;
  align-items: center;
  gap: 8px;
  align-self: stretch;
}
.hero-csgt span { font-size: 13px; font-weight: 600; line-height: 20px; color: var(--text-secondary); }

/* === Form Controls === */
.tab { display: none; }
.tab.active { display: block; }
.material-textfield { position: relative; }
.material-textfield input,
.material-textfield select {
  outline: 0;
  transition: var(--transition);
  padding: .625rem 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
}
.material-textfield input:hover,
.material-textfield select:hover { border-color: #cbd5e1; }
.dangkiem .material-textfield input {
  outline: 0;
  transition: var(--transition);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.input-group .material-textfield.select-wrapper { flex: inherit; }
.input-group .material-textfield.select-wrapper select {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.material-textfield label {
  position: absolute;
  font-size: 13px;
  line-height: 20px;
  left: 0;
  top: 0;
  transform: translateY(-50%) scale(0.9);
  background-color: var(--bg-card);
  color: var(--text-muted);
  padding: 0 .3rem;
  margin: 0 .7rem;
  transition: var(--transition);
  transform-origin: left top;
  pointer-events: none;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-border);
}
.material-textfield input:focus + label { color: var(--primary); top: 0; transform: translateY(-50%) scale(0.9); }
.input-group .material-textfield { flex: 3; }
.bsxcsgt { border-top-left-radius: 0; border-bottom-left-radius: 0; }
input.form-control::placeholder {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.form-check-label { display: flex; align-items: center; gap: 4px; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { border-color: var(--primary); outline: 0; box-shadow: 0 0 0 3px var(--primary-border); }

/* === Buttons === */
.btn-primary {
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  padding: .625rem 1rem;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(26, 86, 219, 0.3);
}
.btn-primary:hover {
  color: #fff;
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.35);
  transform: translateY(-1px);
}
.btn-primary:focus {
  color: #fff;
  background-color: var(--primary-hover);
  box-shadow: 0 0 0 3px var(--primary-border);
}
.btn-primary:active {
  color: #fff;
  background-color: var(--primary-hover);
  transform: translateY(0);
}
.btn-primary:active:focus { box-shadow: 0 0 0 3px var(--primary-border); }
.btn-primary.disabled, .btn-primary:disabled {
  color: #fff;
  background: #93b4f0;
  border-color: #93b4f0;
  box-shadow: none;
  transform: none;
}
.btn.btn-primary { padding: .625rem; }
.result .btn-primary { font-size: 1rem; }
.btn-outline-primary {
  font-weight: 600;
  line-height: 24px;
  color: var(--primary);
  border-color: var(--primary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-outline-primary:active:focus, .btn:focus { box-shadow: 0 0 0 3px var(--primary-border); }
.btn-outline-primary:active, .btn-outline-primary:hover {
  color: #fff;
  background-color: var(--primary);
  border-color: var(--primary);
}

/* === Captcha & Submit === */
.turnstile-wrapper { height: 71px; margin-bottom: 10px; }
.submit-wrapper { position: relative; }
.verify-captcha {
  padding: 2px 10px;
  margin-bottom: 1rem;
  border-radius: 6px;
  font-size: 13px;
  display: inline-block;
}
.verify-captcha { border: 1px solid var(--warning-border); background-color: var(--warning-bg); color: var(--warning); }
.verify-captcha.captcha-error { color: var(--danger); background-color: var(--danger-bg); border-color: var(--danger-border); }
.verify-captcha.captcha-success { color: var(--success); background-color: var(--success-bg); border-color: var(--success-border); }

/* === Form Misc === */
.tem-text { margin-bottom: 16px; }
.select-xe { gap: 24px; margin-bottom: .8rem; }
.select-xe .form-check { display: flex; gap: 8px; }
.clear-button {
  position: absolute;
  right: 8px;
  top: 50%;
  border-radius: 6px;
  padding: 4px 14px;
  cursor: pointer;
  background: var(--text-secondary);
  color: #fff;
  border: none;
  transform: translate(0, -50%);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.clear-button:hover { background: var(--text); }

/* === Results === */
#result .stt { text-align: left; font-size: 1.05rem; color: var(--text); margin-top: 20px; font-weight: 600; }
.alert-heading { font-weight: 700; margin-bottom: 16px; }
.alert.alert-success { border: 1.5px solid var(--success-border); border-radius: var(--radius); background: var(--success-bg); }
.alert.alert-finished { border: 1.5px solid var(--success-border); background: var(--success-bg); border-radius: var(--radius); }
.alert-finished .alert-heading { color: var(--success); }
.alert-warning {
  border-radius: var(--radius);
  border: 1.5px solid var(--warning-border);
  background: var(--warning-bg);
  padding: 24px;
}
.alert-warning table { background-color: var(--bg-card); margin-bottom: 24px; border: 1px solid var(--danger-border); border-radius: var(--radius-sm); overflow: hidden; }
.alert table { background-color: var(--bg-card); }
.alert-warning table.table-finished { border-color: var(--success-border); }
.text-black { color: var(--text); }
.text-red { color: var(--danger); }
.text-green { color: var(--success); }
.update-info { margin-bottom: 4px; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.update-info .date { font-weight: 600; color: var(--text); }
.table-status { color: var(--danger); border: 1px solid var(--danger); padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.table-finished .table-status { color: var(--success); border-color: var(--success); }
td:first-child { font-weight: 500; color: var(--text-secondary); }
td:last-child { color: var(--text); }
@media (min-width: 768px) { td:first-child { min-width: 150px; } }
table td { font-size: 13px; line-height: 1.5; }
.bks {
  color: var(--text);
  padding: 3px 8px;
  border: 1.5px solid var(--text);
  border-radius: 4px;
  background-color: var(--bg-card);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.alert-finished { background-color: var(--success-bg); border-color: var(--success-border); }

/* === Alert animation === */
#alert { display: none; opacity: 0; transition: opacity .4s ease-in-out; }
#alert.show { display: block; opacity: 1; }
#alert.hide { opacity: 0; }

/* === Content === */
.banner { display: block; }
.banner img { width: 100%; border-radius: var(--radius-sm); }
.content h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.content h3 { font-size: 18px; font-weight: 600; color: var(--text); }
.content img { max-width: 100%; border-radius: var(--radius-sm); }
.text-14 { font-size: 14px; }
.mb-12px { margin-bottom: 12px; }

/* === App Download Section === */
.app-wrapper { margin-bottom: 2rem; }
.app-info { text-align: center; }
.app-info .app-title {
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  margin-bottom: 4px;
}
.app-info span { color: var(--text-muted); font-size: 14px; font-weight: 400; line-height: 20px; }
.dot .dot-item { width: 5px; height: 5px; background-color: #cbd5e1; border-radius: 100%; }
.dot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; }
.app-link { display: flex; align-items: center; gap: 16px; justify-content: center; }
.app-link img { height: 40px; width: auto; transition: var(--transition); }
.app-link a:hover img { transform: scale(1.05); }

/* === Modal === */
.modal {
  justify-content: center;
  align-items: center;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  --bs-modal-margin: 0;
}
.modal-body { min-height: 320px; }
.ad-text { text-align: center; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.modal-footer { border-top: none; }
.ad-content { min-height: 360px; }
.modal .ad-content { min-height: 250px; }
body.modal-open { overflow: hidden; }

/* === Sticky Ad === */
#adBottom { display: none; }
@media only screen and (min-width: 310px) and (max-width: 500px) {
  #adBottom {
    display: block;
    position: fixed;
    text-align: center;
    bottom: 0;
    width: 100%;
    z-index: 999;
    height: 50px !important;
    background-color: var(--bg-card);
    transition: var(--transition);
  }
  .ad_sticky { width: 100%; height: 100%; position: relative; box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); }
  .ad-close {
    position: absolute;
    width: 25px;
    height: 25px;
    left: 0;
    top: -25px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    background-color: var(--bg-card);
    border-top-right-radius: 6px;
    cursor: pointer;
  }
}

/* === Tooltips === */
.HelpIcon { border: none; background: 0 0; outline: 0; }
.tooltips.top { display: inline-block; margin-right: 20px; }
.tooltips .tooltiptext {
  visibility: hidden;
  background-color: var(--text);
  color: #fff;
  text-align: center;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  position: absolute;
  z-index: 1;
  opacity: 0;
  transition: opacity .3s;
  top: 100%;
  right: 0;
  left: 0;
  font-size: 13px;
}
.tooltips:hover .tooltiptext { visibility: visible; opacity: 1; }
.tooltips.top .tooltiptext { top: auto; bottom: 100%; }
.dangkiem .hero-title { position: relative; }
.tooltiptext img { max-width: 100%; }

/* === Sticky Buttons === */
.btn-sticky {
  display: block;
  text-decoration: none;
  position: fixed;
  bottom: 96px;
  left: .75rem;
  height: 74px;
  width: 93px;
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--primary);
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.2), 0 0 0 2px rgba(26, 86, 219, 0.05);
}
.sticky-title {
  display: flex;
  justify-content: space-between;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}
.sticky-store img { height: 24px; width: auto; }
.sticky-store div { display: flex; justify-content: center; align-items: center; }
.sticky-desc { font-size: 10px; font-weight: 600; line-height: 16px; color: var(--text-muted); margin-bottom: 2px; }
.sticky-icon-app { right: 0; top: 0; width: 16px; height: 16px; }
.btn-sticky.sticky-right { left: unset; right: .75rem; }
.sticky-right { display: flex; flex-direction: column; }
.sticky-right .sticky-label { width: fit-content; margin-bottom: 4px; }
.sticky-right .sticky-title { margin-bottom: 1px; }
.sticky-label {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  border-radius: 4px;
  background: var(--primary-light);
  padding: 0 4px;
  gap: 1px;
}
.sticky-button {
  height: 22px;
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.btn-shop {
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  padding: 0 8px;
  height: 32px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  transition: var(--transition);
}
.btn-shop:hover { background: var(--primary); color: #fff; }
@keyframes shakeScale {
  0% { transform: rotate(6deg) scale(1.1); }
  10% { transform: rotate(-6deg) scale(1.1); }
  20% { transform: rotate(6deg) scale(1.1); }
  30% { transform: rotate(-6deg) scale(1.1); }
  40% { transform: rotate(0) scale(1); }
  100% { transform: rotate(0) scale(1); }
}
.btn-sticky.sticky-left { animation: shakeScale 2s infinite; }
.ios.d-done { display: none !important; }

/* === Đăng kiểm Result === */
.bxs-big {
  font-size: 24px;
  font-weight: 600;
  line-height: 28px;
  border-radius: 6px;
  padding: 4px 10px;
  border: 2px solid var(--text);
  display: inline-block;
  background: var(--bg-card);
  letter-spacing: 1px;
}
.dangkiem-head h3 { font-size: 22px; font-weight: 700; line-height: 28px; color: var(--primary); }
.bxs-big.xanh { color: #fff; border-color: #fff; background-color: #2563eb; }
.bxs-big.vang { background-color: #f59e0b; border-color: #f59e0b; color: #fff; }
.dangkiem-head p { color: var(--text-secondary); font-size: 14px; line-height: 22px; }
.tbtable {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.tbtable-head {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary-lighter) 0%, #f0f4ff 100%);
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
}
.tbtable-body { padding: 0 16px; }
.tbtable-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.tbtable-item:last-child { border-bottom: none; }
.tbtable-right { width: 100%; }
.tbtable.table-info .tbtable-right { width: unset; }
.tbtable.table-info .tbtable-left { color: var(--text-muted); font-size: 13px; }
.span-cucdangkiem {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  text-align: center;
  display: block;
  margin-top: 8px;
}
.status-info {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  overflow: hidden;
}
.status-info div {
  display: flex;
  padding: 12px 0;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex: 1 0 0;
  text-align: center;
  font-weight: 700;
  line-height: 24px;
  font-size: 14px;
}
.status-info__error { color: var(--danger); }
.status-info__success { color: var(--success); }
.divider { display: block; width: 1px; height: 24px; background: var(--border); }

/* === Footer === */
.footer { background: var(--bg-card); border-top: 1px solid var(--border); margin: 0 !important; padding: 24px 0 !important; }
.footer .nav-link { font-size: 13px; transition: var(--transition); }
.footer .nav-link:hover { color: var(--primary) !important; }

/* === Check-var === */
.check-var { text-align: center; }
.check-var a { display: inline-block; }
.check-var img { width: 100%; max-width: 432px; }
.fa-secondary { opacity: .4; }
.hero-title { text-align: center; font-size: 15px; font-weight: 500; margin-bottom: 16px; margin-top: 4px; }
