/* ============================================================
   RIFA SOLIDÁRIA DA MINI — estilos
   Identidade acolhedora, delicada e transparente. Mobile-first.
   ============================================================ */

:root {
  --rosa:        #e8859b;
  --rosa-escuro: #d1577a;
  --rosa-claro:  #fce8ee;
  --creme:       #fff8f4;
  --texto:       #4a3b42;
  --texto-suave: #8a7b82;
  --verde:       #4caf7d;
  --verde-bg:    #e3f5ec;
  --amarelo:     #f0b429;
  --amarelo-bg:  #fdf3dc;
  --vermelho:    #e05260;
  --vermelho-bg: #fbe4e6;
  --cinza-borda: #ecddd7;
  --sombra:      0 6px 20px rgba(209, 87, 122, .12);
  --radius:      16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--texto);
  background: var(--creme);
  line-height: 1.55;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
img { max-width: 100%; display: block; }

.oculto { display: none !important; }
.nota { color: var(--texto-suave); font-size: .85rem; margin: .6rem 0 0; }
.erro { background: var(--vermelho-bg); color: var(--vermelho); padding: .6rem .8rem; border-radius: 10px; font-size: .9rem; margin: .4rem 0; }
.ok   { background: var(--verde-bg); color: var(--verde); padding: .6rem .8rem; border-radius: 10px; font-size: .9rem; margin: .4rem 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  font: inherit; font-weight: 600; border-radius: 999px;
  padding: .7rem 1.4rem; transition: transform .1s, filter .15s; text-decoration: none; text-align: center;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--rosa-escuro); color: #fff; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-sec { background: #fff; color: var(--rosa-escuro); border: 1.5px solid var(--rosa); }
.btn-perigo { background: var(--vermelho); color: #fff; }
.btn-lg { padding: .9rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .4rem .9rem; font-size: .85rem; }
.btn-block { display: block; width: 100%; margin-top: .6rem; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(160deg, var(--rosa-claro), var(--creme)); padding: 2.2rem 1.2rem 2.6rem; }
.hero-inner { max-width: 1000px; margin: 0 auto; display: grid; gap: 1.6rem; align-items: center; }
.hero-text h1 { font-size: 2rem; color: var(--rosa-escuro); }
.apresentacao { white-space: pre-line; font-size: 1.02rem; margin: 0 0 1.2rem; }
/* Enquadramento ajustado manualmente (ferramenta ajustar-foto.html):
   formato 1/1 · zoom 1.60 · x -2% · y 15% */
.hero-foto .foto-wrap { position: relative; width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 1/1; overflow: hidden; border-radius: var(--radius); box-shadow: var(--sombra); background: #fff; }
.hero-foto .foto-wrap img { position: absolute; top: 50%; left: 50%; width: 100%; height: auto; transform: translate(-52%, -35%) scale(1.6); transform-origin: center center; }
.hero-foto figcaption { text-align: center; color: var(--texto-suave); font-size: .85rem; margin-top: .5rem; }

/* ---------- Identificação institucional (AADARPA) ---------- */
.selo-linha { font-size: .9rem; color: var(--rosa-escuro); margin: -.4rem 0 1rem; font-weight: 600; }
.selo-linha strong { letter-spacing: .3px; }

.selo {
  max-width: 340px; margin: 1.6rem auto 0; text-align: center;
  background: #fff; border: 1.5px dashed var(--rosa); border-radius: 18px;
  padding: 1rem 1.2rem; box-shadow: var(--sombra);
}
.selo-icones { font-size: 1.25rem; display: flex; gap: .5rem; justify-content: center; margin-bottom: .3rem; }
.selo-logo { width: 84px; height: 84px; object-fit: contain; margin: 0 auto .5rem; }
.selo-titulo { font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 800; color: var(--rosa-escuro); margin: 0; }
.selo-txt { font-size: .85rem; color: var(--texto); margin: .35rem 0 .2rem; line-height: 1.4; }
.selo-txt strong { color: var(--rosa-escuro); }
.selo-sub { font-size: .78rem; color: var(--texto-suave); font-style: italic; margin: 0; }

.institucional { max-width: 720px; text-align: center; }
.institucional p { color: var(--texto); margin: .6rem auto; font-size: .98rem; }
.institucional p strong { color: var(--rosa-escuro); }

.rodape-inst { font-size: .78rem; max-width: 460px; margin: .4rem auto; opacity: .85; }

/* ---------- Campo de senha com "olhinho" ---------- */
.senha-wrap { position: relative; }
.senha-wrap input { padding-right: 2.8rem; }
.olho {
  position: absolute; top: 50%; right: .4rem; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: .4rem;
  color: var(--texto-suave); display: inline-flex; align-items: center; border-radius: 8px;
}
.olho:hover, .olho:focus { color: var(--rosa-escuro); }
.olho .olho-ic { width: 22px; height: 22px; }
.olho.ativo { color: var(--rosa-escuro); }

/* ---------- Seções ---------- */
section { max-width: 1000px; margin: 0 auto; padding: 2rem 1.2rem; }
section h2 { font-size: 1.4rem; color: var(--rosa-escuro); text-align: center; }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.info-card {
  position: relative;
  background: linear-gradient(180deg, #fff, #fffafb);
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius);
  padding: 1.5rem 1rem 1.2rem;
  text-align: center;
  box-shadow: var(--sombra);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.info-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--rosa), var(--rosa-escuro));
  opacity: .9;
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(209, 87, 122, .2);
  border-color: var(--rosa);
}
.info-card .info-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: .7rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--rosa-claro), #ffe0ea);
  color: var(--rosa-escuro);
  box-shadow: inset 0 0 0 1px rgba(209, 87, 122, .12), 0 4px 10px rgba(209, 87, 122, .14);
  transition: transform .18s ease;
}
.info-card .info-ic svg { width: 26px; height: 26px; }
.info-card:hover .info-ic { transform: scale(1.08) rotate(-3deg); }
.info-card strong { display: block; font-size: 1.15rem; margin: .1rem 0 .2rem; color: var(--rosa-escuro); }
.info-card span:last-child { color: var(--texto-suave); font-size: .85rem; }

