/* Remesas Godoy · web de clientes. Pensada primero para el móvil.
   Marca: verde oscuro, dorado (SOLO para el dinero), verde palma, crema. Playfair + Inter. */
:root {
  --verde: #0A2E22;
  --verde-2: #12402F;
  --verde-3: #1B5640;
  --dorado: #C9A84C;
  --dorado-osc: #8E7224;
  --palma: #2E9E5B;
  --crema: #F5F0E6;
  --crema-2: #EDE5D3;
  --tinta: #1C2420;
  --gris: #5D6661;
  --linea: #DCD3BF;
  --blanco: #FFFFFF;
  --rojo: #B3372E;
  --rojo-fondo: #FBECE9;
  --ambar-fondo: #FFF5DB;
  --radio: 18px;
  --radio-s: 12px;
  --sombra: 0 1px 2px rgba(10, 46, 34, .06), 0 8px 24px rgba(10, 46, 34, .08);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ancho: 600px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font: 17px/1.5 var(--sans);
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--verde-3); }
[hidden] { display: none !important; }

/* ---------- cabecera */
.top {
  background: var(--verde);
  color: var(--crema);
  padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.brand-small { font: 500 11px/1 var(--sans); letter-spacing: .32em; color: var(--crema); opacity: .85; margin-bottom: 4px; }
.brand-big { font: 800 26px/1 var(--serif); color: var(--dorado); letter-spacing: .02em; }
.star { font-family: var(--sans); font-size: 18px; vertical-align: 3px; }
.help {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--palma); color: #fff; text-decoration: none;
  padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 15px;
}
.help svg { width: 20px; height: 20px; fill: #fff; }

.banner {
  background: var(--ambar-fondo); color: #6B4E00; border-bottom: 1px solid #F0DFA8;
  padding: 10px 16px; text-align: center; font-weight: 600; font-size: 15px;
}

/* ---------- contenedor */
.app { flex: 1; width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 20px 16px 32px; }
.loading { display: grid; place-items: center; min-height: 40vh; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 4px solid var(--crema-2); border-top-color: var(--verde-3);
  animation: girar .8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

h1, h2 { font-family: var(--serif); color: var(--verde); line-height: 1.15; margin: 0 0 8px; }
h1 { font-size: 30px; }
h2 { font-size: 24px; }
.lead { color: var(--gris); margin: 0 0 20px; font-size: 17px; }
.muted { color: var(--gris); }
.small { font-size: 14px; }
.flagsvg { display: inline-block; width: 1.4em; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); vertical-align: -0.2em; }
.flag .flagsvg { width: 1em; }
.money { color: var(--dorado-osc); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- inicio */
.hero {
  background: var(--verde);
  background-image: radial-gradient(120% 90% at 100% 0%, var(--verde-3) 0%, transparent 60%);
  color: var(--crema);
  border-radius: var(--radio);
  padding: 26px 20px 22px;
  margin-bottom: 22px;
  box-shadow: var(--sombra);
}
.hero h1 { color: #fff; font-size: 31px; margin-bottom: 10px; }
.hero p { margin: 0 0 20px; color: var(--crema); opacity: .92; }
.hero .slogan { font-family: var(--serif); font-style: italic; color: var(--dorado); opacity: 1; margin: 14px 0 0; text-align: center; }

.section-title { font: 700 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gris); margin: 26px 0 12px; }

.rates { display: grid; gap: 10px; }
.rate {
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio-s);
  padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center;
}
.rate .flag { font-size: 28px; grid-row: span 2; }
.rate .name { font-weight: 600; }
.rate .figure { font-size: 19px; }
.rate .note { grid-column: 2; font-size: 14px; color: var(--gris); }

.steps3 { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps3 li { display: flex; gap: 14px; align-items: flex-start; background: var(--blanco); border-radius: var(--radio-s); padding: 14px 16px; border: 1px solid var(--linea); }
.steps3 .num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--verde); color: var(--dorado); font: 800 17px/34px var(--serif); text-align: center;
}
.steps3 b { display: block; }

.trust { background: var(--crema-2); border-radius: var(--radio); padding: 18px; margin-top: 22px; }
.trust p { margin: 0 0 6px; }

/* ---------- botones */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 14px 20px;
  border: 0; border-radius: 14px; cursor: pointer;
  font-weight: 700; font-size: 18px; text-decoration: none; text-align: center;
  transition: transform .08s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: scale(.985); }
