:root{
  --bg:#f3f6fb;
  --card:#ffffff;
  --text:#0b1220;
  --muted:#52617a;
  --line:#dbe3f0;

  --navy:#0b2a5b;
  --blue:#0a66c2;
  --blue2:#0a84ff;
  --yellow:#ffcc33;

  --ghost:#e9edf6;

  --shadow: 0 8px 20px rgba(11,42,91,0.10);
  --radius:16px;
}

*{ box-sizing:border-box; }

html, body{ height:100%; background:var(--bg); }

body{
  margin:0;
  color:var(--text);
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-y:auto;
}

.app-header{
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, var(--navy), #0b2a5b 65%, #0a2a58);
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,0.12);
  padding: calc(6px + env(safe-area-inset-top)) 8px 6px 8px;
}

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

.header-top h1{ margin:0; font-size:16px; line-height:1.15; }

.dashboard{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin-top:6px;
  width:100%;
  max-width:720px;
  margin-left:auto;
  margin-right:auto;
}

.dash-card{
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 8px 8px;
  text-align:center;
}

.dash-label{
  font-size: 11px;
  font-weight: 900;
  color: rgba(255,255,255,0.88);
  margin-bottom:4px;
}

.dash-value{
  font-size: 16px;
  font-weight: 900;
  color:#fff;
  line-height:1.05;
}

.dash-subvalue{
  font-size: 11px;
  font-weight: 900;
  color:#fff;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.pilot-toggle{
  margin-top:6px;
  width:100%;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,0.20);
  border-radius:12px;
  background: rgba(255,255,255,0.10);
  color:#fff;
  font-weight:900;
  font-size:13px;
}

.pilot-box{
  margin-top:6px;
  display:none;
  grid-template-columns:1fr 1fr;
  gap:6px;
}
.pilot-box.open{ display:grid; }

.pilot-box input{
  width:100%;
  padding:9px;
  border:1px solid rgba(255,255,255,0.22);
  border-radius:12px;
  background: rgba(255,255,255,0.10);
  color:#fff;
  outline:none;
  font-size:16px;
}
.pilot-box input::placeholder{ color: rgba(255,255,255,0.75); }

