:root {
    color-scheme: dark;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --fundo: #0c111b;
    --painel: #161e2a;
    --linha: #2b3545;
    --texto: #eef3f9;
    --muted: #a3b3c9;
    --verde: #22c783
}

* {
    box-sizing: border-box
}

body {
    background: var(--fundo);
    color: var(--texto);
    margin: 0
}

.layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh
}

.menu {
    background: #121a26;
    border-right: 1px solid var(--linha);
    padding: 28px 18px;
    display: flex;
    flex-direction: column
}

.marca {
    display: flex;
    gap: 11px;
    align-items: center;
    margin: 0 0 42px 6px
}

.marca-icone {
    display: grid;
    place-items: center;
    border-radius: 14px;
    height: 42px;
    width: 42px;
    background: #10543d;
    color: #a3ffcf;
    font-weight: 900
}

.marca strong {
    display: block;
    font-size: 16px
}

.marca small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
    font-size: 12px
}

.menu nav {
    display: grid;
    gap: 7px
}

.menu nav a {
    padding: 12px 14px;
    border-radius: 9px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px
}

.menu nav a:hover,
.menu nav a.ativo {
    background: #213c33;
    color: #b6f5d6
}

.menu-rodape {
    margin-top: auto;
    padding: 30px 9px 0;
    color: #7e90a8;
    font-size: 12px
}

.conteudo {
    padding: 34px 40px;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto
}

.topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px
}

.eyebrow {
    font-size: 12px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--verde);
    font-weight: 700
}

h1 {
    font-size: 32px;
    margin: 7px 0 0;
    letter-spacing: -.04em
}

h2 {
    font-size: 18px;
    margin: 0 0 17px
}

p {
    line-height: 1.6
}

.introducao,
.ajuda {
    color: var(--muted)
}

.introducao {
    margin: 0 0 26px
}

.ajuda {
    font-size: 13px
}

.selo {
    padding: 8px 13px;
    border: 1px solid #69582d;
    background: #302715;
    border-radius: 999px;
    color: #ffdc91;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 23px
}

.card,
.painel {
    background: var(--painel);
    border: 1px solid var(--linha);
    border-radius: 16px;
    padding: 24px
}

.card span,
.card small {
    color: var(--muted);
    display: block;
    font-size: 13px
}

.card strong {
    font-size: 37px;
    letter-spacing: -.06em;
    display: block;
    margin: 14px 0 8px
}

.painel {
    margin-bottom: 18px
}

