/* MDI pages */

.mdi-page {
    background: var(--page-bg);
    padding: 28px 18px 56px;
}

.mdi-page .container {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.mdi-page .container-frame {
    width: 100%;
    margin: 0;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-bg);
    box-shadow: 0 12px 34px rgba(12, 24, 36, 0.08);
}

.mdi-page .container-frame > h3 {
    margin: 0 0 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-color);
    color: var(--text-color);
    font-size: 1.35rem;
    font-weight: 700;
}

.mdi-page .horas-extras-search-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #f8fafc;
}

.mdi-page .horas-extras-filter-left,
.mdi-page .horas-extras-search-right,
.mdi-page .horas-extras-month-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mdi-page .horas-extras-search-container h4 {
    margin: 0;
    color: var(--muted-text-color);
    font-size: 0.88rem;
    font-weight: 700;
}

.mdi-page .horas-extras-search-container select,
.mdi-page .horas-extras-search-container input {
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    font-size: 0.9rem;
}

.mdi-page .horas-extras-search-container select:focus,
.mdi-page .horas-extras-search-container input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(var(--brand-color-rgb), 0.14);
    outline: none;
}

.mdi-page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mdi-page #loadingSpinner.mdi-spinner {
    display: none;
    justify-content: center;
    position: static;
    width: auto;
    height: auto;
    padding: 28px 0;
    animation: none;
    color: var(--brand-color);
    transform: none;
}

.mdi-page #loadingSpinner.mdi-spinner.is-loading {
    display: flex;
}

.mdi-page .mdi-spinner .loading {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 76px;
}

.mdi-page .mdi-spinner .spinner {
    display: none;
}

.mdi-page .mdi-spinner .loading::after {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(var(--brand-color-rgb), 0.18);
    border-top-color: var(--brand-color);
    border-radius: 50%;
    animation: mdi-spin 0.85s linear infinite;
    content: "";
}

@keyframes mdi-spin {
    to {
        transform: rotate(360deg);
    }
}

.mdi-page .table-wrapper {
    width: 100%;
    min-height: 45vh;
    max-height: calc(100vh - 285px);
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
}

.mdi-extra-hours-page .approval-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.mdi-extra-hours-page .approval-table th,
.mdi-extra-hours-page .approval-table td {
    padding: 10px 12px;
    vertical-align: middle;
    word-break: break-word;
    border-bottom: 1px solid #e7edf3;
}

.mdi-extra-hours-page .approval-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf3f8;
    color: #243447;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mdi-extra-hours-page .approval-table tbody tr:hover {
    background: #f7fbff;
}

.mdi-extra-hours-page .col-check {
    width: 5%;
    text-align: center;
}

.mdi-extra-hours-page .col-project {
    width: 35%;
}

.mdi-extra-hours-page .col-h,
.mdi-extra-hours-page .col-total {
    width: 10%;
    text-align: right;
}

.mdi-extra-hours-page .col-status {
    width: 12%;
    text-align: center;
}

.mdi-extra-hours-page .col-action {
    width: 18%;
    text-align: center;
}

.mdi-extra-hours-page .root-row {
    background: rgba(var(--brand-color-rgb), 0.1);
    font-weight: 700;
}

.mdi-extra-hours-page .process-row {
    background: #f8fbff;
}

.mdi-extra-hours-page .tech-row {
    background: #fff;
}

.mdi-extra-hours-page .total-row {
    background: rgba(var(--brand-color-rgb), 0.12);
    font-weight: 700;
    border-top: 2px solid rgba(var(--brand-color-rgb), 0.2);
}

.mdi-extra-hours-page .root-name {
    font-size: 0.95rem;
    font-weight: 800;
}

.mdi-extra-hours-page .process-name {
    position: relative;
    display: inline-block;
    padding-left: 18px;
    font-weight: 700;
}

.mdi-extra-hours-page .process-name::before {
    position: absolute;
    top: 0;
    left: 0;
    color: #7a8a99;
    content: "-";
}

.mdi-extra-hours-page .tech-name {
    display: inline-block;
    padding-left: 36px;
}

.mdi-extra-hours-page .pending-row {
    border-left: 4px solid #d89522;
}

.mdi-extra-hours-page .approved-row {
    opacity: 0.86;
}

