/* VERSÃO: CSS FIX LAYOUT - v5.12.0 */

/* --- Variáveis de Cor para Modo Claro/Escuro (Aplicação Geral) --- */
:root {
    --bg-color: #f0f2f5;
    --text-color: #333;
    --section-bg: white;
    --header-bg: #004a7f;
    --header-text: white;
    --header-border: #003359;
    --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --input-bg: #fff;
    --input-border: #ccc;
    --timeline-grid: #e9ecef;
    --timeline-lane-sp: #E0F8E8;
    --timeline-lane-non-company: #FFFACD;
    --timeline-lane-cancelled: #FFE4E1;
    --special-row-text: #333;
    --hour-marker-color: #666;
    --toast-bg: #fff3cd;
    --toast-text: #664d03;
    --toast-border: #ffc107;
}

/* --- Estilos para o Modo Escuro (Aplicação Geral) --- */
body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --section-bg: #1e1e1e;
    --header-bg: #1f2937;
    --header-text: #e0e0e0;
    --header-border: #4b5563;
    --box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    --input-bg: #2c2c2e;
    --input-border: #555;
    --timeline-grid: #444;
    --timeline-lane-sp: #1c3a26;
    --timeline-lane-non-company: #4d441c;
    --timeline-lane-cancelled: #4d2b27;
    --special-row-text: #e0e0e0;
    --hour-marker-color: #999;
    --toast-bg: #4d441c;
    --toast-text: #ffeeba;
    --toast-border: #856404;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color); color: var(--text-color);
    margin: 0; padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.header-container { display: flex; justify-content: space-between; align-items: center; }
h1 { color: var(--text-color); }
.controls {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px; margin-bottom: 20px;
}
.control-section {
    background-color: var(--section-bg); padding: 20px;
    border-radius: 8px; box-shadow: var(--box-shadow);
}
.section-summary {
    font-size: 20px; font-weight: bold; color: var(--text-color);
    cursor: pointer; padding-bottom: 10px; list-style: none;
}
.section-summary::-webkit-details-marker { display: none; }
.section-summary::before {
    content: '▶'; margin-right: 10px; font-size: 14px;
    transition: transform 0.2s; display: inline-block;
}
details[open] > .section-summary::before { transform: rotate(90deg); }

.main-buttons { display: flex; gap: 20px; margin-bottom: 20px; align-items: stretch; }
textarea, #edit-modal input, #edit-modal select, #add-flight-modal input, #add-flight-modal select {
    width: 100%;
    background-color: var(--input-bg); color: var(--text-color);
    border: 1px solid var(--input-border); border-radius: 4px; padding: 10px; box-sizing: border-box;
}
textarea { height: 200px; font-family: monospace; font-size: 12px; margin-top: 10px; }
#edit-modal input, #edit-modal select, #add-flight-modal input, #add-flight-modal select { padding: 8px; }

button {
    display: block; padding: 15px; font-size: 16px; font-weight: bold;
    color: white; border: none; border-radius: 5px; cursor: pointer;
    transition: background-color 0.2s; margin-top: 10px;
}
.control-section button {
    width: 100%;
}

#generate-chart-btn { 
    background-color: #28a745; 
    width: 100%;
    margin-top: 0;
}
#generate-chart-btn:hover { background-color: #218838; }
#update-aircraft-btn { background-color: #007bff; }
#update-aircraft-btn:hover { background-color: #0056b3; }

.btn-danger {
    background-color: #dc3545 !important;
}
.btn-danger:hover {
    background-color: #c82333 !important;
}
body.dark-mode .modal-buttons .btn-danger {
    background-color: #a02b37 !important;
    border-color: #a02b37 !important;
}


