/* =========================================
   PÁGINA DETALHE DA OBRA
========================================= */


/* =========================================
   VOLTAR
========================================= */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 24px;

    color: #64748b;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition: color 0.2s ease;
}

.back-link:hover {
    color: #2563eb;
}

/* =====================================
   HEADER DA OBRA
===================================== */

.obra-header {

    background: linear-gradient(
        135deg,
        #edf4ff,
        #f8fbff
    );

    border: 1px solid #b9d5f5;

    border-radius: 20px;

    padding: 28px 42px 32px;

}


/* =====================================
   TOPO
===================================== */

.obra-header-top {

    display: flex;

    justify-content: space-between;

    align-items: center;

    width: 20px;
}


/* =====================================
   META
===================================== */

.obra-header-meta {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

}


.obra-header-code {

    display: flex;

    align-items: center;

    gap: 6px;

    font-size: 13px;

    font-weight: 600;

    color: #64748b;

    padding-left: 6px;

}


/* =====================================
   TÍTULO
===================================== */

.obra-header-main {

    margin-top: 28px;
}


.obra-header-main h1 {

    margin: 0;

    font-size: clamp(
        20px,
        2.3vw,
        30px
    );

    line-height: 1.15;

    font-weight: 700;

    color: #24344d;

    letter-spacing: -0.8px;

}


/* =====================================
   AÇÕES
===================================== */

.obra-header-actions {
    display: flex;
    justify-content: flex-end;

    gap: 14px;
}

.obra-header-actions-rigth {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 14px;

    margin-top: 28px;
    padding-top: 24px;

    border-top: 1px solid rgba(80, 110, 145, 0.18);
}

.btn-header {

    height: 54px;

    padding: 0 22px;

    border-radius: 14px;

    border: 1px solid #d7dee8;

    background: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;

}


.btn-edit {

    color: #2f5fae;

}


.btn-warning {

    color: #b56b0c;

}


.btn-danger {

    color: #c93b32;

}


.btn-header:hover {

    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(
        15,
        23,
        42,
        0.08
    );

}

/* =========================================
   BADGES
========================================= */

.empresa-badge {
    display: inline-flex;
    align-items: center;

    padding: 7px 11px;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}


.empresa-badge.egmosil {
    background: rgba(37, 99, 235, 0.10);
    color: #2563eb;
}


.empresa-badge.pavimosil {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}


/* =========================================
   ESTADOS
========================================= */

.status {
    display: inline-flex;
    align-items: center;

    padding: 7px 11px;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}


.status.por-iniciar {
    background: #f3f4f6;
    color: #6b7280;
}


.status.em-execucao {
    background: #eff6ff;
    color: #2563eb;
}


.status.concluida {
    background: #ecfdf5;
    color: #059669;
}

.status.suspensa {
    background: #ff0000;
    color: #ffffff;
}


/* =========================================
   BOTÕES
========================================= */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    height: 42px;

    padding: 0 16px;

    border-radius: 9px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.btn-primary {
    border: none;

    background: #2563eb;
    color: #ffffff;
}


.btn-primary:hover {
    background: #1d4ed8;

    transform: translateY(-1px);

    box-shadow:
        0 6px 16px rgba(37, 99, 235, 0.25);
}


.btn-secondary {
    background: #ffffff;

    border: 1px solid #d1d5db;

    color: #374151;
}


.btn-secondary:hover {
    background: #f8fafc;

    border-color: #9ca3af;
}


/* =========================================
   SECÇÕES
========================================= */

.obra-section {
    margin-bottom: 34px;
}


.section-heading {
    margin-bottom: 18px;
}


.section-heading h2 {
    margin: 0 0 6px;

    color: #1e293b;

    font-size: 22px;
    font-weight: 700;
}


.section-heading p {
    margin: 0;

    color: #64748b;

    font-size: 14px;
}


.section-heading-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


/* =========================================
   RESUMO FINANCEIRO
========================================= */

.financial-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}


.stat-card {
    padding: 22px;
    height: 90%;
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04);
}


.stat-card-top {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 18px;
}


.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 11px;

    font-size: 17px;
}


.stat-icon.blue {
    background: #eff6ff;
    color: #2563eb;
}


.stat-icon.green {
    background: #ecfdf5;
    color: #059669;
}


.stat-icon.orange {
    background: #fff7ed;
    color: #ea580c;
}


.stat-label {
    color: #64748b;

    font-size: 13px;
    font-weight: 600;
}


.stat-value {
    color: #1e293b;

    font-size: 26px;
    font-weight: 700;

    letter-spacing: -0.02em;
}


/* =========================================
   PROGRESSO
========================================= */

.progress-card {
    margin-top: 18px;

    padding: 22px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04);
}


.progress-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}


.progress-header h3 {
    margin: 0 0 5px;

    color: #1e293b;

    font-size: 16px;
}


.progress-header p {
    margin: 0;

    color: #64748b;

    font-size: 13px;
}


.progress-header strong {
    color: #2563eb;

    font-size: 20px;
}


.progress-bar {
    width: 100%;
    height: 10px;

    overflow: hidden;

    background: #e2e8f0;

    border-radius: 20px;
}


.progress-fill {
    height: 100%;

    background: #2563eb;

    border-radius: 20px;

    transition: width 0.5s ease;
}


/* =========================================
   INFORMAÇÕES DA OBRA
========================================= */

.info-card {
    padding: 24px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04);
}


.info-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}


.info-item {
    display: flex;
    flex-direction: column;

    gap: 8px;
}


.info-label {
    display: flex;
    align-items: center;

    gap: 8px;

    color: #94a3b8;

    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.04em;
}


.info-label i {
    color: #64748b;
}


.info-item strong {
    color: #334155;

    font-size: 15px;
    font-weight: 600;
}


.observacoes {
    margin-top: 26px;
    padding-top: 22px;

    border-top: 1px solid #e5e7eb;
}


.observacoes p {
    margin: 10px 0 0;

    color: #475569;

    font-size: 14px;

    line-height: 1.6;
}


/* =========================================
   FATURAÇÃO
========================================= */

.faturacao-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04);
}


.faturacao-table {
    width: 100%;
}


.faturacao-header,
.faturacao-row {
    display: grid;

    grid-template-columns:
        140px
        180px
        minmax(200px, 1fr)
        150px
        150px
        100px
        76px;

    align-items: center;
}


.faturacao-header {
    padding: 14px 22px;

    background: #f8fafc;

    border-bottom: 1px solid #e5e7eb;

    color: #64748b;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.04em;
}


.faturacao-row {
    padding: 17px 22px;

    color: #475569;

    font-size: 14px;

    border-bottom: 1px solid #edf0f3;

    transition: background 0.2s ease;
}


.faturacao-row:last-child {
    border-bottom: none;
}


.faturacao-row:hover {
    background: #f8fafc;
}


.money {
    color: #1e293b;

    font-weight: 700;

    white-space: nowrap;
}


/* =========================================
   FATURAÇÃO VAZIA
========================================= */

.empty-section {
    display: flex;
    flex-direction: column;

    align-items: center;

    padding: 50px 25px;

    text-align: center;
}


.empty-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    margin-bottom: 16px;

    background: #f1f5f9;

    border-radius: 16px;

    color: #64748b;

    font-size: 23px;
}


.empty-section h3 {
    margin: 0 0 8px;

    color: #334155;

    font-size: 17px;
}


.empty-section p {
    margin: 0;

    color: #94a3b8;

    font-size: 14px;
}


/* =========================================
   RECURSOS
========================================= */

.resources-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}


.resource-card-large {
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04);
}


.resource-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 22px;

    border-bottom: 1px solid #edf0f3;
}


.resource-title {
    display: flex;
    align-items: center;

    gap: 10px;
}


.resource-title > i {
    color: #2563eb;

    font-size: 18px;
}


.resource-title h3 {
    margin: 0;

    color: #1e293b;

    font-size: 17px;
}


.resource-header p {
    margin: 8px 0 0;

    color: #94a3b8;

    font-size: 13px;
}


.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    flex-shrink: 0;

    border: none;
    border-radius: 9px;

    background: #eff6ff;

    color: #2563eb;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.btn-icon:hover {
    background: #dbeafe;

    transform: translateY(-1px);
}


/* =========================================
   LISTA DE RECURSOS
========================================= */

.resource-list {
    padding: 8px 0;
}


.resource-item {
    display: flex;
    align-items: center;

    gap: 13px;

    padding: 14px 22px;

    transition: background 0.2s ease;
}


.resource-item:hover {
    background: #f8fafc;
}


.resource-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #eff6ff;

    color: #2563eb;

    font-size: 14px;
    font-weight: 700;
}


.resource-avatar.vehicle {
    border-radius: 10px;

    background: #fff7ed;

    color: #ea580c;
}


.resource-item > div:last-child {
    display: flex;
    flex-direction: column;

    gap: 4px;
}


.resource-item strong {
    color: #334155;

    font-size: 14px;
    font-weight: 650;
}


