/* ================================
VARIÁVEIS DO TEMA
================================ */
:root {
--bg-primary: #1a1d29;
--bg-secondary: #252836;
--text-primary: #ffffff;
--text-secondary: #9ca3af;
--accent-blue: #3b82f6;
--accent-blue-hover: #2563eb;
}

[data-theme="light"] {
--bg-primary: #ffffff;
--bg-secondary: #f3f4f6;
--text-primary: #1f2937;
--text-secondary: #6b7280;
}

/* ================================
GERAL
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
background-color: var(--bg-primary);
color: var(--text-primary);
font-family: "Inter", sans-serif;
transition: all 0.3s ease;
}

/* ================================
SIDEBAR
================================ */
.sidebar {
width: 260px;
height: 100vh;
position: fixed;
background-color: var(--bg-secondary);
color: var(--text-primary);
padding: 20px;
border-right: 1px solid rgba(255,255,255,0.1);
transition: margin-left 0.3s ease;
z-index: 1000;
left: 0;
top: 0;
}

.sidebar-header { 
    font-size: 22px; 
    font-weight: bold; 
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-section-title {
font-size: 12px;
color: var(--text-secondary);
margin-top: 25px;
margin-bottom: 8px;
}

.sidebar .nav-link {
color: var(--text-secondary);
padding: 10px 5px;
border-radius: 6px;
display: flex;
align-items: center;
gap: 10px;
font-size: 15px;
transition: 0.2s;
}

.sidebar .nav-link:hover { background-color: rgba(255,255,255,0.05); color: #fff; }

.sidebar .nav-link.active { background-color: var(--accent-blue); color: #fff !important; }

.sidebar-divider { border-top: 1px solid rgba(255, 255, 255, 0.322); margin: 8px 0; }

/* Botão de fechar (X) - só aparece no mobile */
.sidebar-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    display: none;
}

/* ================================
MAIN CONTENT
================================ */
.main-content {
transition: margin-left 0.3s ease;
min-height: 100vh;
}
/* ================================
TOP BAR
================================ */
.top-bar {
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px;
background-color: var(--bg-secondary);
border-bottom: 1px solid rgba(255,255,255,0.1);
}

.menu-toggle, .theme-toggle {
background: none;
border: none;
color: var(--text-primary);
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
}

.menu-toggle { font-size: 24px; }

/* ================================
RESPONSIVIDADE SIDEBAR
================================ */

/* Mobile: Sidebar ocupa tela toda quando aberta */
@media (max-width: 991.98px) {
    .sidebar {
        width: 100vw;
        margin-left: -100vw;
        z-index: 2000;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .sidebar-close {
        display: block;
    }
}

/* Desktop: Sidebar começa aberta, mas pode ser fechada */
@media (min-width: 992px) {
    .sidebar {
        margin-left: 0;
    }
    
    .sidebar.active {
        margin-left: -260px;
    }
    
    .main-content {
        margin-left: 260px;
    }
    
    .main-content.expanded {
        margin-left: 0 !important;
    }
}

/* ================================
LOGIN PAGE
================================ */
body:has(.login-wrapper) .sidebar,
body:has(.login-wrapper) .top-bar { display: none !important; }

body:has(.login-wrapper) .main-content {
margin-left: 0 !important;
width: 100% !important;
}

.login-wrapper {
min-height: 100vh;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.login-card {
width: 100%;
max-width: 420px;
border-radius: 20px;
background: var(--bg-secondary);
color: var(--text-primary);
padding: 40px;
box-shadow: 0 10px 35px rgba(0,0,0,0.2);
position: relative;
z-index: 1;
transition: all 0.3s ease;
}

.login-card:hover { box-shadow: 0 15px 50px rgba(0,0,0,0.25); }

.login-logo-img {
width: 130px;
display: block;
margin: 0 auto 20px;
}

.login-card h3 {
text-align: center;
margin-bottom: 30px;
}

/* ================================
FORM FIELDS
================================ */
.login-card .form-floating {
    position: relative;
    margin-bottom: 1.8rem;
}

.login-card .form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: all 0.25s ease-in-out;
    color: #94a3b8;
    font-weight: 500;
    z-index: 3;
}

.login-card .form-floating > .form-control {
    height: 50;
    padding: 1.4rem 0.75rem 0.6rem;
    background-color: #1a1d29;
    border: 1.8px solid #374151;
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.login-card .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background-color: #1a1d29 !important;
    color: #e2e8f0;
    outline: none;
}

.login-card .form-control:focus ~ label,
.login-card .form-control:not(:placeholder-shown) ~ label {
    transform: translateY(-1.15rem) scale(0.85);
    color: var(--accent-blue);
    font-weight: 600;
    padding: 0 8px;
    border-radius: 4px;
    z-index: 5;
}

.login-card .form-floating > label::after {
    background-color: transparent !important;
}

/* ================================
AUTOFILL CHROME/EDGE
================================ */
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus,
.login-card input:-webkit-autofill:active,
.login-card input:-internal-autofill-selected {
-webkit-box-shadow: 0 0 0 1000px var(--bg-primary) inset !important;
box-shadow: 0 0 0 1000px var(--bg-primary) inset !important;
-webkit-text-fill-color: var(--text-primary) !important;
background-color: var(--bg-primary) !important;
}

.login-card input:-webkit-autofill::first-line {
color: var(--text-primary) !important;
font-family: inherit !important;
font-size: inherit !important;
}

.login-card input::-webkit-credentials-auto-fill-button {
background-color: transparent !important;
margin-right: 10px;
}

/* ================================
ERROS E ALERTAS
================================ */
.login-card .form-control.is-invalid { border-color: #dc3545; }
.login-card .invalid-feedback {
color: #fc8181;
font-size: 13px;
margin-top: 5px;
}

.login-card .alert {
background-color: #ffe5e5;
color: #c53030;
border-radius: 10px;
padding: 10px 15px;
font-weight: 500;
animation: fadeIn 0.3s ease;
}

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

/* ================================
LINKS E BOTÕES
================================ */
.login-forgot-link {
color: var(--accent-blue);
text-decoration: none;
font-size: 0.9rem;
transition: color 0.3s ease;
}

.login-forgot-link:hover { color: var(--accent-blue-hover); text-decoration: underline; }

.login-card .btn-primary {
border-radius: 12px;
font-weight: bold;
background: linear-gradient(90deg, #3b82f6, #2563eb);
transition: all 0.3s ease;
}

.login-card .btn-primary:hover {
background: linear-gradient(90deg, #2563eb, #3b82f6);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ================================
CARDS, TABLES E CHARTS
================================ */
.stats-card, .chart-container, .table-custom {
background: var(--bg-secondary);
border-radius: 12px;
border: 1px solid rgba(255,255,255,0.07);
padding: 20px;
transition: 0.3s;
}

.dashboard-card {
    background: var(--bg-secondary) !important;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    color: var(--text-primary);
}

.stats-card:hover { transform: translateY(-3px); }

.stats-card .value { font-size: 32px; font-weight: bold; margin-top: 5px; }
.stats-card .change { font-size: 14px; color: var(--accent-blue); }

.table-custom tbody tr:hover { background: rgba(255,255,255,0.03); }
.table-custom thead { background: rgba(255,255,255,0.05); }

.badge { font-size: 13px; padding: 6px 10px; border-radius: 6px; }

/* ================================
   FORM FIELDS (GERAL / DASHBOARD)
================================ */
.form-control, 
.form-select {
    background-color: var(--bg-primary) !important;
    border: 1.5px solid #374151;
    color: var(--text-primary) !important;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.form-label {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

/* ================================
   LISTA DE AUTOCOMPLETE
================================ */
.list-group-item {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: rgba(255,255,255,0.05) !important;
    padding: 10px 14px;
    border-radius: 6px !important;
}

.list-group-item:hover {
    background-color: rgba(255,255,255,0.06) !important;
    color: #fff !important;
}

.list-group-item:hover,
.list-group-item:focus {
    background-color: var(--accent-blue) !important;
    color: #fff !important;
}

.list-group-item:first-child {
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
}

#lista-origem, #lista-destino {
    max-height: 250px;
    overflow-y: auto;
    border-radius: .5rem;
    backdrop-filter: blur(6px);
}

/* ================================
   BOTÃO DE PESQUISA
================================ */
.btn-primary {
    background: linear-gradient(90deg, #3b82f6, #2563eb) !important;
    border: none !important;
    padding: 10px 20px; 
    font-weight: 600;
    border-radius: 12px;
    min-width: 120px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ================================
   BOTÃO LIMPAR FILTROS
================================ */
.btn-outline-danger {
    border-radius: 10px;
    color: #ef4444;
    border-color: #ef4444;
}

.btn-outline-danger:hover {
    background-color: #ef4444;
    color: #fff;
}

/* ============================================================
   ESTILIZAÇÃO DA TABELA DE VOOS - GERAL (DESKTOP)
============================================================ */
#resultados-voos {
    border-collapse: collapse !important;
    width: 100% !important;
    border-radius: 8px !important;
    overflow: hidden;
    background-color: var(--bg-secondary) !important;
}

#resultados-voos thead {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

#resultados-voos thead th {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    font-size: 13px;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    border: none !important;
    vertical-align: middle;
    text-transform: none;
}

#resultados-voos tbody tr {
    background-color: #1a1d29 !important; 
    color: var(--text-primary) !important; 
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
}

#resultados-voos tbody tr:nth-child(even) {
    background-color: #22252f !important;
}

#resultados-voos tbody tr:last-child {
    border-bottom: none !important;
}

#resultados-voos tbody td {
    padding: 0.875rem 1rem !important;
    border: none !important; 
    font-size: 14px;
    vertical-align: middle;
    background-color: transparent !important;
    color: inherit; 
}

#resultados-voos tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.15) !important; 
}

#resultados-voos tbody tr:hover td {
    background-color: transparent !important;
}

.badge-direto {
    background-color: var(--accent-blue) !important;
    color: #fff !important;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    display: inline-block;
}

.badge-escalas {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important; 
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
}

#resultados-voos tbody td:nth-child(7) .text-danger.small {
    color: #ef4444 !important; 
    font-weight: 600;
    font-size: 12px;
    background: none !important;
    padding: 0;
    border-radius: 0;
    text-transform: none;
}

.text-accent-blue {
    color: var(--accent-blue) !important;
    font-weight: 700 !important;
}
.text-primary {
    color: var(--text-primary) !important; 
}
.text-secondary {
    color: var(--text-secondary) !important;
}

#resultados-voos tbody tr td.fw-bold.text-primary {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

#resultados-voos tbody td[data-label="Milhas"] {
    line-height: 1; 
}