.instructions { background-color: #e9f5ff; border: 1px solid #b3d7ff; border-radius: 8px; padding: 0 20px 10px 20px; margin: 20px 0; }
body.dark-mode .instructions { background-color: #1f2937; border-color: #4b5563; }
.instructions summary { font-size: 16px; font-weight: bold; color: #004a7f; cursor: pointer; padding: 15px 0; }
body.dark-mode .instructions summary { color: #60a5fa; }
.instructions ul { padding-left: 20px; } .instructions li { margin-bottom: 5px; }
.instructions h3 { border-bottom: 1px solid #b3d7ff; padding-bottom: 5px; margin-top: 20px; }
body.dark-mode .instructions h3 { border-bottom-color: #4b5563; }

#aircraft-checkbox-container { height: 200px; border: 1px solid var(--input-border); border-radius: 4px; padding: 10px; overflow-y: auto; background-color: var(--input-bg); margin-top: 10px; }
        
/* --- ESTILO FIXO E ESCURO DO PAINEL DE CONTROLO --- */
.control-panel-wrapper {
    display: flex; justify-content: center; margin-bottom: 20px;
}
.control-panel {
    background: #23272b;
    border: 4px solid #444;
    border-radius: 18px;
    box-shadow: 0 8px 24px #000a, 0 0 0 8px #111 inset;
    position: relative;
    padding: 40px 30px 30px 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}
.control-panel::before, .control-panel::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background: radial-gradient(circle at 60% 60%, #aaa 60%, #444 100%);
    border-radius: 50%;
    border: 2px solid #222;
    z-index: 2;
}
.control-panel::before { top: -12px; left: -12px; box-shadow: 0 0 4px #0008; }
.control-panel::after { top: -12px; right: -12px; box-shadow: 0 0 4px #0008; }
.control-panel .panel-group:last-child::after {
    content: ''; position: absolute; width: 18px; height: 18px;
    background: radial-gradient(circle at 60% 60%, #aaa 60%, #444 100%);
    border-radius: 50%; border: 2px solid #222;
    bottom: -12px; right: -12px; box-shadow: 0 0 4px #0008; z-index: 2;
}
.control-panel .panel-group:first-child::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    background: radial-gradient(circle at 60% 60%, #aaa 60%, #444 100%);
    border-radius: 50%; border: 2px solid #222;
    bottom: -12px; left: -12px; box-shadow: 0 0 4px #0008; z-index: 2;
}
.panel-group {
    display: flex; flex-direction: column; align-items: center; gap: 15px;
}
.panel-group h3 {
    margin: 0; color: #e0e0e0; font-size: 16px;
    text-align: center; letter-spacing: 2px; text-shadow: 0 1px 2px #000;
}
.panel-controls {
    display: flex; gap: 15px; justify-content: center; flex-wrap: wrap;
    align-items: center;
}
.airbus-btn {
    width: 85px; height: 85px; background: #181c1f;
    border: 3px solid #222; border-radius: 10px;
    box-shadow: 0 2px 8px #000, 0 0 0 4px #111 inset;
    display: flex; flex-direction: column; justify-content: center;
    align-items: center; font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
    position: relative; cursor: pointer; user-select: none; transition: box-shadow 0.1s;
}
.airbus-btn:active {
    box-shadow: 0 1px 4px #000, 0 0 0 2px #111 inset; top: 2px;
}
.airbus-btn .label {
    color: #fff; font-size: 16px; font-weight: bold;
    letter-spacing: 1px; margin-bottom: 8px; text-shadow: 0 1px 2px #000;
    text-align: center;
}
.airbus-btn .label.small-text { font-size: 14px; }
.airbus-btn .status {
    border-radius: 4px; padding: 4px 18px; font-size: 16px;
    font-weight: bold; transition: all 0.2s;
}

/* Estilo padrão para ON */
.airbus-btn .status.on {
    color: #fff; background: #001a33; border: 2px solid #00d0ff;
    text-shadow: 0 0 8px #00d0ff, 0 1px 2px #000; box-shadow: 0 0 12px #00d0ff;
}

/* Estilo padrão para OFF */
.airbus-btn .status.off {
    color: #888; background: #181c1f; border: 2px solid #444;
    text-shadow: none; box-shadow: none;
}

.airbus-btn .status.info, .airbus-btn .status.action {
    font-size: 14px; border: none; padding: 0; background: transparent;
    box-shadow: none; color: #ffc107;
}
.airbus-btn .status.action { color: #00bfff; }

/* NOVO: Estilos específicos para o botão Master Sound */
#master-sound-toggle {
    background: #4d1818; /* Fundo avermelhado escuro para destaque */
    border-color: #7d2a2a;
}
#master-sound-toggle .status.on {
    background: #0b2e1c;
    border-color: #00ff7f;
    text-shadow: 0 0 8px #00ff7f, 0 1px 2px #000;
    box-shadow: 0 0 12px #00ff7f;
}
#master-sound-toggle .status.off {
    color: #fff;
    background: #4d1818;
    border-color: #ff4c4c;
    text-shadow: 0 0 8px #ff4c4c;
    box-shadow: 0 0 12px #ff4c4c;
}


/* --- ESTILOS PARA O SWITCH DE 30 MINUTOS (COM GIF/ICONE) --- */
.vertical-switch {
    width: 35px;
    height: 70px;
    position: relative;
    cursor: pointer;
    transform: rotate(180deg);
}

.vertical-switch label {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.vertical-switch input {
    display: none;
}

.vertical-switch .indicator-gif, .vertical-switch .indicator-icon {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 35px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.vertical-switch .indicator-gif img {
    width: 100%;
    height: 100%;
    transform: rotate(180deg);
}

.vertical-switch .switch-track {
    width: 100%;
    height: 100%;
    background: linear-gradient(#555, #333);
    border-radius: 20px;
    box-shadow: inset 0 2px 4px 1px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
}

.vertical-switch .switch-thumb {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 31px;
    width: 31px;
    background: linear-gradient(#f3f2f2, #e4e3e3);
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 5px rgba(0,0,0,0.4), 0 8px 8px rgba(0,0,0,0.5);
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vertical-switch .fa-clock-o {
    font-size: 20px;
    color: #555;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5);
    transition: all 0.4s ease;
    transform: rotate(180deg);
}

/* --- ESTADO LIGADO (CHECKED) --- */
.vertical-switch input:checked + label .switch-thumb {
    top: calc(100% - 33px);
}

.vertical-switch input:checked + label .fa-clock-o {
    color: #007bff;
}

.vertical-switch input:checked + label .indicator-gif {
    opacity: 1;
    filter: drop-shadow(0 0 5px red) drop-shadow(0 0 10px red);
}


/* =================================================================== */
/* ==       ESTILOS PARA OS ALERTAS (SIGMET & TAF) - CORRIGIDO      == */
/* =================================================================== */

#sigmet-alert-badge, #taf-alert-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #23272b;
    display: none;
}

#sigmet-alert-badge {
    background-color: #dc3545;
    color: white;
}

#taf-alert-badge {
    background-color: #ffc107;
    color: #333;
}

@keyframes pulse-badge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

@keyframes pulse-yellow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

#show-sigmet-alerts-btn.has-alerts {
    animation: pulse-badge 2s infinite;
}

#show-taf-alerts-btn.has-alerts {
    animation: pulse-yellow 2s infinite;
}


#chart-wrapper { overflow-x: auto; border: 1px solid var(--input-border); margin-top: 20px; background-color: var(--section-bg); }
#gantt-chart { display: grid; }
.gantt-header-row, .gantt-body-row { display: contents; }
        
.header-corner, .day-header, .aircraft-label { position: sticky; }
.header-corner, .day-header { top: 0; z-index: 25; background-color: #f8f9fa; }
body.dark-mode .header-corner, body.dark-mode .day-header { background-color: #1e1e1e; }
.aircraft-label, .header-corner { left: 0; z-index: 20; }
.header-corner { grid-column: 1; z-index: 30; background-color: var(--header-bg); color: var(--header-text); font-weight: bold; border-right: 1px solid var(--header-border); border-bottom: 2px solid var(--header-border); padding: 15px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.day-header { text-align: center; padding-bottom: 5px; border-right: 1px solid var(--input-border); border-bottom: 2px solid var(--header-border); }
.hour-ruler { position: relative; height: 15px; }
.hour-marker { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--hour-marker-color); }
.aircraft-label { grid-column: 1; color: var(--header-text); background-color: var(--header-bg); padding: 15px; font-weight: bold; text-align: center; border-right: 1px solid var(--header-border); border-bottom: 1px solid var(--input-border); display: flex; flex-direction: column; justify-content: center; cursor: pointer; }
.operator-name, .aircraft-details {
    font-size: 11px;
    font-weight: normal;
    opacity: 0.9;
    margin-top: 4px;
}
        
.timeline-lane { 
    position: relative; 
    height: 85px; 
    border-right: 1px solid var(--input-border); 
    border-bottom: 1px solid var(--input-border); 
    background-image: linear-gradient(to right, var(--timeline-grid) 1px, transparent 1px); 
    background-size: 4.1666% 100%; 
}
        
.aircraft-label.non-company-row, .timeline-lane.non-company-row { background-color: var(--timeline-lane-non-company); }
.aircraft-label.sp-row, .timeline-lane.sp-row { background-color: var(--timeline-lane-sp); }
.aircraft-label.cancelled-row, .timeline-lane.cancelled-row { background-color: var(--timeline-lane-cancelled); }
.aircraft-label.non-company-row, .aircraft-label.sp-row, .aircraft-label.cancelled-row { color: var(--special-row-text); }

.flight-bar-wrapper {
    position: absolute;
    height: 38px;
    display: flex;
    align-items: center;
    z-index: 10;
}

.flight-bar {
    height: 100%;
    width: 100%;
    border-radius: 4px; 
    display: flex; 
    flex-direction: column;
    justify-content: center;
    padding: 0 8px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    overflow: hidden; 
    transition: transform 0.1s ease-in-out, background-color 0.3s;
    box-sizing: border-box; 
    cursor: pointer;
}
.flight-bar:hover { 
    transform: scale(1.02);
    z-index: 11;
}
        
.flight-bar-s4 { background-color: #03ab79; color: white; border: 1px solid #028a62; }
.flight-bar-sp { background-color: #dbaa09; color: white; border: 1px solid #b08b07; }
.flight-bar-other { background-color: #ff30cf; color: white; border: 1px solid #bd0892; }

.maintenance-bar {
    background-color: #808080;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 40px 40px;
    color: white;
    border: 1px solid #555;
    justify-content: center;
}
        
.flight-bar.has-ofp { background-color: #3b82f6; border-color: #1e40af; }
        
.flight-bar.new-flight { border: 3px solid #28a745; }
.flight-bar.rescheduled { border: 3px solid red; }
.flight-bar.modified { border: 3px solid #fd7e14; }
.flight-bar.diverted { border: 3px dashed #8a2be2; }

.flight-bar-line1, .flight-bar-line2 {
    width: 100%;
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;
}
.flight-bar-line1 {
    justify-content: flex-start;
}
.flight-bar-line2 {
    justify-content: space-between;
    font-weight: normal;
    font-style: italic;
    opacity: 0.9;
}

.flight-extras-left, .flight-extras-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.flight-alternates {
    font-weight: normal;
    font-size: 10px;
}
.holding-icon {
    width: 24px;
    height: 12px;
    fill: none;
    stroke: red;
    stroke-width: 8;
}

.takeoff-alt-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}
.takeoff-alt-icon {
    width: 20px;
    height: 20px;
    fill: #fd7e14; /* Laranja */
    transform: rotate(-30deg);
}
.takeoff-alt-indicator span {
    font-size: 10px;
    font-weight: normal;
}

.time-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: bold;
    color: var(--text-color);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform-origin: center;
    pointer-events: none;
}
.etd-label {
    left: -12px;
}
.eta-label {
    right: -12px;
}
        
.progress-bar-container { 
    position: absolute; 
    height: 8px; 
    background-color: #ccc; 
    border-radius: 4px; 
    z-index: 9;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}
.progress-bar-fill { height: 100%; background-color: #001f3f; border-radius: 4px; }

body.dark-mode .progress-bar-fill { background-color: #ecf0f1; }
        
.etops-bar { 
    position: absolute; 
    height: 8px; 
    background-color: #ffc107; 
    border-radius: 4px; 
    z-index: 9;
}

.etops-etp-marker { position: absolute; height: 100%; width: 2px; background-color: red; top: 0; z-index: 14; }
.slot-indicator { position: absolute; font-size: 11px; background-color: #ffc107; color: #333; padding: 2px 6px; border-radius: 8px; display: flex; align-items: center; gap: 4px; font-weight: bold; z-index: 15; cursor: help; }
.slot-indicator svg { width: 12px; height: 12px; }
.atc-plan-indicator { position: absolute; font-size: 12px; color: #007bff; z-index: 15; cursor: help; transform: translateX(-50%); }
.time-indicator { position: absolute; top: 0; height: 100%; width: 2px; background-color: red; z-index: 18; }
        
@keyframes pulse-red { 0% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.5), 2px 2px 5px rgba(0,0,0,0.2); } 50% { box-shadow: 0 0 15px rgba(255, 0, 0, 1), 2px 2px 5px rgba(0,0,0,0.2); } 100% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.5), 2px 2px 5px rgba(0,0,0,0.2); } }
.flight-bar.alerting { animation: pulse-red 2s infinite; }

/* Estilo base do avião (Azul normal) */
.atc-plan-indicator { 
    position: absolute; 
    width: 16px; 
    height: 16px; 
    color: #007bff; /* Azul */
    z-index: 15; 
    cursor: help; 
    transform: translateX(-50%); 
    transition: color 0.3s;
}

/* Animação de Halo Vermelho */
@keyframes pulse-red-halo {
    0% { 
        filter: drop-shadow(0 0 0 rgba(255, 0, 0, 0.7)); 
        transform: translateX(-50%) scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 8px rgba(255, 0, 0, 1)); 
        transform: translateX(-50%) scale(1.3);
    }
    100% { 
        filter: drop-shadow(0 0 0 rgba(255, 0, 0, 0.7)); 
        transform: translateX(-50%) scale(1);
    }
}

/* Quando está em alerta (Vermelho + Halo) */
.atc-plan-indicator.alerting { 
    color: #ff0000 !important; /* Força o vermelho no SVG */
    animation: pulse-red-halo 1.5s infinite ease-in-out;
}

/* --- NOVA ANIMAÇÃO PARA O ALERTA VISUAL DOS BOTÕES --- */
@keyframes pulse-warning {
    0% { box-shadow: 0 2px 8px #000, 0 0 0 4px #111 inset; }
    50% { box-shadow: 0 2px 8px #000, 0 0 0 4px #d4a20b inset, 0 0 15px #d4a20b; }
    100% { box-shadow: 0 2px 8px #000, 0 0 0 4px #111 inset; }
}
.blinking-warning {
    animation: pulse-warning 1.5s infinite;
}


#toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.toast { background-color: var(--toast-bg); color: var(--toast-text); border: 1px solid var(--toast-border); padding: 15px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); opacity: 0; transform: translateX(100%); transition: all 0.5s ease-in-out; font-weight: bold; }
.toast.show { opacity: 1; transform: translateX(0); }

.toast.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}
body.dark-mode .toast.error {
    background-color: #4d2b27;
    color: #f8d7da;
    border-color: #721c24;
}
        
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 100; }
#edit-modal, #add-flight-modal, #hil-modal, #svc-modal, #ops-modal, #fuel-modal, #docs-modal {
    background: var(--section-bg);
}
#edit-modal, #add-flight-modal, #svc-modal, #ops-modal, #fuel-modal, #docs-modal, #fuel-text-modal, #acars-modal { 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    padding: 25px; 
    border-radius: 8px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    width: 600px; 
    max-height: 90vh; 
    overflow-y: auto; 
}
.modal-section-header { font-size: 14px; font-weight: bold; color: #007bff; margin-top: 20px; padding-bottom: 5px; border-bottom: 1px solid var(--input-border); }
#edit-modal h3, #add-flight-modal h3, #svc-modal h3, #ops-modal h3, #fuel-modal h3, #docs-modal h3, #fuel-text-modal h3, #acars-modal h3 { margin-top: 0; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.modal-grid-three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
.modal-grid-four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.modal-grid-five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.etops-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
#edit-modal label, #add-flight-modal label { display: block; margin-top: 10px; margin-bottom: 5px; font-weight: bold; font-size: 13px; }

.ofp-button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
    gap: 10px;
}
.right-button-group {
    display: flex;
    gap: 8px; 
    align-items: center;
    margin-left: auto;
}
/* CORREÇÃO DO LAYOUT DOS BOTÕES - MAIS COMPACTOS */
.ofp-button-container button {
    padding: 8px 10px; /* Reduzi o padding */
    font-size: 12px;   /* Reduzi a fonte */
    margin-top: 0;
    width: auto;
    flex-shrink: 0;
}

#ofp-rejection-alert {
    background-color: #dc3545;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.modal-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-buttons button { width: auto; padding: 10px 20px; margin-top: 0; }
.modal-buttons button[type="submit"] { background-color: #28a745; }
.modal-buttons button[type="button"] { background-color: #6c757d; }
.right-button-group button[type="submit"] { background-color: #28a745; }
.right-button-group button[type="button"] { background-color: #6c757d; }
.right-button-group .btn-view-route { background-color: #17a2b8; }

#parse-ofp-btn { background-color: #ffc107; color: #333; }
.btn-dark-blue { background-color: #004a7f; }
.btn-dark-blue:hover { background-color: #003359; }

#ofp-results { margin-top: 10px; font-size: 12px; background-color: var(--input-bg); border: 1px solid var(--input-border); padding: 10px; border-radius: 4px; }
#ofp-results p { margin: 4px 0; }
#ofp-results .label { font-weight: bold; }
#ofp-results .success { color: #155724; }
body.dark-mode #ofp-results .success { color: #28a745; }
#ofp-results .error { color: #721c24; }
body.dark-mode #ofp-results .error { color: #dc3545; }
#ofp-results .warning { color: #856404; background-color: #fff3cd; border-color: #ffeeba; padding: .75rem 1.25rem; border: 1px solid transparent; border-radius: .25rem; }
body.dark-mode #ofp-results .warning { color: #ffc107; background-color: #332701; }

#svc-modal, #ops-modal {
    width: 900px;
}
#svc-content, #ops-content, #docs-content, #fuel-text-content, #acars-content {
    height: 60vh;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    white-space: pre;
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
}
#fuel-content { height: 250px; font-size: 16px; }
#docs-content { height: 200px; font-size: 16px; white-space: pre-wrap; }
#fuel-text-content { height: 350px; }


.fuel-form-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
}
.fuel-form-grid label {
    font-weight: bold;
    text-align: right;
}

body.dark-mode #svc-modal, body.dark-mode #ops-modal, body.dark-mode #fuel-modal, body.dark-mode #docs-modal, body.dark-mode #fuel-text-modal, body.dark-mode #acars-modal {
    background-color: #23272b;
    border: 2px solid #444;
}
body.dark-mode #svc-modal h3, body.dark-mode #ops-modal h3, body.dark-mode #fuel-modal h3, body.dark-mode #docs-modal h3, body.dark-mode #fuel-text-modal h3, body.dark-mode #acars-modal h3 {
    color: #e0e0e0;
}

body.dark-mode #edit-modal, body.dark-mode #add-flight-modal {
    background-color: #23272b;
    border: 2px solid #444;
    box-shadow: 0 8px 24px #000a, 0 0 0 4px #111 inset;
}
body.dark-mode #edit-modal h3, body.dark-mode #add-flight-modal h3 {
    color: #e0e0e0;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px #000;
}
body.dark-mode .modal-section-header {
    color: #00d0ff;
    border-bottom: 1px solid #444;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}
body.dark-mode #edit-modal label, body.dark-mode #add-flight-modal label {
    color: #aaa;
    font-weight: normal;
    font-size: 14px;
}
body.dark-mode textarea, 
body.dark-mode #edit-modal input, 
body.dark-mode #edit-modal select, 
body.dark-mode #add-flight-modal input, 
body.dark-mode #add-flight-modal select {
    background-color: #181c1f;
    border: 2px solid #444;
    color: #e0e0e0;
    border-radius: 4px;
}
body.dark-mode .modal-buttons button {
    font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
    text-transform: uppercase;
    border-radius: 5px;
    border: 2px solid #222;
    box-shadow: 0 1px 4px #000, 0 0 0 2px #111 inset;
}
body.dark-mode .modal-buttons button[type="submit"] {
    background-color: #004d00;
    color: #00d0ff;
    border-color: #00d0ff;
}
body.dark-mode .modal-buttons button[type="button"] {
    background-color: #333;
    color: #aaa;
    border-color: #555;
}
body.dark-mode #parse-ofp-btn {
    background-color: #b8860b;
    color: #fff;
}
body.dark-mode .btn-dark-blue { background-color: #005f8b; }
body.dark-mode .btn-dark-blue:hover { background-color: #004a7f; }

#hil-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 95vw; height: 90vh;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex; flex-direction: column; box-sizing: border-box;
    color: black;
}
#hil-content-to-print { flex-grow: 1; overflow-y: auto; }
.hil-report-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.hil-report-table .header-row td { border: none; border-bottom: 2px solid black; padding-bottom: 10px; vertical-align: middle; }
.hil-logo {
    background-image: url('./logo_companhia.png');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    min-height: 80px;
}
.hil-title-block { text-align: center; }
.hil-title-block h3, .hil-title-block h4, .hil-title-block p { margin: 2px 0; }
.hil-info-block { text-align: right; }
.hil-info-block p { margin: 5px 0; font-size: 16px; }
.hil-info-block .reg { font-size: 24px; font-weight: bold; }
.hil-report-table th, .hil-report-table td { border: 1px solid black; padding: 4px; text-align: center; vertical-align: top; word-wrap: break-word; }
.hil-report-table th { background-color: #f2f2f2; font-weight: bold; }
.hil-report-table .col-1 { width: 6%; } .hil-report-table .col-2 { width: 6%; } .hil-report-table .col-3 { width: 7%; } .hil-report-table .col-4 { width: 5%; } .hil-report-table .col-5 { width: 7%; } .hil-report-table .col-6 { width: 5%; } .hil-report-table .col-7 { width: 10%; } .hil-report-table .col-8 { width: 22%; } .hil-report-table .col-9 { width: 3%; } .hil-report-table .col-10 { width: 3%; } .hil-report-table .col-11 { width: 3%; } .hil-report-table .col-12 { width: 23%; }
.hil-report-footer { border-top: 2px solid black; padding-top: 10px; font-size: 10pt; }
.hil-report-footer .nota { font-weight: bold; }
.hil-report-footer .page-info { display: flex; justify-content: space-between; margin-top: 10px; }
.modal-print-controls { padding-bottom: 10px; text-align: right; }
.modal-print-controls button {
    color: white; border: none; padding: 8px 15px;
    border-radius: 4px; cursor: pointer; margin-left: 10px; margin-top: 0;
    width: auto; font-size: 14px; font-weight: bold;
}
.modal-print-controls button#print-hil-btn {
    background-color: #6c757d;
}
.modal-print-controls button#print-hil-btn:hover {
    background-color: #5a6268;
}


#custom-tooltip {
    position: fixed;
    display: none;
    padding: 12px;
    background: #23272b;
    color: #e0e0e0;
    border: 2px solid #444;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    z-index: 10001;
    pointer-events: none;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    max-width: 300px;
}
#custom-tooltip strong {
    color: #00d0ff;
    font-weight: bold;
}
#custom-tooltip .ofp-header {
    border-top: 1px dashed #555;
    margin-top: 8px;
    padding-top: 8px;
}
#custom-tooltip .cfp-ref {
    color: #ffc107;
    font-weight: bold;
}


@media print {
    @page { size: A4 landscape; margin: 1cm; }
    body, body.dark-mode { background-color: white; color: black; }
    body { counter-reset: page; }
    body > *:not(#hil-modal-overlay), .modal-print-controls { display: none; }
    #hil-modal-overlay { visibility: visible !important; background: none; position: static; }
    #hil-modal {
        color: black;
        box-shadow: none; border: none; width: 100%; height: auto;
        position: static; transform: none; padding: 0; max-height: none;
    }
    #hil-content-to-print { overflow-y: visible; }
    .hil-report-table thead { display: table-header-group; }
    .hil-report-table tfoot { display: table-footer-group; }
    .hil-report-table tbody tr { page-break-inside: avoid; }
    #hil-page-number::after { content: "Página " counter(page); }
}
/* --- ESTILOS PARA OS MODAIS DE MAPA (ÚNICO E GLOBAL) --- */
#map-modal, #traffic-map-modal {
    background: var(--section-bg);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 80vw;
    height: 85vh;
    display: flex;
    flex-direction: column;
    z-index: 101;
}

#map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--input-border);
    margin-bottom: 15px;
}

#map-modal-header h3 {
    margin: 0;
    color: var(--text-color);
}

.map-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-actions button {
    padding: 8px 15px;
    margin: 0;
    background-color: #6c757d;
}

.map-control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    padding: 0;
    line-height: 36px;
    text-align: center;
}

#map, #traffic-map {
    flex-grow: 1;
    border-radius: 8px;
    width: 100%;
    height: 100%;
}

/* --- ESTILO PARA A IDENTIFICAÇÃO DO VOO NO MAPA --- */
.flight-label-tooltip {
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: none;
    font-size: 12px;
}

/* =================================================================== */
/* ==       ESTILOS PARA O CONTROLO DE CAMADAS DO MAPA (LEAFLET)    == */
/* =================================================================== */

.leaflet-control-layers {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    border-radius: 5px;
    padding: 6px 10px;
    color: #333;
    line-height: 1.6;
}

.leaflet-control-layers-toggle {
    background-image: url('https://unpkg.com/leaflet@1.9.4/dist/images/layers.png');
    background-size: 26px 26px;
    width: 36px;
    height: 36px;
    border: 1px solid #ccc;
}

.leaflet-control-layers-overlays .weather-timestamp {
    color: #007bff;
    font-weight: bold;
    margin-left: 5px;
}

body.dark-mode .leaflet-control-layers {
    background: rgba(44, 44, 46, 0.9);
    color: #e0e0e0;
    border: 1px solid #555;
}

body.dark-mode .leaflet-control-layers-toggle {
    border-color: #555;
}

body.dark-mode .leaflet-control-layers-overlays .weather-timestamp {
    color: #60a5fa;
}

/* =================================================================== */
/* ==       ESTILOS PARA CONTROLOS DE METEOROLOGIA NO MAPA          == */
/* =================================================================== */

.weather-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 20px;
}

