/* ==========================================================================
   Intranet Marillac — tela inicial: banners e aniversariantes
   ========================================================================== */

/* ---------- Carrossel de banners ---------- */
.bn {
  position: relative; overflow: hidden; border-radius: 18px; background: var(--navy-900);
  box-shadow: 0 18px 40px -24px rgba(16, 27, 82, .55); aspect-ratio: 16 / 5;
}
.bn-trilho, .bn-slide { position: absolute; inset: 0; margin: 0; }
.bn-slide { opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s linear .7s; }
.bn-slide.ativo { opacity: 1; visibility: visible; transition: opacity .7s var(--ease); }
.bn-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-slide.ativo img { animation: bn-zoom 9s ease-out both; }
@keyframes bn-zoom { from { transform: scale(1.04); } to { transform: scale(1); } }

.bn-seta, .bn-editar, .bn-play {
  position: absolute; z-index: 2; display: grid; place-items: center; border: 0; cursor: pointer; color: #fff;
  background: rgba(11, 20, 64, .45); backdrop-filter: blur(6px); transition: background .2s, opacity .25s, transform .2s var(--ease);
}
.bn-seta { top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; opacity: 0; }
.bn-seta.ant { left: 14px; } .bn-seta.prox { right: 14px; }
.bn:hover .bn-seta, .bn:focus-within .bn-seta { opacity: 1; }
.bn-seta:hover, .bn-editar:hover, .bn-play:hover { background: rgba(11, 20, 64, .75); }
.bn-editar { top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 12px; }
.bn-editar:hover { transform: scale(1.06); }
.bn-seta:focus-visible, .bn-editar:focus-visible, .bn-play:focus-visible, .bn-ponto:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.bn-pontos { position: absolute; z-index: 2; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 4px; }
.bn-ponto { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.bn-ponto::before { content: ''; width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .55); transition: width .3s var(--ease), background .3s; }
.bn-ponto[aria-current="true"]::before { width: 22px; background: #fff; }

/* anel de contagem (como no exemplo): mostra quanto falta para trocar e serve de pausar/retomar */
.bn-play { right: 14px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; }
.bn-play > svg { position: absolute; inset: 4px; width: 36px; height: 36px; transform: rotate(-90deg); }
.bn-play circle { fill: none; stroke-width: 3; }
.bn-anel-fundo { stroke: rgba(255, 255, 255, .25); }
.bn-anel { stroke: var(--orange-500, #E8622C); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.bn.contando .bn-anel { animation: bn-anel var(--bn-tempo) linear forwards; }
@keyframes bn-anel { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.bn-play-ic { position: relative; display: grid; place-items: center; }

.bn-vazio {
  width: 100%; aspect-ratio: 16 / 4; min-height: 150px; display: grid; place-content: center; justify-items: center; gap: 6px;
  border: 2px dashed var(--line-2, #C9D0E0); border-radius: 18px; background: var(--surface-2); color: var(--tx-forte); cursor: pointer;
  font: inherit; text-align: center; padding: 20px; transition: border-color .2s, background .2s;
}
.bn-vazio:hover { border-color: var(--navy-500); background: var(--blue-50); }
.bn-vazio strong { font-size: 16px; } .bn-vazio span { font-size: 13px; color: var(--muted); max-width: 440px; }

/* ---------- Modal "Gerenciar banners" ---------- */
.bn-novo { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.bn-novo h3, .bn-divisor { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tx-titulo); }
.bn-novo h3 { margin: 0 0 12px; }
.bn-novo-linha { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.bn-novo-nome { margin: 0; }
.bn-sel { cursor: pointer; gap: 6px; }
#bn-arq:focus-visible + .bn-sel, .bn-sel:focus-within { outline: 3px solid var(--navy-500); outline-offset: 2px; }
.bn-previa { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.bn-previa img { width: 200px; aspect-ratio: 16 / 5; object-fit: cover; border-radius: 8px; box-shadow: var(--sombra-sm); }
.bn-previa div { display: grid; gap: 3px; font-size: 13px; min-width: 0; }
.bn-previa strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-previa span { color: var(--muted); }
.bn-aviso { display: inline-flex; gap: 6px; align-items: center; color: var(--s-na, #B45309) !important; }
.bn-divisor { display: flex; align-items: center; gap: 14px; margin: 22px 0 12px; color: var(--muted); }
.bn-divisor::before, .bn-divisor::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.bn-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bn-lista-vazia { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.bn-item {
  display: grid; grid-template-columns: auto 132px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: box-shadow .2s, opacity .2s, border-color .2s;
}
.bn-item:hover { box-shadow: var(--sombra-sm); }
.bn-item.arrastando { opacity: .5; border-style: dashed; border-color: var(--navy-500); }
.bn-item.inativo .bn-mini { filter: grayscale(.85); opacity: .65; }
.bn-alca { color: var(--muted); cursor: grab; display: grid; place-items: center; padding: 6px 2px; }
.bn-mini { width: 132px; aspect-ratio: 16 / 5; object-fit: cover; border-radius: 6px; background: var(--trilho); }
.bn-info { display: grid; gap: 3px; min-width: 0; }
.bn-info strong { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-info span { font-size: 12px; color: var(--muted); }
.bn-renome { height: 38px; }
.bn-acoes { display: flex; align-items: center; gap: 4px; }
.bn-lixo { color: var(--s-abaixo, #BE123C); }
.bn-chave {
  position: relative; width: 44px; height: 26px; margin: 0 6px; border: 0; padding: 0; border-radius: 99px; cursor: pointer;
  background: #C4CAD8; transition: background .2s;
}
.bn-chave i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease-mola, ease); }
.bn-chave[aria-checked="true"] { background: #15803D; }
.bn-chave[aria-checked="true"] i { transform: translateX(18px); }
.bn-chave:focus-visible { outline: 3px solid var(--navy-500); outline-offset: 2px; }

/* ---------- Aniversariantes ---------- */
.an-bloco { overflow: hidden; }
.an-carregando { min-height: 160px; }
.an-cab { align-items: center; flex-wrap: wrap; gap: 12px; }
.an-cab h2 { display: flex; align-items: center; gap: 10px; }
.an-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #FEF3E2; color: var(--orange-500, #E8622C); }
.an-ctrl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.an-segs { display: flex; flex-wrap: wrap; gap: 6px; margin-right: 6px; }
.an-seg {
  min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.an-seg:hover { border-color: var(--navy-500); }
.an-seg[aria-pressed="true"] { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.an-faixa {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px;
  padding: 6px 20px 20px; scrollbar-width: thin;
}
.an-faixa:focus-visible { outline: 3px solid var(--navy-500); outline-offset: -3px; }
.an-vazio { padding: 10px 0; }
.an-card {
  flex: 0 0 300px; scroll-snap-align: start; display: flex; gap: 14px; align-items: center; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: inherit; text-decoration: none;
  box-shadow: var(--sombra-sm); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
  animation: card-entra .45s var(--ease) backwards; animation-delay: calc(var(--i) * 30ms);
}
.an-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(27, 42, 107, .45); border-color: #C9D3EC; }
.an-card:focus-visible { outline: 3px solid var(--navy-500); outline-offset: 2px; }
.an-foto {
  position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--blue-50); color: var(--tx-forte); font-weight: 800; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--navy-700);
}
.an-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.an-txt { display: grid; gap: 2px; min-width: 0; }
.an-txt strong { font-size: 14px; color: var(--tx-titulo); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.an-txt small { font-size: 12px; color: var(--muted); }
.an-quando { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.an-card.fut .an-quando { color: var(--tx-forte); }
.an-card.pas .an-quando { color: var(--s-abaixo, #BE123C); }
.an-card.hoje { border-color: #F3B98F; background: linear-gradient(135deg, #FFF7EF, var(--surface) 60%); }
.an-card.hoje .an-foto { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--orange-500, #E8622C); }
.an-card.hoje .an-quando { color: var(--orange-500, #E8622C); }
.an-card.hoje .an-quando .ic { animation: an-pulo 1.4s ease-in-out infinite; }
@keyframes an-pulo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

@media (max-width: 760px) {
  .bn { border-radius: 14px; }
  .bn-seta, [data-an] { display: none; }
  .bn-editar { top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 10px; }
  .bn-play { right: 8px; bottom: 6px; }
  .bn-pontos { bottom: 4px; }
  .bn-novo-linha { grid-template-columns: 1fr 1fr; }
  .bn-novo-nome { grid-column: 1 / -1; }
  .bn-item { grid-template-columns: auto 1fr; }
  .bn-mini { width: 100%; grid-column: 2; }
  .bn-info, .bn-acoes { grid-column: 1 / -1; }
  .bn-acoes { justify-content: flex-end; }
  .an-card { flex-basis: 260px; }
  .an-ctrl { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bn-slide, .bn-slide.ativo { transition: none; }
  .bn-slide.ativo img, .an-card, .an-card.hoje .an-quando .ic { animation: none; }
  .bn.contando .bn-anel { animation: none; }
}