.destaque {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.destaque p {
    color: var(--muted);
    margin-bottom: 0;
    max-width: 680px
}

.acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.botao {
    border: 0;
    display: inline-block;
    border-radius: 9px;
    background: var(--verde);
    color: #062115;
    text-decoration: none;
    font-weight: 800;
    padding: 12px 17px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap
}

.botao:hover {
    filter: brightness(1.08)
}

.botao.secundario {
    color: #e6edf7;
    background: #2a394a
}

.duas-colunas {
    display: grid;
    grid-template-columns: minmax(310px, .85fr) minmax(0, 1.45fr);
    gap: 18px
}

.formulario {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.formulario label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    font-size: 13px
}

.formulario label small {
    color: var(--muted)
}

input,
textarea,
select {
    width: 100%;
    color: var(--texto);
    background: #0e1521;
    border: 1px solid #3b485a;
    border-radius: 9px;
    padding: 12px;
    font: inherit
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #359f79;
    outline-offset: 1px
}

.formulario label.checkbox {
    flex-direction: row;
    gap: 10px;
    align-items: start;
    font-weight: 400;
    color: #d0ddea;
    line-height: 1.5
}

.checkbox input {
    width: auto;
    margin-top: 4px
}

.formulario button {
    align-self: flex-start
}

.tabela-scroll {
    overflow: auto
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px
}

th,
td {
    padding: 13px 11px;
    text-align: left;
    border-bottom: 1px solid var(--linha)
}

th {
    color: var(--muted);
    font-weight: 600
}

.vazio {
    text-align: center;
    color: var(--muted);
    padding: 36px
}

.tag {
    display: inline-block;
    border-radius: 6px;
    background: #3a3c4a;
    padding: 5px 8px;
    color: #e5dff3;
    font-size: 11px;
    font-weight: 700
}

.tag.autorizado {
    background: #174537;
    color: #8de6b8
}

.alerta {
    border: 1px solid #4d687d;
    background: #1d3541;
    padding: 13px 17px;
    border-radius: 9px;
    margin-bottom: 18px
}

.alerta.sucesso {
    border-color: #2a7b59;
    background: #14382b
}

.alerta.erro {
    border-color: #ac5959;
    background: #3a2027
}

code {
    background: #263241;
    padding: 2px 6px;
    border-radius: 5px
}

@media(max-width:1100px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .duas-colunas {
        grid-template-columns: 1fr
    }

    .destaque {
        align-items: flex-start;
        flex-direction: column
    }
}

@media(max-width:700px) {
    .layout {
        grid-template-columns: 1fr
    }

    .menu {
        padding: 17px;
        border-right: none;
        border-bottom: 1px solid var(--linha)
    }

    .marca {
        margin: 0 0 15px
    }

    .menu nav {
        display: flex;
        flex-wrap: wrap
    }

    .menu nav a {
        padding: 9px 11px
    }

    .menu-rodape {
        display: none
    }

    .conteudo {
        padding: 25px 16px
    }

    .cards {
        gap: 10px
    }

    .card,
    .painel {
        padding: 17px
    }

    .card strong {
        font-size: 29px
    }

    .topo {
        flex-wrap: wrap
    }

    h1 {
        font-size: 27px
    }
}

.login-pagina {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px
}

.login-painel {
    width: min(450px, 100%);
    padding: 34px
}

.login-painel .marca {
    margin: 0 0 25px
}

.login-painel h1 {
    font-size: 26px;
    margin: 0 0 16px
}

.login-painel .botao {
    align-self: stretch
}

.rodape-sair {
    margin-top: auto;
    margin-bottom: 16px
}

.grupo-destinatarios {
    border: 1px solid var(--linha);
    border-radius: 10px;
    padding: 14px
}

.grupo-destinatarios legend {
    font-size: 13px;
    font-weight: 700;
    padding: 0 5px
}

.lista-contatos {
    max-height: 220px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.lista-contatos label {
    font-weight: 400
}

.oculto {
    display: none !important
}

.botao-pequeno {
    padding: 7px 10px;
    font-size: 12px
}

.acoes-linha {
    display: flex;
    gap: 5px;
    flex-wrap: wrap
}

.texto-erro {
    color: #f8a2a2
}

.tabela-scroll th {
    white-space: nowrap
}

.usuario-logado {
    border-top: 1px solid var(--linha);
    color: var(--texto);
    padding: 16px 13px 8px;
    margin-top: auto;
    font-size: 13px;
    font-weight: 600
}

.usuario-logado small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px
}

.rodape-sair {
    margin-top: 5px;
    margin-bottom: 0;
    padding: 0 10px
}

.botao-sair {
    width: 100%;
    text-align: left
}

.acoes-usuario {
    display: grid;
    gap: 8px;
    min-width: 245px
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 8px
}

.form-inline input {
    min-width: 120px;
    padding: 8px
}

@media(max-width:700px) {
    .usuario-logado {
        margin-top: 14px
    }

    .rodape-sair {
        padding: 0
    }
}

/* MENU LATERAL */
.sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* BOTÃO SAIR NO RODAPÉ */
.sidebar form:has(button[type="submit"]) {
    margin-top: auto;
    margin-bottom: 20px;
}

/* AJUSTE DO BOTÃO */
.sidebar form button {
    cursor: pointer;
}

/* =====================================
   MENU LATERAL RECOLHÍVEL
===================================== */

.layout {
    transition: grid-template-columns 0.25s ease;
}

.layout.menu-recolhido {
    grid-template-columns: 76px minmax(0, 1fr);
}

.menu {
    min-width: 0;
    min-height: 100vh;
}

/* BOTÃO RECOLHER */

.alternar-menu {
    align-self: flex-end;
    background: #243446;
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    padding: 10px 13px;
    cursor: pointer;
    margin-bottom: 22px;
}

.alternar-menu:hover {
    background: #305844;
}

/* ÍCONES DO MENU */

.menu nav a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu nav a::before {
    display: inline-block;
    min-width: 20px;
    font-size: 19px;
    text-align: center;
}

.menu nav a:nth-child(1)::before {
    content: "⌂";
}

.menu nav a:nth-child(2)::before {
    content: "◉";
}

.menu nav a:nth-child(3)::before {
    content: "▦";
}

.menu nav a:nth-child(4)::before {
    content: "⚙";
}

/* MENU RECOLHIDO */

.layout.menu-recolhido .marca > div {
    display: none;
}

.layout.menu-recolhido .marca {
    margin-left: 0;
    justify-content: center;
}

.layout.menu-recolhido .menu nav a {
    font-size: 0;
    justify-content: center;
    padding: 12px 6px;
}

.layout.menu-recolhido .menu nav a::before {
    font-size: 21px;
}

.layout.menu-recolhido .usuario-logado {
    display: none;
}

/* SAIR SEMPRE EMBAIXO */

.rodape-sair {
    margin-top: auto !important;
    margin-bottom: 16px;
}

.layout.menu-recolhido .rodape-sair {
    padding: 0;
}

.layout.menu-recolhido .rodape-sair button {
    font-size: 0;
    width: 100%;
    padding: 12px 6px;
}

.layout.menu-recolhido .rodape-sair button::before {
    content: "⇥";
    font-size: 20px;
}

/* RESPONSIVO */

@media (max-width: 700px) {
    .menu {
        min-height: auto;
    }

    .layout.menu-recolhido {
        grid-template-columns: 1fr;
    }

    .layout.menu-recolhido .menu nav,
    .layout.menu-recolhido .rodape-sair {
        display: none;
    }

    .layout.menu-recolhido .marca > div {
        display: block;
    }
}

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

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-card {
    width: 100%;
    max-width: 560px;
    background: #121c2b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 36px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.login-topo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.login-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(180deg, #1f8f5f, #176645);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
}

.login-topo h1 {
    margin: 0;
    font-size: 28px;
    color: #ffffff;
}

.login-topo p {
    margin: 4px 0 0;
    color: #a9b4c5;
    font-size: 14px;
}

.login-texto h2 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #f5f7fb;
}

