:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #1d2733;
  --muted: #5d6b7a;
  --line: #d9e0e7;
  --accent: #0b5cad;
  --accent-ink: #ffffff;
  --warn-bg: #fff4d6;
  --warn-ink: #6b4a00;
  --bad: #b3261e;
  --ok: #1e7b3a;
  --route: #d0021b;
  --leg-row: #f7f9fb;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.link { border: 0; background: none; color: var(--accent); text-decoration: underline; padding: 0; }
/* Las casillas y los botones de opcion quedan con su estilo nativo: el de los campos de texto no los toca. */
input:not([type=checkbox]):not([type=radio]), select, textarea { border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; background: #fff; width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; margin: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { outline: 2px solid #9cc3ea; border-color: var(--accent); }
.hidden { display: none !important; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; background: #0f2a44; color: #fff; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.brand .sub { font-weight: 400; font-size: 13px; opacity: .75; margin-left: 6px; }
.actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.actions button { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.actions button.primary { background: #fff; color: #0f2a44; border-color: #fff; }
.actions .sep { width: 10px; }

.disclaimer { background: var(--warn-bg); color: var(--warn-ink); padding: 6px 6px 6px 14px; font-size: 13px; border-bottom: 1px solid #f0d78c; display: flex; align-items: center; gap: 8px; }
.disclaimer > span { flex: 1; }
/* X grande para el dedo (44 px, como pide Apple para iPad) */
.disc-close { flex: none; width: 44px; height: 44px; margin: -6px 0; padding: 0; border: 0; background: none; color: var(--warn-ink); font-size: 26px; line-height: 1; cursor: pointer; border-radius: 6px; }
.disc-close:hover { background: rgba(0,0,0,.06); }

.layout { flex: 1; display: flex; min-height: 0; position: relative; }
.layout.collapsed .panel { display: none; }
.tabs .panel-hide { margin-left: auto; font-size: 16px; padding: 6px 14px; color: var(--muted); }
.panel-show { position: absolute; top: 50%; right: 0; transform: translateY(-50%); z-index: 1000; background: #fff; border-radius: 6px 0 0 6px; border-right: 0; padding: 10px 6px; box-shadow: 0 1px 5px rgba(0,0,0,.35); font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 6px; }
/* Pestana lateral: el texto va vertical y se lee de abajo hacia arriba; la flecha queda horizontal apuntando hacia donde se abre el panel. */
.panel-show .txt { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .5px; }
.panel-show .arr { line-height: 1; }
.panel-show.hidden { display: none !important; }
#map { flex: 1; min-width: 0; }
.panel { width: 560px; max-width: 100%; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-radius: 0; background: none; padding: 9px 16px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tabs.small button { padding: 6px 12px; }
.tab-body { padding: 10px 12px; overflow: auto; flex: 1; }
.credits { font-size: 11px; color: var(--muted); padding: 6px 12px; border-top: 1px solid var(--line); }
.credits a { color: var(--muted); }
.credits-link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }

label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
/* Un label con una casilla o un boton de opcion: en la misma linea, la casilla a la izquierda y todo clickeable. */
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { flex-direction: row; align-items: center; gap: 6px; cursor: pointer; }
/* Los estilos de formulario de arriba son para el panel: en los controles de Leaflet (selector de capas)
   cada checkbox/radio va en la misma linea que su texto, como lo arma Leaflet. */
.leaflet-control-layers label { display: block; font-size: 13px; color: var(--ink); }
.leaflet-control-layers input { width: auto; padding: 0; border: 0; border-radius: 0; margin: 0 4px 0 0; vertical-align: middle; }
.leaflet-control-layers label span { display: inline-flex; align-items: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wind-all { display: flex; gap: 3px; }
.wind-all input { width: 50%; }
.wind-all button { padding: 2px 8px; }
.hint { color: var(--muted); font-size: 12px; margin: 8px 0; }

.table-wrap { overflow-x: auto; }
table.legs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
table.legs th { text-align: right; font-weight: 600; font-size: 11px; color: var(--muted); padding: 4px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.legs th:first-child { text-align: left; }
table.legs td { padding: 3px 4px; text-align: right; white-space: nowrap; }
table.legs tr.wp td { text-align: left; border-top: 1px solid var(--line); }
table.legs tr.wp .wp-line { display: flex; gap: 6px; align-items: center; }
table.legs tr.wp .num { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: var(--route); color: #fff; font-size: 11px; align-items: center; justify-content: center; flex: none; }
table.legs tr.wp input.wp-name { width: 150px; }
table.legs tr.wp input.wp-elev { width: 70px; }
table.legs tr.wp .kind { font-size: 11px; color: var(--muted); }
table.legs tr.wp .drag { cursor: grab; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; touch-action: none; user-select: none; }
table.legs tr.wp.dragging td { opacity: .45; }
table.legs tr.wp.drop-before td { box-shadow: inset 0 3px 0 var(--accent); }
table.legs tr.wp.drop-after td { box-shadow: inset 0 -3px 0 var(--accent); }
table.legs tr.wp button { padding: 0 6px; font-size: 12px; margin-left: auto; }
table.legs tr.leg td { background: var(--leg-row); }
table.legs tr.leg td.from { text-align: left; color: var(--muted); font-size: 11px; }
table.legs tr.leg .wind { display: inline-flex; gap: 2px; }
table.legs tr.leg .wind input { width: 46px; padding: 2px 3px; text-align: right; }
table.legs tr.leg.invalid td { color: var(--bad); }
table.legs tfoot td { font-weight: 700; border-top: 2px solid var(--ink); padding-top: 5px; }
.phase { font-size: 10px; color: var(--muted); display: block; }

#warnings .warn { background: #fdecea; color: var(--bad); border-radius: 6px; padding: 6px 10px; margin: 8px 0; font-size: 13px; }
.summary { margin-top: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.summary .box { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.summary .box .k { font-size: 11px; color: var(--muted); }
.summary .box .v { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary .box.bad { border-color: var(--bad); color: var(--bad); }
.summary .box.good { border-color: #9bd3ad; }
.aerodromes { margin-top: 12px; }
.aerodromes h3 { font-size: 13px; margin: 0 0 4px; }
.aerodromes ul { margin: 0; padding-left: 18px; }
.aerodromes li { margin: 2px 0; }
.aerodromes a { margin-left: 6px; }
.row-actions { display: flex; gap: 6px; margin-top: 12px; }

.ac-head { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.ac-head label { flex: 1; min-width: 200px; }
.ac-buttons { display: flex; gap: 6px; }
.ac-form fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 10px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ac-form legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.ac-form .wide { margin-top: 6px; }

dialog { border: 0; border-radius: 10px; padding: 0; box-shadow: 0 10px 40px rgba(0,0,0,.25); width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(15, 42, 68, .35); }
.dlg { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.dlg h2 { margin: 0; font-size: 18px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.msg { margin: 0; font-size: 13px; min-height: 1em; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }
.google-area .or { text-align: center; color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.list { list-style: none; padding: 0; margin: 0; max-height: 50vh; overflow: auto; }
.list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.list li .name { flex: 1; }
.list li .date { color: var(--muted); font-size: 12px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #0f2a44; color: #fff; padding: 9px 16px; border-radius: 8px; z-index: 2000; box-shadow: 0 4px 16px rgba(0,0,0,.25); }

/* Mapa */
.wp-marker { background: var(--route); color: #fff; border: 2px solid #fff; border-radius: 50%; width: 22px !important; height: 22px !important; margin-left: -11px !important; margin-top: -11px !important; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.4); cursor: move; }
.leg-label-wrap { width: 0 !important; height: 0 !important; pointer-events: none; }
.leg-label { display: inline-block; transform: translate(-50%, -50%); background: rgba(255,255,255,.92); border: 1px solid var(--route); color: var(--route); border-radius: 4px; padding: 1px 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.nav-symbol { background: none; border: 0; }
.nav-symbol svg { display: block; filter: drop-shadow(0 0 1px #fff); }
.feat-label {font-size: 11px; color: #333; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 2px #fff; white-space: nowrap; pointer-events: none; background: none; border: 0; width: auto !important; height: auto !important; }
.feat-label.apt { color: #0b3f86; font-weight: 600; }
.feat-label.rp { color: #1d2733; }
.feat-label.nav { color: #1a4f8a; font-weight: 600; }
.feat-label.fix { color: #3d5a73; font-size: 10px; }
.feat-label.vfr { color: #b0255a; font-size: 10px; }
/* Rotulo de aerovia como la carta en ruta ENR 6: distancia arriba, designador en caja (con punta si es de sentido unico), nivel minimo abajo */
.awy-lbl-wrap { background: none; border: 0; pointer-events: none; }
.awy-lbl { display: flex; flex-direction: column; align-items: center; white-space: nowrap; font-family: system-ui, sans-serif; font-weight: 600; line-height: 1.15; color: #1d2733; }
.awy-lbl .d { font-size: 9px; background: #fff; border: 1px solid currentColor; padding: 0 2px; margin-bottom: 1px; }
.awy-lbl .des { font-size: 10px; background: #1d2733; color: #fff; padding: 1px 4px; border-radius: 2px; }
.awy-lbl .des.ow-r { padding-right: 10px; border-radius: 0; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%); }
.awy-lbl .des.ow-l { padding-left: 10px; border-radius: 0; clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 50%); }
.awy-lbl .fl { font-size: 9px; margin-top: 1px; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 2px #fff; }
.awy-lbl.up { color: #9a5b2e; }
.awy-lbl.up .des { background: #9a5b2e; }
.awy-trk { font-size: 9px; font-weight: 600; color: #1d2733; white-space: nowrap; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 2px #fff; }
.awy-trk.up { color: #9a5b2e; }
.awy-arrow { background: none; border: 0; pointer-events: none; }
.awy-arrow svg { display: block; filter: drop-shadow(0 0 1px #fff); }
.awy-help { margin-left: 5px; width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 1px solid #8a94a0; background: #fff; color: #333; font-size: 11px; line-height: 14px; cursor: pointer; vertical-align: middle; }
.awy-legend { background: #fff; padding: 8px 10px; border-radius: 6px; box-shadow: 0 1px 5px rgba(0,0,0,.35); max-width: 360px; max-height: 70vh; overflow: auto; font-size: 12px; }
.awy-legend table { border-collapse: collapse; margin: 6px 0 4px; }
.awy-legend td { padding: 3px 4px; vertical-align: middle; }
.awy-legend td.s { white-space: nowrap; text-align: center; }
.awy-legend .awy-lbl { display: inline-flex; }
.awy-legend .sym svg { vertical-align: middle; margin: 0 3px; }
.awy-legend svg { vertical-align: middle; }
.awy-legend .close { float: right; border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 0 0 8px; }
.feat-label.cor { color: #b0255a; font-weight: 700; background: #fff !important; border: 1.5px solid #b0255a; border-radius: 50%; padding: 0 4px; text-shadow: none; }
.map-search { position: relative; }
.map-search .search-btn { width: 34px; height: 34px; padding: 0; display: flex; align-items: center; justify-content: center; background: #fff; color: #333; border: 2px solid rgba(0,0,0,.2); border-radius: 4px; background-clip: padding-box; cursor: pointer; }
.map-search .search-btn:hover { background: #f4f4f4; }
.map-search:not(.collapsed) .search-btn { color: var(--accent); }
.map-search .search-box { position: absolute; left: 40px; top: 0; width: 240px; background: #fff; border-radius: 6px; box-shadow: 0 1px 5px rgba(0,0,0,.35); }
.map-search.collapsed .search-box { display: none; }
.map-search input { border: 0; padding: 8px 9px; font-size: 14px; }
.map-search ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; border-top: 1px solid var(--line); }
/* Telefono: el campo ocupa el ancho que queda entre la lupa y el selector de capas. */
@media (max-width: 600px) { .map-search .search-box { width: calc(100vw - 112px); } .map-search input { font-size: 16px; } .map-search ul { max-height: 45vh; } .map-search li { padding: 8px 9px; } }
.map-search li { padding: 5px 9px; cursor: pointer; font-size: 13px; }
.map-search li:hover, .map-search li.sel { background: #e8f1fb; }
.map-search li small { color: var(--muted); }
.popup h4 { margin: 0 0 4px; font-size: 14px; }
.popup .meta { color: var(--muted); font-size: 12px; }
.popup table { font-size: 12px; border-collapse: collapse; }
.popup td { padding: 1px 6px 1px 0; }
.popup .pbtns { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.popup .asp { margin: 3px 0; padding-left: 6px; border-left: 3px solid #888; }
.popup .bad { color: #c62828; }

/* Log imprimible */
.printlog { display: none; }
/* Hasta 900 px de ancho va el diseño del telefono (pantallas completas con la barra de abajo): tambien el iPad
   vertical (Diego, 25/10/2026: el mapa arriba y la ruta abajo partian la pantalla). Aca solo ajustes de grillas. */
@media (max-width: 900px) {
  .topbar .brand .sub { display: none; }
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .ac-form fieldset { grid-template-columns: repeat(2, 1fr); }
}
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { display: block; background: #fff; font-size: 11px; }
  .topbar, .disclaimer, .layout, dialog, .toast { display: none !important; }
  .printlog { display: block; color: #000; }
  .printlog h1 { font-size: 16px; margin: 0 0 4px; }
  .printlog .hdr { display: grid; grid-template-columns: repeat(4, auto); gap: 2px 18px; margin-bottom: 6px; }
  .printlog table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  .printlog th, .printlog td { border: 1px solid #000; padding: 3px 4px; text-align: right; }
  .printlog th { background: #e6e6e6; font-size: 10px; }
  .printlog td.l, .printlog th.l { text-align: left; }
  .printlog td.blank { min-width: 36px; }
  .printlog .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
  .printlog .box { border: 1px solid #000; padding: 4px 6px; }
  .printlog .box h3 { font-size: 11px; margin: 0 0 3px; }
  .printlog .disc { margin-top: 8px; font-size: 10px; border: 1px solid #000; padding: 4px 6px; }
  .printlog tr { page-break-inside: avoid; }
}
/* Ventanita de detalles de los elementos del mapa (popup.js) */
.nav-popup h4 { margin: 0 0 2px; font-size: 14px; }
.nav-popup .pline { font-size: 12px; font-variant-numeric: tabular-nums; }
.nav-popup .pbtns { margin-top: 4px; }
.nav-popup .add-btn { margin-top: 8px; width: 100%; padding: 5px 10px; }
/* Nombre de la ruta con Guardar al lado */
.name-row { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
.name-row .grow { flex: 1; min-width: 180px; }
.name-row button { white-space: nowrap; }
.save-status { margin: 4px 0 8px; min-height: 1em; }
.ad-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 4px 0; }
.ad-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #e3effa; color: #134a7c; font-size: 12px; font-weight: 600; }
.ad-chip.priv { background: var(--warn-bg); color: var(--warn-ink); }
.ad-fuel { font-size: 13px; }
.ad-tels { font-size: 12.5px; margin: 3px 0; }
.ad-tels a { white-space: nowrap; }
/* Cabecera del bloque de aerodromo del briefing: dos columnas; combustible y telefonos arriba a la derecha. Con poco
   ancho (menos de 430 px de bloque: telefono o panel angosto; en escritorio el briefing mide unos 520) se apila. */
.brief-card { container-type: inline-size; }
.ad-head { display: flex; gap: 6px 18px; align-items: flex-start; }
.ad-head .ad-left { flex: 1 1 auto; min-width: 0; }
.ad-head .ad-right { flex: 0 1 46%; text-align: right; }
.ad-head .ad-right .ad-fuel { font-weight: 600; margin-bottom: 4px; }
.ad-head .ad-right .ad-tels { line-height: 1.6; }
@container (max-width: 430px) {
  .ad-head { flex-direction: column; }
  .ad-head .ad-right { flex: none; text-align: left; }
}
.nav-popup .priv-warn { margin-top: 4px; padding: 3px 6px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 4px; font-size: 12px; font-weight: 600; }
.popup .pline { font-size: 12px; font-variant-numeric: tabular-nums; }
/* Arrastre de la ruta: linea de agarre y aviso de enganche */
.route-hit { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.snap-tip { background: #ffb300; border: 0; color: #1d2733; font-weight: 700; font-size: 11px; padding: 1px 5px; box-shadow: none; }
.snap-tip::before { display: none; }
/* Condiciones de vuelo segun el POH */
.perf-cond { margin-top: 10px; padding: 8px 10px; border: 1px solid #9cc3ea; border-radius: 8px; background: #f3f8fd; display: flex; flex-direction: column; gap: 6px; }
.perf-title { font-weight: 600; font-size: 13px; }
.perf-cond .hint { margin: 0; }
.tocd-wrap { width: 0 !important; height: 0 !important; pointer-events: none; }
.tocd { display: inline-block; transform: translate(-50%, -50%); background: #1d2733; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 4px; border-radius: 3px; }
@media print { .printlog .cond { margin: 2px 0 6px; } .printlog tr.split td { font-size: 10px; } }
.onc-note { max-width: 330px; background: rgba(255, 244, 214, .95); color: var(--warn-ink); border: 1px solid #f0d78c; border-radius: 6px; padding: 5px 8px; font-size: 11px; line-height: 1.35; }
/* Lista del clic derecho */
.pick-list .pick { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 6px 2px; background: none; }
.pick-list .pick:hover { background: #e8f1fb; }
.pick-list .ico { flex: none; width: 18px; display: inline-flex; justify-content: center; }
.pick-list .txt { font-size: 12px; line-height: 1.25; }
.pick-list .nm { color: var(--muted); }
.nav-popup .back-btn { font-size: 12px; margin-bottom: 4px; }
.pick-list { max-height: min(55vh, 420px); overflow-y: auto; }
.pick-list .pick-group { background: #f3f6f9; }
.pick-list .pick-group .arrow { font-size: 14px; color: var(--muted); }
.pick-list .pick-sub .pick { padding-left: 16px; }
/* Condiciones de vuelo (solapa Avion) y linea de referencia en la solapa Ruta */
.ac-conds { border: 1px solid var(--line); border-radius: 6px; margin: 10px 0; padding: 8px 10px; }
.ac-conds legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.cond-row { display: grid; grid-template-columns: 22px 1.4fr .8fr .7fr 1.9fr 26px; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.cond-row.active { background: #eef6ff; }
.cond-row input[type=radio] { width: auto; }
.cond-row .perfv { font-size: 11px; color: var(--muted); line-height: 1.2; }
.cond-row .perfv.bad { color: var(--bad); }
.cond-row.manual { grid-template-columns: 22px 1.4fr .9fr .9fr 26px; }
.cond-extra { margin-top: 8px; }
.ac-line { margin-top: 10px; padding: 6px 10px; border-radius: 6px; background: #f3f8fd; border: 1px solid #9cc3ea; font-size: 13px; }
table.legs tr.wp input.wp-alt { width: 64px; text-transform: uppercase; }
table.legs tr.wp .wp-alt-l { flex-direction: row; align-items: center; gap: 4px; }
.nav-popup .alt-pt { margin: 4px 0; }
.nav-popup .alt-pt input { text-transform: uppercase; }
.cond-row { display: block; }
.cond-row .cond-head { display: flex; gap: 6px; align-items: center; }
.cond-row .cond-head input[type=text] { flex: 1; }
.cond-row .cond-vals { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 2px 28px; }
.cond-row .cond-vals label { font-size: 11px; }
@media (max-width: 900px) { .cond-row .cond-vals { grid-template-columns: repeat(3, 1fr); } }
.row-actions { flex-wrap: wrap; }
.row-actions .sep { flex: 1; }
/* Meteorologia y NOTAM (wx.js) */
.wx-box { margin-top: 6px; border-top: 1px solid #dde3ea; padding-top: 4px; max-height: 260px; overflow-y: auto; }
.wx-line { font-size: 12px; margin-top: 4px; }
.wx-raw { font-family: Consolas, monospace; font-size: 11px; background: #f3f5f8; padding: 2px 4px; border-radius: 3px; margin-top: 1px; word-break: break-word; }
.wx-dec { font-size: 11px; color: #3a4654; }
.wx-cat { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: 10px; font-weight: 700; color: #fff; }
.wx-vfr { background: #2e9e44; } .wx-mvfr { background: #1f6fd1; } .wx-ifr { background: #d62f2f; } .wx-lifr { background: #b03ab8; }
.wx-notams { margin: 2px 0 0; padding-left: 16px; font-size: 11px; }
.wx-notams li { margin-bottom: 3px; }
.wx-src { font-size: 10px; color: #6b7684; margin-top: 6px; }
.wx-route { margin-top: 12px; }
.wx-route h3 { display: flex; align-items: center; gap: 8px; }
.wx-route h3 .link { font-size: 12px; font-weight: 400; }
.wx-warn { margin: 2px 0 6px; padding: 3px 6px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 4px; font-size: 12px; }
.wx-apt { border: 1px solid #dde3ea; border-radius: 6px; padding: 4px 8px; margin-bottom: 6px; }
.wx-apt h4 { margin: 0; font-size: 13px; }
.wx-apt .wx-name { font-weight: 400; }
.wx-apt details summary { font-size: 12px; cursor: pointer; margin-top: 4px; }
.printlog .wx-print { display: none; }
@media print {
  .printlog .wx-print { display: block; page-break-before: always; }
  .printlog .wx-print h2 { font-size: 14px; margin: 0 0 4px; }
  .printlog .wx-apt { border: 1px solid #000; border-radius: 0; page-break-inside: avoid; }
  .printlog .wx-raw { background: none; border: 0; padding: 0; }
  .printlog .wx-cat { color: #000; border: 1px solid #000; background: none; }
}
/* Ficha Meteorologia (meteo.js) */
.met-ctl { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.met-ctl label { width: 110px; }
.met-svg { width: 100%; height: auto; display: block; background: #f6f9fc; border: 1px solid #dde3ea; border-radius: 6px; }
.met-svg .met-ax { font-size: 9px; fill: #56606b; }
.met-svg .met-pt { font-size: 10px; font-weight: 700; fill: #1d2733; }
.met-svg .met-ws { font-size: 8px; font-weight: 700; }
.met-svg .met-frz { font-size: 9px; fill: #1f6fd1; font-weight: 700; }
.met-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: #3a4654; margin: 4px 0 8px; }
.met-legend i { display: inline-block; width: 14px; height: 9px; margin-right: 4px; vertical-align: middle; }
.lg-cloud { background: #7d8996; opacity: .7; } .lg-rain { background: repeating-linear-gradient(110deg, #1f6fd1 0 1px, transparent 1px 4px); }
.lg-frz { border-top: 2px dashed #1f6fd1; height: 0 !important; } .lg-plan { border-top: 2px solid #d62f2f; height: 0 !important; } .lg-terr { background: #b58e5f; }
.met-tw { overflow-x: auto; }
.met-table { border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.met-table th, .met-table td { border: 1px solid #dde3ea; padding: 2px 5px; text-align: center; white-space: nowrap; }
.met-table th small, .met-table td small { display: block; font-size: 9px; color: #6b7684; font-weight: 400; }
.met-table td.ok { cursor: pointer; }
.met-table td.ok:hover { background: #eef4fb; }
.met-table td.hd { color: #c62828; font-weight: 600; } .met-table td.tl { color: #2e7d32; font-weight: 600; }
.met-table td.no { color: #aab3bd !important; font-weight: 400 !important; background: #f6f7f9; }
.met-table td.low { text-decoration: line-through; }
.met-table td.best { background: #e3f4e6; }
.met-table td.best::before { content: '★ '; color: #2e7d32; }
.met-table td.cur { outline: 2px solid #1d2733; outline-offset: -2px; }
#tab-meteo h3 { margin: 10px 0 4px; font-size: 14px; }
@media print {
  .printlog .met-print { page-break-before: always; }
  .printlog .met-svg { width: 100%; max-height: 120mm; background: none; }
  .printlog .met-table td.no { background: none; }
}
/* Solapa Perfil */
#tab-profile label { max-width: 360px; }
.prof-svg { margin-top: 6px; touch-action: none; cursor: crosshair; }
.prof-svg .prof-asp { font-size: 9px; font-weight: 700; }
.prof-svg .prof-mark { font-size: 9px; font-weight: 700; fill: #1d2733; }
#prof-info { min-height: 2.6em; font-variant-numeric: tabular-nums; }
.alt-sugg { display: flex; gap: 6px; flex-wrap: wrap; }
#dlg-alt .dlg { max-width: 380px; }
#alt-err { color: #c62828; min-height: 1em; margin: 0; }
/* Peso y balanceo (wb.js) */
.wb-route { margin-top: 10px; }
.wb-route h3 { margin: 0 0 4px; font-size: 14px; }
.wb-loads { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.wb-table { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 6px; width: 100%; }
.wb-table th, .wb-table td { border-bottom: 1px solid #e3e8ee; padding: 2px 6px; text-align: right; }
.wb-table .l { text-align: left; }
.wb-table tr.wb-tot td { border-top: 1px solid #9aa5b1; }
.wb-table tr.bad td { color: #c62828; }
.wb-chart { max-width: 420px; margin-top: 6px; }
.wb-svg { width: 100%; height: auto; background: #fbfcfd; border: 1px solid #dde3ea; border-radius: 6px; }
.wb-svg .wb-ax { font-size: 9px; fill: #56606b; }
.wb-svg .wb-lbl { font-size: 10px; font-weight: 700; }
.wb-status { margin-top: 6px; padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.wb-status.good { background: #e3f4e6; color: #1b5e20; } .wb-status.bad { background: #fdecea; color: #b71c1c; font-weight: 600; }
.wb-editor .grid3 { margin-bottom: 6px; }
.wb-editor .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.wb-editor textarea { font-family: Consolas, monospace; font-size: 12px; }
.wb-editor textarea.bad { border-color: #d62f2f; }
.wb-st-head { margin: 6px 0 2px; }
.wb-st-row { display: grid; grid-template-columns: 1fr 80px 70px auto; gap: 4px; margin-bottom: 3px; }
@media print { .printlog .wb-print { margin-top: 8px; page-break-inside: avoid; } .printlog .wb-svg { max-height: 70mm; border: 0; } .printlog .wb-bad { color: #000; font-weight: 700; } }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs button[role=tab] { white-space: nowrap; }
.wb-ac { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.wb-ac summary { cursor: pointer; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
#warnings .warn.caution { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f0d78c; }
.met-xs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.met-arrows { flex-direction: row; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; display: flex; }
.met-arrows select { width: auto; padding: 2px 4px; font-size: 12px; }
.met-ctl label:has(#met-date) { width: 150px; }
/* Solapa Briefing */
.brief-card { border: 1px solid #dde3ea; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.brief-card h4 { margin: 0 0 4px; font-size: 14px; }
.brief-card .wx-name { font-weight: 400; }
.brief-line { font-size: 12px; margin: 3px 0; }
.brief-fq { display: inline-block; margin-right: 10px; white-space: nowrap; }
.brief-table { border-collapse: collapse; font-size: 12px; margin: 4px 0; width: 100%; font-variant-numeric: tabular-nums; }
.brief-table th, .brief-table td { border-bottom: 1px solid #e3e8ee; padding: 2px 6px; text-align: right; }
.brief-table .l { text-align: left; }
.brief-table tr.fav td { background: #e3f4e6; }
.brief-table .tl-bad { color: #c62828; }
.brief-wx { margin-top: 4px; }
@media print { .printlog .brief-print { page-break-before: always; } .printlog .brief-card { border: 1px solid #000; border-radius: 0; page-break-inside: avoid; } .printlog .brief-table tr.fav td { background: none; font-weight: 700; } }
/* Barra de tiempo del satelite (sat.js) */
.sat-bar { background: rgba(255,255,255,0.92); border-radius: 6px; padding: 4px 8px; display: flex; align-items: center; gap: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.3); font-size: 12px; }
.sat-bar input[type=range] { width: 130px; }
.sat-bar .sat-play { padding: 1px 7px; min-width: 28px; }
.brief-alt { display: flex; gap: 6px; align-items: flex-end; margin-bottom: 8px; }
.brief-alt label { width: 180px; }
.brief-sec { margin-bottom: 12px; }
.brief-sec h3 { margin: 6px 0 4px; font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.brief-line.good { color: #1b5e20; } .brief-line.caution { background: var(--warn-bg); color: var(--warn-ink); padding: 2px 6px; border-radius: 4px; } .brief-line.bad { background: #fdecea; color: #b71c1c; padding: 2px 6px; border-radius: 4px; }
.brief-list { margin: 2px 0 6px; padding-left: 18px; font-size: 12px; }
.brief-list li.bad-item { color: #b71c1c; }
.wx-raw-inline { font-family: Consolas, monospace; font-size: 11px; color: #3a4654; }
.brief-mad { margin-top: 4px; padding: 4px 6px; background: #f6f8fa; border-radius: 4px; font-size: 12px; }
.brief-pre { white-space: pre-wrap; font-size: 11px; }
.brief-table tr.bad td { color: #b71c1c; font-weight: 600; } .brief-table tr.in td { background: #eef4fb; }
.brief-table .tl-warn { color: #8a5a00; font-weight: 600; }
.brief-check { list-style: none; padding-left: 0; font-size: 13px; } .brief-check li { margin: 3px 0; }
.brief-check label { font-size: 13px; color: var(--ink); align-items: flex-start; }
.brief-check label input { margin-top: 2px; }
.dlg .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Destino y alternativa */
.wp-marker .wp-role { position: absolute; left: 100%; top: -6px; margin-left: 2px; background: #1d2733; color: #fff; font-size: 9px; font-weight: 700; padding: 0 3px; border-radius: 3px; white-space: nowrap; }
.wp-marker.altn { background: #7b4fc9 !important; }
.wp-marker.altn .wp-role { background: #7b4fc9; }
.role-tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 3px; color: #fff; background: #1d2733; }
.role-tag.altn { background: #7b4fc9; }
.role-btn { font-size: 10px; padding: 0 5px; }
.wp-role-l { flex-direction: row !important; align-items: center; gap: 3px; font-size: 11px; white-space: nowrap; }
#legs tr.altn-sep td { background: #efe8fb; color: #4a2f86; font-weight: 700; font-size: 11px; padding: 2px 6px; text-align: left; }
#legs tr.leg.altn td, #legs tfoot tr.altn td { color: #4a2f86; }
.printlog tr.altn-sep td { background: #eee; }
.printlog tr.tot td { border-top: 2px solid #000; }
/* Divisor del panel: « amplia, » achica o cierra; se arrastra para elegir el ancho */
.panel { position: relative; }
.panel-grip { position: absolute; left: -11px; top: 0; bottom: 0; width: 11px; cursor: ew-resize; z-index: 1001; touch-action: none; }
.panel-grip:hover { background: rgba(31,111,209,.15); }
.grip-btn { position: absolute; left: -7px; width: 18px; height: 36px; padding: 0; border-radius: 6px 0 0 6px; background: var(--panel); border: 1px solid var(--line); border-right: 0; box-shadow: -1px 0 2px rgba(0,0,0,.08); font-size: 14px; line-height: 1; font-weight: 400; color: #6b7684; cursor: pointer; opacity: 1; }
.grip-btn:hover, .panel-grip:hover .grip-btn { color: #1d2733; background: var(--panel); }
#grip-wide { top: calc(40% - 39px); }
#grip-narrow { top: 40%; }
/* Con el dedo, un area de toque mas grande sin agrandar el dibujo */
@media (pointer: coarse) { .grip-btn::after { content: ''; position: absolute; inset: -8px -10px; } }
.grip-btn.hidden { display: none; }
.layout.wide .panel { width: calc(100% - 56px) !important; }
.layout.wide .met-table { width: 100%; font-size: 13px; }
.layout.wide .met-table td small { font-size: 11px; }
.layout.wide .met-svg .met-ax { font-size: 14px; } .layout.wide .met-svg .met-pt { font-size: 16px; } .layout.wide .met-svg .met-ws { font-size: 13px; } .layout.wide .met-svg .met-frz { font-size: 14px; }
.layout.wide .prof-svg .prof-asp, .layout.wide .prof-svg .prof-mark { font-size: 13px; }
.met-svg { margin: 0 auto; }
.met-svg .met-ax { font-size: 11px; } .met-svg .met-pt { font-size: 12px; } .met-svg .met-ws { font-size: 10px; } .met-svg .met-frz { font-size: 11px; }
.prof-svg .prof-asp, .prof-svg .prof-mark { font-size: 10px; }
@media (max-width: 900px) { .panel-grip { display: none; } }
/* Fila de cada punto: se acomoda en dos renglones si no entra (DEST/ALTN, altitud, elevacion) */
table.legs tr.wp .wp-line { flex-wrap: wrap; row-gap: 4px; }
table.legs tr.wp input.wp-name { width: auto; flex: 1 1 110px; min-width: 90px; max-width: 170px; }
table.legs tr.wp .wp-line > button[data-del] { margin-left: auto; }
table.legs { width: 100%; table-layout: auto; }
.role-btn { font-size: 10px; padding: 1px 6px; border: 1px dashed #9aa5b1; background: #fff; color: #3a4654; border-radius: 10px; white-space: nowrap; cursor: pointer; }
.role-btn:hover { border-style: solid; border-color: #1d2733; color: #1d2733; }
#legs tr.altn-hint td { font-size: 11px; color: #4a2f86; background: #f7f3fd; padding: 4px 6px; text-align: left; white-space: normal; }
#fuel-summary .box.pick { outline: 2px solid #7b4fc9; outline-offset: -2px; }
/* NOTAM con ubicacion en el mapa */
.wx-notams li.has-geo { cursor: pointer; border-radius: 4px; }
.wx-notams li.has-geo:hover { background: #fff1e5; }
.notam-geo { color: #e65c00; font-weight: 700; }
.wb-src { margin: 4px 0 6px; font-size: 12px; } .wb-src .link { font-size: 12px; white-space: nowrap; }
.net-status { background: #fff3cd; color: #6b4e00; border-radius: 12px; padding: 3px 10px; font-size: 12px; font-weight: 600; cursor: help; }
.saved-note { margin: 2px 0 6px; padding: 3px 6px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 4px; font-size: 12px; }
.net-status.bad { background: #fde2e1; color: #9b1c1c; }
.pack-box { border: 1px solid var(--line); border-radius: 6px; margin: 8px 0; padding: 6px 10px; }
.pack-box legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.pack-box .bad { color: var(--bad); font-weight: 600; }
.met-windy { margin: 4px 0 8px; font-size: 12px; }
.btn-windy { display: inline-block; padding: 6px 12px; border-radius: 5px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; font-size: 13px; }
.btn-windy:hover { filter: brightness(1.1); }
.link-windy { font-size: 12px; }
.saved-note.age-ok { background: #eef2f6; color: #3a4654; }
.saved-note.age-warn, .hint.age-warn { background: var(--warn-bg); color: var(--warn-ink); padding: 3px 6px; border-radius: 4px; }
.saved-note.age-bad, .hint.age-bad { background: #fde2e1; color: #9b1c1c; padding: 3px 6px; border-radius: 4px; font-weight: 600; }
/* App (Capacitor): margen para la barra de estado y botones mas faciles de tocar. */
.is-app .topbar { padding-top: calc(8px + env(safe-area-inset-top)); }
.is-app button, .is-app .tabs [data-tab] { min-height: 36px; }
.is-app .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; }
.is-app body { -webkit-tap-highlight-color: transparent; }
.maps-list { list-style: none; margin: 4px 0; padding: 0; font-size: 13px; }
.maps-list li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.maps-list li .name { font-weight: 600; }
.maps-list button { font-size: 12px; padding: 2px 8px; }

/* ---------- Telefono (hasta 700 px): barra compacta con menu, mapa fijo y panel como hoja que se sube ---------- */
.btn-menu, .sheet-handle, #net-status-m, .only-compact { display: none; }
.credits-dlg { font-size: 13px; line-height: 1.5; }
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) {
  html, body { height: 100%; overflow: hidden; }
  body { display: flex; flex-direction: column; height: 100dvh; }
  .topbar { flex-wrap: nowrap; padding: 6px 10px; padding-top: calc(6px + env(safe-area-inset-top)); gap: 8px; position: relative; z-index: 1200; }
  .topbar .brand { font-size: 18px; }
  .btn-menu { display: block; margin-left: auto; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); font-size: 20px; line-height: 1; padding: 6px 12px; min-height: 40px; }
  #net-status-m:not(.hidden) { display: inline-block; font-size: 11px; padding: 2px 8px; max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .actions { display: none; position: absolute; right: 8px; top: 100%; flex-direction: column; align-items: stretch; background: #0f2a44; padding: 8px; border-radius: 0 0 8px 8px; box-shadow: 0 6px 18px rgba(0,0,0,.35); min-width: 200px; }
  .actions.open { display: flex; }
  .actions button { min-height: 44px; text-align: left; font-size: 15px; }
  .actions .sep, .actions #net-status { display: none !important; }
  .actions .only-compact { display: block; }
  footer.credits { display: none; }
  .is-app #btn-print { display: none; }
  .disclaimer { font-size: 11px; padding: 4px 8px; }
  .layout { flex: 1; flex-direction: column; min-height: 0; position: relative; }
  #map { flex: 1; height: auto; min-height: 0; }
  .panel, .layout.wide .panel { width: 100% !important; height: var(--sheet-h, 50%); flex: none; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.18); border-radius: 12px 12px 0 0; overflow: hidden; transition: height .18s ease; }
  .panel.dragging { transition: none; }
  .layout.collapsed .panel { display: flex; }
  .panel-grip, #panel-show, .tabs .panel-hide { display: none !important; }
  .sheet-handle { display: flex; justify-content: center; align-items: center; height: 22px; flex: none; cursor: grab; touch-action: none; }
  .sheet-handle span { width: 44px; height: 5px; border-radius: 3px; background: #c3cbd5; }
  .tabs { flex: none; }
  .tabs button { padding: 8px 11px; font-size: 13px; min-height: 40px; }
  .tab-body { overflow-y: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; padding: 8px !important; }
  .panel.sheet-peek .tab-body { visibility: hidden; }
  /* Tabla de tramos mas compacta para que entre en el ancho */
  table.legs { font-size: 12px; }
  table.legs td, table.legs th { padding: 3px 2px; }
  table.legs input { font-size: 13px; padding: 3px 4px; }
  table.legs tr.leg input { width: 36px !important; min-width: 0; }
  table.legs tr.leg td:first-child { max-width: 62px; font-size: 11px; word-break: break-word; }
  table.legs td small, table.legs .dm { font-size: 10px; }
  .tab-body input, .tab-body select, .tab-body textarea, dialog input, dialog select { font-size: 16px; }
  .leaflet-popup-content { max-width: calc(100vw - 70px); }
  .leaflet-control-layers-expanded { max-height: 60vh; overflow-y: auto; }
  dialog { width: calc(100vw - 16px); max-width: none; max-height: 88dvh; overflow-y: auto; margin: auto; }
  .dlg-actions button { min-height: 44px; }
}
.only-app { display: none; }
.is-app .only-app { display: block; }
#upd-notes { margin: 6px 0; padding-left: 20px; }
.ac-form input.bad { border-color: var(--bad); background: #fff5f5; }

/* ---------- Pantalla de vuelo (GPS) ---------- */
body.flying .topbar, body.flying .disclaimer, body.flying .panel, body.flying .panel-show { display: none !important; }
body.flying .layout { position: fixed; inset: 0; }
body.flying #map { position: fixed; left: 0; top: 0; width: 100vw; height: 100dvh; flex: none; transform-origin: 50% 50%; }
.flight { position: fixed; inset: 0; z-index: 1500; pointer-events: none; font-family: system-ui, sans-serif; }
.flight > * { pointer-events: auto; }
.flight.hidden { display: none; }
.fl-banner { position: absolute; top: 0; left: 0; right: 0; padding: calc(4px + env(safe-area-inset-top)) 10px 4px; background: rgba(155, 28, 28, .92); color: #fff; font-size: 12px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-next { position: absolute; top: calc(30px + env(safe-area-inset-top)); left: 8px; right: 70px; background: rgba(15, 42, 68, .92); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 18px; font-weight: 700; }
.fl-next small { font-size: 12px; font-weight: 400; opacity: .85; }
.fl-alerts { position: absolute; top: calc(78px + env(safe-area-inset-top)); left: 8px; right: 70px; }
.fl-alerts div { background: #fff3cd; color: #6b4e00; border-radius: 6px; padding: 5px 9px; margin-bottom: 4px; font-size: 14px; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.fl-alerts div.bad { background: #fde2e1; color: #9b1c1c; }
.fl-alerts div.taws { background: #c62828; color: #fff; font-size: 17px; padding: 8px 10px; animation: taws-blink 1s steps(2, start) infinite; }
@keyframes taws-blink { 50% { background: #8e0000; } }
.fl-side { position: absolute; right: 8px; top: calc(30px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 8px; }
.fl-side button { width: 54px; height: 54px; font-size: 20px; font-weight: 700; border-radius: 10px; background: rgba(255,255,255,.95); color: #0f2a44; border: 1px solid #9aa7b5; box-shadow: 0 1px 4px rgba(0,0,0,.3); padding: 0; }
.fl-side button.on { background: #0f2a44; color: #fff; }
.fl-data { position: absolute; left: 0; right: 0; bottom: calc(50px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(15, 42, 68, .95); color: #fff; }
.fl-data .c { padding: 4px 6px; background: rgba(15, 42, 68, .95); text-align: center; }
.fl-data .k { font-size: 11px; opacity: .75; }
.fl-data .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; }
.fl-data .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-data .v small { font-size: 12px; font-weight: 400; }
.fl-data .c.warn .v { color: #ffd166; } .fl-data .c.bad .v { color: #ff8a80; }
.fl-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: calc(50px + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); display: flex; align-items: center; gap: 8px; background: #0b1f33; }
.fl-bottom .fl-end { margin-left: auto; min-height: 38px; padding: 0 18px; font-size: 16px; font-weight: 700; background: #fff; color: #0b1f33; border: 0; border-radius: 8px; }
.fl-bottom #fl-simbox { color: #cfe0f1; font-size: 13px; }
.fl-bottom #fl-simbox button { min-height: 34px; margin-left: 4px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; padding: 0 10px; }
.fl-plane { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
@media (min-width: 701px) { .fl-data { grid-template-columns: repeat(8, 1fr); } }
/* Noche: el mapa atenuado y los paneles oscuros */
body.flying.night #map { filter: brightness(.5) contrast(1.1) saturate(.8); }
body.flying.night .fl-side button { background: #1b2a3a; color: #c9d6e3; border-color: #34495e; }
body.flying.night .fl-next, body.flying.night .fl-data, body.flying.night .fl-data .c { background: rgba(5, 12, 20, .95); }

label.chk { display: flex; align-items: center; gap: 8px; }
label.chk input { width: auto; margin: 0; }
html:not(.is-app) label.only-app { display: none; }

/* Visor de PDF de la app */
.pdfview { position: fixed; inset: 0; z-index: 3000; background: #525659; display: flex; flex-direction: column; }
.pdfview.hidden { display: none; }
.pv-bar { display: flex; align-items: center; gap: 6px; padding: calc(6px + env(safe-area-inset-top)) 8px 6px; background: #0f2a44; color: #fff; }
.pv-bar button { min-width: 44px; min-height: 40px; font-size: 20px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 0 10px; }
.pv-bar #pv-title { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-bar button:disabled { opacity: .35; }
.pv-bar #pv-pg { min-width: 34px; text-align: center; font-size: 13px; }
.pv-bar #pv-geo { background: #1557b0; border-color: #1557b0; }
.cv-body { flex: 1; position: relative; min-height: 0; }
.cv-map { position: absolute; inset: 0; background: #525659; }
.cv-map .leaflet-image-layer { box-shadow: 0 1px 6px rgba(0,0,0,.45); }
.cv-msg { position: absolute; left: 0; right: 0; top: 0; z-index: 500; color: #fff; background: rgba(40,44,48,.85); font-size: 15px; line-height: 1.45; padding: 16px; }
.cv-msg.hidden { display: none; }
.cv-list { position: absolute; inset: 0; z-index: 600; overflow: auto; background: var(--panel, #fff); color: var(--ink, #111); padding: 8px 12px 24px; -webkit-overflow-scrolling: touch; }
.cv-list.hidden { display: none; }
.cv-list h3 { margin: 14px 0 4px; font-size: 15px; }
.cv-list h4 { margin: 10px 0 2px; font-size: 13px; color: var(--muted, #555); }
.cv-item { display: block; width: 100%; text-align: left; padding: 10px 8px; margin: 2px 0; background: none; border: 0; border-bottom: 1px solid rgba(0,0,0,.08); font-size: 15px; color: inherit; }
.cv-item.cv-proc { border-left: 3px solid #7b1fa2; background: rgba(123,31,162,.06); }
a.cv-item { text-decoration: none; box-sizing: border-box; } /* cartas de Uruguay en la web: enlace al sitio de DINACIA */
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) { .pv-bar .pv-zoom, .pv-bar #pv-close { display: none; } .pv-bar button { min-width: 38px; padding: 0 6px; } }

/* Anotador a mano alzada (notepad.js) */
.map-notes .search-btn { font-size: 18px; font-weight: 700; }
.np { position: fixed; inset: 0; z-index: 2500; display: flex; flex-direction: column; background: #d9dde2; font-family: system-ui, sans-serif; }
.np.hidden { display: none; }
.np-bar, .np-tools { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #0f2a44; color: #fff; flex-wrap: nowrap; overflow-x: auto; flex: none; }
.np-bar > *, .np-tools > * { flex: none; }
.np-bar .np-title { flex: 1 1 auto; }
.np-bar { padding-top: calc(6px + env(safe-area-inset-top)); }
.np-tools { background: #17385a; }
.np button { min-width: 42px; min-height: 40px; padding: 0 8px; font-size: 18px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.np button.on { background: #fff; color: #0f2a44; }
.np button i { display: inline-block; border-radius: 50%; background: currentColor; }
.np button i.np-c0 { width: 18px; height: 18px; background: #111; border: 2px solid #fff; }
.np button i.np-c1 { width: 18px; height: 18px; background: #1557b0; border: 2px solid #fff; }
.np button i.np-c2 { width: 18px; height: 18px; background: #c62828; border: 2px solid #fff; }
.np.np-dark button i.np-c0 { background: #f2f2f2; } .np.np-dark button i.np-c1 { background: #7cc4ff; } .np.np-dark button i.np-c2 { background: #ff9e7a; }
.np-page { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.np-tpl { width: auto; min-height: 40px; padding: 0 6px; border-radius: 8px; }
.np-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; font-size: 14px; }
.np-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.25); margin: 0 2px; }
.np-wrap { flex: 1; overflow: auto; padding: 4px; text-align: center; }
.np.np-dark { background: #000; }
.np-canvas { display: inline-block; touch-action: none; -webkit-user-select: none; user-select: none; box-shadow: 0 1px 6px rgba(0,0,0,.35); cursor: crosshair; }
.np-tools { flex-wrap: wrap; overflow-x: visible; justify-content: center; gap: 5px; }
.np-tools button { min-width: 40px; min-height: 38px; }
.np .np-tpl { color: #0f2a44; background: #fff; border: 0; font-size: 15px; }

/* Vuelos grabados */
#tracks-list li { display: block; }
#tracks-list .tr-main { display: flex; flex-direction: column; gap: 2px; }
#tracks-list .tr-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
#tracks-list li.empty { color: #666; }

/* ---------- Telefono: barra de botones abajo y pantallas completas ---------- */
.bnav, .scr-more, .scr-head, .nocert-chip { display: none; }
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) {
  :root { --bnav-h: 58px; }
  .topbar, .disclaimer { display: none !important; }
  .layout { flex: 1; min-height: 0; }
  .bnav { display: flex; flex: none; height: calc(var(--bnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #0f2a44; border-top: 1px solid #0a1d30; position: relative; z-index: 1400; }
  .bnav button { flex: 1 1 0; min-width: 0; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 0 2px; background: transparent; color: #b9cadb; border: 0; border-radius: 0; font-size: 10.5px; line-height: 1.1; }
  .bnav button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .bnav button[data-scr="aircraft"] svg { fill: currentColor; stroke: none; }
  .bnav button.on { color: #fff; background: rgba(255,255,255,.12); box-shadow: inset 0 3px 0 #5fb0ff; }
  .bnav button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  /* Las pantallas (Ruta, Avion, Meteo, Briefing) son el panel a pantalla completa sobre el mapa. */
  .panel, .layout.wide .panel { display: none !important; position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); width: auto !important; height: auto !important; z-index: 1300; border: 0; border-radius: 0; box-shadow: none; flex-direction: column; background: var(--bg, #fff); }
  body.scr-panel .panel, body.scr-panel .layout.wide .panel, body.scr-panel .layout.collapsed .panel { display: flex !important; }
  /* Pestanas de una pantalla (Ruta | Perfil, Avion | Peso y balanceo): selector de dos opciones bien visible */
  .tabs:not(.scr-one) { display: flex; gap: 0; margin: 8px 10px 4px; padding: 3px; background: #e3e9f0; border-radius: 10px; border: 0; }
  .tabs:not(.scr-one) button:not(.scr-off) { flex: 1; min-height: 40px; font-size: 15px; font-weight: 700; border: 0; border-radius: 8px; background: transparent; color: #33475b; }
  .tabs:not(.scr-one) button.active { background: #0f2a44; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
  .scr-head { display: flex; align-items: center; gap: 8px; flex: none; min-height: 52px; padding: env(safe-area-inset-top) 8px 0; background: #0f2a44; color: #fff; font-size: 18px; font-weight: 700; }
  .scr-head .scr-back { min-width: 48px; min-height: 44px; font-size: 22px; background: transparent; color: #fff; border: 0; padding: 0; }
  .scr-head .net-status:not(.hidden) { margin-left: auto; font-size: 11px; }
  .sheet-handle { display: none !important; }
  .tabs button.scr-off { display: none; }
  .tabs.scr-one { display: none; }
  .scr-more { position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); z-index: 1300; display: flex; flex-direction: column; background: #f4f6f9; }
  .scr-more.hidden { display: none; }
  .more-body { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
  .more-body h3 { margin: 14px 4px 6px; font-size: 12px; text-transform: none; color: #5a6b7d; font-weight: 700; letter-spacing: .02em; }
  .more-body button { display: block; width: 100%; min-height: 48px; text-align: left; font-size: 16px; padding: 0 14px; margin: 0 0 1px; background: #fff; color: #0f2a44; border: 1px solid #dde3ea; border-radius: 0; }
  .more-body h3 + button { border-radius: 10px 10px 0 0; }
  .more-body button:has(+ h3), .more-body button:has(+ p), .more-body button:last-child { border-radius: 0 0 10px 10px; }
  .is-app .more-body .no-app { display: none; }
  .nocert-chip { display: block; position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 1000; padding: 3px 10px; min-height: 0; font-size: 11px; font-weight: 700; color: #7a1010; background: rgba(255,240,240,.92); border: 1px solid #e6a5a5; border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
  #net-status-m:not(.hidden) { display: block; position: absolute; top: calc(34px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 1000; max-width: 70vw; font-size: 11px; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.flying .nocert-chip, body.flying #net-status-m { display: none !important; }
  /* La barra de abajo queda siempre a la vista: el vuelo, el anotador y el visor de PDF terminan arriba de ella. */
  .flight { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); z-index: 1100; }
  body.flying #map { height: calc(100dvh - var(--bnav-h) - env(safe-area-inset-bottom)); }
  body.flying .bnav { position: fixed; left: 0; right: 0; bottom: 0; }
  .flight .fl-bottom { height: 50px; padding-bottom: 6px; }
  .flight .fl-data { bottom: 50px; }
  .np, .pdfview { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); z-index: 1350; }
}

/* Atribucion del mapa: boton ⓘ abajo a la derecha; la lista se despliega encima */
.leaflet-control-attribution { display: none; }
.leaflet-control-attribution.open { display: block; position: absolute; right: 8px; bottom: 34px; width: max-content; max-width: min(420px, calc(100vw - 24px)); padding: 6px 8px; font-size: 12px; line-height: 1.5; background: rgba(255,255,255,.96); border-radius: 6px; box-shadow: 0 1px 6px rgba(0,0,0,.3); white-space: normal; }
.leaflet-bottom.leaflet-right { position: absolute; }
.attr-btn { float: right; clear: both; margin: 0 8px 8px 0; width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%; font-size: 16px; line-height: 24px; text-align: center; color: #33475b; background: rgba(255,255,255,.85); border: 1px solid rgba(0,0,0,.25); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer; pointer-events: auto; }
body.flying .attr-btn, body.flying .leaflet-control-attribution { display: none !important; }

/* Punto de la ruta listo para mover con el dedo (despues de mantenerlo apretado) */
.wp-marker.wp-moving { outline: 3px solid #ffb300; outline-offset: 2px; transform-origin: center; animation: wp-pulse 0.9s ease-in-out infinite alternate; }
@keyframes wp-pulse { from { box-shadow: 0 0 0 0 rgba(255,179,0,.7); } to { box-shadow: 0 0 0 10px rgba(255,179,0,0); } }

/* Cartas de aerodromo (AIP AD 2.24) en la ventanita y el Briefing */
details.cartas { margin: 6px 0 2px; }
details.cartas summary { cursor: pointer; font-weight: 600; color: var(--accent, #1557b0); }
.cartas-g { margin: 4px 0 2px; }
.cartas-g b { display: block; font-size: 12px; color: #5a6b7d; margin-top: 4px; }
.cartas-g a.pdf-link { display: inline-block; margin: 2px 6px 0 0; }
.cartas-g .meta { font-size: 11px; margin-right: 10px; }

/* Procedimientos IFR */
.procs .cartas-g button.link { display: block; text-align: left; padding: 3px 0; min-height: 0; }
.proc-fix i { display: block; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 2px; transform: rotate(45deg); box-shadow: 0 0 2px rgba(0,0,0,.5); }
.proc-fix span { position: absolute; left: 10px; top: -21px; white-space: nowrap; font: 600 11px system-ui, sans-serif; color: #1d2733; background: rgba(255,255,255,.85); padding: 0 3px; border-radius: 3px; }
.ifr-warn { background: #fde2e1; color: #7a1010; font-size: 12px; font-weight: 600; padding: 4px 6px; border-radius: 4px; margin: 4px 0; }
.proc-min { font-size: 12px; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.proc-min label { display: inline-flex; align-items: center; gap: 3px; margin: 0; }
.proc-min input { width: 72px !important; display: inline-block; margin: 0 2px; padding: 2px 4px; }
table.proc-tab { font-size: 11px; border-collapse: collapse; width: 100%; }
table.proc-tab td, table.proc-tab th { padding: 1px 4px; border-bottom: 1px solid #e3e8ee; text-align: left; }

/* Ventanita del mapa: alto maximo segun el mapa (--popup-max, app.js) y desplazamiento adentro */
.leaflet-popup-content { max-height: var(--popup-max, 70vh); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
details.wx-notam summary { cursor: pointer; }
/* Telefono: con una ventanita abierta, sin los controles de arriba ni el aviso (quedarian encima de ella) */
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) { body.popup-open .leaflet-top, body.popup-open .nocert-chip, body.popup-open #net-status-m { visibility: hidden; } }

/* Progreso de la actualizacion de la app */
.upd-prog { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.upd-prog.hidden { display: none; }
.upd-prog progress { flex: 1; height: 14px; }
/* Hoja de ruta: nombres y tipo de punto que llevan al mapa con su ficha */
table.legs .goto { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
table.legs button.kind.goto { background: none; border: 0; padding: 0 2px; min-height: 0; color: var(--accent, #1557b0); font-size: 11px; text-decoration: none; }
/* Briefing: procedimiento IFR elegido en la ruta */
.brief-proc { margin: 6px 0; padding: 6px 8px; border-left: 3px solid #7b1fa2; background: rgba(123, 31, 162, .06); border-radius: 4px; }
.brief-proc > div { margin: 2px 0; }
.brief-proc .pbtns { display: inline-flex; gap: 6px; margin: 0 0 0 6px; }
/* Procedimientos IFR activos en la ruta */
.proc-tags { margin: 4px 0 6px; font-size: 12px; }
.proc-tag { display: inline-flex; align-items: center; gap: 2px; margin: 2px 4px 2px 0; padding: 1px 2px 1px 6px; border-radius: 10px; color: #fff; background: #7b1fa2; }
.proc-tag.t-SID { background: #0b7a4b; }
.proc-tag.t-STAR { background: #1557b0; }
.proc-tag button.link { color: #fff; padding: 0 4px; min-height: 0; text-decoration: none; }
.proc-tags .caution, .brief-proc .caution { color: #a15c00; margin-top: 2px; }
/* Flechas de sentido y rumbo de los tramos de los procedimientos */
.proc-arrow svg { display: block; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }
.proc-crs span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 700 11px system-ui, sans-serif; background: rgba(255,255,255,.8); padding: 0 2px; border-radius: 3px; }
/* Pantalla de vuelo: Directo a (D→), frustrada y restricciones del proximo fijo */
.fl-dto { font-weight: 800; font-size: 18px; min-width: 64px; background: #d500f9 !important; color: #fff !important; border: 0 !important; }
.fl-missed { font-weight: 700; background: #c62828 !important; color: #fff !important; border: 0 !important; }
.fl-dto-lbl { color: #d500f9; }
.fl-restr { display: inline-block; padding: 0 5px; margin-left: 4px; border-radius: 4px; background: #7b1fa2; color: #fff; font-size: .85em; }
.fl-dto-x, .fl-offer button { margin-left: 6px; padding: 2px 8px; min-height: 0; font-size: 12px; }
.fl-offer { display: block; margin-top: 4px; font-size: 13px; }
.fl-dtobox { position: absolute; left: 8px; right: 8px; bottom: 64px; z-index: 30; max-height: 60%; overflow: auto; background: var(--panel, #fff); color: var(--ink, #111); border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.35); padding: 8px; }
.fl-dtobox.hidden { display: none; }
.fl-dtohead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.fl-dtobox input { width: 100%; font-size: 16px; padding: 8px; box-sizing: border-box; }
.fl-dtobox ul { list-style: none; margin: 6px 0 0; padding: 0; }
.fl-dtobox li { padding: 10px 6px; border-bottom: 1px solid rgba(0,0,0,.08); cursor: pointer; }
.dto-lbl { position: absolute; transform: translate(8px, -50%); white-space: nowrap; font: 800 13px system-ui, sans-serif; color: #fff; background: #d500f9; padding: 1px 6px; border-radius: 4px; }
/* Punto de la ruta que es fijo de un procedimiento: el numero va arriba a la izquierda, chico, para que se lea el
   nombre del fijo (a la derecha) */
.wp-marker.wp-proc { width: 17px !important; height: 17px !important; margin-left: -24px !important; margin-top: -24px !important; font-size: 9px; border-width: 1.5px; }
/* Visor de cartas: linea de estado (de donde sale, bajada, dibujo, error) y marcas de guardado en las listas */
.cv-status { flex: none; font-size: 12px; line-height: 1.3; padding: 3px 8px; background: #1d2733; color: #e8eef5; }
.cv-status.hidden { display: none; }
.cv-status.err { background: #7a1010; color: #fff; }
.cv-status button { min-height: 0; padding: 2px 8px; margin-left: 4px; font-size: 12px; }
.pdf-mark { font-size: 11px; margin-left: 3px; color: var(--muted, #667); white-space: nowrap; }
.pdf-mark.ok { color: #1b7f3b; }
details.chart-log { margin-top: 8px; font-size: 12px; }
details.chart-log li { margin: 2px 0; }
/* Datos sin conexion: resumen, fila por region (Mapa y Cartas) y aviso al abrir */
.offline-summary { margin: 4px 0 8px; font-size: 13px; }
.offline-summary > div { margin: 2px 0; }
.offline-summary button { margin-top: 4px; }
.maps-list .off-cell { display: block; margin: 2px 0 2px 10px; font-size: 13px; }
.offline-offer { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 1400; background: #0f2a44; color: #fff; border-radius: 10px; padding: 8px 10px; box-shadow: 0 2px 10px rgba(0,0,0,.35); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.offline-offer.hidden { display: none; }
.offline-offer .msg { flex: 1 1 200px; }
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) { .offline-offer { bottom: calc(var(--bnav-h) + 8px + env(safe-area-inset-bottom)); } }
.offline-offer button:not(.primary) { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
/* Perfil vertical: arrastrar de costado con el dedo recorre el perfil (no se lo lleva el desplazamiento de la pagina) */
#prof-svg { touch-action: pan-y; }
/* Telefono acostado: encabezado y selector de pestanas mas bajos, para que entre el contenido (perfil, cartas) */
@media (max-height: 500px) and (hover: none) and (max-width: 950px) {
  .scr-head { min-height: 40px; font-size: 16px; }
  .tabs:not(.scr-one) { margin: 4px 10px 2px; }
  .tabs:not(.scr-one) button:not(.scr-off) { min-height: 32px; font-size: 14px; }
  .bnav button { min-height: 0; }
}
/* Salir del modo vuelo: botones grandes, uno debajo del otro, para tocar con turbulencia */
.fl-exit-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.fl-exit-btns button { min-height: 60px; font-size: 18px; font-weight: 700; border-radius: 10px; border: 1px solid #b9c7d6; background: #fff; color: #0b1f33; }
.fl-exit-btns button.primary { min-height: 72px; font-size: 20px; background: #1565c0; border-color: #1565c0; color: #fff; }
.fl-exit-btns button.danger { background: #fff; border: 2px solid #c62828; color: #c62828; }
/* Vuelo en segundo plano (mapa, cartas, notas): franja fija para volver a la pantalla de vuelo */
.fl-return { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 3100; min-height: 48px; max-width: calc(100vw - 16px); padding: 0 18px; border: 0; border-radius: 24px; background: #d81b7a; color: #fff; font-size: 15px; box-shadow: 0 4px 14px rgba(0,0,0,.3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-return b { text-decoration: underline; }
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) { .fl-return { bottom: calc(var(--bnav-h) + 10px + env(safe-area-inset-bottom)); } }
/* Bitacora automatica: indicador discreto arriba al centro, en cualquier pantalla */
.log-chip { position: fixed; top: calc(6px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 3050; max-width: calc(100vw - 140px); padding: 3px 10px; border: 1px solid #b9c7d6; border-radius: 14px; background: rgba(255,255,255,.92); color: #34495e; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.log-chip.run { background: #fff3e0; border-color: #ef6c00; color: #b34700; font-weight: 700; }
.log-chip.fly { background: #e3f2fd; border-color: #1565c0; color: #0d47a1; font-weight: 700; }
.log-chip.off { color: #8a97a5; }
body.flying .log-chip { display: none; }
.logpref { border: 1px solid #dde4ec; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.tr-review { font-size: 11px; font-weight: 700; color: #b34700; background: #fff3e0; border-radius: 8px; padding: 1px 6px; }
/* Plan de vuelo (FPL) */
.dlg-fpl { width: min(760px, calc(100vw - 16px)); }
.fpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px 10px; margin: 6px 0; }
.fpl-grid input, .dlg-fpl textarea, .dlg-fpl input { font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.dlg-fpl #fpl-when { text-transform: none; font-family: inherit; }
.dlg-fpl .bad { border-color: #c62828 !important; background: #fff5f5; }
.fpl-check { margin: 8px 0; font-size: 13px; }
.fpl-check .e { color: #c62828; } .fpl-check .w { color: #b34700; } .fpl-check .ok { color: #2e7d32; font-weight: 700; }
.fpl-aro { background: #f4f6f9; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.fpl-aro .conf { color: #b34700; font-weight: 700; }
.fpl-text { background: #0b1f33; color: #e6f0fa; padding: 8px 10px; border-radius: 8px; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.fpl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.fpl-actions button { min-height: 44px; }
.fpl-hist li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.fpl-hist .msgs { font-size: 11px; color: #5b6b7b; width: 100%; }
.fpl-people { margin: 4px 0 8px; font-size: 14px; }
.sig-pad { width: 100%; max-width: 420px; height: 140px; border: 1px dashed #8a97a5; border-radius: 6px; background: #fff; touch-action: none; display: block; }
.btn-call { display: flex; align-items: center; justify-content: center; min-height: 72px; border-radius: 10px; background: #2e7d32; color: #fff; font-size: 20px; font-weight: 700; text-decoration: none; }
/* ↻ Actualizar / Reintentar de METAR, TAF y NOTAM */
.wx-refresh { font-size: 12px; padding: 2px 8px; min-height: 26px; border: 1px solid #b9c7d6; border-radius: 6px; background: #fff; color: #1565c0; cursor: pointer; }
.wx-refresh.wx-retry { background: #1565c0; border-color: #1565c0; color: #fff; font-weight: 700; font-size: 13px; padding: 4px 12px; min-height: 32px; }
.wx-refresh.spin { opacity: .75; pointer-events: none; }
.wx-ico { display: inline-block; }
.wx-refresh.spin .wx-ico { animation: wx-spin 0.9s linear infinite; }
@keyframes wx-spin { to { transform: rotate(360deg); } }
.wx-actions { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; flex-wrap: wrap; }
.wx-upd { font-size: 11px; color: #5b6b7b; }
.wx-fail { color: #b34700 !important; }
.wx-old { color: #8a4b00; background: #fff3d6; padding: 3px 6px; border-radius: 4px; font-weight: 600; }
.wx-links { font-size: 12px; }
.wx-all { margin: 6px 0; }
.google-native { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid #dadce0; border-radius: 22px; background: #fff; color: #3c4043; font-size: 15px; font-weight: 600; }
/* Progreso de descargas largas: cartel abajo (sin capa que tape el resto) o pestaña chica al costado */
.prog-card { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 1450; max-width: 520px; margin: 0 auto; background: #0f2a44; color: #fff; border-radius: 10px; padding: 8px 10px; box-shadow: 0 2px 10px rgba(0,0,0,.35); font-size: 13px; touch-action: pan-y; transition: transform .2s; }
.prog-card.hidden, .prog-tab.hidden { display: none; }
.prog-head { display: flex; align-items: center; gap: 8px; }
.prog-head b { flex: 1; }
.prog-min { min-width: 40px; min-height: 32px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; font-size: 18px; line-height: 1; }
.prog-detail { margin: 4px 0; opacity: .9; }
.prog-bar { height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; overflow: hidden; }
.prog-bar span { display: block; height: 100%; width: 0; background: #4fc3f7; transition: width .3s; }
.prog-card.bad .prog-bar span { background: #ffb74d; }
.prog-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.prog-btns button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); min-height: 32px; }
.prog-tab { position: fixed; right: 0; top: 42%; z-index: 1450; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px 5px 6px; border: 0; border-radius: 10px 0 0 10px; background: #0f2a44; color: #fff; font-size: 10px; box-shadow: -2px 2px 8px rgba(0,0,0,.3); }
.prog-tab.bad { background: #b34700; }
.prog-tab.ok { background: #2e7d32; }
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) { .prog-card { bottom: calc(var(--bnav-h) + 8px + env(safe-area-inset-bottom)); } }
/* Agregar punto desde la hoja de ruta */
.add-pt-row td { padding: 8px 4px; }
.add-pt { min-height: 44px; width: 100%; font-size: 16px; }
/* "+" para insertar un punto en el tramo: chico y discreto (22 px a la vista, 44 px para tocar), a la derecha de la
   fila del tramo, sin ocupar lugar en la linea */
table.legs .ins-pt, .ins-pt { position: relative; margin-right: 6px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; min-width: 0 !important; min-height: 0 !important; margin: 0; padding: 0; border-radius: 50%; border: 1px solid #b9c7d6; background: #f4f7fb; color: #4a6a8f; font-weight: 600; font-size: 15px; line-height: 1; vertical-align: middle; }
.ins-pt::before { content: ''; position: absolute; inset: -11px; }
.ins-pt:hover, .ins-pt:focus-visible { border-color: #1565c0; color: #1565c0; }
.role-tag.auto { border: 1px dashed currentColor; background: transparent; cursor: pointer; min-height: 0; padding: 1px 6px; }
.role-tag.dest.auto { color: #0f2a44; }
.addpt-list li button { display: block; width: 100%; text-align: left; min-height: 44px; padding: 6px 10px; background: #fff; border: 1px solid #dde4ec; border-radius: 8px; margin: 4px 0; }
#addpt-q { width: 100%; min-height: 44px; font-size: 16px; }
.pick-cross { display: none; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1300; font-size: 44px; font-weight: 300; color: #d0021b; pointer-events: none; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
body.picking .pick-cross { display: block; }
.pick-bar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 1460; max-width: 520px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #0f2a44; color: #fff; border-radius: 10px; padding: 8px 10px; }
.pick-bar.hidden { display: none; }
.pick-bar span { flex: 1 1 100%; font-size: 13px; }
.pick-bar button { flex: 1; min-height: 48px; font-size: 16px; }
.pick-bar button:not(.primary) { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) { .pick-bar { bottom: calc(var(--bnav-h) + 8px + env(safe-area-inset-bottom)); } }
body.picking .offline-offer { display: none; }
.fpl-rpts { font-size: 12px; margin: 2px 0 8px; color: #34495e; }
.fpl-changed { font-size: 13px; margin: 6px 0; padding: 6px 8px; border-left: 3px solid #e09b00; background: #fff6e0; }
.fpl-changed code { font-size: 12px; }
.fpl-rpts code { font-weight: 700; color: #0d2b6b; }
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) { table.legs tr.leg { position: relative; } table.legs .ins-pt { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); margin: 0; } }
/* Vista previa del plan de vuelo en el visor de cartas */
.pv-fplbar { background: #0f2a44; color: #fff; padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; }
.pv-fplbar.hidden { display: none; }
.pv-fplmsg { font-size: 12px; max-height: 30vh; overflow-y: auto; }
.pv-fplmsg .e { color: #ffab91; } .pv-fplmsg .w { color: #ffe082; } .pv-fplmsg .ok { color: #a5d6a7; }
.pv-fplbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-fplbtns button { flex: 1 1 auto; min-height: 44px; }
.pv-fplbtns button:not(.primary) { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
.pdfview.fpl-mode #pv-list-btn, .pdfview.fpl-mode #pv-fav { display: none; }
.is-app .no-app { display: none !important; }
.date-old { background: #fff3e0; border: 1px solid #ef6c00; color: #8a3a00; border-radius: 8px; padding: 6px 8px; margin: 6px 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.date-old.hidden { display: none; }
.date-old button { min-height: 36px; }
.cv-item.cv-old .meta { color: #c62828; font-weight: 700; }
.ac-row { display: flex; gap: 8px; align-items: flex-end; margin: 8px 0; }
.ac-row .ac-sel { flex: 1 1 auto; min-width: 0; }
.ac-row .ac-sel select { width: 100%; min-width: 0; }
.ac-row .ac-fuel { flex: 0 0 92px; }
.ac-row .ac-fuel input { width: 100%; }
.ac-row #plan-acfile { flex: 0 0 auto; min-height: 36px; white-space: nowrap; }
.cv-tag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 3px; background: #fce4ec; color: #ad1457; font-size: 10px; font-weight: 700; white-space: nowrap; }

/* Cartas de aerodromo superpuestas al mapa */
.geo-panel { background: rgba(255,255,255,.95); padding: 6px 8px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.3); font-size: 12px; max-width: 340px; color: #222; }
.geo-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.geo-row .geo-n { cursor: pointer; text-decoration: underline dotted; flex: 1 1 100%; }
.geo-row input[type=range] { flex: 1 1 auto; }
.geo-row input[type=range] { width: 90px; }
.geo-x { border: 0; background: none; cursor: pointer; font-size: 14px; padding: 0 4px; }
.geo-st { font-size: 11px; padding: 0 4px; border-radius: 3px; }
.geo-verificada { background: #e3f4e5; color: #1b5e20; } .geo-aproximada { background: #fff3d6; color: #8a4b00; }
.geo-note { margin-top: 5px; color: #555; font-size: 11px; }
.geo-btn { font-size: 12px; padding: 1px 6px; margin-left: 6px; cursor: pointer; }
.geo-pgs { font-size: 12px; margin-left: 6px; } .geo-pgs .geo-btn { margin-left: 2px; padding: 0 5px; }
.geo-chart { image-rendering: auto; }

/* Botones redondos de informacion (fuentes del mapa, leyendas del selector de capas): circulos perfectos tambien en
   Android con la letra del sistema agrandada (Diego, 24/10/2026: se veian ovalados). */
.attr-btn, .awy-help { box-sizing: border-box !important; display: inline-flex !important; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; flex: 0 0 auto; padding: 0 !important; min-width: 0 !important; min-height: 0 !important; border-radius: 50% !important;
  line-height: 1 !important; overflow: hidden; white-space: nowrap; }
.attr-btn { width: 36px !important; height: 36px !important; font-size: 20px !important; }
.awy-help { width: 26px !important; height: 26px !important; font-size: 14px !important; font-weight: 700; }

/* Encabezado fijo de los dialogos: titulo y X de 44 px arriba a la derecha (no se va con el scroll). */
.dlg-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; margin: -16px -18px 0; padding: 6px 10px 6px 18px;
  background: #fff; border-bottom: 1px solid #e3e8ee; }
.dlg-head h2 { flex: 1 1 auto; margin: 0; min-width: 0; }
.dlg-head:only-child, .dlg-head:empty { display: none; }
.dlg > .dlg-head:first-child:not(:has(h2)) { justify-content: flex-end; background: transparent; border-bottom: 0; }
.dlg-x { flex: 0 0 44px; width: 44px !important; height: 44px !important; min-height: 44px; min-width: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent;
  font-size: 28px; line-height: 1; color: #33475b; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.dlg-x:hover, .dlg-x:focus-visible { background: #eef2f6; }
dialog { overflow-y: auto; max-height: 92dvh; }

/* Hoja de ruta: tramo con identificadores cortos y el viento como indicador (la carga va en la ventana Viento). */
table.legs .wind-tag { margin-left: 6px; font-size: 11px; color: #2a6db0; white-space: nowrap; }
table.legs tr.leg td.from .from-in { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
table.legs tr.leg td.from .leg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wind-legs li { display: flex; align-items: center; gap: 6px; }
.wind-legs .wl-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wind-legs input { flex: 0 0 70px; width: 70px !important; min-width: 0; }
#dlg-wind .wind-all { display: flex; gap: 6px; align-items: center; }
#dlg-wind .wind-all input { flex: 0 0 70px; width: 70px !important; }
#dlg-wind .wind-all button { flex: 1 1 auto; }
/* Telefono: cada tramo en dos renglones. Arriba "WPT1 → MGI" (con … si no entra) y el +; abajo rumbo, distancia, PM,
   GS, tiempo y combustible, con su rotulo chico, sin pasarse del ancho (360-375 px). */
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) {
  table.legs thead { display: none; }
  table.legs tr.leg { display: grid; grid-template-columns: 1.25fr .7fr 1fr .9fr .9fr .85fr; column-gap: 2px; padding: 3px 4px 5px; border-bottom: 1px solid var(--line); }
  table.legs tr.leg td { display: block; padding: 0 !important; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; background: var(--leg-row); }
  table.legs tr.leg td.from { grid-column: 1 / -1; max-width: none !important; font-size: 12px !important; padding: 2px 0 3px !important; word-break: normal !important; }
  table.legs tr.leg td.from .from-in { display: flex; width: 100%; }
  table.legs tr.leg td.from .leg-name { flex: 1 1 auto; }
  table.legs tr.leg td[data-c="wca"] { display: none; }
  table.legs tr.leg td[data-l]::before, table.legs tfoot td[data-l]::before { content: attr(data-l); display: block; font-size: 9.5px; color: var(--muted); line-height: 1.1; }
  table.legs tr.leg .phase { display: block; font-size: 9.5px; line-height: 1.1; color: var(--muted); }
  table.legs .ins-pt { position: relative !important; top: auto !important; right: auto !important; transform: none !important; order: 2; margin-left: auto !important; flex: none; }
  table.legs tr.leg td.from .ins-pt { order: 9; }
  table.legs tfoot tr { display: grid; grid-template-columns: 1.25fr .7fr 1fr .9fr .9fr .85fr; column-gap: 2px; }
  table.legs tfoot td { display: block; padding: 3px 0 !important; text-align: left; }
  table.legs tfoot td:empty { display: none; }
  table.legs tfoot td.ft-name { grid-column: 1 / 3; }
}

.altp-list li { padding: 4px 0; } .altp-list .altp-g { font-weight: 700; color: var(--muted); padding-top: 8px; }
table.legs .leg-sum, table.legs .wp-more { display: none; }
/* Telefono, simple (Diego, 24/10/2026: "mucha información ahí confunde"): el tramo muestra "WPT1 → MGI" y
   "068° · 21 NM · 0:11"; tocandolo se abre el detalle. El punto muestra numero, nombre, tipo y altitud; el resto
   (fichas, destino y alternativa, elevacion, quitar) va en "⋯". */
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) {
  table.legs .leg-sum { display: inline; margin-left: 8px; font-size: 13px; color: var(--ink, #1d2b3a); font-weight: 600; white-space: nowrap; }
  table.legs tr.leg:not(.open) td:not(.from) { display: none; }
  table.legs tr.leg:not(.open) .wind-tag, table.legs tr.leg:not(.open) .cv-tag { display: none; }
  table.legs tr.leg { cursor: pointer; }
  table.legs tr.leg.open .leg-sum { display: none; }
  table.legs tr.wp:not(.more) [data-aptfic], table.legs tr.wp:not(.more) [data-useapt], table.legs tr.wp:not(.more) .wp-role-l,
  table.legs tr.wp:not(.more) .role-tag:not(.dest), table.legs tr.wp:not(.more) .role-btn, table.legs tr.wp:not(.more) [data-del],
  table.legs tr.wp:not(.more) .wp-elev, table.legs tr.wp:not(.more) label:has(.wp-elev) { display: none !important; }
  table.legs .wp-more { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: 36px; height: 32px; font-size: 18px; padding: 0 !important; }
  table.legs tr.wp .wp-line > button[data-del] { margin-left: 0; }
  table.legs tr.wp:not(.more) .wp-line { flex-wrap: nowrap; }
  table.legs, table.legs tbody, table.legs tfoot { display: block; width: 100%; }
  table.legs tr.wp, table.legs tr.altn-sep, table.legs tr.altn-hint, table.legs tr.add-pt-row { display: block; }
  table.legs tr.wp td, table.legs tr.altn-sep td, table.legs tr.altn-hint td, table.legs tr.add-pt-row td { display: block; overflow: hidden; }
  table.legs tr.wp input.wp-name { flex: 1 1 60px; width: 0; min-width: 0; max-width: none; }
  table.legs tr.wp .wp-line > * { flex-shrink: 0; }
  table.legs tr.wp .wp-line > input.wp-name { flex-shrink: 1; }
  table.legs tr.leg td.from .leg-name { flex: 1 1 auto; min-width: 0; }
  table.legs .leg-sum { flex: none; margin-right: 6px; }
  table.legs tr.wp .wp-alt-l { font-size: 0; gap: 0; }
  table.legs tr.wp input.wp-alt { width: 58px; font-size: 14px; }
  table.legs tr.wp button.kind.goto { white-space: nowrap; }
}
#dlg-altprop .pbtns { gap: 14px; }

.dlg-x svg { display: block; flex: none; }

/* Control que quedaria debajo de una ventanita abierta: se oculta mientras esta abierta. */
.leaflet-control.under-popup { visibility: hidden !important; pointer-events: none !important; }

/* Botones del mapa unificados (Diego, 24/10/2026): todos de 44 x 44, mismo borde redondeado, fondo y sombra, iconos del
   mismo tamano y 8 px entre uno y otro; el zoom, un bloque de dos del mismo ancho. El (i) de las fuentes sigue siendo un
   circulo (pedido del 24/10), del mismo tamano. */
:is(#map, #fl-ctls, .fl-side) .leaflet-top.leaflet-left .leaflet-control { margin: 8px 0 0 10px; clear: both; }
:is(#map, #fl-ctls, .fl-side) .leaflet-top.leaflet-right .leaflet-control { margin: 8px 10px 0 0; }
:is(#map, #fl-ctls, .fl-side) .leaflet-top .leaflet-control:first-child { margin-top: 10px; }
:is(#map, #fl-ctls, .fl-side) .leaflet-control-zoom { width: 44px; border: 0 !important; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.3); background: #fff; }
:is(#map, #fl-ctls, .fl-side) .leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 44px !important; font-size: 22px !important; border-radius: 0 !important; border-bottom: 1px solid #e3e8ee; color: #26384a; }
:is(#map, #fl-ctls, .fl-side) .leaflet-control-zoom a:last-child { border-bottom: 0; }
:is(#map, #fl-ctls, .fl-side) .map-search .search-btn, :is(#map, #fl-ctls, .fl-side) .map-btn { width: 44px !important; height: 44px !important; min-height: 44px !important; min-width: 44px; padding: 0 !important;
  display: flex; align-items: center; justify-content: center; border: 0 !important; border-radius: 10px !important; background: #fff; color: #26384a;
  box-shadow: 0 1px 4px rgba(0,0,0,.3); font-size: 20px !important; line-height: 1; cursor: pointer; }
:is(#map, #fl-ctls, .fl-side) .map-search .search-btn svg { width: 20px; height: 20px; }
:is(#map, #fl-ctls, .fl-side) .map-search .search-box { left: 52px; }
:is(#map, #fl-ctls, .fl-side) .leaflet-control-layers { border: 0 !important; border-radius: 10px !important; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
:is(#map, #fl-ctls, .fl-side) .leaflet-control-layers:not(.leaflet-control-layers-expanded) { width: 44px; height: 44px; }
:is(#map, #fl-ctls, .fl-side) .leaflet-control-layers-toggle { width: 44px !important; height: 44px !important; background-size: 24px 24px; border-radius: 10px; }
:is(#map, #fl-ctls, .fl-side) .attr-btn { width: 44px !important; height: 44px !important; margin: 0 10px 10px 0; box-shadow: 0 1px 4px rgba(0,0,0,.3); border: 0 !important; background: #fff; }
/* Cartas superpuestas: el boton con la miniatura y el desplegable al costado */
.geo-ctl { position: relative; }
.geo-tbtn { position: relative; overflow: hidden; }
.geo-tbtn .geo-thumb { position: absolute; inset: 0; background: #e9eef3 center / cover no-repeat; opacity: .85; }
.geo-tbtn .geo-ico { position: relative; font-size: 18px; color: #1d3d5c; background: rgba(255,255,255,.85); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.geo-tbtn .geo-count, .proc-tbtn .geo-count { position: absolute; top: 2px; right: 3px; font-size: 10px; font-weight: 700; background: #1d4266; color: #fff; border-radius: 8px; padding: 0 4px; line-height: 14px; }
.geo-ctl.open .geo-tbtn { box-shadow: 0 0 0 2px #2a6db0, 0 1px 4px rgba(0,0,0,.3) !important; }
.geo-ctl .geo-pop { display: none; position: absolute; left: 52px; top: 0; width: 300px; max-width: calc(100vw - 80px); background: rgba(255,255,255,.97);
  padding: 8px 10px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.3); font-size: 12px; color: #222; z-index: 5; }
.geo-ctl.open .geo-pop { display: block; }

/* Cartel y pestaña de descargas en la capa superior (popover): se anulan los estilos del navegador para popover. */
.prog-card[popover], .prog-tab[popover] { inset: auto; border: 0; overflow: visible; }
.prog-card[popover] { width: auto; height: auto; max-width: 520px; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); margin: 0 auto; padding: 8px 10px; color: #fff; }
.prog-tab[popover] { width: auto; height: auto; right: 0; top: 42%; margin: 0; padding: 6px 4px 5px 6px; color: #fff; }
.prog-card[popover]:not(:popover-open), .prog-tab[popover]:not(:popover-open) { display: none; }
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) { .prog-card[popover] { bottom: calc(var(--bnav-h) + 8px + env(safe-area-inset-bottom)); } }

/* Frecuencias (oficiales: MADHEL/AIP, DINACIA, ROTAER; si no, OpenAIP): linea del aerodromo en la hoja de ruta (en el
   telefono solo con el detalle del punto abierto), tabla del log impreso y franja de la pantalla de vuelo. */
table.legs .wp-freq { font-size: 12px; color: #3a5068; padding: 2px 0 0 34px; }
@media (max-width: 900px) { table.legs tr.wp:not(.more) .wp-freq { display: none; } }
.fq-tab { border-collapse: collapse; width: 100%; font-size: 11px; margin: 2px 0 4px; }
.fq-tab th, .fq-tab td { border: 1px solid #ccd; padding: 2px 4px; text-align: left; }
.fq-tab .fq-src { color: #667; font-size: 10px; }
/* Arriba en vuelo, uno debajo del otro: proximo punto, frecuencias y avisos (antes con alturas fijas). */
.fl-top { position: absolute; top: calc(30px + env(safe-area-inset-top)); left: 8px; right: 70px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.fl-top > * { pointer-events: auto; }
.fl-top .fl-next, .fl-top .fl-alerts { position: static; }
.fl-freq { background: rgba(15, 42, 68, .88); color: #e9f1f8; font-size: 13px; padding: 4px 10px; line-height: 1.35; border-radius: 8px; }
.fl-freq b { color: #fff; }
body.night .fl-freq { background: rgba(20, 8, 8, .9); color: #d9a0a0; }

/* ---------- Escritorio: interfaz unificada (maqueta aprobada por Diego el 25/10/2026) ----------
   La barra de abajo del telefono pasa a ser una barra lateral a la izquierda, con las mismas secciones e iconos (Mapa,
   Ruta, Meteo, Briefing, Cartas, Notas, Mas). La seccion elegida se abre en el panel al lado del mapa (sin pestañas: solo
   las de la seccion, como Ruta y Perfil); Mapa cierra el panel. Arriba quedan el nombre y la cuenta: lo demas esta en
   Ruta (guardar, plan de vuelo, imprimir) y en Mas (vuelos grabados, ajustes, fuentes). La clase "desk" la pone app.js
   cuando no es telefono. */
:root { --rail-w: 76px; --top-h: 48px; }
body.desk .bnav { display: flex; flex-direction: column; position: fixed; left: 0; top: var(--top-h); bottom: 0; width: var(--rail-w); padding-top: 6px; background: #0f2a44; z-index: 1450; overflow-y: auto; }
body.desk .bnav button { flex: none; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px; background: transparent; color: #b9cadb; border: 0; border-radius: 0; font-size: 11.5px; line-height: 1.1; }
body.desk .bnav button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.desk .bnav button:hover { color: #fff; background: rgba(255,255,255,.06); }
body.desk .bnav button.on { color: #fff; background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 #5fb0ff; }
body.desk .disclaimer, body.desk .layout { margin-left: var(--rail-w); }
body.desk .actions > button:not(#btn-user), body.desk .actions .sep { display: none; }
body.desk #btn-user { border: 0; font-size: 15px; }
body.desk #btn-user::after { content: ' ▾'; font-size: 11px; }
body.desk .tabs button.scr-off { display: none; }
body.desk .tabs.scr-one { display: none; }
/* Mas: una columna a la derecha, del ancho del panel, en lugar del panel */
body.desk.more-on .layout .panel { display: none; }
body.desk .scr-more { position: fixed; right: 0; top: var(--top-h); bottom: 0; width: min(420px, 45vw); z-index: 1300; display: flex; flex-direction: column; background: #f4f6f9; border-left: 1px solid var(--line); box-shadow: -2px 0 8px rgba(0,0,0,.08); }
body.desk .scr-more.hidden { display: none; }
body.desk .scr-more .scr-head { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; background: #0f2a44; color: #fff; font-size: 16px; font-weight: 700; }
body.desk .scr-more .scr-head .scr-back { min-width: 40px; min-height: 36px; font-size: 20px; background: transparent; color: #fff; border: 0; padding: 0; }
body.desk .more-body { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
body.desk .more-body h3 { margin: 14px 4px 6px; font-size: 12px; color: #5a6b7d; font-weight: 700; }
body.desk .more-body button { display: block; width: 100%; min-height: 42px; text-align: left; font-size: 15px; padding: 0 14px; margin: 0 0 1px; background: #fff; color: #0f2a44; border: 1px solid #dde3ea; border-radius: 0; }
body.desk .more-body button:hover { background: #eef4fb; }
body.desk .more-body h3 + button { border-radius: 10px 10px 0 0; }
body.desk .more-body button:has(+ h3), body.desk .more-body button:has(+ p), body.desk .more-body button:last-child { border-radius: 0 0 10px 10px; }
/* El visor de cartas, el anotador y la pantalla de vuelo dejan la barra lateral a la vista */
body.desk .pdfview, body.desk .np, body.desk .flight { left: var(--rail-w); }
@media print { body.desk .bnav { display: none !important; } body.desk .disclaimer, body.desk .layout { margin-left: 0; } }
/* En vuelo no hay barra de arriba: la lateral empieza arriba de todo */
body.desk.flying .bnav { top: 0; }
/* Tramo de un procedimiento activado (SID verde, STAR azul, aproximacion violeta): la misma marca de color en la hoja */
table.legs tr.leg.proc td:first-child { box-shadow: inset 4px 0 0 var(--proc-col); }
table.legs tr.leg.proc .leg-name { color: var(--proc-col); font-weight: 600; }

/* Boton de procedimientos IFR de la ruta (mismo tamaño que los demas del mapa) y su desplegable al costado */
.proc-ctl { position: relative; }
.proc-tbtn { position: relative; }
.proc-tbtn .proc-ico { font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.proc-ctl.open .proc-tbtn { box-shadow: 0 0 0 2px #2a6db0, 0 1px 4px rgba(0,0,0,.3) !important; }
.proc-ctl .proc-pop { display: none; position: absolute; left: 52px; top: 0; width: 320px; max-width: calc(100vw - 80px); overflow-y: auto; overscroll-behavior: contain;
  background: rgba(255,255,255,.98); padding: 8px 10px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.3); font-size: 12px; color: #222; z-index: 5; }
.proc-ctl.open .proc-pop { display: block; }
.proc-pop .proc-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 6px 0; }
.proc-pop .proc-alt { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.proc-pop .proc-g { margin: 4px 0; }
.proc-pop .proc-g .meta { display: block; color: #5d6b7a; margin-bottom: 2px; }
.proc-pop .proc-opt { margin: 0 4px 4px 0; padding: 4px 8px; min-height: 32px; font-size: 12px; border-radius: 6px; }
.proc-pop .proc-opt.on { background: #e8f0fb; border-color: #2a6db0; font-weight: 700; cursor: default; }
.proc-pop .proc-opt:disabled { opacity: .5; cursor: not-allowed; }

/* Modo vuelo con los botones de planificacion (maqueta aprobada por Diego el 25/10/2026): los controles del mapa van en
   #fl-ctls (fuera del mapa, que gira), arriba a la izquierda como siempre; los de vuelo a la derecha, apenas mas grandes
   (48 px) que los del mapa (44 px); capas debajo de ellos. El ✈ en magenta mientras se vuela. */
#fl-ctls { position: fixed; left: 0; right: 0; top: calc(30px + env(safe-area-inset-top)); bottom: 0; z-index: 1501; pointer-events: none; }
#fl-ctls .leaflet-bottom { display: none; }
body.desk #fl-ctls { left: var(--rail-w); }
body.flying .fl-top { left: 62px; }
.fl-side button { width: 48px; height: 48px; font-size: 18px; border-radius: 10px; border: 0; }
.fl-side { flex-wrap: wrap-reverse; align-content: flex-start; align-items: flex-end; }
.fl-side .leaflet-control-layers { margin: 0; clear: none; float: none; }
.fl-side .leaflet-control-layers-expanded { max-height: 60vh; overflow-y: auto; }
#fl-ctls .map-fly .map-btn { background: #d81b7a !important; color: #fff !important; }
body.flying.night #fl-ctls .map-btn, body.flying.night #fl-ctls .leaflet-control-zoom, body.flying.night #fl-ctls .leaflet-control-zoom a { background: #1b2a3a !important; color: #c9d6e3 !important; }

/* Muestra del simbolo de cada capa en el selector (como una leyenda en linea) */
.leaflet-control-layers-list label > span { display: inline-flex; align-items: center; gap: 4px; }
.lyr-sym { display: inline-flex; width: 22px; height: 20px; align-items: center; justify-content: center; flex: none; }
.lyr-sym svg { width: 20px; height: 20px; }

/* Boton IFR sin procedimiento activo (hay publicados en el destino o la alternativa): mas apagado */
.proc-tbtn.idle .proc-ico { opacity: .75; }
.proc-pop .proc-aps { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.proc-pop .proc-ap { padding: 4px 8px; min-height: 34px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.proc-pop .proc-ap small { font-weight: 400; color: #5d6b7a; }
.proc-pop .proc-ap.on { background: #0f2a44; color: #fff; border-color: #0f2a44; }
.proc-pop .proc-ap.on small { color: #c9d6e3; }
.proc-pop .proc-ap1 { margin: 6px 0; font-size: 13px; }

/* En vuelo la columna de controles del mapa tambien se acomoda al alto disponible (telefono acostado: segunda columna) */
#fl-ctls .leaflet-top.leaflet-left { display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; }
#fl-ctls .leaflet-top.leaflet-left .leaflet-control { float: none; }

/* Escala en NM con km abajo */
.leaflet-control-scale-line.km { font-size: 10px; opacity: .8; margin-top: 2px; }
/* En vuelo: radial y distancia al avion, arriba en cada ventanita */
.fl-radial { margin: 2px 0 6px; padding: 4px 8px; background: #fde7f1; color: #7a0e45; border-radius: 6px; font-size: 15px; }
.fl-radial span { font-size: 12px; color: #5d6b7a; }
/* Regla */
.ruler-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ruler-bar { z-index: 1600; }
.ruler-bar .meta { color: #c9d6e3; font-size: 12px; }
.ruler-bar button { background: #fff; color: #0f2a44; border: 0; min-height: 34px; }
body.flying .ruler-bar { bottom: calc(var(--fl-data-h, 130px) + 8px); }
body.ruler-on .map-ruler .map-btn { background: #ffeb3b !important; }
body.ruler-on .leaflet-container { cursor: crosshair; }
.measure-here { font-size: 12px; margin-left: 4px; }

.geo-ctl .geo-pop { overflow-y: auto; overscroll-behavior: contain; }

/* Vuelo sin la barra de abajo (Diego, 25/10/2026): D→ y Frustrada flotan en la columna derecha; Terminar, por el ✈. La
   barra queda solo con el simulador (modo desarrollo) y los datos bajan al fondo. */
.flight .fl-bottom { display: none; }
.flight .fl-bottom.sim { display: flex; }
.flight .fl-data { bottom: env(safe-area-inset-bottom); }
.flight:has(.fl-bottom.sim) .fl-data { bottom: calc(50px + env(safe-area-inset-bottom)); }
@media (max-width: 900px), (max-height: 500px) and (hover: none) and (max-width: 950px) { .flight .fl-data { bottom: 0; } .flight:has(.fl-bottom.sim) .fl-data { bottom: 50px; } }
.fl-side .fl-dto { min-width: 0; font-size: 16px; }
.fl-side .fl-missed { font-size: 22px; }
/* Directo a: se abre arriba, entre las columnas (ya no hay barra abajo desde donde se abria) */
.flight .fl-dtobox { top: calc(30px + env(safe-area-inset-top)); bottom: auto; left: 62px; right: 66px; max-height: 65%; z-index: 40; }

/* Extremos de la regla (se arrastran): el mismo punto amarillo, con un area de toque mas grande */
.ruler-pt { cursor: grab; }
.ruler-pt i { position: absolute; left: 5px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #ffeb3b; border: 2px solid #111; box-sizing: border-box; }

/* Escribir sobre el mapa: ✎ resaltado cuando esta prendido; ↶ y CLR a su lado, solo mientras esta prendido */
.map-draw { display: flex; gap: 6px; align-items: flex-start; }
.map-draw .draw-tools { display: none; gap: 6px; }
body.draw-on .map-draw .draw-tools { display: flex; }
body.draw-on .map-draw .draw-tgl { background: #00a844 !important; color: #fff !important; }
:is(#map, #fl-ctls) .map-draw .draw-clr { font-size: 12px !important; font-weight: 800; }
body.draw-on .leaflet-container { cursor: crosshair; }

.map-draw .draw-col { width: 30px; height: 30px; min-height: 0; margin-top: 7px; padding: 0; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.map-draw .draw-col.on { outline: 3px solid #0f2a44; }

/* En vuelo la columna de la izquierda no se esconde con una ventanita abierta (Diego, 25/10/2026) */
body.flying.popup-open #fl-ctls .leaflet-top { visibility: visible; }

body.flying.fl-popup #fl-alerts, body.flying.fl-popup #fl-freq { display: none !important; }

/* Sugerencias y problemas (feedback.js) */
.fb-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #d81b60; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.fb-badge.nav { position: absolute; top: 2px; right: calc(50% - 22px); }
#bnav button[data-scr="more"] { position: relative; }
.fb-kinds { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0 8px; }
.fb-kinds label, label.chk { flex-direction: row; align-items: center; gap: 6px; }
.fb-file input { margin-top: 4px; }
.fb-img-prev img, .fb-img { max-width: 100%; max-height: 260px; border: 1px solid var(--line); border-radius: 6px; display: block; margin: 4px 0; }
.fb-pre { white-space: pre-wrap; font-size: 11px; background: #f6f8fa; border-radius: 6px; padding: 6px; max-height: 220px; overflow: auto; }
.fb-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.fb-filters select { width: auto; }
.fb-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0; cursor: pointer; position: relative; }
.fb-item.unread { border-color: #d81b60; }
.fb-item.queued { opacity: .75; cursor: default; }
.fb-item .fb-sel { position: absolute; right: 8px; top: 10px; }
.fb-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.fb-st { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: #e8eef5; color: #26384a; }
.fb-st.st-analisis { background: #fff3cd; color: #6b4e00; } .fb-st.st-hecha { background: #dff3e4; color: #1e7b3a; } .fb-st.st-descartada { background: #eee; color: #666; } .fb-st.por { background: #fde2e1; color: #9b1c1c; }
.fb-txt { font-size: 13px; margin-top: 4px; color: #33475b; }
.fb-thread { margin-top: 8px; cursor: default; }
.fb-msg { background: #f6f8fa; border-radius: 8px; padding: 6px 8px; margin: 4px 0; font-size: 13px; }
.fb-msg.adm { background: #e8f0fb; } .fb-msg.internal { background: #fff3cd; }
.fb-thread textarea { margin-top: 6px; }
.fb-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.fb-users { list-style: none; padding: 0; margin: 0; } .fb-users li { padding: 4px 0; border-bottom: 1px solid var(--line); }

/* Goma del lapiz: resaltada cuando esta activa */
body.erase-on .map-draw .draw-erase { background: #0f2a44 !important; color: #fff !important; }
body.erase-on .leaflet-container { cursor: cell; }

/* Frecuencias en el briefing y la planilla: verde azulado (no se usa para otra cosa), negrita y monoespaciada */
.fqv { color: #00695c; background: #e0f2f1; font-family: ui-monospace, Consolas, "Roboto Mono", monospace; font-weight: 700; padding: 0 3px; border-radius: 3px; white-space: nowrap; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* Lapiz o goma prendidos: los aerodromos, fijos, puntos y lineas no reciben el dedo ni el mouse (todo va al trazo);
   la regla sigue andando */
body.draw-on .leaflet-marker-pane > .leaflet-marker-icon:not(.ruler-pt), body.draw-on .leaflet-overlay-pane, body.draw-on .leaflet-overlay-pane * { pointer-events: none !important; }

/* Ajustes: simbolo del avion en vuelo (forma con vista previa y color) */
.plane-pref { border: 1px solid #d6dee8; border-radius: 8px; padding: 6px 8px 8px; margin: 8px 0; }
.plane-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.plane-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 4px; border: 2px solid #d6dee8; border-radius: 8px; background: #c9d3dc; font-size: 12px; color: #0b1f33; }
.plane-opt.on { border-color: #0f2a44; box-shadow: 0 0 0 2px rgba(15,42,68,.25); }
.plane-opt span { background: rgba(255,255,255,.85); border-radius: 4px; padding: 0 4px; }
.plane-pv { width: 50px; height: 50px; }
.plane-cols { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.plane-col { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #8a97a5; background: var(--c); padding: 0; }
.plane-col.on { outline: 3px solid #0f2a44; outline-offset: 2px; }

/* Panel de usuarios (Diego): tabla ordenable; en el telefono, una tarjeta por usuario */
#dlg-users { width: min(1100px, calc(100vw - 32px)); }
#adm-users-q { width: 100%; margin: 4px 0 6px; box-sizing: border-box; }
.adm-users { border-collapse: collapse; width: 100%; font-size: 13px; }
.adm-users th { text-align: left; padding: 4px 6px; border-bottom: 2px solid #c9d3dc; cursor: pointer; white-space: nowrap; user-select: none; }
.adm-users th.on { color: #1565c0; }
.adm-users td { padding: 4px 6px; border-bottom: 1px solid #e3e8ee; vertical-align: top; }
.adm-users td.c-routes, .adm-users td.c-aircraft, .adm-users td.c-tracks { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .adm-users, .adm-users thead, .adm-users tbody, .adm-users tr { display: block; }
  .adm-users thead tr { display: flex; flex-wrap: wrap; gap: 4px; }
  .adm-users th { border: 1px solid #c9d3dc; border-radius: 12px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
  .adm-users tbody tr { border: 1px solid #d6dee8; border-radius: 8px; margin: 8px 0; padding: 6px 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
  .adm-users td { border: 0; padding: 1px 0; text-align: left !important; }
  .adm-users td.c-name { grid-column: 1 / -1; }
  .adm-users td:not(.c-name)::before { content: attr(data-l) ": "; color: #667; font-size: 12px; }
}

/* Frecuencias sobre fondo oscuro (franja de vuelo) y en modo noche */
.fl-freq .fqv { color: #7fe0cf; background: rgba(0, 105, 92, .45); }
body.night .fl-freq .fqv { color: #e0b0b0; background: rgba(120, 30, 30, .45); }

/* Bienvenida (primera vez) y recordatorio en Mas */
#dlg-welcome .wl-n { margin: 0; font-size: 12px; color: #667; }
#dlg-welcome .wl-google { margin: 14px 0 4px; min-height: 44px; display: flex; justify-content: center; }
#dlg-welcome .wl-google .google-native { min-width: 260px; justify-content: center; font-weight: 600; }
#dlg-welcome .wl-mail { margin: 10px 0 0; text-align: center; }
#dlg-welcome .wl-mail button { margin: 4px 2px; }
#dlg-welcome select { width: 100%; }
.more-remind { display: flex; flex-direction: column; gap: 6px; margin: 0 0 8px; }
.more-remind button { border: 1px solid #f0c36d !important; background: #fff8e1 !important; color: #6d4c00 !important; text-align: left; }

/* Totales de la ruta: bloque propio debajo de los tramos (no ensancha el panel) */
.legs-tot { margin: 4px 0 6px; padding: 4px 6px; border-top: 2px solid var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.legs-tot .lt-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 2px 0; }
.legs-tot .lt-row span { white-space: nowrap; }
.legs-tot .lt-row.altn { color: #4a2f86; }
.legs-tot:empty { display: none; }

/* Unidad debajo del encabezado de cada columna de la hoja de ruta */
table.legs th .th-u { display: block; font-size: 10px; font-weight: 400; color: var(--muted); line-height: 1.1; }

/* Panel lateral angosto (Diego, 25/10/2026: "en el panel angosto usar la hoja de ruta compacta del teléfono"): la
   misma hoja compacta del telefono segun el ancho real de la tabla, no de la ventana. Al ensancharse vuelve la completa. */
.table-wrap { container-type: inline-size; container-name: legs; }
@container legs (max-width: 540px) {
  .table-wrap table.legs thead { display: none; }
  .table-wrap table.legs tr.leg { display: grid; grid-template-columns: 1.25fr .7fr 1fr .9fr .9fr .85fr; column-gap: 2px; padding: 3px 4px 5px; border-bottom: 1px solid var(--line); }
  .table-wrap table.legs tr.leg td { display: block; padding: 0 !important; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; background: var(--leg-row); }
  .table-wrap table.legs tr.leg td.from { grid-column: 1 / -1; max-width: none !important; font-size: 12px !important; padding: 2px 0 3px !important; word-break: normal !important; }
  .table-wrap table.legs tr.leg td.from .from-in { display: flex; width: 100%; }
  .table-wrap table.legs tr.leg td.from .leg-name { flex: 1 1 auto; }
  .table-wrap table.legs tr.leg td[data-c="wca"] { display: none; }
  .table-wrap table.legs tr.leg td[data-l]::before, .table-wrap table.legs tfoot td[data-l]::before { content: attr(data-l); display: block; font-size: 9.5px; color: var(--muted); line-height: 1.1; }
  .table-wrap table.legs tr.leg .phase { display: block; font-size: 9.5px; line-height: 1.1; color: var(--muted); }
  .table-wrap table.legs .ins-pt { position: relative !important; top: auto !important; right: auto !important; transform: none !important; order: 2; margin-left: auto !important; flex: none; } /* relative, no static: si no, el area de toque agrandada (::before) tapaba "Nueva ruta" y "Mis rutas" */
  .table-wrap table.legs tr.leg td.from .ins-pt { order: 9; }
  .table-wrap table.legs tfoot tr { display: grid; grid-template-columns: 1.25fr .7fr 1fr .9fr .9fr .85fr; column-gap: 2px; }
  .table-wrap table.legs tfoot td { display: block; padding: 3px 0 !important; text-align: left; }
  .table-wrap table.legs tfoot td:empty { display: none; }
  .table-wrap table.legs tfoot td.ft-name { grid-column: 1 / 3; }
  .table-wrap table.legs .leg-sum { display: inline; margin-left: 8px; font-size: 13px; color: var(--ink, #1d2b3a); font-weight: 600; white-space: nowrap; }
  .table-wrap table.legs tr.leg:not(.open) td:not(.from) { display: none; }
  .table-wrap table.legs tr.leg:not(.open) .wind-tag, .table-wrap table.legs tr.leg:not(.open) .cv-tag { display: none; }
  .table-wrap table.legs tr.leg { cursor: pointer; }
  .table-wrap table.legs tr.leg.open .leg-sum { display: none; }
  .table-wrap table.legs tr.wp:not(.more) [data-aptfic], .table-wrap table.legs tr.wp:not(.more) [data-useapt], .table-wrap table.legs tr.wp:not(.more) .wp-role-l,
  .table-wrap table.legs tr.wp:not(.more) .role-tag:not(.dest), .table-wrap table.legs tr.wp:not(.more) .role-btn, .table-wrap table.legs tr.wp:not(.more) [data-del],
  .table-wrap table.legs tr.wp:not(.more) .wp-elev, .table-wrap table.legs tr.wp:not(.more) label:has(.wp-elev) { display: none !important; }
  .table-wrap table.legs .wp-more { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: 36px; height: 32px; font-size: 18px; padding: 0 !important; }
  .table-wrap table.legs tr.wp .wp-line > button[data-del] { margin-left: 0; }
  .table-wrap table.legs tr.wp:not(.more) .wp-line { flex-wrap: nowrap; }
  .table-wrap table.legs, .table-wrap table.legs tbody, .table-wrap table.legs tfoot { display: block; width: 100%; }
  .table-wrap table.legs tr.wp, .table-wrap table.legs tr.altn-sep, .table-wrap table.legs tr.altn-hint, .table-wrap table.legs tr.add-pt-row { display: block; }
  .table-wrap table.legs tr.wp td, .table-wrap table.legs tr.altn-sep td, .table-wrap table.legs tr.altn-hint td, .table-wrap table.legs tr.add-pt-row td { display: block; overflow: hidden; }
  .table-wrap table.legs tr.wp input.wp-name { flex: 1 1 60px; width: 0; min-width: 0; max-width: none; }
  .table-wrap table.legs tr.wp .wp-line > * { flex-shrink: 0; }
  .table-wrap table.legs tr.wp .wp-line > input.wp-name { flex-shrink: 1; }
  .table-wrap table.legs tr.leg td.from .leg-name { flex: 1 1 auto; min-width: 0; }
  .table-wrap table.legs .leg-sum { flex: none; margin-right: 6px; }
  .table-wrap table.legs tr.wp .wp-alt-l { font-size: 0; gap: 0; }
  .table-wrap table.legs tr.wp input.wp-alt { width: 58px; font-size: 14px; }
  .table-wrap table.legs tr.wp button.kind.goto { white-space: nowrap; }
  .table-wrap table.legs tr.wp:not(.more) .wp-freq { display: none; }
  .table-wrap table.legs tr.leg { overflow: hidden; } /* sin los 11 px de scroll horizontal que dejaba la grilla del tramo */
}

/* Donde falta una tesela del mapa base (fuera de su cobertura, casi todo oceano), el mismo celeste del mar del estilo
   del mapa base en lugar del gris de Leaflet */
.leaflet-container { background: #80deea; }
/* El visor de cartas y AIP (chartview.js) es otro mapa de Leaflet: conserva su gris de visor de PDF */
.cv-map.leaflet-container { background: #525659; }
body.flying.night .leaflet-container { background: #1b2a3a; }

/* Cuenta: "Borrar mi cuenta" en rojo */
#dlg-account button.danger { background: #fff; border: 2px solid #c62828; color: #c62828; }

/* Iconos del menu Mas (Diego, 26/10/2026: "podriamos poner algunos iconos aqui"): de linea, monocromos, como la barra de
   abajo; mascara con el color del texto, asi sirven en claro y oscuro y no se pierden cuando el texto cambia */
.more-body button[id], .more-body button[data-proxy] { position: relative; }
.more-body h3 ~ button::before { content: ''; display: inline-block; width: 22px; height: 22px; margin: 0 12px -6px 0; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.more-body .primary::before { display: none !important; }
.more-body [data-proxy="btn-tracks"] { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2018c2.5-5%205-1%208-6s4.5-6%209-7%22%2F%3E%3Ccircle%20cx%3D%223.5%22%20cy%3D%2218%22%20r%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M17%203l3%202-2%203%22%2F%3E%3C%2Fsvg%3E"); }
.more-body #more-aircraft { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%202.5c1%200%201.5%201.2%201.5%203v4l7%203v2l-7-1.5v4l2%201.5v1.5l-3.5-.8-3.5.8V18.5l2-1.5v-4l-7%201.5v-2l7-3v-4c0-1.8.5-3%201.5-3z%22%2F%3E%3C%2Fsvg%3E"); }
.more-body #more-user { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M4%2021c.8-4%203.8-6.5%208-6.5s7.2%202.5%208%206.5%22%2F%3E%3C%2Fsvg%3E"); }
.more-body [data-proxy="btn-settings"] { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%2F%3E%3Cpath%20d%3D%22M12%202.5v3M12%2018.5v3M2.5%2012h3M18.5%2012h3M5.3%205.3l2.1%202.1M16.6%2016.6l2.1%202.1M5.3%2018.7l2.1-2.1M16.6%207.4l2.1-2.1%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%226.5%22%2F%3E%3C%2Fsvg%3E"); }
.more-body #more-offline { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%2018a4.5%204.5%200%200%201-.6-8.96A6%206%200%200%201%2018%209.5a4%204%200%200%201%20.5%208%22%2F%3E%3Cpath%20d%3D%22M12%2011v9M9%2017l3%203%203-3%22%2F%3E%3C%2Fsvg%3E"); }
.more-body #fb-new-btn { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%204.5h16v11H10l-5%204v-4H4z%22%2F%3E%3Cpath%20d%3D%22M12%207.5v5M9.5%2010h5%22%2F%3E%3C%2Fsvg%3E"); }
.more-body #fb-mine-btn { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%204.5h16v11H10l-5%204v-4H4z%22%2F%3E%3Cpath%20d%3D%22M8%208.5h8M8%2011.5h5%22%2F%3E%3C%2Fsvg%3E"); }
.more-body #fb-inbox-btn { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2013l3-8h12l3%208v6H3z%22%2F%3E%3Cpath%20d%3D%22M3%2013h5l1.5%203h5L16%2013h5%22%2F%3E%3C%2Fsvg%3E"); }
.more-body #fb-users-btn { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%228%22%20r%3D%223.5%22%2F%3E%3Cpath%20d%3D%22M3%2020c.7-3.5%203.3-5.5%207-5.5%201.5%200%202.8.3%203.9%201%22%2F%3E%3Cpath%20d%3D%22M15%2017l2%202%204-4%22%2F%3E%3C%2Fsvg%3E"); }
.more-body #adm-users-btn { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%229%22%20cy%3D%228%22%20r%3D%223.5%22%2F%3E%3Cpath%20d%3D%22M2.5%2020c.7-3.5%203.2-5.5%206.5-5.5s5.8%202%206.5%205.5%22%2F%3E%3Ccircle%20cx%3D%2217%22%20cy%3D%229%22%20r%3D%222.8%22%2F%3E%3Cpath%20d%3D%22M17.5%2014.5c2.3.3%203.8%202%204.2%204.5%22%2F%3E%3C%2Fsvg%3E"); }
.more-body [data-proxy="btn-credits"] { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22M12%2011v6%22%2F%3E%3Cpath%20d%3D%22M12%207.5v.5%22%2F%3E%3C%2Fsvg%3E"); }
.more-body #more-nocert { --ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203.5L21.5%2020h-19z%22%2F%3E%3Cpath%20d%3D%22M12%2010v5%22%2F%3E%3Cpath%20d%3D%22M12%2017.5v.5%22%2F%3E%3C%2Fsvg%3E"); }
/* Capa "Límites de FIR": nombre de cada FIR en su centro */
.fir-label { pointer-events: none; }
.fir-label span { display: block; transform: translate(-50%, -50%); white-space: nowrap; font: 600 11px/1.2 system-ui, sans-serif; letter-spacing: .04em; color: #0f7a6c; text-shadow: 0 0 2px #fff, 0 0 3px #fff, 0 0 4px #fff; }
