/* =========================================
   FONTES
========================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');


/* =========================================
   CONFIGURAÇÕES GERAIS
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #26364b;
    font: 14px 'DM Sans', Arial, sans-serif;
    background-attachment: fixed;
}

body {
    position: relative;
    isolation: isolate;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;

    background-image: url("../assets/marca-dagua-salle.png");
    background-repeat: no-repeat;
    background-position: calc(50% + 116px) center;
    background-size: auto 90vh;

    opacity: 0.045;
    pointer-events: none;
    z-index: -1;
}


/* =========================================
   MENU LATERAL
========================================= */

.sidebar {
    width: 248px;
    position: fixed;
    inset: 0 auto 0 0;
    background: white;
    border-right: 1px solid #e8edf3;
    padding: 27px 18px;
    display: flex;
    flex-direction: column;
    z-index: 4;
}


/* LOGOTIPO */

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 5px 10px;
    margin-bottom: 35px;
}

.brand img {
    width: 180px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    background: linear-gradient(145deg, #3978c6, #244c82);
    display: grid;
    place-items: center;
    color: white;
    font: 800 23px Manrope;
}

.brand b {
    display: block;
    font: 800 17px Manrope;
    letter-spacing: 2px;
}

.brand small {
    display: block;
    font-size: 9px;
    letter-spacing: 2px;
    color: #8b97a8;
}


/* IDENTIFICAÇÃO DA SEÇÃO */

.section-label,
label {
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #9aa5b4;
}

.section-label {
    padding-left: 12px;
}


/* NAVEGAÇÃO */

nav {
    display: grid;
    gap: 8px;
    width: 100%;
}

nav button {
    border: 0;
    background: none;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    border-radius: 9px;
    color: #69778a;
    font: 600 13px 'DM Sans';
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

nav button.active,
nav button:hover {
    background: #edf4fc;
    color: #2869b4;
}


/* RODAPÉ DO MENU */

.side-bottom {
    margin-top: auto;
}

.connection,
.profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
}

.connection {
    background: #f7f9fc;
    border: 1px solid #edf0f5;
    margin-bottom: 14px;
}

.connection i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0a23e;
}

.connection b,
.profile b {
    display: block;
    font-size: 11px;
}

.connection small,
.profile small {
    display: block;
    font-size: 10px;
    color: #8491a3;
    margin-top: 3px;
}

.avatar {
    background: #e6eef9;
    color: #376ba8;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
}


/* =========================================
   CONTEÚDO PRINCIPAL
========================================= */

main {
    margin-left: 248px;
    padding: 0 34px 22px;
}


/* CABEÇALHO */

header {
    height: 68px;
    border-bottom: 1px solid #e8edf3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    color: #8a96a7;
    font-size: 12px;
}

.crumb b {
    color: #42536a;
}

.date {
    font-size: 11px;
}


/* PÁGINAS */

.page {
    display: none;
    max-width: 1450px;
    margin: auto;
}

.page.active {
    display: block;
}


/* =========================================
   TÍTULOS E CABEÇALHOS
========================================= */

.heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.heading label {
    color: #3978c6;
}

.heading h1 {
    font: 800 27px Manrope;
    color: #172b4d;
    margin: 7px 0 5px;
    letter-spacing: -.7px;
}

.heading p,
.panel-head p {
    font-size: 12px;
    color: #8a96a7;
    margin: 0;
}

/* Ações do cabeçalho de contratos */
.heading-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* Pesquisa de contratos */
.contract-search {
    width: 280px;
}

.contract-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #dce3ec;
    border-radius: 7px;
    background: #ffffff;
    color: #172b4d;
    font: 500 12px Manrope;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contract-search input:focus {
    border-color: #3679ce;
    box-shadow: 0 0 0 3px rgba(54, 121, 206, 0.10);
}

.contract-search input::placeholder {
    color: #9aa8ba;
}


/* =========================================
   BOTÕES
========================================= */

.primary {
    background: #3978c6;
    color: white;
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    font: 600 12px 'DM Sans';
    cursor: pointer;
}

.primary:hover {
    background: #2864ad;
}

.link {
    border: 0;
    background: none;
    color: #3978c6;
    font: 600 11px 'DM Sans';
    cursor: pointer;
    white-space: nowrap;
}


