/*
 * Módulo de conta (hub + jogos): folha clara no padrão de carteira de app.
 * Celular: folha que sobe de baixo, cantos superiores arredondados. Desktop: caixa centralizada.
 * Campos cinza com rótulo dentro; verde só no botão principal; azul só no "Voltar".
 */
.ac-modal { --s-text: #1d2230; --s-mut: #6b7280; --s-field: #f1f2f5; --s-line: #e6e8ec; --s-green: #22a95c; --s-green-h: #1e9852; --s-blue: #1a6fe0; --s-red: #d93025;
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(8, 10, 16, .6); touch-action: pan-y; animation: acFade .2s ease }
.ac-modal[hidden] { display: none }
.ac-box { position: relative; width: min(440px, 100%); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  background: #fff; color: var(--s-text); border-radius: 22px; padding: 14px 22px 24px; font: 500 16px/1.45 'Barlow', system-ui, sans-serif;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35); animation: acPop .22s cubic-bezier(.2, .8, .3, 1) }
@keyframes acFade { from { opacity: 0 } }
@keyframes acPop { from { opacity: 0; transform: translateY(10px) } }
@media (max-width: 600px) {
  .ac-modal { align-items: flex-end; padding: 0 }
  .ac-box { width: 100%; max-height: 94vh; border-radius: 24px 24px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); animation: acUp .26s cubic-bezier(.2, .8, .3, 1) }
  @keyframes acUp { from { transform: translateY(40px); opacity: .6 } }
}
.ac-box :focus-visible { outline: 2px solid var(--s-blue); outline-offset: 2px }

/* topo: Voltar + fechar */
.ac-head { display: flex; align-items: center; justify-content: space-between; height: 44px; margin: 0 -6px 6px }
.ac-back { display: flex; align-items: center; gap: 4px; padding: 6px; border: none; background: none; color: var(--s-blue); font: 600 17px 'Barlow', system-ui, sans-serif; cursor: pointer; border-radius: 8px }
.ac-back[hidden] { display: none }
.ac-x { margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center; border: none; background: none; color: #4b5260; border-radius: 50%; cursor: pointer }
.ac-x:hover { background: var(--s-field) }

/* cabeçalho com marca (Pix) */
.ac-brand { display: flex; align-items: center; gap: 12px; margin: 2px 0 18px }
.ac-brand h3 { margin: 0 }
.ac-box h3 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; margin: 4px 0 6px }
.ac-note { font-size: 15px; color: var(--s-mut); margin: 0 0 14px; line-height: 1.45 }

