.pagina-esic {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

.cabecalho-esic {
    background: #ffffff;
    border: 1px solid #dce8e2;
    border-radius: 16px;
    padding: 1rem 1.2rem;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1rem;
    align-items: start;
}

.cabecalho-esic h1 {
    margin: 0 0 0.25rem;
}

.cabecalho-esic p {
    margin: 0;
}

.aviso-esic {
    background: #f5f9f7;
    border: 1px solid #d5e3dc;
    border-radius: 10px;
    padding: 0.8rem;
    font-size: 0.94rem;
}

.grade-esic {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.card-esic {
    background: #ffffff;
    border: 1px solid #dce8e2;
    border-radius: 12px;
    padding: 1rem;
}

.card-esic h2 {
    margin: 0 0 0.55rem;
}

.card-esic h3 {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.95rem;
}

.card-esic p {
    margin: 0 0 0.6rem;
}

.lista-esic {
    margin: 0;
    display: grid;
    gap: 0.55rem;
}

.lista-esic dt {
    font-weight: 700;
}

.lista-esic dd {
    margin: 0.2rem 0 0;
}

.acoes-esic {
    display: grid;
    gap: 0.55rem;
    margin: 0.8rem 0;
}

.acao-esic {
    border: 1px solid #d8e4de;
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    background: #f9fcfb;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.icone-acao {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #dba248;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.nota-esic {
    font-size: 0.9rem;
    color: #4a5e55;
}

.linha-link-esic {
    border: 1px solid #d8e4de;
    border-radius: 8px;
    padding: 0.52rem 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.45rem;
}

.linha-link-esic span {
    color: #6f7f78;
}

.barras-esic {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.barras-esic div {
    display: grid;
    grid-template-columns: 1.2fr 2fr auto;
    align-items: center;
    gap: 0.5rem;
}

.barras-esic label {
    font-size: 0.88rem;
}

.barra {
    height: 6px;
    border-radius: 999px;
    position: relative;
    background: #eef3f0;
    overflow: hidden;
}

.barra::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--largura);
}

.barra.ok::after { background: #4fb497; }
.barra.atencao::after { background: #7ab4ff; }
.barra.alerta::after { background: #f0b24f; }
.barra.negado::after { background: #d85f5f; }


.modal-esic {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.modal-esic[hidden] {
    display: none;
}

.modal-esic-fundo {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 17, 0.55);
}

.modal-esic-conteudo {
    position: relative;
    z-index: 1;
    width: min(860px, 98%);
    max-height: 92vh;
    overflow-y: auto;
}

.modal-pequeno {
    width: min(520px, 98%);
}

.modal-esic-fechar {
    position: absolute;
    right: 0.6rem;
    top: 0.6rem;
    width: 32px;
    height: 32px;
    border: 1px solid #cbd9d2;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.alerta-esic {
    background: #d9ecfb;
    border: 1px solid #b8d8ef;
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
}

.alerta-esic a {
    white-space: nowrap;
    font-weight: 600;
}

.form-esic {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.form-esic input,
.form-esic select {
    width: 100%;
    border: 1px solid #c9d8d0;
    border-radius: 8px;
    padding: 0.62rem 0.72rem;
    font: inherit;
}

.bloco-opcional {
    border: 1px solid #e1ebe6;
    border-radius: 10px;
    padding: 0.8rem;
    margin: 0.35rem 0;
}

.bloco-opcional legend {
    font-weight: 600;
    padding: 0 0.35rem;
}

.grade-form-esic {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.campo-duplo {
    grid-column: span 2;
}

.switch-esic {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.switch-esic input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

@media (max-width: 1024px) {
    .cabecalho-esic {
        grid-template-columns: 1fr;
    }

    .grade-esic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .grade-esic {
        grid-template-columns: 1fr;
    }

    .barras-esic div {
        grid-template-columns: 1fr;
    }

    .grade-form-esic {
        grid-template-columns: 1fr;
    }

    .campo-duplo {
        grid-column: auto;
    }

    .alerta-esic {
        flex-direction: column;
        align-items: flex-start;
    }
}