#resultados-voos tbody tr td:nth-child(8) {
    font-weight: bold !important;
    color: var(--text-primary) !important;
}

#resultados-voos tbody td:nth-child(8) .bi-info-circle {
    display: none !important;
}

#resultados-voos tbody td:nth-child(8) .milhas-group {
    display: inline;
}

#resultados-voos tbody td:nth-child(8) .milhas-valor,
#resultados-voos tbody td:nth-child(8) .milhas-label {
    font-size: 14px; 
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    display: inline;
}

#resultados-voos tbody td:nth-child(8) .milhas-label {
    margin-left: 0.25rem; 
}

/* #resultados-voos tbody td:nth-child(11),
#resultados-voos thead th:nth-child(11) { 
    display: none !important; 
} */

.table {
    background-color: transparent !important;
}

.table > :not(caption) > * > * {
    background-color: transparent !important;
}

/* ============================================================
   RESPONSIVIDADE GERAL (Abaixo de 768px)
============================================================ */
@media (max-width: 768px) {
    .btn-primary { width: 100%; }
    #filtros-wrapper.collapse.show { height: auto !important; overflow: visible !important; }
    .form-control, .form-select { min-height: 44px; font-size: 15px !important; padding: 10px 14px !important; height: auto !important; }
    .btn-primary { min-width: 100% !important; min-height: 48px; padding: 12px !important; font-size: 16px !important; }
    .dashboard-content .row { margin-left: -5px; margin-right: -5px; }
    .dashboard-content [class*="col-"] { padding-left: 5px; padding-right: 5px; }
}
/* ============================================================
   RESPONSIVIDADE DA TABELA DE VOOS (Card View)
============================================================ */
@media (max-width: 991.98px) {

    #resultados-voos thead {
        display: none;
    }

    #resultados-voos,
    #resultados-voos tbody,
    #resultados-voos tr {
        display: block !important;
        width: 100% !important;
    }

    #resultados-voos tbody tr {
        margin-bottom: 1.5rem;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding: 1rem;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(7, auto); /* agora com as novas colunas */
        gap: 0.75rem 1rem;
        background-color: var(--bg-secondary) !important;
        position: relative;
    }

    #resultados-voos tbody td {
        display: flex;
        flex-direction: column;
        padding: 0 !important;
        background-color: transparent !important;
        font-size: 14px;
        line-height: 1.2;
    }

    #resultados-voos tbody td::before {
        content: attr(data-label);
        color: var(--text-secondary);
        font-size: 11px;
        font-weight: 500;
        margin-bottom: 0.1rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* ============================================================
        POSICIONAMENTO DAS COLUNAS NO CARD
    ============================================================ */

    /* 4 ORIGEM — 5 DESTINO */
    #resultados-voos tbody td:nth-child(4) { grid-column: 1 / 2; grid-row: 1; }
    #resultados-voos tbody td:nth-child(5) { grid-column: 2 / 3; grid-row: 1; }

    /* Ícone → entre origem/destino */
    #resultados-voos tbody td:nth-child(4)::after {
        content: "→";
        position: absolute;
        top: 1.6rem;
        left: 35%;
        transform: translateX(-50%);
        font-size: 1.5rem;
        color: var(--text-secondary);
        z-index: 10;
    }

    /* 8 Direto (badge) */
    #resultados-voos tbody td:nth-child(8) {
        position: absolute;
        top: 1rem;
        right: .6rem;
        grid-column: 2;
        grid-row: 1;
        z-index: 20;
    }
    #resultados-voos tbody td:nth-child(8)::before { content: none; }

    /* Linha 2 — Data + Assentos */
    #resultados-voos tbody td:nth-child(1) { grid-column: 1; grid-row: 2; }
    #resultados-voos tbody td:nth-child(2) { grid-column: 2; grid-row: 2; }

    /* Linha 3 — Última Verificação (NOVA) */
    #resultados-voos tbody td:nth-child(3) {
        grid-column: 1 / 3;
        grid-row: 3;
        opacity: .8;
        font-size: 13px;
        margin-top: -.25rem;
    }

    /* Linha 4 — Programa + Empresa Aérea */
    #resultados-voos tbody td:nth-child(6) { grid-column: 1; grid-row: 4; }
    #resultados-voos tbody td:nth-child(7) { grid-column: 2; grid-row: 4; }

    /* Linha 5 — Milhas + Cabine */
    #resultados-voos tbody td:nth-child(9) { grid-column: 1; grid-row: 5; }
    #resultados-voos tbody td:nth-child(10) { grid-column: 2; grid-row: 5; }

    /* Linha 6 — Taxa de Embarque */
    #resultados-voos tbody td:nth-child(11) {
        grid-column: 1 / 3;
        grid-row: 6;
        font-weight: 600;
        font-size: 15px;
    }

    /* Linha 7 — Botão (última coluna) */
    #resultados-voos tbody td:nth-child(12) {
        grid-column: 1 / 3;
        grid-row: 7;
        margin-top: .5rem;
    }
}


