/* =========================================================
   Views Dashboard + Recarga (Agente B) — prefixos dash- / rec-
   ========================================================= */

/* ---------------- Dashboard ---------------- */
.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 40px);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(240, 98, 90, .35), transparent 55%),
    linear-gradient(135deg, #c1241c 0%, var(--primary) 45%, #6e1410 100%);
  border: 1px solid rgba(248, 162, 156, .25);
  box-shadow: 0 20px 60px -20px var(--primary-glow);
  color: #fff;
}
.dash-hero-orb { position: absolute; border-radius: 50%; filter: blur(40px); pointer-events: none; }
.dash-orb-1 { width: 260px; height: 260px; right: -60px; top: -80px; background: rgba(244, 114, 182, .35); }
.dash-orb-2 { width: 200px; height: 200px; right: 22%; bottom: -120px; background: rgba(96, 165, 250, .3); }
.dash-hero > .spider-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; opacity: .22; z-index: 0;
}
.dash-hero-txt { position: relative; z-index: 1; max-width: 560px; }
.dash-hero-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14);
}
.dash-hero-kicker .ic { width: 14px; height: 14px; }
.dash-hero h1 { font-family: var(--font-display); font-size: clamp(26px, 4.5vw, 38px); margin: 14px 0 8px; line-height: 1.15; }
.dash-hero p { margin: 0; color: rgba(255, 255, 255, .85); line-height: 1.55; }
.dash-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.dash-btn-light { background: #fff; color: #6e1410; border-color: #fff; }
.dash-btn-light:hover { background: var(--primary-3); }
.dash-btn-glass { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.dash-btn-glass:hover { background: rgba(255, 255, 255, .2); }

.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.dash-compras-head { flex-wrap: wrap; gap: 12px; }
.dash-compras-actions { flex: 1 1 260px; justify-content: flex-end; min-width: 0; }
.dash-search { flex: 1 1 auto; min-width: 0; max-width: 300px; }
.dash-compras-foot { padding: 0 16px 14px; display: flex; justify-content: flex-end; }
.dash-compras-foot .ic { width: 16px; height: 16px; }

.dash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-row {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .15s;
}
.dash-row:hover { border-color: var(--border-2); }
.dash-row-ic {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-2);
}
.dash-row-ic .ic { width: 18px; height: 18px; }
.dash-row-main { flex: 1; min-width: 0; }
.dash-row-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 14px; }
.dash-row-top .muted { font-size: 12px; }
.dash-row-sub { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dash-row-total { flex: none; font-weight: 700; font-family: var(--font-display); color: var(--text); }

.dash-niveis .card-head h3 { display: flex; align-items: center; gap: 8px; }
.dash-niveis .card-head .ic { width: 18px; height: 18px; color: var(--primary-2); }
.dash-niveis-intro { font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.dash-niveis-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-nivel {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--c);
}
.dash-nivel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.dash-nivel-pre { font-size: 13px; color: var(--c); }
.dash-nivel small { font-size: 12px; }

@media (max-width: 980px) {
  .dash-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .dash-hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .dash-compras-actions { flex-basis: 100%; }
  .dash-search { max-width: none; }
  .dash-row { padding: 10px; gap: 10px; }
  .dash-row-ic { width: 32px; height: 32px; }
}

/* ---------------- Recarga ---------------- */
.rec-flow { max-width: 820px; display: flex; flex-direction: column; gap: 16px; }

.rec-stepper { list-style: none; margin: 0 0 4px; padding: 0; display: flex; align-items: center; gap: 8px; }
.rec-step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 500; flex: none; }
.rec-step-n {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border-2);
  transition: all .25s;
}
.rec-step-n .ic { width: 15px; height: 15px; }
.rec-step.active { color: var(--text); }
.rec-step.active .rec-step-n { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.rec-step.done { color: var(--text-2); }
.rec-step.done .rec-step-n { background: var(--green); border-color: var(--green); color: #06120c; }
.rec-step-line { flex: 1; height: 2px; min-width: 16px; background: var(--border-2); border-radius: 2px; }

.rec-aviso {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--primary-soft); border: 1px solid var(--primary); color: var(--text); font-size: 14px; line-height: 1.45;
}
.rec-aviso .ic { flex: none; width: 18px; height: 18px; color: var(--primary-2); margin-top: 1px; }

.rec-saldos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rec-saldo-card { padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rec-saldo-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.rec-saldo-val { font-family: var(--font-display); font-size: clamp(20px, 3.5vw, 26px); overflow-wrap: anywhere; }
.rec-saldo-apos { border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.rec-saldo-apos .rec-saldo-val, .rec-saldo-apos small { color: var(--green); }

.rec-display {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  padding: 18px 8px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border);
}
.rec-display-cur { font-size: 20px; color: var(--muted); font-weight: 600; }
.rec-display-num {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 9vw, 56px); line-height: 1;
  background: linear-gradient(135deg, var(--primary-3), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent;
  overflow-wrap: anywhere;
}

.rec-rapidos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.rec-rapido {
  font: inherit; font-weight: 600; font-size: 14px; color: var(--text-2); cursor: pointer;
  padding: 10px 4px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
  transition: all .15s;
}
.rec-rapido:hover { border-color: var(--primary); color: var(--text); }
.rec-rapido.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-3); box-shadow: 0 0 0 1px var(--primary) inset; }