.mdi-extra-hours-page .estado-badge {
    display: inline-block;
    min-width: 92px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
}

.mdi-extra-hours-page .estado-pendente {
    background: #d89522;
}

.mdi-extra-hours-page .estado-aprovada {
    background: var(--brand-color);
}

.mdi-extra-hours-page .estado-processada {
    background: #2f8f5b;
}

.mdi-extra-hours-page .estado-neutral {
    background: #7a8794;
}

.mdi-extra-hours-page .row-btn {
    border: none;
    border-radius: 7px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.mdi-extra-hours-page .row-btn-approve {
    background: var(--brand-color);
}

.mdi-extra-hours-page .row-btn-process {
    background: #2f8f5b;
}

.mdi-extra-hours-page .row-btn-disabled {
    background: #8d98a3;
    cursor: not-allowed;
    opacity: 0.7;
}

.mdi-extra-hours-page .text-right {
    text-align: right;
}

.mdi-extra-hours-page .text-center {
    text-align: center;
}

.mdi-ajudas-custo-page .top-actions {
    margin-bottom: 15px;
}

.mdi-ajudas-custo-page .ajudas-custo-table {
    width: 100%;
    min-width: 1680px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.mdi-ajudas-custo-page .ajudas-custo-table th,
.mdi-ajudas-custo-page .ajudas-custo-table td {
    padding: 10px 12px;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-bottom: 1px solid #e7edf3;
}

.mdi-ajudas-custo-page .ajudas-custo-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf3f8;
    color: #243447;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mdi-ajudas-custo-page .ajudas-custo-table tbody tr:hover {
    background: #f7fbff;
}

.mdi-ajudas-custo-page .ajudas-custo-table .col-check {
    width: 4%;
}

.mdi-ajudas-custo-page .ajudas-custo-table .col-tecnico {
    width: 9%;
}

.mdi-ajudas-custo-page .ajudas-custo-table .col-processo-original {
    width: 10%;
}

.mdi-ajudas-custo-page .ajudas-custo-table .col-processo {
    width: 9%;
}

.mdi-ajudas-custo-page .ajudas-custo-table .col-data,
.mdi-ajudas-custo-page .ajudas-custo-table .col-estado,
.mdi-ajudas-custo-page .ajudas-custo-table .col-validada {
    width: 7%;
}

.mdi-ajudas-custo-page .ajudas-custo-table .col-tipo,
.mdi-ajudas-custo-page .ajudas-custo-table .col-acoes {
    width: 10%;
}

.mdi-ajudas-custo-page .ajudas-custo-table .col-pediu,
.mdi-ajudas-custo-page .ajudas-custo-table .col-aprovou {
    width: 9%;
}

.mdi-ajudas-custo-page .ajudas-custo-table .col-data-pedido,
.mdi-ajudas-custo-page .ajudas-custo-table .col-data-aprovacao,
.mdi-ajudas-custo-page .ajudas-custo-table .col-data-processamento {
    width: 8%;
}

.mdi-ajudas-custo-page .ajudas-custo-table .col-motivo {
    width: 15%;
}

.mdi-ajudas-custo-page .ajudas-custo-table td.col-acoes-cell {
    white-space: nowrap;
}

.mdi-ajudas-custo-page .estado-badge,
.mdi-ajudas-custo-page .validacao-badge {
    display: inline-block;
    min-width: 84px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
}

.mdi-ajudas-custo-page .estado-pendente {
    background: #d89522;
}

.mdi-ajudas-custo-page .estado-aprovada {
    background: var(--brand-color);
}

.mdi-ajudas-custo-page .estado-integrada {
    background: #6f42c1;
}

.mdi-ajudas-custo-page .estado-processada,
.mdi-ajudas-custo-page .validacao-sim {
    background: #2f8f5b;
}

.mdi-ajudas-custo-page .estado-invalida,
.mdi-ajudas-custo-page .validacao-nao {
    background: #c94747;
}

.mdi-ajudas-custo-page .validacao-vazio {
    background: #7a8794;
}

.mdi-ajudas-custo-page .action-btn {
    margin-right: 5px;
    border: none;
    border-radius: 7px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.mdi-ajudas-custo-page .approve-btn {
    background: var(--brand-color);
}

.mdi-ajudas-custo-page .delete-btn {
    background: #c94747;
}

.mdi-ajudas-custo-page .project-btn {
    background: #2f8f5b;
}

.mdi-ajudas-custo-page .disabled-btn {
    background: #8d98a3 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.mdi-ajudas-custo-page .project-group-row {
    background: rgba(var(--brand-color-rgb), 0.1);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.mdi-ajudas-custo-page .project-group-row td {
    border-top: 2px solid rgba(var(--brand-color-rgb), 0.2);
}

.mdi-ajudas-custo-page .subprocess-group-row {
    background: #f8fbff;
    cursor: pointer;
    user-select: none;
}

.mdi-ajudas-custo-page .subprocess-group-row td {
    border-top: 1px solid #e8eef6;
}

.mdi-ajudas-custo-page .project-name {
    font-size: 0.9rem;
    font-weight: 800;
}

.mdi-ajudas-custo-page .project-summary {
    margin-left: 8px;
    color: var(--muted-text-color);
    font-size: 0.78rem;
    font-weight: 700;
}

.mdi-ajudas-custo-page .collapse-icon {
    display: inline-block;
    width: 16px;
    color: #7a8a99;
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}

.mdi-ajudas-custo-page .subprocess-label {
    position: relative;
    display: inline-block;
    padding-left: 18px;
    color: #4f5b67;
    font-weight: 700;
}

.mdi-ajudas-custo-page .subprocess-label::before {
    position: absolute;
    top: 0;
    left: 0;
    color: #7a8a99;
    content: "-";
}

.mdi-ajudas-custo-page .detail-row {
    background: #fff;
}

.mdi-ajudas-custo-page .detail-row.pending-row {
    border-left: 4px solid #d89522;
}

.mdi-ajudas-custo-page .detail-row.approved-row {
    opacity: 0.95;
}

.mdi-ajudas-custo-page .processo-original-cell {
    color: #415263;
    font-weight: 700;
}

.mdi-ajudas-custo-page .processo-cell-sub {
    padding-left: 22px !important;
}

.mdi-ajudas-custo-page .text-center {
    text-align: center;
}

.mdi-folgas-page .top-actions {
    margin-bottom: 15px;
}

.mdi-folgas-page .summary-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.mdi-folgas-page .summary-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.mdi-folgas-page .summary-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(12, 24, 36, 0.07);
    padding: 18px;
}

.mdi-folgas-page .summary-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--brand-color);
    content: "";
}

