/* public/css/pricing.css - M102: Trang bảng giá công khai & đăng ký trước */
:root {
  --navy: #051c32;
  --navy2: #132d45;
  --gold: #c5a66e;
  --gold-hover: #d4b77f;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --success-text: #166534;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #991b1b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
.pricing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 28, 50, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

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

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
}

.brand-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.header-nav a:hover {
  color: #fff;
}

.btn-header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-header-login:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Main Container */
.pricing-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Hero */
.hero-section {
  text-align: center;
  margin-bottom: 36px;
}

.pioneer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-title {
  margin: 0 0 14px;
  font-size: 38px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  margin: 0 auto;
  max-width: 680px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.5;
}

/* Billing Toggle */
.billing-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 32px 0 44px;
}

.toggle-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.toggle-label.active {
  color: var(--navy);
  font-weight: 700;
}

.toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  padding: 0;
  transition: background 0.2s ease;
}

.toggle-switch.is-yearly {
  background: var(--navy2);
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.toggle-switch.is-yearly .toggle-knob {
  transform: translateX(26px);
}

.discount-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid #bbf7d0;
}

/* Plans Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  margin-bottom: 60px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 26px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
}

.plan-card.is-popular {
  border-color: var(--navy);
  border-width: 2px;
  box-shadow: 0 10px 25px -5px rgba(5, 28, 50, 0.15);
}

.plan-badge-top {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-trial-top {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-popular-top {
  background: var(--navy);
  color: #fff;
}

.badge-enterprise-top {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.plan-header {
  margin-bottom: 20px;
}

.plan-name {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

.plan-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
  min-height: 38px;
}

.plan-price-block {
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-number {
  font-size: 34px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.price-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.price-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: #059669;
  font-weight: 600;
  min-height: 18px;
}

.price-sub.empty {
  visibility: hidden;
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
}

.plan-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.45;
}

.feat-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #059669;
  margin-top: 2px;
}

.feat-strong {
  font-weight: 700;
  color: var(--navy);
}

.btn-select-plan {
  width: 100%;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  transition: all 0.15s ease;
}

.btn-select-plan:hover {
  background: var(--navy);
  color: #fff;
}

.plan-card.is-popular .btn-select-plan {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.plan-card.is-popular .btn-select-plan:hover {
  background: var(--navy2);
}

/* Feature Comparison Table */
.comparison-section {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
  padding: 36px 30px;
  margin-bottom: 60px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
}

.section-subtitle {
  margin: 0 auto 30px;
  max-width: 600px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

.table-responsive {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.comparison-table th {
  background: #f8fafc;
  color: var(--navy);
  font-weight: 700;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 40%;
}

.comparison-table th:not(:first-child),
.comparison-table td:not(:first-child) {
  text-align: center;
  width: 20%;
}

.check-yes {
  color: #059669;
  font-weight: 700;
  font-size: 16px;
}

.check-no {
  color: #cbd5e1;
  font-size: 16px;
}

/* FAQ Section */
.faq-section {
  max-width: 860px;
  margin: 0 auto 70px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 22px;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: #cbd5e1;
}

.faq-question {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "＋";
  font-size: 18px;
  color: var(--muted);
  font-weight: 400;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  margin-top: 12px;
  font-size: 14.5px;
  color: #334155;
  line-height: 1.6;
}

/* Registration Form Section */
.register-section {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.reg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-group.col-full {
  grid-column: span 2;
}

.form-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
}

.form-input,
.form-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(5, 28, 50, 0.1);
}

.form-consent-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.form-consent-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.form-consent-wrap a {
  color: var(--navy);
  text-decoration: underline;
  font-weight: 600;
}

.reg-submit-btn {
  width: 100%;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.reg-submit-btn:hover {
  background: var(--navy2);
}

.reg-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Honeypot field */
.w-hp {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Error Box */
.reg-error-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 16px;
}

.reg-error-box[hidden] {
  display: none !important;
}

/* Success Box */
.reg-success-box {
  text-align: center;
  padding: 30px 20px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 20px;
}

.reg-success-box[hidden] {
  display: none !important;
}

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

.success-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--success-text);
}

.success-desc {
  margin: 0 auto 24px;
  max-width: 520px;
  font-size: 15px;
  color: #1e293b;
  line-height: 1.6;
}

.zalo-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: #0068ff;
  color: #fff;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 104, 255, 0.25);
  transition: background 0.15s ease, transform 0.1s ease;
}

.zalo-cta-btn:hover {
  background: #0056d6;
  color: #fff;
  transform: translateY(-1px);
}

/* Footer */
.pricing-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 30px 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--navy);
}

/* Responsive */
@media (max-width: 860px) {
  .plans-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
    margin: 0 auto 50px;
  }

  .hero-title {
    font-size: 30px;
  }

  .reg-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-group.col-full {
    grid-column: span 1;
  }

  .register-section {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .price-number {
    font-size: 28px;
  }

  .header-nav {
    display: none;
  }
}

/* Nút "Dùng thử" là thẻ <a>: cùng dáng với nút chọn gói */
a.btn-select-plan {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
