:root {
    --cor-primaria: #1e5f8a;
    --cor-primaria-escura: #144360;
    --cor-fundo: #f4f6f8;
    --cor-texto: #222;
    --cor-borda: #dde2e6;
    --cor-erro: #b3261e;
    --cor-sucesso: #1e6b3a;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cor-fundo); color: var(--cor-texto); }
a { color: var(--cor-primaria); text-decoration: none; }
h1, h2 { margin-top: 0; }

/* ---------- Login ---------- */
.pagina-login { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--cor-primaria-escura); }
.card-login { background: #fff; padding: 40px; border-radius: 10px; width: 320px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.card-login input { padding: 10px; border: 1px solid var(--cor-borda); border-radius: 6px; }
.card-login button { margin-top: 10px; padding: 12px; background: var(--cor-primaria); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }
.card-login .erro { color: var(--cor-erro); }

/* ---------- Admin ---------- */
.topo-admin { background: var(--cor-primaria-escura); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; flex-wrap: wrap; }
.topo-admin nav a, .topo-admin .usuario { color: #fff; margin-left: 18px; }
.topo-admin .sair { opacity: .85; }
.conteudo-admin { padding: 24px; max-width: 1100px; margin: 0 auto; }
.flash { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.flash-sucesso { background: #e2f5e9; color: var(--cor-sucesso); }
.flash-erro { background: #fbe4e2; color: var(--cor-erro); }

.cabecalho-lista { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.botao { display: inline-block; padding: 10px 16px; border-radius: 6px; border: 1px solid var(--cor-borda); background: #fff; cursor: pointer; }
.botao-primario { background: var(--cor-primaria); color: #fff; border-color: var(--cor-primaria); }

.tabela-lista { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.tabela-lista th, .tabela-lista td { padding: 10px 12px; border-bottom: 1px solid var(--cor-borda); text-align: left; font-size: 14px; }
.tabela-lista th { background: #eef2f5; }
.miniatura { width: 70px; height: 50px; object-fit: cover; border-radius: 4px; }
.miniatura-banner { width: 90px; height: auto; border-radius: 4px; }
.sem-imagem { font-size: 12px; color: #999; }
.badge { padding: 3px 8px; border-radius: 20px; font-size: 12px; background: #eee; }
.badge-publicado { background: #dcf3e3; color: var(--cor-sucesso); }
.badge-rascunho { background: #fdeed3; color: #8a5b00; }
.acoes a { margin-right: 8px; }

/* ---------- Formulários ---------- */
.form-album { background: #fff; padding: 20px; border-radius: 8px; margin-bottom: 24px; }
.linha { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.campo { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.campo-grande { flex: 2; }
.campo input, .campo select, .campo textarea { padding: 9px; border: 1px solid var(--cor-borda); border-radius: 6px; font-size: 14px; }
.bloco-publicidade { border: 1px solid var(--cor-borda); border-radius: 8px; padding: 14px; margin-bottom: 16px; }
.opcao-radio { display: block; margin-bottom: 8px; }
.campo-kit-especifico { margin: 10px 0 0 26px; padding: 10px; background: #f6f8fa; border-radius: 6px; }
.campo-kit-especifico label { display: block; font-size: 13px; margin-bottom: 4px; }
.select-kit { padding: 6px; min-width: 240px; }
.dica { color: #777; font-size: 13px; display: block; margin-top: 2px; }

/* ---------- Upload ---------- */
.area-upload { background: #fff; padding: 20px; border-radius: 8px; margin-bottom: 20px; border: 2px dashed var(--cor-borda); }
.lista-progresso { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.item-progresso { font-size: 13px; }
.item-progresso .nome { display: block; margin-bottom: 4px; }
.barra-fundo { background: #eee; border-radius: 10px; overflow: hidden; height: 8px; }
.barra-preenchimento { height: 100%; background: var(--cor-primaria); width: 0%; transition: width .2s; }
.item-progresso.erro .barra-preenchimento { background: var(--cor-erro); }
.item-progresso.concluido .barra-preenchimento { background: var(--cor-sucesso); }
.msg-erro-upload { color: var(--cor-erro); }

.grade-imagens { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.card-imagem { background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid var(--cor-borda); }
.card-imagem img { width: 100%; height: 120px; object-fit: cover; display: block; }
.marcar-destaque { display: block; font-size: 12px; padding: 6px 8px; }
.btn-excluir-img { width: 100%; border: none; background: #fdeceb; color: var(--cor-erro); padding: 6px; cursor: pointer; font-size: 12px; }

.card-kit { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 20px; }
.card-kit-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }

/* ---------- Página pública: home ---------- */
.topo-publico { background: var(--cor-primaria-escura); color: #fff; padding: 30px 24px; text-align: center; }
.grade-galerias { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding: 24px; max-width: 1200px; margin: 0 auto; }
.card-galeria { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: transform .15s; }
.card-galeria:hover { transform: translateY(-4px); }
.capa-galeria { aspect-ratio: 4/3; background: #ddd; overflow: hidden; }
.capa-galeria img { width: 100%; height: 100%; object-fit: cover; }
.sem-capa { display: flex; align-items: center; justify-content: center; height: 100%; color: #888; }
.info-galeria { padding: 14px; }
.info-galeria h2 { font-size: 17px; margin-bottom: 6px; color: var(--cor-texto); }
.meta-galeria { font-size: 13px; color: #666; display: flex; gap: 12px; flex-wrap: wrap; }
.vazio { text-align: center; padding: 60px; color: #888; }

/* ---------- Página pública: álbum ---------- */
.topo-album { background: #fff; padding: 24px; text-align: center; border-bottom: 1px solid var(--cor-borda); }
.voltar { display: inline-block; margin-bottom: 10px; }
.descricao-album { max-width: 700px; margin: 10px auto 0; color: #444; }

.carrossel { position: relative; max-width: 900px; margin: 24px auto; overflow: hidden; background: #000; border-radius: 8px; }
.carrossel-trilho { display: flex; transition: transform .35s ease; }
.slide { min-width: 100%; display: flex; align-items: center; justify-content: center; position: relative; background: #111; min-height: 300px; }
.slide-foto img { width: 100%; max-height: 70vh; object-fit: contain; display: block; margin: 0 auto; }
.slide-banner { background: #fafafa; flex-direction: column; padding: 10px; }
.slide-banner img { max-width: 100%; height: auto; }
.rotulo-publicidade { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 4px; z-index: 2;}
.botao-download { position: absolute; bottom: 14px; right: 14px; background: rgba(0,0,0,.65); color: #fff; padding: 8px 14px; border-radius: 6px; font-size: 14px; }
.seta { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.4); color: #fff; border: none; font-size: 20px; padding: 10px 14px; cursor: pointer; z-index: 3; }
.seta-esq { left: 10px; } .seta-dir { right: 10px; }
.pontos { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.pontos span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; }
.pontos span.ativo { background: #fff; }
.contador-fotos { position: absolute; top: 8px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 12px; z-index: 3; }

.grade-continua { display: none; }
.contador-fotos-fixo { display: none; }

@media (max-width: 720px) {
    .carrossel { display: none; }
    .grade-continua { display: flex; flex-direction: column; gap: 16px; padding: 12px; }
    .item-continuo { position: relative; background: #000; border-radius: 8px; overflow: hidden; }
    .item-continuo img { width: 100%; display: block; }
    .item-banner { background: #fafafa; text-align: center; padding: 10px; }
    .contador-fotos-fixo {
        display: block; position: sticky; top: 8px; margin-left: auto; margin-right: 12px;
        width: fit-content; background: rgba(0,0,0,.7); color: #fff; font-size: 12px;
        padding: 4px 10px; border-radius: 12px; z-index: 5;
    }
}