.premio { text-align: center; }
.premio-desc { max-width: 640px; margin: 0 auto; }
.premio-extra:empty { display: none; }

/* ---------- Destaque da fotógrafa ---------- */
.prof-destaque {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 1.2rem; max-width: 680px; margin: 1.6rem auto 0; padding: 1.6rem;
  background: linear-gradient(145deg, #fff, var(--rosa-claro));
  border: 1px solid var(--cinza-borda); border-radius: 22px;
  box-shadow: var(--sombra);
}
.prof-foto {
  position: relative; flex-shrink: 0;
  width: 140px; height: 140px; border-radius: 50%;
  background: linear-gradient(145deg, var(--rosa), var(--rosa-escuro));
  padding: 4px;
  box-shadow: 0 8px 22px rgba(209, 87, 122, .28);
}
.prof-foto img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; border: 3px solid #fff;
}
.prof-iniciais {
  display: none; position: absolute; inset: 0;
  align-items: center; justify-content: center;
  font-size: 2.6rem; font-weight: 700; color: #fff; letter-spacing: 1px;
}
.prof-foto.sem-foto .prof-iniciais { display: flex; }
.prof-info { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.prof-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #fff; color: var(--rosa-escuro);
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: .32rem .8rem; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(209, 87, 122, .18);
}
.prof-tag svg { width: 15px; height: 15px; }
.prof-nome { font-size: 1.5rem; color: var(--rosa-escuro); line-height: 1.1; }
.prof-desc { margin: 0; color: var(--texto-suave); font-size: .92rem; max-width: 420px; }
.prof-cta {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: .3rem;
}
.prof-cta svg { width: 19px; height: 19px; }

/* Link para o Instagram da profissional do prêmio — identificação visual clara */
.link-insta {
  color: var(--rosa-escuro); font-weight: 700; text-decoration: underline;
  text-underline-offset: 2px; white-space: nowrap;
}
.link-insta::before { content: ""; text-decoration: none; }
.link-insta:hover, .link-insta:focus { color: var(--vermelho); text-decoration: underline; }
.info-card .link-insta { font-weight: 700; }
.premio-imagens { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.premio-imagens img { width: 160px; height: 160px; object-fit: cover; border-radius: 12px; box-shadow: var(--sombra); }

/* ---------- Acompanhamento ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin: 1rem 0; }
.stat { background: #fff; border-radius: var(--radius); padding: .9rem; text-align: center; border: 1px solid var(--cinza-borda); }
.stat strong { display: block; font-size: 1.5rem; }
.stat span { color: var(--texto-suave); font-size: .82rem; }
.stat-pago strong { color: var(--vermelho); }
.stat-reservado strong { color: var(--amarelo); }
.stat-disponivel strong { color: var(--verde); }
.stat-valor strong { color: var(--rosa-escuro); }

.progresso { position: relative; background: var(--rosa-claro); border-radius: 999px; height: 26px; overflow: hidden; margin-top: .6rem; }
.progresso-barra { height: 100%; width: 0; background: linear-gradient(90deg, var(--rosa), var(--rosa-escuro)); transition: width .5s ease; }
.progresso-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; font-weight: 600; color: var(--texto); }

/* ---------- Grade ---------- */
.legenda { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin: .8rem 0 1.2rem; font-size: .88rem; }
.legenda .dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; }
.d-disp { background: var(--verde); } .d-res { background: var(--amarelo); } .d-pago { background: var(--vermelho); }

