/* ============================================================
   SICOERIC — estilos
   Paleta no espírito do Sicoob (verde-petróleo + turquesa) com
   um toque festivo (dourado + confete). Visual de app fintech.
   ============================================================ */

:root {
  --green-900: #00231f;
  --green-800: #00352f;
  --green-700: #004d43;
  --green-600: #006b5b;
  --teal:      #00c2a8;
  --teal-soft: #4fe3cd;
  --lime:      #9fe870;
  --gold:      #ffcf6a;
  --gold-deep: #f6b53d;
  --ink:       #0b1f1c;
  --paper:     #ffffff;
  --paper-2:   #f3f8f6;
  --muted:     #6b8a84;
  --white-80:  rgba(255, 255, 255, .8);
  --white-12:  rgba(255, 255, 255, .12);
  --white-08:  rgba(255, 255, 255, .08);
  --shadow:    0 18px 40px -18px rgba(0, 20, 18, .55);
  --radius:    22px;
  --radius-sm: 14px;
  --font:      "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display:   "Sora", var(--font);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--paper);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0, 194, 168, .25), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(159, 232, 112, .12), transparent 55%),
    linear-gradient(160deg, var(--green-800), var(--green-900) 70%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Confete canvas ---------- */
#confete-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--teal), var(--lime));
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 53, 47, .45);
  font-weight: 800; font-size: 1.25rem;
  box-shadow: 0 6px 16px -6px rgba(0, 194, 168, .8);
}
.brand__name { font-weight: 800; font-size: 1.25rem; letter-spacing: -.5px; color: #fff; }
.brand__accent { color: var(--teal-soft); }
.brand--big .brand__mark { width: 64px; height: 64px; border-radius: 20px; font-size: 2rem; }
.brand--big .brand__name { font-size: 2rem; }

/* ---------- Botões ---------- */
.btn {
  font-family: var(--font); font-weight: 700; font-size: 1rem;
  border: 0; border-radius: 999px; padding: 14px 22px;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, opacity .2s;
  color: var(--green-900);
}
.btn:active { transform: scale(.96); }
.btn--primary {
  background: linear-gradient(135deg, var(--teal), var(--lime));
  box-shadow: 0 12px 24px -10px rgba(0, 194, 168, .9);
}
.btn--primary:hover { box-shadow: 0 16px 30px -10px rgba(0, 194, 168, 1); }
.btn--ghost {
  background: var(--white-08); color: #fff;
  border: 1px solid var(--white-12);
}
.btn--ghost:hover { background: var(--white-12); }
.btn--block { width: 100%; margin-top: 18px; }

/* ============ SPLASH / LOGIN ============ */
.splash {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background:
    radial-gradient(800px 500px at 50% 30%, rgba(0, 194, 168, .25), transparent 60%),
    linear-gradient(160deg, var(--green-800), var(--green-900));
  transition: opacity .6s ease, visibility .6s;
  text-align: center;
}
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash__inner { display: grid; justify-items: center; gap: 14px; animation: rise .7s ease both; }
.splash__tagline { color: var(--teal-soft); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: .8rem; }
.splash__loader { width: 180px; height: 6px; border-radius: 999px; background: var(--white-12); overflow: hidden; margin-top: 8px; }
.splash__loader span { display: block; height: 100%; width: 40%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--lime)); animation: load 1.6s ease-in-out forwards; }
.splash__status { color: var(--white-80); font-size: .9rem; }
.splash__skip { margin-top: 6px; padding: 8px 16px; font-size: .85rem; }
.splash__enter { margin-top: 20px; font-size: 1.15rem; padding: 16px 36px; animation: pulseBtn 1.5s ease-in-out infinite; }
.splash__hint { color: var(--white-80); font-size: .85rem; margin-top: 2px; }
@keyframes pulseBtn { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

@keyframes load { 0% { transform: translateX(-120%); width: 30%; } 60% { width: 70%; } 100% { transform: translateX(280%); width: 60%; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ============ TOUR GUIADO ============ */
.tour { position: fixed; inset: 0; z-index: 90; }
.tour[hidden] { display: none; }
.tour__spot {
  position: absolute; top: 0; left: 0; width: 0; height: 0; border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0, 20, 18, .8);
  transition: top .35s ease, left .35s ease, width .35s ease, height .35s ease;
  pointer-events: none;
}
.tour__pop {
  position: absolute; left: 50%; transform: translateX(-50%);
  max-width: 340px; width: calc(100% - 28px);
  background: #fff; color: var(--ink); border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .65);
  transition: top .35s ease;
}
.tour__count { color: var(--teal); font-weight: 700; font-size: .78rem; margin-bottom: 4px; }
.tour__title { font-family: var(--display); color: var(--green-800); font-size: 1.15rem; margin-bottom: 6px; }
.tour__text { font-size: .95rem; line-height: 1.5; color: #2a3f3b; }
.tour__btns { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; }
.tour__skip { background: none; border: 0; color: var(--muted); font-size: .85rem; cursor: pointer; text-decoration: underline; }
.tour__nav { display: flex; gap: 8px; }
.tour__prev { background: var(--paper-2); color: var(--green-800); padding: 12px 16px; }
.tour__next { padding: 12px 18px; }

/* ============ APP ============ */
.app { max-width: 480px; margin: 0 auto; padding: 18px 16px 60px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 18px; }
.topbar .brand__mark { width: 34px; height: 34px; font-size: 1.1rem; }
.topbar .brand__name { font-size: 1.1rem; }
.topbar__user { display: flex; align-items: center; gap: 6px; font-size: .95rem; }
.topbar__hi { color: var(--white-80); }
.avatar { font-size: 1.4rem; margin-left: 2px; }
.avatar--foto { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; margin-left: 4px; border: 2px solid var(--teal-soft); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .4); }
.avatar--foto img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Cartão de saldo ---------- */
.hero { margin-bottom: 22px; }
.balance-card {
  background: linear-gradient(150deg, var(--green-700), var(--green-600));
  border: 1px solid var(--white-12);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 232, 112, .35), transparent 70%);
  pointer-events: none;   /* deixa o brilho decorativo passar o clique pro botão do olho */
}
.balance-card__top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; color: var(--white-80); font-size: .9rem; }
.eye { position: relative; z-index: 2; }
.eye { background: var(--white-12); border: 0; border-radius: 10px; width: 38px; height: 32px; cursor: pointer; font-size: 1rem; }
.balance-card__value { margin: 10px 0 4px; }
.balance { font-family: var(--display); font-size: 2.4rem; font-weight: 800; letter-spacing: -1px; }
.balance.hidden-balance { letter-spacing: 4px; }
.balance-card__sub { color: var(--teal-soft); font-size: .9rem; min-height: 1.2em; }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px; }
.qa {
  display: grid; justify-items: center; gap: 6px;
  background: var(--white-08); border: 1px solid var(--white-12);
  border-radius: var(--radius-sm); padding: 12px 4px; cursor: pointer;
  color: #fff; transition: transform .12s, background .2s;
}
.qa:hover { background: var(--white-12); transform: translateY(-2px); }
.qa:active { transform: scale(.95); }
.qa__icon { font-size: 1.5rem; }
.qa__label { font-size: .72rem; color: var(--white-80); text-align: center; line-height: 1.1; }

