/* ===== CSS PARA PÁGINA DE VEÍCULOS RETORNANDO ===== */

/* ===== MENSAGENS DE VALIDAÇÃO ===== */
/* Estados dos inputs */
.form-group input.valid,
.form-group select.valid {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-group input.invalid,
.form-group select.invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group input.warning,
.form-group select.warning {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* Transições suaves para mudanças de estado */
.form-group input,
.form-group select {
    transition: all 0.3s ease;
}

.validation-message {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0;
    min-height: 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-message.error {
    color: #dc2626;
    font-weight: 500;
}

.validation-message.error::before {
    content: '⚠️';
    font-size: 0.875rem;
}

.validation-message.success {
    color: #059669;
    font-weight: 500;
}

.validation-message.success::before {
    content: '✅';
    font-size: 0.875rem;
}

.validation-message.warning {
    color: #d97706;
    font-weight: 500;
}

.validation-message.warning::before {
    content: '⚠️';
    font-size: 0.875rem;
}

.validation-message.info {
    color: #2563eb;
    font-weight: 500;
}

.validation-message.info::before {
    content: 'ℹ️';
    font-size: 0.875rem;
}

/* ===== HEADER DA PÁGINA ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,100 1000,0 1000,100"/></svg>') no-repeat bottom center;
    background-size: cover;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
    min-height: 120px; /* Garantir altura mínima */
}

/* Desktop: Layout horizontal */
@media (min-width: 769px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-text {
        flex: 1;
        text-align: left;
    }
    
    .header-actions {
        flex-shrink: 0;
        margin-top: 0;
    }
}

.header-text h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    justify-content: center;
}

.header-text h1 i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.header-text p {
    margin: 0;
    font-size: 1.125rem;
    color: white; /* Cor branca para o texto */
    opacity: 1; /* Opacidade total para branco puro */
    max-width: 600px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

/* Responsividade do header-text */
@media (max-width: 768px) {
    .header-text h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }
    
    .header-text h1 i {
        font-size: 1.75rem;
    }
    
    .header-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
        gap: 0.5rem;
    }
    
    .header-text h1 i {
        font-size: 1.5rem;
    }
    
    .header-text p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }
}

/* ===== SISTEMA DE BOTÕES REWRITTEN - ZERO CONFLITOS ===== */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0;
    padding: 0;
}

.header-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-actions .btn i {
    font-size: 1rem;
}

.header-actions .btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.header-actions .btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.header-actions .btn-secondary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.header-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.header-actions .btn-primary,
.header-actions .btn-secondary {
    position: relative;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    border: none;
    outline: none;
    min-width: 180px;
    justify-content: center;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-actions .btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.header-actions .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.6s ease;
}

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

.header-actions .btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.4);
}

.header-actions .btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.header-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.header-actions .btn-primary:disabled:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.header-actions .btn-secondary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 2px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.3);
}

.header-actions .btn-secondary::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.6s ease;
}

.header-actions .btn-secondary:hover::before {
    left: 100%;
}

.header-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.4);
}

.header-actions .btn-secondary:active {
    transform: translateY(-1px) scale(0.98);
}

