/* ============================================================
   CaribePay — Caribbean-light theme
   Palette: turquoise sea + sun gold + coral on warm sand/white
   Type: Sora (display) + Plus Jakarta Sans (UI/body)
   ============================================================ */

:root {
  --sea:        #0FB5BA;
  --sea-deep:   #0A8C90;
  --sea-ink:    #07565a;
  --gold:       #F5B731;
  --gold-deep:  #E29A0B;
  --coral:      #FF6B5C;
  --coral-deep: #ED4E3C;

  --ink:        #11302F;
  --ink-soft:   #4B6463;
  --muted:      #7C928F;

  --sand:       #FBF7EF;
  --sand-2:     #F3ECE0;
  --card:       #FFFFFF;
  --line:       #E7E0D3;

  --ok:         #1f9d6b;
  --warn:       #E29A0B;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 30px;

  --shadow-sm: 0 1px 2px rgba(17,48,47,.06), 0 1px 3px rgba(17,48,47,.05);
  --shadow:    0 6px 22px rgba(17,48,47,.10);
  --shadow-lg: 0 20px 60px rgba(7,86,90,.18);

  --maxw: 460px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,h2,h3,h4 { font-family: "Sora", system-ui, sans-serif; line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }
a { color: var(--sea-deep); text-decoration: none; }

/* ---------- App phone-frame container ---------- */
#app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--sand);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 80px rgba(7,86,90,.10);
}
@media (min-width: 520px) {
  body { background:
    radial-gradient(120% 80% at 50% -10%, #d7f3f1 0%, transparent 55%),
    linear-gradient(180deg, #eef6f4, #f7efe3); }
  #app { min-height: 100dvh; }
}

/* ---------- Screens ---------- */
.screen { display: none; flex: 1; flex-direction: column; animation: fade .35s var(--ease); }
.screen.active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.pad { padding: 22px 22px 30px; }
.grow { flex: 1; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; position: sticky; top: 0; z-index: 20;
  background: rgba(251,247,239,.86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .back {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card);
  box-shadow: var(--shadow-sm); color: var(--ink); flex: none;
}
.topbar .title { font-family: "Sora"; font-weight: 700; font-size: 1.05rem; }
.topbar .spacer { flex: 1; }

/* ---------- Brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: "Sora"; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--ink); }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand b { color: var(--sea-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 16px 20px; border-radius: var(--r);
  font-family: "Sora"; font-weight: 600; font-size: 1.02rem;
  background: var(--ink); color: #fff; transition: transform .15s var(--ease), box-shadow .2s, filter .2s;
  box-shadow: var(--shadow);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(135deg, var(--sea) 0%, var(--sea-deep) 100%); }
.btn-gold    { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%); color: #3a2c05; }
.btn-coral   { background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%); }
.btn-ghost   { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.btn:disabled { filter: grayscale(.4) opacity(.55); pointer-events: none; }
.btn.sm { width: auto; padding: 11px 18px; font-size: .92rem; border-radius: 12px; }

/* ---------- Form fields ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.field .control {
  width: 100%; padding: 15px 16px; border-radius: var(--r-sm);
  background: var(--card); border: 1.5px solid var(--line);
  font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.field .control:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 4px rgba(15,181,186,.14); }
.field .hint { font-size: .76rem; color: var(--muted); margin-top: 6px; }
select.control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C928F' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.card + .card { margin-top: 14px; }

/* ---------- Welcome / hero ---------- */
.hero { position: relative; flex: 1; display: flex; flex-direction: column; color: #fff; min-height: 100dvh; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,86,90,.30) 0%, rgba(7,86,90,.45) 45%, rgba(8,40,42,.92) 100%);
}
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1; padding: 22px; padding-bottom: calc(28px + var(--safe-b)); }
.hero-top { display: flex; align-items: center; }
.hero .brand { color: #fff; }
.hero .brand b { color: var(--gold); }
.hero-copy { margin-top: auto; }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 14px; }
.hero h1 .accent { color: var(--gold); }
.hero p.lede { font-size: 1.06rem; color: rgba(255,255,255,.9); max-width: 30ch; margin-bottom: 26px; }
.hero .actions { display: grid; gap: 11px; }
.flagline { display: inline-flex; gap: 8px; align-items: center; font-size: .82rem; font-weight: 600; background: rgba(255,255,255,.16); padding: 7px 13px; border-radius: 999px; margin-bottom: 18px; align-self: flex-start; backdrop-filter: blur(6px); }

/* trust row under hero buttons */
.trustrow { display: flex; justify-content: center; gap: 18px; margin-top: 18px; font-size: .78rem; color: rgba(255,255,255,.82); }
.trustrow span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Lang toggle ---------- */
.lang { display: inline-flex; background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px; backdrop-filter: blur(6px); }
.lang.on-light { background: var(--sand-2); }
.lang button { padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: inherit; opacity: .7; }
.lang button.sel { background: #fff; color: var(--ink); opacity: 1; box-shadow: var(--shadow-sm); }
.hero .lang button { color: #fff; }
.hero .lang button.sel { color: var(--ink); }

/* ---------- Section headings ---------- */
.eyebrow { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sea-deep); margin-bottom: 8px; }
.section-h { font-size: 1.5rem; margin-bottom: 6px; }
.section-sub { color: var(--ink-soft); margin-bottom: 20px; }

/* ---------- Stepper ---------- */
.steps { display: flex; gap: 6px; padding: 0 22px 4px; }
.steps i { height: 4px; flex: 1; border-radius: 999px; background: var(--sand-2); transition: background .3s; }
.steps i.done { background: var(--sea); }

/* ---------- KYC mock dropzones ---------- */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--r); padding: 22px; text-align: center;
  background: var(--card); transition: border-color .2s, background .2s; margin-bottom: 14px;
}
.dropzone .ico { width: 46px; height: 46px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; background: rgba(15,181,186,.12); color: var(--sea-deep); }
.dropzone.captured { border-style: solid; border-color: var(--ok); background: rgba(31,157,107,.06); }
.dropzone .fname { font-weight: 600; font-size: .9rem; }
.dropzone small { color: var(--muted); }

/* ---------- Amount entry ---------- */
.fx-card { background: linear-gradient(150deg, #ffffff, #f4fbfa); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 18px; box-shadow: var(--shadow); }
.fx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.fx-row + .fx-row { border-top: 1px dashed var(--line); }
.fx-row .lbl { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.fx-amount { font-family: "Sora"; font-weight: 700; font-size: 2rem; letter-spacing: -.02em; width: 100%; border: none; background: none; }
.fx-amount:focus { outline: none; }
.fx-amount.out { color: var(--sea-deep); }
.cur-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--sand-2); padding: 9px 13px; border-radius: 999px; font-weight: 700; font-size: .9rem; flex: none; }
.cur-pill .flag { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.fx-meta { display: flex; justify-content: space-between; align-items: center; padding: 13px 4px 4px; font-size: .84rem; color: var(--ink-soft); }
.fx-meta b { color: var(--ink); }
.rate-live { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(31,157,107,.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(31,157,107,.45)} 70%{box-shadow:0 0 0 7px rgba(31,157,107,0)} 100%{box-shadow:0 0 0 0 rgba(31,157,107,0)} }

.quick-amts { display: flex; gap: 8px; margin: 14px 0 4px; }
.quick-amts button { flex: 1; padding: 11px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line); font-weight: 700; font-size: .92rem; transition: .15s; }
.quick-amts button.sel { border-color: var(--sea); background: rgba(15,181,186,.08); color: var(--sea-ink); }

/* ---------- Payout method options ---------- */
.opt { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--card); border: 1.5px solid var(--line); margin-bottom: 12px; transition: .18s; text-align: left; width: 100%; }
.opt.sel { border-color: var(--sea); box-shadow: 0 0 0 4px rgba(15,181,186,.12); }
.opt .oico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.opt .oico.bank { background: rgba(15,181,186,.12); color: var(--sea-deep); }
.opt .oico.cash { background: rgba(245,183,49,.18); color: var(--gold-deep); }
.opt .otitle { font-weight: 700; }
.opt .osub { font-size: .82rem; color: var(--muted); }
.opt .check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.opt.sel .check { background: var(--sea); border-color: var(--sea); color: #fff; }

/* ---------- Review breakdown ---------- */
.brk { padding: 4px 2px; }
.brk .line { display: flex; justify-content: space-between; padding: 11px 0; font-size: .95rem; }
.brk .line + .line { border-top: 1px solid var(--line); }
.brk .line .k { color: var(--ink-soft); }
.brk .line .v { font-weight: 600; }
.brk .total { font-family: "Sora"; font-weight: 700; font-size: 1.15rem; padding-top: 14px; }
.brk .free { color: var(--ok); font-weight: 700; }

/* ---------- Recipient rows ---------- */
.rcp { display: flex; align-items: center; gap: 13px; padding: 13px; border-radius: var(--r); width: 100%; text-align: left; transition: .15s; }
.rcp:hover { background: var(--sand-2); }
.rcp .av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: "Sora"; font-weight: 700; color: #fff; flex: none; }
.rcp .nm { font-weight: 700; }
.rcp .meta { font-size: .82rem; color: var(--muted); }
.rcp .arr { margin-left: auto; color: var(--muted); }

/* ---------- Home dashboard ---------- */
.home-hd { padding: 20px 22px 6px; }
.greet { font-size: 1.0rem; color: var(--ink-soft); }
.greet b { color: var(--ink); }
.send-cta {
  margin: 16px 22px; border-radius: var(--r-lg); padding: 22px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--sea) 0%, var(--sea-deep) 100%); color: #fff; box-shadow: var(--shadow-lg);
}
.send-cta h3 { font-size: 1.3rem; margin-bottom: 4px; }
.send-cta p { color: rgba(255,255,255,.85); font-size: .9rem; margin-bottom: 16px; }
.send-cta .sun { position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(245,183,49,.55), transparent 70%); }
.section-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px 8px; }
.section-row h4 { font-size: 1.05rem; }
.section-row a { font-size: .85rem; font-weight: 700; }
.hscroll { display: flex; gap: 12px; padding: 6px 22px 10px; overflow-x: auto; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.rcp-chip { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 64px; }
.rcp-chip .av { width: 54px; height: 54px; }
.rcp-chip span { font-size: .76rem; font-weight: 600; }
.rcp-chip.add .av { background: var(--sand-2); color: var(--sea-deep); border: 1.5px dashed var(--sea); }

/* ---------- Activity / transfers ---------- */
.tx { display: flex; align-items: center; gap: 13px; padding: 14px 22px; }
.tx + .tx { border-top: 1px solid var(--line); }
.tx .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--sand-2); flex: none; color: var(--sea-deep); }
.tx .nm { font-weight: 700; font-size: .96rem; }
.tx .meta { font-size: .8rem; color: var(--muted); }
.tx .amt { margin-left: auto; text-align: right; }
.tx .amt b { font-family: "Sora"; }
.badge { display: inline-block; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.badge.done { background: rgba(31,157,107,.12); color: var(--ok); }
.badge.transit { background: rgba(226,154,11,.14); color: var(--gold-deep); }

/* ---------- Success ---------- */
.success { text-align: center; padding: 40px 26px; display: flex; flex-direction: column; align-items: center; flex: 1; justify-content: center; }
.success .ring { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--sea), var(--sea-deep)); color: #fff; box-shadow: 0 16px 40px rgba(15,181,186,.4); margin-bottom: 22px; animation: pop .5s var(--ease); }
@keyframes pop { 0%{transform:scale(.5);opacity:0} 60%{transform:scale(1.08)} 100%{transform:scale(1);opacity:1} }
.success h2 { font-size: 1.6rem; margin-bottom: 8px; }
.success p { color: var(--ink-soft); max-width: 32ch; margin-bottom: 6px; }
.refbox { margin: 18px 0; background: var(--sand-2); border-radius: var(--r); padding: 14px 22px; font-family: "Sora"; font-weight: 700; letter-spacing: .06em; }

