/*
  Acertos visuais das páginas de IUs (pedido ENNO).
  Ficheiro à parte, carregado depois do site.css, para não mexer no CSS partilhado.
  Cores e formas seguem o que já existe: #2E2E2E nos botões, #9FC53D como acento.
*/

/* ---------- Barra de topo: vidro fosco quando fica fixa ---------- */
.fixed-navbar {
    background-color: rgba(28, 28, 28, 0.72) !important;
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

/* ---------- Botões: mesma marca, mais leves ---------- */
.er-button {
    border-radius: 10px;
    font-size: 15px;
    letter-spacing: .02em;
    padding: 11px 26px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .10);
}

    .er-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(46, 46, 46, .22);
    }

    .er-button:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
    }

    .er-button:focus-visible {
        outline: 2px solid #9FC53D !important;
        outline-offset: 2px;
    }

/* ação destrutiva */
.er-button.enno-danger {
    background-color: transparent;
    color: #a83226;
    border: 1px solid rgba(168, 50, 38, .45);
    box-shadow: none;
}

    .er-button.enno-danger:hover {
        background-color: #a83226;
        color: #fff;
        box-shadow: 0 6px 16px rgba(168, 50, 38, .25);
    }

/* menu de opções (ex.: página da IU) em duas colunas */
.enno-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

    .enno-menu .er-button {
        width: 100%;
        margin: 0;
    }

.enno-menu-danger {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

    .enno-menu-danger .er-button {
        min-width: 220px;
    }

@media (max-width: 767.98px) {
    .enno-menu {
        grid-template-columns: 1fr;
    }

    .enno-menu-danger {
        justify-content: stretch;
    }

        .enno-menu-danger .er-button {
            width: 100%;
        }
}

/* ---------- Campos de texto ---------- */
.er-input,
select.er-button {
    border-radius: 8px;
    border: 1px solid #d8d8d8;
    padding: 9px 12px;
    background-color: #fff;
    transition: border-color .14s ease-out, box-shadow .14s ease-out;
}

    .er-input:focus,
    select.er-button:focus {
        border-color: #9FC53D;
        box-shadow: 0 0 0 3px rgba(159, 197, 61, .22);
        outline: none;
    }

select.er-button {
    color: #2E2E2E;
    text-transform: none;
    box-shadow: none;
}

/* ----------------------------------------------------------
   Marcação antiga (usada na maioria das páginas):
     <label class="Medium w-100">Rótulo<br>
        <span class="Thin info-d">valor</span>
        <input class="er-input" ...>
     </label>
   Sem tocar nas views, o rótulo passa a etiqueta discreta e o
   valor ganha destaque, como nos campos novos.
   ---------------------------------------------------------- */
label.Medium.w-100 {
    display: block;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 400;
    color: #6b6b6b;
    line-height: 1.35;
}

    label.Medium.w-100 > span.Thin,
    label.Medium.w-100 > span.info-d {
        display: block;
        margin-top: 2px;
        font-size: 15px;
        color: #2E2E2E;
        min-height: 21px;
        word-break: break-word;
    }

    label.Medium.w-100 > .er-input {
        margin-top: 3px;
    }

/* parágrafos vazios usados como espaçador: menos salto */
main p:empty {
    margin: 0;
    height: 6px;
}

/* separador de secção mais leve */
main hr:not(.er-bar) {
    border-top: 1px solid #e4e4e4;
    margin: 14px 0;
}

/* ---------- Largura e respiração da página ---------- */
.enno-page {
    max-width: 1060px;
    margin: 0 auto;
    padding: 16px 16px 32px;
}

    .enno-page h1,
    .enno-page h5,
    .enno-page h6 {
        color: #2E2E2E;
    }

    .enno-page h1 {
        font-size: 26px;
        margin-bottom: 10px;
    }

    /* títulos gerados por JS dentro de #page-content ("Meus Projetos") */
    .enno-page #page-content h1 {
        font-size: 18px;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: #6b6b6b;
        margin: 22px 0 10px;
    }

    /* listas de botões (projetos, menu da IU): largura controlada */
    .er-button.w-100,
    .er-button-dashed.w-100 {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }

/* O botão tracejado não definia cor de texto e ficava ilegível sobre fundo claro. */
.er-button-dashed {
    color: #5f7d1f;
    font-weight: 600;
}

    .er-button-dashed:hover {
        color: #fff;
    }