/* Ícones dos botões */
.header-actions .btn-primary i,
.header-actions .btn-secondary i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.header-actions .btn-primary:hover i,
.header-actions .btn-secondary:hover i {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Efeito de brilho sutil nos botões */
.header-actions .btn-primary::after,
.header-actions .btn-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.header-actions .btn-primary:hover::after,
.header-actions .btn-secondary:hover::after {
    transform: translateX(100%);
}

/* ===== DESKTOP - LAYOUT DOS BOTÕES ===== */
@media (min-width: 769px) {
    .header-actions {
        flex-direction: row;
        justify-content: flex-end;
        margin-top: 0;
        padding: 0;
    }
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .header-actions {
        display: flex !important; /* Forçar exibição no mobile */
        flex-direction: column;
        gap: 1.25rem;
        width: 100%;
        margin-top: 2.5rem;
        padding: 0 2rem;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .header-actions .btn-primary,
    .header-actions .btn-secondary {
        display: flex !important; /* Forçar exibição dos botões */
        width: 100%;
        max-width: 320px;
        padding: 1.5rem 2rem;
        font-size: 1.1rem;
        min-width: auto;
        border-radius: 20px;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .header-actions .btn-primary i,
    .header-actions .btn-secondary i {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .header-actions {
        display: flex !important; /* Forçar exibição em telas pequenas */
        padding: 0 1.5rem;
        margin-top: 2rem;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .header-actions .btn-primary,
    .header-actions .btn-secondary {
        display: flex !important; /* Forçar exibição dos botões */
        padding: 1.75rem 1.5rem;
        font-size: 1.15rem;
        border-radius: 24px;
        max-width: 100%;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .header-actions .btn-primary i,
    .header-actions .btn-secondary i {
        font-size: 1.4rem;
    }
}

/* ===== FILTROS E BUSCA ===== */
.filters-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    position: relative;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1.125rem;
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box input:not(:placeholder-shown) {
    background: white;
}

.filter-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select:hover {
    border-color: #d1d5db;
}

.btn-filter {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-filter:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

/* ===== CONTAINER DE VEÍCULOS ===== */
.veiculos-container {
    min-height: 400px;
    position: relative;
}

.veiculos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-items: center;
}

/* Para telas menores, ajusta para 2 cards por linha */
@media (max-width: 1200px) {
    .veiculos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* Para telas ainda menores, volta para 1 card por linha */
@media (max-width: 768px) {
    .veiculos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .veiculo-card {
        max-width: 100%;
        padding: 1.25rem;
        margin: 0;
    }
    
    .card-header {
        gap: 0.75rem;
        padding-bottom: 1rem;
    }
    
    .driver-initials {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .driver-info span {
        font-size: 1rem;
    }
    
    .route-section {
        padding: 0.75rem 1rem;
    }
    
    .info-section {
        gap: 0.75rem;
    }
    
}

@media (max-width: 480px) {
    .veiculo-card {
        padding: 1rem;
        gap: 1rem;
    }
    
    .card-header {
        gap: 0.5rem;
        padding-bottom: 0.75rem;
    }
    
    .driver-initials {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .driver-info span {
        font-size: 0.875rem;
    }
    
    .driver-info small {
        font-size: 0.75rem;
    }
    
    .route-section {
        padding: 0.5rem 0.75rem;
    }
    
    .route-item h4 {
        font-size: 0.75rem;
    }
    
    .route-item p {
        font-size: 0.875rem;
    }
    
    .info-section {
        gap: 0.5rem;
    }
    
    .info-item h4 {
        font-size: 0.75rem;
    }
    
    .info-item p {
        font-size: 0.875rem;
    }
    
}

@media (max-width: 768px) {
    .veiculos-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    /* ===== CARD MOBILE - REFEITO DO ZERO ===== */
    .veiculo-card {
        padding: 1.5rem 1rem 1rem 1rem; /* Padding otimizado para mobile */
        max-width: 100%; /* Ocupa toda a largura disponível */
        margin: 0 0.5rem 1rem 0.5rem; /* Margem lateral pequena */
    }

    /* Layout da rota no mobile - horizontal compacto */
    .veiculo-rota {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

    .rota-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 0.25rem;
    }

    .rota-item .label {
        font-size: 0.7rem;
        color: #6c757d;
        font-weight: 600;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .rota-item .cidade {
        font-size: 0.85rem;
        color: #333;
        font-weight: 600;
        line-height: 1.2;
    }



    /* Informações do veículo no mobile */
    .veiculo-info {
        margin-bottom: 1rem;
    }

    .veiculo-detalhes {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .veiculo-detalhes h4 {
        font-size: 1.1rem;
        color: #333;
        margin-bottom: 0.5rem;
    }

    .veiculo-detalhes p {
        font-size: 0.9rem;
        color: #666;
        margin: 0.25rem 0;
    }

    /* Informações de retorno no mobile */
    .retorno-info {
        margin-bottom: 1rem;
    }

    .data-hora {
        font-size: 0.9rem;
        color: #666;
    }

    .observacoes {
        background: #f8f9fa;
        padding: 0.75rem;
        border-radius: 6px;
        border-left: 3px solid #007bff;
        margin-top: 0.5rem;
    }

    .observacoes span {
        font-size: 0.85rem;
        color: #555;
        font-style: italic;
    }

    
    .veiculo-detalhes-compact {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .detalhe-compact {
        justify-content: space-between;
        width: 100%;
    }
    
    .popup-veiculo {
        width: 95vw;
        margin: 0.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .popup-confirmacao {
        width: 95vw;
        margin: 0.5rem;
    }
    
    .filters-section {
        padding: 1.5rem;
    }
}

/* ===== VARIÁVEIS CSS PARA CORES E FONTES ===== */
:root {
    --primary-color: #2563eb; /* Azul */
    --secondary-color: #f3f4f6; /* Cinza claro */
    --border-color: #e5e7eb; /* Cinza da borda */
    --text-color: #4b5563; /* Cinza escuro para texto */
    --heading-color: #1f2937; /* Quase preto para títulos */
    --success-color: #10b981; /* Verde para sucesso (disponível) */
    --info-color: #60a5fa; /* Azul claro para informações */
    --warning-color: #fcd34d; /* Amarelo para avisos */
}

/* ===== CARDS DE VEÍCULOS - DESIGN V3 ===== */
.veiculo-card {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    max-width: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.veiculo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

/* Animação de fade-in */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards; /* Animação mais rápida */
}

/* Keyframes para a animação de fade-in */
@keyframes fadeIn {
    from {
        opacity: 0; /* Começa invisível */
        transform: translateY(10px); /* Começa um pouco abaixo */
    }
    to {
        opacity: 1; /* Termina totalmente visível */
        transform: translateY(0); /* Retorna à posição original */
    }
}

/* Cabeçalho do Veículo */
.veiculo-header {
    margin-bottom: 0.5rem; /* Margem inferior reduzida */
}

/* Layout da Rota (Origem e Destino) */
.veiculo-rota {
    display: flex; /* Layout flexbox */
    align-items: center; /* Alinha itens verticalmente ao centro */
    justify-content: space-between; /* Espaço entre os itens */
    text-align: center; /* Texto centralizado */
    color: var(--text-color); /* Cor do texto */
    gap: 0.5rem; /* Espaçamento entre os itens da rota */
}

.rota-item {
    display: flex; /* Layout flexbox para cada item da rota */
    flex-direction: row; /* Itens em linha */
    align-items: center; /* Alinha itens verticalmente ao centro */
    gap: 0.25rem; /* Espaçamento entre os elementos */
    flex-grow: 1; /* Permite que os itens cresçam */
    justify-content: center; /* Centraliza conteúdo dentro do item */
    padding: 0.2rem 0;
}

.rota-item .cidade {
    font-size: 0.85rem; /* Tamanho da fonte da cidade reduzido */
    font-weight: 600; /* Peso da fonte semibold */
    color: var(--heading-color); /* Cor do título */
}

.rota-item .label {
    font-size: 0.65rem; /* Tamanho da fonte do rótulo reduzido */
    text-transform: uppercase; /* Texto em maiúsculas */
    color: #6b7280; /* Cor cinza sutil */
}

.rota-arrow {
    text-align: center; /* Centraliza a seta */
    color: var(--primary-color); /* Cor primária para a seta */
    flex-shrink: 0; /* Impede que a seta encolha */
}

.rota-arrow .fas {
    font-size: 1rem; /* Tamanho do ícone da seta reduzido */
}

/* Seção do Motorista */
.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
}

.driver-initials {
    width: 56px;
    height: 56px;
    background-color: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.driver-info {
    display: flex;
    flex-direction: column;
}

.driver-info span {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.driver-info small {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Seção de Rota */
.route-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #eef2ff;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    text-align: center;
    gap: 0.5rem;
}

.route-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.route-item h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.route-item p {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.route-arrow {
    font-size: 1.5rem;
    color: #2563eb;
    font-weight: 700;
}

/* Seções de Informação Geral */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
}

.info-item p {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.info-item-full {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

.info-item-full h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
}

.info-item-full p {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}


/* Detalhes Compactos do Veículo */
.veiculo-detalhes-compact {
    display: flex; /* Layout flexbox */
    flex-wrap: wrap; /* Permite que os itens quebrem linha */
    gap: 0.5rem; /* Espaçamento entre os itens */
    margin-bottom: 0; /* Remove margem */
    padding-bottom: 0; /* Remove padding */
    border-bottom: none; /* Remove borda */
}

.detalhe-compact {
    display: flex; /* Layout flexbox */
    flex-direction: row; /* Itens em linha */
    align-items: center; /* Alinha itens verticalmente ao centro */
    gap: 0.2rem; /* Espaçamento menor */
    white-space: nowrap; /* Impede que o texto quebre linha */
}

.detalhe-compact .label {
    font-size: 0.7rem; /* Tamanho da fonte do rótulo reduzido */
    color: #6b7280; /* Cor cinza sutil */
    font-weight: 500; /* Peso da fonte medium */
}

.detalhe-compact .value {
    font-size: 0.75rem; /* Tamanho da fonte do valor reduzido */
    color: var(--text-color); /* Cor do texto */
    font-weight: 600; /* Peso da fonte semibold */
}

/* Informações de Retorno */
.veiculo-retorno {
    display: flex; /* Layout flexbox */
    gap: 0.3rem; /* Espaçamento entre os elementos reduzido */
    font-weight: 600; /* Peso da fonte semibold */
    color: var(--primary-color); /* Cor primária */
    margin: 0; /* Remove margem */
    font-size: 0.75rem; /* Tamanho da fonte reduzido */
}

/* Rodapé do Card */
.veiculo-footer {
    display: flex; /* Layout flexbox */
    justify-content: space-between; /* Espaço entre os itens */
    align-items: center; /* Alinha itens verticalmente ao centro */
    margin-top: 0.75rem; /* Margem superior reduzida */
    padding-top: 0.5rem; /* Espaçamento interno superior reduzido */
    border-top: 1px dashed var(--border-color); /* Borda tracejada no topo */
    gap: 0.5rem; /* Espaçamento entre os elementos */
    flex-wrap: wrap; /* Permite quebrar linha em telas pequenas */
}

.motorista-info {
    display: flex; /* Layout flexbox */
    align-items: center; /* Alinha itens verticalmente ao centro */
    gap: 0.4rem; /* Espaçamento entre os elementos reduzido */
}

.motorista-avatar {
    width: 1.75rem; /* Largura reduzida */
    height: 1.75rem; /* Altura reduzida */
    background-color: var(--info-color); /* Cor de fundo de informação */
    color: #ffffff; /* Cor do texto branca */
    display: flex; /* Layout flexbox */
    align-items: center; /* Alinha itens verticalmente ao centro */
    justify-content: center; /* Centraliza horizontalmente */
    border-radius: 9999px; /* Completamente arredondado (círculo) */
    font-weight: 600; /* Peso da fonte semibold */
    font-size: 0.75rem; /* Tamanho da fonte reduzido */
}

.motorista-nome {
    font-weight: 600; /* Peso da fonte semibold */
    color: var(--heading-color); /* Cor do título */
    font-size: 0.8rem; /* Tamanho da fonte reduzido */
}

.data-cadastro {
    font-size: 0.65rem; /* Tamanho da fonte reduzido */
    color: #6b7280; /* Cor cinza sutil */
    white-space: nowrap; /* Impede que o texto quebre linha */
}

/* Status */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.status-ativo {
    background-color: #d1fae5;
    color: #065f46;
}

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

.status-concluido {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-cancelado {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-disponivel {
    background-color: #d1fae5;
    color: #065f46;
}

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

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

/* ===== MEUS RETORNOS ===== */
.meus-retornos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.retorno-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.retorno-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.retorno-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.retorno-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
}

.retorno-info {
    margin-bottom: 1rem;
}

.retorno-info p {
    margin: 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.retorno-rota {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.rota-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rota-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.rota-value {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 600;
}

.rota-arrow {
    color: #6b7280;
    font-weight: bold;
    font-size: 1.125rem;
}

.retorno-data {
    margin-bottom: 1rem;
}

.retorno-data p {
    margin: 0.25rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.retorno-observacoes {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: 0.5rem;
    border-left: 4px solid #f59e0b;
}

.retorno-observacoes p {
    margin: 0;
    color: #92400e;
    font-size: 0.875rem;
    font-style: italic;
}

.retorno-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Responsive para Meus Retornos */
@media (max-width: 768px) {
    .meus-retornos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .retorno-card {
        padding: 1rem;
    }
    
    .retorno-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .retorno-rota {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .rota-arrow {
        transform: rotate(90deg);
    }
}

/* ===== MODAL DE CONTATO ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.close-btn:hover {
    color: #1f2937;
}

.modal .card-header {
    border-bottom: none;
    padding-bottom: 0;
}

.modal .mt-4 {
    margin-top: 1rem;
}

.modal .border-t {
    border-top: 1px solid #e5e7eb;
}

.modal .pt-4 {
    padding-top: 1rem;
}

.modal .font-semibold {
    font-weight: 600;
}

.modal .text-gray-600 {
    color: #6b7280;
}

.modal .mb-2 {
    margin-bottom: 0.5rem;
}

.modal .text-2xl {
    font-size: 1.5rem;
}

.modal .font-bold {
    font-weight: 700;
}

.modal .text-gray-800 {
    color: #1f2937;
}

.modal .mb-4 {
    margin-bottom: 1rem;
}

.modal .w-full {
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estilo para ícones Font Awesome */
.fas {
    color: var(--primary-color); /* Cor primária para os ícones */
}

/* ===== ESTADOS DE CARREGAMENTO ===== */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: #d1d5db;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #374151;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===== POPUP DE VEÍCULO ===== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* Inicialmente oculto */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

/* Garantir que o popup de veículo seja exibido quando ativo */
#popupVeiculo.popup-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

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

.popup-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

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

.popup-veiculo {
    width: 700px;
}

.popup-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.popup-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.popup-subtitle {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

.popup-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #f3f4f6;
    color: #374151;
    transform: scale(1.1);
}

/* ===== FORMULÁRIO DE VEÍCULO ===== */
.form-veiculo {
    padding: 1.5rem;
}

/* ===== SELEÇÃO DE VEÍCULO ===== */
.veiculo-selecao {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* ===== ESTADOS E CIDADES ===== */
.estado-cidade-row {
    margin-bottom: 1.5rem;
}

.estado-cidade-row .form-row {
    margin-bottom: 1rem;
}

.estado-cidade-row select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.estado-cidade-row select:disabled option {
    color: #9ca3af;
}

.veiculo-selecao label {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    display: block;
}

.veiculo-selecao select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.veiculo-selecao select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== PREVIEW DO VEÍCULO - ESTILO MODERNO ===== */
.veiculo-info-preview {
    margin-top: 1.5rem;
    position: relative;
}

.veiculo-preview-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: none;
    border-radius: 20px;
    padding: 0;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    position: relative;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.veiculo-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #3b82f6 0%, 
        #8b5cf6 25%, 
        #06d6a0 50%, 
        #f59e0b 75%, 
        #ef4444 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.veiculo-preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.veiculo-preview-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    margin: 0;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.veiculo-preview-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-10%, -10%) rotate(0deg); }
    50% { transform: translate(10%, 10%) rotate(180deg); }
}

.veiculo-preview-header i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    z-index: 1;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.veiculo-preview-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    margin: 0;
    z-index: 1;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.veiculo-preview-details {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: white;
}

.preview-detail {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.preview-detail:hover::before {
    transform: translateX(0);
}

.preview-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.preview-detail .label {
    font-weight: 700;
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.preview-detail .label::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    flex-shrink: 0;
}

.preview-detail .value {
    color: #1e293b;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding-left: 1.25rem;
}

.preview-detail .value::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

/* Estilos especiais para diferentes tipos de dados */
.preview-detail.rota {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.preview-detail.rota .value {
    color: #1d4ed8;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.preview-detail.rota .value i {
    font-size: 1rem;
    color: #3b82f6;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    40% { transform: translateX(-3px); }
    60% { transform: translateX(3px); }
}

.preview-detail.destaque {
    background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.preview-detail.destaque .value {
    color: #92400e;
    font-size: 1.1rem;
}

.preview-detail.destaque .value::before {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

/* Indicadores visuais */
.status-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1); }
    100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3); }
}

.status-indicator.warning {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.status-indicator.error {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .veiculo-preview-card {
        border-radius: 16px;
        margin: 0 -0.5rem;
    }
    
    .veiculo-preview-header {
        padding: 1rem 1.25rem;
        gap: 0.75rem;
    }
    
    .veiculo-preview-header i {
        font-size: 1.5rem;
    }
    
    .veiculo-preview-title {
        font-size: 1rem;
    }
    
    .veiculo-preview-details {
        padding: 1rem;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .preview-detail {
        padding: 0.75rem;
    }
    
    .preview-detail .value {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .veiculo-preview-header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .veiculo-preview-header i {
        font-size: 1.75rem;
    }
    
    .veiculo-preview-details {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .preview-detail {
        padding: 0.5rem;
    }
}

/* Animação de entrada */
.veiculo-preview-card.show {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modo escuro */
@media (prefers-color-scheme: dark) {
    .veiculo-preview-card {
        background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
        box-shadow: 
            0 10px 25px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(59, 130, 246, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .preview-detail {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .preview-detail:hover {
        background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
    }
    
    .preview-detail .label {
        color: #d1d5db;
    }
    
    .preview-detail .value {
        color: #f9fafb;
    }
    
    .veiculo-preview-details {
        background: #1f2937;
    }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.form-group label.required::after {
    content: ' *';
    color: #dc2626;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:invalid {
    border-color: #fca5a5;
}

.form-group input:valid {
    border-color: #86efac;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* ===== AÇÕES DO FORMULÁRIO ===== */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* ===== POPUP MEUS RETORNOS ===== */
#popupMeusRetornos {
    z-index: 1000; /* Z-index padrão */
    display: block; /* Garantir que seja exibido */
}

.popup-meus-retornos {
    width: 90vw;
    max-width: 1000px;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.popup-meus-retornos .popup-header {
    flex-shrink: 0;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem 1rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-meus-retornos .popup-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popup-meus-retornos .popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-meus-retornos .popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.meus-retornos-content {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

.meus-retornos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar personalizada para o grid */
.meus-retornos-grid::-webkit-scrollbar {
    width: 6px;
}

.meus-retornos-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.meus-retornos-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.meus-retornos-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.meu-retorno-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.875rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: fit-content;
    min-height: 180px;
    max-height: 250px;
    overflow: hidden;
}

.meu-retorno-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.meu-retorno-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.meu-retorno-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.2;
}

.meu-retorno-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.meu-retorno-acoes {
    display: flex;
    gap: 0.5rem;
}

.btn-excluir {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.375rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-excluir:hover {
    background: #b91c1c;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-excluir i {
    color: #ffffff;
}

.meu-retorno-detalhes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.meu-retorno-detalhe {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meu-retorno-detalhe .label {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.meu-retorno-detalhe .value {
    font-size: 0.8rem;
    color: #111827;
    font-weight: 600;
}

.meu-retorno-rota {
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
    margin-bottom: 0.5rem;
}

.rota-origem-destino {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.rota-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.rota-item .cidade {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.rota-item .label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
}

.rota-arrow {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.meu-retorno-data-hora {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #3b82f6;
    text-align: center;
}

.data-hora-info {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.data-hora-label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.meu-retorno-observacoes {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.meu-retorno-observacoes p {
    margin: 0;
    font-size: 0.8rem;
    color: #92400e;
    line-height: 1.4;
}

/* ===== AVISO DE LIMITE DE RETORNOS ===== */
.limite-retornos-info {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.limite-info-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.limite-info-content i {
    color: #f59e0b;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.limite-text {
    flex: 1;
    font-size: 0.875rem;
    color: #92400e;
    line-height: 1.4;
}

.limite-numero {
    background: #f59e0b;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
}

.limite-progresso {
    flex-shrink: 0;
    width: 80px;
    height: 8px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progresso-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #f59e0b 50%, #ef4444 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ===== POPUP DE CONFIRMAÇÃO DE EXCLUSÃO ===== */
#popupConfirmacaoExclusao {
    z-index: 99999 !important; /* Z-index muito alto para garantir que fique na frente de todos os popups */
    position: fixed !important;
    display: none; /* Inicialmente oculto */
}

#popupConfirmacaoExclusao.popup-overlay {
    z-index: 99999 !important;
    background: rgba(0, 0, 0, 0.8) !important; /* Backdrop mais escuro para destacar */
}

/* Garantir que o popup seja exibido quando ativo */
#popupConfirmacaoExclusao.popup-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.popup-confirmacao-exclusao {
    width: 450px;
    max-width: 90vw;
    position: relative;
    z-index: 100000; /* Z-index ainda maior para o conteúdo */
}

.confirmacao-content {
    text-align: center;
    padding: 2rem;
}

.confirmacao-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
    animation: pulse-danger 2s infinite;
}

.confirmacao-icon i {
    font-size: 2rem;
    color: white;
}

@keyframes pulse-danger {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 8px 35px rgba(239, 68, 68, 0.5);
        transform: scale(1.05);
    }
}

.confirmacao-content h4 {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.confirmacao-content p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0 0 2rem 0;
    line-height: 1.5;
}

.confirmacao-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

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

.btn-danger:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.3);
}

/* Responsividade do popup de confirmação */
@media (max-width: 768px) {
    .popup-confirmacao-exclusao {
        width: 95vw;
        margin: 1rem;
    }
    
    .confirmacao-content {
        padding: 1.5rem;
    }
    
    .confirmacao-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .confirmacao-icon i {
        font-size: 1.5rem;
    }
    
    .confirmacao-content h4 {
        font-size: 1.125rem;
    }
    
    .confirmacao-content p {
        font-size: 0.875rem;
    }
    
    .confirmacao-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .confirmacao-actions .btn-secondary,
    .confirmacao-actions .btn-danger {
        width: 100%;
        justify-content: center;
    }
}

/* ===== POPUP DE CONFIRMAÇÃO ===== */
.lottie-container {
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

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

#lottie-animation {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    overflow: hidden;
}

.lottie-container h4 {
    color: #059669;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.lottie-container p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.popup-confirmacao {
    width: 400px;
    text-align: center;
}

.cadastrando-content {
    padding: 2rem;
}

.loading-animation {
    margin-bottom: 2rem;
}

.loading-animation h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    color: #111827;
}

.loading-animation p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#countdown-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.countdown-label {
    color: #6b7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== ANIMAÇÕES DE ENTRADA ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ===== POPUP DE DETALHES ===== */
.popup-detalhes-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.popup-detalhes-overlay.show {
    display: flex;
}

.popup-detalhes-container {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    animation: popupSlideIn 0.4s ease forwards;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-detalhes-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.popup-detalhes-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-detalhes-header i {
    font-size: 1.2rem;
}

.popup-detalhes-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.popup-detalhes-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.popup-detalhes-body {
    padding: 25px;
}

.popup-detalhes-section {
    margin-bottom: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.popup-detalhes-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.popup-detalhes-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.popup-detalhes-section-header i {
    color: #007bff;
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

.popup-detalhes-section-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.popup-detalhes-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.popup-detalhes-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

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

.popup-detalhes-value {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-height: 20px;
}

.popup-detalhes-whatsapp {
    margin-top: 15px;
    text-align: center;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    text-decoration: none;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
}

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

.btn-whatsapp i {
    font-size: 1.2rem;
}

.popup-detalhes-rota {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.popup-detalhes-rota-item {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popup-detalhes-rota-arrow {
    color: #007bff;
    font-size: 1.5rem;
    margin: 0 10px;
    animation: pulse 2s infinite;
}

.popup-detalhes-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 20px 20px;
    text-align: right;
}

.popup-detalhes-footer .btn {
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.popup-detalhes-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.popup-detalhes .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.popup-detalhes .popup-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.popup-detalhes .popup-body {
    padding: 20px;
}

.detalhes-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.detalhes-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detalhes-section h4 i {
    color: #007bff;
}

/* Informações do Motorista */
.motorista-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.motorista-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.motorista-dados {
    flex: 1;
}

.motorista-nome {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.motorista-telefone {
    color: #666;
    font-size: 1rem;
}

/* Informações da Rota */
.rota-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.rota-item {
    flex: 1;
    min-width: 120px;
}

.rota-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.rota-valor {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.rota-arrow {
    color: #007bff;
    font-size: 1.2rem;
    margin: 0 10px;
}

/* Grid de Informações */
.veiculo-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.retorno-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.info-valor {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

/* Observações */
.observacoes-texto {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    color: #333;
    line-height: 1.5;
    font-style: italic;
}

/* Footer do Popup */
.popup-detalhes .popup-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

/* Responsividade do Popup */
@media (max-width: 768px) {
    .popup-detalhes {
        width: 95%;
        margin: 10px;
    }
    
    .popup-detalhes .popup-body {
        padding: 15px;
    }
    
    .detalhes-section {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .rota-info {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .rota-arrow {
        transform: rotate(90deg);
        margin: 5px 0;
        align-self: center;
    }
    
    .veiculo-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .retorno-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Responsividade do Popup de Detalhes */
@media (max-width: 768px) {
    .popup-detalhes-container {
        width: 95%;
        max-height: 90vh;
        margin: 10px;
    }
    
    .popup-detalhes-header {
        padding: 15px 20px;
    }
    
    .popup-detalhes-header h3 {
        font-size: 1.2rem;
    }
    
    .popup-detalhes-body {
        padding: 20px;
    }
    
    .popup-detalhes-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .popup-detalhes-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .popup-detalhes-rota {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .popup-detalhes-rota-arrow {
        transform: rotate(90deg);
        margin: 5px 0;
        align-self: center;
    }
    
    .popup-detalhes-footer {
        padding: 15px 20px;
    }
    
    .popup-detalhes-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .popup-detalhes-container {
        width: 98%;
        margin: 5px;
        border-radius: 15px;
    }
    
    .popup-detalhes-header {
        border-radius: 15px 15px 0 0;
        padding: 12px 15px;
    }
    
    .popup-detalhes-header h3 {
        font-size: 1.1rem;
    }
    
    .popup-detalhes-body {
        padding: 15px;
    }
    
    .popup-detalhes-section {
        padding: 12px;
        border-radius: 10px;
    }
    
    .popup-detalhes-section-header h4 {
        font-size: 1.1rem;
    }
    
    .popup-detalhes-value {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .popup-detalhes-footer {
        border-radius: 0 0 15px 15px;
        padding: 12px 15px;
    }
    
    /* Cards dos meus retornos - Mobile */
    .meus-retornos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }
    
    .meu-retorno-card .card-header {
        padding: 12px 15px;
    }
    
    .meu-retorno-card .card-body {
        padding: 15px;
    }
    
    .meu-retorno-card .rota-info {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .meu-retorno-card .seta {
        transform: rotate(90deg);
        margin: 5px 0;
    }
    
    .meu-retorno-card .veiculo-detalhes h4 {
        font-size: 1.1rem;
    }
    
    .meu-retorno-card .veiculo-detalhes p {
        font-size: 0.85rem;
    }
}

/* ===== CARDS DOS MEUS RETORNOS ===== */
.meu-retorno-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.meu-retorno-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.meu-retorno-card .card-header {
    background: white;
    color: #333;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.meu-retorno-card .card-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.meu-retorno-card .card-status i {
    font-size: 0.7rem;
}

.meu-retorno-card .status-ativo {
    color: #28a745;
}

.meu-retorno-card .status-inativo {
    color: #dc3545;
}

.meu-retorno-card .card-actions {
    display: flex;
    gap: 10px;
}

.meu-retorno-card .btn-delete {
    background: #dc3545;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.meu-retorno-card .btn-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

.meu-retorno-card .card-body {
    padding: 20px;
}

.meu-retorno-card .rota-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.meu-retorno-card .origem,
.meu-retorno-card .destino {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-weight: 600;
}

.meu-retorno-card .origem i,
.meu-retorno-card .destino i {
    color: #007bff;
    font-size: 1.1rem;
}

.meu-retorno-card .seta {
    color: #007bff;
    font-size: 1.2rem;
    margin: 0 10px;
}

.meu-retorno-card .veiculo-info {
    margin-bottom: 15px;
}

.meu-retorno-card .veiculo-detalhes h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.meu-retorno-card .veiculo-detalhes p {
    margin: 4px 0;
    color: #666;
    font-size: 0.9rem;
}

.meu-retorno-card .retorno-info {
    margin-bottom: 15px;
}

.meu-retorno-card .data-hora {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-weight: 600;
}

.meu-retorno-card .data-hora i {
    color: #007bff;
}

.meu-retorno-card .observacoes {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.meu-retorno-card .observacoes i {
    color: #856404;
    margin-top: 2px;
}

.meu-retorno-card .observacoes span {
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Grid dos meus retornos */
.meus-retornos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px 0;
}

/* Responsividade para telas médias */
@media (max-width: 1000px) {
    .meus-retornos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .lottie-container {
        padding: 1.5rem;
    }
    
    #lottie-animation {
        width: 150px;
        height: 150px;
        margin-bottom: 1rem;
    }
    
    .lottie-container h4 {
        font-size: 1.25rem;
    }
    
    .lottie-container p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .lottie-container {
        padding: 1rem;
    }
    
    #lottie-animation {
        width: 120px;
        height: 120px;
        margin-bottom: 0.75rem;
    }
    
    .lottie-container h4 {
        font-size: 1.125rem;
    }
    
    .lottie-container p {
        font-size: 0.875rem;
    }
}
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .header-text h1 {
        font-size: 2rem;
        justify-content: center;
    }
    
    .filter-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .veiculos-grid {
        grid-template-columns: 1fr;
    }
    
    .veiculo-detalhes-compact {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .veiculo-rota {
        flex-direction: column;
        gap: 1rem;
    }
    
    .rota-arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
    
    .popup-veiculo {
        width: 95vw;
        margin: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .popup-confirmacao {
        width: 95vw;
        margin: 1rem;
    }
    
    .popup-meus-retornos {
        width: 95vw;
        margin: 1rem;
        max-height: 90vh;
    }
    
    .meus-retornos-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-height: 70vh;
    }
    
    .meu-retorno-card {
        min-height: 160px;
        max-height: 220px;
    }
    
    .limite-retornos-info {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .limite-info-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .limite-progresso {
        width: 100%;
        max-width: 120px;
    }
    
    .filters-section {
        padding: 1.5rem;
    }
}

/* Para telas menores que 480px (smartphones) */
@media (max-width: 480px) {
    .page-header {
        padding: 2rem 0;
    }
    
    .header-text h1 {
        font-size: 1.75rem;
    }
    
    .header-text p {
        font-size: 1rem;
    }
    
    .filters-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .search-box {
        margin-bottom: 1rem;
    }
    
    .status-badge {
        top: 0.5rem; /* Ajustado top do badge em telas pequenas */
        right: 0.5rem;
        font-size: 0.6rem; /* Fonte ainda menor para o badge */
    }

    .motorista-avatar {
        width: 1.5rem; /* Avatar menor */
        height: 1.5rem;
        font-size: 0.65rem;
    }
    .motorista-nome {
        font-size: 0.75rem; /* Nome do motorista menor */
    }
    .data-cadastro {
        font-size: 0.6rem; /* Data de cadastro menor */
    }
    
    .popup-content {
        border-radius: 12px;
    }
    
    .form-veiculo {
        padding: 1rem;
    }
}

/* Para telas ainda menores (ex: alguns smartphones em modo paisagem ou dispositivos muito pequenos) */
@media (max-width: 360px) {
    /* Removido: regras específicas do mobile para veiculo-card */
    /* Os cards usarão as mesmas regras do CSS principal */

    .status-badge {
        top: 0.4rem;
        right: 0.4rem;
        font-size: 0.55rem;
    }

    .veiculo-header {
        margin-bottom: 0.4rem;
    }

    .veiculo-info h4 {
        font-size: 0.85rem;
    }

    .detalhe-compact .label,
    .detalhe-compact .value,
    .veiculo-retorno {
        font-size: 0.65rem;
    }

    .motorista-avatar {
        width: 1.3rem;
        height: 1.3rem;
        font-size: 0.6rem;
    }
    .motorista-nome {
        font-size: 0.7rem;
    }
    .data-cadastro {
        font-size: 0.55rem;
    }
}

/* ===== MODO ESCURO (OPCIONAL) ===== */
@media (prefers-color-scheme: dark) {
    .veiculo-card {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .veiculo-header {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    }
    
    .veiculo-footer {
        background: #374151;
        border-color: #4b5563;
    }
    
    .filters-section {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .search-box input,
    .filter-select {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .popup-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .popup-header {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        border-color: #4b5563;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
}

/* ===== IMPRESSÃO ===== */
@media print {
    .page-header,
    .filters-section,
    .popup-overlay {
        display: none !important;
    }
    
    #popupDetalhesVeiculo {
        display: none !important;
    }
    
    .veiculo-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .veiculos-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== FOCUS VISIBLE ===== */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-filter:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.search-box input:focus-visible,
.filter-select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== FILTROS SIMPLES E BONITOS ===== */

/* Botão de Toggle para Mobile */
.filters-toggle-mobile {
    display: none;
    margin-bottom: 16px;
}

.btn-toggle-filters {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border: 2px solid rgba(33, 150, 243, 0.3);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.btn-toggle-filters:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    border-color: rgba(33, 150, 243, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.3);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.btn-toggle-filters.active .toggle-icon {
    transform: rotate(180deg);
}

.filters-simple {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 16px;
    padding: 30px 16px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.2);
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.filters-simple::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.filters-row {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.filter-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.filter-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.filter-item label i {
    font-size: 16px;
    opacity: 0.9;
}

.filter-select,
.filter-date {
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.filter-select:focus,
.filter-date:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.filter-select:hover,
.filter-date:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.btn-clear-filters {
    background: rgba(33, 150, 243, 0.1);
    color: #1565c0;
    border: 2px solid rgba(33, 150, 243, 0.3);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.btn-clear-filters:hover {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.results-count {
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 12px;
    font-size: 14px;
    color: #1565c0;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(33, 150, 243, 0.2);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.results-count i {
    font-size: 16px;
    opacity: 0.9;
}

.results-count span {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

/* Responsividade */
@media (max-width: 768px) {
    /* Mostrar botão de toggle no mobile */
    .filters-toggle-mobile {
        display: block;
    }
    
    /* Ocultar filtros por padrão no mobile */
    .filters-simple {
        display: none;
        padding: 20px;
        margin-bottom: 24px;
    }
    
    /* Mostrar filtros quando ativo */
    .filters-simple.active {
        display: block;
    }
    
    .filters-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .filter-item {
        min-width: 100%;
    }
    
    .btn-clear-filters {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .filters-simple {
        padding: 16px;
        border-radius: 12px;
    }
    
    .filter-select,
    .filter-date {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .btn-clear-filters {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ======================================= */
/* ===== VEICULO PREVIEW - REESTILIZADO ===== */
/* ======================================= */

/* --- Variáveis CSS para organização --- */
:root {
    /* Cores */
    --cor-principal: #91a8cc;      /* Azul principal */
    --cor-secundaria: #8b5cf6;    /* Roxo */
    --cor-terciaria: #06b6d4;     /* Ciano */
    --cor-sucesso: #10b981;       /* Verde de sucesso */
    --cor-texto-escuro: #1e293b;  /* Cinza escuro */
    --cor-texto-medio: #64748b;   /* Cinza médio */
    --cor-fundo: #f0f8ff;         /* Fundo branco com toque de azul */
    --cor-borda: #cbd5e1;         /* Borda cinza suave */
    --cor-branco: #ffffff;
    --cor-sombra-suave: rgba(0, 0, 0, 0.04);
    --cor-sombra-leve: rgba(0, 0, 0, 0.08);
  
    /* Espaçamento */
    --espaco-sm: 8px;
    --espaco-md: 16px;
    --espaco-lg: 24px;
  
    /* Bordas arredondadas */
    --borda-arredondada-sm: 6px;
    --borda-arredondada-md: 10px;
    --borda-arredondada-lg: 16px;
  }
  
  /* --- Estilo Principal do Cartão --- */
  .veiculo-preview {
    background: var(--cor-fundo);
    border: 1px solid var(--cor-borda);
    border-radius: var(--borda-arredondada-lg);
    padding: var(--espaco-lg);
    margin: var(--espaco-md) 0;
    box-shadow: 0 4px 15px var(--cor-sombra-suave);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .veiculo-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--cor-sombra-leve);
    border-color: var(--cor-principal);
  }
  
  .veiculo-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cor-principal), var(--cor-secundaria), var(--cor-terciaria));
    border-radius: var(--borda-arredondada-lg) var(--borda-arredondada-lg) 0 0;
  }
  
  /* --- Cabeçalho --- */
  .veiculo-preview-header {
    display: flex;
    align-items: center;
    gap: var(--espaco-md);
    margin-bottom: var(--espaco-md);
    padding-bottom: var(--espaco-sm);
    border-bottom: 1px solid var(--cor-borda);
  }
  
  .veiculo-preview-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--cor-principal), var(--cor-secundaria));
    border-radius: var(--borda-arredondada-md);
    display: grid;
    place-items: center;
    color: var(--cor-branco);
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  }
  
  .veiculo-preview-title {
    flex: 1;
  }
  
  .veiculo-preview-title h4 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--cor-texto-escuro);
  }
  
  .veiculo-preview-title p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--cor-texto-medio);
  }
  
  /* --- Informações (Grid) --- */
  .veiculo-preview-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--espaco-md);
    margin-bottom: var(--espaco-lg);
  }
  
  .veiculo-preview-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .veiculo-preview-item .label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cor-texto-medio);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .veiculo-preview-item .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--cor-texto-escuro);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .veiculo-preview-item .value i {
    font-size: 12px;
    color: var(--cor-principal);
  }
  
  /* --- Seção de Rotas --- */
  .veiculo-preview-route {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: var(--borda-arredondada-md);
    padding: var(--espaco-md);
    margin-bottom: var(--espaco-md);
  }
  
  .veiculo-preview-route-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--cor-principal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--espaco-sm);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .veiculo-preview-route-content {
    display: flex;
    align-items: center;
    gap: var(--espaco-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--cor-texto-escuro);
  }
  
  .veiculo-preview-route-origin,
  .veiculo-preview-route-destination {
    flex: 1;
    text-align: center;
    padding: var(--espaco-sm);
    background: var(--cor-branco);
    border-radius: var(--borda-arredondada-sm);
    box-shadow: 0 2px 4px var(--cor-sombra-suave);
  }
  
  .veiculo-preview-route-arrow {
    color: var(--cor-principal);
    font-size: 16px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
  }
  
  /* --- Etiqueta de Capacidade --- */
  .veiculo-preview-capacity {
    background: linear-gradient(135deg, var(--cor-sucesso), #059669);
    color: var(--cor-branco);
    padding: var(--espaco-sm) var(--espaco-md);
    border-radius: var(--borda-arredondada-sm);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  }
  
  .veiculo-preview-capacity i {
    font-size: 14px;
  }
  
  /* --- Responsividade --- */
  @media (max-width: 768px) {
    .veiculo-preview {
      padding: var(--espaco-md);
      margin: var(--espaco-sm) 0;
    }
    
    .veiculo-preview-header {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .veiculo-preview-icon {
      width: 45px;
      height: 45px;
      font-size: 20px;
    }
    
    .veiculo-preview-title h4 {
      font-size: 17px;
    }
    
    .veiculo-preview-info {
      grid-template-columns: 1fr;
      gap: var(--espaco-sm);
    }
    
    .veiculo-preview-route-content {
      flex-direction: column;
    }
    
    .veiculo-preview-route-arrow {
      transform: rotate(90deg);
    }
  }
  
  @media (max-width: 480px) {
    .veiculo-preview {
      padding: var(--espaco-sm);
      border-radius: var(--borda-arredondada-md);
    }
    
    .veiculo-preview-title h4 {
      font-size: 15px;
    }
    
    .veiculo-preview-title p {
      font-size: 12px;
    }
    
    .veiculo-preview-item .value {
      font-size: 13px;
    }
    
    .veiculo-preview-route-origin,
    .veiculo-preview-route-destination {
      padding: var(--espaco-sm);
      font-size: 13px;
    }
  }
/* ===== UTILITÁRIOS ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.p-4 {
    padding: 1rem;
}

.hidden {
    display: none !important;
}


.visible {
    visibility: visible !important;
}

/* ===== CORREÇÃO MOBILE - GARANTIR VISIBILIDADE DOS BOTÕES ===== */
/* CSS específico para garantir que os botões apareçam no mobile quando o usuário estiver logado */
@media (max-width: 768px) {
    .page-header .header-content .header-actions {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin-top: 2rem !important;
        padding: 0 2rem !important;
    }
    
    .page-header .header-content .header-actions .btn-primary,
    .page-header .header-content .header-actions .btn-secondary {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        max-width: 320px !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

@media (max-width: 480px) {
    .page-header .header-content .header-actions {
        padding: 0 1.5rem !important;
        margin-top: 1.5rem !important;
    }
    
    .page-header .header-content .header-actions .btn-primary,
    .page-header .header-content .header-actions .btn-secondary {
        max-width: 100% !important;
        padding: 1.5rem 2rem !important;
    }
}

.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

/* ===== MENSAGEM SEM VEÍCULOS ===== */
.sem-veiculos-mensagem {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
}

.sem-veiculos-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.sem-veiculos-content i {
    font-size: 3rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.sem-veiculos-content h4 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.sem-veiculos-content p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
    max-width: 400px;
    line-height: 1.5;
}

.sem-veiculos-content .btn-primary {
    margin-top: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sem-veiculos-content .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== POPUP DE CARREGAMENTO ===== */
.popup-cadastrando {
    max-width: 400px;
    text-align: center;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.cadastrando-content h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cadastrando-content p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* ===== RESPONSIVIDADE PARA MENSAGEM SEM VEÍCULOS ===== */
@media (max-width: 768px) {
    .sem-veiculos-mensagem {
        padding: 1.5rem;
        margin: 0.5rem 0;
    }
    
    .sem-veiculos-content i {
        font-size: 2.5rem;
    }
    
    .sem-veiculos-content h4 {
        font-size: 1.125rem;
    }
    
    .sem-veiculos-content p {
        font-size: 0.875rem;
    }
    
    .popup-cadastrando {
        max-width: 90%;
    }
    
    .spinner-large {
        width: 50px;
        height: 50px;
    }
}