.mdi-folgas-page .summary-card .label {
    margin-bottom: 6px;
    color: var(--muted-text-color);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mdi-folgas-page .summary-card .value {
    color: var(--text-color);
    font-size: 1.65rem;
    font-weight: 800;
}

.mdi-folgas-page .summary-cards .summary-card:nth-child(1)::before { background: #168ca5; }
.mdi-folgas-page .summary-cards .summary-card:nth-child(2)::before { background: var(--brand-color); }
.mdi-folgas-page .summary-cards .summary-card:nth-child(3)::before { background: #d89522; }
.mdi-folgas-page .summary-cards .summary-card:nth-child(4)::before { background: #c94747; }
.mdi-folgas-page .summary-cards .summary-card:nth-child(5)::before { background: #6f42c1; }
.mdi-folgas-page .summary-cards .summary-card:nth-child(6)::before { background: #2f8f5b; }

.mdi-folgas-page .summary-available-card {
    background: #fff;
    color: var(--text-color);
}

.mdi-folgas-page .summary-available-card::before {
    background: var(--brand-color);
}

.mdi-folgas-page .summary-available-card .label,
.mdi-folgas-page .summary-available-card .value {
    color: var(--text-color);
}

.mdi-folgas-page .summary-tech-header,
.mdi-folgas-page .summary-tech-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.4fr) 70px 70px 70px 70px;
    align-items: center;
    gap: 10px;
}

.mdi-folgas-page .summary-tech-header {
    margin-top: 8px;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 10px;
    color: var(--muted-text-color);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mdi-folgas-page .summary-tech-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    margin-top: 8px;
    overflow-y: auto;
    padding-right: 4px;
}

.mdi-folgas-page .summary-tech-row {
    border: 1px solid #e7edf3;
    border-radius: 8px;
    background: #f8fafc;
    padding: 8px 10px;
}

.mdi-folgas-page .summary-tech-name {
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 700;
}

.mdi-folgas-page .summary-tech-small {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: right;
}

.mdi-folgas-page .estado-badge,
.mdi-folgas-page .tipo-badge {
    display: inline-block;
    min-width: 84px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
}

.mdi-folgas-page .estado-pendente { background: #d89522; }
.mdi-folgas-page .estado-aprovada { background: var(--brand-color); }
.mdi-folgas-page .estado-rejeitada { background: #c94747; }
.mdi-folgas-page .estado-gozada { background: #2f8f5b; }
.mdi-folgas-page .estado-neutro { background: #7a8794; }

.mdi-folgas-page .tipo-folga { background: #168ca5; }
.mdi-folgas-page .tipo-falta { background: #6f42c1; }
.mdi-folgas-page .tipo-baixa { background: #2f8f5b; }
.mdi-folgas-page .tipo-acidente { background: #d97706; }
.mdi-folgas-page .tipo-neutro { background: #7a8794; }

.mdi-folgas-page .action-btn {
    margin-right: 5px;
    border: none;
    border-radius: 7px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.mdi-folgas-page .approve-btn { background: var(--brand-color); }
.mdi-folgas-page .reject-btn { background: #c94747; }
.mdi-folgas-page .delete-btn { background: #6c757d; }

.mdi-folgas-page .disabled-btn {
    background: #8d98a3 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.mdi-folgas-page .folgas-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.mdi-folgas-page .folgas-table th,
.mdi-folgas-page .folgas-table td {
    border-bottom: 1px solid #e7edf3;
    padding: 10px 12px;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mdi-folgas-page .folgas-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf3f8;
    color: #243447;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mdi-folgas-page .folgas-table tbody tr:hover {
    background: #f7fbff;
}

.mdi-folgas-page .folgas-table .col-tecnico,
.mdi-folgas-page .folgas-table .col-tipo,
.mdi-folgas-page .folgas-table .col-pediu,
.mdi-folgas-page .folgas-table .col-motivo {
    width: 10%;
}

.mdi-folgas-page .folgas-table .col-data,
.mdi-folgas-page .folgas-table .col-data-pedido,
.mdi-folgas-page .folgas-table .col-data-aprovacao,
.mdi-folgas-page .folgas-table .col-estado {
    width: 8%;
}

.mdi-folgas-page .folgas-table .col-aprovou {
    width: 9%;
}

.mdi-folgas-page .folgas-table .col-obs {
    width: 11%;
}

.mdi-folgas-page .folgas-table .col-acoes {
    width: 12%;
}

.mdi-folgas-page .folgas-table td.col-acoes-cell {
    white-space: nowrap;
}

.mdi-folgas-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.46);
    padding: 20px;
}

.mdi-folgas-modal .custom-modal-box {
    width: 100%;
    max-width: 540px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28);
}

.mdi-folgas-modal .custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 18px;
}

.mdi-folgas-modal .custom-modal-header h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 800;
}

.mdi-folgas-modal .custom-modal-body,
.mdi-folgas-modal .custom-modal-actions {
    padding: 18px;
}

.mdi-folgas-modal .custom-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

.mdi-folgas-modal .modal-close-btn {
    border: none;
    background: transparent;
    color: #536171;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.mdi-folgas-modal .erp-form-group {
    margin-bottom: 14px;
}

.mdi-folgas-modal .erp-form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-color);
    font-weight: 700;
}

.mdi-folgas-modal .erp-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
}

.mdi-folgas-modal .erp-input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(var(--brand-color-rgb), 0.14);
    outline: none;
}

.mdi-folgas-modal .modal-message {
    min-height: 20px;
    color: #c94747;
    font-size: 0.88rem;
    line-height: 1.5;
}

.mdi-reports-page .search-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #f8fafc;
}

.mdi-reports-page .search-container h4 {
    margin: 0 0 6px;
    color: var(--muted-text-color);
    font-size: 0.88rem;
    font-weight: 800;
}

.mdi-reports-page .search-container input {
    min-width: min(360px, 100%);
    min-height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    padding: 7px 10px;
}

.mdi-reports-page .search-container input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(var(--brand-color-rgb), 0.14);
    outline: none;
}

.mdi-reports-page .table-wrapper {
    width: 100%;
    min-height: 45vh;
    max-height: calc(100vh - 285px);
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
}

.mdi-reports-page table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

.mdi-reports-page table th,
.mdi-reports-page table td {
    border-bottom: 1px solid #e7edf3;
    padding: 10px 12px;
    vertical-align: middle;
}

.mdi-reports-page table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf3f8;
    color: #243447;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mdi-reports-page table tbody tr:hover {
    background: #f7fbff;
}

.modal-relatorios-duplicados {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.46);
    padding: 20px;
}

.modal-relatorios-duplicados .modal-content {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28);
    padding: 20px;
}

.modal-relatorios-duplicados h4 {
    margin: 0 0 14px;
    color: var(--text-color);
    font-size: 1.08rem;
    font-weight: 800;
}

.modal-relatorios-duplicados label {
    display: block;
    margin: 10px 0 5px;
    color: var(--text-color);
    font-weight: 700;
}

.modal-relatorios-duplicados input,
.modal-relatorios-duplicados select,
.modal-relatorios-duplicados textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
}

.modal-relatorios-duplicados input:focus,
.modal-relatorios-duplicados select:focus,
.modal-relatorios-duplicados textarea:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(var(--brand-color-rgb), 0.14);
    outline: none;
}

.modal-relatorios-duplicados button {
    min-height: 36px;
    border: 0;
    border-radius: 7px;
    padding: 8px 12px;
    font-weight: 800;
    cursor: pointer;
}

.modal-relatorios-duplicados button[type="submit"],
.modal-relatorios-duplicados #editButton {
    background: var(--brand-color);
    color: #fff;
}

