﻿@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,wght@6..12,400;6..12,500;6..12,600;6..12,700&display=swap');

/* == RESET GLOBAL == */
html,
body,
#root,
#app,
app {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* == ELEMENTOS GERAIS == */
ul,
ol {
    list-style: none;
}

canvas {
    display: block;
}

.action {
    cursor: pointer;
}

.colorWeak {
    filter: invert(80%);
}

/* == LAYOUT ANT == */
.ant-layout {
    min-height: 100vh;
}

.ant-layout-header.top-header {
    background: #fff;
    height: 60px;
    padding: 0 24px;
}

.ant-menu-dark .ant-menu-item {
    font-size: 18px;
}

/* == VARIÁVEIS ANT == */
:root {
    --ant-primary-color: #c518ff;
    --ant-primary-color-hover: #40a9ff;
    --ant-primary-color-active: #096dd9;
    --ant-primary-color-outline: rgba(24, 144, 255, 0.2);
    --ant-success-color: #52c41a;
    --ant-warning-color: #faad14;
    --ant-error-color: #ff4d4f;
    --ant-font-size-base: 14px;
    --ant-heading-color: rgba(0, 0, 0, 0.85);
    --ant-text-color: rgba(0, 0, 0, 0.65);
    --ant-text-color-secondary: rgba(0, 0, 0, 0.45);
    --ant-disabled-color: rgba(0, 0, 0, 0.25);
    --ant-border-radius-base: 2px;
    --ant-border-color-base: #d9d9d9;
}

/* == USER MENU == */
/* =====================
   DROPDOWN CARD
   ===================== */
.user-dropdown-card {
    width: 220px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    padding-bottom: 8px;
}

/* =====================
   PERFIL (AVATAR + NOME)
   ===================== */
.user-dropdown-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 16px;
    gap: 10px;
}

.user-dropdown-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #244C99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    text-align: center;
}

/* =====================
   ITENS
   ===================== */
.user-dropdown-menu {
    padding: 4px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s;
}

    .user-dropdown-item:hover {
        background: #f5f7ff;
        color: #244C99;
    }

    .user-dropdown-item .anticon {
        font-size: 15px;
        color: #6b7280;
    }

    .user-dropdown-item:hover .anticon {
        color: #244C99;
    }

/* Sair - vermelho */
.user-dropdown-item--danger {
    color: #e53935;
}

    .user-dropdown-item--danger .anticon {
        color: #e53935;
    }

    .user-dropdown-item--danger:hover {
        background: #fff5f5;
        color: #c62828;
    }

        .user-dropdown-item--danger:hover .anticon {
            color: #c62828;
        }

/* == DRAWER DARK == */
.drawer-dark .ant-drawer-content,
.drawer-dark .ant-drawer-header,
.drawer-dark .ant-drawer-body {
    background-color: #001529;
    color: white;
}

.drawer-dark .ant-drawer-header {
    border-bottom: 1px solid #1f2d3d;
}

.drawer-dark .ant-drawer-body {
    padding: 40px 0 0 0;
}