@media (max-width: 380px) {
    #resultados-voos tbody td:nth-child(3)::after {
        top: 1.2rem;
        left: 45%;
        transform: translateX(-50%);
        font-size: 1.3rem;
    }

    #resultados-voos tbody td:nth-child(7) {
        top: 0.4rem;
        right: -1rem;
        transform: scale(0.9);
    }

    #resultados-voos tbody td:nth-child(3) > div:first-child,
    #resultados-voos tbody td:nth-child(4) > div:first-child {
        font-size: 1.3rem;
    }
    
    #resultados-voos tbody td:nth-child(8) .d-flex {
        font-size: 1.1rem !important;
    }
    
    #resultados-voos tbody td:nth-child(8) .milhas-label {
        font-size: 0.75rem !important;
    }
}

/* ================================
   MELHORIA DO FILTRO NO MOBILE
================================ */
@media (max-width: 768px) {

    /* Card */
    #filtros-box {
        padding: 1.5rem !important;
        margin-top: .5rem;
    }

    /* Títulos e botões */
    #filtros-box .d-flex.justify-content-between {
        margin-bottom: 1rem !important;
    }

    /* Inputs muito espaçados → corrigido */
    #filtros-box .row.g-3 > div {
        margin-bottom: .75rem !important;
        padding-bottom: 0 !important;
    }

    /* Campo origem/destino */
    #origem-wrapper,
    #destino-wrapper {
        min-height: 44px !important;
        padding: .45rem .65rem !important;
        border-radius: 8px;
        background: rgba(255,255,255,0.05) !important;
    }

    /* Ajusta input interno */
    #origem,
    #destino {
        font-size: 15px !important;
    }

    /* Move o botão inverter para perto dos inputs */
    .btn-inverter-mobile {
        margin-top: -10px;
        margin-bottom: -5px;
    }

    .btn-inverter-mobile button {
        background: rgba(255,255,255,0.08);
        border-radius: 50%;
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #9aa0b8;
        border: none;
    }
}
/* DESKTOP – mantém alinhado verticalmente */
@media (min-width: 768px) {
    .inverter-wrapper {
        display: flex;
        align-items: end;      /* alinha com o input */
        justify-content: center;
        padding-bottom: 1.5rem;
    }
}