/* aviso informativo */
.ac-info { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1.5px solid var(--s-line); border-radius: 16px; font-size: 15px; color: #3d4452; line-height: 1.4; margin-bottom: 16px }
.ac-info svg { flex: none; color: var(--s-blue) }
.ac-warn { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: #fff6e0; color: #7a5200; font-size: 14px; line-height: 1.4; margin: 0 0 16px }

/* campo com rótulo dentro */
.ac-field { display: block; background: var(--s-field); border-radius: 14px; padding: 11px 16px 10px; margin-bottom: 12px; cursor: text; border: 1.5px solid transparent; transition: border-color .15s }
.ac-field:focus-within { border-color: #c9ced8; background: #eceef2 }
.ac-field > span { display: block; font-size: 14px; color: var(--s-mut); line-height: 1.2 }
.ac-field input, .ac-field select, .ac-field b { display: block; width: 100%; border: none; background: none; outline: none; padding: 3px 0 0; font: 500 19px 'Barlow', system-ui, sans-serif; color: var(--s-text); font-variant-numeric: tabular-nums }
.ac-field select { appearance: none; -webkit-appearance: none; cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right center no-repeat }
.ac-field input::placeholder { color: #a3a9b5 }
.ac-field.ro { cursor: default }
.ac-field.ro b { font-weight: 500 }
.ac-money { display: flex; align-items: baseline; gap: 6px; font: 500 19px 'Barlow', system-ui, sans-serif }
.ac-money input { padding: 0 }
.ac-hint { font-size: 15px; color: var(--s-mut); margin: -2px 0 18px }

/* atalhos de valor */
.ac-chips { display: flex; justify-content: center; gap: 8px; margin: 0 0 22px }
.ac-chips button { flex: 0 1 auto; white-space: nowrap; padding: 11px 16px; border: 1.5px solid transparent; border-radius: 999px; background: var(--s-field); color: var(--s-text); font: 700 17px 'Barlow', system-ui, sans-serif; cursor: pointer; font-variant-numeric: tabular-nums }
.ac-chips button:hover { background: #e7e9ee }
.ac-chips button.on { border-color: var(--s-green); background: #e8f7ee; color: #157a40 }

/* botões */
.ac-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; margin-top: 12px; border: none; border-radius: 14px; background: var(--s-green); color: #fff; font: 700 18px 'Barlow', system-ui, sans-serif; cursor: pointer; transition: background-color .15s }
.ac-btn:hover { background: var(--s-green-h) }
.ac-btn:disabled { opacity: .45; cursor: not-allowed }
.ac-btn.sec { background: var(--s-field); color: var(--s-text) }
.ac-btn.sec:hover { background: #e7e9ee }
.ac-btn.sec svg { color: #5d6472 }
.ac-err { color: var(--s-red); font-size: 14px; font-weight: 600; min-height: 0 }
.ac-err:not(:empty) { margin: 2px 0 6px }

/* abas Entrar / Cadastrar */
.ac-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 18px; background: var(--s-field); border-radius: 14px }
.ac-tabs button { flex: 1; height: 44px; border: none; border-radius: 11px; background: none; font: 700 16px 'Barlow', system-ui, sans-serif; color: var(--s-mut); cursor: pointer }
.ac-tabs button.on { background: #fff; color: var(--s-text); box-shadow: 0 1px 3px rgba(16, 24, 40, .12) }

.ac-box label.ac-chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--s-mut); margin: 4px 0 6px; line-height: 1.4; cursor: pointer }
.ac-chk input { margin-top: 2px; accent-color: var(--s-green); width: 18px; height: 18px; flex: none }

/* QR / pagamento */
.ac-amount { font-size: 34px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; margin: 0 0 4px }
.ac-qr { display: flex; justify-content: center; margin: 14px 0 18px }
.ac-qr > div { padding: 12px; border: 1.5px solid var(--s-line); border-radius: 18px; line-height: 0 }
.ac-copy { display: flex; align-items: center; gap: 10px; background: var(--s-field); border-radius: 14px; padding: 10px 10px 10px 16px }
.ac-copy div { flex: 1; min-width: 0 }
.ac-copy span { display: block; font-size: 14px; color: var(--s-mut) }
.ac-copy code { display: block; font: 500 15px 'Barlow', system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--s-text) }
.ac-copy button { flex: none; height: 40px; padding: 0 14px; border: none; border-radius: 10px; background: #fff; color: var(--s-text); font: 700 14px 'Barlow', system-ui, sans-serif; cursor: pointer; box-shadow: 0 1px 2px rgba(16, 24, 40, .1) }
.ac-stat { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; font-size: 15px; color: var(--s-mut) }
.ac-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #d5d9e0; border-top-color: var(--s-green); animation: acSpin .8s linear infinite }
@keyframes acSpin { to { transform: rotate(360deg) } }

/* instruções (sequência real, por isso numerada) */
.ac-steps { list-style: none; counter-reset: s; margin: 4px 0 8px; padding: 0 }
.ac-steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding: 12px 0; font-size: 16px; line-height: 1.45; color: #3d4452 }
.ac-steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--s-field); display: grid; place-items: center; font-weight: 700; color: var(--s-text) }
.ac-steps b { color: var(--s-text) }

/* saldo, extrato, conta */
.ac-bal { font-size: 34px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; color: var(--s-text); margin: 0 0 6px }
.ac-bar { height: 8px; background: rgba(0, 0, 0, .08); border-radius: 8px; overflow: hidden; margin-top: 8px }
.ac-bar > i { display: block; height: 100%; background: #c98a00; border-radius: 8px }
.ac-sect { font-size: 15px; font-weight: 700; margin: 20px 0 2px }
.ac-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--s-line); font-size: 15px; font-weight: 600 }
.ac-row:last-child { border-bottom: none }
.ac-row small { display: block; color: var(--s-mut); font-weight: 500; font-size: 13px; margin-top: 1px }
.ac-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums }
.ac-pos { color: #157a40 } .ac-neg { color: var(--s-red) }
.ac-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px }
.ac-acts button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0; border: none; border-radius: 14px; background: var(--s-field); color: var(--s-text); font: 600 14px 'Barlow', system-ui, sans-serif; cursor: pointer }
.ac-acts button:hover { background: #e7e9ee }
.ac-acts svg { width: 22px; height: 22px }
.ac-link { display: block; width: 100%; margin-top: 14px; padding: 13px; border: none; background: none; color: var(--s-red); font: 600 15px 'Barlow', system-ui, sans-serif; cursor: pointer; border-radius: 12px }
.ac-link:hover { background: #fdeceb }

.ac-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); z-index: 1100; max-width: calc(100vw - 32px); padding: 13px 20px; border-radius: 14px;
  background: #1d2230; color: #fff; font: 600 14.5px 'Barlow', system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s }
.ac-toast.show { opacity: 1; transform: translate(-50%, 0) }
@media (max-width: 600px) { .ac-toast { top: calc(14px + env(safe-area-inset-top)); bottom: auto; transform: translate(-50%, -12px) } .ac-toast.show { transform: translate(-50%, 0) } .ac-chips button { padding: 10px 13px; font-size: 16px } }
@media (prefers-reduced-motion: reduce) { .ac-modal, .ac-box, .ac-spin { animation: none !important } }