.grade { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; max-width: 460px; margin: 0 auto; }
.grade-mini { max-width: 100%; gap: .35rem; }
.num {
  aspect-ratio: 1; border: none; border-radius: 10px; font-weight: 700; font-size: 1rem;
  cursor: pointer; color: #fff; transition: transform .08s, box-shadow .15s; display: grid; place-items: center;
}
.num:active { transform: scale(.92); }
.num.disponivel { background: var(--verde); }
.num.reservado { background: var(--amarelo); cursor: not-allowed; }
.num.pago { background: var(--vermelho); cursor: not-allowed; }
.num.selecionado { outline: 3px solid var(--rosa-escuro); outline-offset: 1px; box-shadow: 0 0 0 4px var(--rosa-claro); transform: scale(1.04); }
.grade-mini .num { font-size: .8rem; border-radius: 7px; }
/* No painel admin, qualquer número é clicável (para liberar) */
.grade.admin .num.reservado, .grade.admin .num.pago { cursor: pointer; }

/* ---------- Barra de seleção fixa ---------- */
.selecao-bar {
  position: sticky; bottom: 0; z-index: 50; background: #fff; border-top: 2px solid var(--rosa);
  box-shadow: 0 -4px 18px rgba(209,87,122,.15); padding: .8rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.selecao-info { display: flex; gap: .8rem 1.2rem; flex-wrap: wrap; align-items: center; font-size: .9rem; }
.sel-numeros { color: var(--texto-suave); font-size: .82rem; max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-total strong { color: var(--rosa-escuro); }

/* ---------- Rodapé ---------- */
.rodape { text-align: center; padding: 2.5rem 1.2rem; color: var(--texto-suave); font-size: .85rem; }
.link-admin { background: none; border: none; color: var(--texto-suave); cursor: pointer; font-size: .78rem; text-decoration: underline; opacity: .6; margin-top: .5rem; }
.link-admin:hover { opacity: 1; color: var(--rosa-escuro); }

/* ---------- Modais ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(74,59,66,.55); display: grid; place-items: center; padding: 1rem; z-index: 100; overflow-y: auto; }
.modal { background: var(--creme); border-radius: var(--radius); padding: 1.6rem; width: 100%; max-width: 480px; position: relative; box-shadow: var(--sombra); margin: auto; }
.modal-sm { max-width: 400px; }
.modal-x { position: absolute; top: .7rem; right: .8rem; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--texto-suave); line-height: 1; }
.modal h3 { color: var(--rosa-escuro); }
.modal-sub { color: var(--texto-suave); font-size: .9rem; margin-top: -.2rem; }

form label { display: block; font-size: .88rem; font-weight: 600; margin: .7rem 0 .2rem; }
form label.inline { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
input, textarea, select { width: 100%; padding: .6rem .7rem; border: 1.5px solid var(--cinza-borda); border-radius: 10px; font: inherit; background: #fff; }
input[type=checkbox] { width: auto; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--cinza-borda); border-radius: 12px; margin: .8rem 0; padding: .6rem .9rem 1rem; }
legend { font-weight: 700; color: var(--rosa-escuro); padding: 0 .4rem; }

.resumo-sel { background: var(--rosa-claro); border-radius: 12px; padding: .8rem; margin: .6rem 0; }
.resumo-total { display: block; margin-top: .4rem; }
.chips span, .chips .chip { display: inline-block; background: #fff; border: 1px solid var(--rosa); color: var(--rosa-escuro); border-radius: 8px; padding: .15rem .5rem; margin: .15rem; font-weight: 700; font-size: .85rem; }

.pix-box { margin-top: 1rem; border-top: 1px dashed var(--cinza-borda); padding-top: 1rem; }
.pix-box h4 { color: var(--rosa-escuro); }
.pix-qr { width: 180px; margin: .5rem auto; border-radius: 10px; }
.pix-agradece { display: block; width: 100%; max-width: 360px; height: auto; margin: 1rem auto 0; }
.pix-linha { margin: .3rem 0; word-break: break-all; font-size: .9rem; }

/* ---------- Painel admin ---------- */
.painel { background: var(--creme); border-radius: var(--radius); width: 100%; max-width: 820px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--sombra); margin: auto; }
.painel-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; background: var(--rosa-escuro); color: #fff; }
.painel-top h3 { margin: 0; color: #fff; font-size: 1.1rem; }
.painel-top-acoes { display: flex; align-items: center; gap: .6rem; }
.painel-top .modal-x { position: static; color: #fff; }
.abas { display: flex; gap: .2rem; padding: .5rem .6rem 0; background: #fff; overflow-x: auto; border-bottom: 1px solid var(--cinza-borda); }
.aba { background: none; border: none; padding: .6rem .8rem; cursor: pointer; font: inherit; font-weight: 600; color: var(--texto-suave); border-bottom: 3px solid transparent; white-space: nowrap; }
.aba.ativa { color: var(--rosa-escuro); border-bottom-color: var(--rosa-escuro); }
.painel-corpo { padding: 1.2rem; overflow-y: auto; }
.aba-conteudo { display: none; }
.aba-conteudo.ativa { display: block; }

.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.dash-card { background: #fff; border: 1px solid var(--cinza-borda); border-radius: 12px; padding: 1rem; text-align: center; }
.dash-card strong { display: block; font-size: 1.6rem; color: var(--rosa-escuro); }
.dash-card span { color: var(--texto-suave); font-size: .82rem; }

.cad-resumo { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; background: var(--rosa-claro); border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; font-size: .9rem; }

.busca-box { margin-bottom: 1rem; }
.lista-part { display: flex; flex-direction: column; gap: .7rem; }
.part-card { background: #fff; border: 1px solid var(--cinza-borda); border-radius: 12px; padding: .9rem; }
.part-head { display: flex; justify-content: space-between; align-items: start; gap: .5rem; flex-wrap: wrap; }
.part-nome { font-weight: 700; }
.part-tel { color: var(--texto-suave); font-size: .85rem; }
.part-nums { margin: .5rem 0; }
.badge { font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.badge-aguardando { background: var(--amarelo-bg); color: #9a6a00; }
.badge-pago { background: var(--verde-bg); color: var(--verde); }
.badge-cancelado { background: #eee; color: #888; }
.part-acoes { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }

.lista-hist { display: flex; flex-direction: column; gap: .5rem; font-size: .85rem; }
.hist-item { background: #fff; border: 1px solid var(--cinza-borda); border-radius: 10px; padding: .6rem .8rem; }
.hist-item .hist-acao { font-weight: 700; color: var(--rosa-escuro); }
.hist-item .hist-data { color: var(--texto-suave); font-size: .78rem; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--texto); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; z-index: 200; font-size: .9rem; box-shadow: var(--sombra); }

/* ---------- Popup "Compre minha rifa" ---------- */
.popup-overlay {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center; padding: 1.2rem;
  background: rgba(74, 59, 66, .45);
  backdrop-filter: blur(2px);
  animation: popup-fade .25s ease;
}
.popup-compre {
  position: relative;
  background: var(--creme);
  border: 2px solid var(--rosa);
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: .6rem;
  width: auto;
  max-width: min(92vw, 420px);
  max-height: 88vh;
  animation: popup-pop .3s cubic-bezier(.2, .8, .3, 1.2);
}
.popup-compre img {
  display: block;
  width: 100%; height: auto;
  max-height: calc(88vh - 1.2rem);
  object-fit: contain;
  border-radius: calc(var(--radius) - 6px);
}
.popup-x {
  position: absolute; top: -12px; right: -12px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: #fff; color: var(--rosa-escuro);
  border: 2px solid var(--rosa);
  border-radius: 999px;
  font-size: 1rem; line-height: 1; cursor: pointer;
  box-shadow: var(--sombra);
  transition: transform .15s ease, background .15s ease;
}
.popup-x:hover { transform: scale(1.08); background: var(--rosa-claro); }

@keyframes popup-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes popup-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .popup-overlay, .popup-compre { animation: none; }
}

/* ---------- Responsivo ---------- */
@media (min-width: 720px) {
  .hero-inner { grid-template-columns: 1.3fr 1fr; }
  .hero-text h1 { font-size: 2.6rem; }
  .info-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .grade { grid-template-columns: repeat(10, 1fr); max-width: 640px; }
  .grade-mini { grid-template-columns: repeat(10, 1fr); }
  .dash-grid { grid-template-columns: repeat(4, 1fr); }
  .prof-destaque { flex-direction: row; text-align: left; gap: 1.8rem; padding: 1.8rem 2rem; }
  .prof-info { align-items: flex-start; }
  .prof-foto { width: 160px; height: 160px; }
}