.btn-gold { background: var(--dorado); color: var(--verde); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-green { background: var(--verde); color: #fff; }
.btn-green:hover { background: var(--verde-2); }
.btn-wa { background: var(--palma); color: #fff; }
.btn-light { background: var(--blanco); color: var(--verde); border: 2px solid var(--linea); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn + .btn { margin-top: 10px; }
.link-btn { background: none; border: 0; color: var(--verde-3); font-weight: 600; cursor: pointer; padding: 10px 4px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- asistente */
.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.progress-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--crema-2); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--palma); border-radius: 99px; transition: width .3s ease; }
.progress-txt { font-size: 14px; color: var(--gris); font-weight: 600; white-space: nowrap; }
.back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--gris); font-weight: 600; padding: 6px 0; margin-bottom: 6px; cursor: pointer; }

.choices { display: grid; gap: 12px; margin-top: 6px; }
.choice {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  background: var(--blanco); border: 2px solid var(--linea); border-radius: var(--radio);
  padding: 18px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.choice:hover, .choice:focus-visible { border-color: var(--palma); box-shadow: 0 0 0 4px rgba(46, 158, 91, .12); outline: none; }
.choice .flag { font-size: 40px; line-height: 1; }
.choice .ico { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--crema); display: grid; place-items: center; font-size: 26px; }
.choice .t { font-weight: 700; font-size: 19px; display: block; color: var(--verde); }
.choice .d { font-size: 15px; color: var(--gris); display: block; margin-top: 2px; }
.choice .r { font-size: 16px; display: block; margin-top: 6px; }
.choice .arrow { margin-left: auto; color: var(--palma); font-size: 26px; flex: none; }

/* calculadora */
.calc { background: var(--blanco); border-radius: var(--radio); border: 1px solid var(--linea); overflow: hidden; box-shadow: var(--sombra); }
.calc-row { padding: 16px 18px; }
.calc-row + .calc-row { border-top: 1px dashed var(--linea); }
.calc-row label { display: block; font-weight: 600; color: var(--gris); font-size: 15px; margin-bottom: 6px; }
.calc-input { display: flex; align-items: center; gap: 10px; }
.calc-input input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: 800 34px/1.1 var(--sans); color: var(--verde); font-variant-numeric: tabular-nums; padding: 2px 0;
}
.calc-row.receive input { color: var(--dorado-osc); }
.calc-input .cur { font-weight: 800; font-size: 18px; color: var(--gris); background: var(--crema); border-radius: 10px; padding: 6px 10px; }
.calc-meta { background: var(--crema); padding: 12px 18px; font-size: 15px; display: grid; gap: 4px; }
.bonus { color: var(--palma); font-weight: 700; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.quick button { background: var(--blanco); border: 2px solid var(--linea); border-radius: 999px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.quick button:hover { border-color: var(--palma); }

/* formularios */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--verde); }
.field .help-txt { font-size: 14px; color: var(--gris); margin: 6px 0 0; }
.input, .field select, .field textarea {
  width: 100%; min-height: 56px; padding: 14px 16px;
  border: 2px solid var(--linea); border-radius: 14px; background: var(--blanco);
  font-size: 18px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 96px; resize: vertical; }
.input:focus, .field select:focus, .field textarea:focus { border-color: var(--palma); box-shadow: 0 0 0 4px rgba(46, 158, 91, .14); }
.field.bad .input, .field.bad select, .field.bad textarea { border-color: var(--rojo); }
.field .err { color: var(--rojo); font-size: 15px; font-weight: 600; margin: 6px 0 0; }
.check { display: flex; gap: 12px; align-items: center; font-weight: 600; margin: 6px 0 18px; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--palma); }

.card-illu { margin: 4px 0 10px; }
.card-illu svg { width: 100%; max-width: 320px; height: auto; display: block; }

.saved { display: grid; gap: 10px; margin-bottom: 14px; }