/* =========================================
   AVISO DO PROTÓTIPO
========================================= */

.notice {
    background: #f0f6fd;
    border: 1px solid #dce9f8;
    border-radius: 9px;
    padding: 12px 15px;
    color: #41678f;
    margin-bottom: 20px;
    font-size: 11px;
}

.notice p {
    margin: 4px 0 0 27px;
    color: #6f8299;
}


/* =========================================
   CARTÕES DE INDICADORES
========================================= */

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 18px;
}

.metrics article,
.panel {
    background: white;
    border: 1px solid #e8edf3;
    border-radius: 11px;
    box-shadow: 0 3px 12px #1e355008;
}

.metrics article {
    padding: 17px 18px;
}

.metrics article span {
    display: block;
    color: #7c899b;
    font-size: 11px;
    font-weight: 600;
}

.metrics article b {
    display: block;
    font: 800 28px Manrope;
    color: #172b4d;
    margin: 10px 0 2px;
}

.metrics article small {
    color: #9aa5b4;
    font-size: 10px;
}


/* =========================================
   ORGANIZAÇÃO DAS COLUNAS
========================================= */

.columns {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 17px;
    margin-bottom: 17px;
}

.columns.lower {
    grid-template-columns: 1fr 1fr;
}


/* =========================================
   PAINÉIS
========================================= */

.panel {
    padding: 18px 19px;
    min-width: 0;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
}

.panel-head h2 {
    font: 700 14px Manrope;
    color: #172b4d;
    margin: 0 0 5px;
}

/* Organização dos controles do cabeçalho de contratos */
.panel-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    flex-shrink: 0;
}

.contador-contratos {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    white-space: nowrap;
    padding-right: 22px;
    border-right: 1px solid #dce3ec;
}


/* =========================================
   TABELAS
========================================= */

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

th {
    font-size: 9px;
    letter-spacing: .8px;
    color: #9aa5b4;
    padding: 0 11px 11px;
    border-bottom: 1px solid #e8edf3;
}

td {
    font-size: 12px;
    color: #69778a;
    padding: 13px 11px;
    border-bottom: 1px solid #f0f2f6;
}

td b {
    display: block;
    color: #34465d;
    font-size: 13px;
    font-weight: 600;
}

td small {
    display: block;
    color: #9aa5b4;
    font-size: 11px;
    margin-top: 4px;
}


/* =========================================
   ETIQUETAS DE STATUS
========================================= */

em {
    font-style: normal;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.blue {
    background: #eaf2fc;
    color: #3978c6;
}

.purple {
    background: #f0edfb;
    color: #7864c8;
}

.yellow {
    background: #fff5e5;
    color: #a66d18;
}

.green {
    background: #e8f6f0;
    color: #23866b;
}


/* =========================================
   ATIVIDADES PRIORITÁRIAS
========================================= */

.tasks {
    display: grid;
}

.tasks > div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #f0f2f6;
}

.tasks > div:last-child {
    border: 0;
}

.tasks i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.high {
    background: #d66c5b;
}

.medium {
    background: #d8a13d;
}

.low {
    background: #53a68b;
}

.tasks span {
    flex: 1;
}

.tasks b {
    display: block;
    font-size: 12px;
    color: #34465d;
}

.tasks small {
    display: block;
    font-size: 11px;
    color: #9aa5b4;
    margin-top: 4px;
}

.tasks time {
    font-size: 11px;
    color: #7c899b;
}


/* =========================================
   GRÁFICOS DE BARRAS
========================================= */

.bars {
    display: grid;
    gap: 13px;
}

.bars span {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #69778a;
    margin-bottom: 6px;
}

.bars b {
    color: #34465d;
}

.bars i {
    display: block;
    height: 6px;
    background: #edf1f6;
    border-radius: 9px;
    overflow: hidden;
}

.bars u {
    display: block;
    height: 100%;
    background: #4b83c6;
    border-radius: 9px;
}

.bars u.p {
    background: #8977d0;
}

.bars u.y {
    background: #d9a34c;
}

.bars u.g {
    background: #56a58a;
}


/* =========================================
   ACESSO RÁPIDO
========================================= */

.shortcuts {
    display: grid;
}

