:root {
    --azul: #0b5ed7;
    --azul-escuro: #084298;
    --cinza-900: #1f2937;
    --cinza-700: #4b5563;
    --cinza-500: #6b7280;
    --cinza-300: #d1d5db;
    --cinza-200: #e5e7eb;
    --cinza-100: #f3f4f6;
    --fundo: #eef2f6;
    --verde: #198754;
    --vermelho: #b42318;
    --amarelo: #9a6700;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: var(--fundo);
    color: var(--cinza-900);
    font: 0.7375rem/1.5 Arial, Helvetica, sans-serif;
}

body,
input,
textarea,
select,
button {
    font-family: Arial, Helvetica, sans-serif;
}

a,
button,
input,
textarea,
select,
summary {
    outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid #8bb9ff;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.75rem;
    line-height: 1.25;
}

h1 {
    font-size: clamp(1.65rem, 3vw, 1.2rem);
}

h2 {
    font-size: 1.25rem;
}

h3 {
    font-size: 1.05rem;
}

p {
    margin: 0.5rem 0 1rem;
}

.cabecalho-app {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem max(1rem, calc((100% - 1240px) / 2));
    background: #fff;
    border-bottom: 1px solid var(--cinza-200);
}

.cabecalho-app div {
    display: flex;
    flex-direction: column;
}

.cabecalho-app strong {
    font-size: 1.1rem;
    color: var(--azul-escuro);
}

.cabecalho-app span {
    color: var(--cinza-500);
    font-size: 0.85rem;
}

.container {
    width: min(1240px, calc(100% - 2rem));
    margin: 1.5rem auto;
    padding: clamp(1rem, 3vw, 2rem);
    background: #fff;
    border-radius: 0.85rem;
    box-shadow: 0 8px 30px rgba(31, 41, 55, 0.08);
}

.container-menor {
    max-width: 760px;
}

.login {
    max-width: 460px;
    margin-top: 5vh;
}

.marca {
    text-align: center;
    margin-bottom: 1.5rem;
}

.marca img {
    max-width: 96px;
    height: auto;
}

.marca h1 {
    margin: 0.5rem 0 0;
    color: var(--azul-escuro);
}

.entidade {
    font-weight: 700;
}

.rodape-login {
    margin-top: 1.5rem;
    color: var(--cinza-500);
    text-align: center;
    font-size: 0.8rem;
}

