/* =====================================================================
   Confraternização FMB 2026 — componentes
   Linha do tempo · galeria · lightbox · câmera · admin
   ===================================================================== */

/* ================================================== LINHA DO TEMPO ===== */

.agora-faixa {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: linear-gradient(100deg, rgba(232,179,101,.18), rgba(45,212,191,.12));
  border: 1px solid rgba(232,179,101,.36);
  box-shadow: var(--sombra-sm);
}
.agora-faixa.intervalo { background: rgba(255,255,255,.07); border-color: var(--linha); }
.agora-faixa .marca-icone { background: rgba(232,179,101,.22); border-color: rgba(232,179,101,.4); }

.contagem {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--sun-gold);
}

/* abas de dia */
.abas-dia {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.abas-dia::-webkit-scrollbar { display: none; }

.aba-dia {
  flex: none;
  display: flex; flex-direction: column; align-items: center;
  gap: 1px;
  min-width: 74px;
  padding: 9px 13px;
  border-radius: 15px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--linha);
  color: var(--txt-soft);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s, border-color .18s, color .18s;
  -webkit-tap-highlight-color: transparent;
}
.aba-dia b { font-size: 16px; letter-spacing: 0; text-transform: none; font-weight: 700; }
.aba-dia:hover { background: rgba(255,255,255,.1); color: var(--txt); }
.aba-dia[aria-selected="true"] {
  background: rgba(232,179,101,.18);
  border-color: rgba(232,179,101,.6);
  color: #fde6ba;
}
.aba-dia .hoje-marca {
  font-size: 9px; letter-spacing: .1em;
  color: var(--seafoam);
}

/* trilho */
.trilho { position: relative; padding-left: 38px; }
.trilho::before {
  content: '';
  position: absolute;
  left: 15px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom,
    rgba(232,179,101,.45), rgba(45,212,191,.3), rgba(255,255,255,.08));
  border-radius: 2px;
}

.evento { position: relative; margin-bottom: 12px; }

.evento-bolha {
  position: absolute;
  left: -38px; top: 14px;
  width: 32px; height: 32px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--ocean-mid);
  border: 2px solid rgba(255,255,255,.16);
  color: var(--txt-soft);
  z-index: 1;
  transition: all .25s;
}
.evento-bolha .ic { width: 15px; height: 15px; }

.evento-corpo {
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: rgba(7,25,40,.5);
  border: 1px solid var(--linha);
  transition: border-color .25s, background .25s, transform .25s;
}

.evento-hora {
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: var(--sun-gold);
}
.evento-titulo { font-size: 15.5px; font-weight: 600; margin: 2px 0 0; }
.evento-local {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 5px;
  font-size: 12px; color: var(--txt-dim);
}
.evento-desc { margin: 7px 0 0; font-size: 13px; color: var(--txt-soft); }

/* estados */
.evento.encerrado .evento-corpo { opacity: .45; }
.evento.encerrado .evento-bolha { opacity: .45; }
.evento.encerrado .evento-titulo { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }

.evento.agora .evento-corpo {
  background: linear-gradient(100deg, rgba(232,179,101,.17), rgba(45,212,191,.1));
  border-color: rgba(232,179,101,.55);
  box-shadow: 0 12px 34px -16px rgba(232,179,101,.6);
  transform: translateX(2px);
}
.evento.agora .evento-bolha {
  background: var(--sun-gold);
  border-color: rgba(232,179,101,.45);
  color: #0a1a26;
  box-shadow: 0 0 0 5px rgba(232,179,101,.17);
  animation: bolhaPulsa 2.4s ease-in-out infinite;
}
@keyframes bolhaPulsa {
  0%, 100% { box-shadow: 0 0 0 5px rgba(232,179,101,.17); }
  50%      { box-shadow: 0 0 0 9px rgba(232,179,101,.05); }
}
.evento.agora .evento-hora { color: var(--sun-light); }

.evento.proximo .evento-corpo { border-color: rgba(45,212,191,.42); }
.evento.proximo .evento-bolha { border-color: rgba(45,212,191,.5); color: var(--seafoam); }

.selo-estado {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  white-space: nowrap;
}
.selo-agora   { background: rgba(232,179,101,.26); color: #fde6ba; }
.selo-proximo { background: rgba(45,212,191,.2);   color: #a7f3eb; }
.selo-destaque{ background: rgba(255,255,255,.1);  color: var(--txt-soft); }

/* ========================================================= GALERIA ===== */

.grade-fotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 6px;
}
@media (min-width: 560px) { .grade-fotos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } }
@media (min-width: 900px) { .grade-fotos { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; } }