.shortcuts button {
    display: flex;
    align-items: center;
    gap: 9px;
    background: white;
    border: 0;
    border-bottom: 1px solid #f0f2f6;
    padding: 12px 3px;
    text-align: left;
    color: #3978c6;
    cursor: pointer;
}

.shortcuts button:last-child {
    border: 0;
}

.shortcuts b {
    font-size: 10px;
    color: #34465d;
}

.shortcuts small {
    flex: 1;
    font-size: 9px;
    color: #9aa5b4;
}


/* =========================================
   CAMPO DE BUSCA
========================================= */

input {
    border: 1px solid #e8edf3;
    border-radius: 7px;
    padding: 9px 11px;
    font: 11px 'DM Sans';
    min-width: 180px;
}


/* =========================================
   RODAPÉ
========================================= */

footer {
    text-align: center;
    color: #a0a9b6;
    font-size: 9px;
    padding: 25px 0 5px;
}


/* =========================================
   NOTIFICAÇÕES
========================================= */

.toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: #243e65;
    color: white;
    padding: 12px 17px;
    border-radius: 8px;
    font-size: 11px;
    opacity: 0;
    transition: .2s;
}

.toast.show {
    opacity: 1;
}


/* =========================================
   MENU MOBILE
========================================= */

.mobile {
    display: none;
}


/* =========================================
   RESPONSIVIDADE
   TELAS ATÉ 1050px
========================================= */

@media (max-width: 1050px) {

    main {
        padding: 0 22px 20px;
    }

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

    .columns {
        grid-template-columns: 1fr;
    }

}


/* =========================================
   RESPONSIVIDADE
   TELAS ATÉ 700px
========================================= */

@media (max-width: 700px) {

    .sidebar {
        left: -260px;
        transition: left .2s;
        box-shadow: 8px 0 30px #1c2c4020;
    }

    .sidebar.open {
        left: 0;
    }

    main {
        margin-left: 0;
        padding: 0 14px 18px;
    }

    .mobile {
        display: block;
        border: 0;
        background: none;
        font-size: 20px;
        color: #53657b;
    }

    .date {
        display: none;
    }

    .heading {
        align-items: flex-start;
        gap: 10px;
    }

    .heading h1 {
        font-size: 23px;
    }

    .primary {
        font-size: 10px;
        padding: 10px;
    }

    .metrics {
        gap: 9px;
    }

    .metrics article {
        padding: 13px;
    }

    .metrics article b {
        font-size: 23px;
    }

    .columns.lower {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 15px 13px;
    }

    .panel-head {
        align-items: flex-start;
    }

    input {
        min-width: 110px;
        width: 125px;
    }

}

.login-button {
    width: 100%;
    padding: 11px;
    margin-bottom: 14px;
    border: 1px solid #dce5f0;
    border-radius: 9px;
    background: #ffffff;
    color: #245da8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.login-button:hover {
    background: #edf4fc;
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.profile .avatar {
    flex-shrink: 0;
}

.profile span {
    display: block;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.profile b,
.profile small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Modal de contratos */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.modal-header h2 {
    margin: 8px 0;
}

.modal-header p {
    color: #8491a5;
    font-size: 13px;
}

.modal-close {
    border: none;
    background: #f1f5f9;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 22px;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #dce3ed;
    border-radius: 7px;
    font-family: inherit;
    font-size: 13px;
    color: #334155;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #397dcc;
}

.form-group textarea {
    min-height: 85px;
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #dce3ed;
    padding: 11px 18px;
    border-radius: 7px;
    cursor: pointer;
}

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

    .form-group.full {
        grid-column: auto;
    }
}

/* =========================================
   ESTRUTURA DE ROLAGEM DA FICHA
========================================= */

.modal-contrato {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
}

/* Cabeçalho fixo */
.modal-contrato .modal-header-contract {
    flex-shrink: 0;
    margin-bottom: 0;
}

/* Conteúdo com rolagem */
.modal-contrato-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 10px;

    scrollbar-width: thin;
    scrollbar-color: #AAB5C2 transparent;
}

/* Barra personalizada */
.modal-contrato-body::-webkit-scrollbar {
    width: 6px;
}

.modal-contrato-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-contrato-body::-webkit-scrollbar-thumb {
    background: #AAB5C2;
    border-radius: 20px;
}

