/* ========================= */
/* 📱 RESPONSIVIDADE MOBILE */
/* ========================= */

@media (max-width: 768px){

    .container{
        padding:20px;
    }

    .header{
        padding:20px;
    }

    .header h2{
        font-size:20px;
    }

    /* Campos empilhados */
    .linha-campos{
        flex-direction:column;
        gap:12px;
    }

    .linha-campos select{
        width:100%;
    }

    /* Botões empilhados */
    .linha-acoes{
        flex-direction:column;
        gap:12px;
    }

    .botao-cadastro,
    .limpar{
        width:100%;
        min-width:100%;
    }

    /* Grid com 1 coluna no celular */
    .grid{
        grid-template-columns:1fr;
        gap:20px;
    }

    /* Ajuste imagem */
    .card img{
        height:200px;
    }

    /* Header centralizado no mobile */
    .top-bar{
        flex-direction:column;
        align-items:center;
        text-align:center;
        gap:15px;
    }

    .top-right{
        width:100%;
        justify-content:center;
        flex-wrap:wrap;
    }
	
	.botao-cadastro,
    .limpar{
        width:100%;
        min-width:0;              /* remove a largura mínima */
        flex:none;                /* desativa crescimento flex */
        white-space:normal;       /* permite quebrar texto */
        box-sizing:border-box;    /* impede vazamento por padding */
    }
/* Modal ficha no celular */
#areaImpressao {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
}

#areaImpressao img {
    width: 150px !important;
}

#areaImpressao h2 {
    font-size: 18px;
}

.obs-texto {
    text-align: left;
}
/* Modal ficha no celular */
#areaImpressao {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
}

#areaImpressao img {
    width: 150px !important;
}

#areaImpressao h2 {
    font-size: 18px;
}

.obs-texto {
    text-align: left;
}
}

/* ===== GERAL ===== */

body{
    margin:0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #4e73df, #1cc88a);
    min-height:100vh;
}

.container{
    max-width:1200px;
    margin:auto;
    padding:40px;
}

/* ===== HEADER CARD ===== */

/* títulos das seções */
.menu h3{
    grid-column:1 / -1;
    margin-top:35px;
    margin-bottom:10px;
    font-size:18px;
    font-weight:700;
    color:#fff;
    letter-spacing:1px;
    padding-left:8px;
    border-left:4px solid rgba(255,255,255,0.6);
}

/* container dos botões */
.Chamada_ADMN_MENU{
    grid-column:1 / -1;

    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
    gap:25px;

    padding:20px;
    border-radius:14px;

    background:rgba(255,255,255,0.08);
    backdrop-filter:blur(3px);
}

/* cards */
.Chamada_ADMN_MENU .botao-menu{
    background:white;
    border-radius:14px;
    padding:30px 20px;

    font-size:17px;
    font-weight:600;

    transition:0.25s;
}

/* hover */
.Chamada_ADMN_MENU .botao-menu:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 30px rgba(0,0,0,0.25);
}

/* ícones */
.Chamada_ADMN_MENU .botao-menu span{
    font-size:42px;
    margin-bottom:12px;
}



/* ===== HEADER CARD ===== */

.header{
    background:white;
    padding:25px;
    border-radius:15px;
    box-shadow:0 10px 30px rgba(0,0,0,0.15);
    margin-bottom:30px;
}

.header h2{
    margin:0 0 20px 0;
}

/* ===== FORM ===== */

