/* ============================================================
   RecargaJá — Premium UI
   ============================================================ */

:root{
  /* Brand — verde Pix (confiança + fintech) */
  --brand:#00B894;
  --brand-dark:#00A381;
  --brand-light:#E6FAF5;
  --brand-grad:linear-gradient(135deg,#00D9A3 0%,#00B894 100%);
  --brand-grad-soft:linear-gradient(135deg,rgba(0,217,163,.12),rgba(0,184,148,.08));

  /* Pix teal */
  --pix:#0F9D8F;
  --pix-bg:#E4F7F4;

  /* Neutrals */
  --bg:#F2F5F9;
  --surface:#FFFFFF;
  --ink:#0F172A;
  --ink-2:#334155;
  --ink-3:#64748B;
  --ink-4:#94A3B8;
  --line:#E8EDF4;
  --line-2:#D5DDE8;

  /* Status */
  --success:#16A34A;
  --success-bg:#DCFCE7;
  --danger:#DC2626;
  --danger-bg:#FEE2E2;
  --warn:#F59E0B;
  --warn-bg:#FFFBEB;

  /* Radius */
  --r-xl:24px;
  --r-lg:18px;
  --r-md:14px;
  --r-sm:10px;

  /* Shadows */
  --sh-xs:0 1px 2px rgba(15,23,42,.04);
  --sh-sm:0 2px 8px rgba(15,23,42,.06);
  --sh-md:0 6px 20px rgba(15,23,42,.08);
  --sh-lg:0 16px 48px rgba(15,23,42,.12);
  --sh-brand:0 8px 24px rgba(0,184,148,.30);

  --maxw:460px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{height:100%}
body{
  font-family:var(--font);
  color:var(--ink);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  line-height:1.5;
  font-size:15px;
  min-height:100%;
}

/* ---------- App shell ---------- */
.app{
  max-width:var(--maxw);
  margin:0 auto;
  min-height:100vh;
  background:var(--surface);
  display:flex;
  flex-direction:column;
  position:relative;
  box-shadow:var(--sh-lg);
}

/* ---------- Topbar ---------- */
.topbar{
  position:sticky;top:0;z-index:30;
  display:flex;align-items:center;gap:10px;
  padding:14px 18px;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(16px);
  -webkit-backdrop-filter:saturate(180%) blur(16px);
  border-bottom:1px solid var(--line);
}
.icon-btn{
  width:38px;height:38px;border:none;background:var(--brand-light);
  color:var(--brand);border-radius:var(--r-sm);cursor:pointer;
  display:grid;place-items:center;flex-shrink:0;
  transition:all .15s;
}
.icon-btn:hover{background:var(--brand);color:#fff}
.icon-btn[hidden]{display:none}

.brand{display:flex;align-items:center;gap:9px;margin:0 auto}
.brand-mark{
  width:36px;height:36px;border-radius:10px;
  background:var(--brand-grad);color:#fff;
  display:grid;place-items:center;flex-shrink:0;
  box-shadow:var(--sh-brand);
  position:relative;
}
.brand-mark::after{
  content:"";position:absolute;inset:0;border-radius:10px;
  background:linear-gradient(135deg,rgba(255,255,255,.25),rgba(255,255,255,0) 60%);
  pointer-events:none;
}
.brand-name{font-size:19px;font-weight:800;letter-spacing:-.03em;color:var(--ink)}
.brand-name strong{color:var(--brand)}

.lock-badge{
  display:flex;align-items:center;gap:5px;
  font-size:11px;font-weight:700;color:var(--success);
  background:var(--success-bg);
  padding:7px 10px;border-radius:999px;flex-shrink:0;
}
.lock-badge svg{color:var(--success)}

/* ---------- Progress ---------- */
.progress{display:flex;gap:5px;padding:16px 18px 0}
.progress__seg{
  flex:1;height:3px;border-radius:999px;background:var(--line);
  transition:background .3s, height .3s;
}
.progress__seg.is-active{background:var(--brand)}
.progress__seg.is-done{background:var(--brand-dark)}

/* ---------- Screens ---------- */
.screen{
  flex:1;padding:24px 20px 32px;
  display:none;flex-direction:column;
  animation:slideIn .4s cubic-bezier(.16,1,.3,1) both;
}
.screen:not([hidden]){display:flex}
@keyframes slideIn{
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:none}
}

.title{
  font-size:25px;font-weight:800;letter-spacing:-.03em;
  line-height:1.2;color:var(--ink);margin-bottom:6px;
}
.title--success{color:var(--success)}
.title--danger{color:var(--danger)}

.subtitle{
  font-size:14px;color:var(--ink-3);line-height:1.55;margin-bottom:22px;
}
.subtitle strong{color:var(--ink);font-weight:700}

/* ---------- Hero ---------- */
.hero{margin-bottom:20px}
.hero-badge{
  display:inline-flex;align-items:center;gap:7px;
  font-size:12px;font-weight:700;color:var(--brand);
  background:var(--brand-light);
  padding:8px 14px;border-radius:999px;margin-bottom:14px;
  border:1px solid rgba(0,184,148,.18);
}
.hero-badge svg{flex-shrink:0}

/* ---------- Benefits ---------- */
.benefits{
  display:flex;gap:10px;margin-bottom:24px;
}
.benefit{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;
  text-align:center;padding:14px 6px;
  background:var(--brand-grad-soft);
  border:1px solid rgba(0,184,148,.12);
  border-radius:var(--r-md);
}
.benefit__icon{
  width:34px;height:34px;border-radius:10px;
  background:var(--brand-grad);color:#fff;
  display:grid;place-items:center;flex-shrink:0;
  box-shadow:var(--sh-brand);
}
.benefit span{font-size:11.5px;font-weight:700;color:var(--ink-2);line-height:1.3}

/* ---------- List (operadoras) ---------- */
.list{list-style:none;display:flex;flex-direction:column;gap:8px}
.list-item{
  display:flex;align-items:center;gap:14px;
  padding:14px 16px;border-radius:var(--r-md);
  background:var(--surface);
  border:1.5px solid var(--line);
  cursor:pointer;position:relative;overflow:visible;
  transition:all .18s cubic-bezier(.16,1,.3,1);
}
.list-item:hover{
  border-color:var(--brand);
  transform:translateY(-1px);
  box-shadow:var(--sh-md);
}
.list-item:active{transform:translateY(0)}
.list-item.is-selected{
  border-color:var(--brand);
  background:var(--brand-light);
}

.op-avatar{
  width:48px;height:48px;border-radius:12px;flex-shrink:0;
  background:#fff;border:1px solid var(--line);
  display:grid;place-items:center;padding:6px;overflow:hidden;
}
.op-avatar img{width:100%;height:100%;object-fit:contain;display:block}
.op-avatar--initials{
  background:var(--op-color,var(--brand));
  color:#fff;font-weight:800;font-size:16px;letter-spacing:-.03em;
  border:none;padding:0;
}

.list-item__label{flex:1;font-size:16px;font-weight:600;color:var(--ink)}
.chevron{color:var(--ink-4);flex-shrink:0;transition:transform .18s}
.list-item:hover .chevron{color:var(--brand);transform:translateX(3px)}

/* ---------- Values grid ---------- */
.list--values{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px;
}
.list--values .list-item{
  flex-direction:column;justify-content:center;text-align:center;
  padding:18px 8px;gap:3px;
}
.list--values .list-item__label{
  font-size:18px;font-weight:800;color:var(--ink);letter-spacing:-.02em;
}
.list--values .list-item__sub{font-size:10.5px;color:var(--ink-4);font-weight:600;text-transform:uppercase;letter-spacing:.04em}

/* ---------- Op summary ---------- */
.op-summary{
  display:flex;align-items:center;gap:14px;
  padding:14px 16px;border-radius:var(--r-md);
  background:var(--brand-light);
  border:1px solid rgba(0,184,148,.15);
  margin-bottom:20px;
}
.op-summary__nome{font-size:16px;font-weight:700;color:var(--ink)}
.op-summary__numero{font-size:13px;color:var(--ink-3);margin-top:2px}
.op-summary__numero span{font-weight:600;color:var(--ink-2)}

/* ---------- Field ---------- */
.field{position:relative;margin-bottom:14px}
.field-icon{
  position:absolute;left:16px;top:50%;transform:translateY(-50%);
  color:var(--ink-4);pointer-events:none;
}
.input{
  width:100%;height:56px;padding:0 16px;
  font-size:17px;font-weight:600;font-family:inherit;
  color:var(--ink);background:var(--surface);
  border:2px solid var(--line);border-radius:var(--r-md);
  transition:all .2s;letter-spacing:.01em;
}
.input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-light)}
.input--icon{padding-left:46px}
.input::placeholder{color:var(--ink-4);font-weight:500}