.modal-relatorios-duplicados .delete-btn,
.modal-relatorios-duplicados .danger-button,
.modal-relatorios-duplicados #deleteButton {
    background: #c94747;
    color: #fff;
}

.modal-relatorios-duplicados .close-btn,
.modal-relatorios-duplicados .modal-close-btn {
    float: right;
    border: 0;
    background: transparent;
    color: #536171;
    font-size: 24px;
    line-height: 1;
}

.mdi-form-page {
    background: var(--page-bg);
}

.mdi-form-page .container {
    max-width: 1180px;
}

.mdi-form-page .mdi-intervention-card,
.mdi-form-page .ajc-card {
    width: 100%;
    border-color: var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(12, 24, 36, 0.08);
}

.mdi-form-page .mdi-intervention-title,
.mdi-form-page .ajc-title {
    border-bottom: 2px solid var(--brand-color);
    color: var(--text-color);
}

.mdi-form-page .form-control:focus,
.mdi-form-page .select2-container--default .select2-selection--single:focus,
.mdi-form-page textarea:focus,
.mdi-form-page input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(var(--brand-color-rgb), 0.14);
    outline: none;
}

.mdi-form-page .mdi-submit-button,
.mdi-form-page .ajc-button-primary {
    background: var(--brand-color);
}