.resource-item span {
    color: #94a3b8;

    font-size: 13px;
}


.resource-empty {
    padding: 30px 22px;

    color: #94a3b8;

    font-size: 14px;

    text-align: center;
}


/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 1000px) {

    .financial-grid {
        grid-template-columns: 1fr;
    }


    .info-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .resources-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 700px) {

    .obra-header {
        flex-direction: column;

        padding: 20px;
    }


    .obra-header h1 {
        font-size: 25px;
    }


    .obra-header-actions {
        width: 100%;
    }


    .obra-header-actions .btn-secondary {
        width: 100%;
    }


    .section-heading-actions {
        flex-direction: column;

        align-items: stretch;
    }


    .section-heading-actions .btn-primary {
        width: 100%;
    }


    .info-grid {
        grid-template-columns: 1fr;
    }


    .faturacao-card {
        overflow-x: auto;
    }


    .faturacao-table {
        min-width: 700px;
    }

}

/* =========================================
   DOCUMENTOS
========================================= */

.documents-card {

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 16px;

    overflow: hidden;

    box-shadow:
        0 2px 10px rgba(15, 23, 42, 0.04);

}


.documents-table {

    width: 100%;

}


.documents-header {

    display: grid;

    grid-template-columns:
        140px
        110px
        150px
        minmax(200px, 1fr)
        130px
        70px;

    gap: 16px;

    padding: 14px 20px;

    background: #f8fafc;

    border-bottom: 1px solid #e5e7eb;

    color: #64748b;

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.05em;

}


.documents-row {

    display: grid;

    grid-template-columns:
        140px
        110px
        150px
        minmax(200px, 1fr)
        130px
        70px;

    gap: 16px;

    align-items: center;

    padding: 16px 20px;

    border-bottom: 1px solid #edf0f3;

    font-size: 13px;

    color: #374151;

}


.documents-row:last-child {

    border-bottom: none;

}


.documents-row:hover {

    background: #f8fafc;

}


/* =========================================
   TIPO DE DOCUMENTO
========================================= */

.document-type {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 7px 10px;

    border-radius: 8px;

    font-size: 11px;

    font-weight: 700;

}


.document-type.fatura {

    background: #ecfdf5;

    color: #059669;

}


.document-type.auto {

    background: #eff6ff;

    color: #2563eb;

}


.document-type.contrato {

    background: #f5f3ff;

    color: #7c3aed;

}


.document-type.orcamento {

    background: #fff7ed;

    color: #c2410c;

}


.document-type.licenca {

    background: #fefce8;

    color: #a16207;

}


.document-type.outro {

    background: #f3f4f6;

    color: #6b7280;

}


/* =========================================
   DESCRIÇÃO
========================================= */

.document-description {

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


/* =========================================
   FICHEIRO
========================================= */

.document-file {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 34px;

    height: 34px;

    border-radius: 8px;

    background: #eff6ff;

    color: #2563eb;

    text-decoration: none;

    transition: all 0.2s ease;

}


.document-file:hover {

    background: #2563eb;

    color: #ffffff;

}


.no-file {

    color: #cbd5e1;

}


/* =========================================
   TOTAL AUTOS
========================================= */

.stat-icon.purple {

    background: #f5f3ff;

    color: #7c3aed;

}


/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 900px) {

    .documents-card {

        overflow-x: auto;

    }


    .documents-header,
    .documents-row {

        min-width: 850px;

    }

}

/* =========================================
   DOCUMENTOS
========================================= */

.documentos-summary {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;

    margin-bottom: 20px;
}


.documento-summary-card {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 18px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04);
}


.documento-summary-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    border-radius: 12px;

    font-size: 18px;
}


.documento-summary-icon.faturas {
    background: #eff6ff;
    color: #2563eb;
}


.documento-summary-icon.autos {
    background: #fff7ed;
    color: #ea580c;
}


.documento-summary-icon.outros {
    background: #f3f4f6;
    color: #6b7280;
}


.documento-summary-card div:last-child {
    display: flex;

    flex-direction: column;

    gap: 3px;
}


.documento-summary-card span {
    font-size: 13px;

    color: #64748b;
}


.documento-summary-card strong {
    font-size: 22px;

    color: #1f2937;
}


/* =========================================
   TABS
========================================= */

.documentos-tabs {
    display: flex;

    gap: 8px;

    padding-bottom: 14px;

    margin-bottom: 18px;

    border-bottom: 1px solid #e5e7eb;
}


.documento-tab {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 10px 16px;

    border: none;

    border-radius: 9px;

    background: transparent;

    color: #64748b;

    font-family: inherit;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;
}


.documento-tab:hover {
    background: #f8fafc;

    color: #374151;
}


.documento-tab.active {
    background: #eff6ff;

    color: #2563eb;
}


.documento-tab span {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 22px;
    height: 22px;

    padding: 0 6px;

    border-radius: 20px;

    background: rgba(37, 99, 235, 0.12);

    font-size: 11px;

    font-weight: 700;
}


/* =========================================
   CONTEÚDO DAS TABS
========================================= */

.documento-tab-content {
    display: none;
}


.documento-tab-content.active {
    display: block;
}


/* =========================================
   ANEXOS
========================================= */

.documento-anexo {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 7px 10px;

    border-radius: 7px;

    background: #f1f5f9;

    color: #475569;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    transition: all 0.2s ease;
}


.documento-anexo:hover {
    background: #e2e8f0;

    color: #1e293b;
}

/* =========================================
   AÇÕES DOS DOCUMENTOS
========================================= */

.documento-acoes {
    display: flex;

    align-items: center;
    justify-content: flex-end;
}


.documento-editar-btn {
    width: 34px;
    height: 34px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #dbe3ea;
    border-radius: 8px;

    background: #ffffff;

    color: #64748b;

    font-size: 13px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.documento-editar-btn:hover {
    background: #eff6ff;

    border-color: #93c5fd;

    color: #2563eb;

    transform: translateY(-1px);
}


.documento-editar-btn:active {
    transform: translateY(0);
}

/* =========================================
   FICHEIRO ATUAL - EDITAR DOCUMENTO
========================================= */

.documento-ficheiro-atual {
    min-height: 44px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 11px 13px;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    background: #f8fafc;

    color: #475569;

    font-size: 13px;

    box-sizing: border-box;
}


.documento-ficheiro-atual i {
    color: #2563eb;
}


.form-group small {
    margin-top: 2px;

    color: #94a3b8;

    font-size: 12px;
}


body.modal-open {
    overflow: hidden;
}

.tipo-documento {
    display: inline-flex;

    align-items: center;

    padding: 5px 9px;

    border-radius: 6px;

    background: #f1f5f9;

    color: #475569;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 800px) {

    .documentos-summary {
        grid-template-columns: 1fr;
    }


    .documentos-tabs {
        overflow-x: auto;

        padding-bottom: 10px;
    }


    .documento-tab {
        white-space: nowrap;
    }

}


/* =========================================
   PRAZO DA OBRA
========================================= */

.obra-prazo-section {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}


/* =========================================
   HEADER
========================================= */

.obra-prazo-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding-bottom: 20px;
    margin-bottom: 24px;

    border-bottom: 1px solid #eeeeee;
}


.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
}


.section-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #f3f4f6;

    font-size: 18px;
}


.section-title h2 {
    margin: 0;

    font-size: 18px;
    font-weight: 700;

    color: #1f2937;
}


.section-title p {
    margin: 4px 0 0;

    font-size: 13px;

    color: #9ca3af;
}


/* =========================================
   ESTADO
========================================= */

.obra-status {
    display: inline-flex;

    align-items: center;
    gap: 7px;

    padding: 8px 14px;

    border-radius: 20px;

    font-size: 13px;
    font-weight: 600;
}


.status-suspensa {
    background: #ff0000;
    color: #ffffff;
}


.status-normal {
    background: #f3f4f6;
    color: #4b5563;
}


/* =========================================
   GRID
========================================= */

.prazo-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}


/* =========================================
   CARD
========================================= */

.prazo-card {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 18px;

    background: #fafafa;

    border: 1px solid #eeeeee;

    border-radius: 12px;

    transition: all 0.2s ease;
}


.prazo-card:hover {

    transform: translateY(-2px);

    background: #ffffff;

    box-shadow:
        0 8px 20px
        rgba(0, 0, 0, 0.05);
}


.prazo-card-icon {

    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #eeeeee;

    color: #374151;
}


.prazo-card-content {

    display: flex;

    flex-direction: column;

    gap: 4px;
}


.prazo-label {

    font-size: 12px;

    color: #9ca3af;
}


.prazo-value {

    font-size: 16px;

    font-weight: 700;

    color: #1f2937;
}


/* =========================================
   DESTAQUE
========================================= */

.prazo-card-highlight {

    background: #f8fafc;

    border-color: #dbe3ea;
}


.prazo-card-remaining {

    background: #fafafa;
}


/* =========================================
   PROGRESSO
========================================= */

.prazo-progress-container {

    margin-top: 24px;

    padding: 20px;

    background: #fafafa;

    border-radius: 12px;

    border: 1px solid #eeeeee;
}