.form-container{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.linha-campos{
    display:flex;
    justify-content:space-between;
    gap:20px;
}

.linha-campos input{
    flex:1;
}

.linha-campos select{
    width:250px;
}

input, select{
    padding:12px;
    border-radius:10px;
    border:1px solid #ddd;
    font-size:14px;
    outline:none;
}

input:focus, select:focus{
    border-color:#4e73df;
}

/* ===== BOTÃO BUSCAR ===== */

.linha-buscar{
    width:100%;
}

.btn-buscar{
    width:100%;
    padding:14px;
    background:#4e73df;
    color:white;
    border:none;
    border-radius:10px;
    font-size:15px;
    cursor:pointer;
    transition:0.3s;
}

.btn-buscar:hover{
    background:#2e59d9;
}

/* ===== BOTÕES INFERIORES ===== */

.linha-acoes{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:15px;
}

.botao-cadastro,
.limpar{
	flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    height:48px;
    min-width:200px;
    padding:0 22px;
    border-radius:12px;
    font-weight:600;
    text-decoration:none;
    font-size:14px;
    white-space:nowrap;
    transition:0.3s ease;
}

.botao-cadastro{
    background:#0c1411;
    color:white;
}

.botao-cadastro:hover{
    background:#111;
}

.limpar{
    background:#e74a3b;
    color:white;
}

.limpar:hover{
    background:#c0392b;
}
.egresso{
	flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    height:48px;
    min-width:200px;
    padding:0 22px;
    border-radius:12px;
    font-weight:600;
    text-decoration:none;
    font-size:14px;
    white-space:nowrap;
    transition:0.3s ease;
}

.egresso{
    background:#006e63;
    color:white;
}

.egresso:hover{
    background:#1cc9b8;
}


button.botao-cadastro{
    border:none;
    cursor:pointer;
}

/* ===== CONTADOR ===== */

.contador{
    margin-top:15px;
    font-size:14px;
    color:#666;
}

/* ===== GRID ===== */

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
    gap:25px;
}

/* ===== CARD ===== */

.card{
    background:white;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 8px 20px rgba(0,0,0,0.15);
    transition:0.3s;
    text-align:center;
}

.card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 30px rgba(0,0,0,0.25);
}

.card img{
    width:100%;
    height:240px;
    object-fit:cover;
}

.card-body{
    padding:15px;
}

.card h4{
    margin:10px 0 5px 0;
}

.card p{
    margin:4px 0;
    color:#555;
}

/* ===== MENU INDEX ===== */

.menu{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
    gap:25px;
}

.botao-menu{
    display:flex;
    align-items:center;
    justify-content:center;
    background:white;
    padding:35px 20px;
    border-radius:15px;
    text-decoration:none;
    font-size:18px;
    font-weight:600;
    color:#333;
    box-shadow:0 8px 20px rgba(0,0,0,0.15);
    transition:0.3s ease;
    text-align:center;
}

.botao-menu:hover{
    transform:translateY(-8px);
    box-shadow:0 15px 35px rgba(0,0,0,0.25);
    background:#f8f9fc;
}

.botao-menu span{
    display:block;
    font-size:40px;
    margin-bottom:15px;
}

/* ===== RODAPÉ ===== */

.rodape{
    text-align:center;
    padding:18px;
    margin-top:40px;
    background:rgba(255,255,255,0.9);
    backdrop-filter:blur(5px);
    font-size:14px;
    color:#444;
    box-shadow:0 -5px 15px rgba(0,0,0,0.08);
}

/* ========================= */
/* 🔹 BARRA SUPERIOR HEADER */
/* ========================= */

.top-bar{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    gap:18px;
    margin-bottom:25px;
    padding-bottom:20px;
    border-bottom:1px solid #eee;
}

.logo-sistema{
    font-size:20px;
    font-weight:700;
    color:#4e73df;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.nome-escola{
    font-size:14px;
    font-weight:500;
    color:#666;
    margin-top:4px;
}

/* Área direita (botões + usuário) */
.top-right{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
}

/* Usuário logado */
.usuario-info{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:13px;
    font-weight:600;
    color:#444;
}

/* Badge Admin */
.badge-admin{
    background:#f6c23e;
    color:#000;
    padding:4px 8px;
    border-radius:20px;
    font-size:11px;
    font-weight:700;
}

