/* ====================================================================
   VAYNHANH247 - FINTECH MODERN CSS STYLESHEET
   ==================================================================== */

:root {
  --bg-main: #0b0f19;
  --bg-card: #131b2e;
  --bg-card-hover: #1e293b;
  --bg-darker: #070a12;
  --border-color: #24324d;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-light: rgba(16, 185, 129, 0.15);
  --accent-cyan: #38bdf8;
  --accent-orange: #f59e0b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #cbd5e1;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Announcement Top Bar */
.top-banner {
  background: linear-gradient(90deg, #059669, #0284c7);
  color: #ffffff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 26px;
  background: linear-gradient(135deg, #10b981, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.accent-title {
  color: #10b981;
}

.brand-subtitle {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hotline-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--accent-orange);
  background: rgba(245, 158, 11, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Location Subbar (Thanh hiển thị vị trí ngang) */
.location-subbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #0d1527;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-sub);
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
}

/* Location Gatekeeper (Màn hình bắt buộc xin quyền GPS) */
.location-gatekeeper-card {
  max-width: 560px;
  margin: 60px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 44px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: fadeIn 0.4s ease;
}

.gatekeeper-icon-pulse {
  font-size: 64px;
  margin-bottom: 16px;
  display: inline-block;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes pulseRed {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.4)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.8)); }
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

.location-gatekeeper-card h2 {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.location-gatekeeper-card p {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 30px;
}

.btn-gps-large {
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 800;
  width: 100%;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transition: all 0.25s ease;
}

.btn-gps-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.55);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-block;
  text-align: center;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.1);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-large {
  padding: 14px 24px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* Hero Section */
.hero-section {
  padding: 40px 20px 60px;
  background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.hero-heading {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #34d399, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 28px;
  max-width: 520px;
}

.trust-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

/* Calculator Card */
.calculator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
}

.card-header h3 {
  font-size: 20px;
  font-weight: 800;
}

.badge-discount {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
}

.highlight-val {
  color: var(--accent-cyan);
  font-size: 20px;
  font-weight: 900;
}

input[type="range"] {
  width: 100%;
  accent-color: #10b981;
  height: 6px;
  border-radius: 4px;
  background: #334155;
  cursor: pointer;
}

.range-marks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.quick-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.chip {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 6px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.chip.active, .chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: #34d399;
}

.term-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.term-btn {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 8px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.term-btn.active, .term-btn:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  color: #ffffff;
}

.calc-summary {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 20px 0 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.summary-total {
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-main);
  font-weight: 700;
}

.highlight-total {
  color: var(--accent-orange);
  font-size: 20px;
  font-weight: 900;
}

.text-green {
  color: #10b981;
}

.micro-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Sections Common */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.bg-darker {
  background-color: var(--bg-darker);
  max-width: 100%;
}

.text-center {
  text-align: center;
}

.section-heading {
  margin-bottom: 40px;
}

.sub-badge {
  display: inline-block;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-heading h2 {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-heading p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Application Form */
.form-wrapper {
  max-width: 820px;
  margin: 0 auto;
}

.form-step-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.step-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
}

.step-title h4 {
  font-size: 18px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.required {
  color: #ef4444;
}

.input-group input, .input-group select {
  background: #0f172a;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus, .input-group select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Location Status Badge */
.location-status-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

.form-submit-box {
  margin-top: 24px;
  text-align: center;
}

.terms-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 18px;
}

.btn-submit-loan {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* Packages Grid */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pkg-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.25s;
}

.pkg-card:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
}

.pkg-card.featured {
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.pkg-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
}

.pkg-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.pkg-card h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pkg-desc {
  font-size: 13px;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 16px;
}

.pkg-limit, .pkg-rate {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.pkg-limit strong, .pkg-rate strong {
  color: var(--accent-orange);
}

.pkg-card a {
  margin-top: 14px;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}

.step-card-num {
  font-size: 36px;
  font-weight: 900;
  color: rgba(56, 189, 248, 0.25);
  line-height: 1;
  margin-bottom: 8px;
}

.step-card h4 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Reviews Grid */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.review-stars {
  margin-bottom: 10px;
}

.review-text {
  font-size: 14px;
  color: var(--text-sub);
  font-style: italic;
  margin-bottom: 18px;
  flex-grow: 1;
}

.reviewer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981, #0284c7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
}

.reviewer span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.success-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.app-summary-card {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  text-align: left;
}

.app-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.callout-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-darker);
  padding: 40px 20px 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  max-width: 340px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-sub);
}

.footer-col p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  font-size: 12px;
  color: #64748b;
}

/* Responsive Mobile Rules */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
  }
  .packages-grid, .steps-grid {
    grid-template-columns: 1fr 1fr;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .location-gatekeeper-card {
    margin: 30px 16px;
    padding: 32px 20px;
    border-radius: 18px;
  }
  .gatekeeper-icon-pulse {
    font-size: 48px;
  }
  .location-gatekeeper-card h2 {
    font-size: 20px;
  }
  .location-gatekeeper-card p {
    font-size: 13px;
    margin-bottom: 22px;
  }
  .btn-gps-large {
    padding: 14px 20px;
    font-size: 15px;
  }
  .hero-heading {
    font-size: 28px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .packages-grid, .steps-grid {
    grid-template-columns: 1fr;
  }
  .quick-chips, .term-selector {
    grid-template-columns: repeat(2, 1fr);
  }
  .hotline-btn span.hotline-text {
    display: none;
  }
}