.prazo-progress-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 12px;

    font-size: 14px;

    color: #6b7280;
}


.prazo-progress-header strong {

    color: #1f2937;
}


.prazo-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}


.prazo-progress-fill,
.prazo-progress-fill-atrasada,
.prazo-progress-fill-suspensa {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Normal */

.prazo-progress-fill {
    background: #2563eb;
}


/* Atrasada */

.prazo-progress-fill-atrasada {
    background: #dc2626;
}


/* Suspensa */

.prazo-progress-fill-suspensa {
    background: #f50b0b;
}

/* =========================================
   HEADER DA OBRA - ESTADOS
========================================= */

.obra-header {
    border-radius: 16px;
    padding: 28px 32px;
}


/* =========================================
   EM EXECUÇÃO
========================================= */

.obra-header-execucao {
    background: #dbeafe;
    border: 1px solid #93c5fd;
}


/* =========================================
   CONCLUÍDA
========================================= */

.obra-header-concluida {
    background: #dcfce7;
    border: 1px solid #86efac;
}


/* =========================================
   SUSPENSA
========================================= */

.obra-header-suspensa {
    background: #ffd5d5;
    border: 1px solid #fd7474;
}


/* =========================================
   ATRASADA
========================================= */

.obra-header-atrasada {
    background: #fee2e2;
    border: 1px solid #fca5a5;
}


/* =========================================
   POR INICIAR
========================================= */

.obra-header-por-iniciar {
    background: #fef9c3;
    border: 1px solid #fde047;
}


/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 900px) {

    .prazo-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 600px) {

    .obra-prazo-section {

        padding: 18px;
    }


    .obra-prazo-section .section-header {

        flex-direction: column;

        align-items: flex-start;
    }


    .prazo-grid {

        grid-template-columns: 1fr;
    }


    .prazo-progress-info {

        flex-direction: column;

        gap: 5px;
    }

}

.status-suspensa {
    background: #ff0000;
    color: #ffffff;
}

.status-atrasada {
    background: #fef2f2;
    color: #dc2626;
}

.status-normal {
    background: #f3f4f6;
    color: #4b5563;
}

/* =========================================
   OBRA SUSPENSA
========================================= */

.prazo-card-suspensa {
    background: #ff0000;
    color: #ffffff;
}

.prazo-card-suspensa .prazo-card-icon {
    background: #ff0000;
    color: #ffffff;
}

.prazo-card-suspensa .prazo-value {
    color: #ff0000;
}


/* =========================================
   OBRA ATRASADA
========================================= */

.prazo-progress-fill-atrasada {
    background: #ff0000;
    border-color: #fecaca;
}

.prazo-progress-fill-suspensa {
    background: #ff0000;
    color: #ffffff;
}

/* =========================================
   DETAIL TABS
========================================= */

.detail-tabs {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 6px;

    margin-bottom: 24px;

    margin-top: 24px;

    background: #f5f5f5;

    border-radius: 14px;

    overflow-x: auto;

}


.detail-tab {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 12px 18px;

    border: none;

    border-radius: 10px;

    background: transparent;

    color: #6b7280;

    font-family: inherit;

    font-size: 14px;

    font-weight: 600;

    white-space: nowrap;

    cursor: pointer;

    transition: all 0.2s ease;

}


.detail-tab:hover {

    background: rgba(255, 255, 255, 0.7);

    color: #1f2937;

}


.detail-tab.active {

    background: #0051ff42;

    color: #111827;

    box-shadow:
        0 2px 8px
        rgba(0, 0, 0, 0.08);

}


.detail-tab i {

    font-size: 14px;

}


/* =========================================
   TAB CONTENT
========================================= */

.detail-tab-panel {

    display: none;

}


.detail-tab-panel.active {

    display: block;

}




.btn-header {
    height: 42px;

    padding: 0 18px;

    border-radius: 10px;

    border: 1px solid #d9e0ea;

    background: #ffffff;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;
}


/* EDITAR */

.btn-editar {
    color: #2563eb;
}

.btn-editar:hover {
    background: #eff6ff;
    border-color: #2563eb;
}


/* SUSPENDER */

.btn-suspender {
    color: #d97706;
}

.btn-suspender:hover {
    background: #fff7ed;
    border-color: #f59e0b;
}


/* ELIMINAR */

.btn-eliminar {
    color: #dc2626;
}

.btn-eliminar:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* RETOMAR */

.btn-retomar {
    color: #348d04;
}

.btn-retomar:hover {
    background: #fff7ed;
    border-color: #f59e0b;
}

/* =========================================
   MODAIS
========================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
}




.modal {
    width: 100%;
    max-width: 700px;

    max-height: 90vh;

    overflow-y: auto;

    background: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    padding: 24px;

    border-bottom: 1px solid #e5e7eb;
}


.modal-header h2 {
    margin: 0;
}


.modal-header p {
    margin: 6px 0 0;

    color: #6b7280;
}


.modal-close {
    border: none;

    background: transparent;

    font-size: 22px;

    cursor: pointer;
}


.modal-body {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;

    padding: 24px;
}


.form-group {
    display: flex;

    flex-direction: column;

    gap: 8px;
}


.form-group-full {
    grid-column: 1 / -1;
}


.form-group label {
    font-weight: 600;
}


.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    box-sizing: border-box;

    padding: 12px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    font-family: inherit;
}


.modal-footer {
    display: flex;

    justify-content: flex-end;

    gap: 12px;

    padding: 20px 24px;

    border-top: 1px solid #e5e7eb;
}


@media (max-width: 600px) {

    .modal-body {

        grid-template-columns: 1fr;

    }

}

/* =========================================
   MODAL EDITAR OBRA
========================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(15, 23, 42, 0.55);

    z-index: 9999;

    overflow-y: auto;
}


/* MODAL ATIVA */

.modal-overlay.active {
    display: flex;
}


/* =========================================
   CAIXA DA MODAL
========================================= */

.modal-editar-obra {
    width: 100%;
    max-width: 850px;

    max-height: calc(100vh - 48px);

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.28);

    animation: modalEntrada 0.25s ease;
}


/* =========================================
   HEADER
========================================= */

.modal-editar-obra .modal-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 24px 28px;

    border-bottom: 1px solid #e5e7eb;

    background: #ffffff;
}


.modal-editar-obra .modal-header h2 {
    margin: 0;

    font-size: 22px;
    font-weight: 700;

    color: #111827;
}


.modal-editar-obra .modal-header p {
    margin: 6px 0 0;

    font-size: 14px;

    color: #6b7280;
}


/* =========================================
   BOTÃO FECHAR
========================================= */

.modal-editar-obra .modal-close {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: none;

    border-radius: 10px;

    background: #f3f4f6;

    color: #6b7280;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.modal-editar-obra .modal-close:hover {
    background: #fee2e2;

    color: #dc2626;

    transform: rotate(90deg);
}


/* =========================================
   BODY
========================================= */

.modal-editar-obra .modal-body {
    flex: 1;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;

    padding: 28px;

    overflow-y: auto;
}


/* =========================================
   FORM GROUP
========================================= */

.modal-editar-obra .form-group {
    display: flex;

    flex-direction: column;

    gap: 8px;
}


.modal-editar-obra .form-group-full {
    grid-column: 1 / -1;
}


.modal-editar-obra .form-group label {
    font-size: 13px;

    font-weight: 600;

    color: #374151;
}


/* =========================================
   INPUTS
========================================= */