.login-texto p {
    margin: 0 0 26px;
    color: #b9c2d0;
    line-height: 1.6;
    font-size: 15px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.campo label {
    color: #e7edf7;
    font-size: 14px;
    font-weight: 600;
}

.campo input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #2a3950;
    background: #0b1422;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: 0.2s ease;
    box-sizing: border-box;
}

.campo input:focus {
    border-color: #42c985;
    box-shadow: 0 0 0 3px rgba(66, 201, 133, 0.15);
}

.campo-senha {
    position: relative;
}

.campo-senha input {
    padding-right: 96px;
}

.toggle-senha {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #42c985;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

.btn-login {
    margin-top: 8px;
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 15px 18px;
    background: linear-gradient(180deg, #48cf8b, #35b873);
    color: #062312;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.login-rodape {
    margin-top: 22px;
    text-align: center;
    color: #8fa0b8;
    font-size: 13px;
}

.mensagens-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alerta {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.alerta-error,
.alerta-danger {
    background: rgba(220, 38, 38, 0.15);
    color: #ffb4b4;
    border: 1px solid rgba(220, 38, 38, 0.28);
}

.alerta-success {
    background: rgba(34, 197, 94, 0.15);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.28);
}


/* =====================================
   LOGIN - CONTEÚDO CENTRALIZADO
===================================== */

/* Centralizar o card na tela */
.login-pagina {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Card do login */
.login-painel {
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    text-align: center;
}

/* Logotipo e nome do sistema */
.login-painel .marca {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
    text-align: left;
}

/* Título */
.login-painel h1 {
    text-align: center;
    margin-bottom: 24px;
}

/* Formulário */
.login-painel .formulario {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Texto do campo */
.login-painel .formulario label {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

/* Campo da senha */
.login-painel .formulario input {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

/* Botão entrar */
.login-painel .botao {
    width: 100%;
    text-align: center;
}

.senha-icone {
    position: relative;
    width: 100%;
}

.senha-icone span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

.senha-icone input {
    width: 100%;
    padding-left: 42px;
    box-sizing: border-box;
}


/* VISUALIZAR AVISOS */

.visualizar-aviso {
    position: relative;
}

.visualizar-aviso summary {
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.visualizar-aviso summary::-webkit-details-marker {
    display: none;
}

.detalhes-aviso {
    margin-top: 10px;
    padding: 15px;
    width: 280px;
    max-width: 75vw;
    background: #182537;
    border: 1px solid #34465d;
    border-radius: 10px;
    color: #ffffff;
}

.detalhes-aviso p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.6;
}


/* BOTÃO EXCLUIR */

.botao-excluir {
    background-color: #b91c1c;
    color: #ffffff;
    border: 1px solid #dc2626;
    cursor: pointer;
}

.botao-excluir:hover {
    background-color: #991b1b;
}


/* AGENDA EM LARGURA TOTAL */

.cabecalho-agenda {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}