.modal-contrato-body::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Esconder os botões nativos */
.modal-contrato-body::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Rodapé fixo */
.modal-contrato .modal-actions {
    flex-shrink: 0;
    margin-top: 0;
    background: #ffffff;
    padding: 18px 30px;
    border-top: 1px solid #EDF1F6;
    box-shadow: 0 -5px 12px rgba(23, 54, 93, 0.04);
}

/* Detalhes do contrato */

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 25px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.detail-item.full {
    grid-column: 1 / -1;
}

.detail-item label {
    font-size: 11px;
    font-weight: 700;
    color: #8491a5;
    letter-spacing: 0.6px;
}

.detail-item p {
    font-size: 14px;
    color: #334155;
    margin: 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

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

    .detail-item.full {
        grid-column: auto;
    }
}

/* ==================================
   SISTEMA DE NOTIFICAÇÕES
================================== */

#notification-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(380px, calc(100vw - 32px));
}

.notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
    animation: notification-in 0.25s ease;
}

.notification-icon {
    font-size: 19px;
}

.notification.success .notification-icon {
    color: #16a36a;
}

.notification.error .notification-icon {
    color: #dc4444;
}

.notification.warning .notification-icon {
    color: #d99a28;
}

.notification.info .notification-icon {
    color: #397dcc;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content strong {
    display: block;
    font-size: 13px;
    color: #26364d;
    margin-bottom: 4px;
}

.notification-content p {
    font-size: 12px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

.notification-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
}

.notification.removing {
    animation: notification-out 0.2s ease forwards;
}

@keyframes notification-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notification-out {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* ==================================
   MODAL DE CONFIRMAÇÃO
================================== */

.confirm-content {
    max-width: 430px;
}

.confirm-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #fff4e5;
    color: #d99a28;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    margin-bottom: 18px;
}

.confirm-text h2 {
    color: #26364d;
    margin: 0 0 10px;
    font-size: 20px;
}

.confirm-text p {
    color: #718096;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-line;
    margin: 0;
}

.confirm-content .modal-actions {
    margin-top: 26px;
}

.confirm-content .danger-button {
    background: #dc4444;
    color: white;
    border: none;
    padding: 11px 18px;
    border-radius: 7px;
    cursor: pointer;
}

.confirm-content .danger-button:hover {
    background: #c73535;
}

/* Lista de projetos vinculados na confirmação */

.confirm-project-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 16px;
}

.confirm-project-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    background: #f5f7fb;
    border: 1px solid #e5eaf2;
    border-radius: 8px;
    color: #334155;
    font-size: 13px;
    line-height: 1.5;
}

.confirm-project-item i {
    color: #397dcc;
    margin-top: 3px;
}

.confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon i {
    font-size: 20px;
    line-height: 1;
}

.confirm-icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

/* Indicador de conexão com SharePoint */

.connection i {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    display: block;
}

.connection i.connected {
    background: #22a06b;
    box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.12);
}

.connection i.checking {
    background: #e5a32b;
    box-shadow: 0 0 0 3px rgba(229, 163, 43, 0.12);
}

.connection i.disconnected {
    background: #dc4545;
    box-shadow: 0 0 0 3px rgba(220, 69, 69, 0.12);
}

/* FICHA INFORMATIVA DO PROJETO */

.ficha-projeto-conteudo {
    margin-top: 24px;
}

.ficha-projeto-destaque {
    background: #f3f6fb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 22px;
}

.ficha-projeto-destaque label,
.ficha-projeto-campo label {
    display: block;
    color: #8290a5;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ficha-projeto-destaque h2 {
    color: #263b5b;
    font-size: 20px;
    margin: 0;
}

.ficha-projeto-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.ficha-projeto-campo {
    border-bottom: 1px solid #e8edf3;
    padding: 12px 4px;
    min-width: 0;
}

.ficha-projeto-campo p {
    color: #34445d;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ficha-projeto-campo.full {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .ficha-projeto-grid {
        grid-template-columns: 1fr;
    }
}

/* FILTRO DE CONTRATOS CONCLUÍDOS */

.filtro-concluidos {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #718096;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.filtro-concluidos input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.toggle-concluidos {
    position: relative;
    width: 38px;
    height: 21px;
    background: #dce3ec;
    border-radius: 20px;
    transition: background 0.2s ease;
}

