/* ==========================================================================
   Efan Split-Screen Pro · CSS Hệ thống kích hoạt bảo hành điện tử chính hãng
   Mã nguồn chính thức: src/web/assets/css/style.css
   ========================================================================== */

:root {
  --green: #10B981;
  --green-dark: #059669;
  --green-deep: #065F46;
  --green-light: #ECFDF5;
  --navy: #0F172A;
  --navy-panel: #1E293B;
  --slate: #64748B;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --err: #EF4444;
  --err-bg: #FEF2F2;
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--navy);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 15.5px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Background: gradient xanh lục → trắng phủ toàn màn hình */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #059669 0%, #34D399 35%, #A7F3D0 65%, #FFFFFF 100%);
  z-index: -1;
  pointer-events: none;
}

/* Main Split Layout: 2 khung ghép làm 1 khối thống nhất, tỉ lệ 40/60, cao bằng nhau */
.app-container {
  max-width: 1240px;
  width: 100%;
  margin: 32px auto 44px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 0;
  align-items: stretch;
  flex: 1;
}
@media (max-width: 860px) {
  .app-container {
    grid-template-columns: 1fr;
    margin-top: 14px;
    gap: 0;
  }
}

/* CỘT TRÁI: 40% Khung bảo hành điện tử */
.sticky-column {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.brand-card {
  background: linear-gradient(145deg, #0F172A, #1E293B);
  color: #FFFFFF;
  border-radius: 24px 0 0 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: none;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.brand-card::after {
  content: "";
  position: absolute;
  top: -50px; right: -50px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.brand-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.brand-logo-pill {
  background: transparent;
  border-radius: 8px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
}
.brand-logo-pill img {
  height: 76px;
  width: auto;
  display: block;
}
/* Logo chữ ở thanh trên (khi ảnh logo hỏng): thẻ span mới tạo không có màu/kiểu như link thường */
.nav-logo-link .txt-logo {
  font-weight: 900;
  font-size: 22px;
  color: var(--green-dark);
  text-decoration: none;
}
/* Gợi ý dưới ô Địa chỉ khi bị khoá chỉ vì ô Số nhà còn chữ */
.dc-hint { margin-top: 6px; font-size: 13px; color: var(--slate); }
.brand-logo-pill .txt-logo {
  font-weight: 900;
  font-size: 20px;
  color: var(--green-dark);
}
.verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #34D399;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.card-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: #FFFFFF;
}
.card-title-right {
  margin: 0;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}
.card-subtitle {
  font-size: 13.5px;
  color: #94A3B8;
  line-height: 1.45;
  margin-bottom: 20px;
  text-align: center;
}

/* Live Warranty Certificate Card */
.live-pass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.live-pass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748B;
  font-weight: 700;
}
.live-pass-code {
  color: #94A3B8;
  font-size: 13px;
  font-weight: 600;
  transition: color .2s;
}
.preview-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}
.preview-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.preview-row .k { color: #94A3B8; }
.preview-row .v { color: #F8FAFC; font-weight: 600; text-align: right; max-width: 60%; word-break: break-word; }

/* Support Hotline */
.support-box {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
}
.support-box .icon { font-size: 22px; color: #D97706; }
.support-box b { display: block; color: #78350F; font-size: 14px; }
.support-box span { color: #92400E; }

/* CỘT PHẢI: 60% Khung nhập thông tin */
.form-column {
  background: var(--surface);
  border-radius: 0 24px 24px 0;
  padding: 32px 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  border-left: 1px solid var(--border);
  height: 100%;
  display: flex;
  flex-direction: column;
}
@media (max-width: 860px) {
  .brand-card {
    border-radius: 20px 20px 0 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    padding: 22px 18px;
  }
  .form-column {
    border-radius: 0 0 20px 20px;
    border-left: 1px solid var(--border);
    border-top: none;
    padding: 22px 16px;
  }
}

/* App Top Navbar: Logo bên trái, Flowline kèm chữ ở giữa */
.app-navbar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.navbar-inner {
  max-width: none;
  margin: 0;
  padding: 10px 20px 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-left {
  display: flex;
  align-items: center;
  min-width: 130px;
}
.nav-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo-img {
  height: 58px;
  width: auto;
  display: block;
}
.nav-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 130px;
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-light);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Flow Line Stepper trên Navbar: Kèm chữ */
.flow-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 440px;
  width: 100%;
  margin: 0;
  position: relative;
}
.flow-node {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;
  transition: all .25s ease;
  position: relative;
  z-index: 2;
  white-space: nowrap;
}
.flow-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13.5px;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  color: #64748B;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  flex-shrink: 0;
}
.flow-dot-check { display: none; }
.flow-text {
  /* ẩn chữ: flowline chỉ còn chấm + đường, chữ vẫn đọc được bằng trình đọc màn hình */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  font-size: 13.5px;
  font-weight: 700;
  color: #64748B;
  transition: color .25s;
}
.flow-node.active .flow-dot {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}
.flow-node.active .flow-text {
  color: var(--navy);
  font-weight: 800;
}
.flow-node.done .flow-dot {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #FFFFFF;
}
.flow-node.done .flow-dot-num { display: none; }
.flow-node.done .flow-dot-check { display: inline; font-size: 15px; font-weight: 900; }
.flow-node.done .flow-text {
  color: var(--green-dark);
}
.flow-node.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.flow-line-track {
  flex: 1;
  height: 3px;
  background: #E2E8F0;
  margin: 0 10px;
  position: relative;
  border-radius: 999px;
  overflow: hidden;
  min-width: 30px;
}
.flow-line-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #10B981, #059669);
  transition: width .4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

@media (max-width: 720px) {
  .nav-right { display: none; }
  .nav-left { min-width: auto; }
  .navbar-inner { padding: 10px 14px; gap: 10px; }
  .nav-logo-img { height: 46px; }
  .flow-dot { width: 28px; height: 28px; font-size: 12px; }
  .flow-node { padding: 2px 6px; gap: 6px; }
  .flow-line-track { margin: 0 6px; }
}

.step2-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.btn-prev {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--navy);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.btn-prev:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

/* Step pane animation */
.step-pane {
  animation: fadeInStep .3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 16px;
}
.section-divider:first-of-type {
  margin-top: 0;
}
.sec-badge {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid #A7F3D0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: .04em;
}
.sec-title {
  font-size: 17.5px;
  font-weight: 800;
  color: var(--navy);
}

/* Fields & Inputs */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row-full {
  display: flex;
  flex-direction: column;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 1fr;
  gap: 14px;
}
@media (max-width: 680px) {
  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .form-row-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.badge-auto {
  display: inline-flex;
  align-items: center;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
}
.req { color: var(--err); }
.in {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--navy);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea.in {
  min-height: 48px;
  line-height: 1.45;
  resize: none;
}
.in-scale {
  resize: none;
  overflow-y: hidden;
}
select.in {
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) center;
  padding-right: 36px;
  cursor: pointer;
}
select.in optgroup {
  font-weight: 700;
  color: var(--navy);
  background: #F1F5F9;
}
select.in option {
  font-weight: 400;
  color: var(--navy);
  background: #FFFFFF;
  padding: 6px 10px;
}
.in:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.in:disabled {
  background: #F1F5F9;
  color: #94A3B8;
  cursor: not-allowed;
}
.field.has-err .in {
  border-color: var(--err);
  background: var(--err-bg);
}
.err {
  display: none;
  color: var(--err);
  font-size: 13px;
  font-weight: 500;
}
.field.has-err .err { display: block; }
.hint { font-size: 13px; color: var(--slate); }

/* Address Preview */
.addr-preview {
  background: var(--green-light);
  border: 1px dashed #A7F3D0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--navy);
}
.addr-preview small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 2px;
}
.addr-preview b { word-break: break-word; }

/* Delivery Mode Segmented */
.seg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.seg-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #FFFFFF;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  transition: all .2s;
  user-select: none;
}
.seg-card input { position: absolute; opacity: 0; pointer-events: none; }
.seg-card:has(input:checked) {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
}

/* Honeypot Bot Trap */
.hp-zone {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Status Banner */
.status-banner {
  display: none;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 18px;
  line-height: 1.45;
}
.status-banner.show { display: block; }
.status-banner.err {
  background: var(--err-bg);
  border: 1px solid #FEB2B2;
  color: #9B2C2C;
}

/* Submit Action Button */
.submit-btn {
  margin-top: 26px;
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, var(--green-dark), #047857);
  color: #FFFFFF;
  font-size: 16.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .2s;
}
.submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857, #065F46);
  transform: translateY(-1px);
}
.submit-btn:disabled { opacity: .7; cursor: not-allowed; }

/* Thank You Pass Card */
.thank-pass {
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: center;
}
.pass-top {
  background: linear-gradient(135deg, #065F46, #0F172A);
  color: #fff;
  padding: 32px 20px 26px;
}
.tick-circle {
  width: 60px; height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.pass-top h2 { font-size: 22px; margin-bottom: 4px; }
.pass-top p { font-size: 14px; opacity: .9; }
.pass-content { padding: 26px 20px 28px; }
.code-tag {
  display: inline-block;
  background: var(--green-light);
  border: 1.5px dashed var(--green);
  color: var(--navy);
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 18px;
}
/* không có mã phiếu: chỉ hiện chữ "Đã ghi nhận", nhỏ hơn mã thật */
.code-tag.no-code { font-size: 18px; }
.btn-reset {
  margin-top: 22px;
  background: none;
  border: 0;
  color: var(--slate);
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.btn-reset:hover { color: var(--navy); }

/* Footer */
.app-footer {
  text-align: center;
  padding: 24px 16px 36px;
  color: var(--green-deep);
  font-size: 13px;
}

[hidden] { display: none !important; }

/* Hàng nút cố định đáy khung form: [Hỗ Trợ Ngay đỏ] [Tiếp tục xanh], canh giữa dọc */
.form-column form {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.step-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.form-actions {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.form-actions .submit-btn {
  margin-top: 0 !important;
  flex: 1;
  width: auto;
  gap: 8px;
  justify-content: center;
}
.btn-support {
  flex: 1;
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #EF4444, #B91C1C);
  color: #FFFFFF;
  font-size: 16.5px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.32);
  transition: background .2s, transform .2s;
}
.btn-support:hover { background: linear-gradient(135deg, #DC2626, #991B1B); transform: translateY(-1px); }
.btn-ico { flex-shrink: 0; }
@media (max-width: 420px) {
  .form-actions { gap: 8px; }
  .btn-support, .form-actions .submit-btn { font-size: 15px; }
  .form-actions .btn-prev { padding: 0 12px; }
}
/* Điện thoại, bước 2 có 3 nút: Hỗ Trợ + Quay lại một hàng, Kích hoạt xuống hàng riêng cho đủ chữ */
@media (max-width: 520px) {
}

/* Khung 60%: tiêu đề bước + form canh giữa ngang và giữa dọc */
/* Khung 60% giữ vị trí cố định: tiêu đề ở trên, hàng nút ở đáy, ô nhập ở giữa; chỉ dài ra khi nội dung dài */
.form-column {
  justify-content: flex-start;
  align-items: center;
}
#formSection {
  width: 100%;
  max-width: 640px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.form-heading {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 22px;
}
.form-actions { margin-top: auto; }
@media (max-width: 860px) { .form-heading { font-size: 19px; margin-bottom: 16px; } }
#thankSection { width: 100%; max-width: 640px; }

.label .opt { font-weight: 400; color: var(--slate); font-size: 13px; }

/* Địa chỉ: cách nào đang dùng thì cách kia khoá, dấu * chỉ hiện ở các ô bắt buộc */
.dc-text #f_tinh .req, .dc-text #f_phuong_xa .req, .dc-text #f_so_nha .req,
.dc-select #f_dia_chi .req { display: none; }

/* ===== Khung chọn có gợi ý (combobox, xem combobox.js) ===== */
.cb-native { display: none !important; } /* <select> gốc vẫn giữ giá trị nhưng không hiện */
.cb { position: relative; }
.cb-input {
  padding-right: 44px;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cb.is-open .cb-input {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.cb-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  display: flex;
  color: #475569;
  pointer-events: auto;
  cursor: pointer;
  /* cong nhẹ (overshoot) để mũi tên nảy lên xuống khi mở/đóng */
  transform: translateY(-50%) rotate(0deg);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), color .2s;
}
.cb.is-open .cb-arrow { transform: translateY(-50%) rotate(180deg); color: var(--green-dark); }
.cb.is-disabled .cb-arrow { opacity: .4; cursor: not-allowed; }

.cb-list {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 8px);          /* khoảng hở giữa ô và khung gợi ý */
  z-index: 60;
  max-height: 288px;              /* ~6 dòng, cuộn để xem tới 15 gợi ý */
  overflow-y: auto;
  padding: 6px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.22), 0 4px 10px rgba(15, 23, 42, 0.06);
  animation: cbIn .18s ease-out;
  transform-origin: top center;
}
.cb.is-up .cb-list { top: auto; bottom: calc(100% + 8px); transform-origin: bottom center; }
@keyframes cbIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.cb-item {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--navy);
  cursor: pointer;
}
.cb-item.is-active, .cb-item:hover { background: var(--green-light); }
.cb-item.is-selected { color: var(--green-dark); font-weight: 700; }
.cb-group {
  padding: 8px 12px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--slate);
}
.cb-clear {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.cb-clear:hover { background: var(--green-light); color: var(--navy); }
.cb-empty, .cb-more { padding: 10px 12px; font-size: 13.5px; color: var(--slate); }

/* Thanh cuộn kiểu Apple: mảnh, bo tròn, nằm nổi, không có nút mũi tên */
.cb-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}
.cb-list::-webkit-scrollbar { width: 8px; }
.cb-list::-webkit-scrollbar-track { background: transparent; }
.cb-list::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.cb-list::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.65); background-clip: content-box; }
.cb-list::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

/* ===== Nút nổi góc phải: tròn -> viên thuốc (giãn sang trái) khi lia chuột ===== */
.fab-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;   /* mép phải thẳng hàng, viên thuốc giãn sang trái */
  gap: 12px;
}
.fab {
  display: flex;
  flex-direction: row-reverse;   /* icon ở sát mép phải, chữ nằm bên trái */
  align-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  overflow: hidden;
  color: #FFFFFF;
  text-decoration: none;
  background: linear-gradient(135deg, #EF4444, #B91C1C);
  box-shadow: 0 8px 22px rgba(185, 28, 28, 0.4);
  /* cong overshoot nhẹ: giãn ra có cảm giác bật */
  transition: width .45s cubic-bezier(.34, 1.3, .64, 1), box-shadow .3s, transform .3s;
  animation: fabPulse 2.6s ease-out infinite;
}
.fab-icon {
  flex: 0 0 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-label {
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.2;
  padding-left: 22px;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .25s, transform .35s;
}
.fab-label b { display: block; font-size: 13px; opacity: .9; font-weight: 600; }
.fab:hover, .fab:focus-visible {
  width: 262px;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(185, 28, 28, 0.5);
  animation: none;
}
.fab:hover .fab-label, .fab:focus-visible .fab-label { opacity: 1; transform: none; transition-delay: .12s; }
.fab:not(.fab-zalo) .fab-ico { animation: fabShake 1.8s ease-in-out infinite; transform-origin: 50% 50%; } /* icon rung liên tục */
@keyframes fabPulse {
  0% { box-shadow: 0 8px 22px rgba(185, 28, 28, 0.4), 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 8px 22px rgba(185, 28, 28, 0.4), 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 8px 22px rgba(185, 28, 28, 0.4), 0 0 0 0 rgba(239, 68, 68, 0); }
}
@keyframes fabRing { /* điện thoại rung lắc nhẹ */
  0%, 100% { transform: rotate(0); } 20% { transform: rotate(-16deg); } 40% { transform: rotate(14deg); }
  60% { transform: rotate(-10deg); } 80% { transform: rotate(6deg); }
}
@media (max-width: 720px) {
  .fab-stack { right: 14px; bottom: 14px; gap: 10px; }
  .fab { width: 52px; height: 52px; }
  .fab-icon { flex-basis: 52px; height: 52px; }
  body { padding-bottom: 64px; }  /* chừa chỗ để nút nổi không che chân trang */
}
@media (prefers-reduced-motion: reduce) {
  .fab, .fab-label { transition: none; animation: none; }
  .fab:hover .fab-ico { animation: none; }
}

/* Nút Zalo: xanh Zalo, chữ Zalo thay icon */
.fab-zalo {
  background: linear-gradient(135deg, #1A8CFF, #0068FF);
  box-shadow: 0 8px 22px rgba(0, 104, 255, 0.4);
  animation: none;
}
.fab-zalo:hover, .fab-zalo:focus-visible { box-shadow: 0 12px 28px rgba(0, 104, 255, 0.5); }
.zalo-mark { font-weight: 800; font-size: 14px; letter-spacing: -0.02em; }
.fab-zalo:hover .zalo-mark, .fab-zalo:focus-visible .zalo-mark { animation: zaloPop .5s ease; }
@keyframes zaloPop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* Nút gọi: hàng 1 "Phòng bảo hành", hàng 2 số điện thoại to, nhấp nhô liên tục */
.fab-label b { font-size: 12.5px; }
.fab-num {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.15;
  transform-origin: left center;
  animation: numPulse 1.3s ease-in-out infinite;
}
@keyframes numPulse {
  0%, 100% { transform: scale(1); text-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { transform: scale(1.08); text-shadow: 0 0 10px rgba(255,255,255,.85); }
}
@keyframes fabShake { /* rung mạnh ~0.6s rồi nghỉ, lặp mãi */
  0%, 40%, 100% { transform: rotate(0); }
  5% { transform: rotate(-18deg); } 10% { transform: rotate(16deg); } 15% { transform: rotate(-14deg); }
  20% { transform: rotate(12deg); } 25% { transform: rotate(-8deg); } 30% { transform: rotate(6deg); } 35% { transform: rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) { .fab-num, .fab:not(.fab-zalo) .fab-ico { animation: none; } }

/* ===== Nút gọi gộp 2 số (speed-dial): 1 hình tròn, bung 2 viên thuốc phía trên ===== */
.fab-dial { position: relative; display: flex; flex-direction: column; align-items: flex-end; }
.fab.fab-dial-btn { cursor: pointer; border: 0; padding: 0; }
.fab.fab-dial-btn:hover, .fab.fab-dial-btn:focus-visible { width: 56px; }
.dial-menu {
  position: absolute;
  right: 0;
  bottom: 100%;
  padding-bottom: 12px;          /* cầu nối để chuột đi từ nút lên menu không bị mất hover */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  visibility: hidden;
  pointer-events: none;
}
.dial-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 20px;
  border-radius: 999px;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(135deg, #EF4444, #B91C1C);
  box-shadow: 0 8px 22px rgba(185, 28, 28, 0.4);
  opacity: 0;
  transform: translateY(12px) scale(.96);
  transition: opacity .25s, transform .4s cubic-bezier(.34, 1.4, .64, 1), box-shadow .3s;
}
.dial-item:hover { box-shadow: 0 12px 28px rgba(185, 28, 28, 0.55); }
.dial-text { display: block; line-height: 1.2; text-align: left; }
.dial-text b { display: block; font-size: 12.5px; font-weight: 600; opacity: .9; }
.dial-ico {
  flex: 0 0 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.fab-dial.is-open .dial-menu { visibility: visible; pointer-events: auto; }
.fab-dial.is-open .dial-item { opacity: 1; transform: none; }
.fab-dial.is-open .dial-item:nth-child(2) { transition-delay: .06s; } /* viên gần nút hiện sau, tạo cảm giác bung dần */
@media (hover: hover) {
  .fab-dial:hover .dial-menu { visibility: visible; pointer-events: auto; }
  .fab-dial:hover .dial-item { opacity: 1; transform: none; }
  .fab-dial:hover .dial-item:nth-child(2) { transition-delay: .06s; }
}
.dial-ico svg { animation: fabShake 1.8s ease-in-out infinite; } /* icon rung liên tục */
@media (max-width: 720px) { .fab.fab-dial-btn:hover, .fab.fab-dial-btn:focus-visible { width: 52px; } }
@media (prefers-reduced-motion: reduce) { .dial-item { transition: none; } .dial-ico svg { animation: none; } }

/* Breadcrumb ở tiêu đề bước 2: "Thông tin khách hàng › Thông tin sản phẩm" */
.form-heading { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.crumb {
  background: none; border: 0; padding: 2px 6px; margin: 0;
  font: inherit; font-size: 15px; font-weight: 600;
  color: var(--slate); cursor: pointer; border-radius: 8px;
  transition: color .2s, background .2s;
}
.crumb:hover { color: var(--green-dark); background: var(--green-light); }
.crumb-sep { color: #94A3B8; font-weight: 700; }
.crumb[hidden], .crumb-sep[hidden] { display: none; }

/* ===== Khung chọn ngày bo góc (xem datepicker.js) ===== */
.dp { position: relative; }
.dp-input { padding-right: 44px; cursor: pointer; }
.dp.is-open .dp-input { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.dp-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  display: flex; color: #475569; cursor: pointer; transition: color .2s;
}
.dp.is-open .dp-icon { color: var(--green-dark); }
.dp-pop {
  position: absolute; left: 0; top: calc(100% + 8px);   /* khoảng hở giữa ô và lịch */
  z-index: 60; width: 300px; padding: 12px;
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.22), 0 4px 10px rgba(15, 23, 42, 0.06);
  animation: cbIn .18s ease-out; transform-origin: top left;
}
.dp.is-up .dp-pop { top: auto; bottom: calc(100% + 8px); transform-origin: bottom left; }
.dp.is-right .dp-pop { left: auto; right: 0; }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.dp-nav {
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: #F1F5F9; color: var(--navy);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s;
}
.dp-nav:hover:not(:disabled) { background: var(--green-light); color: var(--green-dark); }
.dp-nav:disabled { opacity: .35; cursor: not-allowed; }
.dp-title {
  flex: 1; height: 36px; border: 0; border-radius: 999px; background: transparent;
  font: inherit; font-size: 15px; font-weight: 800; color: var(--navy); cursor: pointer; transition: background .2s;
}
.dp-title:hover:not(:disabled) { background: var(--green-light); color: var(--green-dark); }
.dp-title:disabled { cursor: default; }
.dp-body.dp-m-day { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-body.dp-m-month, .dp-body.dp-m-year { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dp-wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--slate); padding: 6px 0; }
.dp-day, .dp-cell {
  border: 0; background: transparent; font: inherit; color: var(--navy); cursor: pointer;
  border-radius: 12px; transition: background .15s, color .15s;
}
.dp-day { height: 36px; font-size: 14px; }
.dp-cell { height: 44px; font-size: 14.5px; font-weight: 600; }
.dp-day:hover:not(:disabled), .dp-cell:hover:not(:disabled) { background: var(--green-light); color: var(--green-dark); }
.dp-day.is-today, .dp-cell.is-today { box-shadow: inset 0 0 0 1.5px var(--green); }
.dp-day.is-selected, .dp-cell.is-selected { background: var(--green-dark); color: #FFFFFF; font-weight: 700; }
.dp-day:disabled, .dp-cell:disabled { color: #CBD5E1; cursor: not-allowed; }
@media (max-width: 420px) { .dp-pop { width: min(300px, calc(100vw - 48px)); } }

/* Nút mũi tên trái/phải hai bên tiêu đề bước (thay breadcrumb) */
.form-heading { justify-content: space-between; flex-wrap: nowrap; }
.nav-arrow {
  flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: #F1F5F9; color: var(--navy);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.nav-arrow:hover:not(:disabled) { background: var(--green-light); color: var(--green-dark); transform: scale(1.08); }
.nav-arrow:disabled { opacity: .3; cursor: not-allowed; }

/* icon đường nét thay emoji trong 2 lựa chọn nhận hàng */
.seg-card span { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.seg-ico { flex-shrink: 0; }

/* Hàng 4 bước 2: chú thích "Hình thức nhận hàng" và 2 nút cùng một hàng */
.field-inline { flex-direction: row; align-items: center; gap: 14px; }
.field-inline > .label { flex: 0 0 auto; white-space: nowrap; }
.field-inline > .seg-grid { flex: 1; min-width: 0; }
.submit-btn .btn-ico { flex-shrink: 0; }
@media (max-width: 520px) {
  .field-inline { flex-direction: column; align-items: stretch; gap: 6px; }  /* màn hình hẹp không đủ chỗ cho 1 hàng */
}

/* Khung tổng có chiều cao tối thiểu cố định: đổi bước không làm khung nhảy; nhập dài thì mới dài ra */
@media (min-width: 861px) { .form-column { min-height: 620px; } }  /* điện thoại xếp 1 cột nên để khung theo nội dung */

/* Cụm ô nhập nằm giữa theo chiều dọc, trong khoảng giữa tiêu đề (trên) và hàng nút (dưới) */
.step-pane > .form-grid { margin-top: auto; margin-bottom: auto; width: 100%; }
.step-pane > .form-actions { margin-top: 0; }

/* Khối sản phẩm đầu thẻ xem trước: ảnh bên trái (cao 2 hàng), bên phải dòng sản phẩm rồi mã bảo hành */
.pv-product { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: stretch; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px dashed rgba(148, 163, 184, 0.3); }
.pv-photo {
  position: relative; width: 104px; height: 104px; border-radius: 18px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: rgba(167, 243, 208, 0.75);
  background: radial-gradient(circle at 50% 35%, rgba(16, 185, 129, 0.28), rgba(15, 23, 42, 0.6) 75%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pv-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #FFFFFF; }
.pv-photo img[hidden], .pv-fan[hidden] { display: none; }
.pv-info { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-width: 0; }
.pv-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-field .k { font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #94A3B8; }
.pv-field .v { font-size: 14.5px; font-weight: 700; color: #F8FAFC; line-height: 1.3; word-break: break-word; }

/* Chữ trong thẻ xem trước: trắng; chú thích light, dữ liệu bold */
.live-pass-header { color: #FFFFFF; font-weight: 400; font-size: 12px; }
.live-pass-code, .preview-row .k, .pv-field .k { color: #FFFFFF; font-weight: 300; }   /* chú thích: mảnh (light) */
.preview-row .v, .pv-field .v { color: #FFFFFF; font-weight: 700; }                                  /* dữ liệu khách điền: đậm (bold) */

/* Khối sản phẩm: dòng "nhãn: dữ liệu" cho Mã bảo hành và Ngày mua hàng; đường kẻ đứt trước phần giao hàng */
.pv-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; }
.pv-line .k { color: #FFFFFF; font-weight: 300; white-space: nowrap; }
.pv-line .v { color: #FFFFFF; font-weight: 700; text-align: right; word-break: break-word; min-width: 0; }
.pv-sep { border-top: 1px dashed rgba(148, 163, 184, 0.3); margin: 2px 0; }

/* Mỗi khối trong thẻ có tiêu đề + đường kẻ kéo dài tới hết hàng */
.pv-heading {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #FFFFFF;
  margin-top: 4px;
}
.pv-heading:first-child { margin-top: 0; }
.pv-heading::after { content: ""; flex: 1; border-top: 1px dashed rgba(148, 163, 184, 0.45); }
.pv-product { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

/* Màn hình xác nhận (bước 3): khung nằm giữa khung 60% cả ngang lẫn dọc */
#thankSection { margin-top: auto; margin-bottom: auto; }
.brand-logo-pill { text-decoration: none; }
.thank-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.btn-again, .btn-home {
  min-height: 48px; padding: 0 20px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn-again { background: #FFFFFF; color: var(--navy); border: 1.5px solid var(--border); }
.btn-again:hover { background: #F1F5F9; border-color: #CBD5E1; }
.btn-home { background: linear-gradient(135deg, var(--green-dark), #047857); color: #FFFFFF; border: 0; box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35); }
.btn-home:hover { background: linear-gradient(135deg, #047857, #065F46); transform: translateY(-1px); }
@media (max-width: 520px) { .btn-again, .btn-home { flex: 1 1 100%; } }
