#cadastro-dashboard-modal.cadastro-dashboard-modal-overlay {
    display: none;
    position: fixed;
    z-index: 200100;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    font-family: Inter, sans-serif;
    font-size: 14px;
    /* padrao do modal */
}

#cadastro-dashboard-modal .cadastro-dashboard-modal-wrapper {
    width: 96%;
    max-width: 1300px;
    max-height: calc(100vh - 48px);
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dfe5ee;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
}

#cadastro-dashboard-modal .cadastro-dashboard-modal-wrapper.fullscreen {
    width: 100%;
    max-width: none;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
}

#cadastro-dashboard-modal .cadastro-dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eff0f4;
    padding: 10px 16px 6px;
    border-bottom: 1px solid #dde3ea;
}

#cadastro-dashboard-modal .cadastro-dashboard-topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

#cadastro-dashboard-modal .cadastro-dashboard-title {
    color: rgb(107, 114, 128);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

#cadastro-dashboard-modal .cadastro-dashboard-address-bar {
    flex: 1;
    min-width: 180px;
    background: #fff;
    align-content: center;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 10px;
}

#cadastro-dashboard-modal .cadastro-dashboard-address-bar input {
    border: none;
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    color: rgb(75, 85, 99);
    font-size: 14px;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#cadastro-dashboard-modal .cadastro-dashboard-topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

#cadastro-dashboard-modal .cadastro-dashboard-action-btn {
    background: none;
    border: 0;
    color: #666;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cadastro-dashboard-action-btn i {
    font-size: 18px;
}

#cadastro-dashboard-modal .cadastro-dashboard-action-btn:hover {
    background: #e3e8ef;
}

#cadastro-dashboard-modal .cadastro-dashboard-action-btn.close-btn:hover {
    background-color: #F15F56;
    color: #fff;
}

/* Feedback visual ao copiar linhas (Google Sheets) */
#cadastro-dashboard-modal .cadastro-dashboard-action-btn.cadastro-copy-success {
    background-color: rgba(46, 139, 87, 0.18);
    color: #2e8b57;
    animation: cadastro-copy-flash 0.55s ease-out 1;
}

#cadastro-dashboard-modal .cadastro-dashboard-action-btn.cadastro-copy-success i {
    animation: cadastro-copy-pop 0.55s ease-out 1;
    transform-origin: center;
}

@keyframes cadastro-copy-flash {
    0% {
        box-shadow: 0 0 0 rgba(46, 139, 87, 0);
    }

    35% {
        box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.25);
    }

    100% {
        box-shadow: 0 0 0 rgba(46, 139, 87, 0);
    }
}

@keyframes cadastro-copy-pop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.18);
    }

    100% {
        transform: scale(1);
    }
}

#cadastro-dashboard-modal .cadastro-dashboard-modal-content {
    background: #fff;
    padding: 24px;
    overflow: auto;
}

#cadastro-dashboard-modal .cadastro-dashboard-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e8e8;
    flex-wrap: wrap;
}

#cadastro-dashboard-modal .cadastro-filter-label {
    color: #858e96;
    font-size: 14px;
    margin: 0;
}

#cadastro-dashboard-modal .cadastro-filter-date {
    width: 150px;
    height: 36px;
    border: 1px solid #d2d9e2;
    border-radius: 4px;
    font-size: 14px;
    color: #2c3e50;
    padding: 0 8px;
}

#cadastro-dashboard-modal .cadastro-filter-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 240px;
}

#cadastro-dashboard-modal .cadastro-filter-search {
    flex: 1;
    min-width: 180px;
    height: 36px;
    border: 1px solid #d2d9e2;
    border-radius: 4px;
    font-size: 14px;
    padding: 0 10px;
}

#cadastro-dashboard-modal .cadastro-btn-aplicar,
#cadastro-dashboard-modal .cadastro-btn-limpar,
#cadastro-dashboard-modal .cadastro-btn-export {
    height: 34px;
    border-radius: 4px;
    border: 1px solid #d8d8d8;
    font-size: 14px;
    padding: 0 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

#cadastro-dashboard-modal .cadastro-btn-aplicar {
    background: #f15f56;
    border-color: #f15f56;
    color: #fff;
    font-weight: 600;
}

#cadastro-dashboard-modal .cadastro-btn-aplicar:hover {
    background: #e04e47;
    border-color: #e04e47;
}

#cadastro-dashboard-modal .cadastro-btn-aplicar:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

#cadastro-dashboard-modal .cadastro-btn-limpar {
    background: #fff;
    color: #f15f56;
    border-color: #f15f56;
}

#cadastro-dashboard-modal .cadastro-btn-limpar:hover {
    background: #fff5f5;
}

#cadastro-dashboard-modal .cadastro-btn-export {
    background: #2e8b57;
    border-color: #2e8b57;
    color: #fff;
    font-weight: 600;
}

#cadastro-dashboard-modal .cadastro-btn-export:hover {
    background: #257247;
    border-color: #257247;
}

#cadastro-dashboard-modal .cadastro-dashboard-tabs-wrapper {
    background: #f6f7fa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

#cadastro-dashboard-modal .cadastro-dashboard-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#cadastro-dashboard-modal .tab-link {
    border: 0;
    background: transparent;
    color: #2c3e50;
    font-size: 14px;
    padding: 4px 6px;
    border-bottom: 2px solid transparent;
    cursor: default;
}

#cadastro-dashboard-modal .tab-link.active {
    color: #f15f56;
    font-weight: 600;
}

#cadastro-dashboard-modal .cadastro-dashboard-stats,
#cadastro-dashboard-modal .cadastro-dashboard-last-update {
    color: #666;
    font-size: 14px;
}