.weather-controls label {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.weather-controls input[type="range"] {
    cursor: pointer;
}

.weather-layer-contrast {
    filter: contrast(130%) brightness(110%);
}

/* =================================================================== */
/* ==       ESTILO PERSONALIZADO PARA O POPUP DOS SIGMETS           == */
/* =================================================================== */

.sigmet-popup .leaflet-popup-content-wrapper {
    background: #f8f9fa; /* Um fundo quase branco */
    color: #212529; /* Texto escuro para legibilidade */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sigmet-popup .leaflet-popup-content {
    margin: 15px;
    font-size: 13px;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap; /* Garante a quebra de linha do texto */
    word-break: break-word; /* Força a quebra de palavras longas */
    max-width: 650px !important; /* Aumenta a largura máxima */
    max-height: 400px; /* Adiciona uma altura máxima com scroll */
    overflow-y: auto; /* Adiciona scroll se o texto for muito longo */
}

/* Ajuste para o modo escuro */
body.dark-mode .sigmet-popup .leaflet-popup-content-wrapper {
    background: #2c2c2e;
    color: #e0e0e0;
}

/* =================================================================== */
/* ==       ESTILOS PARA OS ALERTAS DE SIGMET                       == */
/* =================================================================== */

#sigmet-alerts-modal, #taf-alerts-modal {
    background: var(--section-bg);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

#sigmet-alerts-content .alert-item, #taf-alerts-content .alert-item {
    border: 1px solid var(--input-border);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: var(--input-bg);
}

