/* Painel administrativo */
.adm-login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: linear-gradient(90deg, var(--deep) 50%, var(--sky) 50%); }
.adm-login__caixa { width: min(420px, 100%); background: var(--white); border-radius: 22px; padding: 30px 28px; display: grid; gap: 14px; box-shadow: 0 30px 70px rgba(8, 38, 92, .45); }
.adm-login__caixa h1 { color: var(--deep); font-size: 1.700rem; margin-top: 6px; }
.adm-login__dica { padding: 10px 14px; background: var(--tint); border-radius: 10px; font-size: .92rem; }
.adm-login__dica code { font: 700 .95rem var(--body); }
.adm-login__voltar { text-align: center; font-weight: 600; }
.adm-erro { color: #A61B1B; font-weight: 600; }

.adm { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100dvh; background: #F5F9FE; }
.adm__lado { position: sticky; top: 0; height: 100dvh; background: var(--deep); color: var(--white); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.adm__lado .logo { color: var(--white); padding: 0 8px; }
.adm__lado .logo__mark path:nth-child(1) { fill: var(--white); }
.adm__lado :focus-visible { outline-color: var(--yellow); }
.adm__nav { display: grid; gap: 3px; }
.adm__nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; color: var(--white); text-decoration: none; font-weight: 500; white-space: nowrap; }
.adm__nav a:hover { background: rgba(255, 255, 255, .12); }
.adm__nav a[aria-current] { background: var(--yellow); color: var(--ink); font-weight: 700; }
.adm__selo { min-width: 24px; padding: 0 7px; text-align: center; border-radius: 12px; background: var(--white); color: var(--deep); font-size: .82rem; font-weight: 800; }
.adm__rodape { margin-top: auto; display: grid; gap: 4px; }
.adm__rodape a, .adm__rodape button { background: none; border: 0; color: var(--white); text-align: left; padding: 8px 12px; font-weight: 500; cursor: pointer; text-decoration: none; border-radius: 10px; font-size: .96rem; }
.adm__rodape a:hover, .adm__rodape button:hover { background: rgba(255, 255, 255, .12); }

.adm__main { padding: clamp(18px, 3vw, 36px); min-width: 0; max-width: 1120px; }
.adm__cab { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 22px; }
.adm__cab h1 { color: var(--deep); font-size: clamp(1.700rem, 3vw, 2.200rem); }
.adm__cab p { color: var(--soft); margin-top: 4px; }
.adm__acoes { display: flex; flex-wrap: wrap; gap: 8px; }

.painel { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: clamp(16px, 2.200vw, 24px); margin-bottom: 16px; }
.painel h2 { font-size: 1.250rem; color: var(--deep); margin-bottom: 14px; font-weight: 700; }
.painel__nota { color: var(--soft); font-size: .95rem; margin: -8px 0 14px; }
.grade2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grade3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pilha { display: grid; gap: 14px; }
.campo textarea { min-height: 110px; resize: vertical; }
.linha-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.numero { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: inherit; }
.numero b { display: block; font: 800 2rem/1.100 var(--display); color: var(--deep); }
.numero--alerta { background: var(--yellow); border-color: var(--yellow); }
.numero--alerta b { color: var(--ink); }

/* Itens de lista */
.item { display: grid; gap: 14px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); margin-bottom: 10px; }
.item__ord { display: grid; gap: 4px; }
.ico-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--deep); cursor: pointer; font-weight: 700; }
.ico-btn:hover { background: var(--tint); }
.ico-btn[disabled] { opacity: .35; cursor: default; }
.ico-btn--perigo { color: #A61B1B; }
.img-pick { position: relative; display: grid; place-items: center; overflow: hidden; border: 2px dashed #9db7d6; border-radius: 12px; background: var(--tint); cursor: pointer; text-align: center; font-size: .85rem; font-weight: 600; color: var(--deep); padding: 6px; }
.img-pick:hover { border-color: var(--deep); }
.img-pick:focus-within { outline: 3px solid var(--sky); }
.img-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.img-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-pick--banner { aspect-ratio: 3 / 1; }
.img-pick--mobile { aspect-ratio: 4 / 5; width: 100%; }
.img-pick--foto { width: 84px; height: 84px; border-radius: 50%; }
.banner-mini { display: block; width: 100%; height: 100%; text-align: left; position: relative; aspect-ratio: 3 / 1; border-radius: 10px; overflow: hidden; pointer-events: none; }
.banner-mini__in { display: block; position: absolute; left: 0; top: 0; width: 1200px; height: 400px; transform-origin: 0 0; container-type: inline-size; }
.banner-cols { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px; align-items: start; }
.banner-col { display: grid; gap: 4px; min-width: 0; align-content: start; }
.banner-col__nome { font-weight: 700; font-size: .92rem; }
.banner-col small { color: var(--soft); font-size: .86rem; }
.banner-novo { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; align-items: start; }
.img-pick--vertical { aspect-ratio: 4 / 5; width: 100%; }
.dlg--largo { width: min(760px, 100% - 24px); }
.interruptor { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.interruptor input { width: 22px; height: 22px; accent-color: var(--deep); }
.dir-linha { grid-template-columns: auto auto minmax(0, 1fr) auto; }

/* Eventos no admin */
.ev-linha { display: grid; grid-template-columns: 84px minmax(0, 1fr) 220px auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); margin-bottom: 10px; }
.ev-linha__data { text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--deep); color: var(--white); line-height: 1.150; }
.ev-linha__data b { display: block; font: 800 1.150rem var(--display); }
.ev-linha__data span { font-size: .78rem; font-weight: 600; }
.ev-linha strong { font: 700 1.100rem/1.200 var(--display); display: block; }
.ev-linha small { color: var(--soft); font-size: .92rem; }
.ev-linha .campo span { font-size: .82rem; }
.ev-linha .campo select { min-height: 42px; padding: 6px 10px; }
.status-open select { background: var(--yellow); border-color: var(--yellow); font-weight: 700; }
.lote-linha { display: grid; grid-template-columns: 1.300fr 1fr 1fr .8fr auto; gap: 10px; align-items: end; padding-block: 10px; border-bottom: 1px solid var(--line); }
.campo-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: end; padding-block: 10px; border-bottom: 1px solid var(--line); }