/* ---------- Secções ---------- */
.enno-section {
    margin-top: 28px;
}

.enno-section:first-of-type {
    margin-top: 8px;
}

.enno-section-title {
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2E2E2E;
    margin: 0 0 6px;
}

.enno-section-title::after {
    content: "";
    display: block;
    width: 38px;
    height: 2px;
    background-color: #9FC53D;
    margin-top: 6px;
}

/* ---------- Campos de formulário ---------- */
.enno-field {
    display: block;
    width: 100%;
    margin-bottom: 16px;
}

    .enno-field > .enno-label {
        display: block;
        font-size: 13px;
        color: #6b6b6b;
        margin-bottom: 3px;
    }

    .enno-field > .enno-value {
        display: block;
        font-size: 15px;
        min-height: 22px;
        word-break: break-word;
    }

    .enno-field input.er-input,
    .enno-field select {
        margin-top: 2px;
    }

.enno-required {
    color: #c0392b;
}

.enno-hint {
    font-size: 12px;
    color: #8a8a8a;
}

/* ---------- Ações ---------- */
.enno-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}

    .enno-actions .er-button {
        min-width: 190px;
    }

    /* ação secundária: mesma forma, menos peso */
    .enno-actions .er-button.enno-secondary {
        background-color: transparent;
        color: #2E2E2E;
        border: 1px solid #2E2E2E;
    }

        .enno-actions .er-button.enno-secondary:hover {
            background-color: #2E2E2E;
            color: #fff;
        }

/* ---------- Lista de IUs ---------- */
.enno-list-header {
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #6b6b6b;
    border-bottom: 2px solid #2E2E2E;
    padding-bottom: 8px;
    margin-bottom: 2px;
}

    .enno-list-header > div {
        display: flex;
        align-items: flex-start;
        gap: 4px;
        line-height: 1.25;
    }

.enno-list-row {
    align-items: center;
    border-bottom: 1px solid #e6e6e6;
    padding: 10px 0;
    transition: background-color .12s ease-out;
}

    .enno-list-row:hover {
        background-color: #f6f8ef;
    }

    .enno-list-row > div {
        word-break: break-word;
        line-height: 1.3;
    }

.enno-cell-link {
    cursor: pointer;
    text-decoration: underline;
}

    .enno-cell-link:hover {
        color: #7a9c2f;
    }

/* números alinhados (IU e NIF) */
.enno-cell-num {
    font-variant-numeric: tabular-nums;
}

.enno-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
}

/* ---------- Cabeçalho da IU ---------- */
.enno-iu-header {
    border-left: 3px solid #9FC53D;
    padding: 4px 0 4px 14px;
    margin-bottom: 20px;
}

    .enno-iu-header .enno-iu-line {
        display: flex;
        gap: 8px;
        line-height: 1.5;
    }

    .enno-iu-header .enno-iu-label {
        min-width: 130px;
        color: #6b6b6b;
        font-size: 13px;
    }

    .enno-iu-header .enno-iu-value {
        font-size: 14px;
        word-break: break-word;
    }

/* ---------- Documentos ---------- */
.enno-doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e6e6e6;
}

    .enno-doc-row:last-child {
        border-bottom: 0;
    }

.enno-doc-name {
    word-break: break-word;
}

.enno-doc-type {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    background-color: #f0f4e2;
    color: #5f7d1f;
    border-radius: 3px;
    padding: 2px 8px;
    margin-right: 8px;
}

.enno-doc-remove {
    font-size: 13px;
    padding: 5px 16px;
}

.enno-empty {
    color: #8a8a8a;
    font-style: italic;
}

/* ---------- Ecrãs estreitos ---------- */
@media (max-width: 767.98px) {
    .enno-list-header {
        display: none;
    }

    .enno-list-row {
        display: block;
        padding: 12px 0;
    }

        .enno-list-row > div {
            width: 100%;
            max-width: 100%;
            flex: none;
            padding: 1px 0;
        }

            /* rótulo antes do valor, em vez do cabeçalho da tabela */
            .enno-list-row > div[data-label]::before {
                content: attr(data-label) ": ";
                color: #6b6b6b;
                font-size: 12px;
                text-transform: uppercase;
            }

    .enno-actions .er-button {
        width: 100%;
    }

    .enno-iu-header .enno-iu-line {
        display: block;
    }

    .enno-iu-header .enno-iu-label {
        display: block;
    }
}
