
/* Cadastros */

.cad_pess_content {
    background-image: none;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    min-height: 95vh;
    overflow: auto;
    justify-content: center;
    padding: 1rem;
}

.cad_pess_container {
    box-shadow: 0px 6px 10px rgb(0 0 0 / 34%);
    margin: 1rem;
    padding: 2rem;
    border-radius: 12px;
    background-color: white;
    padding: 20px;
    width: 95%;
    min-width: 95%;
    max-width: 95%;
}

.flex-grow-1 {
    flex-grow: 1;
    min-width: 200px;
}

.d-flex.flex-nowrap {
    white-space: nowrap;
}

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

.upload_box_corban_rep {
    display: flex;
    align-items: center;   /* centraliza verticalmente */
    justify-content: center; /* opcional: centraliza horizontalmente */
    padding: 0.5rem;
    height: auto;          /* altura segue o conteúdo */
    border-width: 1px;
    border-style: dashed;
    border-radius: 5px;
    text-align: center;
}

.upload_box_corban_rep div,
.upload_box_corban_rep label {
    margin: 0;             /* elimina espaços extras */
    line-height: 1.2;      /* texto mais compacto */
}
.upload_box_corban_rep_lab label {
    font-size: 0.8rem;
}

.filename-text {
    display: inline-block;   /* precisa ser inline-block ou block */
    max-width: 20vw;        /* defina o limite desejado */
    white-space: nowrap;     /* não quebra de linha */
    overflow: hidden;        /* corta o texto extra */
    text-overflow: ellipsis; /* coloca "..." */
    vertical-align: middle;  /* alinha com o ícone */
}

.doc_comprov_conta {
    font-weight: bold;
    max-width: 25vw;
    white-space: nowrap;     /* não quebra de linha */
    overflow: hidden;        /* corta o texto extra */
    text-overflow: ellipsis; /* coloca "..." */
}

.cad-pess-review-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cad-pess-review-area-div {
    display: grid;
    justify-items: center;
    justify-self: center;
    overflow-x: auto;
}


/* Aprov. gestor */

.cad-aprov-main-container * {
    box-sizing: border-box;
}

.cad-aprov-filter-card-container {
    padding: 0.5rem;
    border: 0px;
    background-color: rgb(41, 89, 176, 0.2);
    width: 100%;
    justify-self: center;
}

.cad-aprov-filter-card-title-area {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.cad-aprov-filter-card-title-area label {
    font-weight: bold;
    font-size: 1.2rem;
    color: rgb(41, 89, 176, 1) !important;
    margin-left: 0.7rem;
    margin-top: 0.5rem;
    margin-bottom: 0.7rem;
}

.cad-aprov-filter-card-title-area div {
    margin-right: 0.7rem;
    visibility: hidden;
}

/* Grid flexível com múltiplas colunas e linhas automáticas */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1rem;
    justify-items: center;
    align-items: center;
    width: 100%;
    padding: 10px;
}

.filter-grid * {
    border: 0;
    margin: 0;
}

/* Cada filtro organizado em coluninha */
.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 20rem;
    text-align: center;

    /* 🔽 Controle de altura */
    min-height: 5rem;
    max-height: 6rem;
    overflow: visible;
}

.break-line {
    grid-column: 1 / -1; /* ocupa toda a linha e força a quebra */
}
.filter-item.right-align {
    justify-self: end; /* alinha horizontalmente à direita da célula */
}

/* remove margens estranhas do label e dá um espaçamento pequeno */
.filter-item > label {
    color: rgb(51, 50, 49, 1) !important;
    margin: 8px 0 0 0;
    padding: 0;
    line-height: 1.2;
    text-align: center;
    font-weight: 600;
}

/* Inputs, dropdowns e botões ocupam largura total */
.btn-filter-apply {
    width: 100%;
    min-height: 3rem;
    align-self: center;
    margin: 0 0 0 10px !important;
    background-color: white;
    font-weight: 600;
    border: 3px solid rgb(80, 165, 235);
    transition-duration: 0.2s;
    cursor: pointer;
}

.btn-filter-apply:hover {
    background-color: rgb(80, 165, 235, 0.8);
    color: white;
}

.btn-filter-apply:active {
    background-color: rgb(80, 165, 235);
    box-shadow: 0 5px #666;
    transform: translateY(4px);
}

@scope (.filter-item) {

    .control-wrap {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 3.5rem;
        min-height: 3.5rem;
        max-height: 3.5rem;
        padding: 8px;
    }

    .control-wrap:has(.mantine-DatePickerInput-wrapper) div {
        height: 100% !important;
        width: 100% !important
    }

    @scope (.control-wrap) {

        .mantine-DatePickerInput-root {
            padding: 0 !important;
        }

        .mantine-DatePickerInput-root button {
            padding-left: 1rem !important;
            padding-right: 0 !important;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
            height: 100% !important;
        }

        .mantine-DatePickerInput-section {
            display: flex;
            justify-content: end;
            width: 100% !important;
            height: 100% !important;
        }

        .mantine-DatePickerInput-section button {
            padding: 0 !important;
            margin-right: 1rem;
        }

        .form-input,
        .btn-filter-apply,
        .dropdown-control {
            border-radius: 7px !important;
            width: 100%;
            height: 100%;
        }

    }

}