.hint{font-size:12.5px;color:var(--ink-4);font-weight:500;margin-top:10px}
.hint--status{color:var(--brand);font-weight:600}

/* ---------- Summary card ---------- */
.summary-card{
  padding:16px 18px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r-md);
  box-shadow:var(--sh-sm);margin-bottom:20px;
}
.summary-row{
  display:flex;justify-content:space-between;align-items:center;
  padding:9px 0;font-size:14px;color:var(--ink-3);
}
.summary-row+.summary-row{border-top:1px dashed var(--line)}
.summary-row--muted{color:var(--ink-4);font-size:13px}
.summary-row--total{
  border-top:2px solid var(--line);margin-top:4px;padding-top:12px;
  font-size:15px;font-weight:700;color:var(--ink);
}
.summary-value{font-weight:700;color:var(--ink)}
.summary-total{font-size:20px;font-weight:800;color:var(--brand);letter-spacing:-.02em}

/* ---------- Payment method ---------- */
.payment-method{
  display:flex;align-items:center;gap:14px;
  padding:16px;border:2px solid var(--pix);
  background:var(--pix-bg);border-radius:var(--r-md);margin-bottom:20px;
}
.payment-method__icon{
  width:44px;height:44px;border-radius:11px;
  background:#fff;border:1px solid var(--line);
  display:grid;place-items:center;flex-shrink:0;padding:7px;
}
.payment-method__info{flex:1;display:flex;flex-direction:column}
.payment-method__nome{font-size:16px;font-weight:700;color:var(--ink)}
.payment-method__desc{font-size:12.5px;color:var(--ink-3);margin-top:1px}
.payment-method__check{
  width:26px;height:26px;border-radius:50%;
  background:var(--pix);color:#fff;display:grid;place-items:center;flex-shrink:0;
}