.toggle-concluidos::before {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.filtro-concluidos input:checked + .toggle-concluidos {
    background: #3679ce;
}

.filtro-concluidos input:checked + .toggle-concluidos::before {
    transform: translateX(17px);
}

.filtro-concluidos input:focus-visible + .toggle-concluidos {
    outline: 2px solid #3679ce;
    outline-offset: 3px;
}

/* CONTADOR DE CONTRATOS */

.contador-contratos {
    color: #8492a6;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    padding-left: 12px;
    border-left: 1px solid #e5eaf0;
}

/* =========================================
   FICHA DE DETALHES DO CONTRATO
========================================= */

/* Estrutura principal */
.modal-contrato {
    max-width: 760px;
    padding: 0;
    overflow-x: hidden;
    border-radius: 16px;
}

/* Cabeçalho azul */
.modal-header-contract {
    background: linear-gradient(135deg, #17365D, #285B91);
    color: #ffffff;
    padding: 30px;
    margin-bottom: 0;
    align-items: flex-start;
}

.modal-header-contract label {
    color: #BBD5F1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.modal-header-contract h2 {
    color: #ffffff;
    font-size: 25px;
    margin: 12px 0 5px;
}

.modal-header-contract p {
    color: #D6E4F5;
    font-size: 12px;
    margin: 0;
}

/* Botão X */
.modal-header-contract .modal-close {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 25px;
    transition: background 0.2s ease;
}

.modal-header-contract .modal-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Seções */
.contract-details-section,
.contract-projects-section {
    padding: 25px 30px 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
}

.section-title h3 {
    font-size: 14px;
    font-weight: 700;
    color: #17365D;
    margin: 0;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: #E8F1FC;
    color: #3679CE;
    font-size: 10px;
    font-weight: 800;
}

/* Grade de informações */
.modal-contrato .details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-contrato .detail-item {
    padding: 15px;
    border: 1px solid #E8EDF4;
    border-radius: 10px;
    background: #FAFBFD;
    min-width: 0;
}

.modal-contrato .detail-item.full {
    grid-column: 1 / -1;
}

.modal-contrato .detail-item label {
    display: block;
    color: #8491A5;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.modal-contrato .detail-item p {
    color: #243B5A;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

/* Cartão de início da vigência */
.modal-contrato .date-start {
    background: #EFF6FF;
    border-color: #D8E8FC;
}

.modal-contrato .date-start label {
    color: #3975B9;
}

/* Cartão de prazo final */
.modal-contrato .date-deadline {
    background: #FFF7E9;
    border-color: #F5E4C3;
}

.modal-contrato .date-deadline label {
    color: #B77924;
}

/* Projetos vinculados */
.contract-projects-section {
    margin-top: 25px;
}

.contract-projects-list {
    padding: 15px;
    border: 1px dashed #CBD7E6;
    border-radius: 10px;
    background: #F8FAFD;
}

.projects-placeholder {
    color: #8491A5;
    font-size: 12px;
    text-align: center;
    margin: 8px 0;
}

/* Rodapé */
.modal-contrato .modal-actions {
    padding: 22px 30px 28px;
    margin-top: 25px;
    border-top: 1px solid #EDF1F6;
}

/* Adaptação para celular */
@media (max-width: 600px) {
    .modal-contrato {
        padding: 0;
    }

    .modal-header-contract {
        padding: 22px;
    }

    .contract-details-section,
    .contract-projects-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .modal-contrato .details-grid {
        grid-template-columns: 1fr;
    }

    .modal-contrato .detail-item.full {
        grid-column: auto;
    }

    .modal-contrato .modal-actions {
        padding: 20px;
        flex-wrap: wrap;
    }
}

/* =========================================
   CARTÕES DE PROJETOS VINCULADOS
========================================= */

.contract-projects-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: none;
    background: transparent;
}

/* Cartão individual */
.contract-project-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    background: #F8FAFD;
    border: 1px solid #E3EAF3;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.contract-project-card:hover {
    background: #EFF5FC;
    border-color: #BBD3F0;
    transform: translateY(-1px);
}

/* Nome e tipo */
.contract-project-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.contract-project-info strong {
    color: #17365D;
    font-size: 13px;
    font-weight: 700;
}

.contract-project-info span {
    color: #8491A5;
    font-size: 11px;
}

/* Status e prazo */
.contract-project-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    flex-shrink: 0;
}

