/* =========================================
   1. CORES E BASE
   ========================================= */
:root {
    --vermelho: #7F0102;
    --vermelho-escuro: #5c0001;
    --verde: #92b528;
    --verde-escuro: #76931f;
    --cinza: #cccccc;
    --texto: #222222;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    color: var(--texto);
    background-color: #2b0000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: Arial, sans-serif;
}

/* Fundos de cada página (mesmas imagens do site antigo) */
.pagina-cam { background-image: url("../imagens/fundo-cam.35f4895ecec5.png"); }
.pagina-corvo-galinha { background-image: url("../imagens/fundo-corvo-galinha.5d625b3debf6.png"); }
.pagina-corvo-cpm { background-image: url("../imagens/fundo-corvo-velho.2f6b861daa8a.png"); }
.pagina-atleticorvo { background-image: url("../imagens/fundo-atleticorvo.7c8b958398d2.png"); }
.pagina-corvo-puto { background-image: url("../imagens/fundo-corvo-puto.c4b265b76243.png"); }

.visualmente-oculto {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* =========================================
   2. CABEÇALHO
   ========================================= */
.meu-cabecalho {
    background-color: var(--vermelho);
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
}

.meu-cabecalho h1 {
    margin: 0;
    font-family: Impact, sans-serif;
    font-size: 80px;
    font-weight: normal;
    line-height: 1;
    text-align: center;
    flex: 1;
}

.marca { display: block; flex-shrink: 0; line-height: 0; }
.marca img { width: 100px; height: auto; display: block; }

.cabecalho-acoes { display: flex; align-items: center; gap: 18px; }

.botao-entrar {
    background: var(--verde);
    color: white;
    border: 2px solid white;
    border-radius: 999px;
    padding: 10px 26px;
    font: bold 18px Arial, sans-serif;
    cursor: pointer;
}
.botao-entrar:hover { background: var(--verde-escuro); }

.botao-perfil {
    display: flex; align-items: center; gap: 10px;
    color: white; text-decoration: none; font-weight: bold;
}
.botao-perfil img, .botao-perfil .iniciais {
    width: 44px; height: 44px; border-radius: 50%;
    border: 2px solid white; object-fit: cover;
}
.botao-perfil .iniciais {
    display: flex; align-items: center; justify-content: center;
    background: var(--verde); font-size: 16px;
}

/* =========================================
   3. MENU HAMBÚRGUER
   ========================================= */
#menu-toggle { display: none; }

.menu-icon { font-size: 35px; cursor: pointer; color: white; user-select: none; }

.menu-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 30px;
    background-color: var(--vermelho);
    padding: 20px;
    border-radius: 0 0 8px 8px;
    list-style: none;
    margin: 0;
    z-index: 20;
    min-width: 200px;
}
#menu-toggle:checked ~ .menu-links { display: flex; }
.menu-links li { margin-bottom: 15px; }
.menu-links li:last-child { margin-bottom: 0; }
.menu-links .separador { border-top: 1px solid rgba(255,255,255,.35); padding-top: 15px; }
.menu-links a, .link-sair {
    color: white; text-decoration: none;
    font: bold 18px Arial, sans-serif;
}
.link-sair { background: none; border: 0; padding: 0; cursor: pointer; }
.menu-links a:hover, .link-sair:hover { color: var(--verde); }

/* =========================================
   4. CONTEÚDO PRINCIPAL
   ========================================= */
main {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    text-align: justify;
    line-height: 1.6;
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
}
main.main-largo { max-width: 1000px; }

main h2 { font-family: Impact, sans-serif; font-weight: normal; color: var(--vermelho); font-size: 32px; letter-spacing: .5px; text-align: left; }
main a { color: var(--vermelho); }

.texto-editavel img { display: block; margin: 40px auto; max-width: 100%; border-radius: 10px; }