#cadastro-dashboard-modal .cadastro-dashboard-view-options .view-option {
    border: 0;
    background: none;
    color: #f15f56;
    font-size: 14px;
    font-weight: 500;
}

#cadastro-dashboard-modal .cadastro-dashboard-loading,
#cadastro-dashboard-modal .cadastro-dashboard-empty {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fafbfc;
    padding: 24px 16px;
    text-align: center;
    color: #68788d;
    margin-bottom: 12px;
}

#cadastro-dashboard-modal .cadastro-dashboard-loading .spinner {
    margin: 0 auto 10px;
    width: 28px;
    height: 28px;
    border: 3px solid #dce2ea;
    border-top-color: #f15f56;
    border-radius: 50%;
    animation: cadastro-spin 0.8s linear infinite;
}

@keyframes cadastro-spin {
    to {
        transform: rotate(360deg);
    }
}

#cadastro-dashboard-modal .cadastro-dashboard-empty i {
    font-size: 22px;
    color: #a8b2c2;
    margin-bottom: 8px;
}

#cadastro-dashboard-modal .cadastro-table-wrap {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: auto;
    background: #fff;
}

#cadastro-dashboard-modal .cadastro-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
}

#cadastro-dashboard-modal .cadastro-table thead th {
    background: #e8e8e8;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid #d7d7d7;
    text-align: left;
    white-space: nowrap;
}

#cadastro-dashboard-modal .cadastro-table tbody td {
    font-size: 14px;
    color: #2c3e50;
    padding: 8px 14px;
    border-bottom: 1px solid #efefef;
}

#cadastro-dashboard-modal .cadastro-table thead th:first-child,
#cadastro-dashboard-modal .cadastro-table tbody td:first-child {
    text-align: left;
    white-space: nowrap;
}

#cadastro-dashboard-modal .cadastro-table tbody tr:nth-child(even) {
    background: #f6f7fa;
}

#cadastro-dashboard-modal .cadastro-table tbody tr:hover {
    background: #e8e8e8;
}

#cadastro-dashboard-modal .cadastro-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 18px;
    /* espaco para o indicador */
}

/* Indicadores de ordenacao SEM caracteres especiais (compatível com ISO-8859-1) */
#cadastro-dashboard-modal .cadastro-table th.sortable:before,
#cadastro-dashboard-modal .cadastro-table th.sortable:after {
    content: '';
    position: absolute;
    right: 6px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.45;
}

/* Estado neutro: mostra dois triangulos (up e down) */
#cadastro-dashboard-modal .cadastro-table th.sortable:before {
    top: 42%;
    border-bottom: 6px solid #7b8794;
    /* triangulo para cima */
}

#cadastro-dashboard-modal .cadastro-table th.sortable:after {
    top: 58%;
    border-top: 6px solid #7b8794;
    /* triangulo para baixo */
}

/* Asc: destaca o triangulo de cima */
#cadastro-dashboard-modal .cadastro-table th.sortable.sort-asc:before {
    opacity: 1;
    border-bottom-color: #2c3e50;
}

#cadastro-dashboard-modal .cadastro-table th.sortable.sort-asc:after {
    opacity: 0.25;
}

/* Desc: destaca o triangulo de baixo */
#cadastro-dashboard-modal .cadastro-table th.sortable.sort-desc:after {
    opacity: 1;
    border-top-color: #2c3e50;
}

#cadastro-dashboard-modal .cadastro-table th.sortable.sort-desc:before {
    opacity: 0.25;
}

#cadastro-dashboard-modal .cadastro-dashboard-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 8px 4px;
    flex-wrap: wrap;
}

#cadastro-dashboard-modal .cadastro-pagination-info,
#cadastro-dashboard-modal .cadastro-pagination-controls,
#cadastro-dashboard-modal .cadastro-pagination-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #66778d;
}

#cadastro-dashboard-modal .pag-btn {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #666;
    cursor: pointer;
}

#cadastro-dashboard-modal .pag-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#cadastro-dashboard-modal .pag-btn:not(:disabled):hover {
    border-color: #f15f56;
    color: #f15f56;
}

#cadastro-dashboard-modal #cadastroPerPageModal {
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    height: 34px;
    padding: 0 6px;
    color: #44556d;
    background: #fff;
    font-size: 14px;
}

#cadastro-dashboard-modal .cadastro-separator {
    color: #d4d4d4;
    font-size: 14px;
}

@media (max-width: 1024px) {
    #cadastro-dashboard-modal.cadastro-dashboard-modal-overlay {
        padding: 10px;
    }

    #cadastro-dashboard-modal .cadastro-dashboard-modal-wrapper {
        width: 100%;
        max-height: calc(100vh - 20px);
    }
}

@media (max-width: 768px) {
    #cadastro-dashboard-modal .cadastro-dashboard-topbar {
        padding: 8px 12px;
    }

    #cadastro-dashboard-modal .cadastro-dashboard-title {
        font-size: 14px;
    }

    #cadastro-dashboard-modal .cadastro-dashboard-address-bar {
        display: none;
    }

    #cadastro-dashboard-modal .cadastro-dashboard-modal-content {
        padding: 12px;
    }

    #cadastro-dashboard-modal .cadastro-filter-search-wrap {
        min-width: 100%;
    }

    #cadastro-dashboard-modal .cadastro-filter-date {
        width: 48%;
        min-width: 140px;
    }

    #cadastro-dashboard-modal .cadastro-dashboard-tabs-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    #cadastro-dashboard-modal .cadastro-dashboard-pagination {
        flex-direction: column;
        align-items: flex-start;
    }
}