/* Abas principais */
.abas-container {
    height: 100dvh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.abas {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    gap: 2px;
    flex: 0 0 auto;
}

.aba {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.aba:hover {
    color: var(--color-principal);
    background: rgba(255,255,255,0.8);
}

.aba.ativa {
    color: var(--color-principal);
    border-bottom-color: var(--color-principal);
    background: white;
}

.aba i {
    font-size: 16px;
}

.conteudo-aba {
    height: 100%;
    display: none;
    overflow: hidden;
    flex-direction: column;
    flex: 1 1 auto;
}

.conteudo-aba.ativa {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Menu de ações */
.menu-acoes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 16px;
}

.grupo-acoes {
    display: flex;
    gap: 12px;
}

.btn-acao {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-acao:hover {
    border-color: var(--color-principal);
    color: var(--color-principal);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.1);
}

.btn-acao.ativo {
    background: var(--color-principal);
    color: white;
    border-color: var(--color-principal);
}

.status-indicadores {
    display: flex;
    gap: 20px;
}

.indicador {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    background: #f8fafc;
    border-radius: 8px;
    min-width: 80px;
}

.indicador-valor {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.indicador-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Formulário principal */
.formulario-container {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    height: 90%;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 16px;
}

.form-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.form-header h2 i {
    color: var(--color-principal);
    font-size: 22px;
}

.form-actions {
    display: flex;
    gap: 10px;
}

/* Seções do formulário */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 10px 20px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.section-title {
    display: flex;
    align-items: center;
    color: #1e293b;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid #f1f5f9;
    gap: 10px;
}

.section-title i {
    color: var(--color-principal);
}

/* Grids */
.grid-4-col,
.grid-3-col,
.grid-2-col {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.grid-4-col { grid-template-columns: repeat(4, 1fr); }
.grid-3-col { grid-template-columns: repeat(3, 1fr); }
.grid-2-col { grid-template-columns: repeat(2, 1fr); }

/* Componentes de formulário */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.form-label i {
    color: #64748b;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    background: white;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-principal);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--color-principal);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* Checkbox e Radio */
.checkbox-group-inline {
    display: flex;
    gap: 20px;
    padding-top: 6px;
}

.checkbox-option,
.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.checkbox-custom,
.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.radio-custom {
    border-radius: 50%;
}

.checkbox-option input[type="checkbox"],
.radio-option input[type="radio"] {
    display: none;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--color-principal);
    border-color: var(--color-principal);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--color-principal);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--color-principal);
    border-radius: 50%;
}

.checkbox-label,
.radio-label {
    font-size: 13px;
    color: #475569;
}

.radio-group-vertical {
    display: flex;
    gap: 10px;
}

/* Search containers */
.search-container {
    position: relative;
}

.search-container .form-input {
    padding-right: 40px;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: var(--color-principal);
    color: white;
}

.search-btn.small {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--color-principal);
    color: white;
}

.btn-primary:hover {
    background: #3730a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.2);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-success {
    background: #10b981;
    color: white;
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

/* Tabelas */
.table-container {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    background: #f8fafc;
}

.table-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.table-responsive {
    overflow-x: auto;
}

.tabela-produtos,
.tabela-fatura {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.tabela-produtos th,
.tabela-fatura th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.tabela-produtos td,
.tabela-fatura td {
    padding: 6px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.tabela-produtos .form-input,
.tabela-fatura .form-input {
    padding: 8px 10px;
    font-size: 13px;
}

.form-select.small {
    padding: 8px 10px;
    font-size: 13px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.badge-blue {
    background: #60a5fa;
    color: white;
}

.badge-green {
    background: #34d399;
    color: white;
}

/* Resumo produtos */
.resumo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 15px 0;
}

.resumo-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.resumo-item.total {
    border-color: #10b981;
    background: #f0fdf4;
}

.resumo-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 4px;
}

.resumo-valor {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.resumo-item.total .resumo-valor {
    color: #059669;
    font-size: 18px;
}

/* Rodapé do formulário */
.form-actions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 16px;
}

.status-previa {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 14px;
}

.status-previa i {
    color: #f59e0b;
    font-size: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

/* Módulo NFS-e */
.modulo-container {
    padding: 24px;
}

.modulo-header {
    text-align: center;
    margin-bottom: 24px;
}

.modulo-header h2 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 8px;
}

.modulo-header p {
    color: #64748b;
    font-size: 14px;
}

.modulo-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.card-acao {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-acao:hover {
    border-color: var(--color-principal);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79,70,229,0.1);
}

.card-acao-icon {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-principal);
    margin: 0 auto 12px;
}

.card-acao h4 {
    font-size: 16px;
    color: #1e293b;
    margin: 0 0 6px;
}

.card-acao p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

/* Consulta CNPJ */
.cnpj-container {
    padding: 24px;
    overflow-y: auto;
}

.cnpj-header {
    text-align: center;
    margin-bottom: 24px;
}

.cnpj-header h2 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 8px;
}

.cnpj-header p {
    color: #64748b;
    font-size: 14px;
}

.cnpj-form {
    margin: 0 auto 24px;
}

.search-container-lg {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.form-input-lg {
    flex: 1;
    padding: 14px 16px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 14px;
}

.form-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
    margin-top: 8px;
}

.resultado-cnpj {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.resultado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.resultado-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
    font-size: 16px;
    margin: 0;
}

.resultado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    padding: 20px;
}

