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

/* Livré brand — orange + white (from the logo). */
:root {
  --brand: #E9711C;
  --brand-dark: #C95E12;
  --brand-tint: #FFF1E6;
  --bg: #FFF7F1;
  --card: #FFFFFF;
  --card-2: #FFF1E6;
  --text: #2A1A0E;
  --muted: #9A8778;
  --line: #F0E0D2;
  --danger: #E23A2E;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(233, 113, 28, 0.10);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
}
.brand img { width: 30px; height: 30px; display: block; }
.brand span { color: var(--brand); }

.location-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}
.location-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

.screen { flex: 1; }

.loading { text-align: center; padding-top: 30vh; color: var(--muted); }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--card-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

.step { display: flex; flex-direction: column; gap: 16px; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.corridor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-label { font-size: 18px; font-weight: 800; margin-top: 8px; }
.step-label.small { font-size: 15px; margin-top: 4px; }

.amount-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.amount-box .currency { font-size: 20px; color: var(--brand); font-weight: 800; }
.amount-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 42px;
  font-weight: 800;
  width: 100%;
  -moz-appearance: textfield;
}
.amount-box input::-webkit-outer-spin-button,
.amount-box input::-webkit-inner-spin-button { -webkit-appearance: none; }

.quick-amounts { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip:active, .chip.active { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }

.conversion {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.conv-row { display: flex; justify-content: space-between; font-size: 15px; }
.conv-row strong { color: var(--brand); font-size: 17px; }
.conv-row.muted { color: var(--muted); font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.field input {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 17px;
  outline: none;
  width: 100%;
}
.field input:focus { border-color: var(--brand); }

.phone-row { display: flex; gap: 8px; align-items: stretch; }
.phone-row .prefix {
  background: var(--card-2);
  border-radius: 12px;
  padding: 14px 12px;
  font-size: 17px;
  color: var(--brand-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
}

.country-list { display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow-y: auto; }
.country-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 15px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.country-row:active, .country-row:hover { border-color: var(--brand); background: var(--brand-tint); }
.country-row .flag { font-size: 24px; line-height: 1; }
.country-row .cname { font-weight: 700; font-size: 15px; }
.country-row .cmeta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.country-row .chev { margin-left: auto; color: var(--brand); font-size: 20px; }

.gateway-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gateway-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gateway-card.selected { border-color: var(--brand); box-shadow: var(--shadow); }
.gateway-card .logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}
.gateway-card .gw-name { font-weight: 700; font-size: 15px; }

.summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.summary .row { display: flex; justify-content: space-between; }
.summary .row .v { font-weight: 700; }
.summary .row.total { border-top: 1px solid var(--line); padding-top: 8px; font-size: 16px; }
.summary .row.total .v { color: var(--brand); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 18px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, opacity 0.15s;
  margin-top: 8px;
  box-shadow: var(--shadow);
}
.btn-primary:active { background: var(--brand-dark); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-send { font-size: 19px; padding: 20px; }

.back {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 12px;
  font-size: 22px;
  cursor: pointer;
  align-self: flex-start;
}

.result { text-align: center; padding: 40px 0 10px; }
.result .big-icon { font-size: 64px; margin-bottom: 16px; }
.result h2 { font-size: 24px; margin-bottom: 8px; }
.result p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.result .ref { margin-top: 14px; font-size: 12px; color: var(--muted); word-break: break-all; }

.foot { text-align: center; padding: 16px 0 8px; }
#modeBadge {
  font-size: 11px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}

/* ---- Partner (agents) app ---- */
.hero {
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.hero .label { font-size: 13px; opacity: 0.9; }
.hero .big { font-size: 34px; font-weight: 800; margin-top: 4px; }
.hero .sub { font-size: 13px; opacity: 0.9; margin-top: 6px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 800; margin-top: 4px; }
.stat .v.accent { color: var(--brand); }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-row {
  display: flex; justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
}
.list-row .amt { font-weight: 800; }
.list-row .amt.plus { color: var(--brand); }
.list-row .when { color: var(--muted); font-size: 12px; }

.note { font-size: 13px; color: var(--muted); line-height: 1.5; }
.tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.tab {
  flex: 1; text-align: center;
  padding: 10px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-weight: 700; cursor: pointer; font-size: 14px;
}
.tab.active { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); }