/* MOBILE – remove espaços extras */
@media (max-width: 767.98px) {
    .inverter-wrapper {
        margin-top: -10px;        /* aproxima do campo Origem */
        margin-bottom: -10px;     /* aproxima do campo Destino */
        padding: 0 !important;
    }
}



/* ================================
    CARD DE SERVIÇO(Dashboard)
================================ */
/* Wrapper para o link */
.service-card-link {
    color: inherit;
    text-decoration: none;
    /* Ajuste de largura para dispositivos maiores, se necessário */
    max-width: 420px; 
    width: 100%;
}

/* Estilo principal do card de serviço (como o stats-card, mas mais refinado) */
.custom-service-card {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px; /* Aumentado para mais moderno */
    padding: 25px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
}

.custom-service-card:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-blue); /* Borda azul chamativa no hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Estilo do ícone/badge azul */
.service-icon-wrapper {
    background-color: var(--accent-blue); /* Fundo azul do seu tema */
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4); /* Sombra suave azul */
    transition: all 0.3s ease;
}

.custom-service-card:hover .service-icon-wrapper {
    transform: scale(1.05); /* Pequeno zoom no ícone no hover */
}

/* Ajustes de tipografia */
.custom-service-card h5 {
    color: var(--text-primary) !important;
    font-weight: 700;
}