/* == TIPOGRAFIA == */
.h2-padrao {
    font-size: 25px;
    color: dimgrey;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* == ANT COMPONENTES == */
.ant-space {
    display: flex;
    justify-content: space-between;
}

.ant-space-item {
    display: flex;
    justify-content: flex-end;
}

.ant-input-group-wrapper {
    width: 90%;
    display: flex;
    justify-content: flex-end;
}

.ant-table-thead .ant-checkbox-wrapper {
    display: none;
}

/* == TABELAS == */
.table-container {
    width: 97%;
    margin: 20px 30px 10px 30px;
}

.table-actions {
    margin: 30px 30px 10px 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
}

.table-folders {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    background: white;
}

    .table-folders thead {
        background: #fafafa;
    }

    .table-folders th {
        text-align: left;
        padding: 12px 16px;
        font-weight: 600;
        color: #444;
    }

    .table-folders td {
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .table-folders tbody tr:hover {
        background: #f5f7fb;
    }

/* == ELEMENTOS DA TABELA == */
.folder {
    margin-right: 8px;
}

.expand {
    margin-right: 6px;
    cursor: pointer;
    font-size: 12px;
}

.child {
    background: #fafafa;
}

.padding {
    padding-left: 20px;
}

.icone-name-classificacao {
    display: flex;
    align-items: center;
}

/* == AÇÕES == */
.acoes {
    width: 120px;
    text-align: center;
}

    .acoes div {
        display: flex;
        gap: 15px;
    }

.edit,
.delete {
    cursor: pointer;
}

    .edit:hover {
        color: #1677ff;
    }

    .delete:hover {
        color: #ff4d4f;
    }

/* == OUTROS COMPONENTES == */
.options,
.options-modal {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.options-modal {
    margin-bottom: 10px;
}

.mb-pagination {
    margin: 20px 0 40px 0;
}

/* Garante que o seletor de tamanho de página tenha largura mínima correta */
.ant-pagination-options-size-changer.ant-select {
    min-width: 110px !important;
}

.btn-modal {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
}

.indice-container {
    padding: 10px;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-group label {
        font-weight: 500;
    }

.inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-indice {
    display: flex;
    justify-content: right;
    gap: 10px;
    margin-top: 20px;
}

/* == RESPONSIVO == */
@media (max-width: 480px) {
    .ant-table {
        width: 100%;
        overflow-x: auto;
    }

    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > th,
    .ant-table-thead > tr > td,
    .ant-table-tbody > tr > td {
        white-space: pre;
    }

        .ant-table-thead > tr > th > span,
        .ant-table-tbody > tr > th > span,
        .ant-table-thead > tr > td > span,
        .ant-table-tbody > tr > td > span {
            display: block;
        }
}

@media (max-width: 450px) {
    .ant-layout-sider {
        display: none;
    }
}

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    body .ant-design-pro > .ant-layout {
        min-height: 100vh;
    }
}


.modal-custom .ant-modal-content {
    border-radius: 10px;
}

/* mantém o border-radius no header/body sem cortar o dropdown */
.modal-custom .ant-modal-header {
    border-radius: 10px 10px 0 0;
}

/* Menu do dropdown "Ações" (Editar Documento) */
.ed-acoes-dropdown.ant-dropdown-menu,
.ed-acoes-dropdown .ant-dropdown-menu {
    border-radius: 10px;
    padding: 6px;
    min-width: 220px;
}

.ed-acoes-dropdown .ant-dropdown-menu-item {
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
}

/* Ícone e texto ficam juntos dentro deste wrapper interno (não são filhos diretos do <li>) */
.ed-acoes-dropdown .ant-menu-title-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flex-center {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.main-content {
    background-color: #E9F1F9;
}

@media (max-width: 640px) {

    .table-actions {
        margin: 16px 12px 10px 12px;
    }

    .ant-drawer-body .table-folders {
        width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .ant-drawer-body .table-folders th,
    .ant-drawer-body .table-folders td {
        word-break: break-word;
        overflow-wrap: break-word;
        padding: 8px 10px;
    }

    /* Modais: tabelas com scroll horizontal se necessário */
    .ant-modal-content .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mb-pagination .ant-pagination {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 2px;
    }

    .mb-pagination .ant-pagination-item {
        min-width: 30px !important;
        height: 30px !important;
        line-height: 28px !important;
        font-size: 12px !important;
        margin-inline-end: 2px !important;
    }

    .mb-pagination .ant-pagination-prev,
    .mb-pagination .ant-pagination-next {
        min-width: 30px !important;
        height: 30px !important;
        line-height: 28px !important;
        margin-inline-end: 2px !important;
    }

    .mb-pagination .ant-pagination-jump-prev,
    .mb-pagination .ant-pagination-jump-next {
        min-width: 30px !important;
        height: 30px !important;
        line-height: 28px !important;
        margin-inline-end: 2px !important;
    }

    /* Só afeta tabelas dentro das telas de listagem (.table-actions) */
    .table-actions .table-wrapper {
        overflow-x: hidden;
    }

    .table-actions .table-folders {
        display: block;
        width: 100%;
    }

    .table-actions .table-folders thead {
        display: none;
    }

    .table-actions .table-folders tbody {
        display: block;
    }

    /* Cada linha separada por borda */
    .table-actions .table-folders tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-auto-rows: auto;
        padding: 10px 14px;
        gap: 0 8px;
        border-bottom: 1px solid #f0f0f0;
    }

    .table-actions .table-folders tr:last-child {
        border-bottom: none;
    }

    .table-actions .table-folders td {
        display: block;
        padding: 0;
        border: none;
        font-size: 13px;
    }

    /* Célula nome */
    .table-actions .table-folders td.icone-name-classificacao {
        grid-column: 1;
        grid-row: 1;
        font-size: 14px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* Célula ações */
    .table-actions .table-folders td.acoes {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    /* Demais células (descrição, email, etc.) */
    .table-actions .table-folders td:not(.icone-name-classificacao):not(.acoes) {
        grid-column: 1 / -1;
        font-size: 12px;
        color: #888;
        padding-top: 3px;
        padding-left: 22px;
    }

    .table-actions .table-folders td:not(.icone-name-classificacao):not(.acoes)::before {
        content: attr(data-label) ": ";
        font-weight: 500;
        color: #bbb;
    }
}


.gd-page-wrapper {
    margin: 30px 30px 10px 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-wrapper {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* ── Linha 1 ── */
.search-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 640px) {
    .gd-page-wrapper {
        margin: 12px 10px 10px 10px;
    }

    .search-top-bar > div {
        min-width: 0 !important;
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .search-top-bar > div:last-child .ant-btn {
        width: 100%;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 10px;
}

/* ── Linha 2 — Input texto ── */
.search-input-row {
    width: 100%;
}

/* ── Linha 2 — Índices ── */
.search-indices-row {
    width: 100%;
    border-radius: 6px;
}


.index-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom:10px;
}

    .index-field label {
        font-size: 12px;
        color: #8c8c8c;
        font-weight: 500;
    }

/* ── Cabeçalho dos blocos de índice ── */
.indices-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.indices-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/*BORDA EM TODOS OS INPUTS*/

.ant-select-selector,
.ant-input,
.ant-input-affix-wrapper,
.ant-input-number,
.ant-picker,
.ant-btn {
    border-radius: 8px !important;
}

.button-documento-text {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {

    .novo-doc-text {
        display: none;
    }
}

.user-popover-overlay .ant-popover-inner-content {
    padding: 0;
}

.user-popover-overlay .ant-popover-arrow {
    display: none;
}


/* =====================
   PERFIL
   ===================== */
.user-dropdown-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 14px;
    gap: 10px;
    background: linear-gradient(160deg, #f0f4ff, #ffffff);
    border-radius: 14px 14px 0 0;
}

.user-dropdown-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #244C99;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(36, 76, 153, 0.35);
}

.user-dropdown-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a2e;
    text-align: center;
    line-height: 1.3;
    width: 100%;
}

/* =====================
   MENU
   ===================== */
.user-dropdown-menu {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    font-size: 0.845rem;
    color: #374151;
    cursor: pointer;
    height: 50px;
    transition: background 0.15s, color 0.15s;
}

    .user-dropdown-item:hover {
        background: #f0f4ff;
        color: #244C99;
    }

    .user-dropdown-item .anticon {
        font-size: 14px;
        color: #9ca3af;
        transition: color 0.15s;
    }

    .user-dropdown-item:hover .anticon {
        color: #244C99;
    }

/* =====================
   SAIR
   ===================== */
.user-dropdown-item--danger {
    color: #e53935;
}

    .user-dropdown-item--danger .anticon {
        color: #e53935;
    }

    .user-dropdown-item--danger:hover {
        background: #fff5f5;
        color: #c62828;
    }

        .user-dropdown-item--danger:hover .anticon {
            color: #c62828;
        }

/* =====================
   ESPAÇO INFERIOR
   ===================== */
.user-dropdown-menu-bottom {
    padding-bottom: 6px;
}

/* =====================
   WRAPPER
   ===================== */
.perfil-wrapper {
    min-height: 100%;
    background: #f4f6fb;
}

/* =====================
   BANNER
   ===================== */
.perfil-banner {
    height: 180px;
    background: linear-gradient(135deg, #001529 0%, #001731 100%);
    position: relative;
    overflow: hidden;
}

.perfil-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 80% 50%, rgba(0, 80, 160, 0.25) 0%, transparent 60%),
        radial-gradient(circle at 10% 80%, rgba(0, 40, 100, 0.2) 0%, transparent 50%);
}

.perfil-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 10, 25, 0.15);
}

/* =====================
   CONTAINER
   ===================== */
.perfil-container {
    max-width: 700px;
    margin: -60px auto 40px;
    padding: 0 24px;
    position: relative;
}

/* =====================
   AVATAR FLUTUANTE
   ===================== */
.perfil-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    height:130px;
}

.perfil-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #244C99;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 20px rgba(36, 76, 153, 0.35);
    flex-shrink: 0;
}

.perfil-avatar-info {
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.perfil-nome {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.perfil-badge {
    display: inline-flex;
    align-items: center;
    background: #E6F7FF;
    color: #096DD9;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #91D5FF;
    width: fit-content;
}

/* =====================
   CARD DE DADOS
   ===================== */
.perfil-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    overflow: hidden;
}

.perfil-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: #f8f9ff;
    border-bottom: 1px solid #eef0f6;
    font-size: 0.95rem;
    font-weight: 600;
    color: #244C99;
}

.perfil-readonly-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 3px 10px;
    border-radius: 20px;
}

/* =====================
   GRID DE CAMPOS
   ===================== */
.perfil-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.perfil-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f2f7;
    border-right: 1px solid #f0f2f7;
}

