/*==================================================
RESET
==================================================*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Segoe UI,Arial,sans-serif;
    background: #f4f6f8;
    color: #2d3748;
}

/*==================================================
LAYOUT
==================================================*/

.container {
    width: 95%;
    max-width: 1100px;
    margin: auto;
}

/*==================================================
HEADER
==================================================*/

.header {
    background: #123b63;
    color: white;
    padding: 40px 0;
    text-align: center;
}

    .header h1 {
        font-size: 34px;
        margin-bottom: 10px;
    }

    .header p {
        color: #d7e7f6;
        font-size: 17px;
    }

/*==================================================
INTRODUÇÃO
==================================================*/

.hero {
    text-align: center;
    padding: 60px 20px;
}

    .hero h2 {
        color: #123b63;
        margin: 20px 0;
    }

    .hero p {
        max-width: 700px;
        margin: auto;
        line-height: 1.8;
        color: #5d6774;
    }

.badge {
    display: inline-block;
    background: #123b63;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
}

/*==================================================
CARDS
==================================================*/

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
    gap: 30px;
    margin: 50px 0;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    text-align: center;
}

    .card h3 {
        color: #123b63;
        margin: 20px 0 15px;
    }

    .card p {
        color: #6b7280;
        line-height: 1.6;
        margin-bottom: 30px;
    }

.icone {
    font-size: 60px;
}

/*==================================================
BOTÕES
==================================================*/

.btn {
    display: inline-block;
    background: #123b63;
    color: white;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 8px;
    transition: .25s;
    font-weight: 600;
}

    .btn:hover {
        background: #0d2f50;
    }

/*==================================================
FOOTER
==================================================*/

footer {
    text-align: center;
    padding: 30px;
    color: #777;
    border-top: 1px solid #ddd;
}

/*==================================================
LOGIN ENTIDADE
==================================================*/

.login-entidade {
    position: relative;
    min-height: calc(100vh - 260px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 20px;
    overflow: hidden;
}

    .login-entidade::before,
    .login-entidade::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        z-index: -1;
    }

    .login-entidade::before {
        width: 700px;
        height: 700px;
        left: -420px;
        top: 120px;
        background: rgba(18,59,99,.04);
    }

    .login-entidade::after {
        width: 700px;
        height: 700px;
        right: -420px;
        top: 40px;
        background: rgba(18,59,99,.03);
    }

.login-entidade__card {
    width: 100%;
    max-width: 620px;
    background: white;
    border-radius: 20px;
    padding: 65px;
    box-shadow: 0 20px 45px rgba(0,0,0,.12);
    position: relative;
}

.login-entidade__icone {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: #123b63;
    color: white;
    font-size: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -105px auto 30px;
    box-shadow: 0 10px 25px rgba(18,59,99,.25);
}

.login-entidade__cabecalho {
    text-align: center;
    margin-bottom: 35px;
}

    .login-entidade__cabecalho h1 {
        color: #123b63;
        font-size: 42px;
        margin-bottom: 8px;
    }

    .login-entidade__cabecalho p {
        color: #6b7280;
    }

.login-entidade__linha {
    width: 70px;
    height: 4px;
    background: #123b63;
    display: block;
    margin: 18px auto 0;
    border-radius: 20px;
}

