@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #0f172a;
    --ink-light: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-light: #f1f5f9;
    --paper: #ffffff;
    --wash: #f8fafc;
    --surface-alt: #f1f5f9;

    /* Aviation & Accent Colors */
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-light: #eff6ff;
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --teal-light: #f0fdfa;
    --accent: #0284c7;

    /* Semantic Status */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;

    /* Shadows & Radii */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 20px -3px rgba(15, 23, 42, 0.08), 0 4px 8px -4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

body {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(at 100% 0%, rgba(29, 78, 216, 0.05) 0px, transparent 45%),
        radial-gradient(at 0% 0%, rgba(13, 148, 136, 0.05) 0px, transparent 40%),
        #f8fafc;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Topo & Marca
   ========================================================================== */
.topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 12px 0 24px;
    border-bottom: 1px solid var(--line);
}

.marca {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-aplicacao {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.logo-aplicacao:hover {
    transform: scale(1.06);
}

.marca h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(22px, 3.5vw, 30px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.marca p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

/* ==========================================================================
   Navegação
   ========================================================================== */
.navegacao {
    display: flex;
    gap: 6px;
    margin: 18px 0 24px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 6px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: thin;
}

.navegacao a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 130px;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.25;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.navegacao a span {
    display: inline-block;
    text-align: left;
}

.navegacao a svg {
    width: 16px;
    height: 16px;
    opacity: 0.75;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.navegacao a:hover {
    color: var(--ink);
    background: var(--surface-alt);
    text-decoration: none;
}

.navegacao a:hover svg {
    transform: translateY(-1px);
}

.navegacao a.ativo {
    color: var(--primary);
    background: white;
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

.navegacao a.ativo svg {
    opacity: 1;
}

/* ==========================================================================
   KPI Cards / Resumo Operacional
   ========================================================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--paper);
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.kpi-icon svg {
    width: 22px;
    height: 22px;
}

.kpi-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.kpi-icon.teal {
    background: var(--teal-light);
    color: var(--teal);
}

.kpi-icon.warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.kpi-icon.accent {
    background: #f0f9ff;
    color: var(--accent);
}

.kpi-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kpi-rotulo {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
}

.kpi-valor {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin-top: 2px;
    line-height: 1.2;
}

.kpi-sub {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Formulários & Painéis
   ========================================================================== */
form,
.tabela {
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.form-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-light);
}

.form-cabecalho h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-cabecalho h2 svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.preview-rota-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--wash);
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 12px;
}

.preview-rota-container .seta-rota {
    color: var(--primary);
    font-size: 14px;
}

.preview-rota-ponto {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.preview-codigo {
    font-weight: 800;
    color: var(--ink);
    font-size: 13px;
    font-family: monospace;
    letter-spacing: 0.05em;
}

.preview-nome {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 500;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.1;
    margin-top: 1px;
}

.campos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: 12.5px;
    color: var(--ink-light);
}

.label-com-unidade {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.unidade-badge {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--muted);
    text-transform: none;
}

input,
textarea,
select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    color: var(--ink);
    background: var(--wash);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

input[type="file"] {
    padding: 8px;
}

input:hover,
textarea:hover,
select:hover {
    border-color: #cbd5e1;
    background: white;
}

input:focus,
textarea:focus,
select:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea {
    margin-top: 14px;
    resize: vertical;
}

/* Ações do Formulário */
.painel-calculo-voo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    background: var(--wash);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    margin-top: 14px;
}

.item-calculo-voo {
    font-size: 13px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.item-calculo-voo .valor-calculo {
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.alerta-tanque {
    width: 100%;
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid rgba(220, 38, 38, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 6px;
}

.campo-invalido {
    border-color: var(--danger) !important;
    background: #fff5f5 !important;
}

.acoes-form-rodape {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line-light);
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 0;
    border-radius: var(--radius-sm);
    color: white;
    background: var(--primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button svg {
    width: 16px;
    height: 16px;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

button:active {
    transform: translateY(0);
}

button.btn-secundario {
    background: white;
    color: var(--ink-light);
    border: 1.5px solid var(--line);
    box-shadow: var(--shadow-sm);
}

button.btn-secundario:hover {
    background: var(--surface-alt);
    color: var(--ink);
    border-color: #cbd5e1;
    box-shadow: var(--shadow);
}

button.icone {
    margin: 0;
    padding: 6px;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    border-radius: 6px;
    transition: all 0.15s ease;
}

button.icone:hover {
    background: var(--danger-bg);
    color: var(--danger);
    transform: none;
}

a.btn-link-cancelar {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

a.btn-link-cancelar:hover {
    color: var(--ink);
    background: var(--surface-alt);
    text-decoration: none;
}

/* ==========================================================================
   Alertas e Mensagens
   ========================================================================== */
.sucesso,
.erro,
.aviso-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
}

.sucesso {
    color: #065f46;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}

.erro {
    color: #991b1b;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
}

.aviso-info {
    color: #92400e;
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
}

.aviso-info p {
    margin: 3px 0 0;
    font-size: 12.5px;
}

.oculto,
.aviso-info.oculto {
    display: none !important;
}

/* Rodapé */
.rodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 48px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}

.rodape-versao {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid var(--line);
}

/* Menu do usuário no topo */
.usuario-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.usuario-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
}

.usuario-nome {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-light);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-sair,
.form-acao-inline {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

button.btn-sair,
button.btn-ocultar-aeronave {
    padding: 6px 12px;
    font-size: 12.5px;
    background: white;
    color: var(--ink-light);
    border: 1.5px solid var(--line);
    box-shadow: none;
}

button.btn-sair:hover,
button.btn-ocultar-aeronave:hover {
    background: var(--surface-alt);
    color: var(--ink);
    transform: none;
    box-shadow: none;
}

.btn-entrar-topo,
.btn-criar-conta-topo {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-entrar-topo {
    color: var(--ink-light);
    border: 1.5px solid var(--line);
    background: white;
}

.btn-entrar-topo:hover {
    background: var(--surface-alt);
}

.btn-criar-conta-topo {
    color: white;
    background: var(--primary);
}

.btn-criar-conta-topo:hover {
    background: var(--primary-hover);
}

a.btn-alternar-secao-aero {
    text-decoration: none;
}

/* Aviso para visitantes */
.aviso-visitante {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: #92400e;
    font-size: 13.5px;
}

.aviso-visitante svg {
    flex-shrink: 0;
}

.aviso-visitante-link {
    margin-left: auto;
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: #92400e;
    color: white;
    font-weight: 700;
    text-decoration: none;
}

.aviso-visitante-link:hover {
    background: #78350f;
}

/* Abas e visibilidade da lista de aeronaves */
.abas-lista-aeronaves {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.abas-lista-aeronaves a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    color: var(--ink-light);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.abas-lista-aeronaves a:hover {
    background: var(--surface-alt);
}

.abas-lista-aeronaves a.ativo {
    background: var(--primary-light);
    border-color: #bfdbfe;
    color: var(--primary);
}

.contador-aba {
    font-size: 11.5px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
}

.badge-visibilidade {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-visibilidade.publica {
    background: var(--teal-light);
    color: var(--teal-dark);
}

.badge-visibilidade.privada {
    background: var(--warning-bg);
    color: #92400e;
}

/* Páginas de autenticação */
.pagina-auth {
    max-width: 440px;
    display: flex;
    flex-direction: column;
}

.auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding-top: 6vh;
}

.auth-marca {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 800;
    font-size: 17px;
    color: var(--ink);
}

.auth-card {
    padding: 28px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-subtitulo {
    margin: 4px 0 18px;
    color: var(--muted);
    font-size: 13.5px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.auth-form button {
    width: 100%;
    margin-top: 4px;
}

.auth-label-linha {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.auth-label-linha a,
.auth-alternativa a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-label-linha a:hover,
.auth-alternativa a:hover {
    text-decoration: underline;
}

.auth-dica {
    color: var(--muted);
    font-weight: 500;
    font-size: 11.5px;
}

.auth-alternativa {
    margin: 18px 0 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
}

@media (max-width: 640px) {
    .usuario-nome {
        display: none;
    }
}

/* ==========================================================================
   Tabela de Voos e Registros
   ========================================================================== */
.tabela {
    margin-top: 26px;
    overflow: visible;
}

.titulo-tabela {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.titulo-tabela h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.titulo-tabela h2 svg {
    width: 17px;
    height: 17px;
    color: var(--primary);
    flex-shrink: 0;
}

.contador-voos {
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

/* Barra de Ações & Combustível */
.barra-acoes-tabela {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.valores-combustivel {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--wash);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

.campo-valor-combustivel {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.nome-combustivel {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
}

.entrada-combustivel {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.entrada-combustivel input {
    width: 65px;
    padding: 5px 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    background: white;
}

.entrada-combustivel small {
    color: var(--muted);
    font-size: 11px;
}

.valores-combustivel button {
    padding: 5px 12px;
    font-size: 12.5px;
    box-shadow: none;
}

.botoes-toggle-paineis {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.botao-filtro {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-light);
    background: var(--wash);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.botao-filtro:hover,
.botao-filtro[aria-expanded="true"] {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.botao-filtro svg {
    width: 15px;
    height: 15px;
}

a.botao-exportar {
    text-decoration: none;
    color: var(--ink-light);
}

a.botao-exportar:hover {
    background: #ecfdf5;
    color: #047857;
    border-color: #047857;
}

/* Painéis Desdobráveis */
.tabela-rotas {
    margin: 0 0 20px;
    padding: 18px 20px;
    background: var(--wash);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.tabela-rotas h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.tabela-rotas.oculto,
.filtros-voos.oculto {
    display: none;
}

.filtros-voos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
    margin: 0 0 20px;
    padding: 18px;
    background: var(--wash);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
}

.filtros-voos button {
    height: 42px;
}

.limpar-filtros {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.limpar-filtros:hover {
    color: var(--danger);
    background: var(--danger-bg);
    text-decoration: none;
}

/* Tabela Base & Células */
.tabela-container {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: white;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 1.5px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

th a {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

th a:hover {
    color: var(--primary);
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr {
    transition: background-color 0.15s ease;
}

tbody tr:hover {
    background-color: #f1f5f9;
}

.voos table th,
.voos table td {
    text-align: center;
}

.voos table td:first-child,
.voos table th:first-child {
    text-align: left;
}

/* Badges e Tags */
.badge-rota {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f1f5f9;
    color: var(--ink);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12.5px;
    font-weight: 700;
}

.badge-rota svg {
    width: 13px;
    height: 13px;
    color: var(--primary);
}

.rota-coluna-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.sub-rota-nomes {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 500;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-aeronave {
    font-weight: 600;
    color: var(--ink);
}

.consumo-maior {
    color: #b45309;
    font-weight: 700;
    background: #fef3c7;
    padding: 2px 7px;
    border-radius: 4px;
}

.consumo-menor {
    color: #047857;
    font-weight: 700;
    background: #d1fae5;
    padding: 2px 7px;
    border-radius: 4px;
}

.celula-gph {
    white-space: nowrap;
}

.gph-cadastrado {
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 500;
    margin-left: 4px;
    display: inline;
}

.subtitulo-gph {
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.custo-destaque {
    font-weight: 700;
    color: var(--ink);
}

.data-registro {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

/* Célula de Ações */
.acoes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.acoes a.btn-acao-editar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--primary);
    background: var(--primary-light);
    text-decoration: none;
    transition: all 0.15s ease;
}

.acoes a.btn-acao-editar:hover {
    background: var(--primary);
    color: white;
}

.acoes a.btn-acao-editar svg,
.acoes button.btn-acao-excluir svg {
    width: 15px;
    height: 15px;
}

.acoes button.btn-acao-excluir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--danger);
    background: var(--danger-bg);
    border: 0;
    cursor: pointer;
    box-shadow: none;
    margin: 0;
    padding: 0;
    transition: all 0.15s ease;
}

.acoes button.btn-acao-excluir:hover {
    background: var(--danger);
    color: white;
    transform: none;
}

/* ==========================================================================
   Tabela de Aeronaves
   ========================================================================== */
.aeronaves .tabela-container {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: white;
}

.aeronaves table {
    width: 100%;
    min-width: 1100px;
    border-collapse: separate;
    border-spacing: 0;
}

.aeronaves table th,
.aeronaves table td {
    padding: 12px 14px;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.aeronaves table th:first-child,
.aeronaves table td:first-child {
    text-align: center;
    width: 65px;
}

.aeronaves table th:nth-child(2),
.aeronaves table td:nth-child(2) {
    text-align: left;
    min-width: 150px;
    white-space: normal;
}

.aeronaves table th:nth-child(7),
.aeronaves table td:nth-child(7),
.aeronaves table th:nth-child(9),
.aeronaves table td:nth-child(9) {
    text-align: center;
}

.aeronaves tr.linha-clicavel {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.aeronaves tr.linha-clicavel:hover {
    background-color: #f1f5f9;
}

.aeronaves .sub-ano {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 2px;
}

.aeronaves .sub-autonomia-nm {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 1px;
}

.miniatura-aeronave-tabela {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--line);
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-miniatura-foto {
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    border-radius: 4px;
}

.btn-miniatura-foto:hover .miniatura-aeronave-tabela {
    transform: scale(1.08);
    box-shadow: var(--shadow-sm);
}

.sem-foto-tabela {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 32px;
    background: var(--wash);
    border: 1px dashed var(--line);
    border-radius: 4px;
    color: var(--muted);
    font-size: 12px;
}

.seta-ordem {
    font-size: 10px;
    margin-left: 3px;
    display: inline-block;
}

.seta-ordem.inativa {
    color: #94a3b8;
    opacity: 0.5;
}

.seta-ordem.ativa {
    color: var(--primary);
    font-weight: bold;
}


dialog {
    width: min(820px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
    padding: 24px;
    color: var(--ink);
    background: white;
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

dialog h3 {
    margin-top: 0;
    font-size: 18px;
}

dialog p {
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
}

.fechar-dialog {
    background: var(--ink-light);
}

.abrir-foto {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.abrir-foto:hover {
    transform: none;
    background: transparent;
}

.foto-ampliada {
    display: block;
    max-width: min(760px, 80vw);
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.secao {
    margin-top: 28px;
}

.painel-grafico {
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.painel-grafico h2 {
    margin-bottom: 6px;
}

.subtitulo {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.campos-referencia {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.campos-referencia input {
    margin-top: 7px;
}

.campos-referencia.oculto {
    display: none;
}

.botao-linha-corte {
    margin-top: 16px;
}

.filtro-aeronaves {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 8px 14px;
    margin-top: 16px;
    padding: 14px;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.filtro-aeronaves label {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-weight: normal;
}

.filtro-aeronaves input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.filtro-aeronaves.oculto {
    display: none;
}

.grafico-container {
    position: relative;
    height: 520px;
    margin-top: 20px;
}

.grafico-container canvas {
    position: relative;
    z-index: 1;
}

.controles-modelos {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 165px;
    height: 100%;
    pointer-events: none;
}

.controle-modelo {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    width: 160px;
    min-height: 24px;
    margin: 0;
    padding: 2px 5px;
    transform: translateY(-50%);
    color: var(--ink);
    font-size: 13px;
    pointer-events: auto;
}

.controle-modelo input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #e3b341;
}

.controle-modelo span {
    overflow-wrap: anywhere;
}

.vazio {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.legenda-combustivel {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin: 0 2px -10px;
    color: var(--muted);
    font-size: 12px;
}

.legenda-combustivel span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.amostra-cor {
    width: 11px;
    height: 11px;
    display: inline-block;
    border-radius: 3px;
}

.amostra-cor.jet-a {
    background: #e3b341;
}

.amostra-cor.avgas {
    background: var(--teal);
}

/* Calculadora de Autonomia */
.painel-autonomia {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ==========================================================================
   Planejamento de Voo
   ========================================================================== */
.painel-planejamento {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.card-planejamento {
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.grid-planejamento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.grid-planejamento-avancado {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.parametros-avancados {
    margin-top: 18px;
    padding: 14px 18px;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.parametros-avancados summary {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-light);
    cursor: pointer;
    user-select: none;
}


.alerta-planejamento {
    margin-top: 16px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alerta-planejamento.perigo {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alerta-planejamento.atencao {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.kpi-planejamento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    width: 100%;
}

.grafico-perfil-wrapper {
    position: relative;
    height: 380px;
    width: 100%;
    margin-top: 16px;
}

.legenda-perfil {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}

.item-legenda {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.ponto-legenda {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ponto-origem-perfil {
    background: #0284c7;
}

.ponto-subida {
    background: #ef4444;
}

.ponto-cruzeiro {
    background: #0284c7;
}

.ponto-descida {
    background: #f59e0b;
}

.ponto-destino-perfil {
    background: #10b981;
}

.tabela-fases {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.tabela-fases th,
.tabela-fases td {
    padding: 12px 14px;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.tabela-fases th:first-child,
.tabela-fases td:first-child,
.tabela-fases th:nth-child(2),
.tabela-fases td:nth-child(2) {
    text-align: left;
}

.badge-fase {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.badge-fase.subida {
    background: #d1fae5;
    color: #047857;
}

.badge-fase.cruzeiro {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-fase.descida {
    background: #fef3c7;
    color: #b45309;
}

.linha-total-fases td {
    background: var(--wash);
    border-top: 2px solid var(--line);
    font-weight: 700;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */
@media (max-width: 1024px) {
    .campos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 14px 12px 40px;
    }

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

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .campos {
        grid-template-columns: 1fr;
    }

    .titulo-tabela {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .barra-acoes-tabela {
        width: 100%;
    }

    .valores-combustivel {
        width: 100%;
        justify-content: space-between;
    }

    .filtros-voos {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-card {
        padding: 14px;
    }

    .kpi-valor {
        font-size: 19px;
    }
}

/* ==========================================================================
   Ações de Planejamento & Modais de Planos Salvos
   ========================================================================== */
.form-cabecalho-principal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

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

.btn-acao-plano {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--line);
    background: white;
    color: var(--ink-light);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-acao-plano:hover {
    background: var(--surface-alt);
    border-color: #cbd5e1;
    color: var(--ink);
    transform: translateY(-1px);
}

.btn-acao-plano.btn-salvar {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-acao-plano.btn-salvar:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.btn-acao-plano.btn-planos-salvos {
    background: var(--teal-light);
    color: var(--teal-dark);
    border-color: #99f6e4;
}

.btn-acao-plano.btn-planos-salvos:hover {
    background: #ccfbf1;
    border-color: var(--teal);
}

.badge-qtd-planos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--teal);
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.btn-acao-plano.btn-limpar {
    color: var(--muted);
}

.btn-acao-plano.btn-limpar:hover {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

/* Botões de Ação Somente Ícone */
.btn-acao-plano.btn-icone-so {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    position: relative;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.btn-acao-plano.btn-icone-so svg {
    width: 18px;
    height: 18px;
}

.btn-acao-plano.btn-icone-so .badge-qtd-planos {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Origem e Destino em Destaque
   ========================================================================== */
.rota-destaque-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.card-campo-rota {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card-campo-rota:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
    transform: translateY(-1px);
}

.label-rota-destaque {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.label-rota-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-ponto-rota {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.tag-origem {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.tag-destino {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-alt-rota {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface-alt);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.sublabel-rota {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-light);
}

.input-rota-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.icone-input-rota {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    color: var(--muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.card-campo-rota:focus-within .icone-input-rota {
    color: var(--primary);
}

.input-rota-destaque {
    width: 100%;
    padding: 12px 14px 12px 44px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--ink);
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    transition: all 0.2s ease;
    font-family: inherit;
}

.input-rota-destaque:focus {
    background: white;
    border-color: var(--primary);
    outline: none;
}

.input-rota-destaque::placeholder {
    font-size: 16px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: normal;
}

.preview-rota-info {
    min-height: 18px;
    display: flex;
    align-items: center;
}

.preview-aerodromo-nome {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.divisor-rota-seta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 8px;
}

.circulo-seta-rota {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--line);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}

.circulo-seta-rota:hover {
    background: var(--primary-light);
}

.badge-bussola-rota {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #0f172a;
    color: #38bdf8;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: fadeInBussola 0.3s ease;
}

@keyframes fadeInBussola {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

/* ==========================================================================
   Caixa Inferior: Seleção de Aeronave & Comparativo da Frota
   ========================================================================== */
.caixa-aeronave-e-frota {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

/* Coluna da esquerda: Seleção e Parâmetros */
.painel-selecao-aeronave {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-right: 1px solid var(--line);
    padding-right: 20px;
}

.cabecalho-secao-aeronave h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cabecalho-secao-aeronave h3 svg {
    color: var(--primary);
}

.label-campo-aeronave {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label-campo-aeronave span {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-light);
}

.label-campo-aeronave input {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: var(--wash);
    transition: all 0.2s ease;
}

.label-campo-aeronave input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
    outline: none;
}

.card-aeronave-mini-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aero-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aero-mini-header strong {
    font-size: 13px;
    color: var(--ink);
}

.badge-mini-comb {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #475569;
}

.aero-mini-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.mini-spec-item {
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
}

.mini-spec-item strong {
    color: var(--ink);
}

.campos-rota-secundarios {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.campos-rota-secundarios label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campos-rota-secundarios input {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
}

.campos-rota-secundarios input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
    outline: none;
}

/* Coluna da direita: Comparativo da Frota */
.painel-frota-comparativo {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.cabecalho-frota-comparativo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.cabecalho-frota-comparativo h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cabecalho-frota-comparativo h3 svg {
    color: var(--teal);
}

.cabecalho-frota-comparativo p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.badge-frota-qtd {
    font-size: 11px;
    font-weight: 700;
    color: var(--teal-dark);
    background: var(--teal-light);
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Responsividade da nova estrutura */
@media (max-width: 960px) {
    .caixa-aeronave-e-frota {
        grid-template-columns: 1fr;
    }

    .painel-selecao-aeronave {
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding-right: 0;
        padding-bottom: 20px;
    }

    .rota-destaque-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .divisor-rota-seta {
        padding: 6px 0;
    }
}

/* Modais */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.modal-backdrop.oculto {
    display: none !important;
}

.modal-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalEntrada 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card-largo {
    max-width: 780px;
}

@keyframes modalEntrada {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }

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

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--line);
}

.modal-titulo-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-icone {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-icone.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.modal-icone.accent {
    background: var(--teal-light);
    color: var(--teal);
}

.modal-titulo-wrapper h3 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}

.modal-titulo-wrapper p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.btn-fechar-modal {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-fechar-modal:hover {
    color: var(--ink);
    background: var(--surface-alt);
}

.modal-corpo {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.label-modal {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.label-modal span {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-light);
}

.label-modal input {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.label-modal input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.resumo-salvar-plano {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 16px;
}

.resumo-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.resumo-rotulo {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.resumo-valor {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    background: var(--wash);
}

.btn-secundario {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--ink-light);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-secundario:hover {
    background: var(--surface-alt);
    color: var(--ink);
}

.btn-primario {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-primario:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.acoes-registrar-voo {
    display: flex;
    justify-content: flex-end;
}

/* Lista de Planos Salvos */
.lista-planos-salvos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-plano-salvo {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.card-plano-salvo:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.plano-info-principal {
    flex: 1;
    min-width: 0;
}

.plano-topo-linha {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.plano-nome {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.plano-data {
    font-size: 11px;
    color: var(--muted);
}

.plano-detalhes-linha {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-plano-rota {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.badge-plano-aero {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--surface-alt);
    color: var(--ink-light);
    font-size: 12px;
    font-weight: 600;
}

.badge-plano-metric {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.plano-acoes {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-carregar-plano {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: white;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-carregar-plano:hover {
    background: var(--primary-hover);
}

.btn-excluir-plano {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-excluir-plano:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-border);
}

.plano-vazio-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.plano-vazio-msg svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .resumo-salvar-plano {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-plano-salvo {
        flex-direction: column;
        align-items: flex-start;
    }

    .plano-acoes {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ==========================================================================
   Planejamento: Destaque de Rota (Origem ➔ Destino) com Bússola
   ========================================================================== */
.rota-destaque-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.04) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-lg, 16px);
    padding: 20px 24px;
    margin-bottom: 16px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.card-campo-rota {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-rota-destaque {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.label-rota-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tag-ponto-rota {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
}

.tag-origem {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.tag-destino {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-alt-rota {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted, #64748b);
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 8px;
    border-radius: 6px;
}

.sublabel-rota {
    font-size: 12px;
    color: var(--muted, #64748b);
}

.input-rota-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.icone-input-rota {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    color: #94a3b8;
    pointer-events: none;
}

.input-rota-destaque {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--ink, #0f172a);
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius, 10px);
    transition: all 0.2s ease;
}

.input-rota-destaque:focus {
    border-color: var(--primary, #0284c7);
    outline: none;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.preview-rota-info {
    min-height: 20px;
}

.preview-aerodromo-nome {
    font-size: 12px;
    color: var(--muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.divisor-rota-seta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 8px;
}

.circulo-seta-rota {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #0284c7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-bussola-rota {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #0f172a;
    color: #f8fafc;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
    white-space: nowrap;
}

.badge-bussola-rota svg {
    color: #38bdf8;
}

/* ==========================================================================
   Regra Semicircular de Níveis de Voo (Abaixo de Origem e Destino)
   ========================================================================== */
.card-regra-altitudes {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-lg, 16px);
    padding: 18px 22px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.regra-alt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.regra-alt-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--ink, #0f172a);
}

.regra-alt-titulo svg {
    color: var(--primary, #0284c7);
}

.badge-regra-rumo {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--ink, #0f172a);
    font-size: 12px;
    font-weight: 700;
}

.badge-regra-tipo {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.badge-regra-tipo.impar {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.badge-regra-tipo.par {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.regra-alt-desc {
    font-size: 13px;
    color: var(--ink-light, #475569);
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.regra-alt-grupos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.regra-grupo {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius, 10px);
    padding: 8px 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.regra-grupo-titulo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 135px;
    flex-shrink: 0;
}

.dot-regra {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-regra.vfr {
    background: #10b981;
}

.dot-regra.ifr {
    background: #0284c7;
}

.pills-altitudes {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: thin;
}

.pill-alt {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: var(--ink, #0f172a);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.pill-alt:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.pill-alt.ativo {
    background: var(--primary, #0284c7);
    color: #ffffff;
    border-color: var(--primary, #0284c7);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
    font-weight: 800;
}

.pill-alt.acima-teto {
    opacity: 0.55;
    border-style: dashed;
    border-color: #f87171;
    background: #fff5f5;
    color: #b91c1c;
}

.pill-alt.acima-teto:hover {
    opacity: 0.9;
    border-color: #ef4444;
}

.pill-fl {
    font-family: inherit;
    font-size: 11px;
}

.pill-aviso-teto {
    font-size: 9px;
}

/* ==========================================================================
   Caixa Inferior: Aeronave Selecionada e Frota Comparativo
   ========================================================================== */
.caixa-aeronave-e-frota {
    display: grid;
    grid-template-columns: 310px 370px 1fr;
    gap: 20px;
    margin-bottom: 24px;
    align-items: start;
}

.painel-selecao-aeronave {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius, 12px);
    padding: 18px;
}

.cabecalho-secao-aeronave h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink, #0f172a);
    margin: 0;
}

.label-campo-aeronave {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink, #0f172a);
}

.label-campo-aeronave input {
    height: 42px;
    padding: 0 14px;
    font-size: 14px;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius-sm, 8px);
    background: #ffffff;
    font-weight: 600;
}

.card-aeronave-mini-info {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aero-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.badge-mini-comb {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
}

.aero-mini-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 12px;
}

.mini-spec-item {
    display: flex;
    justify-content: space-between;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 4px;
}

.mini-spec-item span {
    color: var(--muted, #64748b);
}

.campos-rota-secundarios {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.campos-rota-secundarios label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
}

.campos-rota-secundarios input {
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm, 8px);
    background: #ffffff;
    font-weight: 700;
}

.parametros-avancados {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
}

.parametros-avancados summary {
    cursor: pointer;
    user-select: none;
}

.summary-bloco-texto {
    display: inline-flex;
    flex-direction: column;
    vertical-align: middle;
}

.summary-titulo-principal {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary, #0284c7);
}

.summary-subtitulo {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted, #64748b);
    margin-top: 1px;
}

.grid-planejamento-avancado {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.grid-planejamento-avancado label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
}

.grid-planejamento-avancado input {
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-weight: 600;
}

/* ==========================================================================
   Painel e Tabela do Comparativo da Frota (Linha a Linha Ordenável)
   ========================================================================== */
.painel-frota-comparativo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius, 12px);
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.cabecalho-frota-comparativo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cabecalho-frota-comparativo h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink, #0f172a);
    margin: 0;
}

.linha-subtitulo-frota {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.linha-subtitulo-frota p {
    font-size: 12px;
    color: var(--muted, #64748b);
    margin: 0;
}

.badge-frota-qtd {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--ink, #0f172a);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.tabela-frota-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 480px;
    overflow-y: auto;
}

.tabela-frota-comparativo {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.tabela-frota-comparativo thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    border-bottom: 2px solid #cbd5e1;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink, #0f172a);
    z-index: 2;
    white-space: nowrap;
}

.col-ordenavel {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.col-ordenavel:hover {
    background: #e2e8f0;
}

.th-conteudo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.seta-ord-frota {
    font-size: 11px;
    color: #94a3b8;
    transition: all 0.15s ease;
}

.seta-ord-frota.ativo {
    color: var(--primary, #0284c7);
    font-weight: 800;
}

.linha-frota-item {
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.linha-frota-item:hover {
    background: #f8fafc;
}

.linha-frota-item.linha-aero-ativa {
    background: rgba(2, 132, 199, 0.08) !important;
    border-left: 3.5px solid var(--primary, #0284c7);
}

.tabela-frota-comparativo td {
    padding: 10px 12px;
    vertical-align: middle;
}

.frota-aero-info-bloco {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.frota-aero-fab {
    font-size: 11px;
    color: var(--muted, #64748b);
    text-transform: uppercase;
}

.frota-aero-mod {
    font-size: 13px;
    color: var(--ink, #0f172a);
}

.frota-valor-destaque {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink, #0f172a);
}

.frota-valor-destaque.tempo {
    color: #0284c7;
}

.frota-valor-destaque.custo {
    color: #059669;
}

.frota-sub-valor {
    display: block;
    font-size: 11px;
    color: var(--muted, #64748b);
}

/* ==========================================================================
   Botões de Ação Somente com Ícone
   ========================================================================== */
.btn-icone-so {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--ink, #0f172a);
    transition: all 0.2s ease;
}

.btn-icone-so:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn-icone-so.btn-salvar:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.btn-icone-so.btn-planos-salvos:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.btn-icone-so.btn-limpar:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.btn-icone-so .badge-qtd-planos {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Responsividade */
@media (max-width: 1280px) {
    .caixa-aeronave-e-frota {
        grid-template-columns: 1fr 1fr;
    }

    .painel-frota-comparativo {
        grid-column: span 2;
    }
}

@media (max-width: 880px) {
    .caixa-aeronave-e-frota {
        grid-template-columns: 1fr;
    }

    .painel-frota-comparativo {
        grid-column: span 1;
    }

    .rota-destaque-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .divisor-rota-seta {
        padding: 10px 0;
    }

    .regra-alt-grupos {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Coluna 2: Combustível, Carga, Autonomia e Peso/Balanceamento
   ========================================================================== */
.painel-autonomia-peso {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius, 12px);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Sliders de Tanque e Passageiros */
.campo-slider-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius-sm, 8px);
    padding: 10px 12px;
}

.alerta-combustivel-coluna {
    margin-top: -4px;
    margin-bottom: 2px;
    padding: 8px 12px;
    font-size: 11.5px;
    line-height: 1.35;
    border-radius: var(--radius-sm, 8px);
}

.slider-header-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-rotulo {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink, #0f172a);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.slider-valor-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary, #0284c7);
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 2px 8px;
    border-radius: 6px;
}

.slider-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0px;
    margin-top: 2px;
}

.input-slider-custom {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #cbd5e1;
    outline: none;
    border: none;
    padding: 0;
    margin: 8px 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.input-slider-custom::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: #cbd5e1;
    border: none;
}

.input-slider-custom::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: #cbd5e1;
    border: none;
}

.input-slider-custom::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary, #0284c7);
    cursor: pointer;
    border: none;
    margin-top: -10px;
    /* Alinha perfeitamente o centro do botão (24px) no eixo da barra (4px): (4 - 24) / 2 = -10px */
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.4);
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.15s ease;
}

.input-slider-custom::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary, #0284c7);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.4);
    transition: transform 0.15s ease, background 0.2s ease;
}

/* Ícone de Combustível no slider de Combustível */
#sliderTanque::-webkit-slider-thumb,
.slider-combustivel::-webkit-slider-thumb {
    background-color: var(--primary, #0284c7);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M19.77 7.23l.01-.01-3.72-3.72L15 4.56l2.11 2.11c-.94.36-1.61 1.26-1.61 2.33 0 1.38 1.12 2.5 2.5 2.5.36 0 .69-.08 1-.22v5.72c0 .55-.45 1-1 1s-1-.45-1-1V14c0-1.1-.9-2-2-2h-1V5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v16h10v-7.5h1.5v5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9c0-.69-.28-1.32-.73-1.77zM12 10H6V5h6v5zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 13px 13px;
}

#sliderTanque::-webkit-slider-thumb:hover,
.slider-combustivel::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background-color: #0369a1;
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.55);
}

#sliderTanque::-moz-range-thumb,
.slider-combustivel::-moz-range-thumb {
    background-color: var(--primary, #0284c7);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M19.77 7.23l.01-.01-3.72-3.72L15 4.56l2.11 2.11c-.94.36-1.61 1.26-1.61 2.33 0 1.38 1.12 2.5 2.5 2.5.36 0 .69-.08 1-.22v5.72c0 .55-.45 1-1 1s-1-.45-1-1V14c0-1.1-.9-2-2-2h-1V5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v16h10v-7.5h1.5v5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9c0-.69-.28-1.32-.73-1.77zM12 10H6V5h6v5zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 13px 13px;
}

#sliderTanque::-moz-range-thumb:hover,
.slider-combustivel::-moz-range-thumb:hover {
    transform: scale(1.15);
    background-color: #0369a1;
}

/* Ícone de Pessoa/Ocupante no slider de Ocupantes */
#sliderPassageiros::-webkit-slider-thumb,
.slider-ocupantes::-webkit-slider-thumb {
    background-color: var(--primary, #0284c7);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 14px 14px;
}

#sliderPassageiros::-webkit-slider-thumb:hover,
.slider-ocupantes::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background-color: #0369a1;
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.55);
}

#sliderPassageiros::-moz-range-thumb,
.slider-ocupantes::-moz-range-thumb {
    background-color: var(--primary, #0284c7);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 14px 14px;
}

#sliderPassageiros::-moz-range-thumb:hover,
.slider-ocupantes::-moz-range-thumb:hover {
    transform: scale(1.15);
    background-color: #0369a1;
}

.slider-escala-limites {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted, #94a3b8);
    font-weight: 500;
}

.info-peso-ocupantes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #475569;
    background: #f8fafc;
    border-radius: 6px;
    padding: 4px 8px;
    margin-top: 4px;
}

/* Cards de Autonomia */
.grid-autonomia-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.card-mini-autonomia {
    background: #ffffff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius-sm, 8px);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-mini-autonomia .mini-rotulo {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted, #64748b);
}

.card-mini-autonomia .mini-valor {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink, #0f172a);
}

.card-mini-autonomia .mini-sub {
    font-size: 10px;
    color: var(--primary, #0284c7);
    font-weight: 600;
}

/* Painel de Pesos Operacionais */
.tabela-pesos-operacionais {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #ffffff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius-sm, 8px);
    padding: 9px 12px;
}

.linha-peso-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--ink, #0f172a);
    padding: 1px 0;
}

.linha-peso-item.destaque-tow {
    font-weight: 700;
    border-top: 1px dashed var(--line, #e2e8f0);
    border-bottom: 1px dashed var(--line, #e2e8f0);
    padding: 4px 0;
    margin: 2px 0;
    background: #fafafa;
}

.linha-peso-item .rotulo-peso {
    color: var(--muted, #475569);
    font-size: 11px;
}

.linha-peso-item .valor-peso {
    font-weight: 700;
    font-size: 12px;
}

.badge-status-mtow {
    font-size: 11px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 6px;
    text-align: center;
    margin-top: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.subtexto-status-mtow {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.9;
}

.badge-status-mtow.ok {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-status-mtow.perigo {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-weight: 800;
}

/* Tabela de Frota - Linha Clicável */
.tabela-frota-comparativo tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.tabela-frota-comparativo tbody tr:hover {
    background: #f1f5f9;
}

.tabela-frota-comparativo tbody tr.linha-aero-ativa {
    background: #e0f2fe;
}

/* ==========================================================================
   Mapa Interativo de Rota de Voo (Leaflet / Opção B)
   ========================================================================== */

/* Botão na ação do topo */
.btn-icone-so.btn-mapa-topo:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* Botão no divisor de rota entre Origem e Destino */
.btn-ver-mapa-rota {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0284c7;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.1);
    white-space: nowrap;
    margin-top: 2px;
}

.btn-ver-mapa-rota:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}

.btn-ver-mapa-rota:active {
    transform: translateY(0);
}

.btn-ver-mapa-rota svg {
    flex-shrink: 0;
}

/* Card de Visualização do Mapa de Rota (Inline) */
.card-mapa-rota {
    position: relative;
    padding: 18px 22px;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    animation: surgirCardMapa 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes surgirCardMapa {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.mapa-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge-mapa-subtitulo {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    margin-left: 6px;
}

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

.btn-fechar-card-mapa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.btn-fechar-card-mapa:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: scale(1.05);
}

.card-mapa-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mapa-info-grupo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mapa-info-badge {
    font-size: 13px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.mapa-info-badge.badge-origem {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.mapa-info-badge.badge-destino {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.mapa-seta-icone {
    color: #94a3b8;
}

.mapa-metrics-grupo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mapa-metric-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
}

.metric-rotulo {
    color: #64748b;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.3px;
}

.metric-valor {
    color: #0f172a;
    font-weight: 700;
}

.btn-mapa-acao {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-mapa-acao:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.card-mapa-corpo {
    position: relative;
    height: 440px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #e2e8f0;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.06);
}

.container-mapa-leaflet-card,
.container-mapa-leaflet {
    width: 100%;
    height: 100%;
    min-height: 440px;
    z-index: 1;
}

/* Aviso de Rota Não Traçada */
.aviso-sem-rota-mapa {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.aviso-sem-rota-conteudo {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 32px;
    text-align: center;
    max-width: 440px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
}

.aviso-sem-rota-conteudo svg {
    color: #0284c7;
    margin-bottom: 12px;
}

.aviso-sem-rota-conteudo h4 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.aviso-sem-rota-conteudo p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* Rodapé do Modal */

.mapa-legenda-rapida {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #475569;
    flex-wrap: wrap;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ponto-legenda {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ponto-legenda.azul {
    background: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);
}

.ponto-legenda.verde {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.ponto-legenda.vermelho {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

.linha-legenda {
    width: 24px;
    height: 3px;
    border-radius: 2px;
}

.linha-legenda.azul {
    background: #0284c7;
}

.linha-legenda.azul-animada {
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: repeating-linear-gradient(90deg,
            #d946ef,
            #d946ef 6px,
            #ffffff 6px,
            #ffffff 11px);
    box-shadow: 0 0 0 1px #cbd5e1;
    background-size: 22px 100%;
    animation: fluxoLegenda 1.2s linear infinite;
}

@keyframes fluxoLegenda {
    from {
        background-position: 22px 0;
    }

    to {
        background-position: 0 0;
    }
}

/* Linha de Base Branca (para os vãos brancos do pontilhado animado) */
.linha-rota-fundo-branco {
    stroke: #ffffff !important;
}

/* Animação da Linha de Rota no Leaflet (SVG stroke-dashoffset) */
.linha-rota-animada {
    stroke: #d946ef !important;
    /* <--- ALTERE AQUI A COR DA LINHA ANIMADA NO CSS */
    stroke-dasharray: 12, 10;
    animation: fluxoLinhaRota 1.2s linear infinite;
}

@keyframes fluxoLinhaRota {
    from {
        stroke-dashoffset: 44;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* Marcador de Aeronave Centralizada na Rota */
.custom-div-icon-aviao {
    background: transparent !important;
    border: none !important;
}

.marcador-aviao-container {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.marcador-aviao-aura {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #d946ef;
    border: 1.5px solid #d946ef !important;
    animation: pulsoAuraAviao 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

@keyframes pulsoAuraAviao {
    0% {
        transform: scale(0.7);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.marcador-aviao-rotator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #ffffff;
    border-radius: 50%;
    border: 2px solid #d946ef;
    box-shadow: 0 2px 8px rgba(217, 70, 239, 0.45);
    transition: transform 0.3s ease;
    z-index: 2;
}

.marcador-aviao-rotator svg {
    fill: #d946ef !important;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

/* Custom Marker Pins no Leaflet */
.pin-aerodromo-mapa {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-aerodromo-mapa:hover {
    transform: scale(1.08);
}

.pin-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #0f172a;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    border: 2px solid #ffffff;
}

.marcador-origem .pin-badge {
    background: #0284c7;
}

.marcador-destino .pin-badge {
    background: #059669;
}

.pin-icone {
    font-size: 12px;
}

.pin-oaci {
    letter-spacing: 0.5px;
}

.pin-tag-tipo {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.85);
    padding: 1px 5px;
    border-radius: 4px;
    margin-top: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pin-ponta {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #ffffff;
    margin-top: -1px;
}

/* Popups customizados no Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.4 !important;
}

.popup-aerodromo {
    min-width: 220px;
}

.popup-topo {
    padding: 10px 14px;
    color: #ffffff;
}

.popup-topo.topo-origem {
    background: linear-gradient(135deg, #0369a1, #0284c7);
}

.popup-topo.topo-destino {
    background: linear-gradient(135deg, #059669, #10b981);
}

.popup-topo.topo-rota {
    background: linear-gradient(135deg, #0f172a, #334155);
}

.popup-tag {
    display: block;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.popup-topo h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}

.popup-corpo {
    padding: 10px 14px;
    background: #ffffff;
    font-size: 11.5px;
    color: #334155;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-corpo p {
    margin: 0;
}

.popup-corpo strong {
    color: #0f172a;
}

/* Rodapé do Card Inline do Mapa */
.card-mapa-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 4px;
    flex-wrap: wrap;
}

.btn-recolher-mapa-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.btn-recolher-mapa-link:hover {
    color: #0284c7;
    background: #f0f9ff;
}

.btn-ver-mapa-rota.ativo,
.btn-mapa-topo.ativo {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3) !important;
}

@media (max-width: 768px) {
    .card-mapa-corpo {
        height: 350px;
    }

    .container-mapa-leaflet-card {
        min-height: 350px;
    }

    .card-mapa-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    

    .mapa-metrics-grupo {
        width: 100%;
        justify-content: space-between;
    }
}

/* ==========================================================================
   Formulário de Cadastro e Edição de Aeronaves (Modernizado & Agrupado)
   ========================================================================== */
.form-aeronave-moderno {
    background: #ffffff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin-bottom: 32px;
}

/* Cabeçalho do Formulário */
.form-cabecalho-aero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.form-cabecalho-principal-aero {
    display: flex;
    align-items: center;
    gap: 14px;
}

.icone-cabecalho-aero {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-cabecalho-principal-aero h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.form-cabecalho-principal-aero p {
    margin: 3px 0 0;
    font-size: 13px;
    color: #64748b;
}

.badge-modo-edicao {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #b45309;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.ponto-status-edicao {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.btn-novo-cadastro-link {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-novo-cadastro-link:hover {
    background: #fef3c7;
    color: #78350f;
    text-decoration: none;
}

.form-cabecalho-acoes-aero {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-wrap: wrap;
}

.btn-alternar-secao-aero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid #bae6fd;
    color: #0284c7;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-alternar-secao-aero:hover {
    background: #f0f9ff;
    border-color: #7dd3fc;
}

/* Grid de Grupos em 2 Colunas */
.grid-grupos-aeronave {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.card-grupo-aero {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-grupo-aero:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

/* Cabeçalho do Card de Grupo */
.grupo-titulo-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.grupo-icone-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.grupo-icone-badge.icone-azul {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.grupo-icone-badge.icone-verde {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.grupo-icone-badge.icone-ciano {
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.grupo-icone-badge.icone-roxo {
    background: #fdf4ff;
    color: #9333ea;
    border: 1px solid #f5d0fe;
}

.grupo-titulo-card h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.grupo-titulo-card span {
    font-size: 11.5px;
    color: #64748b;
    display: block;
    margin-top: 1px;
}

/* Campos em Grid dentro de cada Grupo */
.grupo-campos-grid {
    display: grid;
    gap: 14px;
}

.grupo-campos-grid.grid-2-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.campo-aero-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campo-aero-item.campo-col-span-2 {
    grid-column: span 2;
}

.campo-aero-item>label,
.label-com-unidade label,
.campo-aero-titulo {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 3px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin: 0;
    width: fit-content;
}

.obrigatorio {
    color: #ef4444;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    display: inline-block;
    margin-left: 2px;
    white-space: nowrap;
}

.label-com-unidade {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
}

.unidade-badge {
    font-size: 10px;
    font-weight: 800;
    color: #0284c7;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.campo-aero-item input:not([type="radio"]),
.campo-aero-item select {
    height: 40px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.campo-aero-item input:not([type="radio"])::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.campo-aero-item input:not([type="radio"]):focus,
.campo-aero-item select:focus {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
    outline: none;
}

/* Botão Slide (Segmented Slide Toggle para Combustível e Pressurização) */
.botao-slide-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 999px;
    padding: 3px;
    height: 40px;
    box-sizing: border-box;
    user-select: none;
    transition: all 0.2s ease;
}

.botao-slide-container:hover {
    border-color: #94a3b8;
    background: #eef2f6;
}

.botao-slide-container:has(input:focus-visible) {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.slide-opcao {
    position: relative;
    z-index: 2;
    flex: 1;
    height: 100%;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 6px !important;
    width: auto !important;
    border-radius: 999px;
}

.slide-opcao input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
}

.slide-opcao-texto {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.slide-opcao:hover .slide-opcao-texto {
    color: #1e293b;
}

/* O Botão Deslizante (Glider / Thumb) */
.slide-glider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.15), background 0.2s ease, box-shadow 0.2s ease;
    z-index: 1;
    pointer-events: none;
}

/* Estado Ativo: 1ª Opção (Esquerda) */
.botao-slide-container:has(.slide-opcao:first-of-type input:checked) .slide-glider {
    transform: translateX(0);
}

.botao-slide-container:has(.slide-opcao:first-of-type input:checked) .slide-opcao:first-of-type .slide-opcao-texto {
    color: #0284c7;
    font-weight: 800;
}

/* Estado Ativo: 2ª Opção (Direita) */
.botao-slide-container:has(.slide-opcao:last-of-type input:checked) .slide-glider {
    transform: translateX(100%);
}

.botao-slide-container:has(.slide-opcao:last-of-type input:checked) .slide-opcao:last-of-type .slide-opcao-texto {
    color: #0284c7;
    font-weight: 800;
}

/* Input com Botão de Ação Auxiliar (Auto cálculo) */
.input-com-botao-acao {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-com-botao-acao input {
    flex: 1;
}

.btn-calc-auto {
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0284c7;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-calc-auto:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

/* Bloco de Upload e Preview de Foto */
.card-upload-foto-bloco {
    margin-top: 4px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.foto-preview-box {
    width: 90px;
    height: 64px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.foto-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sem-foto-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
}

.foto-controles-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.foto-rotulo-texto {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
}

.foto-ajuda-texto {
    margin: 0;
    font-size: 11px;
    color: #64748b;
}

.input-foto-oculto {
    display: none !important;
}

.btn-selecionar-foto {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px;
    margin-top: 4px;
    width: fit-content;
    padding: 6px 14px;
    border-radius: 6px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0284c7;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-selecionar-foto:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

.nome-arquivo-selecionado {
    font-size: 10.5px;
    color: #059669;
    font-weight: 600;
    margin-top: 2px;
}

/* Rodapé de Ações do Formulário */
.acoes-form-aeronave-rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.acoes-principais-esquerda {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-salvar-aeronave {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.btn-salvar-aeronave:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

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

.btn-cancelar-edicao-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-cancelar-edicao-link:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
    text-decoration: none;
}

.btn-excluir-aeronave {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-excluir-aeronave:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.25);
}

/* Responsividade do Formulário */
@media (max-width: 1024px) {
    .grid-grupos-aeronave {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .grupo-campos-grid.grid-2-col {
        grid-template-columns: 1fr;
    }

    .campo-aero-item.campo-col-span-2 {
        grid-column: span 1;
    }

    .form-cabecalho-aero {
        flex-direction: column;
        align-items: flex-start;
    }

    .acoes-form-aeronave-rodape {
        flex-direction: column;
        align-items: stretch;
    }

    .acoes-principais-esquerda {
        flex-direction: column;
    }

    .btn-salvar-aeronave,
    .btn-cancelar-edicao-link,
    .btn-excluir-aeronave {
        width: 100%;
        justify-content: center;
    }
}