/* Botões padrão */
.btn-header{
    padding:8px 14px;
    border-radius:8px;
    text-decoration:none;
    font-size:13px;
    font-weight:600;
    background:#f1f3f9;
    color:#333;
    transition:0.3s;
}

.btn-header:hover{
    background:#4e73df;
    color:white;
}

/* Botão sair */
.btn-logout{
    padding:8px 14px;
    border-radius:8px;
    text-decoration:none;
    font-size:13px;
    font-weight:600;
    background:#e74a3b;
    color:white;
    transition:0.3s;
}

.btn-logout:hover{
    background:#c0392b;
}

.paginacao {
    margin: 30px 0;
    text-align: center;
}

.paginacao a {
    padding: 8px 15px;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin: 0 10px;
}

.paginacao a:hover {
    background: #34495e;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 700px;
    max-width: 95%;
    position: relative;
}

.fechar {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

.ficha-container {
    display: flex;
    gap: 30px;
    align-items: center;
}

.foto-ficha {
    width: 200px;
    border-radius: 10px;
}

.dados-ficha {
    flex: 1;
}

/* imprimir */
.btn-imprimir{
    background:#2c3e50;
    color:white;
}

.btn-imprimir:hover{
    background:#1a252f;
}

.modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}



.pagina-obs {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fc;
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
	overflow-x: hidden;
}

.obs-texto{
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.controle-paginas{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:15px;
    margin-top:15px;
}

.controle-paginas button{
    padding:6px 12px;
    border:none;
    border-radius:6px;
    background:#2c3e50;
    color:white;
    cursor:pointer;
}

.controle-paginas button:hover{
    background:#1a252f;
}

/* ========================= */
/* MODAL PROCESSANDO */
/* ========================= */

.modal-processando{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.6);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.box-processando{
    background:white;
    padding:30px 40px;
    border-radius:10px;
    text-align:center;
}

.spinner{
    width:40px;
    height:40px;
    border:5px solid #ddd;
    border-top:5px solid #2c7be5;
    border-radius:50%;
    animation:spin 1s linear infinite;
    margin:auto;
    margin-bottom:15px;
}

@keyframes spin{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(360deg);}
}
/* ========================= */
/* BOTÕES DO MODAL */
/* ========================= */

.acoes-modal{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-top:25px;
    flex-wrap:wrap;
}

.btn-modal{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:12px 22px;
    border-radius:10px;
    font-size:14px;
    font-weight:600;
    text-decoration:none;
    border:none;
    cursor:pointer;
    transition:0.25s;
}

/* ========================= */
/* BOTÕES DO MODAL */
/* ========================= */

.acoes-modal{
    display:flex;
    justify-content:center;
    gap:12px;
    margin-top:25px;
    flex-wrap:wrap;
}

.btn-modal{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:12px 20px;
    border-radius:10px;
    font-size:14px;
    font-weight:600;
    border:none;
    cursor:pointer;
    text-decoration:none;
    transition:0.25s;
}

/* editar */
.btn-editar{
    background:#f6c23e;
    color:#000;
}

.btn-editar:hover{
    background:#e0ac2f;
}

/* excluir */
.btn-excluir{
    background:#e74a3b;
    color:white;
}

.btn-excluir:hover{
    background:#c0392b;
}

/* imprimir */
.btn-imprimir{
    background:#2c3e50;
    color:white;
}

.btn-imprimir:hover{
    background:#1a252f;
}

/* pdf */
.btn-pdf{
    background:#4e73df;
    color:white;
}

.btn-pdf:hover{
    background:#2e59d9;
}
.swal2-container {
    z-index: 99999 !important;
}

.card{
    position:relative;
}

/* indicador de ocorrências */

.badge-ocorrencias{
    position:absolute;
    top:8px;
    right:8px;
    background:#e74a3b;
    color:white;
    font-size:12px;
    font-weight:bold;
    width:22px;
    height:22px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 0 5px rgba(0,0,0,0.3);
}