/* ---------- Buttons ---------- */
.btn{
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;height:54px;border:none;cursor:pointer;
  font-family:inherit;font-size:16px;font-weight:700;letter-spacing:-.01em;
  border-radius:var(--r-md);transition:all .15s;
}
.btn:active{transform:scale(.98)}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn--primary{
  background:var(--brand-grad);color:#fff;box-shadow:var(--sh-brand);
}
.btn--primary:hover:not(:disabled){box-shadow:0 12px 32px rgba(0,184,148,.4)}
.btn--outline{
  background:var(--surface);color:var(--brand);
  border:2px solid var(--brand);
}
.btn--outline:hover{background:var(--brand-light)}
.btn--simular{
  margin-top:14px;height:44px;font-size:13px;opacity:.7;
  border-style:dashed;border-color:var(--ink-4);color:var(--ink-3);
}
.btn--simular:hover{opacity:1;border-color:var(--brand);color:var(--brand)}
.btn--bottom{margin-top:auto;padding-bottom:env(safe-area-inset-bottom)}

/* ---------- Pix screen ---------- */
.pix-instructions{font-size:13.5px;color:var(--ink-3);line-height:1.55;margin-bottom:16px}

.pix-status-row{
  display:flex;align-items:center;gap:9px;
  font-size:13.5px;font-weight:600;color:var(--pix);
  background:var(--pix-bg);padding:10px 16px;border-radius:999px;
  width:fit-content;margin-bottom:16px;
}
.pulse-dot{
  width:9px;height:9px;border-radius:50%;background:var(--pix);
  animation:pulse 1.6s infinite;flex-shrink:0;
}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(15,157,143,.5)}
  70%{box-shadow:0 0 0 10px rgba(15,157,143,0)}
  100%{box-shadow:0 0 0 0 rgba(15,157,143,0)}
}