#sigmet-alerts-content h4 {
    margin-top: 0;
    color: #dc3545;
}

#taf-alerts-content h4 {
    margin-top: 0;
    color: #ffc107;
}

/* --- ESTILOS PARA O MODAL DE APOIO AO DESPACHO --- */
#dispatch-support-modal {
    width: 90vw;
    max-width: 1400px;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.dispatch-container {
    display: flex;
    flex-grow: 1;
    gap: 20px;
    overflow: hidden;
}

.dispatch-flight-list {
    flex: 2;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 15px;
    overflow-y: auto;
    background-color: var(--input-bg);
    display: flex;
    flex-direction: column;
}
.dispatch-flight-list h4 {
    margin-top: 0;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.dispatch-toggle-all-container {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--input-border);
}
.dispatch-toggle-all-container label {
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.dispatch-toggle-all-container input {
    margin-right: 8px;
}
#dispatch-flight-selection-container {
    flex-grow: 1;
    overflow-y: auto;
}


.dispatch-actions {
    flex: 3;
    display: flex;
    flex-direction: column;
}
.dispatch-actions .btn-action {
    width: auto;
    padding: 10px 15px;
    margin-bottom: 15px;
}
.dispatch-actions button {
    background-color: #007bff;
}
.dispatch-actions button:hover {
    background-color: #0056b3;
}