.hero__greeting { text-align: center; margin-top: 22px; font-size: 1.35rem; font-family: var(--display); font-weight: 700; line-height: 1.35; }
.hero__greeting-sub { font-family: var(--font); font-weight: 500; font-size: .95rem; color: var(--white-80); }
.hero__greeting-sub b { color: var(--lime); }

/* ---------- Cards de seção ---------- */
.card {
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  animation: cardIn .6s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.section__head h2 { font-family: var(--display); font-size: 1.25rem; color: var(--green-800); }
.muted { color: var(--muted); font-size: .92rem; line-height: 1.5; margin-bottom: 6px; }
.badge { background: var(--paper-2); color: var(--muted); font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.badge--green { background: rgba(0, 194, 168, .14); color: var(--green-700); }
.badge--gold { background: rgba(246, 181, 61, .18); color: #a76f00; }

/* ---------- Bolo ---------- */
.cake-stage { display: grid; place-items: end center; height: 220px; margin: 8px 0 4px; }
.cake { position: relative; width: 200px; cursor: pointer; transition: transform .2s; }
.cake:hover { transform: translateY(-3px); }
.cake__plate { height: 14px; background: linear-gradient(#e9eef0, #cfd8da); border-radius: 0 0 16px 16px / 0 0 40px 40px; box-shadow: 0 10px 18px -10px rgba(0,0,0,.4); }
.cake__layer { border-radius: 12px 12px 6px 6px; position: relative; }
.cake__layer--mid { height: 56px; background: repeating-linear-gradient(90deg, #ff9ec7 0 18px, #ff86ba 18px 36px); margin: 0 6px; }
.cake__layer--top { height: 46px; background: linear-gradient(#fff3f8, #ffd9ea); margin: 0 16px; }
.cake__layer--top::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 16px; background: radial-gradient(circle at 12px 14px, #fff 6px, transparent 7px) repeat-x; background-size: 26px 16px; border-radius: 12px 12px 0 0; }
.cake__candles { position: absolute; top: -34px; left: 0; right: 0; display: flex; justify-content: center; gap: 22px; }
.candle { width: 7px; height: 40px; border-radius: 3px; background: repeating-linear-gradient(45deg, var(--teal) 0 6px, #fff 6px 12px); }
.cake__flames { position: absolute; top: -52px; left: 0; right: 0; display: flex; justify-content: center; gap: 22px; transition: opacity .4s; }
.flame {
  width: 12px; height: 18px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff 0, #ffd34d 35%, #ff7a00 75%);
  transform-origin: center bottom;
  animation: flicker .6s ease-in-out infinite alternate;
  box-shadow: 0 0 18px 4px rgba(255, 160, 0, .6);
  margin-left: 0; position: relative; left: 1px;
}
.flame:nth-child(odd) { animation-delay: .2s; }
@keyframes flicker { from { transform: scale(.9) rotate(-4deg); } to { transform: scale(1.08) rotate(4deg); } }
.cake.is-out .cake__flames { opacity: 0; }
.cake.is-out .flame { animation: none; }

.cake-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 12px; }
.btn--mic { font-size: 1.05rem; padding: 15px 28px; }
.cake-fallback { background: none; border: 0; cursor: pointer; color: var(--muted); opacity: .65; font-size: .82rem; text-decoration: underline; font-family: var(--font); padding: 4px 8px; transition: opacity .2s; }
.cake-fallback:hover { opacity: 1; }
.cake-msg { text-align: center; margin-top: 14px; font-weight: 700; color: var(--green-700); min-height: 1.4em; font-size: 1.05rem; }
.mic-on { background: linear-gradient(135deg, #ff6b6b, #ffa36b) !important; color: #fff !important; }

/* ---------- Extrato ---------- */
.statement { margin-top: 10px; display: grid; gap: 2px; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px dashed #e3eae8; }
.tx:last-child { border-bottom: 0; }
.tx__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 auto; background: var(--paper-2); overflow: hidden; }
.tx__icon img { width: 100%; height: 100%; object-fit: cover; }
.tx__body { flex: 1; min-width: 0; }
.tx__title { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.tx__date { color: var(--muted); font-size: .78rem; }
.tx__val { font-weight: 800; font-size: .9rem; white-space: nowrap; }
.tx__val.plus { color: #19a36b; }
.tx__val.minus { color: #d2643a; }
.tx__icon--photo { cursor: pointer; position: relative; }
.tx__icon--photo::after {
  content: "🔍"; position: absolute; bottom: 2px; right: 2px;
  font-size: 9px; line-height: 1; padding: 2px 3px; border-radius: 6px;
  background: rgba(0, 53, 47, .82);
}

/* ---------- Score / stats ---------- */
.score { display: flex; align-items: center; gap: 18px; margin: 12px 0 18px; flex-wrap: wrap; }
.score__ring {
  width: 110px; height: 110px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-content: center; text-align: center;
  background: conic-gradient(var(--teal) 0, var(--lime) 100%, #eee 0);
  position: relative;
}
.score__ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; }
.score__num { position: relative; font-family: var(--display); font-size: 1.9rem; font-weight: 800; color: var(--green-700); line-height: 1; }
.score__max { position: relative; font-size: .75rem; color: var(--muted); }
.score__info p { font-size: .95rem; line-height: 1.4; }
.counter { font-family: var(--display); font-weight: 700; color: var(--green-700); font-size: 1.02rem; }

.stats { display: grid; gap: 14px; }
.stat__top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; font-weight: 600; }
.stat__pct { color: var(--muted); }
.stat__bar { height: 10px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.stat__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--lime)); width: 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }

/* ---------- Pix de amor ---------- */
.card--love { background: linear-gradient(160deg, #ffffff, #f0fbf7); }
.pix-receipt {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid #e3efeb; border-radius: var(--radius-sm);
  padding: 16px; margin-top: 12px; transition: transform .12s, box-shadow .2s;
}
.pix-receipt:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -14px rgba(0, 100, 80, .5); }
.pix-receipt:active { transform: scale(.98); }
.pix-receipt__row { display: flex; justify-content: space-between; align-items: center; }
.pix-receipt__from { font-size: 1rem; color: var(--ink); }
.pix-receipt__amount { font-weight: 800; color: #19a36b; }
.pix-receipt__hint { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; }

/* ---------- Comprovante ---------- */
.receipt {
  background: #fff; color: var(--ink); border-radius: var(--radius);
  padding: 26px 22px; text-align: center; position: relative; box-shadow: var(--shadow);
  background-image: linear-gradient(#fff, #fff), repeating-linear-gradient(45deg, transparent 0 8px, rgba(0,0,0,.02) 8px 9px);
}
.receipt__perfo { position: absolute; top: -8px; left: 0; right: 0; height: 16px; background: radial-gradient(circle at 8px 0, transparent 7px, #fff 8px) repeat-x; background-size: 18px 16px; }
.receipt h3 { font-family: var(--display); color: var(--green-800); margin-bottom: 14px; }
.receipt dl { display: grid; gap: 8px; text-align: left; max-width: 280px; margin: 0 auto; }
.receipt dl > div { display: flex; justify-content: space-between; border-bottom: 1px dashed #e3eae8; padding-bottom: 6px; }
.receipt dt { color: var(--muted); font-size: .85rem; }
.receipt dd { font-weight: 700; font-size: .9rem; }
.receipt__love { margin-top: 16px; color: var(--green-700); font-weight: 700; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 20, 18, .6); backdrop-filter: blur(4px); }
.modal__box {
  position: relative; background: #fff; color: var(--ink);
  border-radius: var(--radius); padding: 30px 24px; max-width: 380px; width: 100%;
  text-align: center; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
  animation: pop .4s cubic-bezier(.2,1.2,.3,1) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: none; } }
.modal__close { position: absolute; top: 12px; right: 14px; background: var(--paper-2); border: 0; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: .9rem; color: var(--muted); }
.modal__emoji { font-size: 3rem; margin-bottom: 8px; }
.modal__box h3 { font-family: var(--display); color: var(--green-800); margin-bottom: 10px; }
.modal__box p { color: #2a3f3b; line-height: 1.6; font-size: 1.02rem; }

/* ---------- Banner modo festa ---------- */
.party-banner {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 80; background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--green-900); font-family: var(--display); font-weight: 800;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 12px 30px -8px rgba(246,181,61,.8);
  animation: bannerIn .4s ease both, bounce 1s ease-in-out infinite .4s;
}
.party-banner[hidden] { display: none; }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes bounce { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }

/* ---------- Bloqueio: só celular ---------- */
.block-desktop {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px; text-align: center;
  background:
    radial-gradient(800px 500px at 50% 30%, rgba(0, 194, 168, .25), transparent 60%),
    linear-gradient(160deg, var(--green-800), var(--green-900));
}
.block-desktop[hidden] { display: none; }
.block-desktop__box { max-width: 440px; animation: rise .6s ease both; }
.block-desktop__emoji { font-size: 4.2rem; margin-bottom: 12px; animation: floaty 1.4s ease-in-out infinite; }
.block-desktop h2 { font-family: var(--display); font-size: 1.7rem; color: #fff; margin-bottom: 12px; }
.block-desktop p { color: var(--white-80); line-height: 1.6; margin-bottom: 10px; font-size: 1.02rem; }
.block-desktop__link { margin-top: 18px; color: var(--teal-soft); }
.block-desktop__link b { color: var(--lime); font-size: 1.12rem; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Utilidades ---------- */
[hidden] { display: none !important; }
@media (max-width: 360px) { .quick-actions { gap: 6px; } .qa__label { font-size: .66rem; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