.vazio { color: #666; font-style: italic; }
.trilha { font-size: 15px; margin-top: 0; }
.trilha a { text-decoration: none; }

/* =========================================
   5. BOTÕES E AVISOS
   ========================================= */
.botao, td a.botao {
    display: inline-block;
    background-color: var(--verde);
    color: white;
    padding: 8px 18px;
    border: 0;
    border-radius: 5px;
    font: bold 16px Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s;
}
.botao:hover { background-color: var(--verde-escuro); color: white; }
.botao-secundario { background-color: #888; }
.botao-secundario:hover { background-color: #666; }
.botao-perigo { background-color: var(--vermelho); }
.botao-perigo:hover { background-color: var(--vermelho-escuro); }
.botao.bloqueado { background-color: #999; }

.botoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.botao-editar {
    display: inline-block;
    margin: 8px 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--vermelho);
    border: 1px dashed var(--vermelho);
    border-radius: 5px;
    padding: 4px 10px;
    text-decoration: none;
    cursor: pointer;
    background: rgba(255,255,255,.7);
}
.botao-editar:hover { background: var(--vermelho); color: white; }

.acoes-pequenas { display: inline-flex; gap: 12px; font-size: 14px; }

.link-botao {
    background: none; border: 0; padding: 0;
    color: var(--vermelho); font: inherit; font-weight: bold;
    text-decoration: underline; cursor: pointer;
}

.aviso {
    background: #fff6d6;
    border-left: 5px solid #e0b100;
    padding: 12px 16px;
    border-radius: 5px;
    text-align: left;
}

.mensagens { list-style: none; padding: 0; margin: 0 0 20px; }
.mensagem { padding: 12px 16px; border-radius: 5px; margin-bottom: 8px; background: #eef5d9; border-left: 5px solid var(--verde); }
.mensagem.error { background: #fbe3e3; border-left-color: var(--vermelho); }
.mensagem.info { background: #e3eefb; border-left-color: #3b78c4; }

/* =========================================
   6. FORMULÁRIOS
   ========================================= */
.formulario { text-align: left; max-width: 560px; }
.campo { margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.campo label { font-weight: bold; font-size: 16px; }
.obrigatorio { color: var(--vermelho); }
.campo input:not([type=checkbox]):not([type=file]), .campo select, .campo textarea,
.filtros input, .filtros select, .form-cargo input, .form-cargo select {
    font: 16px Arial, sans-serif;
    padding: 10px 12px;
    border: 1px solid #aaa;
    border-radius: 5px;
    background: white;
    width: 100%;
}
.campo textarea { min-height: 140px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--verde); border-color: var(--verde); }
.campo small { font-size: 14px; color: #555; }
.campo .erro, .erro-geral { color: var(--vermelho); font-weight: bold; }
.erro-geral { background: #fbe3e3; padding: 10px 14px; border-radius: 5px; margin-bottom: 16px; }
.erro-geral p { margin: 0; }
.com-erro input, .com-erro select, .com-erro textarea { border-color: var(--vermelho) !important; }
.aviso-usuario.livre { color: var(--verde-escuro); font-weight: bold; }
.aviso-usuario.ocupado { color: var(--vermelho); font-weight: bold; }
.caixinha { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; font-size: 16px; }
.links-pequenos { font-size: 15px; text-align: left; }

/* =========================================
   7. JANELA DE ENTRAR / CADASTRO
   ========================================= */
.janela {
    border: 0;
    border-radius: 12px;
    padding: 30px;
    width: min(520px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    font-family: Arial, sans-serif;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    border-top: 8px solid var(--vermelho);
}
.janela::backdrop { background: rgba(40, 0, 0, .65); }
.janela .formulario { max-width: none; }
.fechar-janela {
    position: absolute; top: 12px; right: 14px;
    background: none; border: 0; font-size: 30px; line-height: 1;
    cursor: pointer; color: #666;
}
.fechar-janela:hover { color: var(--vermelho); }

.abas { display: flex; gap: 6px; margin-bottom: 22px; border-bottom: 2px solid #eee; }
.aba {
    background: none; border: 0; padding: 10px 16px;
    font: 22px Impact, sans-serif; letter-spacing: .5px;
    color: #888; cursor: pointer; border-bottom: 4px solid transparent; margin-bottom: -2px;
}
.aba.ativa { color: var(--vermelho); border-bottom-color: var(--vermelho); }

/* =========================================
   8. TABELAS (Acadêmico, Acervo, Acessos)
   ========================================= */
.tabela-rolavel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 30px; }
th, td { border: 1px solid var(--cinza); padding: 15px; text-align: center; }
th { background-color: var(--vermelho); color: white; font: 20px Impact, sans-serif; letter-spacing: 1px; font-weight: normal; }
tr:nth-child(even) { background-color: #f9f9f9; }
tr:hover { background-color: #f1f1f1; }
td a:not(.botao) { color: var(--vermelho); }

.tabela-acessos td { text-align: left; vertical-align: middle; }
.form-cargo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form-cargo select { width: auto; }
.form-cargo input { flex: 1; min-width: 160px; }
.filtros { display: flex; flex-wrap: wrap; gap: 10px; }
.filtros input { flex: 1; min-width: 200px; }
.filtros select { width: auto; }
.paginacao { display: flex; gap: 20px; justify-content: center; }

.redes { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }

/* =========================================
   9. EVENTOS: bolinhas alternando de lado
   ========================================= */
.lista-eventos { list-style: none; padding: 0; margin: 30px 0; }
.evento-linha {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 30px 0;
    border-bottom: 2px dashed rgba(127, 1, 2, .25);
}
.evento-linha:last-child { border-bottom: 0; }
.evento-linha:nth-child(even) { flex-direction: row-reverse; }
.evento-linha:nth-child(even) .evento-texto { text-align: right; }

.evento-bolinha { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }

.bolinha {
    width: 220px; height: 220px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--vermelho);
    box-shadow: 0 0 0 6px var(--verde);
    display: block;
    background: #eee;
    flex-shrink: 0;
    transition: transform .25s;
}
a.bolinha:hover { transform: scale(1.04); }
.bolinha img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border-radius: 0; }
.bolinha-vazia, .quadrado-vazio {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font: 80px Impact, sans-serif; color: white;
    background: linear-gradient(135deg, var(--vermelho), var(--vermelho-escuro));
}

.evento-texto h2 { margin: 0 0 6px; font-size: 40px; text-align: inherit; }
.evento-texto h2 a { color: var(--vermelho); text-decoration: none; }
.evento-texto h2 a:hover { color: var(--verde-escuro); }
.evento-texto p { margin: 0 0 10px; }
.ver-mais { font-weight: bold; text-decoration: none; margin-right: 14px; }

.trocar-foto { margin-top: 14px; }

/* Subpágina do evento */
.evento-topo, .edicao-topo, .perfil-topo { display: flex; gap: 30px; align-items: center; margin-bottom: 20px; }
.evento-topo .bolinha { width: 170px; height: 170px; }
.titulo-evento { margin: 0; font-size: 44px; }
.topico { border-bottom: 3px solid var(--verde); padding-bottom: 6px; margin-top: 40px; }

/* Grade de edições: quadrados espaçados */
.grade-edicoes {
    list-style: none; padding: 0; margin: 24px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 28px;
}
.cartao-edicao { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; }
.quadrado {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: white;
    border: 4px solid var(--vermelho);
    display: block;
    transition: transform .2s, box-shadow .2s;
}
.quadrado img { width: 100%; height: 100%; object-fit: contain; display: block; margin: 0; border-radius: 0; }
.quadrado-vazio { font-size: 48px; }
.cartao-edicao:hover .quadrado { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,.2); }
.cartao-edicao .ano { font: 26px Impact, sans-serif; color: var(--vermelho); }
.cartao-edicao.novo .quadrado { border-style: dashed; }
.cartao-edicao.novo .quadrado-vazio { background: #f3f3f3; color: var(--vermelho); }
.cartao-edicao.novo .ano { font: bold 16px Arial, sans-serif; }

.quadrado.grande { width: 200px; flex-shrink: 0; }
.ano-grande { font: 64px Impact, sans-serif; color: var(--verde-escuro); margin: 0; line-height: 1; }

.ficha { display: grid; grid-template-columns: 140px 1fr; gap: 14px 20px; text-align: left; }
.ficha dt { font: 22px Impact, sans-serif; color: var(--vermelho); }
.ficha dd { margin: 0; }
.ficha ul { margin: 0; padding-left: 20px; }

/* =========================================
   10. GESTÃO, PERFIL E E-MAILS DE TESTE
   ========================================= */
.lista-atas { list-style: none; padding: 0; }
.lista-atas li {
    display: flex; justify-content: space-between; gap: 20px; align-items: center;
    padding: 16px; background: white; border-radius: 8px; margin-bottom: 12px;
    border-left: 5px solid var(--vermelho); text-align: left;
}
.lista-atas .data { color: #666; margin-left: 10px; font-size: 15px; }
.lista-atas p { margin: 6px 0 0; font-size: 16px; }
.acoes-ata { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }

.bolinha-perfil { width: 150px; height: 150px; }
.bolinha-perfil .bolinha-vazia { font-size: 56px; }
.detalhes-perfil { margin: 6px 0; }
.selo { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: bold; color: white; background: #888; }
.selo-gestao { background: var(--verde-escuro); }
.selo-velho { background: #8a6d3b; }
.selo-superadmin { background: var(--vermelho); }

.email-dev { background: white; padding: 16px; border-radius: 8px; white-space: pre-wrap; font-size: 14px; text-align: left; }

/* =========================================
   11. ANIVERSÁRIO
   ========================================= */
#confete { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
#aniversario {
    position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
    background: var(--vermelho); color: white;
    padding: 16px 50px 16px 24px; border-radius: 12px;
    font: bold 20px Arial, sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    z-index: 60; max-width: calc(100% - 32px);
}
#aniversario p { margin: 0; }
#aniversario button { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: white; font-size: 26px; cursor: pointer; }

/* =========================================
   12. CELULAR
   ========================================= */
@media (max-width: 768px) {
    .meu-cabecalho { padding: 15px; gap: 10px; }
    .meu-cabecalho h1 { font-size: 30px; }
    .marca img { width: 60px; }
    .botao-entrar { padding: 8px 16px; font-size: 15px; }
    .nome-perfil { display: none; }
    .menu-links { right: 15px; }

    main { padding: 20px; font-size: 16px; margin: 20px auto; width: calc(100% - 32px); }

    .evento-linha, .evento-linha:nth-child(even) { flex-direction: column; text-align: center; gap: 20px; }
    .evento-linha:nth-child(even) .evento-texto { text-align: center; }
    .bolinha { width: 180px; height: 180px; }
    .evento-texto h2 { font-size: 32px; }

    .evento-topo, .edicao-topo, .perfil-topo { flex-direction: column; text-align: center; }
    .titulo-evento { font-size: 34px; }
    .grade-edicoes { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .ficha { grid-template-columns: 1fr; gap: 4px; }
    .ficha dd { margin-bottom: 12px; }
    .lista-atas li { flex-direction: column; align-items: flex-start; }
    th, td { padding: 10px; }
}

/* Atalhos da página inicial e destaque do Sobre */
.atalhos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 30px; }
.atalhos a {
    display: block; text-align: center; padding: 18px 10px;
    background: var(--vermelho); color: white; text-decoration: none;
    font: 22px Impact, sans-serif; letter-spacing: .5px; border-radius: 8px;
    transition: background-color .2s, transform .2s;
}
.atalhos a:hover { background: var(--verde); transform: translateY(-3px); }
.destaque { font-size: 20px; text-align: center; }

/* =========================================
   11. ACADÊMICO: GRADES, MATÉRIAS, FUJAS E RESUMOS
   ========================================= */
.abas-cursos { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.abas-cursos a {
    padding: 6px 16px; border-radius: 999px; font-size: 15px; font-weight: bold;
    text-decoration: none; color: var(--vermelho); border: 2px solid var(--vermelho);
    background: rgba(255,255,255,.7); transition: background-color .2s, color .2s;
}
.abas-cursos a:hover, .abas-cursos a.ativa { background: var(--vermelho); color: white; }

.topo-com-busca { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.topo-com-busca .titulo-evento { margin: 0; }
.sem-margem { margin: 0; flex: 1 1 300px; }

.busca { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.botao-lupa {
    width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--vermelho); color: white; font-size: 18px; line-height: 1;
    transition: background-color .2s;
}
.botao-lupa:hover, .busca.aberta .botao-lupa { background: var(--verde); }
.busca input {
    width: 260px; max-width: 100%; padding: 9px 12px; font-size: 16px;
    border: 2px solid var(--vermelho); border-radius: 5px;
}
.busca-vazia { flex-basis: 100%; text-align: right; color: #666; font-style: italic; }

.selo-estrutura { background: var(--verde-escuro); vertical-align: middle; font-family: Arial, sans-serif; }
.selo-curso { background: var(--vermelho); font-size: 12px; padding: 1px 8px; }

.semestre h3 { color: var(--vermelho); margin: 18px 0 6px; font-size: 20px; }
.bloco-materias h4 { margin: 14px 0 4px; font-size: 16px; color: var(--verde-escuro); text-transform: uppercase; letter-spacing: .3px; }
.barrinha { width: 60px; height: 4px; border: 0; border-radius: 2px; background: var(--vermelho); margin: 22px 0 4px; }

.lista-materias { list-style: none; padding: 0; margin: 0; text-align: left; }
.lista-materias li {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
    padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,.08);
}
.lista-materias li:last-child { border-bottom: 0; }
.lista-materias .nome-materia { flex: 1 1 240px; font-weight: bold; text-decoration: none; }
.lista-materias .nome-materia:hover { text-decoration: underline; }
.codigo {
    display: inline-block; min-width: 74px; font: bold 14px "Courier New", monospace;
    color: var(--vermelho-escuro); background: rgba(127,1,2,.08); border-radius: 4px; padding: 1px 6px; text-align: center;
}
.links-materia { display: inline-flex; gap: 6px; align-items: center; }
.mini, a.mini {
    display: inline-block; padding: 3px 10px; border: 0; border-radius: 4px; cursor: pointer;
    font: bold 13px Arial, sans-serif; color: white; background: var(--verde); text-decoration: none;
}
.mini:hover { background: var(--verde-escuro); color: white; }
.mini.bloqueado { background: #999; }
a.mini-editar { background: none; color: var(--vermelho); border: 1px dashed var(--vermelho); }
a.mini-editar:hover { background: var(--vermelho); color: white; }
.fonte { font-size: 14px; color: #666; margin-top: 30px; }

/* Fujas e resumos: cada matéria abre e mostra os botões das provas */
.materia { border-radius: 8px; background: rgba(255,255,255,.6); margin: 8px 0; border-left: 5px solid var(--vermelho); }
.materia[open] { background: white; border-left-color: var(--verde); }
.materia summary {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
    padding: 10px 14px; cursor: pointer; list-style: none; text-align: left;
}
.materia summary::-webkit-details-marker { display: none; }
.materia summary::before { content: "\25B8"; color: var(--vermelho); transition: transform .2s; }
.materia[open] summary::before { transform: rotate(90deg); }
.materia .nome-materia { flex: 1 1 220px; font-weight: bold; color: var(--vermelho); }
.materia .codigos, .materia .cursos { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.contador {
    min-width: 26px; height: 26px; border-radius: 13px; padding: 0 7px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--verde); color: white; font-size: 14px; font-weight: bold;
}
.conteudo-materia { padding: 0 14px 14px 34px; }
.provas { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.provas li { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.provas small { font-size: 12px; color: #666; }
.botao-prova { min-width: 70px; text-align: center; }

.codigo-grande { font: bold 22px "Courier New", monospace; color: var(--vermelho-escuro); }
.tabela-equivalencias td { text-align: left; vertical-align: top; }
.tabela-equivalencias td a { display: block; text-decoration: none; margin: 2px 0; }
.mais { display: block; color: var(--verde-escuro); font-weight: bold; padding-left: 30px; }

@media (max-width: 768px) {
    .topo-com-busca { flex-direction: column; align-items: stretch; }
    .busca { justify-content: flex-start; }
    .busca-vazia { text-align: left; }
    .busca input { flex: 1; }
    .conteudo-materia { padding-left: 14px; }
}

/* =========================================
   12. EMPRÉSTIMO DE MATERIAL (TEM NO CAM)
   ========================================= */
/* Menu de subtópicos que fica flutuando embaixo do título */
.submenu {
    position: sticky; top: 12px; z-index: 50;
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px;
    width: fit-content; max-width: calc(100% - 32px); margin: 18px auto -26px; padding: 8px 10px;
    background: rgba(255,255,255,.95); border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.submenu a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 999px; font-weight: bold; font-size: 14px;
    color: var(--vermelho); text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s;
}
.submenu a:hover { background: rgba(127,1,2,.1); }
.submenu a.ativa { background: var(--vermelho); color: white; }
.submenu .contador { min-width: 22px; height: 22px; font-size: 12px; }
.submenu .contador-alerta { background: #d98200; }
.submenu-divisor { width: 2px; height: 22px; background: var(--cinza); margin: 0 4px; }

.regras { text-align: left; padding-left: 22px; }
.regras li { margin-bottom: 4px; }

.grade-itens {
    list-style: none; padding: 0; margin: 20px 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px;
}
.cartao-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%;
    padding: 16px; border-radius: 10px; background: white; text-decoration: none; text-align: center;
    border: 2px solid transparent; box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: transform .2s, border-color .2s;
}
.cartao-item:hover { transform: translateY(-4px); border-color: var(--verde); }
.foto-item {
    display: flex; align-items: center; justify-content: center;
    width: 130px; height: 130px; border-radius: 10px; background: #f4f4f4; overflow: hidden;
}
.foto-item img { max-width: 90%; max-height: 90%; object-fit: contain; }
.foto-grande { width: 200px; height: 200px; flex-shrink: 0; }
.nome-item { font: 22px Impact, sans-serif; color: var(--vermelho); letter-spacing: .3px; }
.disponiveis { font-size: 14px; font-weight: bold; color: var(--verde-escuro); }
.disponiveis.esgotado { color: #999; }

.item-topo { display: flex; gap: 28px; align-items: flex-start; text-align: left; }
.item-topo .titulo-evento { margin-top: 0; }
.contagem-item { display: flex; flex-wrap: wrap; gap: 6px; }

.lista-reservas { list-style: none; padding: 0; text-align: left; }
.lista-reservas li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.08); }

.selo-pendente { background: #d98200; }
.selo-emprestada { background: var(--verde-escuro); }
.selo-devolvida { background: #5b7083; }
.selo-cancelada { background: #999; }
.selo-atrasada { background: var(--vermelho); }
.selo-disponivel { background: var(--verde-escuro); }
.selo-emprestado { background: #d98200; }
.selo-manutencao { background: var(--vermelho); }

.tabela-reservas { margin-top: 14px; }
.tabela-reservas td { text-align: left; vertical-align: middle; padding: 10px 12px; font-size: 16px; }
.tabela-reservas th { font-size: 17px; padding: 10px 12px; }
.tabela-reservas small { color: #666; }
.linha-hoje td { background: #fff6d6; }
.linha-atrasada td { background: #fde8e8; }
.acoes-tabela { white-space: nowrap; }
.acoes-tabela .link-perigo { margin-left: 10px; font-size: 14px; }
td a.mini-botao, .mini-botao { padding: 5px 12px; font-size: 14px; }

.cartoes-numero { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.cartoes-numero li { background: white; border-radius: 10px; padding: 14px; text-align: center; border-top: 5px solid var(--vermelho); }
.cartoes-numero strong { display: block; font: 40px Impact, sans-serif; color: var(--vermelho); }
.cartoes-numero span { font-size: 14px; color: #555; }

.colunas-graficos { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.barras { list-style: none; padding: 0; margin: 0; }
.barras li { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 36px; align-items: center; gap: 10px; margin: 8px 0; font-size: 15px; text-align: left; }
.rotulo-barra { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trilho { height: 14px; background: rgba(0,0,0,.08); border-radius: 7px; overflow: hidden; }
.trilho span { display: block; height: 100%; min-width: 4px; background: var(--vermelho); border-radius: 7px; }
.barras strong { text-align: right; }

.formulario ul { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.formulario ul label { font-weight: normal; display: inline-flex; gap: 6px; align-items: center; }

@media (max-width: 768px) {
    .submenu { border-radius: 14px; top: 6px; margin-bottom: -10px; }
    .submenu a { padding: 5px 10px; font-size: 14px; }
    .submenu-divisor { display: none; }
    .item-topo { flex-direction: column; align-items: center; text-align: center; }
    .colunas-graficos { grid-template-columns: 1fr; }
}

/* =========================================
   13. ACERVO: JORNAIS E ARTIGOS
   ========================================= */
.portas-acervo { list-style: none; padding: 0; margin: 30px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.porta {
    display: flex; flex-direction: column; gap: 8px; height: 100%;
    padding: 22px; background: white; border-radius: 12px; border-top: 6px solid var(--vermelho);
    text-decoration: none; color: var(--texto); text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,.08); transition: transform .2s, box-shadow .2s;
}
a.porta:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,.18); }
.porta strong { font: 30px Impact, sans-serif; font-weight: normal; color: var(--vermelho); }
.porta span:last-child { font-size: 15px; color: #555; }
.porta-icone { font-size: 38px; line-height: 1; }
.porta.trancada { border-top-color: #999; background: #f1f1f1; }
.porta.trancada strong { color: #777; }

a.aba { text-decoration: none; }
.aba .contador { font: bold 12px Arial, sans-serif; background: #eee; color: #555; border-radius: 999px; padding: 1px 7px; vertical-align: middle; }
.aba.ativa .contador { background: var(--vermelho); color: white; }

.pesquisa-jornais { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.pesquisa-jornais input, .pesquisa-jornais select {
    font: 16px Arial, sans-serif; padding: 10px 12px; border: 1px solid #aaa; border-radius: 5px; background: white;
}
.pesquisa-jornais input { flex: 1 1 260px; }
.pesquisa-jornais .botao { margin: 0; }
.resultado-busca { font-weight: bold; color: var(--verde-escuro); }
.ano-jornais { font: 28px Impact, sans-serif; font-weight: normal; color: var(--verde-escuro); margin: 30px 0 10px; text-align: left; }

.grade-jornais { list-style: none; padding: 0; margin: 10px 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px; }
.cartao-jornal { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.capa-jornal {
    position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0;
    overflow: hidden; border: 0; border-radius: 6px; cursor: pointer;
    background: linear-gradient(160deg, var(--vermelho), var(--vermelho-escuro));
    box-shadow: 0 6px 14px rgba(0,0,0,.25); transition: transform .2s, box-shadow .2s;
}
.capa-jornal:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 14px 26px rgba(0,0,0,.3); }
.capa-jornal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; margin: 0; border-radius: 0; background: white; }
.capa-reserva { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; color: white; font: 28px Impact, sans-serif; text-align: center; }
.abrir-drive {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 8px; text-align: center;
    background: rgba(0,0,0,.72); color: white; font: bold 13px Arial, sans-serif;
    opacity: 0; transition: opacity .2s;
}
.capa-jornal:hover .abrir-drive, .capa-jornal:focus-visible .abrir-drive { opacity: 1; }
.info-jornal { display: flex; flex-direction: column; gap: 3px; font-size: 15px; line-height: 1.35; }
.info-jornal .selo { align-self: flex-start; font-size: 12px; }
.info-jornal p { margin: 2px 0 0; font-size: 14px; color: #555; }
.titulo-jornal { font-style: italic; color: #444; }
.selo-corvo { background: #222; }
.selo-vibracoes { background: #3b78c4; }
.selo-tipo { background: var(--vermelho); }

.lista-artigos { list-style: none; padding: 0; margin: 0 0 20px; }
.artigo-linha {
    display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: baseline;
    padding: 14px 16px; margin-bottom: 10px; background: white; border-radius: 8px;
    border-left: 5px solid var(--verde); text-decoration: none; color: var(--texto); text-align: left;
    transition: transform .15s;
}
.artigo-linha:hover { transform: translateX(4px); border-left-color: var(--vermelho); }
.artigo-linha strong { color: var(--vermelho); font-size: 19px; }
.artigo-linha small, .resumo-artigo { grid-column: 2; color: #555; font-size: 15px; }
.artigo-linha .selo { font-size: 12px; }
.artigo { text-align: left; }
.assinatura { color: #666; font-style: italic; margin-top: -10px; }
.texto-artigo { background: white; border-radius: 8px; padding: 10px 24px; font-family: Georgia, "Times New Roman", serif; font-size: 18px; text-align: justify; }

/* =========================================
   14. GESTÃO E INTEGRAPOLI
   ========================================= */
.escolher-ano { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.escolher-ano label { font-weight: bold; }
.escolher-ano select { font: 16px Arial, sans-serif; padding: 8px 12px; border: 1px solid #aaa; border-radius: 5px; background: white; }

.linha-do-tempo { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 24px; }
.linha-do-tempo a {
    padding: 4px 10px; border-radius: 999px; background: white; border: 1px solid var(--cinza);
    font-size: 14px; font-weight: bold; text-decoration: none;
}
.linha-do-tempo a:hover { border-color: var(--vermelho); }
.linha-do-tempo a.ativa { background: var(--vermelho); border-color: var(--vermelho); color: white; }

.cartao-integra { display: flex; gap: 26px; align-items: flex-start; padding: 24px; background: white; border-radius: 12px; border-top: 6px solid var(--verde); text-align: left; }
.cartao-integra h3 { margin: 0; font: 34px Impact, sans-serif; font-weight: normal; color: var(--vermelho); }
.numeral-integra { flex-shrink: 0; min-width: 120px; font: 64px Impact, sans-serif; color: var(--verde-escuro); text-align: center; line-height: 1; }
.tema-integra { font-weight: bold; color: var(--verde-escuro); margin: 4px 0; }

.cabecalho-gestao { display: flex; gap: 24px; align-items: center; margin: 10px 0; text-align: left; }
.cabecalho-gestao h3 { margin: 0; font: 30px Impact, sans-serif; font-weight: normal; color: var(--vermelho); }
.navegar-gestoes { display: flex; justify-content: space-between; gap: 10px; font-weight: bold; margin-bottom: 10px; }
.navegar-gestoes a { text-decoration: none; }

.tabela-membros { margin-top: 14px; }
.tabela-membros th { font-size: 17px; padding: 10px 12px; }
.tabela-membros td { padding: 8px 12px; font-size: 16px; text-align: left; vertical-align: middle; }
.tabela-membros td.diretoria { font: 18px Impact, sans-serif; color: var(--vermelho); background: #fff; text-align: center; letter-spacing: .3px; }
.foto-membro { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin: 0 10px 0 0; }

.carometro { display: block; width: 100%; height: auto; border-radius: 10px; margin: 10px 0; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.grade-carometro, .grade-batas { list-style: none; padding: 0; display: grid; gap: 16px; }
.grade-carometro { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.grade-carometro li { text-align: center; font-size: 14px; }
.grade-carometro img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin: 0 0 6px; }
.grade-batas { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grade-batas img { width: 100%; border-radius: 8px; margin: 0; background: white; }

/* =========================================
   15. PROJETOS DO CAM
   ========================================= */
.submenu a.submenu-rotulo { text-transform: uppercase; letter-spacing: .5px; font-size: 12px; color: #777; }
.submenu a.submenu-rotulo.ativa { color: white; }
.grade-projetos { list-style: none; padding: 0; margin: 30px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.cartao-projeto {
    display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 22px;
    background: white; border-radius: 14px; text-decoration: none; color: var(--texto); text-align: left;
    box-shadow: 0 6px 16px rgba(0,0,0,.1); transition: transform .2s, box-shadow .2s;
}
.cartao-projeto:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(0,0,0,.2); }
.cartao-projeto strong { font: 28px Impact, sans-serif; font-weight: normal; color: var(--vermelho); }
.capa-projeto { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; border: 4px solid var(--vermelho); display: flex; align-items: center; justify-content: center; background: white; }
.capa-projeto img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
.resumo-projeto { font-size: 15px; color: #555; flex: 1; }
.links-projeto { margin: 14px 0; }

@media (max-width: 768px) {
    .cartao-integra, .cabecalho-gestao { flex-direction: column; align-items: center; text-align: center; }
    .grade-jornais { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .abrir-drive { opacity: 1; }
    .texto-artigo { padding: 6px 14px; font-size: 16px; }
    .artigo-linha { grid-template-columns: 1fr; }
    .artigo-linha small, .resumo-artigo { grid-column: 1; }
}

/* Rodapé */
.rodape { margin-top: 48px; padding: 20px 16px; text-align: center; font-size: 14px; opacity: .8; }
.rodape a { color: inherit; }