.modal-editar-obra input,
.modal-editar-obra select,
.modal-editar-obra textarea {
    width: 100%;

    box-sizing: border-box;

    padding: 12px 14px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    background: #ffffff;

    color: #111827;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* FOCUS */

.modal-editar-obra input:focus,
.modal-editar-obra select:focus,
.modal-editar-obra textarea:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* PLACEHOLDER */

.modal-editar-obra input::placeholder,
.modal-editar-obra textarea::placeholder {
    color: #9ca3af;
}


/* TEXTAREA */

.modal-editar-obra textarea {
    resize: vertical;

    min-height: 110px;

    line-height: 1.5;
}


/* =========================================
   SELECT
========================================= */

.modal-editar-obra select {
    cursor: pointer;
}


/* =========================================
   FOOTER
========================================= */

.modal-editar-obra .modal-footer {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 12px;

    padding: 18px 28px;

    border-top: 1px solid #e5e7eb;

    background: #f9fafb;
}


/* =========================================
   BOTÃO SECUNDÁRIO
========================================= */

.modal-editar-obra .btn-secondary {
    padding: 11px 18px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    background: #ffffff;

    color: #374151;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}


.modal-editar-obra .btn-secondary:hover {
    background: #f3f4f6;

    border-color: #9ca3af;
}


/* =========================================
   BOTÃO GUARDAR
========================================= */

.modal-editar-obra .btn-primary {
    padding: 11px 20px;

    border: none;

    border-radius: 10px;

    background: #2563eb;

    color: #ffffff;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.modal-editar-obra .btn-primary:hover {
    background: #1d4ed8;

    transform: translateY(-1px);

    box-shadow:
        0 6px 15px rgba(37, 99, 235, 0.25);
}


.modal-editar-obra .btn-primary:active {
    transform: translateY(0);
}


/* =========================================
   ANIMAÇÃO
========================================= */

@keyframes modalEntrada {

    from {

        opacity: 0;

        transform:
            translateY(20px)
            scale(0.98);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 700px) {

    .modal-overlay {
        padding: 12px;
    }


    .modal-editar-obra {
        max-height: calc(100vh - 24px);

        border-radius: 14px;
    }


    .modal-editar-obra .modal-header {
        padding: 20px;
    }


    .modal-editar-obra .modal-body {
        grid-template-columns: 1fr;

        padding: 20px;
    }


    .modal-editar-obra .modal-footer {
        padding: 16px 20px;
    }


    .modal-editar-obra .modal-footer {
        flex-direction: column-reverse;
    }


    .modal-editar-obra .modal-footer button {
        width: 100%;
    }

}




/* =========================================
   MODAL EDITAR OBRA
========================================= */

.modal-editar-obra .modal-body {
    display: block;
}


/* NOME E OBSERVAÇÕES */

.modal-editar-obra .form-group-full {
    width: 100%;
    margin-bottom: 18px;
}


/* LINHAS */

.modal-editar-obra .editar-obra-row {
    display: grid;
    width: 100%;
    gap: 18px;
    margin-bottom: 18px;
}


/* 4 CAMPOS */

.modal-editar-obra .editar-obra-row-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}


/* 3 CAMPOS */

.modal-editar-obra .editar-obra-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* 2 CAMPOS */
.modal-editar-obra .editar-obra-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* CAMPOS */

.modal-editar-obra .editar-obra-row .form-group {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
}


.modal-editar-obra .editar-obra-row input,
.modal-editar-obra .editar-obra-row select {
    width: 100%;
    box-sizing: border-box;
}


/* RESPONSIVO */

@media (max-width: 900px) {

    .modal-editar-obra .editar-obra-row-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .modal-editar-obra .editar-obra-row-4,
    .modal-editar-obra .editar-obra-row-3 {
        grid-template-columns: 1fr;
    }

}

.faturacao-header-autos,
.faturacao-row-autos {
    display: grid;

    grid-template-columns:
        120px
        170px
        minmax(200px, 1fr)
        150px
        130px
        100px
        48px;

    align-items: center;
}

/* =========================================
   VALORES DE FATURAÇÃO
========================================= */

/* CRÉDITO - Faturas */
.valor-credito {
    color: #1f8f4e;
    font-weight: 600;
    text-align: right;
}


/* DÉBITO - Notas de crédito */
.valor-debito {
    color: #d64545;
    font-weight: 600;
    text-align: right;
}

/* =====================================
   OUTROS DOCUMENTOS
===================================== */

.outros-header,
.outros-row {
    display: grid;

    grid-template-columns:
        130px
        110px
        minmax(140px, 220px)
        minmax(300px, 1fr)
        90px
        48px;

    align-items: center;

    gap: 20px;

    padding: 14px 20px;
}


/* Cabeçalho */

.outros-header {
    font-size: 12px;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.8px;

    color: #64748b;

    border-bottom: 1px solid #e5e7eb;
}


/* Linhas */

.outros-row {
    border-bottom: 1px solid #edf0f4;

    transition: 0.2s ease;
}


.outros-row:last-child {
    border-bottom: none;
}


.outros-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.outros-row-title
{
    padding: 17px 22px;
    color: #475569;
    font-size: 14px;
    border-bottom: 1px solid #edf0f3;
    transition: background 0.2s ease;
}

/* =====================================
   DOCUMENTO
===================================== */

.outros-row > div:nth-child(3) {
    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =====================================
   DESCRIÇÃO
===================================== */

.outros-row > div:nth-child(4) {
    min-width: 0;

    line-height: 1.5;

    word-break: break-word;
}


/* =========================================
   OBJETIVO MENSAL
========================================= */

.objetivo-mensal-card {

    background: #ffffff;

    border: 1px solid #e1e7ef;

    border-radius: 20px;

    padding: 28px;

    margin-bottom: 28px;

    box-shadow:
        0 8px 30px rgba(25, 45, 75, 0.05);

}


/* =========================================
   HEADER
========================================= */

.objetivo-mensal-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    padding-bottom: 24px;

    border-bottom: 1px solid #edf0f4;

}


.section-eyebrow {

    display: flex;

    align-items: center;

    gap: 8px;

    color: #3264b7;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 1px;

}


.objetivo-mensal-header h2 {

    margin: 10px 0 6px;

    font-size: 22px;

}


.objetivo-mensal-header p {

    margin: 0;

    color: #718096;

}


/* =========================================
   STATUS
========================================= */

.objetivo-status {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 9px 14px;

    border-radius: 10px;

    font-size: 13px;

    font-weight: 700;

}


.objetivo-status.atrasado {

    background: #fff1f1;

    color: #c84a4a;

}


.objetivo-status.progresso {

    background: #fff6e7;

    color: #b7791f;

}


.objetivo-status.quase {

    background: #edf4ff;

    color: #3264b7;

}


.objetivo-status.atingido {

    background: #eaf8ef;

    color: #24864d;

}


/* =========================================
   CONTEÚDO
========================================= */

.objetivo-mensal-content {

    display: flex;

    align-items: center;

    gap: 45px;

    padding-top: 30px;

}


/* =========================================
   CÍRCULO
========================================= */

.objetivo-progress-circle {

    --cor: #3264b7;

    width: 180px;

    height: 180px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background:

        conic-gradient(
            var(--cor)
            calc(var(--percentagem) * 1%),

            #edf1f5 0
        );

    position: relative;

}


.objetivo-progress-circle::before {

    content: "";

    position: absolute;

    width: 145px;

    height: 145px;

    border-radius: 50%;

    background: #ffffff;

}


.objetivo-progress-inner {

    position: relative;

    z-index: 1;

    text-align: center;

}


.objetivo-progress-inner strong {

    display: block;

    font-size: 36px;

    color: #25364d;

}


.objetivo-progress-inner span {

    font-size: 13px;

    color: #7b8798;

}


/* CORES */

.objetivo-progress-circle.atrasado {

    --cor: #d85a5a;

}


.objetivo-progress-circle.progresso {

    --cor: #d9922e;

}


.objetivo-progress-circle.quase {

    --cor: #3264b7;

}


.objetivo-progress-circle.atingido {

    --cor: #2fa260;

}


/* =========================================
   VALORES
========================================= */

.objetivo-valores {

    flex: 1;

    display: flex;

    flex-direction: column;

    gap: 20px;

}


.objetivo-valor-item {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding-bottom: 16px;

    border-bottom: 1px solid #edf0f4;

}


.objetivo-label {

    color: #718096;

    font-size: 14px;

}


.objetivo-valor {

    font-size: 22px;

    color: #27364a;

}


.objetivo-valor.faturado {

    color: #3264b7;

}


/* =========================================
   MENSAGEM
========================================= */

.objetivo-mensagem {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 14px 16px;

    border-radius: 12px;

    background: #f5f8fc;

    color: #59697d;

}


.objetivo-mensagem i {

    color: #3264b7;

}


.objetivo-ultrapassado {

    background: #edf9f1;

    color: #287c49;

}


.objetivo-ultrapassado i {

    color: #d69b21;

}

@media (max-width: 700px) {

    .objetivo-mensal-header {

        flex-direction: column;

    }


    .objetivo-mensal-content {

        flex-direction: column;

        align-items: center;

    }


    .objetivo-valores {

        width: 100%;

    }

}

/* =====================================
   OBJETIVO MENSAL - SEM OBJETIVO
===================================== */

.objetivo-vazio-card {

    background: #ffffff;

    border: 1px dashed #cbd5e1;

    border-radius: 16px;

    padding: 26px 30px;

    margin-bottom: 24px;

}


.objetivo-vazio-content {

    display: flex;

    align-items: center;

    gap: 20px;

}


.objetivo-vazio-icon {

    width: 54px;

    height: 54px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 14px;

    background: #eff6ff;

    color: #3564b8;

    font-size: 22px;

}


.objetivo-vazio-info {

    flex: 1;

}


.objetivo-vazio-label {

    display: block;

    margin-bottom: 5px;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 0.08em;

    color: #64748b;

}


.objetivo-vazio-info h3 {

    margin: 0 0 5px;

    font-size: 18px;

    color: #253246;

}


.objetivo-vazio-info p {

    margin: 0;

    font-size: 14px;

    color: #64748b;

}


.btn-definir-objetivo {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 11px 18px;

    border: none;

    border-radius: 10px;

    background: #3564b8;

    color: #ffffff;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;

}


.btn-definir-objetivo:hover {

    transform: translateY(-1px);

    opacity: 0.92;

}

/* =========================================
   GRELHA PRINCIPAL
========================================= */

.financial-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 24px;

}


/* =========================================
   SEGUNDA LINHA
========================================= */

.financial-secondary-grid {

    gap: 24px;

    margin-top: 24px;

    align-items: stretch;

}


/* =========================================

   TOTAL DE AUTOS — 1 COLUNA

========================================= */

.total-autos-card {

    grid-column: span 1;

}

/* =========================================

   OBJETIVO MENSAL — 2 COLUNAS

========================================= */

.objetivo-mensal-card {

    grid-column: span 2;

}



/* =========================================
   HEADER OBJETIVO
========================================= */

.objetivo-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 16px;

}