.contract-project-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    background: #E8F1FC;
    color: #3679CE;
    font-size: 10px;
    font-weight: 700;
}

.contract-project-deadline {
    color: #718096;
    font-size: 11px;
}

/* Adaptação para celular */
@media (max-width: 600px) {
    .contract-project-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .contract-project-right {
        align-items: flex-start;
    }
}

/* Cabeçalho fixo da ficha do contrato */
.modal-contrato .modal-header-contract {
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 0;
}

/* Rodapé fixo da ficha do contrato */
.modal-contrato .modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: #ffffff;
    margin-top: 25px;
    padding: 18px 30px;
    border-top: 1px solid #EDF1F6;
    box-shadow: 0 -5px 12px rgba(23, 54, 93, 0.04);
}

/* =========================================
   IDENTIDADE VISUAL SALLE - DOURADO
========================================= */

/* Cabeçalho */
.modal-contrato .modal-header-contract {
    background: linear-gradient(135deg, #39434F, #536170);
}

/* =========================================
   BARRA DE ROLAGEM DA FICHA DO CONTRATO
========================================= */

.modal-contrato {
    scrollbar-width: thin;
    scrollbar-color: #AAB5C2 transparent;
}

/* Largura da barra */
.modal-contrato::-webkit-scrollbar {
    width: 6px;
    height: 0;
}

/* Trilho */
.modal-contrato::-webkit-scrollbar-track {
    background: transparent;
}

/* Indicador */
.modal-contrato::-webkit-scrollbar-thumb {
    background: #AAB5C2;
    border-radius: 20px;
    -webkit-appearance: none;
}

.modal-contrato::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Remover setas superiores e inferiores */
.modal-contrato::-webkit-scrollbar-button,
.modal-contrato::-webkit-scrollbar-button:single-button,
.modal-contrato::-webkit-scrollbar-button:vertical:decrement,
.modal-contrato::-webkit-scrollbar-button:vertical:increment {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    -webkit-appearance: none !important;
    background: transparent !important;
}

/* Remover o canto da barra */
.modal-contrato::-webkit-scrollbar-corner {
    background: transparent;
}

/* =========================================
   HISTÓRICO E ACOMPANHAMENTO
========================================= */

.contract-history-section {
    padding: 25px 30px 10px;
}

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

.history-header p {
    color: #8491A5;
    font-size: 12px;
    margin: 0;
}

.history-header button {
    flex-shrink: 0;
    padding: 9px 14px;
    font-size: 11px;
}

.contract-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-placeholder {
    padding: 22px;
    text-align: center;
    color: #8491A5;
    font-size: 12px;
    background: #F8FAFD;
    border: 1px dashed #CBD7E6;
    border-radius: 10px;
}

@media (max-width: 600px) {
    .contract-history-section {
        padding-left: 20px;
        padding-right: 20px;
    }

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


/* =========================================
   CARTÕES DO HISTÓRICO
========================================= */

.history-card {
    background: #FFFFFF;
    border: 1px solid #E5EAF1;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.history-card:hover {
    border-color: #C9D8EA;
    box-shadow: 0 4px 14px rgba(23, 54, 93, 0.06);
}

/* Cabeçalho do cartão */

.history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.history-title {
    color: #263B59;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

/* Etiqueta do tipo de registro */

.history-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 6px;
    background: #EEF4FC;
    color: #376FAF;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

/* Data e horário */

.history-date {
    color: #8491A5;
    font-size: 11px;
    margin: 0;
}

/* Descrição */

.history-description {
    color: #526176;
    font-size: 12px;
    line-height: 1.7;
    margin: 2px 0 5px;
    white-space: pre-wrap;
}

/* Rodapé */

.history-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #EDF1F6;
}

.history-responsible {
    color: #718096;
    font-size: 11px;
    font-weight: 500;
}

.history-link {
    color: #3478C9;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.history-link:hover {
    text-decoration: underline;
}

/* Ajustes para telas menores */

@media (max-width: 600px) {

    .history-card {
        padding: 15px;
    }

    .history-card-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .history-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

}