.pix-alert-warning{
  background:var(--warn-bg);
  border:1.5px solid #FDE68A;border-left:5px solid var(--warn);
  border-radius:var(--r-md);padding:14px 16px;margin-bottom:18px;
  box-shadow:0 2px 8px rgba(245,158,11,.10);
}
.pix-alert-header{
  display:flex;align-items:center;justify-content:center;gap:6px;
  font-size:14px;font-weight:800;color:#B45309;margin-bottom:6px;letter-spacing:.02em;
}
.pix-alert-icon{font-size:17px}
.pix-alert-text{font-size:13px;color:#78350F;line-height:1.5;text-align:center}
.pix-alert-text strong{color:#92400E;font-weight:800}

.pix-box{
  display:flex;flex-direction:column;align-items:center;text-align:center;
  padding:20px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r-xl);
  box-shadow:var(--sh-md);margin-bottom:16px;
}
.pix-qrcode-wrap{
  position:relative;padding:14px;background:#fff;
  border:1px solid var(--line);border-radius:var(--r-lg);margin-bottom:16px;
}
.pix-qrcode{width:200px;height:200px;display:grid;place-items:center}
.pix-qrcode canvas,.pix-qrcode img{
  width:200px!important;height:200px!important;border-radius:8px;display:block;
}
.pix-loading{
  width:200px;height:200px;display:grid;place-items:center;
  color:var(--ink-4);font-size:13px;font-weight:600;
  background:repeating-linear-gradient(45deg,#F8FAFC,#F8FAFC 10px,#EEF2F9 10px,#EEF2F9 20px);
  border-radius:8px;animation:pixload 1.2s infinite linear;
}
@keyframes pixload{from{background-position:0 0}to{background-position:40px 0}}

.pix-qrcode-overlay{
  position:absolute;inset:0;border-radius:var(--r-lg);
  background:rgba(22,163,74,.94);color:#fff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  font-weight:700;font-size:15px;
  animation:fadeIn .3s ease;
}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

.pix-code{
  width:100%;resize:none;height:64px;
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:11px;
  color:var(--ink-4);background:#F8FAFC;
  border:1.5px dashed var(--line-2);border-radius:var(--r-sm);padding:10px;
  word-break:break-all;text-align:center;margin-bottom:12px;
}
.trust-note{
  display:flex;align-items:center;gap:7px;
  font-size:12px;color:var(--ink-4);font-weight:500;
}
.trust-note svg{color:var(--success);flex-shrink:0}

/* ---------- Status icons ---------- */
.status-icon{
  width:76px;height:76px;border-radius:50%;
  display:grid;place-items:center;margin:4px auto 18px;
  animation:pop .4s cubic-bezier(.16,1,.3,1) both;
}
@keyframes pop{from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}
.status-icon--success{
  background:linear-gradient(135deg,#16A34A,#22C55E);color:#fff;
  box-shadow:0 0 0 12px rgba(22,163,74,.12);
}
.status-icon--danger{
  background:linear-gradient(135deg,#DC2626,#EF4444);color:#fff;
  box-shadow:0 0 0 12px rgba(220,38,38,.12);
}

.alert-box-danger{
  background:var(--danger-bg);border:1px solid #FECACA;
  border-radius:var(--r-md);padding:14px 16px;margin:16px 0;
  font-size:13px;color:#991B1B;line-height:1.55;
}
.alert-box-danger strong{color:#7F1D1D}

.sucesso-nota{
  background:var(--success-bg);color:#166534;
  border-radius:var(--r-md);padding:12px 14px;
  font-weight:600;font-size:13px;text-align:center;margin:16px 0;
}

/* ---------- Footer ---------- */
.app-footer{
  margin-top:auto;padding:24px 20px 28px;
  border-top:1px solid var(--line);
  background:linear-gradient(180deg,#FAFCFE 0%,#F2F5F9 100%);
}
.footer-seals{
  display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:16px;
}
.footer-seal{
  display:inline-flex;align-items:center;gap:6px;
  background:#F0FDF4;border:1.5px solid #BBF7D0;border-radius:999px;
  padding:7px 13px;font-size:12px;font-weight:600;color:#15803D;
}
.footer-seal svg{color:#16A34A;flex-shrink:0}

.footer-bacen{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r-md);
  margin-bottom:16px;
}
.footer-bacen img{height:32px;width:auto;flex-shrink:0;opacity:.9}
.footer-bacen span{font-size:12px;font-weight:600;color:var(--ink-2);line-height:1.4}

.footer-note{font-size:12.5px;color:var(--ink-3);line-height:1.6;text-align:center;margin-bottom:10px}
.footer-note strong{color:var(--ink-2)}
.footer-disclaimer{font-size:11px;color:var(--ink-4);line-height:1.55;text-align:center;margin-bottom:14px}

.footer-links{
  display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:10px;
}
.footer-links a{color:var(--ink-3);text-decoration:none;font-size:13px;font-weight:500;transition:color .2s}
.footer-links a:hover{color:var(--brand)}
.footer-links span{color:var(--line-2);font-size:14px}

.footer-copy{font-size:11px;color:var(--ink-4);text-align:center;font-weight:600}

/* ---------- Pix timer ---------- */
.pix-timer{
  background:linear-gradient(135deg,#FEF3C7 0%,#FDE68A 100%);
  border:2px solid #FBBF24;border-radius:var(--r-md);
  padding:14px 20px;text-align:center;margin-bottom:18px;
}
.pix-timer__label{display:block;font-size:13px;color:#92400E;font-weight:600;margin-bottom:4px}
.pix-timer__count{
  font-size:30px;font-weight:800;color:#92400E;
  font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.05em;
}
.pix-timer.is-urgent{
  background:linear-gradient(135deg,#FEE2E2 0%,#FECACA 100%);
  border-color:#EF4444;animation:urgentPulse 1s infinite;
}
.pix-timer.is-urgent .pix-timer__label,
.pix-timer.is-urgent .pix-timer__count{color:#991B1B}
@keyframes urgentPulse{0%,100%{opacity:1}50%{opacity:.7}}

/* ---------- Value card bonus ---------- */
.value-bonus{
  display:block;font-size:11px;font-weight:800;color:var(--success);
  text-transform:uppercase;letter-spacing:.04em;margin-top:2px;
}
.value-badge{
  position:absolute;top:-11px;left:50%;transform:translateX(-50%);
  background:linear-gradient(135deg,#FF6B35 0%,#F7931E 100%);
  color:#fff;font-size:9px;padding:4px 12px;border-radius:999px;
  font-weight:800;letter-spacing:.06em;white-space:nowrap;z-index:5;
  box-shadow:0 2px 8px rgba(247,147,30,.35);
}

/* ---------- Section divider ---------- */
.section-divider{
  display:flex;align-items:center;gap:14px;margin:24px 0 18px;
}
.section-divider__line{
  flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--line-2) 20%,var(--line-2) 80%,transparent);
}
.section-divider__text{
  font-size:13px;font-weight:800;color:var(--ink-2);
  text-transform:uppercase;letter-spacing:.08em;white-space:nowrap;
}

/* ---------- Social proof (floating badge) ---------- */
.social-proof{
  position:fixed;bottom:20px;left:50%;transform:translateX(-50%) translateY(20px);
  background:var(--surface);border:1.5px solid var(--line);
  border-radius:var(--r-md);padding:10px 14px;
  display:flex;align-items:center;gap:10px;
  box-shadow:var(--sh-lg);max-width:340px;width:calc(100% - 40px);
  z-index:40;opacity:0;pointer-events:none;
  transition:opacity .5s,transform .5s;
}
.social-proof.is-show{opacity:1;transform:translateX(-50%) translateY(0);pointer-events:auto}
.social-proof__avatar{
  width:32px;height:32px;border-radius:50%;flex-shrink:0;
  background:var(--brand-grad);color:#fff;
  display:grid;place-items:center;font-weight:700;font-size:13px;
}
.social-proof__content{flex:1;min-width:0}
.social-proof__text{display:block;font-size:12.5px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.social-proof__meta{font-size:11px;color:var(--ink-4);font-weight:500}
.social-proof__close{
  width:20px;height:20px;border-radius:50%;border:none;cursor:pointer;
  background:var(--bg);color:var(--ink-4);font-size:10px;flex-shrink:0;
  display:grid;place-items:center;transition:all .2s;
}
.social-proof__close:hover{background:var(--line);color:var(--ink)}

/* ---------- Modals ---------- */
.modal-overlay{
  position:fixed;inset:0;background:rgba(15,23,42,.7);
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;z-index:100;
  padding:20px;animation:fadeIn .25s ease;
}
.modal-overlay[hidden]{display:none}
.modal{
  background:var(--surface);border-radius:var(--r-xl);
  max-width:480px;width:100%;max-height:85vh;overflow:hidden;
  box-shadow:var(--sh-lg);display:flex;flex-direction:column;
  animation:modalIn .3s cubic-bezier(.16,1,.3,1);
}
@keyframes modalIn{from{opacity:0;transform:scale(.95) translateY(20px)}to{opacity:1;transform:none}}
.modal__header{
  display:flex;align-items:center;justify-content:space-between;
  padding:20px 24px;border-bottom:1px solid var(--line);flex-shrink:0;
}
.modal__header h2{font-size:18px;font-weight:800;color:var(--ink);letter-spacing:-.02em}
.modal__close{
  width:32px;height:32px;border-radius:8px;border:none;cursor:pointer;
  background:var(--bg);color:var(--ink-3);font-size:14px;
  display:grid;place-items:center;transition:all .2s;
}
.modal__close:hover{background:var(--danger-bg);color:var(--danger)}
.modal__body{
  padding:24px;overflow-y:auto;font-size:14px;color:var(--ink-2);line-height:1.6;
}
.modal__body h3{font-size:15px;font-weight:700;color:var(--ink);margin:18px 0 6px}
.modal__body h3:first-of-type{margin-top:8px}
.modal__body p{margin-bottom:8px}
.modal__body ul{padding-left:18px;margin-bottom:8px}
.modal__body li{margin-bottom:4px}

/* ---------- Responsive ---------- */
@media(max-width:380px){
  .list--values{grid-template-columns:repeat(2,1fr)}
  .title{font-size:22px}
  .benefits{flex-direction:column;gap:8px}
}

/* ---------- Toast ---------- */
.toast{
  position:fixed;left:50%;bottom:28px;transform:translateX(-50%) translateY(20px);
  background:var(--ink);color:#fff;font-size:13px;font-weight:600;
  padding:12px 20px;border-radius:999px;box-shadow:var(--sh-lg);
  opacity:0;pointer-events:none;transition:all .25s;z-index:60;
}
.toast.is-show{opacity:1;transform:translateX(-50%) translateY(0)}