/* Inscrições */
.filtros-adm { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; align-items: end; }
.filtros-adm .campo { min-width: min(280px, 100%); }
.insc-tab { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: .98rem; }
.insc-tab th, .insc-tab td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.insc-tab th { font-size: .88rem; color: var(--soft); background: var(--tint); }
.insc-tab tr:last-child td { border-bottom: 0; }
.insc-tab small { display: block; color: var(--soft); font-size: .88rem; }
.etq { display: inline-block; padding: 2px 10px; border-radius: 8px; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.etq--pending { background: var(--yellow); color: var(--ink); }
.etq--confirmed { background: var(--deep); color: var(--white); }
.etq--rejected { background: #F8DEDE; color: #A61B1B; }
.det { display: grid; gap: 14px; padding: 20px 22px; overflow-y: auto; }
.det dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; }
.det dt { color: var(--soft); font-size: .93rem; }
.det dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.det__prova { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 420px; }
.det__prova img { width: 100%; height: 100%; max-height: 420px; object-fit: contain; background: var(--tint); }
.mini-mapa { height: 300px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); z-index: 0; }

@media (max-width: 900px) {
  .adm { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .adm__lado { position: sticky; top: 0; z-index: 1000; height: auto; min-width: 0; padding: 10px 12px; gap: 8px; overflow: visible; }
  .adm__lado .logo__txt small { display: none; }
  .adm__nav { display: flex; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .adm__rodape { display: none; }
  .numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-linha { grid-template-columns: 72px minmax(0, 1fr); }
  .ev-linha .campo, .ev-linha .linha-acoes { grid-column: 1 / -1; }
  .lote-linha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lote-linha > :first-child { grid-column: 1 / -1; }
  .grade3 { grid-template-columns: minmax(0, 1fr); }
  .insc-tab thead { display: none; }
  .insc-tab, .insc-tab tbody, .insc-tab tr, .insc-tab td { display: block; width: 100%; }
  .insc-tab tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .insc-tab td { padding: 3px 0; border: 0; }
}
@media (max-width: 560px) {
  .grade2 { grid-template-columns: 1fr; }
  .item { grid-template-columns: minmax(0, 1fr); }
  .item__ord { display: flex; }
  .dir-linha { grid-template-columns: auto minmax(0, 1fr); }
  .dir-linha .item__ord, .dir-linha > :last-child { grid-column: 1 / -1; }
  .dir-linha .pilha { grid-column: 1 / -1; }
}

.adm-login__link { background: none; border: 0; padding: 4px; color: var(--deep); font-weight: 600; text-decoration: underline; cursor: pointer; }

.campos-fixos { list-style: none; margin: 0 0 20px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.campos-fixos li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding: 11px 14px; background: var(--tint); border-bottom: 1px solid var(--line); font-weight: 600; }
.campos-fixos li:last-child { border-bottom: 0; }
.campos-fixos em { font-style: normal; font-weight: 600; font-size: .88rem; color: var(--soft); }
.campos-extras__titulo { font: 700 1.050rem/1.2 var(--display); color: var(--deep); }

.ev-linha__modo { min-height: 42px; display: flex; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--tint); font-weight: 600; }

@media (max-width: 640px) {
  .dlg--largo { width: 100%; }
  .banner-novo { grid-template-columns: minmax(0, 1fr); }
  .img-pick--vertical { width: 160px; }
}

.pdf-paginas { display: grid; gap: 10px; }
.pdf-paginas canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.pdf-acoes { margin-top: 10px; }

/* ---------- Downloads ---------- */
.doc-linha { grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: start; }
.doc-linha textarea { min-height: 64px; }
.doc-trocar { position: relative; overflow: hidden; }
.doc-trocar:focus-within { outline: 3px solid var(--sky); }
.doc-trocar input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.doc-info { margin: 0; }
.doc-pick { min-height: 112px; padding: 16px; font-size: 1rem; overflow-wrap: anywhere; }
.doc-pick small { display: block; margin-top: 4px; font-weight: 500; font-size: .85rem; color: var(--soft); }
@media (max-width: 560px) {
  .doc-linha { grid-template-columns: auto minmax(0, 1fr); }
  .doc-linha .item__ord, .doc-linha > :last-child, .doc-linha .pilha { grid-column: 1 / -1; }
}

/* ---------- Organizações ---------- */
.pedidos { display: grid; gap: 12px; }
.pedido { padding: 16px; border: 1px solid var(--line); border-left: 5px solid var(--yellow); border-radius: 12px; display: grid; gap: 12px; }
.pedido__topo { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
.pedido__topo h3 { color: var(--deep); font-size: 1.15rem; }
.pedido__topo small { color: var(--soft); }
.pedido__dados { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; }
.pedido__dados dt { font-size: .82rem; font-weight: 600; color: var(--soft); }
.pedido__dados dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pedido__end { grid-column: 1 / -1; }
.pedido__acoes { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.pedido__acoes .campo { flex: 1 1 220px; }
.org-tab input, .org-tab select { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font: inherit; color: var(--ink); }
.org-tab small a { color: var(--deep); }
.recusado { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 10px; border-top: 1px solid var(--line); }
.recusado > span { flex: 1 1 220px; }
details.painel summary { cursor: pointer; font-weight: 700; color: var(--deep); }
details.painel[open] summary { margin-bottom: 12px; }
.previa__resumo { margin: 0; }
.previa { display: grid; gap: 6px; }
.previa__linha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px) 118px; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.previa__linha select { width: 100%; min-height: 40px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font: inherit; color: var(--ink); }
.previa__igreja { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; cursor: pointer; }
.previa__igreja input { flex: none; width: 20px; height: 20px; accent-color: var(--deep); }
.previa__selo { font-size: .82rem; font-weight: 700; color: var(--soft); text-align: center; }
.previa__linha--falta { border-color: #A61B1B; background: #FDF1F1; }
.previa__linha--falta .previa__selo { color: #A61B1B; }
.previa__linha--conferir { border-color: var(--yellow); background: #FFF9E5; }
.previa__linha--conferir .previa__selo { color: var(--ink); }
.previa__linha--fora { opacity: .5; background: transparent; border-color: var(--line); }
@media (max-width: 640px) {
  .pedido__dados { grid-template-columns: minmax(0, 1fr); }
  .previa__linha { grid-template-columns: minmax(0, 1fr) auto; }
  .previa__linha select { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Carteirinhas ---------- */
.cart-abas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; border-bottom: 2px solid var(--line); }
.cart-abas a { padding: 10px 14px; text-decoration: none; font-weight: 600; color: var(--ink); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.cart-abas a[aria-current] { color: var(--deep); font-weight: 700; border-bottom-color: var(--yellow); }
.cart-lista { display: grid; gap: 8px; }
.cart-linha { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.cart-linha:hover { border-color: var(--deep); }
.cart-linha--fixa { cursor: default; grid-template-columns: 46px minmax(0, 1fr); }
.cart-linha img { width: 46px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--tint); }
.cart-linha__txt { min-width: 0; }
.cart-linha__txt strong { display: block; overflow-wrap: anywhere; }
.cart-linha__txt small { display: block; color: var(--soft); }
.cart-etqs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.etq-cart { display: inline-block; padding: 3px 10px; border-radius: 14px; font-size: .84rem; font-weight: 700; white-space: nowrap; }
.etq-cart--tipo { background: var(--white); border: 1.5px solid var(--line); }
.etq-cart--pending { background: #FFF4CC; color: #6A4B00; }
.etq-cart--approved { background: var(--tint); color: var(--deep); }
.etq-cart--production { background: var(--deep); color: var(--white); }
.etq-cart--ready { background: #DFF5EA; color: #0B6B45; }
.etq-cart--rejected { background: #FDECEC; color: #A61B1B; }
.cart-info { padding: 10px 14px; background: var(--tint); border-radius: 10px; }
.cart-info--alerta { background: #FFF4CC; }
.cart-det { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.cart-dados { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.cart-dados dt { font-size: .82rem; color: var(--soft); }
.cart-dados dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cart-sub { color: var(--deep); font-size: 1.1rem; }
.cart-prova { display: block; max-width: 100%; max-height: 520px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 640px) {
  .cart-linha { grid-template-columns: 46px minmax(0, 1fr); }
  .cart-etqs { grid-column: 1 / -1; justify-content: flex-start; }
  .cart-det { grid-template-columns: minmax(0, 1fr); }
}