.text-muted-custom {
    color: var(--text-secondary) !important;
    font-size: 14px;
}


/* ================================
   PAGINAÇÃO CUSTOMIZADA
================================ */
.custom-pagination {
    display: flex;
    gap: 6px;
    padding: 0;
}

.custom-pagination .page-item {
    list-style: none;
}

.custom-pagination .page-link {
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--text-secondary);
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
    transition: 0.2s;
}

.custom-pagination .page-link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

.custom-pagination .page-item.active .page-link {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff !important;
    font-weight: 600;
}

.custom-pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Mobile
@media (max-width: 576px) {
    .custom-pagination .page-link {
        padding: 6px 10px;
        font-size: 12px;
    }
} */

/* ============================================================
   RESPONSIVIDADE DA PAGINAÇÃO
============================================================ */
@media (max-width: 767.98px) {
    #pagination-wrapper {
        padding: 0 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #pagination-wrapper .pagination {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        min-width: min-content;
        margin: 0;
    }
    
    #pagination-wrapper .page-item:not(:first-child):not(:last-child) {
        display: none !important;
    }
    #pagination-wrapper .page-item {
        flex-shrink: 0;
    }
    
    #pagination-wrapper .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        min-width: 40px;
        text-align: center;
    }
    
    /* Esconde alguns números no meio quando tem muitas páginas */
    #pagination-wrapper .page-item:not(.active):not(:first-child):not(:last-child):not(:nth-child(2)):not(:nth-last-child(2)) {
        display: none;
    }
    
    /* Mostra reticências quando necessário */
    #pagination-wrapper .page-item.disabled .page-link {
        padding: 0.5rem 0.5rem;
    }
}