.objetivo-title {

    display: flex;

    align-items: center;

    gap: 14px;

}


.objetivo-title small {

    display: block;

    margin-top: 3px;

    font-size: 12px;

    color: #94a3b8;

}


.objetivo-percentagem {

    font-size: 24px;

    font-weight: 700;

    color: #2563eb;

}


/* =========================================
   VALOR PRINCIPAL
========================================= */

.objetivo-valor-principal {

    margin-top: 24px;

    font-size: 28px;

    font-weight: 700;

    color: #1e293b;

}


.objetivo-label-principal {

    display: block;

    margin-top: 4px;

    font-size: 12px;

    color: #94a3b8;

}


/* =========================================
   COMPARAÇÃO
========================================= */

.objetivo-comparacao {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;

    margin-top: 22px;

}


.objetivo-comparacao-item {

    display: flex;

    flex-direction: column;

    gap: 5px;

}


.objetivo-comparacao-item span {

    font-size: 12px;

    color: #64748b;

}


.objetivo-comparacao-item strong {

    font-size: 16px;

    color: #334155;

}


.objetivo-atingido {

    color: #16a34a !important;

}


/* =========================================
   BARRA
========================================= */

.objetivo2-progress-bar {

    width: 100%;

    height: 8px;

    margin-top: 22px;

    overflow: hidden;

    border-radius: 999px;

    background: #e2e8f0;

}


.objetivo-progress-fill {

    height: 100%;

    border-radius: inherit;

    background: #2563eb;

    transition: width 0.4s ease;

}


.objetivo-progress-fill.atingido {

    background: #16a34a;

}


/* =========================================
   FOOTER
========================================= */

.objetivo-progress-footer {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 10px;

    font-size: 12px;

    color: #64748b;

}


.objetivo-status {

    font-weight: 600;

    color: #2563eb;

}


.objetivo-status.sucesso {

    color: #16a34a;

}


/* =========================================
   SEM OBJETIVO
========================================= */

.objetivo-empty {

    display: flex;

    flex-direction: column;

    gap: 20px;

    margin-top: 26px;

}


.objetivo-empty-text {

    display: flex;

    flex-direction: column;

    gap: 6px;

}


.objetivo-empty-text strong {

    font-size: 18px;

    color: #334155;

}


.objetivo-empty-text span {

    font-size: 13px;

    line-height: 1.5;

    color: #64748b;

}


.btn-definir-objetivo {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    width: fit-content;

    padding: 10px 16px;

    border: 1px solid #cbd5e1;

    border-radius: 10px;

    background: #ffffff;

    color: #2563eb;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;

}


.btn-definir-objetivo:hover {

    background: #eff6ff;

    border-color: #2563eb;

}

/* =========================================
   MODAL OBJETIVO
========================================= */

.objetivo-modal {

    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

}


.objetivo-modal.active {

    display: flex;

}


/* =========================================
   OVERLAY
========================================= */

.objetivo-modal-overlay {

    position: absolute;

    inset: 0;

    background:
        rgba(15, 23, 42, 0.65);

    backdrop-filter:
        blur(6px);

}


/* =========================================
   CONTENT
========================================= */

.objetivo-modal-content {

    position: relative;

    width: 100%;

    max-width: 520px;

    overflow: hidden;

    background: #ffffff;

    border-radius: 20px;

    box-shadow:
        0 30px 80px
        rgba(15, 23, 42, 0.30);

}


/* =========================================
   HEADER
========================================= */

.objetivo-modal-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    padding: 28px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #faf5ff
        );

    border-bottom:
        1px solid #e2e8f0;

}


.objetivo-modal-eyebrow {

    display: block;

    margin-bottom: 6px;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.12em;

    color: #8b5cf6;

}


.objetivo-modal-header h2 {

    margin: 0;

    font-size: 23px;

    color: #0f172a;

}


.objetivo-modal-header p {

    margin: 7px 0 0;

    font-size: 13px;

    line-height: 1.5;

    color: #64748b;

}


/* =========================================
   FECHAR
========================================= */

.objetivo-modal-close {

    width: 40px;

    height: 40px;

    border: none;

    border-radius: 10px;

    background: #f1f5f9;

    color: #64748b;

    cursor: pointer;

    font-size: 17px;

    transition: all 0.2s ease;

}


.objetivo-modal-close:hover {

    background: #fee2e2;

    color: #dc2626;

    transform: rotate(90deg);

}


/* =========================================
   BODY
========================================= */

.objetivo-modal-body {

    padding: 28px;

}


/* =========================================
   INFO OBRA
========================================= */

.objetivo-obra-info {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 16px;

    margin-bottom: 24px;

    border-radius: 14px;

    background: #f8fafc;

    border:
        1px solid #e2e8f0;

}


.objetivo-obra-icon {

    width: 42px;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 12px;

    background: #ede9fe;

    color: #7c3aed;

}


.objetivo-obra-info span {

    display: block;

    margin-bottom: 3px;

    font-size: 11px;

    color: #94a3b8;

}


.objetivo-obra-info strong {

    font-size: 14px;

    color: #0f172a;

}


/* =========================================
   FORM
========================================= */

.objetivo-form-group label {

    display: block;

    margin-bottom: 9px;

    font-size: 13px;

    font-weight: 700;

    color: #334155;

}


.objetivo-input-wrapper {

    display: flex;

    align-items: center;

    overflow: hidden;

    border:
        2px solid #e2e8f0;

    border-radius: 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;

}


.objetivo-input-wrapper:focus-within {

    border-color: #8b5cf6;

    box-shadow:
        0 0 0 4px
        rgba(139, 92, 246, 0.12);

}


.objetivo-input-wrapper span {

    padding-left: 18px;

    font-size: 20px;

    font-weight: 700;

    color: #8b5cf6;

}


.objetivo-input-wrapper input {

    width: 100%;

    padding: 17px;

    border: none;

    outline: none;

    font-size: 22px;

    font-weight: 700;

    color: #0f172a;

}


.objetivo-form-group small {

    display: block;

    margin-top: 8px;

    font-size: 12px;

    line-height: 1.5;

    color: #94a3b8;

}


/* =========================================
   FOOTER
========================================= */

.objetivo-modal-footer {

    display: flex;

    justify-content: flex-end;

    gap: 12px;

    margin-top: 28px;

}


.objetivo-btn-cancelar {

    padding: 12px 18px;

    border:
        1px solid #e2e8f0;

    border-radius: 10px;

    background: #ffffff;

    color: #64748b;

    font-weight: 600;

    cursor: pointer;

}


.objetivo-btn-guardar {

    padding: 12px 20px;

    border: none;

    border-radius: 10px;

    background: #7c3aed;

    color: #ffffff;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.objetivo-btn-guardar:hover {

    transform:
        translateY(-1px);

    box-shadow:
        0 8px 18px
        rgba(124, 58, 237, 0.30);

}