.foto-celula {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  overflow: hidden;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.foto-celula img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease, opacity .3s;
  opacity: 0;
}
.foto-celula img.carregada { opacity: 1; }
.foto-celula:hover img { transform: scale(1.06); }

.foto-selo {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 8px 7px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: linear-gradient(to top, rgba(4,14,22,.88), transparent);
  font-size: 10.5px; font-weight: 600;
  color: rgba(255,255,255,.9);
  pointer-events: none;
}
.foto-selo .autor { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foto-metricas { display: flex; gap: 8px; flex: none; }
.foto-metricas span { display: inline-flex; align-items: center; gap: 3px; }
.foto-metricas .ic-p { width: 12px; height: 12px; }
.foto-metricas .curtida-sim { color: #ff8a8a; }

.esqueleto {
  background: linear-gradient(100deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.11) 50%, rgba(255,255,255,.05) 70%);
  background-size: 200% 100%;
  animation: brilhar 1.4s linear infinite;
}

/* ======================================================== LIGHTBOX ===== */

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: none;
  flex-direction: column;
  background: rgba(3, 11, 18, .97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox.aberto { display: flex; }

.lb-topo {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  border-bottom: 1px solid var(--linha);
  flex: none;
}

.lb-palco {
  flex: 1;
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
  min-height: 0;
  touch-action: pan-y pinch-zoom;
}
.lb-palco img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-seta {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(7,25,40,.72);
  border: 1px solid var(--linha-forte);
  color: var(--txt);
  cursor: pointer;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.lb-seta:disabled { opacity: .25; cursor: default; }
.lb-seta.esq { left: 10px; }
.lb-seta.dir { right: 10px; }
@media (max-width: 620px) { .lb-seta { display: none; } }

.lb-base {
  flex: none;
  max-height: 46dvh;
  overflow-y: auto;
  border-top: 1px solid var(--linha);
  background: rgba(7,25,40,.82);
  padding: 13px 14px calc(13px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}

.lb-acoes { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }

.btn-curtir {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--linha);
  color: var(--txt-soft);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: all .18s;
}
.btn-curtir.curtido {
  background: rgba(255,120,120,.18);
  border-color: rgba(255,120,120,.42);
  color: #ff9a9a;
}
.btn-curtir.curtido .ic { fill: currentColor; }
.btn-curtir:active { transform: scale(.94); }

/* comentários */
.comentario { display: flex; gap: 9px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.07); }
.comentario:first-of-type { border-top: 0; }
.coment-corpo { flex: 1; min-width: 0; }
.coment-topo { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.coment-nome { font-size: 13px; font-weight: 600; }
.coment-quando { font-size: 11px; color: var(--txt-dim); }
.coment-texto { margin: 2px 0 0; font-size: 13.5px; color: var(--txt-soft); overflow-wrap: anywhere; }
.coment-apagar {
  background: none; border: 0; padding: 3px; cursor: pointer;
  color: var(--txt-dim); flex: none; border-radius: 6px;
}
.coment-apagar:hover { color: #ff9a9a; background: rgba(255,120,120,.12); }

.coment-form { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.coment-form .entrada { padding: 10px 13px; font-size: 16px; border-radius: 13px; }

/* ========================================================== CÂMERA ===== */

.camera-palco {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 62dvh;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #04101a;
  border: 1px solid var(--linha);
}
@media (min-width: 700px) { .camera-palco { aspect-ratio: 4 / 3; } }

.camera-palco video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  background: #04101a;
}
.camera-palco video.espelhado { transform: scaleX(-1); }

.camera-controles {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(4,14,22,.86), transparent);
}

.disparador {
  width: 68px; height: 68px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  border: 4px solid rgba(255,255,255,.45);
  cursor: pointer;
  transition: transform .12s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 6px 24px -6px rgba(0,0,0,.6);
}
.disparador:active { transform: scale(.9); }
.disparador:disabled { opacity: .4; cursor: not-allowed; }

.camera-btn {
  width: 46px; height: 46px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(7,25,40,.72);
  border: 1px solid var(--linha-forte);
  color: var(--txt);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.camera-btn:active { transform: scale(.92); }

.flash-tela {
  position: absolute; inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.flash-tela.dispara { animation: flashear .32s ease-out; }
@keyframes flashear { 0% { opacity: .85; } 100% { opacity: 0; } }

/* fila de envio */
.fila { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }

.fila-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--linha);
}
.fila-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fila-capa {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(4,14,22,.68);
  font-size: 11px; font-weight: 700;
  color: var(--txt);
}
.fila-item.ok .fila-capa    { background: rgba(45,212,191,.42); color: #04202a; }
.fila-item.erro .fila-capa  { background: rgba(220,80,80,.5); color: #fff; }
.fila-item.pronto .fila-capa{ display: none; }

.fila-remover {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(4,14,22,.82);
  border: 1px solid var(--linha-forte);
  color: var(--txt);
  cursor: pointer;
  padding: 0;
}
.fila-remover .ic-p { width: 11px; height: 11px; }

.anel {
  width: 26px; height: 26px;
  border-radius: 999px;
  border: 2.5px solid rgba(255,255,255,.25);
  border-top-color: var(--sun-gold);
  animation: girar .7s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ===================================================== INFORMATIVOS ==== */

.bloco-info { display: flex; gap: 13px; padding: 16px; }
.bloco-icone {
  width: 40px; height: 40px; flex: none;
  border-radius: 13px;
  display: grid; place-items: center;
  background: rgba(45,212,191,.14);
  border: 1px solid rgba(45,212,191,.28);
  color: var(--seafoam);
}
.bloco-info:nth-child(even) .bloco-icone {
  background: rgba(232,179,101,.14);
  border-color: rgba(232,179,101,.3);
  color: var(--sun-gold);
}
.bloco-conteudo { flex: 1; min-width: 0; }
.bloco-conteudo h3 { font-size: 15px; font-weight: 600; margin: 0 0 5px; }
.bloco-conteudo p { margin: 0 0 8px; font-size: 13.5px; color: var(--txt-soft); }
.bloco-conteudo p:last-child { margin-bottom: 0; }

.mapa-caixa {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--linha);
  background: rgba(0,0,0,.3);
}
.mapa-caixa iframe { display: block; width: 100%; height: 230px; border: 0; }

/* =========================================================== ADMIN ===== */

.admin-grade {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: 10px;
}

.kpi { padding: 15px; border-radius: var(--r-md); background: rgba(7,25,40,.52); border: 1px solid var(--linha); }
.kpi-valor { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--sun-gold); }
.kpi-rotulo { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--txt-dim); margin-top: 4px; }

.tabela-rolagem { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-md); }

table.dados { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
table.dados th, table.dados td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
table.dados th {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: var(--txt-dim); background: rgba(0,0,0,.26); white-space: nowrap;
}
table.dados tr:last-child td { border-bottom: 0; }
table.dados tbody tr:hover { background: rgba(255,255,255,.04); }
table.dados td.acoes { white-space: nowrap; text-align: right; }

.selo {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
}
.selo-admin { background: rgba(0,100,69,.34); color: #8fdcbb; }
.selo-colab { background: rgba(255,255,255,.1); color: var(--txt-soft); }
.selo-ativo { background: rgba(45,212,191,.2); color: #a7f3eb; }
.selo-inativo { background: rgba(220,80,80,.2); color: #ffb3b3; }

.admin-abas { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.admin-abas::-webkit-scrollbar { display: none; }
.admin-aba {
  flex: none; padding: 8px 14px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid var(--linha);
  color: var(--txt-soft); font-size: 13px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.admin-aba:hover { background: rgba(255,255,255,.1); color: var(--txt); }
.admin-aba.ativo { background: rgba(232,179,101,.18); border-color: rgba(232,179,101,.55); color: #fde6ba; }

/* modal */
.modal {
  position: fixed; inset: 0; z-index: 250;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(3,11,18,.84);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal.aberto { display: flex; }
.modal-caixa {
  width: 100%; max-width: 480px;
  max-height: 88dvh; overflow-y: auto;
  padding: 20px;
  border-radius: var(--r-xl);
  background: rgba(10, 28, 42, .98);
  border: 1px solid var(--linha-forte);
  box-shadow: var(--sombra);
}

/* selo de GPS na fila de envio */
.fila-gps {
  position: absolute; left: 4px; bottom: 4px;
  width: 20px; height: 20px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(45,212,191,.85);
  color: #04202a;
}
.fila-gps svg { width: 11px; height: 11px; }