.resultado-card {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.resultado-card-header {
    background: var(--color-principal);
    padding: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resultado-card-header i {
    font-size: 18px;
}

.resultado-card-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.resultado-card-body {
    padding: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

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

.info-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    flex: 1;
}

.info-value {
    font-size: 13px;
    color: #1e293b;
    flex: 2;
    text-align: right;
}

.status-ativa {
    color: #10b981;
    font-weight: 700;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.resultado-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
}

.modal-header {
    background: var(--color-principal);
    padding: 20px;
    color: white;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

/* Responsividade */
@media (max-width: 1200px) {
    .grid-4-col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .abas {
        overflow-x: auto;
    }
    
    .aba {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .grid-4-col,
    .grid-3-col,
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-actions {
        width: 100%;
    }
    
    .menu-acoes {
        flex-direction: column;
        align-items: stretch;
    }
    
    .grupo-acoes {
        width: 100%;
    }
    
    .btn-acao {
        flex: 1;
        justify-content: center;
    }
    
    .status-indicadores {
        width: 100%;
        justify-content: space-between;
    }
    
    .resumo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-actions-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .resultado-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container-lg {
        flex-direction: column;
    }
    
    .resultado-actions {
        flex-direction: column;
    }
    
    .resultado-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .formulario-container {
        padding: 0 12px 12px;
    }
    
    .resumo-grid {
        grid-template-columns: 1fr;
    }
    
    .modulo-actions {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .table-header-actions {
        flex-direction: column;
        gap: 8px;
    }
}

.form-moderno {
    overflow-y: auto
}

/* Adicionar ao CSS existente */
.form-group-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-fields {
    display: flex;
    gap: 8px;
    width: 100%;
}

.form-group-fields .form-select {
    flex: 1;
    min-width: 0; /* Importante para flexbox não estourar */
}

.formulario-nfe {
    display: flex;
    flex-direction: column;
    height: 95%;
}



/* CONSULTAR NFE  */

/* Estilos para a consulta de NF-e */
.conteudo-consulta {
    height: 100%;
    overflow-y: auto;
}

.container-consulta {
    padding: 20px;
    overflow-y: auto;
}

.consulta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.consulta-header .header-left h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
    font-size: 20px;
    margin: 0 0 5px 0;
}

.consulta-header .header-left p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

/* Filtros */
.filtros-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    position:relative;
}

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

.filtros-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
    font-size: 16px;
    margin: 0;
}

.date-range,
.valor-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-separator,
.range-separator {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.date-range .form-input,
.valor-range .form-input {
    flex: 1;
}

.filtros-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Resultados */
.resultados-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.resultados-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.resultados-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.resultados-info h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
    font-size: 16px;
    margin: 0;
}

.resultados-count {
    font-size: 13px;
    color: #64748b;
    background: #e2e8f0;
    padding: 4px 10px;
    border-radius: 12px;
}

.resultados-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.page-info {
    font-size: 13px;
    color: #475569;
}

/* Tabela de resultados */
.tabela-consulta {
    width: 100%;
    border-collapse: collapse;
}

.tabela-consulta th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.tabela-consulta td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
}

.loading-row {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #64748b;
    font-size: 14px;
}

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

/* Badges de status */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-autorizada {
    background: #dcfce7;
    color: #166534;
}

.status-pendente {
    background: #fef3c7;
    color: #92400e;
}

.status-cancelada {
    background: #fee2e2;
    color: #991b1b;
}

.status-rejeitada {
    background: #f1f5f9;
    color: #475569;
}

/* Detalhes da NF-e */
.modal-lg {
    width: 90%;
    max-width: 1000px;
}

.detalhes-container {
    padding: 10px;
}

.detalhes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detalhes-id {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detalhes-numero {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

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

.detalhes-abas {
    margin-top: 20px;
}

.detalhes-abas .abas {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.detalhes-abas .aba {
    padding: 10px 16px;
    font-size: 13px;
}

.conteudo-detalhe {
    display: none;
    padding: 20px 0;
}

.conteudo-detalhe.ativa {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Info cards */
.info-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.info-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

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

.info-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.info-value {
    font-size: 13px;
    color: #1e293b;
    text-align: right;
    max-width: 70%;
    word-break: break-word;
}

/* Timeline de eventos */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.timeline-marker.success {
    background: #dcfce7;
    color: #166534;
}

.timeline-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.timeline-content h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 14px;
}

.timeline-content p {
    margin: 0 0 8px 0;
    color: #475569;
    font-size: 13px;
}

.timeline-content small {
    color: #94a3b8;
    font-size: 11px;
}

/* Ações na tabela */
.acoes-cell {
    display: flex;
    gap: 4px;
}

.btn-acao-small {
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.btn-acao-small:hover {
    background: #f1f5f9;
}

.btn-acao-small.visualizar:hover {
    color: var(--color-principal);
    border-color: var(--color-principal);
}

.btn-acao-small.download:hover {
    color: #10b981;
    border-color: #10b981;
}

.btn-acao-small.cancelar:hover {
    color: #dc2626;
    border-color: #dc2626;
}

/* Responsividade */
@media (max-width: 768px) {
    .consulta-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .detalhes-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .detalhes-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .modal-lg {
        width: 95%;
        margin: 10px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-marker {
        left: -20px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}


.frete-container .flex-column {
    flex-direction: column;
    align-items: stretch !important;
    gap: 15px;
}

.frete-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.transportadora-fields {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
    border: 1px solid #e0e5ec;
}

.transportadora-header {
    margin-bottom: 15px;
}

.transportadora-header h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transportadora-header h4 i {
    color: #3498db;
}

.transportadora-subsection {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #cbd5e0;
}

.transportadora-subsection h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transportadora-subsection h4 i {
    color: #f39c12;
}

.grid-4-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Responsividade */
@media (max-width: 1200px) {
    .grid-4-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .frete-row {
        flex-direction: column;
    }
    
    .grid-4-col {
        grid-template-columns: 1fr;
    }
}