.rec-range { width: 100%; }
.rec-range-lim { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; }

.rec-input-row { display: flex; gap: 10px; margin-top: 6px; }
.rec-input-field { flex: 1; min-width: 0; }
.rec-input-row .btn { flex: none; }
.rec-input-row .btn .ic { width: 16px; height: 16px; }
.rec-hint { display: block; margin-top: 8px; font-size: 12px; transition: color .15s; }
.rec-hint-err { color: var(--red); }

/* PIX */
.rec-pix-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.rec-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rec-qr { width: 100%; max-width: 260px; padding: 10px; border-radius: var(--radius); background: #fff; box-shadow: 0 10px 40px -12px var(--primary-glow); }
.rec-qr-svg { display: block; width: 100%; height: auto; }
.rec-timer {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--amber);
  padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--amber) 12%, transparent);
}
.rec-timer .ic { width: 15px; height: 15px; }
.rec-timer strong { font-variant-numeric: tabular-nums; }
.rec-pix-valor { font-family: var(--font-display); font-size: 30px; font-weight: 700; margin-top: 2px; }
.rec-pix-passos { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.rec-copia {
  display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 8px 8px 12px; min-width: 0;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--border-2);
}
.rec-copia-code { flex: 1; min-width: 0; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-copia .btn { flex: none; }
.rec-pix-acoes { display: flex; gap: 10px; flex-wrap: wrap; }
.rec-pix-acoes .btn-success { flex: 1; justify-content: center; }
.rec-demo { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.rec-demo .ic { flex: none; width: 14px; height: 14px; margin-top: 2px; }

/* Sucesso */
.rec-ok-body { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 16px; gap: 6px; }
.rec-ok-body h2 { margin: 10px 0 0; font-family: var(--font-display); }
.rec-ok-body p { margin: 0; }
.rec-ok-check { width: 84px; height: 84px; animation: rec-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.rec-ok-check svg { width: 100%; height: 100%; }
.rec-ok-circ { stroke: var(--green); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: rec-draw .6s ease-out .1s forwards; }
.rec-ok-tick { stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 34; stroke-dashoffset: 34; animation: rec-draw .35s ease-out .6s forwards; }
@keyframes rec-draw { to { stroke-dashoffset: 0; } }
@keyframes rec-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rec-ok-saldo {
  margin: 14px 0 8px; padding: 14px 28px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--green) 10%, transparent); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  display: flex; flex-direction: column; gap: 2px;
}
.rec-ok-saldo strong { font-family: var(--font-display); font-size: 30px; color: var(--green); }
.rec-ok-acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

@media (max-width: 720px) {
  .rec-pix-body { grid-template-columns: minmax(0, 1fr); }
  .rec-qr-wrap { order: -1; }
  .rec-qr { max-width: 220px; }
  .rec-rapidos { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .rec-saldos { gap: 8px; }
  .rec-saldo-card { padding: 12px; }
  .rec-step-l { display: none; }
  .rec-step.active .rec-step-l { display: inline; }
  .rec-input-row { flex-direction: column; }
  .rec-input-row .btn { justify-content: center; }
  .rec-ok-acoes .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .rec-ok-check { animation: none; }
  .rec-ok-circ, .rec-ok-tick { animation: none; stroke-dashoffset: 0; }
}

/* PIX real: QR (img data:), copia e cola, contagem, status ao vivo */
.rec-qr { max-width: 240px; }
.rec-qr-img { display: block; width: 100%; max-width: 220px; height: auto; aspect-ratio: 1; margin: 0 auto; background: #fff; image-rendering: pixelated; }
.rec-qr-off {
  display: flex; align-items: center; gap: 8px; max-width: 240px; padding: 14px; font-size: 13px; line-height: 1.4;
  border-radius: var(--radius); border: 1px dashed var(--border-2); background: var(--surface-2);
}
.rec-qr-off .ic { flex: none; width: 16px; height: 16px; }
.rec-timer-low { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.rec-live {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13.5px; color: var(--text-2);
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--amber) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent);
}
.rec-live-dot { flex: none; position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); animation: rec-live 1.6s ease-out infinite; }
.rec-live.is-checking .rec-live-dot { animation-duration: .6s; }
@keyframes rec-live {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber) 60%, transparent); }
  80%, 100% { box-shadow: 0 0 0 8px transparent; }
}
.rec-copia { flex-direction: column; align-items: stretch; padding: 10px; }
textarea.rec-copia-code {
  flex: none; display: block; width: 100%; height: 6em; min-height: 0; resize: none; padding: 0; border: 0; outline: none; background: transparent;
  font-size: 12.5px; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere;
  text-overflow: clip; overflow: auto; cursor: text;
}
.rec-copia-btn { width: 100%; }
.rec-pix-acoes { justify-content: flex-start; }

