:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d7e0ea;
  --panel: #ffffff;
  --soft: #f8fafc;
  --blue: #083b82;
  --blue-dark: #082f49;
  --red: #b91c1c;
  --green: #047857;
  --gold: #c0841a;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(8, 59, 130, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(185, 28, 28, 0.1), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 24px;
  align-items: end;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.96), rgba(8, 59, 130, 0.92) 48%, rgba(185, 28, 28, 0.86)),
    #082f49;
  color: #fff;
  box-shadow: var(--shadow);
  padding: 28px;
  overflow: hidden;
}

.eyebrow {
  margin: 0;
  color: #bfdbfe;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 10px 0 14px;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.route-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.13);
  padding: 18px;
}

.route-card > span,
.route-grid small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.route-card strong {
  font-size: 2.1rem;
  line-height: 1;
}

.route-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.route-grid div {
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  padding: 12px;
}

.route-grid b {
  display: block;
  margin-top: 2px;
}

.route-card p {
  font-size: 0.92rem;
}

.workflow {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.panel.full {
  margin-top: 14px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

h2 {
  margin: 2px 0 0;
  font-size: 1.18rem;
  letter-spacing: 0;
}

#quoteBadge {
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  padding: 6px 10px;
  font-size: 0.8rem;
}

.transfer-form,
.beneficiary-form,
.destination-fields,
.advanced-fields[open] {
  display: grid;
  gap: 12px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(8, 59, 130, 0.22);
  outline-offset: 2px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: inherit;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 12px 24px rgba(8, 59, 130, 0.22);
}

.button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.button.ghost {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.button.whatsapp {
  background: linear-gradient(135deg, #128c7e, #075e54);
  color: #fff;
  box-shadow: 0 12px 24px rgba(7, 94, 84, 0.2);
}

.button.full {
  width: 100%;
}

.promo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid rgba(4, 120, 87, 0.24);
  border-radius: var(--radius);
  background: #ecfdf5;
  color: #065f46;
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
}

.promo-strip strong {
  font-size: 1rem;
}

.promo-strip span {
  color: #047857;
  font-weight: 800;
}

.quote-board {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.quote-empty,
.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.quote-empty strong {
  display: block;
  color: var(--ink);
  font-size: 1.35rem;
}

.quote-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quote-metrics article {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--soft);
  padding: 12px;
}

.quote-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-metrics strong {
  display: block;
  margin-top: 2px;
  font-size: 1.05rem;
}

.compliance-strip {
  border: 1px solid rgba(192, 132, 26, 0.28);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius-sm);
  background: #fffbeb;
  padding: 12px;
}

.compliance-strip span {
  display: block;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.disclosures {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 12px;
}

.disclosures p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.whatsapp-board {
  margin-top: 12px;
}

.whatsapp-empty,
.whatsapp-card {
  border: 1px solid rgba(18, 140, 126, 0.22);
  border-radius: var(--radius);
  background: #f0fdfa;
  color: #115e59;
  padding: 14px;
}

.whatsapp-empty {
  display: grid;
  gap: 4px;
  text-align: center;
}

.whatsapp-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.whatsapp-card p {
  max-height: 120px;
  margin: 6px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #0f766e;
  font-size: 0.9rem;
}

.advanced-fields {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--soft);
  padding: 12px;
}

.advanced-fields summary {
  cursor: pointer;
  font-weight: 900;
}

.rail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rail-card {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 14px;
}

.rail-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.rail-card span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rail-card p,
.rail-card li {
  color: var(--muted);
  font-size: 0.9rem;
}

.rail-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.compliance-card {
  background: #fff;
}

.transfer-list {
  display: grid;
  gap: 10px;
}

.transfer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 14px;
}

.transfer-row p {
  margin: 3px 0 0;
  color: var(--muted);
}

.transfer-money {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 12px;
  font-weight: 900;
}

.transfer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.support-panel {
  border-color: rgba(8, 59, 130, 0.2);
}

.support-layout {
  display: grid;
  gap: 12px;
}

.chat-log {
  max-height: 340px;
  display: grid;
  gap: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 12px;
}

.chat-message {
  width: fit-content;
  max-width: min(760px, 92%);
  border-radius: 14px;
  padding: 11px 13px;
  white-space: pre-wrap;
}

.chat-message.bot {
  justify-self: start;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.chat-message.user {
  justify-self: end;
  background: var(--blue);
  color: #fff;
}

.chat-whatsapp {
  display: block;
  margin-top: 8px;
  color: #0f766e;
  font-weight: 900;
}

.support-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(380px, calc(100% - 40px));
  border-radius: var(--radius);
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  transform: translateY(120px);
  transition: transform 180ms ease;
  z-index: 20;
}

.toast.show {
  transform: translateY(0);
}

@media (max-width: 920px) {
  .hero,
  .workflow {
    grid-template-columns: 1fr;
  }

  .quote-metrics,
  .rail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transfer-row {
    grid-template-columns: 1fr;
  }

  .transfer-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: 100%;
    padding: 12px 12px 42px;
  }

  .hero {
    min-height: 0;
    padding: 18px;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .route-grid,
  .transfer-form,
  .quote-metrics,
  .rail-grid,
  .transfer-money {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .transfer-actions,
  .transfer-actions .button,
  .support-form,
  .whatsapp-card {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .promo-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel {
    padding: 16px;
  }
}
