/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #011F78;
    min-height: 100vh;
    color: #343A40;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(1, 31, 120, 0.95);
    padding: 20px 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header .container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 30px;
    width: auto;
}

.header h1 {
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
}

/* Main content */
.main {
    padding: 40px 0 20px 0;
    min-height: calc(100vh - 100px);
    position: relative;
}


.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 2;
}

.form-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 28px;
    max-width: 1200px;
    width: 100%;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s ease-out;
    overflow: visible;
    position: relative;
}

.form-card::after {
    content: '';
    position: absolute;
    top: -130px;
    right: -700px;
    width: 800px;
    height: 100%;
    background-image: url('assets/img/elemento.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.form-content {
    display: flex;
    justify-content: center;
    min-height: 400px;
}

.form-section {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.form-section-full {
    max-width: 1000px;
    margin: 0 auto;
}

/* Ajustes para formulário mais compacto */
.form-section-full .form-group {
    margin-bottom: 18px;
}

.form-section-full .form-group-row {
    margin-bottom: 18px;
}

.form-section-full h2 {
    margin-bottom: 25px;
}

/* Logo SVG */
.logo-container {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 15px;
    position: relative;
}

.logo-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #F28209, #ff9f3a);
    border-radius: 2px;
}

.logo-svg {
    height: 60px;
    width: auto;
}

/* Layout de 3 colunas já definido acima */

.form-group-empty {
    /* Espaço vazio para manter alinhamento */
}

/* Responsivo para os layouts de colunas */
@media (max-width: 768px) {

    .form-group-row.form-group-3cols,
    .form-group-row.form-group-2cols {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-group-empty {
        display: none;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section h2 {
    text-align: center;
    margin-bottom: 35px;
    color: #ffffff;
    font-weight: 700;
    font-size: 2rem;
    position: relative;
    padding-bottom: 15px;
}

.form-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #011F78, #764ba2);
    border-radius: 2px;
}

/* Tabs System */
.tabs-container {
    width: 100%;
}

.tabs-header {
    display: flex;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 30px;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-button {
    background: none;
    border: none;
    padding: 16px 24px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6c757d;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    flex: 1;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-button:hover {
    background: rgba(1, 31, 120, 0.1);
    color: #011F78;
    transform: translateY(-1px);
}

.tab-button.active {
    background: linear-gradient(135deg, #011F78, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.tab-button i {
    font-size: 1.1rem;
}

.tab-content {
    display: none;
    animation: fadeInTab 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}




/* Form styles */
.form-group {
    margin-bottom: 15px;
}

.form-group-row {
    display: block;
    margin-bottom: 18px;
}

.form-group-row.form-group-3cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 18px;
}

.form-group-row.form-group-2cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 18px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: #F28209;
}

.help-icon {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.help-icon:hover {
    color: #011F78;
    transform: scale(1.1);
}

.form-group input {
    width: 100%;
    padding: 10px 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    color: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #F28209;
    box-shadow:
        0 0 0 4px rgba(242, 130, 9, 0.2),
        0 4px 20px rgba(242, 130, 9, 0.1);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.form-group input:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input.error {
    border-color: #dc3545;
}

.error-msg {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-msg.show {
    opacity: 1;
}

/* Button */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: #F28209;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(242, 130, 9, 0.3),
        0 4px 16px rgba(242, 130, 9, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 40px rgba(242, 130, 9, 0.4),
        0 6px 20px rgba(242, 130, 9, 0.3);
    background: #ff9f3a;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 16px rgba(242, 130, 9, 0.2);
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Results section */
.results {
    padding: 1px 0;
    background: #f8f9fa;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Novo layout em linhas */
.results-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.results-row:last-child {
    margin-bottom: 0;
}

/* Cards com larguras específicas */
.half-width {
    flex: 1;
    min-width: 300px;
}

.full-width {
    flex: 1;
    width: 100%;
}

/* Grid de resultados para os cards */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.result-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.card-header i {
    font-size: 1.4rem;
    color: #011F78;
}

.card-header h3 {
    color: #011F78;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-vivo {
    background: #d1edff;
    color: #0c63e4;
}

.status-falecido {
    background: #ffeaea;
    color: #d63384;
}

.status-indicator.status-valida {
    background: #d1f2d1;
    color: #198754;
}

.status-indicator.status-invalida {
    background: #ffeaea;
    color: #dc3545;
}

.status-indicator.status-atencao {
    background: #fff3cd;
    color: #856404;
}

.status-indicator.status-neutro {
    background: #e9ecef;
    color: #6c757d;
}

/* Estilos para nova estrutura de critérios */
.criterio-linha {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.criterio-linha:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.criterio-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.criterio-categoria {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.categoria-nome {
    font-size: 1rem;
}

.criterio-status .status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.criterio-aprovado {
    border-left: 4px solid #28a745;
}

.criterio-aprovado .status-badge {
    background: #d4edda;
    color: #155724;
}

.criterio-reprovado {
    border-left: 4px solid #dc3545;
}

.criterio-reprovado .status-badge {
    background: #f8d7da;
    color: #721c24;
}

.criterio-erro {
    border-left: 4px solid #ffc107;
}

.criterio-erro .status-badge {
    background: #fff3cd;
    color: #856404;
}

.criterio-motivo {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.btn-ver-detalhes {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-ver-detalhes:hover {
    background: #0056b3;
}

.btn-ver-detalhes i {
    margin-right: 4px;
}

.status-details {
    margin: 15px 0;
}

.status-details p {
    margin: 8px 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.status-details strong {
    color: #495057;
    font-weight: 600;
}

.btn-details {
    background: #011F78;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px 5px 5px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-details:hover {
    background: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-details.btn-penal {
    background: #dc3545;
}

.btn-details.btn-penal:hover {
    background: #c82333;
}

.btn-details.btn-civel {
    background: #007bff;
}

.btn-details.btn-civel:hover {
    background: #0056b3;
}

.btn-details.btn-trabalhista {
    background: #28a745;
}

.btn-details.btn-trabalhista:hover {
    background: #1e7e34;
}

.btn-details.btn-geral {
    background: #6c757d;
}

.btn-details.btn-geral:hover {
    background: #5a6268;
}

.processos-buttons {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Info items */
.info-item {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 4px;
}

.info-value {
    color: #343a40;
    font-weight: 400;
    font-size: 1rem;
}

/* Process list */
.process-list {
    margin-top: 15px;
}

.process-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid #011F78;
}

.process-number {
    font-weight: 600;
    color: #011F78;
    margin-bottom: 8px;
}

.process-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.9rem;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid white;
    border-right: 6px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin: 0 auto 25px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

.modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    color: #011F78;
    font-weight: 600;
    font-size: 1.3rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #dc3545;
    background: #f8f9fa;
}

.modal-content {
    padding: 25px;
    text-align: center;
    max-height: 70vh;
    overflow-y: auto;
}

.cnh-help-image {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: block;
}

.modal-content p {
    color: #343a40;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #011F78;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Responsive design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.2rem;
    }

    .form-card {
        margin: 20px;
        border-radius: 20px;
    }

    .form-section {
        padding: 30px 25px;
    }

    .form-section h2 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }

    .tabs-header {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .tab-button {
        padding: 14px 20px;
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .tab-button i {
        font-size: 1rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .main {
        padding: 40px 0;
    }

    .process-details {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .form-card {
        margin: 15px;
        border-radius: 16px;
    }

    .form-section {
        padding: 25px 20px;
    }

    .form-section h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .tabs-header {
        padding: 6px;
        gap: 6px;
    }

    .tab-button {
        padding: 12px 16px;
        font-size: 0.85rem;
        letter-spacing: 0.3px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group input {
        padding: 16px 18px;
        border-radius: 14px;
    }

    .btn-primary {
        padding: 18px;
        font-size: 1rem;
        border-radius: 14px;
    }

}





.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-download-template {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    text-decoration: none;
    border-radius: 16px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 200px;
}

.btn-download-template:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
    text-decoration: none;
    color: white;
}

/* Resultados em Lista */
.resultados-lista {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.resultado-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #dee2e6;
    overflow: hidden;
    transition: all 0.3s ease;
}

.resultado-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.resultado-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto auto;
    gap: 20px;
    padding: 18px 25px;
    align-items: center;
    background: white;
    border-bottom: 1px solid #f1f3f4;
}

.resultado-data,
.resultado-tempo {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.95rem;
    color: #495057;
    font-weight: 500;
}

.resultado-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resultado-data>div:last-child,
.resultado-tempo>div:last-child {
    font-size: 0.95rem;
    color: #495057;
    font-weight: 600;
}

.resultado-motorista {
    display: flex;
    flex-direction: column;
}

.resultado-nome {
    font-weight: 600;
    color: #343a40;
    font-size: 1.1rem;
}

.resultado-cpf {
    color: #6c757d;
    font-size: 0.9rem;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-liberado {
    background: #d1f2d1;
    color: #198754;
}

.status-nao-habilitado {
    background: #ffeaea;
    color: #dc3545;
}

.status-atencao {
    background: #fff3cd;
    color: #856404;
}

.btn-expandir {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.btn-expandir:hover {
    background: #f8f9fa;
    border-color: #011F78;
    color: #011F78;
}

.btn-expandir.expandido {
    background: #011F78;
    color: white;
    border-color: #011F78;
}

.resultado-detalhes {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.resultado-detalhes.expandido {
    max-height: 500px;
    padding: 25px;
    border-top: 1px solid #dee2e6;
}

.criterios-expandidos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Semáforo Styles (mantidos para os popups) */
.semaforo-principal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    margin-bottom: 20px;
}

.nome-completo {
    font-size: 1.4rem;
    font-weight: 600;
    color: #343a40;
    text-align: center;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.nome-motorista {
    font-size: 2.5rem;
    font-weight: 800;
    color: #011F78;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.semaforo-visual {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: #2c3e50;
    border-radius: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.luz-semaforo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    opacity: 0.3;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.luz-semaforo.ativa {
    opacity: 1;
    box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
    animation: semaforo-pulse 2s infinite;
}

.luz-semaforo.luz-destaque {
    border: 3px solid rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    box-shadow:
        0 0 25px currentColor,
        0 0 50px currentColor,
        0 0 15px rgba(255, 255, 255, 0.5) inset;
}

@keyframes semaforo-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.status-texto {
    text-align: center;
}

.status-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.status-title.semaforo-verde {
    color: #28a745;
}

.status-title.semaforo-amarelo {
    color: #ffc107;
}

.status-title.semaforo-vermelho {
    color: #dc3545;
}

.status-motivo {
    color: #6c757d;
    font-style: italic;
    font-size: 1.1rem;
}

.criterios-botoes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.criterio-botao {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: white;
    border: none;
    border-radius: 12px;
    border-left: 4px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.criterio-botao:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.criterio-botao.criterio-ok {
    border-left-color: #28a745;
}

.criterio-botao.criterio-alerta {
    border-left-color: #ffc107;
}

.criterio-botao.criterio-erro {
    border-left-color: #dc3545;
}

.criterio-icon {
    font-size: 1.2rem;
    min-width: 20px;
}

.criterio-botao.criterio-ok .criterio-icon {
    color: #28a745;
}

.criterio-botao.criterio-alerta .criterio-icon {
    color: #ffc107;
}

.criterio-botao.criterio-erro .criterio-icon {
    color: #dc3545;
}

.criterio-texto {
    font-size: 0.95rem;
    color: #343a40;
    flex: 1;
    font-weight: 500;
}

.criterio-seta {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

.popup {
    background: white;
    border-radius: 20px;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-30px) scale(0.9);
    transition: all 0.3s ease;
}

.popup-overlay.ativo .popup {
    transform: translateY(0) scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #f8f9fa;
    background: linear-gradient(135deg, #011F78, #1e3c72);
    color: white;
}

.popup-header h3 {
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
}

.popup-fechar {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-fechar:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.popup-content {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Popup loading skeleton */
.popup-skeleton {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 120px;
    padding: 12px 4px;
    animation: popup-fade-in 200ms ease-out;
}

.popup-skeleton .sk-lines {
    flex: 1;
    display: grid;
    gap: 8px;
}

.popup-skeleton .sk-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f2f5 0%, #e6e9ef 50%, #f0f2f5 100%);
    background-size: 200% 100%;
    animation: sk-shimmer 1.2s ease-in-out infinite;
}

.popup-skeleton .w-60 {
    width: 60%;
}

.popup-skeleton .w-40 {
    width: 40%;
}

.popup-skeleton .w-80 {
    width: 80%;
}

@keyframes popup-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sk-shimmer {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Estilos para o conteúdo dos popups */
.info-detalhada {
    font-family: inherit;
}

.status-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d1f2d1;
    color: #198754;
}

.badge-danger {
    background: #ffeaea;
    color: #dc3545;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Responsive adjustments for results list */
@media (max-width: 768px) {
    .resultado-header {
        grid-template-columns: 1fr auto;
        gap: 15px;
    }

    .resultado-data,
    .resultado-tempo {
        display: none;
    }

    .criterios-expandidos {
        grid-template-columns: 1fr;
    }

    .criterios-botoes {
        grid-template-columns: 1fr;
    }

    .popup {
        width: 98%;
        margin: 10px;
    }

    .popup-header {
        padding: 20px;
    }

    .popup-content {
        padding: 20px;
    }
}

/* Responsive adjustments for results list */
@media (max-width: 768px) {
    .resultado-header {
        grid-template-columns: 1fr auto;
        gap: 15px;
    }

    .resultado-data,
    .resultado-tempo {
        display: none;
    }

    .criterios-expandidos {
        grid-template-columns: 1fr;
    }

    .criterios-botoes {
        grid-template-columns: 1fr;
    }

    .popup {
        width: 98%;
        margin: 10px;
    }

    .popup-header {
        padding: 20px;
    }

    .popup-content {
        padding: 20px;
    }
}

.resultado-tempo {
    display: none;
}

.criterios-expandidos {
    grid-template-columns: 1fr;
}

.criterios-botoes {
    grid-template-columns: 1fr;
}

.popup {
    width: 98%;
    margin: 10px;
}

.popup-header {
    padding: 20px;
}

.popup-content {
    padding: 20px;
}

.dados-pessoa,
.dados-cnh {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.campo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.campo-alerta {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.campo label {
    font-weight: 600;
    color: #343a40;
    margin: 0;
}

.campo span {
    color: #6c757d;
    font-weight: 400;
}

.bloqueios-secao {
    margin-top: 20px;
}

.bloqueio-item {
    background: #ffeaea;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.processos-detalhados {
    font-family: inherit;
}

.resumo-processos {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #011F78;
}

.lista-processos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.processo-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.processo-header {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.processo-ramo,
.processo-tipo {
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.processo-numero {
    font-weight: 600;
    color: #011F78;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.processo-detalhes {
    display: grid;
    gap: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .results-row {
        flex-direction: column;
        gap: 15px;
    }

    .half-width,
    .full-width {
        min-width: auto;
    }


    .nome-completo {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }

    .nome-motorista {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .semaforo-visual {
        padding: 10px;
        gap: 6px;
    }

    .luz-semaforo {
        width: 40px;
        height: 40px;
    }

    .criterios-botoes {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .criterio-botao {
        padding: 12px 15px;
    }

    .popup {
        width: 95%;
        max-height: 90vh;
    }

    .popup-header {
        padding: 20px;
    }

    .popup-content {
        padding: 20px;
    }

    .dados-pessoa,
    .dados-cnh {
        grid-template-columns: 1fr;
    }


    .resultado-header {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .resultado-data,
    .resultado-tempo {
        justify-self: center;
    }

    .criterios-expandidos {
        grid-template-columns: 1fr;
    }
}



/* E
stilos para badges no card unificado */
.status-badges {
    margin: 15px 0 !important;
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.status-badges .badge {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badges .badge i {
    margin-right: 6px;
    font-size: 0.9rem;
}

/* Responsivo para badges */
@media (max-width: 480px) {
    .status-badges {
        flex-direction: column;
        gap: 8px !important;
    }

    .status-badges .badge {
        justify-content: center;
        text-align: center;
    }
}

/* ==
=== LAUDO FINAL ===== */


.laudo-final-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.laudo-final-card.status-aprovado {
    border-color: #28a745;
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.2);
}

.laudo-final-card.status-reprovado {
    border-color: #dc3545;
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.2);
}

.laudo-final-card.status-atencao {
    border-color: #ffc107;
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.2);
}

.laudo-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.laudo-header i {
    font-size: 1.8rem;
}

.laudo-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.laudo-content {
    padding: 30px;
}

.laudo-status-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.laudo-status-indicator i {
    font-size: 2rem;
}

.laudo-status-indicator.aprovado {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.laudo-status-indicator.reprovado {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.laudo-status-indicator.atencao {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
}

.laudo-resumo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.resumo-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #6c757d;
}

.resumo-item.aprovado {
    border-left-color: #28a745;
    background: #d4edda;
}

.resumo-item.reprovado {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.resumo-item.atencao {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.resumo-item h4 {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resumo-item .valor {
    font-size: 1.8rem;
    font-weight: 700;
    color: #212529;
}

.laudo-motivo {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #007bff;
    margin-bottom: 20px;
}

.laudo-motivo h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.laudo-motivo p {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* ===== LAUDOS PARCIAIS ===== */
.laudos-parciais {
    margin-top: 40px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.section-title i {
    font-size: 1.2rem;
}

/* Responsividade para laudo final */
@media (max-width: 768px) {
    .laudo-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .laudo-content {
        padding: 20px;
    }

    .laudo-status-indicator {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 20px;
    }

    .laudo-resumo {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .resumo-item .valor {
        font-size: 1.5rem;
    }
}

/* ====
= LAYOUT EXPANSÍVEL (ANTIGO) ===== */

/* Linha Principal do Laudo Final */
.laudo-final-linha {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.laudo-final-linha.status-aprovado {
    border-color: #28a745;
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.2);
}

.laudo-final-linha.status-reprovado {
    border-color: #dc3545;
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.2);
}

.laudo-final-linha.status-atencao {
    border-color: #ffc107;
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.2);
}

.laudo-final-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
}

.laudo-final-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.laudo-final-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.laudo-final-status i {
    font-size: 2rem;
}

.laudo-final-detalhes h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.laudo-final-detalhes p {
    margin: 4px 0 0 0;
    color: #6c757d;
    font-size: 0.95rem;
}

.btn-expandir {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
}

.btn-expandir:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

.btn-expandir i {
    transition: transform 0.3s ease;
}

.btn-expandir.expandido i {
    transform: rotate(180deg);
}

/* Seções Expansíveis */
.laudos-expandiveis {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.secao-expandivel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 2px solid #f1f3f4;
    transition: all 0.3s ease;
}

.secao-expandivel:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    border-color: #e9ecef;
}

.secao-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.secao-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.secao-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.secao-info i {
    font-size: 1.5rem;
    color: #6c757d;
}

.secao-info h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.secao-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 20px;
    margin-left: 12px;
}

.secao-status.status-aprovado {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.secao-status.status-reprovado {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.secao-status.status-atencao {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.secao-status.status-neutro {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.secao-chevron {
    font-size: 1.2rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.secao-chevron.expandido {
    transform: rotate(180deg);
}

.secao-content {
    padding: 0 24px 24px 24px;
    border-top: 1px solid #f1f3f4;
    animation: slideDown 0.3s ease-out;
}

.secao-content.hidden {
    display: none;
}

/* Conteúdo das seções */
.criterios-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.criterio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
    border-left: 4px solid transparent;
}

.criterio-item.status-valida {
    background: rgba(40, 167, 69, 0.05);
    border-left-color: #28a745;
    color: #155724;
}

.criterio-item.status-invalida {
    background: rgba(220, 53, 69, 0.05);
    border-left-color: #dc3545;
    color: #721c24;
}

.criterio-item.status-atencao {
    background: rgba(255, 193, 7, 0.05);
    border-left-color: #ffc107;
    color: #856404;
}

.criterio-item.status-neutro {
    background: rgba(108, 117, 125, 0.05);
    border-left-color: #6c757d;
    color: #495057;
}

.criterio-item i {
    font-size: 1rem;
    min-width: 16px;
}

.criterio-item span {
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Botão de detalhes nas seções */
.secao-content .btn-details {
    margin-top: 16px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.secao-content .btn-details:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

/* Animações */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .laudo-final-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .laudo-final-info {
        flex-direction: column;
        gap: 12px;
    }

    .secao-header {
        padding: 16px 20px;
    }

    .secao-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .secao-status {
        margin-left: 0;
    }

    .secao-content {
        padding: 0 20px 20px 20px;
    }
}

/* Classes 
de status para compatibilidade */
.status-valida {
    background: rgba(40, 167, 69, 0.05);
    border-left-color: #28a745;
    color: #155724;
}

.status-invalida {
    background: rgba(220, 53, 69, 0.05);
    border-left-color: #dc3545;
    color: #721c24;
}

.status-erro {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #721c24;
}

/* Status para laudo final */
.laudo-final-status.status-aprovado {
    color: #28a745;
}

.laudo-final-status.status-reprovado {
    color: #dc3545;
}

.laudo-final-status.status-atencao {
    color: #ffc107;
}

.laudo-final-status.status-erro {
    color: #dc3545;
}

/* ===== LA
YOUT ESTILO TABELA (COMO EXEMPLO) ===== */

/* Cabeçalho da Consulta */
.consulta-header {
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    min-height: 65px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.consulta-header:hover {
    background: #e9ecef;
}

.consulta-status {
    display: flex;
    align-items: center;
    height: 100%;
}

.laudo-final-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}

.laudo-label {
    font-weight: 700;
    color: #212529;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.consulta-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
    flex: 1;
    height: 100%;
}

.consulta-info>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.consulta-info .label {
    font-weight: 500;
    color: #6c757d;
}

.consulta-info .value {
    color: #495057;
}

.tipo-badge {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge {
    background: #ffc107;
    color: #212529;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-badge.aprovado {
    background: #28a745;
    color: white;
}

.status-badge.aprovado:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.status-badge.reprovado {
    background: #dc3545;
    color: white;
}

.status-badge.reprovado:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.status-badge.atencao {
    background: #ffc107;
    color: #212529;
}

.status-badge.atencao:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

/* Referência */
.referencia-container {
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.referencia-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.referencia-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.referencia-codigo {
    color: #6c757d;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.btn-imprimir {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s ease;
}

.btn-imprimir:hover {
    background: #0056b3;
}

/* Tabela de Resultados */
.resultados-tabela {
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.resultado-linha {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
    gap: 10px;
    font-size: 14px;
}

.resultado-linha:hover {
    background: #f8f9fa;
}

.resultado-linha:last-child {
    border-bottom: none;
}

.linha-numero {
    font-weight: 600;
    color: #495057;
    text-align: center;
}

.linha-tipo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.linha-tipo .master {
    background: #007bff;
}

.linha-tipo .pesquisa {
    background: #28a745;
}

.linha-descricao {
    font-weight: 500;
    color: #495057;
}

.linha-detalhes {
    font-size: 14px;
    color: #6c757d;
}

.linha-info {
    font-size: 14px;
    color: #6c757d;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.linha-acoes {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-comentario {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-comentario:hover {
    background: #545b62;
}

.btn-status {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #28a745;
    transition: color 0.3s ease;
}

.btn-status:hover {
    color: #1e7e34;
}

.btn-status.reprovado {
    color: #dc3545;
}

.btn-status.reprovado:hover {
    color: #c82333;
}

.btn-status.atencao {
    color: #ffc107;
}

.btn-status.atencao:hover {
    color: #e0a800;
}

.btn-detalhes {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-detalhes:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Responsividade para layout tabela */
@media (max-width: 1024px) {
    .resultado-linha {
        grid-template-columns: 30px 100px 1fr 150px 120px 150px;
        gap: 8px;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .consulta-info {
        gap: 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .consulta-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .consulta-info {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .resultado-linha {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px 12px;
    }

    .linha-acoes {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .referencia-container {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* Estilos para o novo layout de laudo final */
.laudo-final {
    margin-bottom: 24px;
}

.laudo-final-linha {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.laudo-final-linha:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.laudo-final-linha.expandido {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.laudo-final-linha.status-aprovado {
    border-color: #28a745;
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.2);
}

.laudo-final-linha.status-reprovado {
    border-color: #dc3545;
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.2);
}

.laudo-final-linha.status-atencao {
    border-color: #ffc107;
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.2);
}

.laudo-icone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
    font-size: 24px;
}

.laudo-titulo {
    flex: 1;
}

.laudo-titulo h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 4px;
}

.laudo-titulo p {
    color: #6c757d;
    font-size: 0.95rem;
}

.laudo-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.laudo-status.status-aprovado {
    background: #d4edda;
    color: #155724;
}

.laudo-status.status-reprovado {
    background: #f8d7da;
    color: #721c24;
}

.laudo-status.status-atencao {
    background: #fff3cd;
    color: #856404;
}

.laudo-expandir {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.laudo-expandir i.expandido {
    transform: rotate(180deg);
}

.laudos-expandiveis {
    background: white;
    border-radius: 0 0 12px 12px;
    margin-top: -2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    border-top: none;
    padding: 20px;
}

.laudos-expandiveis.hidden {
    display: none;
}

/* Estilos do cabeçalho de consulta atualizado */
.consulta-consultado {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.consulta-consultado:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.consulta-consultado.expandido {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-bottom: none;
}

.consultado-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.consulta-consultado .label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
}

.consulta-consultado .value {
    font-weight: 700;
    color: #212529;
    font-size: 1.2rem;
}

/* Estilos para botões de laudo parcial */
.btn-laudo-parcial {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    white-space: nowrap;
}

.btn-laudo-parcial:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-laudo-parcial .status-parcial {
    font-weight: 500;
    margin-left: 4px;
    font-size: 13px;
}

.btn-laudo-parcial.aprovado {
    background: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.btn-laudo-parcial.reprovado {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.btn-laudo-parcial.atencao {
    background: #fff3cd;
    border-color: #ffec99;
    color: #664d03;
}

/* ===== ESTILOS PARA MÚLTIPLOS CONJUNTOS ===== */

/* Preview com tabs */
.preview-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
    padding-bottom: 10px;
}

.preview-tab-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
    border-bottom: 2px solid transparent;
    min-width: max-content;
    white-space: nowrap;
}

.preview-tab-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.preview-tab-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
    border-bottom-color: #007bff;
}

.preview-tabs-content {
    position: relative;
}

.preview-tab-content {
    display: none;
}

.preview-tab-content.active {
    display: block;
    animation: fadeInTab 0.3s ease-in-out;
}

.preview-table-inner {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.preview-table-inner th {
    background: linear-gradient(135deg, #011F78, #1e3c72);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.preview-table-inner td {
    padding: 10px 15px;
    border-bottom: 1px solid #f1f3f4;
    color: #495057;
}

.preview-table-inner tbody tr:hover {
    background: #f8f9fa;
}

.preview-table-inner tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* Estilos para nova estrutura de preview */
.conjunto-preview-simples {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.conjunto-header-preview {
    background: linear-gradient(135deg, #011F78, #1e3c72);
    color: white;
    padding: 12px 15px;
    display: grid;
    grid-template-columns: 50px 200px 140px 100px 100px 100px;
    gap: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.conjunto-dados {
    background: white;
}

.conjunto-linha {
    display: grid;
    grid-template-columns: 50px 200px 140px 100px 100px 100px;
    gap: 15px;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.85rem;
}

.conjunto-linha:hover {
    background: #f8f9fa;
}

.conjunto-linha:nth-child(even) {
    background: #fafbfc;
}

.conjunto-linha:nth-child(even):hover {
    background: #f1f3f4;
}

.conjunto-nome {
    font-weight: 600;
    color: #495057;
}

/* Responsividade para preview conjuntos */
@media (max-width: 768px) {

    .conjunto-header-preview,
    .conjunto-linha {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
    }

    .conjunto-header-preview {
        padding: 10px 12px;
    }

    .conjunto-linha {
        padding: 8px 12px;
    }
}


/* Resultados de múltiplos conjuntos */
.conjunto-resultado {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
    overflow: hidden;
}

.conjunto-header {
    background: #f8f9fa;
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    border-bottom: 1px solid #dee2e6;
}

.conjunto-header:hover {
    background: #e9ecef;
}

.conjunto-info h3 {
    margin: 0 0 8px 0;
    color: #011F78;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.conjunto-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
}

.stat-item.sucesso {
    color: #28a745;
}

.stat-item.erro {
    color: #dc3545;
}

.conjunto-chevron {
    font-size: 1.2rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.conjunto-chevron.expandido {
    transform: rotate(180deg);
}

.conjunto-content {
    padding: 20px 24px;
    animation: slideDown 0.3s ease-out;
}

.conjunto-content.hidden {
    display: none;
}

/* Registros individuais */
.registros-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.registro-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.registro-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.registro-header {
    background: #fafbfc;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.registro-header:hover {
    background: #f1f3f4;
}

.registro-info {
    flex: 1;
}

.registro-principal {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}

.motorista-nome {
    font-weight: 600;
    color: #343a40;
    font-size: 1rem;
}

.motorista-cpf {
    color: #6c757d;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.registro-veiculos {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.85rem;
}

.registro-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.status-badge.status-aprovado {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-reprovado {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-atencao {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-erro {
    background: #f8d7da;
    color: #721c24;
}

.registro-chevron {
    font-size: 1rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.registro-chevron.expandido {
    transform: rotate(180deg);
}

.registro-detalhes {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    animation: slideDown 0.3s ease-out;
}

.registro-detalhes.hidden {
    display: none;
}

/* Detalhes do registro */
.validacao-resumo {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.validacao-resumo p {
    margin: 0;
    color: #495057;
}

.categorias-resultado {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.categoria-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 16px;
    background: #fafbfc;
}

.categoria-item.status-aprovado {
    background: rgba(40, 167, 69, 0.05);
    border-color: rgba(40, 167, 69, 0.2);
}

.categoria-item.status-reprovado {
    background: rgba(220, 53, 69, 0.05);
    border-color: rgba(220, 53, 69, 0.2);
}

.categoria-item.status-atencao {
    background: rgba(255, 193, 7, 0.05);
    border-color: rgba(255, 193, 7, 0.2);
}

.categoria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.categoria-nome {
    font-weight: 600;
    color: #343a40;
}

.categoria-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.categoria-item.status-aprovado .categoria-status {
    background: #28a745;
    color: white;
}

.categoria-item.status-reprovado .categoria-status {
    background: #dc3545;
    color: white;
}

.categoria-item.status-atencao .categoria-status {
    background: #ffc107;
    color: #212529;
}

.categoria-motivo {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.erro-detalhes {
    background: #f8d7da;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* Responsividade para conjuntos */
@media (max-width: 768px) {
    .preview-tabs {
        flex-direction: column;
        gap: 4px;
    }

    .preview-tab-btn {
        border-radius: 6px;
        text-align: center;
    }

    .conjunto-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .conjunto-stats {
        justify-content: flex-start;
        width: 100%;
    }

    .registro-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .registro-principal {
        flex-direction: column;
        gap: 8px;
    }

    .categorias-resultado {
        gap: 8px;
    }

    .categoria-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Estilos para resultados individuais com layout padrão */
.resultado-individual {
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.resultado-individual.erro {
    border-color: #dc3545;
}

.separador-conjunto {
    background: linear-gradient(135deg, #6f42c1, #8e44ad);
    color: white;
    padding: 12px 16px;
    margin: 0;
}

.separador-conjunto h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.erro-detalhes-massa {
    padding: 20px;
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
    margin: 0;
}

/* Estilos para botões de salvar JSON */
.btn-download-json {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.btn-download-json:hover {
    background: linear-gradient(135deg, #218838, #1db584);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-download-json:active {
    transform: translateY(0);
}

/* Header da massa com botão JSON */
.massa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.massa-header h2 {
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.massa-header .btn-download-json {
    margin-left: 0;
    padding: 12px 20px;
    font-size: 0.9rem;
}

/* ===== CONFIGURAÇÃO DE MODO API ===== */
.config-section {
    padding: 5px;
    margin-bottom: 2px;
    height: auto;
    min-height: 60px;
}

.config-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
}

.toggle-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    display: inline-block;
}

.toggle-input {
    display: none;
}

.toggle-slider {
    position: relative;
    display: block;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-slider:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-button {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked+.toggle-slider {
    background: #28a745;
}

.toggle-input:checked+.toggle-slider .toggle-button {
    transform: translateX(30px);
}

/* Campos desabilitados no modo simulação */
input:disabled,
select:disabled {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: not-allowed !important;
}

input:disabled::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* ===== ESTATÍSTICAS DA API ===== */
.api-stats {
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease;
}

.stats-header:hover {
    background: rgba(0, 0, 0, 0.3);
}

.stats-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
}

.stats-summary {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

#statsChevron {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease;
}

.stats-header.expanded #statsChevron {
    transform: rotate(180deg);
}

.stats-details {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-details.hidden {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    background: rgba(1, 31, 120, 0.05);
}

.stat-item.success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.stat-item.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.stat-item.success .stat-value {
    color: #28a745;
}

.stat-item.error .stat-value {
    color: #dc3545;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-weight: 500;
}

/* Seção de Endpoints */
.endpoints-section {
    margin: 20px 0 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.endpoints-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.endpoints-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.endpoint-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.endpoint-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(242, 130, 9, 0.3);
}

.endpoint-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
    flex: 1;
}

.endpoint-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
}

.endpoint-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.endpoint-stat.total {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.endpoint-stat.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.endpoint-stat.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.endpoint-stat.rate {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.stats-actions {
    display: flex;
    gap: 8px;
}

.btn-stats {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-stats:hover {
    background: rgba(242, 130, 9, 0.2);
    border-color: #F28209;
    color: #ffffff;
}

.btn-stats.warning {
    border-color: #ffc107;
    color: #ffc107;
}

.btn-stats.warning:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
    color: #fff;
}

/* Responsivo */
@media (max-width: 768px) {
    .config-toggle {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .toggle-switch {
        align-self: flex-end;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stats-actions {
        flex-direction: column;
        gap: 6px;
    }

    .endpoint-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .endpoint-stats {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .endpoint-stat {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 4px 8px;
    }
}