.alert { border-radius: var(--radio-s); padding: 14px 16px; margin: 0 0 16px; font-weight: 600; }
.alert-bad { background: var(--rojo-fondo); color: var(--rojo); }
.alert-info { background: #E7F4EC; color: #1D6B3E; }
.alert-warn { background: var(--ambar-fondo); color: #6B4E00; }

.sticky-cta { position: sticky; bottom: 0; padding: 14px 0 max(14px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--crema) 75%, rgba(245, 240, 230, 0)); margin-top: 8px; }

/* resumen */
.summary { background: var(--blanco); border-radius: var(--radio); border: 1px solid var(--linea); overflow: hidden; }
.summary-sec { padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.summary-sec + .summary-sec { border-top: 1px solid var(--crema-2); }
.summary-sec .k { font-size: 14px; color: var(--gris); font-weight: 600; }
.summary-sec .v { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.summary-sec .edit { flex: none; }
.summary-total { background: var(--verde); color: var(--crema); padding: 16px 18px; }
.summary-total .money { color: var(--dorado); font-size: 26px; }

/* pago */
.pay-box { background: var(--verde); color: var(--crema); border-radius: var(--radio); padding: 20px; box-shadow: var(--sombra); }
.pay-box h2 { color: #fff; font-size: 22px; }
.pay-amount { font: 800 38px/1.1 var(--sans); color: var(--dorado); margin: 4px 0 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.acc { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 4px 14px; margin-top: 14px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.acc-row + .acc-row { border-top: 1px solid rgba(255, 255, 255, .12); }
.acc-row .k { font-size: 13px; opacity: .75; display: block; }
.acc-row .v { font-weight: 700; font-size: 18px; color: #fff; overflow-wrap: anywhere; }
.copy {
  flex: none; background: var(--dorado); color: var(--verde); border: 0; border-radius: 10px;
  font-weight: 800; padding: 10px 12px; cursor: pointer; font-size: 14px; min-width: 84px;
}
.copy.done { background: var(--palma); color: #fff; }
.howto { counter-reset: paso; list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.howto li { counter-increment: paso; display: flex; gap: 12px; align-items: flex-start; }
.howto li::before {
  content: counter(paso); flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--crema-2); color: var(--verde); font-weight: 800; display: grid; place-items: center;
}

/* subida */
.drop {
  display: block; background: var(--blanco); border: 3px dashed var(--palma); border-radius: var(--radio);
  padding: 26px 18px; text-align: center; cursor: pointer; transition: background .15s;
}
.drop:hover { background: #F2FAF5; }
.drop .big { font-size: 46px; line-height: 1; }
.drop b { display: block; font-size: 20px; color: var(--verde); margin-top: 8px; }
.drop span { color: var(--gris); font-size: 15px; }
.preview { background: var(--blanco); border-radius: var(--radio); border: 1px solid var(--linea); padding: 12px; text-align: center; }
.preview img { max-height: 340px; margin: 0 auto; border-radius: 10px; }
.preview .pdf { font-size: 54px; }
.bar { height: 10px; background: var(--crema-2); border-radius: 99px; overflow: hidden; margin: 12px 0 4px; }
.bar > span { display: block; height: 100%; width: 0; background: var(--palma); transition: width .2s; }

/* seguimiento */
.order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.order-num { font: 700 15px/1 var(--sans); color: var(--gris); background: var(--crema-2); padding: 6px 10px; border-radius: 99px; }
.status-hero { border-radius: var(--radio); padding: 20px; margin: 10px 0 18px; text-align: center; }
.status-hero .ico { font-size: 52px; line-height: 1; }
.status-hero h2 { margin: 10px 0 6px; }
.status-hero p { margin: 0; }
.st-esperando_pago { background: var(--ambar-fondo); }
.st-por_revisar { background: #EAF1FB; }
.st-confirmado { background: #E7F4EC; }
.st-completado { background: var(--verde); }
.st-completado h2, .st-completado p { color: #fff; }
.st-rechazado { background: var(--rojo-fondo); }
.st-cancelado { background: var(--crema-2); }

.timeline { list-style: none; padding: 0; margin: 0 0 18px; }
.timeline li { position: relative; padding: 0 0 18px 42px; color: var(--gris); }
.timeline li::before {
  content: ''; position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--crema-2); border: 3px solid var(--crema-2); box-sizing: border-box;
}
.timeline li::after { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--crema-2); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--tinta); }
.timeline li.done::before { background: var(--palma); border-color: var(--palma); }
.timeline li.done::after { background: var(--palma); }
.timeline li.now::before { background: #fff; border-color: var(--palma); box-shadow: 0 0 0 5px rgba(46, 158, 91, .2); }
.timeline li.done .tick { position: absolute; left: 7px; top: 3px; color: #fff; font-size: 14px; font-weight: 800; }
.timeline b { display: block; color: var(--verde); }
.timeline .when { font-size: 14px; }

.payout img { border-radius: 12px; border: 1px solid var(--linea); margin: 0 auto; max-height: 460px; }

.mine { display: grid; gap: 10px; }
.mine a { display: flex; justify-content: space-between; gap: 12px; align-items: center; text-decoration: none; color: var(--tinta); background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio-s); padding: 14px 16px; }
.pill { font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 99px; white-space: nowrap; }
.pill.st-completado { color: #fff; }

/* pie */
.foot { text-align: center; padding: 22px 16px max(22px, env(safe-area-inset-bottom)); color: var(--gris); }
.foot-slogan { font-family: var(--serif); font-style: italic; color: var(--verde); font-size: 18px; margin: 0 0 4px; }
.foot-wa { margin: 0; font-size: 15px; }
.foot-wa a { color: var(--verde-3); font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--verde); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600;
  box-shadow: var(--sombra); z-index: 50; max-width: calc(100% - 32px); text-align: center;
}

@media (min-width: 700px) {
  .app { padding-top: 32px; }
  h1 { font-size: 36px; }
  .hero h1 { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* chat con el equipo (burbuja en la esquina) */
.chat-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 45;
  display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 20px 0 16px;
  background: var(--palma); color: #fff; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 16px/1 var(--sans); box-shadow: 0 6px 20px rgba(10, 46, 34, .28);
}
.chat-fab svg { width: 24px; height: 24px; fill: #fff; flex: none; }
.chat-fab-n {
  position: absolute; top: -6px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px;
  background: #E05246; color: #fff; font-size: 13px; display: grid; place-items: center; border: 2px solid var(--crema);
}
.chat-fab.ping { animation: latido 1.6s ease-in-out infinite; }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.chat-fab.mini { width: 54px; padding: 0; justify-content: center; bottom: calc(96px + env(safe-area-inset-bottom)); }
.chat-fab.mini .chat-fab-t { display: none; }
body:has(.foot) { padding-bottom: 76px; }

.chat-box {
  position: fixed; z-index: 46; right: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 32px));
  display: flex; flex-direction: column; background: var(--crema); border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(10, 46, 34, .35); animation: sube .18s ease-out;
}
@keyframes sube { from { transform: translateY(16px); opacity: .4; } }
.chat-h { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; background: var(--verde); color: var(--crema); }
.chat-h b { display: block; font-size: 16px; color: #fff; }
.chat-h span { font-size: 13px; opacity: .85; }
.chat-ava { position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--dorado); color: var(--verde); display: grid; place-items: center; font: 800 20px/1 var(--serif); }
.chat-ava .dot { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #3DDC84; border: 2px solid var(--verde); }
.chat-x { margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.cm { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; }
.cm.me { align-self: flex-end; align-items: flex-end; }
.cb { background: var(--blanco); border: 1px solid var(--linea); padding: 9px 12px; border-radius: 16px 16px 16px 4px; font-size: 16px; overflow-wrap: anywhere; }
.cm.me .cb { background: var(--verde-3); border-color: var(--verde-3); color: #fff; border-radius: 16px 16px 4px 16px; }
.cm.me .cb a { color: #fff; }
.cb img { max-height: 240px; border-radius: 10px; margin-bottom: 4px; }
.ct { font-size: 11px; color: var(--gris); margin-top: 2px; }
.cm-ord { font-size: 11px; font-weight: 700; color: var(--gris); margin-bottom: 2px; }
.cm.sending .cb { opacity: .7; }
.chat-form { background: var(--blanco); border-top: 1px solid var(--linea); padding: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.chat-who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.chat-form .input { min-height: 46px; padding: 10px 12px; font-size: 16px; }
.chat-form .err { margin: 0 0 8px; font-size: 14px; }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-row textarea { flex: 1; resize: none; max-height: 120px; line-height: 1.35; }
.chat-cam, .chat-send { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; border: 0; }
.chat-cam { background: var(--crema); }
.chat-cam svg { width: 22px; height: 22px; fill: var(--verde-3); }
.chat-send { background: var(--palma); }
.chat-send svg { width: 22px; height: 22px; fill: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 560px) {
  .chat-box { inset: 0; width: auto; height: auto; border-radius: 0; padding-top: env(safe-area-inset-top); }
  body.chat-open { overflow: hidden; }
  .chat-who { grid-template-columns: 1fr; }
}