/* timeline */
.timeline { width: 100%; margin: 22px 0; text-align: left; }
.tl { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: -4px; width: 2px; background: var(--line); }
.tl .pt { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--sand-2); color: var(--muted); z-index: 1; }
.tl.done .pt { background: var(--ok); color: #fff; }
.tl.now .pt { background: var(--sea); color: #fff; }
.tl .ttl { font-weight: 700; font-size: .95rem; }
.tl .sub { font-size: .8rem; color: var(--muted); }

/* ---------- Processing spinner ---------- */
.spin { width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--sand-2); border-top-color: var(--sea); animation: rot 1s linear infinite; margin: 0 auto 18px; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Bottom sheet (recipient add, help) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(8,40,42,.5); backdrop-filter: blur(2px); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(100%);
  bottom: 0; width: 100%; max-width: var(--maxw); background: var(--sand);
  border-radius: var(--r-xl) var(--r-xl) 0 0; z-index: 51; padding: 10px 22px calc(26px + var(--safe-b));
  transition: transform .3s var(--ease); max-height: 88dvh; overflow-y: auto;
}
.sheet.open { transform: translateX(-50%) translateY(0); }
.sheet .grip { width: 42px; height: 5px; border-radius: 999px; background: var(--line); margin: 6px auto 16px; }
.sheet h3 { font-size: 1.3rem; margin-bottom: 16px; }

/* ---------- Help panel content ---------- */
.faq { border-bottom: 1px solid var(--line); }
.faq summary { padding: 15px 2px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--sea-deep); font-weight: 400; }
.faq[open] summary::after { content: "–"; }
.faq p { padding: 0 2px 16px; color: var(--ink-soft); font-size: .92rem; }

/* ---------- Bottom nav ---------- */
.tabbar {
  position: sticky; bottom: 0; z-index: 30; display: flex; background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + var(--safe-b));
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; color: var(--muted); font-size: .68rem; font-weight: 600; }
.tabbar button.sel { color: var(--sea-deep); }
.tabbar button.fab { color: #fff; }
.tabbar .fabwrap { flex: 1; display: grid; place-items: center; }
.tabbar .fabbtn { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--coral), var(--coral-deep)); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(237,78,60,.4); margin-top: -22px; }

/* ---------- Misc ---------- */
.note { background: rgba(245,183,49,.12); border: 1px solid rgba(226,154,11,.3); border-radius: var(--r-sm); padding: 12px 14px; font-size: .84rem; color: #7a5a08; display: flex; gap: 10px; }
.note svg { flex: none; }
.demo-ribbon { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--ink); color: #fff; text-align: center; font-size: .72rem; font-weight: 600; padding: 4px; letter-spacing: .03em; }
.demo-ribbon b { color: var(--gold); }
.with-ribbon { padding-top: 26px; }
.icon { width: 22px; height: 22px; stroke-width: 2; }
.center { text-align: center; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; }
.muted { color: var(--muted); }
.fade-late { opacity: 0; }