.perfil-field:nth-child(even) {
    border-right: none;
}

.perfil-field:nth-last-child(-n+2) {
    border-bottom: none;
}

.perfil-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.perfil-field-label .anticon {
    font-size: 13px;
    color: #244C99;
}

.perfil-field-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a2e;
}

:deep(.vd-modal .ant-modal-body) {
    padding: 0 !important;
    background: #f8f9ff;
}
 

/* =====================
   RESPONSIVO
   ===================== */
@media (max-width: 600px) {
    .perfil-container {
        margin-top: -50px;
        padding: 0 16px;
    }

    .perfil-banner {
        height: 140px;
    }

    .perfil-avatar-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        height: 150px
    }

    .perfil-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
    }

    .perfil-avatar-info {
        padding-bottom: 12px;
    }

    .perfil-nome {
        font-size: 1.1rem;
        color: #696969;
        text-shadow: none;
    }

    .perfil-grid {
        grid-template-columns: 1fr;
    }

    .perfil-field {
        border-right: none;
    }

    .perfil-field:nth-last-child(-n+2) {
        border-bottom: 1px solid #f0f2f7;
    }

    .perfil-field:last-child {
        border-bottom: none;
    }
}


/* =====================
   LOADING OVERLAY GLOBAL
   ===================== */
.global-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8, 16, 36, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    animation: overlayFadeIn 0.25s ease;
}

.global-loading-logo {
    height: 44px;
}


.global-loading-text {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}


/* =====================
   DRAWERS RESPONSIVOS
   ===================== */
@media (max-width: 720px) {
    .ant-drawer:not(.drawer-dark) .ant-drawer-content-wrapper {
        width: 100% !important;
    }
}


/* ── Modal Contatos — Search 100% width ── */
.modal-contatos .ant-input-wrapper.ant-input-group {
    width: 100%;
}