.card{
    position:relative;
}

.badge-ocorrencias{
    position:absolute;
    top:8px;
    right:8px;
    background:#e74c3c;
    color:white;
    font-weight:bold;
    font-size:14px;
    padding:5px 10px;
    border-radius:20px;
    box-shadow:0 2px 6px rgba(0,0,0,0.3);
}
/* ocorrência */
.btn-ocorrencia{
    background:#660505;
    color:white;
}

.btn-ocorrencia:hover{
    background:#592222;
}

/* ver ocorrências */
.btn-ver-ocorrencias{
    background:#b55f1d;
    color:white;
}

.btn-ver-ocorrencias:hover{
    background:#f7b683;
}

.btn-gerar_boletim{
    background:#bfb308;
    color:white;
}

.btn-gerar_boletim:hover{
    background:#d1cb73;
}
.lista-salas{
    list-style:none;
    padding:0;
}

.item-sala{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#f5f5f5;
    padding:10px;
    margin-bottom:8px;
    border-radius:6px;
}

.nome-sala{
    font-weight:600;
}

.acoes-sala{
    display:flex;
    gap:10px;
}

.btn-editar{
    background:#4e73df;
    color:white;
    padding:6px 10px;
    text-decoration:none;
    border-radius:5px;
    font-size:14px;
}

.btn-excluir{
    background:#e74a3b;
    color:white;
    border:none;
    padding:6px 10px;
    border-radius:5px;
    cursor:pointer;
}
.paginacao{
margin-top:20px;
text-align:center;
}

.btn-pagina{
padding:8px 12px;
background:#3498db;
color:white;
text-decoration:none;
border-radius:6px;
margin:5px;
}

.btn-pagina:hover{
background:#2980b9;
}

.pagina-info{
margin:0 10px;
font-weight:bold;
}

.icone-menu {
    width: 28px;
    height: 28px;
    margin-right: 8px;
}

.botao-menu div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.botao-menu div img {
    margin-right: 8px;
}

/* =========================
   LISTA DE SALAS
========================= */