/* Detail page: compact header, navigation and summary. */
.back-link{display:inline-flex;gap:7px;margin:0 0 19px;font-size:11px;color:#0866ff;text-decoration:none}.detail-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px}.detail-heading h1{margin:0 0 10px;color:#10213d;font-size:23px;line-height:1.3;letter-spacing:-.45px}.detail-meta{display:flex;align-items:center;flex-wrap:wrap;gap:9px;font-size:11px;color:#486994}.detail-status{padding:5px 8px;background:#deebff;color:#005bff;border-radius:4px;font-size:10px;font-weight:600}.detail-status.suspended{background:#fff0dd;color:#d27810}.detail-status.complete{background:#dcf8eb;color:#008d60}.detail-actions{display:flex;gap:7px;flex-shrink:0}.detail-button{border:1px solid #d5e5ff;background:#e6f0ff;color:#075be5;border-radius:5px;padding:8px 11px;font:11px Arial;cursor:pointer}.detail-button.warning{background:#fff5e6;border-color:#f6e1bd;color:#a66a13}.detail-button.danger{background:#fff0f1;border-color:#ffd9de;color:#d43547}.detail-tabs{display:flex;align-items:center;gap:0;max-width:900px;padding:0;margin:0 0 14px;background:#fafdff;border:1px solid #e7eef8;border-radius:6px;overflow-x:auto;box-shadow:none}.detail-tabs .detail-tab{flex:1;white-space:nowrap;border:0;border-bottom:2px solid transparent;background:transparent;border-radius:0;padding:12px 20px;color:#365681;font-size:11px;box-shadow:none}.detail-tabs .detail-tab.active{color:#005bff;border-bottom-color:#005bff;background:#f8fbff}.detail-summary{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr);gap:18px;align-items:stretch}.detail-info{padding:21px 24px;background:#fcfdff;border:1px solid #dce7f5;border-radius:7px}.detail-info h2{font-size:15px;margin:0 0 15px;color:#10213d}.detail-info dl{margin:0}.detail-info dl>div{display:grid;grid-template-columns:160px minmax(0,1fr);gap:16px;padding:11px 0;border-bottom:1px solid #eaf0f7;font-size:12px}.detail-info dl>div:last-child{border:0}.detail-info dt{color:#52719a}.detail-info dd{margin:0;color:#18385f;font-weight:500}.detail-info dd.late{color:#f0273d;font-weight:600}.detail-notes{padding-top:14px;color:#52719a;font-size:12px}.detail-notes h3{font-size:12px}.detail-notes p{white-space:pre-wrap}.detail-finance{padding:12px;background:#fbfdff;border-radius:7px;display:flex;flex-direction:column;gap:14px}.detail-metric{border:1px solid #dce7f5;border-radius:6px;overflow:hidden}.detail-metric h2{padding:10px 12px;margin:0;background:#f0f5fb;color:#10213d;font-size:13px;border-bottom:1px solid #e2ebf6}.detail-metric-body{padding:11px 12px}.detail-metric-body p{margin:0 0 9px;font-size:12px;color:#42628d}.detail-metric-body p strong{font-size:15px;color:#10213d}.detail-progress-line{display:flex;gap:12px;align-items:center}.detail-progress-line>b{font-size:11px;color:#52719a}.detail-progress{height:8px;background:#e4edf7;overflow:hidden;border-radius:9px;flex:1}.detail-progress span{display:block;height:100%;background:linear-gradient(90deg,#03b978,#20c997);border-radius:9px}.detail-metric small{display:block;margin-top:8px;color:#46658b;font-size:10px}.detail-metric small strong{color:#008b59}.detail-goal{display:flex;justify-content:space-between;gap:7px;margin-top:10px;font-size:10px;color:#008c53}.detail-goal span{background:#e8f8ee;border-radius:4px;padding:2px 4px}.detail-finance-link{align-self:flex-end;border:0;background:none;color:#005bff;cursor:pointer;font-size:11px;padding:0 0 4px}.detail-tab-panel>.obra-section,.detail-tab-panel>.obra-prazo-section{margin-top:0}.detail-tab:focus-visible,.detail-button:focus-visible,.detail-finance-link:focus-visible{outline:2px solid #397eff;outline-offset:2px}
@media(max-width:1100px){.detail-heading{flex-direction:column;gap:8px}.detail-summary{grid-template-columns:minmax(0,1.3fr) minmax(285px,1fr)}.detail-info dl>div{grid-template-columns:115px minmax(0,1fr)}}
@media(max-width:700px){.detail-heading h1{font-size:20px}.detail-summary{grid-template-columns:1fr}.detail-info{padding:18px}.detail-tabs .detail-tab{padding:12px 15px}.detail-actions{flex-wrap:wrap}.detail-info dl>div{font-size:11px}.detail-finance{padding:0}}

.detail-action-dialog{max-width:440px;width:calc(100% - 32px);border:1px solid #dce7f5;border-radius:10px;padding:24px;color:#18385f}.detail-action-dialog::backdrop{background:#102e5266}.detail-action-dialog h2{font-size:19px;margin-top:0}.detail-action-dialog p,.detail-action-dialog label{font-size:13px;line-height:1.5}.detail-action-dialog textarea{display:block;width:100%;margin:8px 0 16px;border:1px solid #dce7f5;border-radius:5px;padding:8px}.detail-action-dialog .detail-actions{justify-content:flex-end}.detail-button:disabled{opacity:.5;cursor:default}#detailActionError{color:#c02c3d}

/* =========================================
   HISTÓRICO
========================================= */

.historico-section {
    overflow: hidden;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    background: #ffffff;
}


/* =========================================
   HEADER
========================================= */

.historico-section-header {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 18px 22px;

    border-bottom: 1px solid #e8edf3;
}


.historico-section-title {
    display: flex;
    align-items: center;

    gap: 14px;
}


.historico-section-icon {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #2563eb;
    border-radius: 50%;

    color: #2563eb;

    font-size: 17px;
}


.historico-section-title h2 {
    margin: 0 0 3px;

    color: #172554;

    font-size: 18px;
    font-weight: 700;
}


.historico-section-title p {
    margin: 0;

    color: #64748b;

    font-size: 13px;
}


.historico-exportar {
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 0 14px;

    border: 1px solid #d8e1eb;
    border-radius: 7px;

    background: #ffffff;

    color: #334155;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}


.historico-exportar:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}


/* =========================================
   FILTROS
========================================= */

.historico-filtros {
    display: grid;

    grid-template-columns:
        minmax(135px, 0.8fr)
        minmax(135px, 0.8fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr)
        auto;

    align-items: end;

    gap: 12px;

    padding: 14px 22px;

    border-bottom: 1px solid #e8edf3;

    background: #ffffff;
}


.historico-filtro {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 5px;
}


.historico-filtro label {
    color: #64748b;

    font-size: 11px;
    font-weight: 600;
}


.historico-filtro input,
.historico-filtro select {
    width: 100%;
    height: 38px;

    box-sizing: border-box;

    padding: 0 11px;

    border: 1px solid #dbe3ec;
    border-radius: 7px;

    outline: none;

    background: #ffffff;

    color: #334155;

    font-family: inherit;
    font-size: 12px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.historico-filtro input:focus,
.historico-filtro select:focus {
    border-color: #60a5fa;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.08);
}


.historico-filtro-acoes {
    display: flex;
    align-items: center;

    gap: 8px;
}


.historico-btn-limpar,
.historico-btn-filtrar {
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 14px;

    border-radius: 7px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}


.historico-btn-limpar {
    border: 1px solid #dbe3ec;

    background: #ffffff;

    color: #475569;
}


.historico-btn-limpar:hover {
    background: #f8fafc;
}


.historico-btn-filtrar {
    border: 1px solid #2563eb;

    background: #2563eb;

    color: #ffffff;
}


.historico-btn-filtrar:hover {
    background: #1d4ed8;
}


/* =========================================
   TABELA
========================================= */

.historico-table-card {
    overflow-x: auto;
}


.historico-table {
    min-width: 1000px;
}


/* HEADER */

.historico-table-header,
.historico-table-row {
    display: grid;

    grid-template-columns:
        120px
        minmax(170px, 1.15fr)
        160px
        minmax(150px, 1fr)
        minmax(180px, 1.2fr)
        minmax(180px, 1.2fr);

    align-items: center;

    column-gap: 16px;
}


.historico-table-header {
    min-height: 39px;

    padding: 0 22px;

    border-bottom: 1px solid #dfe6ee;

    background: #f8fafc;

    color: #475569;

    font-size: 11px;
    font-weight: 700;
}


.historico-table-row {
    min-height: 58px;

    padding: 8px 22px;

    border-bottom: 1px solid #edf1f5;

    color: #475569;

    font-size: 12px;

    transition: background 0.15s ease;
}


.historico-table-row:last-child {
    border-bottom: 0;
}


.historico-table-row:hover {
    background: #f8fbff;
}


/* =========================================
   DATA
========================================= */

.historico-data {
    display: flex;
    flex-direction: column;

    gap: 2px;
}


.historico-data strong {
    color: #334155;

    font-size: 12px;
    font-weight: 600;
}


.historico-data span {
    color: #94a3b8;

    font-size: 11px;
}


/* =========================================
   UTILIZADOR
========================================= */

.historico-utilizador {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 10px;
}


.historico-avatar {
    width: 32px;
    height: 32px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #dbeafe;

    color: #1e40af;

    font-size: 11px;
    font-weight: 700;
}


.historico-avatar i {
    font-size: 11px;
}


.historico-utilizador > div:last-child {
    min-width: 0;
}


.historico-utilizador strong {
    display: block;

    overflow: hidden;

    color: #334155;

    font-size: 12px;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================
   BADGES
========================================= */

.historico-badge {
    width: fit-content;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding: 5px 10px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 600;

    white-space: nowrap;
}


.historico-badge i {
    font-size: 10px;
}


/* ALTERAÇÃO */

.historico-badge-alteracao {
    background: #dbeafe;

    color: #2563eb;
}


/* ESTADO */

.historico-badge-estado {
    background: #ffedd5;

    color: #ea580c;
}


/* ADIÇÃO */

.historico-badge-adicao {
    background: #dcfce7;

    color: #15803d;
}


/* CRIAÇÃO */

.historico-badge-criacao {
    background: #ede9fe;

    color: #7c3aed;
}


/* =========================================
   CAMPO
========================================= */

.historico-campo {
    min-width: 0;

    overflow: hidden;

    color: #64748b;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================
   VALORES
========================================= */

.historico-valor-anterior,
.historico-valor-novo {
    min-width: 0;

    overflow-wrap: anywhere;

    line-height: 1.4;
}


.historico-valor-anterior span:not(
    .historico-sem-valor
) {
    color: #ef4444;

    text-decoration: line-through;

    text-decoration-thickness: 1px;
}


.historico-valor-novo {
    color: #059669;

    font-weight: 700;
}


.historico-sem-valor {
    color: #94a3b8 !important;

    font-weight: 400;

    text-decoration: none !important;
}


/* =========================================
   FOOTER
========================================= */

.historico-footer-table {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 22px;

    border-top: 1px solid #edf1f5;

    color: #64748b;

    font-size: 11px;
}


/* =========================================
   LINHA ESCONDIDA PELO FILTRO
========================================= */

.historico-table-row.historico-hidden {
    display: none;
}


/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 1200px) {

    .historico-filtros {
        grid-template-columns:
            repeat(3, minmax(160px, 1fr));
    }


    .historico-filtro-acoes {
        justify-content: flex-end;
    }

}


@media (max-width: 700px) {

    .historico-section-header {
        align-items: flex-start;

        flex-direction: column;
    }


    .historico-exportar {
        width: 100%;
    }


    .historico-filtros {
        grid-template-columns: 1fr;
    }


    .historico-filtro-acoes {
        justify-content: stretch;
    }


    .historico-btn-limpar,
    .historico-btn-filtrar {
        flex: 1;
    }

}

/* =========================================
   CRONOLOGIA DA OBRA
========================================= */

.cronologia-section {
    margin-top: 24px;

    padding: 20px;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    background: #ffffff;
}


/* =========================================
   HEADER
========================================= */

.cronologia-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}


.cronologia-header h3 {
    margin: 0 0 4px;

    color: #172554;

    font-size: 15px;
    font-weight: 700;
}


.cronologia-header p {
    margin: 0;

    color: #94a3b8;

    font-size: 12px;
}


/* =========================================
   LISTA / LINHA VERTICAL
========================================= */

.cronologia-lista {
    position: relative;

    display: flex;
    flex-direction: column;

    gap: 0;
}


.cronologia-lista::before {
    content: "";

    position: absolute;

    top: 18px;
    bottom: 18px;
    left: 18px;

    width: 2px;

    background: #e2e8f0;
}


/* =========================================
   ITEM
========================================= */

.cronologia-item {
    position: relative;

    display: grid;

    grid-template-columns:
        38px
        minmax(0, 1fr);

    gap: 14px;

    padding-bottom: 18px;
}


.cronologia-item:last-child {
    padding-bottom: 0;
}


/* =========================================
   MARCADOR
========================================= */

.cronologia-marker {
    position: relative;

    z-index: 2;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #bfdbfe;
    border-radius: 9px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 11px;
}


.cronologia-marker.suspensa {
    border-color: #fed7aa;

    background: #fff7ed;

    color: #ea580c;
}


/* =========================================
   CARD PRINCIPAL
========================================= */

.cronologia-card {
    min-width: 0;

    padding: 15px 17px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #ffffff;

    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.03);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.cronologia-card:hover {
    border-color: #cbd5e1;

    box-shadow:
        0 4px 10px rgba(15, 23, 42, 0.04);
}


/* =========================================
   TOPO DO CARD
========================================= */

.cronologia-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}


.cronologia-topo > div:first-child {
    min-width: 0;
}


/* =========================================
   BADGES
========================================= */

.cronologia-badge {
    display: inline-flex;
    align-items: center;

    padding: 4px 8px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 700;

    line-height: 1;

    text-transform: uppercase;

    white-space: nowrap;
}


.cronologia-badge.execucao {
    background: #dbeafe;

    color: #2563eb;
}


.cronologia-badge.suspensa {
    background: #ffedd5;

    color: #ea580c;
}


/* =========================================
   PERÍODO
========================================= */

.cronologia-periodo {
    display: flex;
    align-items: center;

    gap: 8px;

    color: #64748b;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}


.cronologia-periodo i {
    color: #cbd5e1;

    font-size: 9px;
}


.cronologia-periodo span {
    color: #94a3b8;

    font-weight: 500;
}


/* =========================================
   DADOS DO PERÍODO
========================================= */

.cronologia-dados {
    display: flex;
    align-items: stretch;

    gap: 12px;

    margin-top: 14px;
}


.cronologia-dados > div {
    min-width: 150px;

    display: flex;
    flex-direction: column;

    gap: 3px;

    padding: 10px 12px;

    border: 1px solid #edf2f7;
    border-radius: 8px;

    background: #f8fafc;
}


.cronologia-dados span {
    color: #94a3b8;

    font-size: 10px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.03em;
}


.cronologia-dados strong {
    color: #334155;

    font-size: 13px;
    font-weight: 700;
}


/* =========================================
   EVENTO SIMPLES DE SUSPENSÃO
========================================= */

.cronologia-item.suspensao-evento {
    padding-top: 2px;
    padding-bottom: 14px;
}


.cronologia-evento {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 12px;

    padding: 14px 16px;

    border: 1px dashed #fed7aa;
    border-radius: 8px;

    background: #fffaf5;
}


.cronologia-evento > div {
    display: flex;
    align-items: center;

    gap: 9px;
}


.cronologia-evento strong {
    color: #475569;

    font-size: 12px;
    font-weight: 700;
}


.cronologia-evento p {
    margin: 0;

    color: #78716c;

    font-size: 12px;
}


/* =========================================
   MOTIVO DA SUSPENSÃO
========================================= */

.cronologia-motivo {
    margin-top: 12px;

    padding: 10px 12px;

    border-radius: 7px;

    background: #fff7ed;

    color: #7c2d12;

    font-size: 12px;

    line-height: 1.45;
}


/* =========================================
   ESTADOS VISUAIS DOS CARDS
========================================= */

.cronologia-item.execucao .cronologia-card {
    border-left: 3px solid #3b82f6;
}


.cronologia-item.suspensa .cronologia-card {
    border-left: 3px solid #f97316;
}


/* =========================================
   ÚLTIMO PERÍODO ATIVO
========================================= */

.cronologia-item:last-child.execucao .cronologia-card {
    background: #fbfdff;

    border-color: #bfdbfe;
}


/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 800px) {

    .cronologia-section {
        padding: 16px;
    }


    .cronologia-lista::before {
        left: 16px;
    }


    .cronologia-item {
        grid-template-columns:
            34px
            minmax(0, 1fr);

        gap: 11px;
    }


    .cronologia-marker {
        width: 32px;
        height: 32px;

        border-radius: 8px;
    }


    .cronologia-topo {
        align-items: flex-start;

        flex-direction: column;

        gap: 8px;
    }


    .cronologia-periodo {
        flex-wrap: wrap;

        white-space: normal;
    }


    .cronologia-dados {
        flex-direction: column;
    }


    .cronologia-dados > div {
        min-width: 0;
    }


    .cronologia-evento {
        align-items: flex-start;

        flex-direction: column;
    }

}

/* =========================================
   DATAS IDENTIFICADAS
========================================= */

.cronologia-periodo {
    display: flex;
    align-items: center;

    gap: 12px;
}


.cronologia-data-bloco {
    display: flex;
    flex-direction: column;

    gap: 2px;
}


.cronologia-data-label {
    color: #94a3b8;

    font-size: 9px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.04em;
}


.cronologia-data-bloco strong {
    color: #475569;

    font-size: 12px;
    font-weight: 700;
}


.cronologia-atual {
    color: #2563eb !important;
}


/* =========================================
   EVENTO DE SUSPENSÃO
========================================= */

.cronologia-evento {
    display: flex;
    flex-direction: column;

    gap: 12px;

    padding: 13px 15px;

    border: 1px dashed #fed7aa;
    border-radius: 8px;

    background: #fffaf5;
}


.cronologia-evento-topo {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 16px;

    width: 100%;
}


/* =========================================
   MOTIVO
========================================= */

.cronologia-motivo-evento {
    width: 100%;

    padding: 11px 13px;

    box-sizing: border-box;

    border-radius: 7px;

    background: #fff7ed;
}

.cronologia-motivo-evento span {
    display: block;

    color: #c2410c;

    font-size: 9px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cronologia-motivo-evento p {
    margin: 0;

    color: #7c2d12;

    font-size: 12px;


    white-space: normal;
    overflow-wrap: anywhere;
}

/* =========================================
   PESSOAS DA OBRA
========================================= */

.obra-pessoas-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;

    margin-top: 20px;
}


.obra-pessoas-card {
    min-width: 0;

    padding: 20px;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #ffffff;
}


.obra-pessoas-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 16px;
}


.obra-pessoas-header h2 {
    margin: 0;

    color: #111827;

    font-size: 15px;
    font-weight: 700;
}


.obra-pessoas-header p {
    margin: 4px 0 0;

    color: #94a3b8;

    font-size: 11px;
}


.obra-pessoas-adicionar {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    flex-shrink: 0;

    padding: 6px 8px;

    border: 0;

    background: transparent;
    color: #2563eb;

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    cursor: pointer;
}


.obra-pessoas-adicionar:hover {
    color: #1d4ed8;
}


/* LISTA */

.obra-pessoas-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.obra-pessoa-item {
    padding: 14px 16px;

    border: 1px solid #dbe3ee;
    border-radius: 9px;

    background: #f8fafc;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


.obra-pessoa-item:hover {
    border-color: #cbd5e1;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, .04);
}


.obra-pessoa-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}


.obra-pessoa-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.obra-pessoa-nome-linha {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}


.obra-pessoa-nome-linha strong {
    color: #0f172a;

    font-size: 13px;
    font-weight: 700;
}


.obra-pessoa-principal {
    display: inline-flex;
    align-items: center;

    padding: 3px 7px;

    border-radius: 5px;

    background: #dcfce7;
    color: #059669;

    font-size: 9px;
    font-weight: 700;

    line-height: 1;

    text-transform: uppercase;
    letter-spacing: .03em;
}


.obra-pessoa-funcao {
    margin-top: 4px;

    color: #475569;

    font-size: 12px;
    font-weight: 500;
}


.obra-pessoa-departamento {
    margin-top: 2px;

    color: #94a3b8;

    font-size: 11px;
}


/* AÇÕES */

.obra-pessoa-acoes {
    display: flex;
    align-items: center;
    gap: 6px;

    flex-shrink: 0;
}


.obra-pessoa-acao {
    width: 30px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #dbe3ee;
    border-radius: 7px;

    background: #ffffff;
    color: #64748b;

    font-size: 11px;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}


.obra-pessoa-acao:hover {
    border-color: #bfdbfe;

    background: #eff6ff;
    color: #2563eb;
}


.obra-pessoa-remover {
    color: #94a3b8;
}


.obra-pessoa-remover:hover {
    border-color: #fecaca;

    background: #fef2f2;
    color: #dc2626;
}


/* TELEFONE / EMAIL */

.obra-pessoa-contactos {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-top: 11px;
    padding-top: 10px;

    border-top: 1px solid #e8edf3;
}


.obra-pessoa-contactos a {
    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 0;

    color: #475569;

    font-size: 11px;

    text-decoration: none;
}


.obra-pessoa-contactos a:hover {
    color: #2563eb;
}


.obra-pessoa-contactos i {
    width: 13px;

    color: #94a3b8;

    font-size: 10px;

    text-align: center;
}


/* EMPTY */

.obra-pessoas-empty {
    min-height: 120px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 20px;

    border: 1px dashed #dbe3ee;
    border-radius: 9px;

    color: #94a3b8;

    text-align: center;
}


.obra-pessoas-empty > i {
    margin-bottom: 9px;

    color: #cbd5e1;

    font-size: 19px;
}


.obra-pessoas-empty strong {
    color: #64748b;

    font-size: 12px;
}


.obra-pessoas-empty span {
    max-width: 300px;

    margin-top: 4px;

    font-size: 10px;
    line-height: 1.5;
}


@media (max-width: 900px) {

    .obra-pessoas-grid {
        grid-template-columns: 1fr;
    }

}

.modal-editar-obra .modal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    width: 100%;
    padding: 14px 16px;

    box-sizing: border-box;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    background: #ffffff;

    cursor: pointer;

    transition:
        border-color .2s ease,
        background .2s ease;
}


