html:has(#fbForm) { scroll-behavior: smooth; }

/* ================= Hero ================= */
.fb-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--navy) 0%, #0b1e8f 55%, var(--gold-dark) 160%);
  padding: 54px 0 46px;
  text-align: center;
}
.fb-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(245, 185, 66, .16) 0%, transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(245, 185, 66, .12) 0%, transparent 45%);
  pointer-events: none;
}
.fb-hero-inner { position: relative; z-index: 1; }

.fb-crumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .65);
  margin-bottom: 18px;
}
.fb-crumb a { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .92); }
.fb-crumb a:hover { color: var(--gold); }
.fb-crumb-sep { color: rgba(255, 255, 255, .35); }
.fb-crumb-current { color: var(--gold); }

.fb-eyebrow {
  display: inline-block;
  background: rgba(245, 185, 66, .16);
  border: 1px solid rgba(245, 185, 66, .42);
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.fb-hero h1 {
  color: white;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.28;
  margin: 0 0 16px;
}
.fb-hero h1 em { font-style: normal; color: var(--gold); }

.fb-hero-sub {
  color: #d5dafa;
  font-size: 15px;
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 30px;
}

.fb-hero-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.fb-hero-stat { display: flex; flex-direction: column; gap: 2px; }
.fb-hero-stat strong { font-size: 24px; font-weight: 800; color: white; }
.fb-hero-stat span { font-size: 12px; color: #aab2e0; font-weight: 600; }

.fb-hero-cta {
  display: inline-flex;
  background: linear-gradient(120deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: var(--gold-text);
  box-shadow: 0 10px 26px rgba(212, 160, 23, .38);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fb-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(212, 160, 23, .45);
}

/* ================= Trust strip ================= */
.fb-trust { background: white; border-bottom: 1px solid var(--border); }
.fb-trust-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 34px;
  padding: 18px 24px;
}
.fb-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-text);
  white-space: nowrap;
}

/* ================= Layout ================= */
.fb-page { background: var(--page-bg); padding: 40px 0 64px; }
.fb-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
  align-items: start;
}
@media (max-width: 960px) {
  .fb-layout { grid-template-columns: 1fr; }
  .fb-sidebar { order: -1; }
}

/* ================= Form cards ================= */
.fb-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.fb-card-head {
  background: linear-gradient(120deg, var(--navy) 0%, #0b1e8f 100%);
  color: white;
  padding: 15px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fb-card-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(245, 185, 66, .22);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.fb-card-head h3 { margin: 0; font-size: 16px; color: white; }
.fb-card-sub { font-size: 12px; opacity: .8; display: block; margin-top: 1px; }
.fb-card-body { padding: 22px; }

.fb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .fb-row { grid-template-columns: 1fr; } }

.fb-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.fb-field:last-child { margin-bottom: 0; }
.fb-field-full { grid-column: 1 / -1; }
.fb-field label { font-size: 12.5px; font-weight: 700; color: var(--navy-text); }
.fb-req { color: var(--red); }
.fb-hint { font-size: 11.5px; color: var(--text-muted); }

.fb-field input,
.fb-field select,
.fb-field textarea {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--navy-text);
  background: var(--page-bg);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.fb-field select { cursor: pointer; }
.fb-field textarea { resize: vertical; min-height: 60px; }
.fb-field input:focus,
.fb-field select:focus,
.fb-field textarea:focus {
  outline: none;
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, .16);
  background: white;
}