.login-entidade__formulario {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.login-entidade__grupo {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .login-entidade__grupo label {
        font-weight: 600;
    }

.login-entidade__campo {
    display: flex;
    align-items: center;
    border: 1px solid #d8dee5;
    border-radius: 8px;
    overflow: hidden;
    transition: .25s;
}

    .login-entidade__campo:focus-within {
        border-color: #123b63;
        box-shadow: 0 0 0 4px rgba(18,59,99,.12);
    }

.login-entidade__campo-icone {
    width: 55px;
    background: #edf3f9;
    text-align: center;
    font-size: 20px;
    padding: 15px 0;
}

.login-entidade__campo input {
    border: 0;
    outline: none;
    width: 100%;
    padding: 15px;
    font-size: 15px;
    background: transparent;
}

.login-entidade__mostrar {
    border: 0;
    background: transparent;
    width: 55px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

.login-entidade__botao {
    border: 0;
    cursor: pointer;
    background: #123b63;
    color: white;
    font-size: 18px;
    font-weight: 600;
    padding: 16px;
    border-radius: 8px;
    transition: .25s;
}

    .login-entidade__botao:hover {
        background: #0d2f50;
    }

.login-entidade__seguranca {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #777;
    margin-top: 10px;
}

    .login-entidade__seguranca span {
        flex: 1;
        height: 1px;
        background: #ddd;
    }

    .login-entidade__seguranca p {
        white-space: nowrap;
        font-size: 14px;
    }

.login-entidade__voltar {
    margin-top: 25px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 16px 30px;
    text-decoration: none;
    color: #123b63;
    font-weight: 600;
    transition: .25s;
}

    .login-entidade__voltar:hover {
        background: #f5f5f5;
    }

.login-entidade__erro {
    color: #d62828;
    font-size: 13px;
}

.login-entidade__erro-geral {
    background: #fdeaea;
    color: #b00020;
    border-radius: 8px;
    padding: 12px;
}


/*==================================================
ÁREA DA ENTIDADE - LAYOUT
==================================================*/

/* ==========================================================
   VARIÁVEIS
========================================================== */

:root {
    --entidade-azul: #123b63;
    --entidade-azul-escuro: #0d2f50;
    --entidade-azul-claro: #eaf3fa;
    --entidade-verde: #198754;
    --entidade-verde-claro: #e8f7ef;
    --entidade-vermelho: #c0392b;
    --entidade-vermelho-claro: #fcebea;
    --entidade-fundo: #f4f6f8;
    --entidade-branco: #ffffff;
    --entidade-texto: #1f2937;
    --entidade-texto-secundario: #64748b;
    --entidade-borda: #dbe2e8;
    --entidade-sombra: 0 3px 12px rgba(15, 23, 42, 0.06);
}


/* ==========================================================
   RESET
========================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--entidade-fundo);
    color: var(--entidade-texto);
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}


/* ==========================================================
   ESTRUTURA PRINCIPAL
========================================================== */

.pagina-entidade {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ==========================================================
   CABEÇALHO
========================================================== */

.topo-entidade {
    min-height: 92px;
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    background: var(--entidade-azul);
    color: var(--entidade-branco);
}

.topo-entidade__ligacao {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.topo-entidade__logotipo {
    width: 48px;
    height: 48px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 11px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.topo-entidade__titulos {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .topo-entidade__titulos strong {
        font-size: 22px;
        line-height: 1.2;
    }

    .topo-entidade__titulos small {
        font-size: 13px;
        opacity: 0.8;
    }

.topo-entidade__utilizador {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.topo-entidade__identificacao {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

    .topo-entidade__identificacao small {
        font-size: 12px;
        opacity: 0.72;
    }

    .topo-entidade__identificacao strong {
        max-width: 380px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 15px;
    }

.topo-entidade__avatar {
    width: 43px;
    height: 43px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    background: var(--entidade-branco);
    color: var(--entidade-azul);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
}


/* ==========================================================
   MENU PRINCIPAL
========================================================== */

.menu-entidade {
    background: var(--entidade-branco);
    border-bottom: 1px solid var(--entidade-borda);
}

.menu-entidade__conteudo {
    width: min(1250px, calc(100% - 40px));
    min-height: 56px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    gap: 4px;
}

.menu-entidade__ligacao {
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    color: var(--entidade-azul);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 3px solid transparent;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

    .menu-entidade__ligacao:hover {
        background: #f7f9fb;
        border-bottom-color: #a9bed0;
    }

.menu-entidade__ligacao--ativa {
    background: #f7f9fb;
    border-bottom-color: var(--entidade-azul);
}

.menu-entidade__ligacao--sair {
    margin-left: auto;
    color: var(--entidade-vermelho);
}

    .menu-entidade__ligacao--sair:hover {
        background: var(--entidade-vermelho-claro);
        border-bottom-color: var(--entidade-vermelho);
    }


/* ==========================================================
   CONTEÚDO
========================================================== */

.conteudo-entidade {
    width: min(1250px, calc(100% - 40px));
    margin: 32px auto;
    flex: 1;
}


/* ==========================================================
   CABEÇALHO DAS PÁGINAS
========================================================== */

.cabecalho-pagina {
    margin-bottom: 25px;
}

    .cabecalho-pagina h1,
    .cabecalho-pagina h2 {
        margin-bottom: 8px;
        color: var(--entidade-azul);
        font-size: 28px;
    }

    .cabecalho-pagina p {
        color: var(--entidade-texto-secundario);
        line-height: 1.6;
    }


/* ==========================================================
   CARTÕES GENÉRICOS
========================================================== */

.cartao {
    padding: 25px;
    background: var(--entidade-branco);
    border: 1px solid var(--entidade-borda);
    border-radius: 10px;
    box-shadow: var(--entidade-sombra);
}

    .cartao + .cartao {
        margin-top: 22px;
    }

.cartao__cabecalho {
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.cartao__titulo {
    margin-bottom: 6px;
    color: var(--entidade-azul);
    font-size: 20px;
}

.cartao__descricao {
    color: var(--entidade-texto-secundario);
    line-height: 1.5;
}


/* ==========================================================
   ALERTAS
========================================================== */

.alerta {
    margin-bottom: 20px;
    padding: 15px 17px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.alerta__icone {
    width: 24px;
    height: 24px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
}

.alerta--sucesso {
    background: var(--entidade-verde-claro);
    color: #146c43;
    border-color: #b9dec9;
}

    .alerta--sucesso .alerta__icone {
        background: var(--entidade-verde);
        color: var(--entidade-branco);
    }

.alerta--erro {
    background: var(--entidade-vermelho-claro);
    color: #9f2f24;
    border-color: #edc0bc;
}

    .alerta--erro .alerta__icone {
        background: var(--entidade-vermelho);
        color: var(--entidade-branco);
    }

.alerta--aviso {
    color: #7a5200;
    background: #fff8df;
    border-color: #edd48a;
}

    .alerta--aviso .alerta__icone {
        color: var(--entidade-branco);
        background: #b77900;
    }

.alerta--informacao {
    color: #185783;
    background: #eaf4fb;
    border-color: #aacce3;
}

    .alerta--informacao .alerta__icone {
        color: var(--entidade-branco);
        background: var(--entidade-azul);
    }

.mensagens-sistema {
    margin-bottom: 20px;
    display: grid;
    gap: 12px;
}

    .mensagens-sistema:empty {
        display: none;
    }

    .mensagens-sistema .alerta {
        margin-bottom: 0;
    }

.alerta__lista {
    margin: 0;
    padding-left: 18px;
}

    .alerta__lista li + li {
        margin-top: 4px;
    }


/* ==========================================================
   BOTÕES GERAIS
========================================================== */

.botao {
    min-height: 43px;
    padding: 11px 19px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

    .botao:hover {
        transform: translateY(-1px);
    }

.botao--principal {
    background: var(--entidade-azul);
    color: var(--entidade-branco);
}

    .botao--principal:hover {
        background: var(--entidade-azul-escuro);
    }

.botao--secundario {
    background: #e8edf2;
    color: var(--entidade-texto);
}

    .botao--secundario:hover {
        background: #dbe2e8;
    }

.botao--sucesso {
    background: var(--entidade-verde);
    color: var(--entidade-branco);
}

.botao--perigo {
    background: var(--entidade-vermelho);
    color: var(--entidade-branco);
}


/* ==========================================================
   RODAPÉ
========================================================== */

.rodape-entidade {
    min-height: 70px;
    padding: 22px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    background: var(--entidade-branco);
    color: var(--entidade-texto-secundario);
    border-top: 1px solid var(--entidade-borda);
    font-size: 13px;
}

.rodape-entidade__separador {
    color: #aab4bf;
}


/* ==========================================================
   RESPONSIVO
========================================================== */

@media (max-width: 800px) {

    .topo-entidade {
        padding: 18px 20px;
    }

    .topo-entidade__identificacao strong {
        max-width: 220px;
    }

    .menu-entidade__conteudo {
        width: 100%;
        padding: 0 12px;
        overflow-x: auto;
    }

    .menu-entidade__ligacao {
        min-height: 55px;
        padding: 0 15px;
        white-space: nowrap;
    }

    .conteudo-entidade {
        width: calc(100% - 28px);
        margin: 24px auto;
    }
}

@media (max-width: 600px) {

    .topo-entidade {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .topo-entidade__utilizador {
        width: 100%;
        justify-content: space-between;
    }

    .topo-entidade__identificacao {
        align-items: flex-start;
        text-align: left;
    }

        .topo-entidade__identificacao strong {
            max-width: calc(100vw - 100px);
        }

    .topo-entidade__titulos strong {
        font-size: 19px;
    }

    .topo-entidade__logotipo {
        width: 43px;
        height: 43px;
    }

    .cartao {
        padding: 20px 17px;
    }

    .cartao__cabecalho {
        flex-direction: column;
    }

    .rodape-entidade {
        flex-wrap: wrap;
    }
}
.menu-entidade__form-sair {
    display: contents;
}

.menu-entidade__form-sair button {
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}
