:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --border-color: #bdc3c7;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #ecf0f1;
}
body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-top: 20px;
    padding-bottom: 20px;
}
.card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}
.card-header {
    font-weight: bold;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
}
.btn-outline-secondary {
    border: 1px solid #ced4da;
    color: #6c757d;
    transition: all 0.3s;
}
.btn-outline-secondary:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}
.progress {
    height: 25px;
}
.btn {
    font-weight: 500;
    margin-bottom: 5px;
}
textarea {
    resize: vertical;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.status-message {
    animation: fadeIn 0.5s;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 4px;
}
.status-success {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--text-primary);
    border-left: 4px solid var(--success-color);
}
.status-warning {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--text-primary);
    border-left: 4px solid var(--warning-color);
}
.status-error {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}
.status-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}
.dataTables_wrapper {
    margin-top: 15px;
}
.dataTables_filter input {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    padding: 5px 10px !important;
}
.dataTables_length select {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    padding: 5px !important;
}
.dataTables_wrapper .dataTables_paginate {
    margin-top: 15px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: var(--text-light) !important;
    border-color: var(--primary-color);
}
.dataTables_length select {
    width: auto !important;
    display: inline-block !important;
    margin: 0 5px;
}
#paginationControls {
    background: #ffffff;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}
#paginationControls .input-group-text {
    font-size: 0.9rem;
    white-space: nowrap;
}
#paginationControls select {
    max-width: 120px;
}
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        text-align: left !important;
        float: none !important;
    }
    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
    }
    .dataTables_scrollBody {
        max-height: 400px !important;
    }
    #paginationControls {
        padding: 5px;
    }
    #paginationControls .input-group-text {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
    #paginationControls select {
        max-width: 100px;
    }
}
.summary-card {
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.summary-card .card-body {
    padding: 15px;
}
.summary-card .card-title {
    font-size: 1rem;
    margin-bottom: 5px;
}
.summary-card .card-text {
    font-size: 1.5rem;
    font-weight: bold;
}
.nav-tabs .nav-link {
    color: var(--text-primary);
    font-weight: 500;
}
.nav-tabs .nav-link.active {
    font-weight: bold;
    border-bottom: 3px solid var(--accent-color);
}
.tab-content {
    background-color: #ffffff;
}
.dataTables_scrollHead {
    overflow: hidden !important;
}
.badge {
    font-size: 0.85em;
    font-weight: 500;
    padding: 5px 8px;
}
.status-ok {
    background-color: rgba(39, 174, 96, 0.15);
    color: var(--success-color);
}
.status-analise {
    background-color: rgba(243, 156, 18, 0.15);
    color: var(--warning-color);
}
.status-nao_importado {
    background-color: rgba(149, 165, 166, 0.15);
    color: var(--text-secondary);
}
.status-divergente {
    background-color: rgba(231, 76, 60, 0.15);
    color: var(--danger-color);
}
.status-outro {
    background-color: rgba(52, 152, 219, 0.15);
    color: var(--info-color);
}
.container {
    max-width: 100% !important;
    padding-left: 20px;
    padding-right: 20px;
}
.form-control[type="file"] {
    background-color: rgba(52, 152, 219, 0.05) !important;
    border-color: rgba(52, 152, 219, 0.3) !important;
}
.form-control[type="file"]:hover {
    background-color: rgba(52, 152, 219, 0.1) !important;
    border-color: rgba(52, 152, 219, 0.4) !important;
}
.form-control[type="file"]::file-selector-button {
    background-color: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 10px;
    transition: background-color 0.3s;
}
.form-control[type="file"]::file-selector-button:hover {
    background-color: #2980b9;
}
#summaryStats .card {
    margin-bottom: 10px !important;
}
#summaryStats .card-body {
    padding: 10px !important;
}
#summaryStats .card-title {
    font-size: 0.8rem !important;
    margin-bottom: 3px !important;
}
#summaryStats .card-text {
    font-size: 1.1rem !important;
    font-weight: bold !important;
}
#summaryStats .col-md-3 {
    padding: 0 5px !important;
}
#summaryStats .row {
    display: flex;
    flex-wrap: wrap;
}
#summaryStats .col-md-3 {
    display: flex;
}
#summaryStats .card {
    flex: 1;
}
.edit-mode td:not(:last-child) {
    background-color: #fffde7 !important;
    padding: 4px !important;
}
.edit-mode input {
    width: 100% !important;
    padding: 4px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
}
.edit-mode input[type="number"] {
    text-align: right;
}
.table-editable {
    position: relative;
}
.table-editable .editable {
    cursor: pointer;
}
.table-editable .editable:hover {
    background-color: #f8f9fa;
}
.edit-btn, .save-btn {
    min-width: 80px;
}
.edit-mode .status-select {
    pointer-events: none;
    opacity: 0.7;
}
#exportOptionsModal .list-group-item {
    border-left: none;
    border-right: none;
    padding: 12px 20px;
    transition: all 0.3s;
}
#exportOptionsModal .list-group-item:first-child {
    border-top: none;
}
#exportOptionsModal .list-group-item:last-child {
    border-bottom: none;
}
#exportOptionsModal .list-group-item:hover {
    background-color: #e9ecef;
    transform: none;
}
#exportOptionsModal .list-group-item i {
    font-size: 1.2rem;
    vertical-align: middle;
}
#exportOptionsModal .modal-content {
    border-radius: 10px;
    overflow: hidden;
}
#exportOptionsModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}
#exportOptionsModal .modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}
.sidebar {
    min-height: 100vh;
    background-color: var(--primary-color);
    border-right: 1px solid #dee2e6;
}
.sidebar .nav-link {
    color: #ffffff;
}
.sidebar .nav-link.active {
    color: var(--accent-color);
    font-weight: bold;
}
.sidebar .nav-link:hover {
    background-color: rgba(52, 152, 219, 0.1);
}
.submenu {
    padding-left: 1.5rem;
    display: none;
}
.submenu.show {
    display: block;
}
.main-content {
    padding: 20px;
}
.menu-toggle {
    cursor: pointer;
}
#exportacaoContent {
    display: none;
}
.status-message {
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
}
.table-custom {
    font-size: 0.8rem !important;
    margin-top: 0;
}
.table-custom th, 
.table-custom td {
    padding: 0.2rem 0.4rem !important;
    line-height: 1.1 !important;
    white-space: nowrap;
}
.table-custom th {
    position: sticky;
    top: 0;
    background-color: var(--primary-color) !important;
    color: var(--text-light) !important;
    font-weight: 500;
}
.table-custom td {
    vertical-align: middle;
}
.table-custom .form-select,
.table-custom .form-control {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.8rem !important;
    height: auto !important;
}
.table-custom .badge {
    font-size: 0.7rem !important;
    padding: 0.15rem 0.3rem !important;
}
.dataTables_scrollBody {
    max-height: 500px !important;
}
#matchTable tbody tr,
#bancoOnlyTable tbody tr,
#folhaOnlyTable tbody tr,
#divergentesRhTable tbody tr,
#divergentesBancoTable tbody tr {
    transition: background-color 0.1s;
}
#matchTable tbody tr:hover,
#bancoOnlyTable tbody tr:hover,
#folhaOnlyTable tbody tr:hover,
#divergentesRhTable tbody tr:hover,
#divergentesBancoTable tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.1) !important;
}
.table-custom tbody tr {
    line-height: 1 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border-spacing: 0 !important;
    border-collapse: collapse !important;
}
.table-custom td, 
.table-custom th {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
}
.table-custom td {
    vertical-align: top;
}
.table-custom .form-select,
.table-custom .form-control,
.table-custom .badge {
    line-height: 1 !important;
    margin: 0 !important;
}
.dataTables_scrollBody {
    border-spacing: 0 !important;
}
.table-custom > tbody > tr > td {
    border-top: none !important;
}
.dataTables_wrapper .dataTables_paginate {
    font-size: 0.8rem;
    margin-top: 10px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 24px;
    padding: 2px 6px !important;
    margin: 0 1px !important;
    border-radius: 3px !important;
    border: 1px solid #dee2e6 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    font-size: 0.9rem !important;
    padding: 2px 4px !important;
    min-width: 26px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.first,
.dataTables_wrapper .dataTables_paginate .paginate_button.last {
    font-size: 0.9rem !important;
    padding: 2px 4px !important;
    min-width: 26px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: var(--text-light) !important;
    border-color: var(--primary-color) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef !important;
    color: var(--text-primary) !important;
}
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    padding: 5px 10px !important;
    margin-left: 5px !important;
}
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 10px;
}
#exportBtn {
    position: relative;
}
#exportBtn .spinner-border {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}
#exportBtn.exporting .spinner-border {
    display: inline-block;
}
.nav-tabs .nav-link.active-tab-highlight {
    animation: tabPulse 1s ease-in-out;
    border-bottom: 3px solid var(--accent-color);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}