.mdi-form-page .mdi-submit-button:hover,
.mdi-form-page .ajc-button-primary:hover {
    filter: brightness(0.92);
}

.mdi-inline-spinner {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 40px;
    color: var(--brand-color);
}

.mdi-inline-spinner::after {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(var(--brand-color-rgb), 0.18);
    border-top-color: var(--brand-color);
    border-radius: 50%;
    animation: mdi-spin 0.85s linear infinite;
    content: "";
}

.mdi-calendar-page {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 28px 18px 56px;
    background: var(--page-bg);
}

.mdi-calendar-page .calendar-page-header,
.mdi-monthly-tech-map .tecnicotp-filters,
.mdi-monthly-tech-map .search-container {
    border-color: var(--border-color);
    border-radius: 10px;
    background: #f8fafc;
}

.mdi-calendar-page .calendar-page-header h3,
.mdi-monthly-tech-map .container-frame > h3,
.mdi-monthly-tech-map .section-title {
    color: var(--text-color);
}

.mdi-calendar-page .calendar-filter select,
.mdi-monthly-tech-map select,
.mdi-monthly-tech-map input,
.mdi-monthly-tech-map textarea {
    border-color: var(--border-color);
    border-radius: 8px;
}

.mdi-calendar-page .calendar-filter select:focus,
.mdi-monthly-tech-map select:focus,
.mdi-monthly-tech-map input:focus,
.mdi-monthly-tech-map textarea:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(var(--brand-color-rgb), 0.14);
    outline: none;
}