.lista-salas {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-sala {
    background: #ffffff;
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover no bloco inteiro */
.item-sala:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* =========================
   LINK DA SALA
========================= */

.nome-sala {
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.2s ease;
}

/* Hover no texto */
.nome-sala:hover {
    color: #007bff;
}

/* =========================
   AÇÕES (BOTÕES)
========================= */

.acoes-sala {
    display: flex;
    gap: 8px;
}

/* Botão editar */
.btn-editar {
    text-decoration: none;
    background: #ffc107;
    color: #000;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.2s;
}

.btn-editar:hover {
    background: #e0a800;
}

/* Botão excluir */
.btn-excluir {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.btn-excluir:hover {
    background: #c82333;
}

/* ===== DROP AREA PRO ===== */

.drop-area{
    position: relative;
    border: 2px dashed #4e73df;
    border-radius: 16px;
    padding: 45px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff, #eef2ff);
    cursor: pointer;
    transition: 0.3s ease;
}

/* hover */
.drop-area:hover{
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-color: #2e59d9;
}

/* quando arrasta arquivo */
.drop-area.hover{
    background: #dce3ff;
    border-color: #1d4ed8;
    transform: scale(1.01);
}

/* ícone */
.drop-icon{
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

/* texto principal */
.drop-area p{
    font-size: 16px;
    margin: 5px 0;
    color: #2c3e50;
}

/* texto secundário */
.drop-area span{
    font-size: 13px;
    color: #6c757d;
}

/* input escondido */
.drop-area input{
    display: none;
}

/* botão fake */
.drop-area::after{
    content: "Selecionar arquivos";
    display: inline-block;
    margin-top: 15px;
    padding: 10px 18px;
    background: #4e73df;
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}

/* hover botão */
.drop-area:hover::after{
    background: #2e59d9;
}
.drop-area::before{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.4), transparent);
    opacity: 0;
    transition: 0.3s;
}

.drop-area:hover::before{
    opacity: 1;
}

/* ===== PREVIEW FIX ===== */

.preview{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview img{
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;

    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transition: 0.25s;
}

/* hover mais bonito */
.preview img:hover{
    transform: scale(1.08);
}

.linha-campos2{
    display:flex;
    gap:15px;
}

.linha-campos2 input,
.linha-campos2 select{
    flex:1;              /* 🔥 todos ocupam o mesmo espaço */
    width:100%;
    padding:12px;
    border-radius:10px;
    border:1px solid #ddd;
    font-size:14px;
    box-sizing:border-box;
}
.linha-campos2 input:focus,
.linha-campos2 select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* ========================= */
/* 🏆 TOP ATIVIDADES */
/* ========================= */

.top-box{
    background:white;
    padding:20px;
    border-radius:14px;
    margin-bottom:25px;
    box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

.top-header{
    margin-bottom:15px;
}

.top-header h3{
    margin:0;
    font-size:18px;
}

/* item */

.top-item{
    display:flex;
    align-items:center;
    gap:15px;
    padding:12px 10px;
    border-radius:10px;
    transition:0.2s;
}

.top-item:hover{
    background:#f4f8ff;
    transform:translateX(4px);
}

/* posição */

.top-pos{
    font-size:20px;
    width:35px;
    text-align:center;
}

/* info */

.top-info{
    flex:1;
}

.top-nome{
    font-weight:600;
    font-size:14px;
}

.top-qtd{
    font-size:12px;
    color:#777;
}

/* botão */

.btn-download{
    background:#3498db;
    color:white;
    padding:6px 10px;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
    transition:0.2s;
}

.btn-download:hover{
    background:#2980b9;
}

.badge2{
    position:absolute;
    top:10px;
    left:10px;
    padding:6px 12px;
    border-radius:8px;
    font-size:12px;
    color:white;
    background:rgba(0,0,0,0.75);
	backdrop-filter:blur(6px);
    font-weight:600;
}

/* opcional: manter leve diferença */
.badge2.normal{
    background:#000;
}

.badge2.adaptada{
    background:#000;
}

/* ========================= */
/* 🎯 AÇÕES DOS CARDS */
/* ========================= */

.acoes{
    display:flex;
    justify-content:center;
    gap:12px;
    padding:15px;
    border-top:1px solid #eee;
}

/* botão base */
.btn-acao{
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    text-decoration:none;
    font-size:18px;
    transition:0.25s;
    box-shadow:0 4px 10px rgba(0,0,0,0.15);
}

/* 👁️ visualizar */
.btn-acao.visualizar{
    background:linear-gradient(135deg, #3498db, #2c80b4);
    color:white;
}

.btn-acao.visualizar:hover{
    transform:translateY(-4px) scale(1.08);
    box-shadow:0 8px 20px rgba(52,152,219,0.5);
}

/* ⬇️ baixar */
.btn-acao.baixar{
    background:linear-gradient(135deg, #2ecc71, #27ae60);
    color:white;
}

.btn-acao.baixar:hover{
    transform:translateY(-4px) scale(1.08);
    box-shadow:0 8px 20px rgba(46,204,113,0.5);
}

/* 🗑️ excluir */
.btn-acao.excluir{
    background:linear-gradient(135deg, #e74c3c, #c0392b);
    color:white;
}

.btn-acao.excluir:hover{
    transform:translateY(-4px) scale(1.08);
    box-shadow:0 8px 20px rgba(231,76,60,0.5);
}

/* clique */
.btn-acao:active{
    transform:scale(0.92);
}

/* mobile */
@media(max-width:768px){
    .btn-acao{
        width:38px;
        height:38px;
        font-size:16px;
    }
}