@keyframes tabPulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}
.table-custom .status-select {
    font-size: 0.8rem !important;
    padding: 0.2rem 0.4rem !important;
    height: auto !important;
    min-width: 100px !important;
}
#divergentesBancoTable .status-select {
    font-size: 0.8rem !important;
    padding: 0.2rem 0.4rem !important;
    height: auto !important;
    min-width: 100px !important;
}
#divergentesBancoTable .status-select option {
    font-size: 0.8rem;
}
#jurosOptions {
    transition: all 0.3s ease;
    padding: 10px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 5px;
    margin-top: 10px;
}
#taxaFixaGroup {
    transition: all 0.3s ease;
}
.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}
.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}
#checkJuros:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#checkJuros:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}
.juros-disabled-tooltip {
    position: absolute;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.juros-disabled-tooltip.show {
    opacity: 1;
}
#checkBanco:checked + label {
    font-weight: bold;
    color: var(--accent-color);
}
#listaCarga-container {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}
#listaCarga {
    width: 100%;
    margin-bottom: 0;
}
#listaCarga-container::-webkit-scrollbar {
    width: 8px;
}
#listaCarga-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
#listaCarga-container::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}
#listaCarga-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
#listaCarga thead th {
    position: sticky;
    top: 0;
    background-color: var(--secondary-color);
    color: var(--text-light);
    z-index: 10;
}
#exportJsonBtn {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: white;
}
#exportJsonBtn:hover {
    background-color: #2980b9;
    border-color: #2573a7;
}
#importJsonBtn {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #212529;
}
#importJsonBtn:hover {
    background-color: #e67e22;
    border-color: #d35400;
}
#exportOptions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}
#toleranciaInput {
    text-align: right;
}
@media (max-width: 768px) {
    .row.align-items-center.mb-3 {
        flex-direction: column;
    }
    .col-md-6:first-child {
        margin-bottom: 15px;
    }
}
.btn-align-tolerance {
    margin-top: 32px !important;
}
.tab-pane:not(.active) {
    display: none !important;
}
.dataTables_scroll {
    overflow: visible !important;
}
.table-custom th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-header h5, .card-header h6 {
    font-size: 0.9rem;
    margin: 0;
    padding: 0.25rem 0.5rem;
}
.card-body {
    padding: 0.75rem !important;
}
.form-label {
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
}
.input-group, .form-control, .form-select, .btn {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}
.table th, .table td {
    padding: 0.3rem !important;
    font-size: 0.8rem;
}
.alert-custom-info h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}
.card-header {
    padding: 0.3rem 0.6rem !important;
}
.card-header h5, 
.card-header h6 {
    font-size: 0.9rem;
    margin: 0;
}
.card-body {
    padding: 0.6rem !important;
}
.form-control, 
.form-select, 
.btn {
    font-size: 0.85rem;
    padding: 0.25rem 0.4rem !important;
    height: auto !important;
}
.mb-3, .mt-3, .mb-4, .mt-4 {
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
}
.table th, .table td {
    padding: 0.35rem !important;
    font-size: 0.8rem;
}
.progress {
    height: 0.7rem !important;
}
#statusGeralBanco, 
#btnAplicarStatusGeral, 
.input-group-text {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem !important;
    height: auto !important;
    line-height: 1.2;
}
#btnAplicarStatusGeral {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem !important;
}
.input-group-right {
    display: inline-flex;
    justify-content: flex-end;
    width: auto;
}
#importacaoContent > .row > .col-md-6 {
    display: flex;
    flex-direction: column;
}
#importacaoContent > .row > .col-md-6 > .card {
    height: 245px;
    display: flex;
    flex-direction: column;
}
#importacaoContent > .row > .col-md-6:last-child > .card > .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 10px;
}
#statusArea {
    flex: 1;
    overflow-y: auto;
    max-height: 120px;
    margin-bottom: 10px;
}
#progressBarContainer {
    margin: 10px 0;
}
#summaryStats {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}
.status-message {
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 3px;
    font-size: 0.85rem;
}
@media (max-width: 768px) {
    #importacaoContent > .row > .col-md-6 > .card {
        height: auto;
        min-height: 300px;
    }
    #statusArea {
        max-height: 120px;
    }
}
.subtotal-line-minimal {
    
    align-items: center;
}
.subtotal-label-minimal {
    color: #1565c0;
    font-weight: 600;
    font-size: 0.9rem;
}
.subtotal-value-minimal {
    color: #0d47a1;
    font-weight: 700;
    font-size: 0.95rem;
}
#previaCargas {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    background-color: #f8f9fa;
}
.carga-check-item {
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}
.carga-check-item:last-child {
    border-bottom: none;
}
.carga-count {
    font-weight: bold;
    color: var(--text-primary);
    background-color: var(--accent-color);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8rem;
}
.carga-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid var(--secondary-color);
    font-weight: bold;
}
#exportacaoContent .card-body {
    padding: 1rem !important;
}
#exportacaoContent .form-check {
    margin-bottom: 0.5rem;
}
#exportacaoContent .form-check-label {
    font-size: 0.9rem;
}
#exportacaoContent .card:first-child {
    height: auto;
    min-height: 260px;
}
.auditar-iframe {
    width: 100%;
    height: 700px;
    border: none;
    border-radius: 0 0 5px 5px;
}
@media (max-width: 768px) {
    .auditar-iframe {
        height: 500px;
    }
}
@media (max-width: 576px) {
    .auditar-iframe {
        height: 400px;
    }
}
.subtotal-line {
    font-size: 0.9rem;
}
.subtotal-label {
    font-weight: 600;
    color: var(--text-light);
}
.subtotal-value {
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}
#diferencaSubtotal {
    font-weight: 700;
    background-color: #FFFFFF !important;
    color: var(--text-primary) !important;
    padding: 2px 6px;
    border-radius: 3px;
}
#diferencaSubtotal.text-success {
    background-color: #FFFFFF !important;
    color: var(--success-color) !important;
}
#diferencaSubtotal.text-danger {
    background-color: #FFFFFF !important;
    color: var(--danger-color) !important;
}
#diferencaSubtotal {
    cursor: help;
}
.dataTables_wrapper .bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}
.dataTables_info {
    white-space: nowrap;
    margin-bottom: 0;
}
.dataTables_paginate {
    white-space: nowrap;
    margin-bottom: 0;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    float: none !important;
    margin-top: 0 !important;
}
body:not(.loaded) {
    opacity: 0;
    visibility: hidden;
}
body.loaded {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}
#auth-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-color);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}
.form-check-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}
.auditar-iframe,
.comparador-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 0 0 0.375rem 0.375rem;
}
.update-item {
    border-bottom: 1px solid rgba(107, 107, 107, 0.2);
    padding-bottom: 1rem;
}
.update-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.update-item h6 {
    font-size: 1rem;
    font-weight: 600;
}
.update-item ul {
    padding-left: 1rem;
}
.update-item li {
    margin-bottom: 0.3rem;
    line-height: 1.4;
}
#dashboardContent .card .card-body .card {
    margin-bottom: 0;
}
.auditoria-report-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 0 0 0.375rem 0.375rem;
}
.auditar-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 0 0 0.375rem 0.375rem;
}
.comparador-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 0 0 0.375rem 0.375rem;
}
.conversor-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 0 0 0.375rem 0.375rem;
}
.analise-item {
    border-left: 4px solid #6c757d;
    padding-left: 10px;
    margin-bottom: 15px;
}
.analise-critica {
    border-left-color: var(--danger-color);
    background-color: #f8d7da;
}
.analise-alerta {
    border-left-color: var(--warning-color);
    background-color: #fff3cd;
}
.analise-info {
    border-left-color: var(--info-color);
    background-color: #d1ecf1;
}
.analise-sucesso {
    border-left-color: var(--success-color);
    background-color: #d4edda;
}
.analise-detalhes {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 8px;
    margin-top: 5px;
    font-size: 0.85em;
    border: 1px solid #dee2e6;
}
.analise-resumo {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}
.analise-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-top: 10px;
}
.analise-stat {
    padding: 0 10px;
}
.analise-stat-value {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
}
.analise-stat-label {
    font-size: 0.8em;
    opacity: 0.9;
}
.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}
.edit-btn:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}
.filter-tooltip {
    position: relative;
    display: inline-block;
}
.filter-tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}
.filter-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}
.filter-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
.filtro-ativo {
    background-color: #e3f2fd !important;
    border-left: 4px solid var(--accent-color) !important;
}
.filtro-info {
    background: linear-gradient(45deg, #e3f2fd, #bbdefb);
    border-left: 4px solid var(--accent-color);
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.totais-container {
    display: flex;
    gap: 12px;
    align-items: center;
}
.total-tabela {
    background: white;
    padding: 2px 16px;
    border-radius: 4px;
    border: 2px solid #e9ecef;
    font-size: 0.85rem;
    font-weight: 600;
    color: Grey;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.total-tabela.ativo {
    border-color: white;
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}
.total-tabela:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    border-color: var(--accent-color);
}
.total-valor {
    font-weight: bold;
    margin-left: 5px;
    color: var(--success-color);
}
.total-tabela.ativo .total-valor {
    color: white;
}
.mapeamento-lista {
    max-height: 400px;
    overflow-y: auto;
}
.mapeamento-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.mapeamento-item:last-child {
    border-bottom: none;
}
.mapeamento-label {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 0.9rem;
}
.mapeamento-label.obrigatorio::after {
    content: " *";
    color: var(--danger-color);
}
.mapeamento-select {
    font-size: 0.85rem;
}
.mapeamento-preview {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}
.btn-disabled:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
}
.status-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 5px 0;
    font-weight: bold;
}
.status-error ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}
.status-error li {
    margin: 2px 0;
    font-weight: normal;
}
.filter-tooltip.filtro-ativo {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}
.btn-processing {
    opacity: 0.7;
    cursor: not-allowed !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}