.mdi-calendar-page .fc .fc-button-primary,
.mdi-monthly-tech-map button {
    border-color: var(--brand-color);
    background: var(--brand-color);
}

.mdi-calendar-page .fc .fc-button-primary:not(:disabled):hover,
.mdi-monthly-tech-map button:hover {
    filter: brightness(0.92);
}

.mdi-monthly-tech-map {
    background: var(--page-bg);
}

.mdi-monthly-tech-map .container {
    max-width: none;
    width: 100%;
}

.mdi-monthly-tech-map .container-frame {
    width: 100%;
    border-color: var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(12, 24, 36, 0.08);
}

.mdi-monthly-tech-map table {
    border-collapse: separate;
    border-spacing: 0;
}

.mdi-monthly-tech-map table th {
    background: #edf3f8;
    color: #243447;
    font-weight: 800;
}

.mdi-temp-page {
    background: var(--page-bg);
}

.mdi-temp-page .container {
    max-width: none;
    width: 100%;
}

.mdi-temp-page .container-frame,
.mdi-temp-page .single-contact-address {
    width: 100%;
    border-color: var(--border-color);
    border-radius: 12px;
    background: var(--surface-bg);
    box-shadow: 0 12px 34px rgba(12, 24, 36, 0.08);
}

.mdi-temp-page .container-frame > h3,
.mdi-temp-page .section-title {
    color: var(--text-color);
}

.mdi-temp-page .tecnicotp-filters,
.mdi-temp-page .search-container {
    border-color: var(--border-color);
    border-radius: 10px;
    background: #f8fafc;
}

.mdi-temp-page select,
.mdi-temp-page input,
.mdi-temp-page textarea {
    border-color: var(--border-color);
    border-radius: 8px;
}

.mdi-temp-page select:focus,
.mdi-temp-page input:focus,
.mdi-temp-page textarea:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(var(--brand-color-rgb), 0.14);
    outline: none;
}

.mdi-temp-page button,
.mdi-temp-page .btn {
    border-radius: 7px;
    font-weight: 800;
}

.mdi-temp-page button:not(.custom-modal-close),
.mdi-temp-page .btn-primary {
    border-color: var(--brand-color);
    background: var(--brand-color);
    color: #fff;
}

.mdi-temp-page button:not(.custom-modal-close):hover,
.mdi-temp-page .btn-primary:hover {
    filter: brightness(0.92);
}

.mdi-temp-page table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.mdi-temp-page table th,
.mdi-temp-page table td {
    border-bottom: 1px solid #e7edf3;
    padding: 10px 12px;
    vertical-align: middle;
}

.mdi-temp-page table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf3f8;
    color: #243447;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mdi-temp-page table tbody tr:hover {
    background: #f7fbff;
}

.mdi-temp-admin-page > .container {
    max-width: none;
}

.mdi-temp-admin-page > .container > div:first-child {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #f8fafc;
    padding: 14px;
}

.mdi-temp-admin-page .custom-modal {
    background: rgba(15, 23, 42, 0.46);
}

.mdi-temp-admin-page .custom-modal-content {
    border-radius: 12px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28);
}

.temp-intervention-new .single-contact-address {
    border-radius: 12px;
}

.temp-intervention-new .temp-modal {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.temp-intervention-new .temp-modal-content {
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28);
}

@media (max-width: 1200px) {
    .mdi-page {
        padding: 22px 12px 46px;
    }

    .mdi-page .container-frame {
        padding: 18px;
    }

    .mdi-page .horas-extras-search-container {
        align-items: stretch;
        flex-direction: column;
    }

    .mdi-page .horas-extras-search-right input {
        width: min(100%, 320px);
    }

    .mdi-folgas-page .summary-wrapper {
        grid-template-columns: 1fr;
    }

    .mdi-folgas-page .summary-tech-header,
    .mdi-folgas-page .summary-tech-row {
        grid-template-columns: minmax(100px, 1fr) 60px 60px 60px 60px;
    }
}

@media (max-width: 1500px) {
    .mdi-ajudas-custo-page .ajudas-custo-table {
        table-layout: auto;
    }

    .mdi-folgas-page .folgas-table {
        table-layout: auto;
    }
}
