/* ==========================================================================
   PATIENT WARRANTY LOOKUP PORTAL - TRANG TRA CỨU BẢO HÀNH KHÁCH HÀNG
   Design System: Figma Clinical Modern Luxury (Pristine White & Light Ocean Sky Blue)
   ========================================================================== */

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-50: #f0f9ff;
  --primary-glow: rgba(14, 165, 233, 0.25);

  --sky-bright: #0ea5e9;
  --sky-light: #38bdf8;
  --cyan-mint: #06b6d4;
  --emerald-safe: #10b981;
  --emerald-light: #ecfdf5;

  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f0f9ff;
  --bg-surface: #ffffff;
  --border-subtle: #e2e8f0;
  --border-light: #bae6fd;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --text-white: #ffffff;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(2, 132, 199, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 30px -4px rgba(2, 132, 199, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(at 10% 15%, rgba(14, 165, 233, 0.12) 0px, transparent 60%),
    radial-gradient(at 90% 85%, rgba(6, 182, 212, 0.09) 0px, transparent 60%),
    radial-gradient(at 50% 50%, rgba(224, 242, 254, 0.45) 0px, transparent 80%);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= HEADER ================= */
.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(186, 230, 253, 0.8);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  box-shadow: 0 2px 12px -2px rgba(2, 132, 199, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #0f172a;
}

.brand-sub {
  font-size: 11px;
  color: #0284c7;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.header-hotline {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0284c7;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.08);
}

.header-hotline:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.25);
}

/* ================= HERO SEARCH SECTION ================= */
.hero-section {
  padding: 50px 0 40px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0284c7;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
}

.hero-title {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #0f172a 20%, #0369a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* Khung Tra Cứu (Search Box) */
.search-card {
  max-width: 680px;
  margin: 0 auto;
  background: #ffffff;
  border: 1.5px solid #bae6fd;
  border-radius: 20px;
  padding: 32px;
  box-shadow:
    0 20px 40px -15px rgba(2, 132, 199, 0.12),
    0 0 0 1px rgba(224, 242, 254, 0.8);
}

.search-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.18);
}

.search-input::placeholder {
  font-family: var(--font-sans);
  font-weight: 500;
  color: #94a3b8;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14.5px;
}

.btn-search {
  padding: 0 32px;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-search:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

/* Captcha verification box */
.captcha-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 13.5px;
  color: #475569;
}

.captcha-display {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #0284c7;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.captcha-input {
  width: 90px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  text-align: center;
}

.captcha-input:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.sample-codes-box {
  margin-top: 18px;
  font-size: 12.5px;
  color: #64748b;
}

.sample-code-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
  cursor: pointer;
  margin: 3px;
  transition: all 0.15s;
}

.sample-code-tag:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.15);
}

/* ================= RESULT SECTION ================= */
.result-section {
  display: none;
  padding: 20px 0 60px;
  animation: fadeInResult 0.4s ease-out;
}

@keyframes fadeInResult {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 3D DIGITAL WARRANTY CARD - FIGMA PEARL CYAN & OCEAN SKY */
.digital-card-container {
  perspective: 1000px;
  max-width: 660px;
  margin: 0 auto 36px;
}

.digital-card {
  width: 100%;
  aspect-ratio: 1.586 / 1; /* Chuẩn tỷ lệ thẻ ATM ISO 7810 */
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 40%, #38bdf8 70%, #06b6d4 100%);
  border-radius: 20px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 25px 50px -12px rgba(2, 132, 199, 0.35),
    0 0 30px rgba(56, 189, 248, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #ffffff;
}

.digital-card:hover {
  transform: translateY(-4px) rotateX(2deg) rotateY(-2deg);
  box-shadow:
    0 30px 60px -12px rgba(2, 132, 199, 0.45),
    0 0 40px rgba(56, 189, 248, 0.35);
}

/* Hologram Shimmer Effect */
.digital-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 35%,
    rgba(255, 255, 255, 0.15) 45%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(224, 242, 254, 0.2) 55%,
    transparent 65%
  );
  transform: rotate(30deg);
  pointer-events: none;
  animation: hologramShine 8s infinite linear;
}