.btn-processing:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
}
button:disabled, 
input:disabled {
    cursor: not-allowed !important;
    opacity: 0.6;
}
/
.modal-mapeamento-compacto .modal-dialog {
    max-width: 700px;
}
.modal-mapeamento-compacto .modal-header {
    padding: 0.5rem 1rem;
}
.modal-mapeamento-compacto .modal-title {
    font-size: 0.9rem;
    font-weight: bold;
}
.modal-mapeamento-compacto .modal-body {
    padding: 0.5rem;
    max-height: 60vh;
    overflow-y: auto;
}
.mapeamento-item-compacto {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
    padding: 0.2rem;
    border-bottom: 1px solid #f0f0f0;
}
.mapeamento-select-compacto {
    flex: 0 0 250px !important; 
    font-size: 0.75rem;
    padding: 0.15rem 0.3rem;
    height: auto;
    min-height: 28px;
    max-width: 250px; 
}
.mapeamento-controls-compacto {
    flex: 1;
    display: flex;
    gap: 0.3rem;
    align-items: center;
    justify-content: flex-start; 
}
.mapeamento-label-compacto {
    flex: 0 0 120px; 
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}
.mapeamento-preview-compacto {
    flex: 1; 
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 80px;
    max-width: 200px;
}
.modal-mapeamento-compacto .modal-footer {
    padding: 0.4rem 1rem;
}
.modal-mapeamento-compacto .modal-footer .btn {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
}
.obrigatorio-asterisco {
    font-size: 0.7rem;
    color: #dc3545;
    margin-left: 0.1rem;
}
.mapeamento-preview-compacto[title] {
    cursor: help;
}
.item-mapeado .mapeamento-label-compacto {
    color: #198754;
    font-weight: 600;
}
.preview-ativo {
    background-color: #d1e7dd !important;
    border-color: #badbcc !important;
    color: #0f5132;
}
.campo-obrigatorio-faltando {
    background-color: #fff3cd !important;
    border: 1px solid #ffeaa7 !important;
    color: #856404 !important;
    font-weight: bold;
}
.campo-obrigatorio-faltando::after {
    content: " ⚠";
    color: #dc3545;
}
.campo-editavel-obrigatorio {
    background-color: #fff3cd !important;
    position: relative;
}
.campo-editavel-obrigatorio::after {
    content: "⚠";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3545;
    font-weight: bold;
}
.campo-obrigatorio-editavel {
    background-color: #fff3cd !important;
    border: 1px solid #ffc107 !important;
}
.campo-obrigatorio-editavel:focus {
    background-color: #fff !important;
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}
.campo-obrigatorio-editavel.campo-valido {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}
.campo-obrigatorio-editavel.campo-invalido {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}
.edit-mode .campo-obrigatorio-faltando {
    animation: pulseCampo 1.5s infinite;
}
.edit-mode .campo-obrigatorio-faltando input {
    animation: pulseCampo 1.5s infinite;
}
@keyframes pulseCampo {
    0% { background-color: #fff3cd; }
    50% { background-color: #ffeaa7; }
    100% { background-color: #fff3cd; }
}
.linha-invalida-ok {
    background-color: #f8d7da !important;
}
.linha-campos-faltando {
    opacity: 0.9;
}
.btn-save-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.status-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.campo-obrigatorio-editavel[placeholder]::placeholder {
    color: #856404;
    font-style: italic;
    font-size: 0.85em;
}
.campo-obrigatorio-faltando:hover {
    background-color: #ffeaa7 !important;
    cursor: help;
}
.campo-editavel-obrigatorio:hover {
    background-color: #ffeaa7 !important;
}
/* ============================================= */
/* ESTILOS COMPACTOS PARA TABELAS DO SISTEMA    */
/* ============================================= */

/* Tabelas compactas */
.table-custom {
    font-size: 0.8rem !important;
}

.table-custom th, 
.table-custom td {
    padding: 0.2rem 0.4rem !important;
    line-height: 1.2 !important;
}

.table-custom th {
    position: sticky;
    top: 0;
    background-color: #6B6B6B !important;
    color: #F5F5F5 !important;
    z-index: 10;
}

.table-custom td {
    vertical-align: middle;
}

/* Scroll body para DataTables */
.dataTables_scrollBody {
    max-height: 500px !important;
}

/* Cabeçalhos sem quebra de linha */
.table-custom th {
    line-height: 1.2;
    white-space: nowrap;
}

/* Controles de formulário compactos */
.table-custom .form-select,
.table-custom .form-control {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.8rem !important;
    height: auto !important;
}

/* Badges compactos */
.table-custom .badge {
    font-size: 0.7rem !important;
    padding: 0.15rem 0.3rem !important;
}

/* Altura reduzida das linhas */
.table-custom tbody tr {
    line-height: 1.2 !important;
}

/* ============================================= */
/* VALIDAÇÃO VISUAL DE CAMPOS OBRIGATÓRIOS      */
/* ============================================= */

/* Campo faltando (visualização) */
.campo-obrigatorio-faltando {
    background-color: #fff3cd !important;
    border: 1px solid #ffc107 !important;
    color: #856404 !important;
}

/* Campo editável obrigatório */
.campo-editavel-obrigatorio {
    background-color: #fff3cd !important;
    border: 1px solid #ffc107 !important;
}

/* Campo inválido durante edição */
.campo-invalido {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}

/* Campo válido durante edição */
.campo-valido {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

/* Linha inteira com campos faltando */
.linha-campos-faltando {
    background-color: #fff3cd !important;
}

/* Destaque para abas ativas */
.nav-link.active {
    font-weight: bold !important;
}

/* Ajuste para DataTables em modais */
.modal .dataTables_wrapper {
    max-height: 70vh;
    overflow: auto;
}
.editing-ok-item {
        background-color: #fff3cd !important;
        border-left: 4px solid #ffc107;
    }
    .editing-ok-item:hover {
        background-color: #ffeaa7 !important;
    }
	.analise-correcao {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
}
/* Modal de Análise de Dados - Maior horizontalmente */
#analiseErrosModal .modal-dialog {
    max-width: 80%; /* ou um valor fixo como 1200px, 1400px */
    min-width: 70%; /* garante que seja sempre largo */
    width: auto;
    margin: 1.75rem auto;
}

/* Se quiser um tamanho específico para desktop */
@media (min-width: 1200px) {
    #analiseErrosModal .modal-dialog {
        max-width: 1400px; /* Largura máxima */
    }
}
#btnAlternarStatus {
        margin: 10px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }
    
    #btnAlternarStatus:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    
    #btnAlternarStatus i {
        margin-right: 5px;
    }