.rec-pend {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; font-size: 14px; line-height: 1.45;
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--amber) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); color: var(--text);
}
.rec-pend > .ic { flex: none; width: 18px; height: 18px; color: var(--amber); }
.rec-pend > span { flex: 1 1 200px; min-width: 0; }
.rec-erro {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45;
  border-radius: var(--radius-sm); color: #fca5a5; background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .3);
}
.rec-erro .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; }

.rec-fim-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 16px; }
.rec-fim-body h2 { margin: 6px 0 0; font-family: var(--font-display); }
.rec-fim-body p { margin: 0; max-width: 46ch; }
.rec-fim-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border-2); }
.rec-fim-ic .ic { width: 28px; height: 28px; }
.rec-fim-rec .rec-fim-ic { color: var(--red); background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); }
@media (prefers-reduced-motion: reduce) { .rec-live-dot { animation: none; } }
@media (max-width: 480px) {
  .rec-hist .dash-row { flex-wrap: wrap; }
  .rec-hist .dash-row-main { flex: 1 1 calc(100% - 52px); }
  .rec-hist .dash-row-total { flex: 1 1 100%; padding-left: 42px; }
}

/* ---------- Top Recargas ---------- */
.dash-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (min-width: 720px) { .dash-top-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dash-top .card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dash-top .card-head h3 { display: flex; align-items: center; gap: 8px; }
.dash-top .card-head .ic { width: 18px; height: 18px; color: var(--amber); }
.dash-top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-top-row {
  --m: var(--muted);
  display: grid; grid-template-columns: 26px 28px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.dash-top-ouro   { --m: #f5c542; }
.dash-top-prata  { --m: #c9ced6; }
.dash-top-bronze { --m: #d08a52; }
.dash-top-ouro { border-color: color-mix(in srgb, var(--m) 35%, transparent); background: color-mix(in srgb, var(--m) 7%, var(--surface-2)); }
.dash-top-pos {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font: 700 13px/1 var(--font-display); color: #141010; background: var(--m);
}
.dash-top-nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-top-nome em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--primary-2); margin-left: 4px; }
.dash-top-total { font-family: var(--font-display); font-size: 14px; white-space: nowrap; }
.dash-top-row.is-voce { border-color: var(--primary); }
.dash-top-voce {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-2);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px;
}