.modal-editar-obra .modal-checkbox:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}


.modal-editar-obra .modal-checkbox input {
    width: 16px;
    height: 16px;

    flex: 0 0 16px;

    margin: 2px 0 0;
    padding: 0;

    accent-color: #2563eb;

    cursor: pointer;
}


.modal-editar-obra .modal-checkbox-content {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;
}


.modal-editar-obra .modal-checkbox-content strong {
    color: #374151;

    font-size: 13px;
    font-weight: 600;
}


.modal-editar-obra .modal-checkbox-content small {
    color: #6b7280;

    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

/* =========================================
   SELECT COM PESQUISA
========================================= */

.search-select {
    position: relative;
    width: 100%;
}


.search-select-trigger {
    width: 100%;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 0 14px;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    background: #ffffff;
    color: #111827;

    font-family: inherit;
    font-size: 13px;

    cursor: pointer;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


.search-select-trigger:hover {
    border-color: #9ca3af;
}


.search-select.open .search-select-trigger {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .08);
}


.search-select-trigger i {
    color: #94a3b8;

    font-size: 10px;

    transition: transform .2s ease;
}


.search-select.open .search-select-trigger > i {
    transform: rotate(180deg);
}


/* DROPDOWN */

.search-select-dropdown {
    position: absolute;

    top: calc(100% + 6px);
    left: 0;
    right: 0;

    z-index: 100;

    display: none;

    overflow: hidden;

    border: 1px solid #dbe3ee;
    border-radius: 10px;

    background: #ffffff;

    box-shadow:
        0 12px 30px rgba(15, 23, 42, .12);
}


.search-select.open .search-select-dropdown {
    display: block;
}


/* PESQUISA */

.search-select-pesquisa {
    position: relative;

    padding: 10px;

    border-bottom: 1px solid #e5e7eb;
}


.search-select-pesquisa i {
    position: absolute;

    top: 50%;
    left: 24px;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 11px;
}


.search-select-pesquisa input {
    width: 100%;
    height: 38px;

    padding: 0 12px 0 34px;

    box-sizing: border-box;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    outline: none;

    font-family: inherit;
    font-size: 12px;
}


.search-select-pesquisa input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .08);
}