@media (max-width: 380px) {
    #pagination-wrapper .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 36px;
    }
    
    /* Em telas muito pequenas, mostra apenas: anterior, atual, próximo */
    #pagination-wrapper .page-item:not(.active):not(:first-child):not(:last-child) {
        display: none;
    }
}

.admin-sidebar {
    background: var(--bg-secondary);
    height: 100%;
    padding: 20px 0;
    border-radius: 12px;
}

.admin-sidebar .nav-link {
    color: var(--text-secondary);
    padding: 12px 20px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
}

.admin-sidebar .nav-link i {
    font-size: 18px;
}

.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link:hover {
    background: var(--accent-blue);
    color: #fff !important;
    border-radius: 8px;
}

/* Botão azul de OK (quando for sucesso) e botão vermelho de confirmação */
.swal-btn-confirm {
    background: #e63946 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 22px !important;
    font-weight: 600 !important;
    min-width: 120px;
    cursor: pointer !important;
    transition: 0.2s ease-in-out;
}

.swal-btn-confirm:hover {
    background: #c92a36 !important;
}

.swal2-actions {
    gap: 12px !important; /* espaçamento universal entre os botões */
}

/* Botão cinza de cancelar */
.swal-btn-cancel {
    background: #334155 !important;
    color: #e5e7eb !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 22px !important;
    font-weight: 500 !important;
    min-width: 120px;
    cursor: pointer !important;
    transition: 0.2s ease-in-out;
}

.swal-btn-cancel:hover {
    background: #475569 !important;
}


/* CAMPOS DESTINO E ORIGEM */
#origem-wrapper,
#destino-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
}
.badge-tag {
    flex-shrink: 0; /* para não encolher */
}

.form-error-space {
    min-height: 18px; /* reserva espaço */
}

.milhas-hover {
    cursor: pointer;
    color: var(--bs-primary);
    position: relative;
    text-decoration: none;
}

.milhas-hover::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background-color: var(--bs-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.milhas-hover:hover::after {
    transform: scaleX(1);
}

/* Ícone sutil */
.milhas-icon {
    font-size: 0.85rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.milhas-hover:hover .milhas-icon {
    opacity: 1;
}