.dispatch-outputs {
    flex-grow: 1;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 15px;
    overflow-y: auto;
    background-color: var(--input-bg);
    min-height: 400px; 
    display: flex;
    flex-direction: column;
}
.dispatch-outputs h5 {
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dispatch-outputs h5 .button-group {
    display: flex;
    gap: 8px;
}
.dispatch-outputs h5 button {
    font-size: 12px;
    padding: 4px 8px;
    background-color: #6c757d;
}

#folha-apoio-output-container, #powershell-output-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

#folhaApoioOutput, #powershellOutput {
    width: 100%;
    flex-grow: 1;
    box-sizing: border-box;
    font-size: 11px;
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--input-border);
    resize: vertical;
}

.dispatch-group-label {
    display: block;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    background-color: var(--section-bg);
    border: 1px solid var(--input-border);
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dispatch-group-label:hover {
    background-color: #e9ecef;
}
body.dark-mode .dispatch-group-label:hover {
    background-color: #3a3a3c;
}
.dispatch-group-label input {
    margin-right: 12px;
    vertical-align: middle;
}
.dispatch-group-label .cpt-name {
    font-weight: bold;
    color: #0056b3;
}
body.dark-mode .dispatch-group-label .cpt-name {
    color: #60a5fa;
}

/* --- START OF NEW CSS FOR LOG & BOARD --- */

/* QUADRO ESTILO AEROPORTO (SPLIT-FLAP) */
.departure-board-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.departure-board {
    background-color: #222;
    border: 4px solid #444;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    width: 800px; /* Ajustável */
    font-family: 'Courier New', Courier, monospace;
}

.board-header {
    color: #888;
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    text-transform: uppercase;
}

.board-row {
    background-color: #111;
    color: #e0c055; /* Amarelo torrado típico de aeroporto */
    margin-bottom: 4px;
    padding: 8px 10px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    align-items: center;
    border-bottom: 1px solid #333;
    position: relative;
    overflow: hidden;
}

/* Linha fina a meio para simular o split-flap */
.board-row::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(0,0,0,0.3);
    z-index: 2;
}