.pilot-box button{
  grid-column:1 / -1;
  padding:9px;
  border:none;
  border-radius:12px;
  background: linear-gradient(180deg, var(--yellow), #ffb703);
  color:#1b1b1b;
  font-weight:900;
  font-size:14px;
}

.tabs{
  margin-top:6px;
  display:flex;
  gap:6px;
}
.tabs button{
  flex:1;
  padding:8px 6px;
  border:none;
  border-radius:12px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  font-weight:900;
  font-size:12px;
}
.tabs button.active{
  background:#fff;
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.app-main{
  padding:10px;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:12px;
  margin-bottom:10px;
  box-shadow: var(--shadow);
}

h2{ margin:0 0 8px 0; font-size:16px; }
h3{ margin:0 0 8px 0; font-size:13px; color: var(--muted); }

.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.span-2{ grid-column: 1 / -1; }

input, select, textarea{
  width:100%;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  font-size:16px;
}

textarea{ min-height:76px; resize:vertical; }

input:focus, select:focus, textarea:focus{
  outline:none;
  border-color: rgba(10,102,194,0.65);
  box-shadow: 0 0 0 4px rgba(10,102,194,0.12);
}

button{
  width:100%;
  padding:10px;
  border:none;
  border-radius:12px;
  background: linear-gradient(180deg, var(--blue), #095bb0);
  color:#fff;
  font-weight:900;
  font-size:14px;
}
button:active{ transform: translateY(1px); }

button.ghost{ background: var(--ghost); color: var(--navy); }
button.primary{ background: linear-gradient(180deg, var(--blue2), #0a6fe0); }

.mini-btn{
  padding:10px;
  border-radius:12px;
  font-size:13px;
  background: rgba(255,255,255,0.18);
  color: #0b2a5b;
  border: 1px solid rgba(11,42,91,0.18);
}

.btn-green{ background: linear-gradient(180deg, #16a34a, #15803d); }
.btn-red{ background: linear-gradient(180deg, #ef4444, #b91c1c); }

.row{ display:flex; gap:8px; }
.row.space{ align-items:center; justify-content:space-between; }
.row .ghost{ width:auto; }

.list{ list-style:none; padding:0; margin:0; }
.list li{ padding:9px 0; border-bottom:1px solid var(--line); }
.list li:last-child{ border-bottom:none; }

.small-btn{
  width:auto;
  padding:7px 9px;
  font-size:12px;
  border-radius:10px;
  background: var(--ghost);
  color: var(--navy);
}

.op-timer{
  font-size:32px;
  font-weight:900;
  text-align:center;
  padding:12px 10px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  letter-spacing:1px;
}
.op-hint{
  margin-top:6px;
  text-align:center;
  font-weight:900;
  color: var(--muted);
  font-size:12px;
}
.op-msg{
  margin-top:10px;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  font-weight:900;
  text-align:center;
  font-size:13px;
}

/* =======================
   ABA CLIMA
======================= */
.weather-place{
  margin: 6px 0 10px 0;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  text-align:center;
}

.weather-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:8px;
}

.weather-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background:#fff;
}

.weather-label{
  font-size:11px;
  font-weight:900;
  color: var(--muted);
  margin-bottom:4px;
}

.weather-value{
  font-size:14px;
  font-weight:900;
  color: var(--text);
  line-height:1.2;
}

.weather-footnote{
  margin:10px 0 0 0;
  font-size:11px;
  color: var(--muted);
  text-align:center;
}


/* =======================
   METAR (aba clima)
======================= */
.metar-box{
  margin-top:10px;
}

.metar-result{
  margin-top:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
  font-weight:700;
  line-height:1.35;
  white-space:pre-wrap;
  word-break:break-word;
}


/* =======================
   METAR decodificado + avaliação (drone)
======================= */
.metar-decoded{
  margin-top:10px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.metar-decoded .metar-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background:#fff;
}

.metar-decoded .metar-label{
  font-size:11px;
  font-weight:900;
  color: var(--muted);
  margin-bottom:4px;
}

.metar-decoded .metar-value{
  font-size:14px;
  font-weight:900;
  color: var(--text);
  line-height:1.2;
}

.metar-decoded .span-2{ grid-column: 1 / -1; }

.metar-ops{
  margin-top:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:900;
}

.metar-ops .badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  margin-bottom:8px;
}

.metar-ops .badge.ok{ background: rgba(22,163,74,0.12); border:1px solid rgba(22,163,74,0.35); color:#166534; }
.metar-ops .badge.warn{ background: rgba(234,179,8,0.12); border:1px solid rgba(234,179,8,0.35); color:#854d0e; }
.metar-ops .badge.nogo{ background: rgba(239,68,68,0.12); border:1px solid rgba(239,68,68,0.35); color:#991b1b; }

.metar-ops ul{
  margin:6px 0 0 18px;
  padding:0;
  color: var(--text);
  font-weight:900;
  font-size:13px;
}



/* =======================
   MODAL: Editar voo
======================= */
.modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11, 18, 32, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
@media (min-width:720px){
  .modal-overlay{ align-items:center; }
}
.modal-card{
  width: min(720px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  padding: 12px;
  max-height: 86vh;
  overflow: auto;
}
.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.modal-header h2{ margin:0; font-size:16px; }
.icon-btn{
  width:auto;
  padding:8px 10px;
  border-radius:12px;
  background: var(--ghost);
  color: var(--navy);
  font-weight:900;
}
.modal-sub{
  margin-top:8px;
  padding:10px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color: var(--muted);
  font-weight:900;
  font-size:12px;
}


/* =======================
   NAVEGAÇÃO NO RODAPÉ
======================= */
.tabs-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--navy), #0b2a5b 65%, #0a2a58);
  border-top:1px solid rgba(255,255,255,0.12);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) 8px;
}
.tabs-footer .tabs{
  margin-top: 0;
}

/* O conteúdo não fica por trás do rodapé */
.app-main{
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* Header só dentro da aba Logbook (mantém a mesma aparência de antes) */
.logbook-header{
  margin: -10px -10px 10px -10px;
}


/* =======================
   TABS (rodapé) - estilo cockpit/Garmin
   (somente visual: ícones + acabamento)
======================= */
.tabs-footer{
  background: linear-gradient(180deg, #0b1220, #070b12 65%, #05070c);
  border-top: 1px solid rgba(0, 229, 255, 0.18);
  box-shadow: 0 -10px 24px rgba(0,0,0,0.35);
}

.tabs{
  margin-top: 0; /* no rodapé não precisa do espaçamento do header */
}

.tabs button{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0, 229, 255, 0.12);
  color: rgba(230, 245, 255, 0.90);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.tabs button .tab-ico{
  display:inline-flex;
  width:16px;
  height:16px;
  margin-right:6px;
  vertical-align:-3px;
  color: currentColor;
}

.tabs button .tab-ico svg{
  width:16px;
  height:16px;
  display:block;
}

.tabs button .tab-label{
  display:inline-block;
}

.tabs button.active{
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.45);
  color: #00e5ff;
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.25),
    0 0 18px rgba(0, 229, 255, 0.18);
}


/* =======================
   HEADER (topo) - estilo cockpit/Garmin
   (somente visual: cores + acabamento)
======================= */
.app-header{
  background: linear-gradient(180deg, #0b1220, #070b12 65%, #05070c);
  border-bottom: 1px solid rgba(0, 229, 255, 0.18);
}

.dash-card{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0, 229, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.dash-label{
  color: rgba(230, 245, 255, 0.80);
  letter-spacing: 0.2px;
}

.dash-value,
.dash-subvalue{
  color: rgba(230, 245, 255, 0.95);
}

.pilot-toggle{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0, 229, 255, 0.12);
  color: rgba(230, 245, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.pilot-box input{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0, 229, 255, 0.12);
  color: rgba(230, 245, 255, 0.95);
}

.pilot-box input::placeholder{
  color: rgba(230, 245, 255, 0.65);
}

.pilot-box button{
  background: rgba(0, 229, 255, 0.16);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: #00e5ff;
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.18),
    0 0 18px rgba(0, 229, 255, 0.10);
}

.pilot-box button:active{
  transform: translateY(1px);
}


/* =======================
   TEMA COCKPIT (agressivo) - painéis/inputs/cards
   (somente visual: sem alterar estrutura/funcionalidade)
======================= */
:root{
  --bg: #05070c;
  --card: rgba(10,14,22,0.92);
  --text: rgba(230,245,255,0.95);
  --muted: rgba(230,245,255,0.70);
  --line: rgba(0,229,255,0.16);
  --ghost: rgba(255,255,255,0.06);

  /* acento avionics */
  --av-cyan: #00e5ff;
  --shadow: 0 10px 26px rgba(0,0,0,0.45);
}

html, body{
  background: radial-gradient(1200px 600px at 50% -120px, rgba(0,229,255,0.10), transparent 55%),
              linear-gradient(180deg, #070b12, #05070c 55%, #04060a);
  color: var(--text);
}

.card{
  background: linear-gradient(180deg, rgba(12,18,28,0.92), rgba(8,12,20,0.94));
  border: 1px solid rgba(0,229,255,0.14);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

h2{ color: rgba(230,245,255,0.95); }
h3{ color: rgba(230,245,255,0.72); }

/* Inputs / selects / textarea = instrumento */
input, select, textarea{
  background: linear-gradient(180deg, rgba(6,10,16,0.95), rgba(3,6,10,0.96));
  color: rgba(230,245,255,0.95);
  border: 1px solid rgba(0,229,255,0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    inset 0 10px 18px rgba(0,0,0,0.35);
}

input::placeholder, textarea::placeholder{
  color: rgba(230,245,255,0.55);
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(0,229,255,0.55);
  box-shadow:
    0 0 0 4px rgba(0,229,255,0.12),
    0 0 18px rgba(0,229,255,0.12),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

select{ accent-color: var(--av-cyan); }

/* Botões (mantém tamanho/layout; só acabamento avionics agressivo) */
button{
  background: linear-gradient(180deg, rgba(0,229,255,0.22), rgba(0,229,255,0.10));
  border: 1px solid rgba(0,229,255,0.25);
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.12),
    0 0 18px rgba(0,229,255,0.10);
  color: rgba(230,245,255,0.95);
}

button.ghost, .small-btn{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,229,255,0.12);
  color: rgba(230,245,255,0.90);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

button.primary{
  background: linear-gradient(180deg, rgba(0,229,255,0.30), rgba(0,229,255,0.14));
  border: 1px solid rgba(0,229,255,0.35);
  color: var(--av-cyan);
}

.mini-btn{
  background: rgba(255,255,255,0.06);
  color: rgba(230,245,255,0.92);
  border: 1px solid rgba(0,229,255,0.14);
}

.btn-green{
  background: linear-gradient(180deg, rgba(34,197,94,0.28), rgba(34,197,94,0.12));
  border: 1px solid rgba(34,197,94,0.28);
  box-shadow: 0 0 18px rgba(34,197,94,0.10);
}
.btn-red{
  background: linear-gradient(180deg, rgba(239,68,68,0.30), rgba(239,68,68,0.14));
  border: 1px solid rgba(239,68,68,0.30);
  box-shadow: 0 0 18px rgba(239,68,68,0.10);
}

/* Listas e separadores */
.list li{
  border-bottom: 1px solid rgba(0,229,255,0.10);
}

/* Boxes de mensagens e cronômetro */
.op-timer, .op-msg, .metar-result, .weather-item, .metar-decoded .metar-item{
  background: linear-gradient(180deg, rgba(6,10,16,0.92), rgba(3,6,10,0.94));
  border: 1px solid rgba(0,229,255,0.14);
  color: rgba(230,245,255,0.95);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.weather-label, .dash-label, .metar-label{
  color: rgba(230,245,255,0.70);
}

strong{ color: rgba(230,245,255,0.98); }


/* =======================
   TEMA COCKPIT (metal cinza) - ajuste visual (menos escuro)
   (sobrescreve o tema agressivo; sem alterar estrutura/funcionalidade)
======================= */
:root{
  --bg: #101317;
  --card: rgba(28,33,40,0.92);
  --text: rgba(245,248,252,0.95);
  --muted: rgba(245,248,252,0.72);
  --line: rgba(0,229,255,0.14);
  --ghost: rgba(255,255,255,0.07);

  --av-cyan: #00e5ff;
  --shadow: 0 10px 26px rgba(0,0,0,0.35);
}

/* Fundo com “metal” (cinza) */
html, body{
  background:
    radial-gradient(900px 520px at 50% -140px, rgba(0,229,255,0.10), transparent 55%),
    radial-gradient(900px 520px at 0% 20%, rgba(255,255,255,0.06), transparent 60%),
    linear-gradient(180deg, #171b21, #101317 55%, #0c0f13);
  color: var(--text);
}

/* Header e rodapé também “metal” */
.app-header,
.tabs-footer{
  background: linear-gradient(180deg, #1b2027, #12161c 65%, #0e1116);
  border-color: rgba(0,229,255,0.16);
}

/* Cards com acabamento metal */
.card{
  background:
    linear-gradient(180deg, rgba(40,46,56,0.90), rgba(26,31,38,0.92));
  border: 1px solid rgba(0,229,255,0.14);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 0 0 1px rgba(255,255,255,0.02);
}

/* Dashboard cards */
.dash-card{
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(0,229,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.dash-value, .dash-subvalue{ color: rgba(245,248,252,0.96); }
.dash-label{ color: rgba(245,248,252,0.78); }

/* Campos tipo instrumento (metal mais claro) */
input, select, textarea{
  background: linear-gradient(180deg, rgba(34,40,48,0.95), rgba(22,26,32,0.96));
  border: 1px solid rgba(0,229,255,0.16);
  color: rgba(245,248,252,0.95);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 10px 18px rgba(0,0,0,0.22);
}

input::placeholder, textarea::placeholder{
  color: rgba(245,248,252,0.60);
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(0,229,255,0.48);
  box-shadow:
    0 0 0 4px rgba(0,229,255,0.10),
    0 0 18px rgba(0,229,255,0.10),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Botões (metal + avionics) */
button{
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  border: 1px solid rgba(0,229,255,0.16);
  color: rgba(245,248,252,0.95);
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.10),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

button.primary{
  background: linear-gradient(180deg, rgba(0,229,255,0.22), rgba(0,229,255,0.10));
  border: 1px solid rgba(0,229,255,0.30);
  color: var(--av-cyan);
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.12),
    0 0 16px rgba(0,229,255,0.10);
}

button.ghost, .small-btn, .mini-btn{
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(0,229,255,0.12);
  color: rgba(245,248,252,0.92);
}

/* Tabs do rodapé (mantém layout; só metal) */
.tabs button{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,229,255,0.12);
  color: rgba(245,248,252,0.88);
}
.tabs button.active{
  background: rgba(0,229,255,0.12);
  border-color: rgba(0,229,255,0.38);
  color: var(--av-cyan);
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.18),
    0 0 18px rgba(0,229,255,0.14);
}

/* Boxes especiais */
.op-timer, .op-msg, .metar-result, .weather-item, .metar-decoded .metar-item{
  background: linear-gradient(180deg, rgba(34,40,48,0.92), rgba(22,26,32,0.94));
  border: 1px solid rgba(0,229,255,0.14);
}


/* =======================
   TEMA COCKPIT (metal mais claro) + ícones coloridos no rodapé
   (somente visual)
======================= */
:root{
  --bg: #2a2f36;
  --card: rgba(245, 248, 252, 0.10); /* fallback */
  --text: rgba(18, 22, 28, 0.95);
  --muted: rgba(18, 22, 28, 0.70);

  --line: rgba(0, 80, 120, 0.22);
  --ghost: rgba(255,255,255,0.30);

  --av-cyan: #00b7ff;
  --shadow: 0 10px 22px rgba(0,0,0,0.18);
}

/* Fundo metal claro */
html, body{
  background:
    radial-gradient(1000px 600px at 50% -160px, rgba(0,183,255,0.12), transparent 55%),
    radial-gradient(900px 520px at 0% 20%, rgba(255,255,255,0.24), transparent 60%),
    linear-gradient(180deg, #eef2f6, #dfe5ec 45%, #cfd7e1);
  color: rgba(18,22,28,0.95);
}

/* Header/Rodapé metal claro */
.app-header,
.tabs-footer{
  background: linear-gradient(180deg, #f1f4f8, #dfe5ec 65%, #cfd7e1);
  border-color: rgba(0, 80, 120, 0.22);
  color: rgba(18,22,28,0.95);
}

/* Textos do header */
.app-header, .app-header *{
  color: rgba(18,22,28,0.95);
}

/* Cards: painel metal claro */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(241,245,250,0.80));
  border: 1px solid rgba(0, 80, 120, 0.18);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.14),
    inset 0 1px 0 rgba(255,255,255,0.70);
}

.dash-card{
  background: rgba(255,255,255,0.60);
  border: 1px solid rgba(0, 80, 120, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.70);
}
.dash-label{ color: rgba(18,22,28,0.72); }
.dash-value, .dash-subvalue{ color: rgba(18,22,28,0.95); }

/* Campos tipo instrumento (claros) */
input, select, textarea{
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(241,245,250,0.90));
  border: 1px solid rgba(0, 80, 120, 0.20);
  color: rgba(18,22,28,0.95);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    inset 0 10px 18px rgba(0,0,0,0.06);
}
input::placeholder, textarea::placeholder{
  color: rgba(18,22,28,0.50);
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(0,183,255,0.55);
  box-shadow:
    0 0 0 4px rgba(0,183,255,0.16),
    0 0 18px rgba(0,183,255,0.10);
}

/* Botões metal claro */
button{
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(241,245,250,0.88));
  border: 1px solid rgba(0, 80, 120, 0.18);
  color: rgba(18,22,28,0.95);
  box-shadow:
    0 6px 14px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.70);
}

button.primary{
  background: linear-gradient(180deg, rgba(0,183,255,0.22), rgba(0,183,255,0.10));
  border: 1px solid rgba(0,183,255,0.35);
  color: rgba(0,80,120,0.95);
}

button.ghost, .small-btn, .mini-btn{
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(0, 80, 120, 0.16);
  color: rgba(18,22,28,0.92);
}

/* Rodapé: mantém layout; ícones coloridos */
.tabs button{
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0, 80, 120, 0.16);
  color: rgba(18,22,28,0.85);
}

/* Ícone por aba (cor fixa, estilo app) */
#tab-logbook .tab-ico{ color: #0a66c2; }      /* azul */
#tab-reports .tab-ico{ color: #7c3aed; }      /* roxo */
#tab-settings .tab-ico{ color: #111827; }     /* grafite */
#tab-weather .tab-ico{ color: #0ea5e9; }      /* ciano */
#tab-operation .tab-ico{ color: #16a34a; }    /* verde */

/* Quando ativo: realce sem apagar a cor do ícone */
.tabs button.active{
  background: rgba(0,183,255,0.14);
  border-color: rgba(0,183,255,0.40);
  color: rgba(18,22,28,0.95);
  box-shadow:
    0 0 0 1px rgba(0,183,255,0.18),
    0 0 18px rgba(0,183,255,0.12);
}
.tabs button.active .tab-ico{
  filter: drop-shadow(0 0 6px rgba(0,183,255,0.28));
}

/* Caixas especiais */
.op-timer, .op-msg, .metar-result, .weather-item, .metar-decoded .metar-item{
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(241,245,250,0.84));
  border: 1px solid rgba(0, 80, 120, 0.16);
  color: rgba(18,22,28,0.95);
}
.list li{
  border-bottom: 1px solid rgba(0, 80, 120, 0.12);
}


/* =======================
   FIX CONTRASTE DE TEXTO EM CAMPOS
======================= */
input, select, textarea{
  color: #111827 !important;
}

input::placeholder, textarea::placeholder{
  color: #4b5563 !important;
}


/* =======================
   FIX CONTRASTE TÍTULOS DE SEÇÕES
======================= */
h2, h3{
  color: #0f172a !important; /* cinza bem escuro */
}

.card h2,
.card h3{
  color: #0f172a !important;
}


/* =======================
   REFINO VISUAL (mais escuro + efeitos)
======================= */

/* Fundo geral um pouco mais escuro */
html, body{
  background:
    linear-gradient(180deg, #d6dde6, #c7d0dc 45%, #b8c2cf);
}

/* Cards um pouco mais escuros */
.card{
  background: linear-gradient(180deg, rgba(235,238,244,0.95), rgba(215,222,231,0.95));
}

/* Inputs e selects com efeito de profundidade */
input, select, textarea{
  background: linear-gradient(180deg, #f8fafc, #e5ebf2);
  border: 1px solid #7a8ca3;
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.10),
    0 1px 2px rgba(255,255,255,0.8);
}

input:focus, select:focus, textarea:focus{
  border-color: #00b7ff;
  box-shadow:
    0 0 0 3px rgba(0,183,255,0.25),
    inset 0 2px 4px rgba(0,0,0,0.12);
}

/* Botões com estilo metálico */
button{
  background: linear-gradient(180deg, #f2f5f9, #d5dde7);
  border: 1px solid #6b7f99;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

button.primary{
  background: linear-gradient(180deg, #bfe9ff, #7fd0ff);
  border: 1px solid #00b7ff;
  color: #053a55;
}

button.primary:active{
  transform: translateY(1px);
}

/* Rodapé um pouco mais escuro */
.tabs-footer{
  background: linear-gradient(180deg, #d0d8e2, #bfc9d6);
}


/* =======================
   FIX HISTÓRICO DE VOOS (texto escuro)
======================= */
#flightList strong{
  color:#0f172a !important;
}

#flightList{
  color:#1f2933;
}


/* =======================
   FIX HORAS POR DRONE (texto escuro)
======================= */
#hoursByDrone strong{
  color:#0f172a !important;
}

#hoursByDrone{
  color:#1f2933;
}


/* =======================
   POLISH PACK v1 (clean premium)
   - somente visual (CSS)
   - sem alterar estrutura/funcionalidade
======================= */
*{ -webkit-tap-highlight-color: transparent; }

.card{
  border-color: rgba(0, 80, 120, 0.16);
  box-shadow:
    0 8px 18px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.75);
}

input, select, textarea{
  border-color: rgba(15, 23, 42, 0.20);
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,0.08),
    0 1px 1px rgba(255,255,255,0.7);
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(0,183,255,0.55);
  box-shadow:
    0 0 0 3px rgba(0,183,255,0.14),
    inset 0 2px 3px rgba(0,0,0,0.08);
}

button{
  transition: transform .06s ease, box-shadow .16s ease, filter .16s ease;
}

button:hover{
  filter: brightness(1.02);
  box-shadow:
    0 10px 18px rgba(0,0,0,0.14),
    inset 0 1px 0 rgba(255,255,255,0.78);
}

button:active{
  transform: translateY(1px);
  box-shadow:
    0 6px 12px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

button.primary{
  box-shadow:
    0 10px 18px rgba(0,0,0,0.14),
    inset 0 1px 0 rgba(255,255,255,0.75);
}
button.primary:hover{ filter: saturate(1.05) brightness(1.02); }
button.primary:active{ transform: translateY(1px); }

button.ghost, .small-btn, .mini-btn{
  box-shadow:
    0 6px 12px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.75);
}

h1{ letter-spacing: 0.2px; }
h2{ letter-spacing: 0.1px; }
h3{ letter-spacing: 0.1px; }

.tabs-footer{
  border-top: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 -10px 20px rgba(0,0,0,0.10);
}

.tabs button{
  transition: transform .06s ease, box-shadow .16s ease, filter .16s ease;
}

.tabs button .tab-ico{ vertical-align: -2px; }

.tabs button:hover{ filter: brightness(1.02); }

.tabs button:active{ transform: translateY(1px); }

.tabs button.active{
  box-shadow:
    0 0 0 1px rgba(0,183,255,0.16),
    0 8px 16px rgba(0,0,0,0.10);
}


/* =======================
   POLISH PACK v2 (visível) - azul + verde
======================= */

/* Cards com mais contraste */
.card{
  background: linear-gradient(180deg, #f7fafc, #e5edf5);
  border: 1px solid #7aa7c7;
  box-shadow: 0 14px 28px rgba(0,0,0,0.22);
}

/* Inputs */
input, select, textarea{
  background: linear-gradient(180deg, #ffffff, #eaf2f8);
  border: 1px solid #6ba4c7;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.12);
}

input:focus, select:focus, textarea:focus{
  border-color:#00b7ff;
  box-shadow:
    0 0 0 4px rgba(0,183,255,0.25),
    inset 0 2px 4px rgba(0,0,0,0.14);
}

/* Botões padrão */
button{
  background: linear-gradient(180deg, #f0f6fb, #cfddea);
  border: 1px solid #6b9bc0;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

button.primary{
  background: linear-gradient(180deg, #9ee7ff, #4cc3ff);
  border: 1px solid #00b7ff;
  color:#063b52;
}

/* Verde para ações positivas */
.btn-green{
  background: linear-gradient(180deg, #9af5c1, #22c55e);
  border: 1px solid #16a34a;
  color:#064e3b;
}

/* Rodapé - aba ativa */
.tabs button.active{
  background: linear-gradient(180deg, #a7e7ff, #7cd4ff);
  border: 1px solid #00b7ff;
  color:#04324a;
  box-shadow:
    0 0 0 2px rgba(0,183,255,0.35),
    0 0 18px rgba(34,197,94,0.35);
}

/* Linha luminosa superior no rodapé */
.tabs-footer{
  border-top:2px solid rgba(0,183,255,0.6);
}


/* =======================
   PWA: banner de atualização + versão do app
   (somente UI adicional, sem mudar layout/cores existentes)
======================= */
.update-banner{
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(78px + env(safe-area-inset-bottom)); /* acima do rodapé */
  z-index: 60;
}
.update-banner-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.update-banner-text{
  font-weight:900;
  color: var(--text);
  line-height:1.2;
}
.update-banner-sub{
  margin-top:2px;
  font-weight:900;
  font-size:12px;
  color: var(--muted);
}
.version-meta{
  margin:6px 0 10px 0;
  font-weight:900;
  color: var(--muted);
  font-size:12px;
}
