/* =========================================
   CONSULTA DE INVENTÁRIO
========================================= */

.resultados-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    color: #243247;
}

/* =========================================
   CABEÇALHO
========================================= */

.resultados-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #173b68, #2463a5);
    border-radius: 16px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(23, 59, 104, 0.16);
}

.resultados-label {
    display: inline-block;
    margin-bottom: 8px;
    color: #c7ddf7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.resultados-header h1 {
    margin: 0;
    font-size: 27px;
    font-weight: 750;
    color: #ffffff;
}

.resultados-header p {
    margin: 9px 0 0;
    color: #e0ebf8;
    font-size: 14px;
}

.resultados-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    font-size: 32px;
}

/* =========================================
   INDICADORES
========================================= */

.resultados-indicadores {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.resultado-indicador {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 105px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e7edf4;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(30, 50, 75, 0.04);
}

.indicador-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    font-size: 23px;
}

.indicador-icon.azul {
    background: #eaf2ff;
}

.indicador-icon.verde {
    background: #e8f8ef;
}

.indicador-icon.laranja {
    background: #fff3e5;
}

.resultado-indicador span {
    display: block;
    margin-bottom: 7px;
    color: #718096;
    font-size: 13px;
    font-weight: 600;
}

.resultado-indicador strong {
    color: #243b53;
    font-size: 25px;
    font-weight: 800;
}

/* =========================================
   CARDS
========================================= */

.resultado-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e7edf4;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(30, 50, 75, 0.04);
    min-width: 0;
}

.resultado-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 23px;
}

.resultado-card-header h2 {
    margin: 0;
    color: #243b53;
    font-size: 17px;
    font-weight: 750;
}

.resultado-card-header p {
    margin: 6px 0 0;
    color: #8492a6;
    font-size: 13px;
}

.filtro-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #edf4ff;
    font-size: 19px;
}

/* =========================================
   FILTROS
========================================= */

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

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

.filtro-campo label {
    color: #46566b;
    font-size: 12px;
    font-weight: 700;
}

.filtro-campo input {
    width: 100%;
    height: 43px;
    padding: 0 13px;
    color: #34465a;
    background: #fbfcfe;
    border: 1px solid #dce4ee;
    border-radius: 9px;
    outline: none;
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filtro-campo input:focus {
    border-color: #3478c5;
    box-shadow: 0 0 0 3px rgba(52, 120, 197, 0.10);
    background: #ffffff;
}

.filtro-campo input::placeholder {
    color: #a6b1bf;
}

.filtros-acoes {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 22px;
}

.btn-pesquisar,
.btn-limpar {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 19px;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s;
}

.btn-pesquisar {
    color: #ffffff;
    background: #2869ad;
}

.btn-pesquisar:hover {
    background: #1d568f;
    transform: translateY(-1px);
}

.btn-limpar {
    color: #53657b;
    background: #edf1f6;
}

.btn-limpar:hover {
    background: #e0e7ef;
}

/* =========================================
   TABELA
========================================= */

.tabela-card {
    padding-bottom: 16px;
}

.tabela-header {
    flex-wrap: wrap;
}

.seletor-limite {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    font-size: 12px;
}

.seletor-limite select {
    height: 36px;
    padding: 0 10px;
    color: #34465a;
    background: #ffffff;
    border: 1px solid #dce4ee;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
}

.tabela-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e8edf3;
    border-radius: 10px;
}

.tabela-resultados {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    font-size: 12px;
}

.tabela-resultados thead {
    background: #f3f6fa;
}

.tabela-resultados th {
    padding: 15px 13px;
    color: #53657b;
    text-align: left;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #e4eaf1;
}

.tabela-resultados td {
    padding: 14px 13px;
    color: #46566b;
    border-bottom: 1px solid #edf1f5;
    white-space: nowrap;
}

.tabela-resultados tbody tr {
    transition: background 0.15s;
}

.tabela-resultados tbody tr:hover {
    background: #f5f9ff;
}

.tabela-resultados tbody tr:last-child td {
    border-bottom: none;
}

.coluna-pn {
    color: #2869ad !important;
    font-weight: 750;
}

.coluna-position {
    font-weight: 650;
}

.coluna-description {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coluna-contagem {
    text-align: center;
    font-weight: 700;
}

.coluna-data {
    color: #718096 !important;
    font-size: 11px;
}

/* =========================================
   LOADING
========================================= */

.loading-resultados {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-height: 190px;
    color: #8492a6;
    font-size: 13px;
}

.spinner-resultados {
    width: 35px;
    height: 35px;
    border: 4px solid #e6edf5;
    border-top-color: #2869ad;
    border-radius: 50%;
    animation: girarResultado 0.8s linear infinite;
}

@keyframes girarResultado {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   SEM RESULTADOS
========================================= */

.sem-resultados {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 30px;
    text-align: center;
}

.sem-resultados > div {
    margin-bottom: 12px;
    font-size: 38px;
}

.sem-resultados h3 {
    margin: 0;
    color: #46566b;
    font-size: 16px;
}

.sem-resultados p {
    margin: 8px 0 0;
    color: #8a98a9;
    font-size: 13px;
}

/* =========================================
   PAGINAÇÃO
========================================= */

.paginacao-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    margin-top: 17px;
    border-top: 1px solid #edf1f5;
}

.paginacao-info {
    color: #8492a6;
    font-size: 12px;
}

.paginacao-botoes {
    display: flex;
    align-items: center;
    gap: 7px;
}

.paginacao-botoes button {
    min-width: 35px;
    height: 34px;
    padding: 0 11px;
    color: #52657a;
    background: #ffffff;
    border: 1px solid #dfe6ee;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    transition: 0.2s;
}

.paginacao-botoes button:hover:not(:disabled) {
    color: #ffffff;
    background: #2869ad;
    border-color: #2869ad;
}

.paginacao-botoes button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagina-atual {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 35px;
    height: 34px;
    color: #ffffff;
    background: #2869ad;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
}

/* =========================================
   ESTADOS E RESPONSIVIDADE
========================================= */

[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .filtros-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .resultados-page {
        gap: 17px;
    }

    .resultados-header {
        padding: 22px;
    }

    .resultados-header h1 {
        font-size: 22px;
    }

    .resultados-header-icon {
        width: 55px;
        height: 55px;
        font-size: 25px;
    }

    .resultados-indicadores {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .resultado-indicador {
        min-height: 85px;
    }

    .resultado-card {
        padding: 18px;
    }

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

    .filtros-acoes {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-pesquisar,
    .btn-limpar {
        width: 100%;
    }

    .paginacao-container {
        flex-direction: column;
        align-items: stretch;
    }

    .paginacao-info {
        text-align: center;
    }

    .paginacao-botoes {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 420px) {
    .resultados-header-icon {
        display: none;
    }

    .resultado-card-header {
        align-items: flex-start;
    }

    .seletor-limite {
        width: 100%;
        justify-content: flex-start;
    }
}

.btn-exportar {
    background: #16834a;
    color: #ffffff;
    border: none;
    padding: 11px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-exportar:hover {
    background: #116b3b;
}

.btn-exportar:active {
    transform: scale(0.98);
}