.board-time { text-align: left; color: #fff; }
.board-desc { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-countdown { text-align: right; color: #ff5555; font-size: 14px; }

/* MODAL DE LOG HISTÓRICO */
#log-modal {
    width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.log-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

#log-table-container {
    flex-grow: 1;
    overflow-y: auto;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background-color: var(--input-bg);
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.log-table th {
    background-color: #f0f2f5;
    position: sticky;
    top: 0;
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid #ccc;
    color: #333;
}
.dark-mode .log-table th { background-color: #333; color: #fff; border-bottom-color: #555; }

.log-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    color: var(--text-color);
}
.dark-mode .log-table td { border-bottom-color: #444; }

.log-type-AUTO { color: #007bff; font-weight: bold; }
.log-type-MANUAL { color: #28a745; font-weight: bold; }
.log-type-ALERT { color: #dc3545; font-weight: bold; }

#view-log-btn {
    /* CORREÇÃO DO LAYOUT: Removemos o posicionamento absoluto para ele ficar no sítio certo */
    width: auto;
    padding: 5px 15px;
    font-size: 13px;
    /* As cores e estilo vêm da classe .top-log-btn, não precisamos de repetir aqui */
}

/* --- BOTÃO AIRBUS HORIZONTAL (PARA O CABEÇALHO) --- */
.airbus-btn-horizontal {
    background: #181c1f;
    border: 2px solid #444;
    border-radius: 6px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.2s;
    height: 38px; /* Mesma altura dos inputs */
    margin-left: 15px;
}

.airbus-btn-horizontal:hover {
    background: #222;
    border-color: #666;
}

.airbus-btn-horizontal:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.airbus-btn-horizontal .label {
    color: #e0e0e0;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.airbus-btn-horizontal .status {
    color: #ffc107; /* Amarelo */
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* --- BOTÃO DE LOG SIMPLES (TOPO) --- */
.top-log-btn {
    background-color: #ffc107; /* Amarelo (Destaque) */
    color: #212529;
    border: 1px solid #ffc107;
    padding: 6px 15px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0; /* Remove a margem padrão dos botões grandes */
    width: auto;   /* Remove a largura 100% padrão */
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    height: 32px; /* Mesma altura visual do Select */
}

.top-log-btn:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.top-log-btn i {
    font-size: 14px;
}

/* Ajuste para modo escuro */
body.dark-mode .top-log-btn {
    background-color: #b8860b;
    border-color: #b8860b;
    color: #fff;
}

/* --- NOVO ESTILO PARA O PISCAR DO QUADRO (TEXTO APENAS) --- */
@keyframes text-flash {
    0% { color: #ff5555; opacity: 1; }
    50% { color: #ff0000; opacity: 0.5; }
    100% { color: #ff5555; opacity: 1; }
}

.board-text-blink {
    animation: text-flash 1s infinite;
    font-weight: bold;
}

/* --- ETIQUETA DE VERSÃO --- */
.version-tag {
    font-size: 0.4em; /* Mais pequeno que o título */
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    vertical-align: middle;
    margin-left: 10px;
    letter-spacing: 1px;
    font-weight: normal;
    color: #81d4fa; /* Um azul claro suave */
}

/* --- ALERTA VISUAL NO CABEÇALHO (QUANDO MUTE) --- */
@keyframes header-flash-red {
    0% { background-color: var(--header-bg); color: var(--header-text); border-color: var(--header-border); }
    50% { background-color: #dc3545; color: white; border-color: #ff0000; box-shadow: 0 0 15px #ff0000 inset; }
    100% { background-color: var(--header-bg); color: var(--header-text); border-color: var(--header-border); }
}

/* Forçar a animação com !important para garantir que nada a sobrescreve */
.header-corner.header-alert-active {
    animation: header-flash-red 1.0s infinite !important;
    cursor: pointer;
}

/* --- ESTILO PARA O ÍCONE INDICADOR DO SWITCH (Substitui GIF) --- */
.vertical-switch .indicator-icon {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    font-size: 24px;
    color: #ffc107; /* Amarelo */
    text-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
}

/* Animação de piscar para o alerta */
@keyframes flash-icon {
    0% { opacity: 1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.3; transform: translateX(-50%) scale(0.9); }
    100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

.vertical-switch input:checked + label .indicator-icon {
    opacity: 1;
    animation: flash-icon 1s infinite;
    color: #00d0ff; /* Azul Ciano quando ativo */
    text-shadow: 0 0 8px #00d0ff;
}

/* =================================================================== */
/* ==       ESTILOS PARA O MÓDULO DE METEOROLOGIA (ACARS WX)        == */
/* =================================================================== */

.meteo-block {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px;
    margin-bottom: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    border-left: 4px solid #007bff;
}

body.dark-mode .meteo-block {
    background-color: #2c2c2e;
    border-color: #444;
    color: #e0e0e0;
}

.meteo-block.missing-warning {
    border-left-color: #dc3545; /* Vermelho se faltar o aeroporto */
    background-color: rgba(220, 53, 69, 0.1);
}

/* DESTAQUES DE TEXTO (PARSER) */
.alert-hazard {
    background-color: #dc3545; /* Vermelho */
    color: white;
    font-weight: bold;
    padding: 0 4px;
    border-radius: 3px;
}

.alert-wind {
    color: #fd7e14; /* Laranja */
    font-weight: bold;
    border-bottom: 2px solid #fd7e14;
}

.alert-vis-bad {
    background-color: #ffc107; /* Amarelo */
    color: black;
    font-weight: bold;
    padding: 0 4px;
}

.alert-vis-med {
    color: #d39e00;
    font-weight: bold;
}

.alert-cloud {
    color: #6f42c1; /* Roxo */
    font-weight: bold;
}

.taf-keyword {
    color: #007bff; /* Azul */
    font-weight: bold;
    display: block; /* Quebra de linha visual */
    margin-top: 5px;
}

.taf-prob {
    color: #20c997; /* Verde Azulado */
    font-weight: bold;
}

/* Ajustes dos inputs do modal de Meteo */
#acars-meteo-ad-list {
    width: 100%;
    padding: 8px;
    font-family: monospace;
    text-transform: uppercase;
    margin-bottom: 10px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-color);
}