.filter-item .control-wrap .form-input {
    padding: 1rem;
}

@scope (.control-wrap) {
    .dash-dropdown,
    .Select-control,
    input {
        width: 100%;
        height: 100%;
        padding: 0;
    }

    .Select-value {
        padding: 0 !important;
    }

}


.cad-aprov-main-table-container {
    padding-top: 1rem;
    padding-bottom: 1rem;
    width: 100%;
    margin-inline: auto;
    overflow-x: auto;
}

.cad-aprov-main-table {
    width: 100%;
    word-wrap: break-word; /* quebra palavras longas */
    white-space: normal;   /* permite quebrar linhas */
    font-size: 0.9rem;    /* reduz fonte */
}

@scope (.cad-aprov-main-table) {
    th, td {
        padding: 1rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    thead tr {
        font-size: 1.05rem;
        height: 3rem;
        background-color: rgb(41, 89, 176, 0.2);
    }

    tbody tr {
        max-height: 3rem;
        vertical-align: middle;
    }

    tbody tr {
        background-color: #FFFAFA;
    }

    tbody tr:nth-child(4n-1) {
        background-color: rgb(41, 89, 176, 0.15);
    }

    /*  sem borda
    tbody tr:nth-child(2n) {
        border: 1px solid rgb(0, 0, 0, 0.5);
    }
    */

    .non-text-element {
        display: flex;
        justify-content: center;
        align-items: center;
        border: 0;
        margin: 0;
    }

}

.cad-aprov-main-table-display-pages {
    display: flex;
    flex-direction: row;
    justify-content: end;
}

.cad-aprov-main-table-display-pages h1 {
    font-size: 1rem;
    color: rgb(41, 89, 176, 1) !important;
    padding-top: 1rem;
    padding-bottom: 0.35rem;
}

.cad-aprov-main-table-pagination {
    display: flex;
    justify-content: end;
    padding-top: 1.5rem;
}

.indiv-container {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
}

.indiv-container + div {
    margin: 0;
    padding: 0;
}

@scope (.indiv-container) {
    div {
        flex: 1;
        min-width: 0;
        margin: 0;
        padding: 0.5rem;
    }
    h2 {
        color: rgb(41, 89, 176, 1);
        font-size: 1.2rem;
        padding-bottom: 0 !important;
        margin: 0;
    }
    iframe {
        height: 480px;
        overflow: auto;
        max-width: 1000px;
        max-height: 500px;
    }

    .mantine-Tabs-panel {
        max-height: 500px;
        overflow-y: auto;
    }

    .doc-radio {
        display: flex;
        flex-wrap: wrap;   /* permite quebrar para baixo */
        justify-content: flex-start;
        gap: 10px;
    }

    .doc-radio .form-check {
        flex: 1 1 100rem;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-top: 0;
        padding-bottom: 0;
        display: inline-block;
        text-align: left;
        width: 100%;
    }

    .doc-radio .form-check label {
        max-width: 100%;
    }

    @scope (.form-display) {
        .input-group-text {
            width: 25%;
        }

        .input-group-text.no_width {
            width: auto;
        }

    }


    .address-collapse {
        background: #f8f9fa;
        padding: 1.25rem 1.5rem;
        border-radius: 0.75rem;
        border: 1px solid #e4e4e4;
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }


    .address-collapse div {
        padding: 0;
        margin-bottom: 0.2rem;
    }

    .address-collapse .input-group-text {
        width: 35%;
    }

    .address-collapse .row > .col:nth-child(1),
    .address-collapse .row > [class*="col-"]:nth-child(1) {
        padding-right: 0.4rem;
    }

    .approve-area {
        border-top: 1px solid rgb(0, 0, 0, 0.3);
    }

    @scope (.approve-area) {

        .check-area span {
            display: inline-block;
            text-align: left;
            width: 100%;
        }

        .check-area ul {
            padding: 0;
            margin: 0;
        }

        .check-area span:hover {
            text-decoration: underline !important;
            text-decoration-color: currentColor !important;
        }
    }

    .toast-control {
        position: fixed;
        top: 55;
        right: 10;
        width: 600;
    }

}

.modal-body .card {
    padding: 0.5rem;
}

.label-verif {
    color: green;
    font-weight: bold;
}

.label-n-verif {
    color: firebrick;
    font-weight: bold;
}



/* --- */
/* Mobile - layout adjustments */

.display-only-mobile {
    display: none;  /* padrão: não aparece */
}
.display-only-desktop {
    display: block;  /* padrão: aparece no desktop */
}
.responsive-row {
    display: flex;
    gap: 0.5rem; /* espaço entre colunas */
}
.responsive-row.hidden {
    display: none !important;
}

.responsive-row > .section-title {
    font-size: 1.05rem;           /* um pouco maior que o texto normal */
    font-weight: 600;             /* semi-bold */
    color: #333;                  /* cinza escuro elegante */
    margin-top: 1.2rem;           /* espaço antes da sessão */
    margin-bottom: -0.25rem;        /* espaço depois da sessão */
    padding-left: 0.5rem;        /* leve alinhamento à esquerda */
}


.cad-pess-send-btn-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cad-pess-send-btn-area div {
    display: grid;
    text-align: center;
}


/* Ajustes para Mobile */

@media (max-width: 768px) {

    .cad_pess_content {
        background-color: #170d24;
        background-image: radial-gradient(ellipse at 10% 90%, #3c2d83 0%, transparent 55%), radial-gradient(ellipse at 90% 90%, #833cc3 0%, transparent 55%), radial-gradient(ellipse at 90% 10%, #4a74dc 0%, transparent 55%), radial-gradient(ellipse at 10% 10%, #35244f 0%, transparent 55%);
        display: flex;
        align-items: center;
        min-height: 100vh;
        justify-content: center;
        padding: 1rem;
        max-width: 100%;
        overflow: clip;
    }
    .cad_pess_container {
        box-shadow: 0px 6px 10px rgb(0 0 0 / 34%);
        margin: 1rem;
        padding: 2rem;
        border-radius: 12px;
        background-color: white;
        padding: 20px;
        max-width: 100%;
        overflow: clip;
    }
    .display-only-mobile {
        display: block; /* aparece no mobile */
    }
    .display-only-desktop {
        display: none; /* some no mobile */
    }
    .responsive-row {
        flex-direction: column; /* transforma colunas em linhas */
    }
    .responsive-width-col {
        width: 100% !important;
    }
    .filename-text {
        display: inline-block;   /* precisa ser inline-block ou block */
        max-width: 18vw;        /* defina o limite desejado */
        white-space: nowrap;     /* não quebra de linha */
        overflow: hidden;        /* corta o texto extra */
        text-overflow: ellipsis; /* coloca "..." */
        vertical-align: middle;  /* alinha com o ícone */
    }
    .doc_comprov_conta {
        font-weight: bold;
        max-width: 50vw;
        white-space: nowrap;     /* não quebra de linha */
        overflow: hidden;        /* corta o texto extra */
        text-overflow: ellipsis; /* coloca "..." */
    }

    .cad-pess-review-area {
        width: 100%;
        overflow-x: auto;
    }

    .cad-pess-send-btn-area {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-x: auto;
    }

    .cad-aprov-filter-card-title-area label {
        font-size: 1.6rem;
    }
    .cad-aprov-filter-card-title-area div {
        visibility: visible;
    }
    .filter-grid {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .filter-item {
        max-width: none;
    }
    .filter-item > label {
        text-align: left;
        font-size: 1.2rem;
    }
    .btn-filter-apply {
        margin: 0 !important;
    }

    .cad-aprov-main-table th {
        display: none;
    }
    .cad-aprov-main-table .non-text-element {
        justify-self: center;
    }

    .cad-aprov-main-table td[data-cell="Tipo"],
    .cad-aprov-main-table td[data-cell="Data Solicitação"],
    .cad-aprov-main-table td[data-cell="Última Atualização"],
    .cad-aprov-main-table td[data-cell="Usuário"] {
        display: none;
    }

    .cad-aprov-main-table td {
        display: grid;
        grid-template-columns: 50% 50%;
        padding: 0.5rem 1rem;
        white-space: wrap;
    }
    .cad-aprov-main-table td::before {
        content: attr(data-cell) ": ";
        font-weight: 700;
        text-transform: capitalize;
    }
    .cad-aprov-main-table td[data-cell="_none"] {
        display: block;          /* volta a ser bloco normal */
        text-align: center;      /* centraliza se quiser */
        padding: 0.5rem;         /* padding mais compacto */
    }

    .cad-aprov-main-table td[data-cell="_none"]::before {
        content: none !important;  /* remove o pseudo-elemento */
    }

    .form-display .input-group-text {
        width: 38%;
    }

    .indiv-container {
        flex-direction: column;
    }

    @scope (.indiv-container) {

        .address-collapse .input-group-text {
            width: 38%;
        }

        .address-collapse .row > .col:nth-child(1),
        .address-collapse .row > [class*="col-"]:nth-child(1) {
            padding-right: 0 !important;
        }

        .address-collapse .row > [class*="col"] {
            flex: 0 0 100% !important;
            max-width: 100% !important;
        }

    }

}



/* Ajustes para tela pequena */

@media (max-width: 1250px) {
    .cad-aprov-main-table {
        width: 100%;
        table-layout: fixed;
        word-wrap: break-word; /* quebra palavras longas */
        white-space: normal;   /* permite quebrar linhas */
        font-size: 0.9rem;    /* reduz fonte */
    }
}