/* OPÇÕES */

.search-select-opcoes {
    max-height: 240px;

    overflow-y: auto;

    padding: 5px;
}


.search-select-opcao {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 9px 10px;

    border: 0;
    border-radius: 7px;

    background: transparent;

    font-family: inherit;

    text-align: left;

    cursor: pointer;
}


.search-select-opcao:hover {
    background: #f1f5f9;
}


.search-select-opcao-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}


.search-select-opcao-info strong {
    color: #334155;

    font-size: 12px;
    font-weight: 600;
}


.search-select-opcao-info small {
    color: #94a3b8;

    font-size: 10px;
    font-weight: 400;
}


.search-select-opcao > i {
    display: none;

    color: #2563eb;

    font-size: 11px;
}


.search-select-opcao.selected {
    background: #eff6ff;
}


.search-select-opcao.selected > i {
    display: block;
}


.search-select-vazio {
    display: none;

    padding: 18px;

    color: #94a3b8;

    font-size: 11px;

    text-align: center;
}

.search-select-opcao-nome {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}


.search-select-badge {
    display: inline-flex;
    align-items: center;

    padding: 3px 6px;

    border-radius: 5px;

    background: #dcfce7;
    color: #059669;

    font-size: 8px;
    font-weight: 700;

    line-height: 1;

    text-transform: uppercase;
    letter-spacing: .03em;
}

/* =========================================
   MODAL ADICIONAR RESPONSÁVEL
   Permitir dropdown fora da modal-body
========================================= */

#responsavelModal .modal-editar-obra {
    overflow: visible;
}

#responsavelModal .modal-body {
    overflow: visible;
}

#responsavelModal .search-select {
    position: relative;
    z-index: 20;
}

#responsavelModal .search-select-dropdown {
    z-index: 1000;
}

#responsavelModal .modal-header {
    border-radius: 14px 14px 0 0;
}

#responsavelModal .modal-footer {
    border-radius: 0 0 14px 14px;
}

.responsavel-readonly {
    min-height: 44px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 0 14px;

    box-sizing: border-box;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    background: #f8fafc;
}

.responsavel-readonly i {
    color: #94a3b8;
    font-size: 12px;
}

.responsavel-readonly strong {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 10px 16px;

    border: 1px solid #dc2626;
    border-radius: 8px;

    background: #dc2626;
    color: #ffffff;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}


.remover-confirmacao {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.remover-confirmacao-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #fef2f2;
    color: #dc2626;

    font-size: 14px;
}

.remover-confirmacao strong {
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.remover-confirmacao p {
    margin: 5px 0 0;

    color: #64748b;

    font-size: 11px;
    line-height: 1.5;
}

.documento-acoes {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.documento-editar-btn,
.documento-eliminar-btn {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #dbe4ef;
    border-radius: 8px;

    background: #fff;
    color: #64748b;

    cursor: pointer;
}

.documento-editar-btn:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.documento-eliminar-btn:hover {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #dc2626;
}

.modal-card {
    width: 100%;
    max-width: 560px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 16px;

    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.20);

    overflow: hidden;
}

.modal-eliminar-documento {
    max-width: 540px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 24px 24px 20px;

    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0 0 6px;

    font-size: 18px;
    font-weight: 700;

    color: #0f172a;
}

.modal-header p {
    margin: 0;

    font-size: 13px;
    line-height: 1.5;

    color: #64748b;
}

.modal-close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #64748b;

    cursor: pointer;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    padding: 16px 24px;

    background: #f8fafc;

    border-top: 1px solid #e2e8f0;
}