.topo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.acoes-topo,
.acoes-linha,
.botoes-filtro {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.acoes-tabela,
.botoes-filtro {
    /*display: flex;*/
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.form-inline,
.acoes-tabela form {
    display: inline-flex;
    margin: 0;
}

.muted {
    color: var(--cinza-500);
    font-size: 0.9rem;
}

.texto-esquerda {
    text-align: left;
}

.campo {
    margin-bottom: 1rem;
}

.campo-cresce {
    flex: 1 1 320px;
}

label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 42px;
    padding: 0.65rem 0.75rem;
    border: 1px solid #b8c1cc;
    border-radius: 0.5rem;
    background: #fff;
    color: var(--cinza-900);
    font-size: 0.95rem;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--azul);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: auto;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

fieldset:disabled {
    opacity: 0.8;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.secao-formulario {
    margin: 1.25rem 0;
    padding: 1.25rem;
    border: 1px solid var(--cinza-200);
    border-radius: 0.75rem;
    background: #fff;
}

.comissao-box {
    margin: 0.85rem 0;
    padding: 1rem;
    border: 1px solid var(--cinza-300);
    border-radius: 0.65rem;
    background: #fafbfc;
}

.lista-comissoes {
    display: grid;
    gap: 0.75rem;
}

.comissao-bloco {
    padding: 1rem;
    border: 1px solid var(--cinza-300);
    border-radius: 0.65rem;
}

.checkbox-item,
.checkbox-destaque {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.checkbox-destaque {
    width: fit-content;
    margin: 0.75rem 0 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #f1cc75;
    border-radius: 0.5rem;
    background: #fff8e5;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.6rem 0.95rem;
    border: 0;
    border-radius: 0.5rem;
    background: var(--azul);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.btn:hover {
    background: var(--azul-escuro);
}

.btn.sec {
    background: #5f6b7a;
}

.btn.ok {
    background: var(--verde);
}

.btn.danger {
    background: var(--vermelho);
}

.btn-menor {
    min-height: 34px;
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
}

.btn-bloco {
    width: 100%;
}

.alerta {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    border-radius: 0.55rem;
}

.erro {
    background: #fee4e2;
    color: #7a271a;
    border: 1px solid #fda29b;
}

.sucesso {
    background: #dcfae6;
    color: #085d3a;
    border: 1px solid #75e0a7;
}

.aviso {
    background: #fff4d6;
    color: #704d00;
    border: 1px solid #f1cc75;
}

.filtros,
.form-adicionar {
    display: flex;
    align-items: flex-end;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--cinza-100);
    border: 1px solid var(--cinza-200);
    border-radius: 0.65rem;
}

.filtros .campo,
.form-adicionar .campo {
    min-width: 165px;
    margin-bottom: 0;
}

.barra-tabela {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.form-paginacao {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-paginacao label {
    margin: 0;
}

.form-paginacao select {
    width: auto;
}

.tabela-responsiva {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

th,
td {
    padding: 0.75rem;
    border: 1px solid var(--cinza-200);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--cinza-100);
    color: #344054;
    white-space: nowrap;
}

.coluna-ementa {
    min-width: 260px;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: #e8edf3;
    color: #344054;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.andamento {
    background: #fff1c2;
    color: #674d00;
}

.aprovado {
    background: #d1fadf;
    color: #05603a;
}

.reprovado {
    background: #fee4e2;
    color: #912018;
}

.arquivado {
    background: #e4e7ec;
    color: #344054;
}

.urgencia {
    background: #fff1c2;
    color: #7a2e0e;
}

.tag-urgencia {
    display: block;
    margin-top: 0.35rem;
    color: #8a3b12;
    font-weight: 700;
}

.resumo-status {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.paginacao {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.paginacao a,
.paginacao span {
    min-width: 38px;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--cinza-300);
    border-radius: 0.4rem;
    background: #fff;
    color: var(--cinza-900);
    text-align: center;
    text-decoration: none;
}

.paginacao .ativo {
    border-color: var(--azul);
    background: var(--azul);
    color: #fff;
}

.paginacao .desativado {
    pointer-events: none;
    color: #98a2b3;
    background: var(--cinza-100);
}

.paginacao .reticencias {
    border: 0;
}

.linha-tempo {
    margin: 1rem 0 0.5rem 0.7rem;
    padding-left: 1.3rem;
    border-left: 3px solid #b9d3f7;
    list-style: none;
}

.linha-tempo li {
    position: relative;
    margin: 0 0 1rem;
    padding: 0 0 0.25rem 0.8rem;
}

.linha-tempo li::before {
    position: absolute;
    top: 0.3rem;
    left: -1.75rem;
    width: 0.75rem;
    height: 0.75rem;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--azul);
    box-shadow: 0 0 0 2px var(--azul);
    content: "";
}

.linha-tempo li > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.linha-tempo time,
.linha-tempo small {
    display: block;
    color: var(--cinza-500);
    font-size: 0.8rem;
}

.linha-tempo p {
    margin: 0.25rem 0;
}

.linha-cadastro {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) 100px auto auto auto;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.linha-cadastro.novo {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cinza-200);
}

.linha-cadastro label {
    margin: 0;
    white-space: nowrap;
}

details {
    min-width: 220px;
}

summary {
    color: var(--azul-escuro);
    cursor: pointer;
    font-weight: 700;
}

pre {
    max-width: 520px;
    overflow: auto;
    padding: 0.75rem;
    border-radius: 0.4rem;
    background: #111827;
    color: #f9fafb;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.78rem;
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .linha-cadastro {
        grid-template-columns: 1fr 90px auto;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 1rem, 1240px);
        margin: 0.5rem auto;
        padding: 1rem;
        border-radius: 0.6rem;
    }

    .topo,
    .linha-tempo li > div {
        flex-direction: column;
    }

    .grid-2,
    .grid-3,
    .linha-cadastro {
        grid-template-columns: 1fr;
    }

    .acoes-topo,
    .botoes-filtro {
        align-items: stretch;
    }

    .acoes-topo .btn,
    .acoes-topo form,
    .acoes-topo form .btn {
        width: 100%;
    }

    .filtros {
        align-items: stretch;
    }

    .filtros .campo {
        width: 100%;
    }
}