@keyframes hologramShine {
  0% { transform: translateY(-30%) rotate(30deg); }
  50% { transform: translateY(30%) rotate(30deg); }
  100% { transform: translateY(-30%) rotate(30deg); }
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.card-chip {
  width: 52px;
  height: 40px;
  background: linear-gradient(135deg, #f0f9ff, #bae6fd, #7dd3fc);
  border-radius: 8px;
  border: 1px solid #0284c7;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-chip::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(2, 132, 199, 0.6);
  border-radius: 4px;
}

.card-lab-brand {
  text-align: right;
}

.card-lab-name {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.card-lab-sub {
  font-size: 10px;
  font-weight: 700;
  color: #e0f2fe;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.card-middle {
  z-index: 2;
  margin: 10px 0;
}

.card-code-label {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.card-code-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  margin: 4px 0;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
}

.card-holder-name {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.card-restoration-type {
  font-size: 12.5px;
  color: #e0f2fe;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.card-seal-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(224, 242, 254, 0.12) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.card-seal-text {
  font-size: 7.5px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1;
}

/* ================= CHI TIẾT BẢO HÀNH (DETAILS GRID) ================= */
.details-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px -5px rgba(2, 132, 199, 0.06);
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.status-banner.active {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
}

.status-banner.expired {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.status-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.status-pill-badge.active {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.3);
}

.status-pill-badge.expired {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
}

.status-pill-badge.revoked {
  background: #475569;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(71, 85, 105, 0.3);
}

.status-title {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.info-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
}

.info-item-label {
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
  font-weight: 700;
}

.info-item-value {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
}

.info-item-value.highlight {
  color: #0284c7;
}

.info-item-value.gold {
  color: #d97706;
}

/* ================= SƠ ĐỒ RĂNG PHÁT SÁNG ================= */
.odontogram-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #e2e8f0;
}

.section-sub-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.illuminated-teeth-chart {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 16px;
  padding: 24px;
  box-shadow: inset 0 2px 6px rgba(2, 132, 199, 0.04);
}

.teeth-row-display {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
}

.tooth-capsule {
  width: 32px;
  height: 74px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s;
}

.tooth-capsule.restored {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.6);
  transform: translateY(-2px);
}

.tooth-capsule .tooth-glyph { width:27px;height:45px;flex-shrink:0; }

/* ================= ẢNH THẺ THỰC TẾ 2 MẶT ================= */
.physical-cards-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #e2e8f0;
}

.cards-duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card-sample-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.card-sample-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.card-sample-img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 16px rgba(2, 132, 199, 0.08);
}

/* ================= ACTION BUTTONS ================= */
.actions-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.btn-action {
  padding: 14px 32px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-action.primary {
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: white;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.btn-action.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(2, 132, 199, 0.5);
}

.btn-action.secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
}
.btn-action.secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid #e2e8f0;
  background: #f1f5f9;
  padding: 30px 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Responsive */
@media (max-width: 640px) {
  .hero-title { font-size: 26px; }
  .search-input-group { flex-direction: column; }
  .btn-search { padding: 14px; justify-content: center; }
  .cards-duo-grid { grid-template-columns: 1fr; }
  .digital-card { padding: 20px; }
  .card-code-value { font-size: 20px; }
}

/* Print styling */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  .site-header, .hero-section, .actions-row, .site-footer {
    display: none !important;
  }
  .result-section {
    display: block !important;
    padding: 0 !important;
  }
  .digital-card {
    border: 2px solid #000 !important;
    background: #0284c7 !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .details-box {
    background: white !important;
    border: 1px solid #ccc !important;
    color: black !important;
  }
  .info-item {
    background: #f8fafc !important;
    border: 1px solid #ddd !important;
    color: black !important;
  }
  .info-item-value {
    color: black !important;
  }
}

/* ==========================================================================
   LAB SWITCHER & LUXURY GOLD & BLACK THEME
   Obsidian & radiant metallic gold accents
   ========================================================================== */

.header-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid #d4af37;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
  display: block;
}

.card-flower-watermark {
  display: none;
}

/* ================= GOLD THEME ACTIVE ================= */

/* Keep the tooth chart within a scrollable panel on small screens. */
.illuminated-teeth-chart { overflow-x:auto; }
.teeth-row-display { width:max-content;min-width:100%;justify-content:flex-start; }
.tooth-capsule { flex-shrink:0; }
.teeth-chart-hint { max-width:100%;white-space:normal; }
.info-item,.brand-wrapper,.header-inner > div { min-width:0; }
.hero-title,.brand-title,.card-code-value,.info-item-value { overflow-wrap:anywhere; }
.status-banner.pending { background:#fffbeb;color:#92400e;border:1px solid #fcd34d; }
@media(max-width:640px) {
  .header-inner { flex-wrap:wrap;gap:12px; }
  .header-inner > div { flex-wrap:wrap;gap:8px !important; }
  .brand-wrapper { flex:1 1 100%; }
  .illuminated-teeth-chart { padding:12px; }
  .hero-badge { white-space:normal;text-align:center; }
  .card-top,.card-bottom { gap:12px;flex-wrap:wrap; }
  .digital-card,.details-box { min-width:0; }
  .card-holder-name { overflow-wrap:anywhere; }
}
@media print {
  @page { margin:10mm; }
  .container { max-width:none !important;padding:0 !important; }
  .result-section { margin:0 !important; }
  .digital-card-container { max-width:none;margin:0 0 12px; }
  .digital-card { padding:14px; }
  .details-box { padding:14px; }
  .info-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; }
  .info-item { padding:8px;break-inside:avoid; }
  .info-item-label { font-size:9px; }
  .info-item-value { font-size:11px; }
  .odontogram-section,.physical-cards-section { margin-top:14px;break-inside:avoid; }
  .illuminated-teeth-chart { overflow:visible;padding:10px; }
  .teeth-row-display { width:100%;justify-content:center;min-width:0; }
  .tooth-capsule { width:25px;height:48px;padding:2px; }
  .tooth-capsule .tooth-glyph { width:18px;height:30px; }
  .cards-duo-grid { grid-template-columns:1fr 1fr;gap:8px; }
  .card-sample-img { max-height:150px;object-fit:contain; }
  .details-box > div[style] { break-inside:avoid; }
  #res-lab-policy { color:#334155 !important; }
}

.teeth-scroll-hint { display:none;font-size:12px;color:#64748b;margin-bottom:10px; }
@media(max-width:640px) { .teeth-scroll-hint { display:block; } }