/* ================= Item rows ================= */
.fb-item-rows { display: flex; flex-direction: column; gap: 12px; }
.fb-item-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 100px 36px;
  gap: 10px;
  align-items: end;
  background: var(--page-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
@media (max-width: 720px) { .fb-item-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .fb-item-row { grid-template-columns: 1fr; } }

.fb-item-row .fb-field { margin-bottom: 0; }
.fb-item-row .fb-field select:disabled { opacity: .55; cursor: not-allowed; }
.fb-item-row-remove {
  width: 36px;
  height: 38px;
  border-radius: 8px;
  background: white;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.fb-item-row-remove:hover { color: var(--red); border-color: var(--red); background: #FEF2F2; }

.fb-add-row-btn {
  width: 100%;
  padding: 12px;
  background: none;
  border: 2px dashed var(--gold-dark);
  border-radius: 11px;
  color: var(--gold-text);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  transition: all .2s ease;
}
.fb-add-row-btn:hover { background: rgba(212, 160, 23, .08); border-color: var(--navy); color: var(--navy-text); }
.fb-add-row-btn span { font-size: 16px; }

/* ================= Total kg box ================= */
.fb-total-box {
  background: linear-gradient(120deg, var(--navy) 0%, #0b1e8f 100%);
  color: white;
  border-radius: 13px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.fb-total-label { font-size: 12.5px; font-weight: 700; opacity: .8; }
.fb-total-val { font-size: 30px; font-weight: 800; line-height: 1; }
.fb-total-unit { font-size: 13px; font-weight: 600; opacity: .75; }
.fb-total-min { text-align: right; display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; opacity: .8; }
.fb-total-min strong { font-size: 14px; color: var(--gold); }

.fb-warn-box {
  display: none;
  gap: 8px;
  align-items: flex-start;
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 12.5px;
  color: #DC2626;
  font-weight: 600;
}
.fb-warn-box.show { display: flex; }

/* ================= Advance payment ================= */
.fb-pay-notice {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 1.5px solid #FCD34D;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.fb-pay-notice-head {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14.5px;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 14px;
}
.fb-pay-notice-head small { display: block; font-size: 11.5px; font-weight: 600; color: #92400E; margin-top: 1px; }
.fb-pay-notice-icon {
  width: 34px;
  height: 34px;
  background: var(--gold-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
}
.fb-pay-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.fb-pay-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #78350F;
  line-height: 1.5;
}
.fb-pay-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold-dark);
  color: white;
  font-size: 10.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.fb-bkash-box {
  background: white;
  border: 2px solid #D1245B;
  border-radius: 11px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.fb-bkash-left { display: flex; align-items: center; gap: 10px; }
.fb-bkash-icon {
  width: 34px;
  height: 34px;
  background: #D1245B;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: .9rem;
  font-weight: 900;
  font-style: italic;
}
.fb-bkash-left strong { display: block; font-size: 13.5px; font-weight: 900; color: #D1245B; }
.fb-bkash-left small { font-size: 11px; color: #9CA3AF; }
.fb-bkash-number { font-size: 15px; font-weight: 900; color: #D1245B; letter-spacing: .03em; }
.fb-bkash-badge {
  background: #FFF1F2;
  border: 1px solid #FECDD5;
  color: #D1245B;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ================= Submit ================= */
.fb-submit {
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(120deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: var(--gold-text);
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(212, 160, 23, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fb-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(212, 160, 23, .42); }
.fb-submit-note { text-align: center; font-size: 11.5px; color: var(--text-muted); margin: 10px 0 0; }

/* ================= Sidebar ================= */
.fb-sidebar-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.fb-sidebar-head {
  padding: 13px 18px;
  font-size: 13.5px;
  font-weight: 800;
  color: white;
}
.fb-sidebar-head-gold { background: linear-gradient(120deg, var(--gold-dark), var(--gold)); color: var(--gold-text); }
.fb-sidebar-head-blue { background: linear-gradient(120deg, var(--navy), var(--blue-dark)); }
.fb-sidebar-head-green { background: linear-gradient(120deg, var(--green), #10B981); }
.fb-sidebar-head-purple { background: linear-gradient(120deg, var(--purple), #7a2be0); }
.fb-sidebar-body { padding: 16px 18px; }

.fb-how-list { display: flex; flex-direction: column; gap: 0; }
.fb-how-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-tint);
}
.fb-how-item:last-child { border-bottom: none; }
.fb-how-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.fb-how-item strong { font-size: 13px; color: var(--navy-text); }
.fb-how-item p { font-size: 12px; color: var(--text-muted); margin: 3px 0 0; line-height: 1.5; }

.fb-rules-list { display: flex; flex-direction: column; gap: 10px; }
.fb-rules-list li {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--navy-text);
  padding-left: 20px;
  position: relative;
}
.fb-rules-list li::before {
  content: '●';
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 9px;
}
.fb-rules-list li.fb-rule-ok::before { color: var(--green); }
.fb-rules-list li.fb-rule-info::before { color: var(--blue); }
.fb-rules-list li.fb-rule-warn::before { color: var(--gold-dark); }

.fb-picks-list { display: flex; flex-direction: column; gap: 9px; }
.fb-picks-list li { font-size: 12.5px; color: var(--navy-text); line-height: 1.5; }
.fb-picks-list li strong { color: var(--navy-text); }

.fb-help-body p { margin: 0 0 8px; font-size: 12.5px; color: var(--navy-text); }
.fb-help-body p:last-child { margin-bottom: 0; }

/* ================= Success modal ================= */
.fb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 15, 60, .6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.fb-overlay.show { opacity: 1; visibility: visible; }
.fb-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 20px;
  padding: 30px 30px 26px;
  box-shadow: 0 24px 60px rgba(9, 15, 60, .35);
  text-align: center;
  transform: translateY(24px) scale(.96);
  opacity: 0;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease;
}
.fb-overlay.show .fb-modal { transform: translateY(0) scale(1); opacity: 1; }
.fb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--navy-text);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.fb-close:hover { background: var(--border); transform: rotate(90deg); }
.fb-modal-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--gold-dark) 100%);
  box-shadow: 0 10px 26px rgba(212, 160, 23, .35);
}
.fb-modal h2 { margin: 0 0 8px; font-size: 19px; color: var(--navy-text); }
.fb-modal-ref {
  display: inline-block;
  background: var(--bg-tint);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.fb-modal p { margin: 0 0 20px; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
#fbModalName { color: var(--navy-text); font-weight: 600; }
.fb-modal-done { background: var(--navy); color: white; }

@media (max-width: 560px) {
  .fb-hero { padding: 40px 0 34px; }
  .fb-total-box { flex-direction: column; align-items: flex-start; gap: 8px; }
  .fb-total-min { text-align: left; }
  .fb-card-body { padding: 18px; }
  .fb-bkash-box { flex-direction: column; align-items: flex-start; }
}
