/* CODBUFF — área do cliente. Complementa assets/css/codbuff.css; só o que
   o design system ainda não tem: estados do painel, editor de avatar, estrelas
   do feedback, login/cadastro lado a lado e a compatibilidade do afiliado.php. */

/* atributo hidden vence display:flex dos componentes (.alerta, .field) */
[hidden] { display: none !important; }

/* ----- painel (shell) ----- */
.shell-main .tab-panel.active { display: flex; flex-direction: column; gap: 1.25rem; }
.shell-nav .itens { display: contents; }
.shell-nav .perfil .status { font-size: .78rem; }
.shell-nav .perfil .status.ativo { color: var(--verde); }
.shell-nav .perfil .status.expirado { color: var(--vermelho); }
.shell-nav .perfil .status.sem { color: var(--muted); }
.status.sem { color: var(--muted); }
.stat-grid .stat b.status { display: inline-flex; font-size: 1.3rem; margin-bottom: .15rem; }
.stat-grid .stat b.status + span { display: block; }
.avatar-editor img, .shell-nav .perfil img { background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237f8286'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.4 0-8 2.5-8 5.6V22h16v-2.4c0-3.1-3.6-5.6-8-5.6Z'/%3E%3C/svg%3E") center/55% no-repeat; color: transparent; font-size: 0; }
.stat-grid .stat b.expirado { color: var(--vermelho); }
.stat-grid .stat b.sem { color: var(--muted); }
.alerta > div { flex: 1; min-width: 0; }
.alerta a { font-weight: 600; white-space: nowrap; }
.page-head .crumbs span + span { color: var(--text-2); }

/* recompensas (feedback, Discord) */
.recompensas .card { position: relative; }
.recompensas .card > .pill, .recompensas .card > .status { position: absolute; top: 1.2rem; right: 1.2rem; }

/* ----- formulários ----- */
.input-wrap.com-olho .input { padding-right: 3rem; }
.copy-field.resgate { align-items: stretch; }
.copy-field.resgate .input-wrap { flex: 1; min-width: 0; }
.copy-field.resgate .input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }
.lista-chaves { display: flex; flex-direction: column; gap: .9rem; }
.lista-chaves .copy-field .input { flex: 1; min-width: 0; }
.lista-chaves .chave > span { display: block; margin-top: .35rem; }
.kv dd code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--surface-2); border: 1px solid var(--border-soft); padding: .1rem .45rem; border-radius: 6px; }
.field .help.contador { text-align: right; }
.field.center .label { display: block; margin-bottom: .4rem; }

/* editor de avatar */
.avatar-editor { display: flex; gap: 1.5rem; align-items: center; margin: 0; }
.avatar-editor img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: var(--surface-2); flex: none; }
.avatar-campos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .7rem; }
.avatar-campos p { margin: 0; }
.btn:has(input:focus-visible) { outline: 2px solid var(--verde); outline-offset: 3px; }

/* estrelas do feedback */
.estrelas { display: flex; justify-content: center; gap: .15rem; }
.estrela { background: none; border: 0; padding: .25rem .3rem; font-size: 1.7rem; line-height: 1; color: var(--border); border-radius: 8px; transition: color var(--t-fast), transform var(--t-fast) var(--ease); }
.estrela.ativa { color: var(--amarelo); }
.estrelas:hover .estrela { color: var(--border); }
.estrelas:hover .estrela.prevista { color: var(--amarelo); }
.estrela:hover { transform: scale(1.15); }

/* hCaptcha */
.hcaptcha-wrap { min-height: 78px; display: flex; justify-content: center; flex-direction: column; align-items: center; }
.erro-captcha { color: var(--vermelho); font-size: .82rem; display: block; margin-top: .5rem; text-align: center; }

/* ----- entrar / criar conta lado a lado ----- */
.auth-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; max-width: 940px; margin: 0 auto; align-items: start; }
.auth-duo .auth-card { width: auto; box-shadow: none; }
.auth-duo .auth-card h2 { font-size: 1.4rem; margin-bottom: .35rem; display: flex; align-items: center; gap: .6rem; }
.auth-duo .auth-card h2 i { color: var(--verde); font-size: 1.1rem; }
.auth-duo .auth-card h2.center { justify-content: center; }
.auth-duo .auth-card > p, .auth-duo .cadastro-chamada p { color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }
.auth-duo .cadastro-chamada { text-align: center; padding: 1.25rem 0 .5rem; }
.auth-duo .cadastro-chamada .card-icon { margin: 0 auto 1rem; width: 64px; height: 64px; font-size: 1.6rem; }
.auth-duo .field > a { align-self: flex-end; }

/* ----- responsivo ----- */
@media (max-width: 760px) {
  .auth-duo { grid-template-columns: 1fr; }
  .avatar-editor { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .copy-field.resgate { flex-direction: column; }
  .copy-field.resgate .btn, .lista-chaves .copy-field .btn { width: auto; }
  .btn-row > .btn { flex: 1 1 auto; }
  .recompensas .card > .pill, .recompensas .card > .status { position: static; display: inline-flex; margin-bottom: .8rem; }
}
